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
@@ -1,15 +1,18 @@
|
|
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 _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
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
8
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
9
9
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
10
|
-
function _classPrivateFieldSet(
|
11
|
-
function
|
12
|
-
function
|
10
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
11
|
+
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; } }
|
12
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
13
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
14
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
15
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
13
16
|
import { BasePlugin } from "../base/index.mjs";
|
14
17
|
import staticRegister from "../../utils/staticRegister.mjs";
|
15
18
|
import { error, warn } from "../../helpers/console.mjs";
|
@@ -51,12 +54,228 @@ const isBlockedSource = source => source === 'UndoRedo.undo' || source === 'Undo
|
|
51
54
|
var _internalOperationPending = /*#__PURE__*/new WeakMap();
|
52
55
|
var _hotWasInitializedWithEmptyData = /*#__PURE__*/new WeakMap();
|
53
56
|
var _engineListeners = /*#__PURE__*/new WeakMap();
|
54
|
-
var
|
57
|
+
var _onBeforeValidate = /*#__PURE__*/new WeakSet();
|
58
|
+
var _onBeforeAutofill = /*#__PURE__*/new WeakSet();
|
59
|
+
var _onBeforeLoadData = /*#__PURE__*/new WeakSet();
|
60
|
+
var _onAfterCellMetaReset = /*#__PURE__*/new WeakSet();
|
61
|
+
var _onAfterLoadData = /*#__PURE__*/new WeakSet();
|
62
|
+
var _onModifyData = /*#__PURE__*/new WeakSet();
|
63
|
+
var _onModifySourceData = /*#__PURE__*/new WeakSet();
|
64
|
+
var _onAfterSetDataAtCell = /*#__PURE__*/new WeakSet();
|
65
|
+
var _onAfterSetSourceDataAtCell = /*#__PURE__*/new WeakSet();
|
66
|
+
var _onBeforeCreateRow = /*#__PURE__*/new WeakSet();
|
67
|
+
var _onBeforeCreateCol = /*#__PURE__*/new WeakSet();
|
68
|
+
var _onBeforeRemoveRow = /*#__PURE__*/new WeakSet();
|
69
|
+
var _onBeforeRemoveCol = /*#__PURE__*/new WeakSet();
|
70
|
+
var _onAfterCreateRow = /*#__PURE__*/new WeakSet();
|
71
|
+
var _onAfterCreateCol = /*#__PURE__*/new WeakSet();
|
72
|
+
var _onAfterRemoveRow = /*#__PURE__*/new WeakSet();
|
73
|
+
var _onAfterRemoveCol = /*#__PURE__*/new WeakSet();
|
74
|
+
var _onAfterDetachChild = /*#__PURE__*/new WeakSet();
|
75
|
+
var _onEngineValuesUpdated = /*#__PURE__*/new WeakSet();
|
76
|
+
var _onEngineNamedExpressionsAdded = /*#__PURE__*/new WeakSet();
|
77
|
+
var _onEngineNamedExpressionsRemoved = /*#__PURE__*/new WeakSet();
|
78
|
+
var _onEngineSheetAdded = /*#__PURE__*/new WeakSet();
|
79
|
+
var _onEngineSheetRenamed = /*#__PURE__*/new WeakSet();
|
80
|
+
var _onEngineSheetRemoved = /*#__PURE__*/new WeakSet();
|
55
81
|
export class Formulas extends BasePlugin {
|
56
82
|
constructor() {
|
57
83
|
var _this;
|
58
84
|
super(...arguments);
|
59
85
|
_this = this;
|
86
|
+
/**
|
87
|
+
* Called when a sheet is removed from the engine instance.
|
88
|
+
*
|
89
|
+
* @fires Hooks#afterSheetRemoved
|
90
|
+
* @param {string} removedSheetDisplayName The removed sheet name.
|
91
|
+
* @param {Array} changes The values and location of applied changes.
|
92
|
+
*/
|
93
|
+
_classPrivateMethodInitSpec(this, _onEngineSheetRemoved);
|
94
|
+
/**
|
95
|
+
* Called when a sheet in the engine instance is renamed.
|
96
|
+
*
|
97
|
+
* @fires Hooks#afterSheetRenamed
|
98
|
+
* @param {string} oldDisplayName The old name of the sheet.
|
99
|
+
* @param {string} newDisplayName The new name of the sheet.
|
100
|
+
*/
|
101
|
+
_classPrivateMethodInitSpec(this, _onEngineSheetRenamed);
|
102
|
+
/**
|
103
|
+
* Called when a new sheet is added to the engine instance.
|
104
|
+
*
|
105
|
+
* @fires Hooks#afterSheetAdded
|
106
|
+
* @param {string} addedSheetDisplayName The name of the added sheet.
|
107
|
+
*/
|
108
|
+
_classPrivateMethodInitSpec(this, _onEngineSheetAdded);
|
109
|
+
/**
|
110
|
+
* Called when a named expression is removed from the engine instance.
|
111
|
+
*
|
112
|
+
* @fires Hooks#afterNamedExpressionRemoved
|
113
|
+
* @param {string} namedExpressionName The name of the removed expression.
|
114
|
+
* @param {Array} changes The values and location of applied changes.
|
115
|
+
*/
|
116
|
+
_classPrivateMethodInitSpec(this, _onEngineNamedExpressionsRemoved);
|
117
|
+
/**
|
118
|
+
* Called when a named expression is added to the engine instance.
|
119
|
+
*
|
120
|
+
* @fires Hooks#afterNamedExpressionAdded
|
121
|
+
* @param {string} namedExpressionName The name of the added expression.
|
122
|
+
* @param {Array} changes The values and location of applied changes.
|
123
|
+
*/
|
124
|
+
_classPrivateMethodInitSpec(this, _onEngineNamedExpressionsAdded);
|
125
|
+
/**
|
126
|
+
* Called when a value is updated in the engine.
|
127
|
+
*
|
128
|
+
* @fires Hooks#afterFormulasValuesUpdate
|
129
|
+
* @param {Array} changes The values and location of applied changes.
|
130
|
+
*/
|
131
|
+
_classPrivateMethodInitSpec(this, _onEngineValuesUpdated);
|
132
|
+
/**
|
133
|
+
* `afterDetachChild` hook callback.
|
134
|
+
* Used to sync the data of the rows detached in the Nested Rows plugin with the engine's dataset.
|
135
|
+
*
|
136
|
+
* @param {object} parent An object representing the parent from which the element was detached.
|
137
|
+
* @param {object} element The detached element.
|
138
|
+
* @param {number} finalElementRowIndex The final row index of the detached element.
|
139
|
+
*/
|
140
|
+
_classPrivateMethodInitSpec(this, _onAfterDetachChild);
|
141
|
+
/**
|
142
|
+
* `afterRemoveCol` hook callback.
|
143
|
+
*
|
144
|
+
* @param {number} col Visual index of starter column.
|
145
|
+
* @param {number} amount An amount of removed columns.
|
146
|
+
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
147
|
+
* @param {string} [source] String that identifies source of hook call
|
148
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
149
|
+
*/
|
150
|
+
_classPrivateMethodInitSpec(this, _onAfterRemoveCol);
|
151
|
+
/**
|
152
|
+
* `afterRemoveRow` hook callback.
|
153
|
+
*
|
154
|
+
* @param {number} row Visual index of starter row.
|
155
|
+
* @param {number} amount An amount of removed rows.
|
156
|
+
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
157
|
+
* @param {string} [source] String that identifies source of hook call
|
158
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
159
|
+
*/
|
160
|
+
_classPrivateMethodInitSpec(this, _onAfterRemoveRow);
|
161
|
+
/**
|
162
|
+
* `afterCreateCol` hook callback.
|
163
|
+
*
|
164
|
+
* @param {number} visualColumn Represents the visual index of first newly created column in the data source.
|
165
|
+
* @param {number} amount Number of newly created columns in the data source.
|
166
|
+
* @param {string} [source] String that identifies source of hook call
|
167
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
168
|
+
*/
|
169
|
+
_classPrivateMethodInitSpec(this, _onAfterCreateCol);
|
170
|
+
/**
|
171
|
+
* `afterCreateRow` hook callback.
|
172
|
+
*
|
173
|
+
* @param {number} visualRow Represents the visual index of first newly created row in the data source array.
|
174
|
+
* @param {number} amount Number of newly created rows in the data source array.
|
175
|
+
* @param {string} [source] String that identifies source of hook call
|
176
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
177
|
+
*/
|
178
|
+
_classPrivateMethodInitSpec(this, _onAfterCreateRow);
|
179
|
+
/**
|
180
|
+
* `beforeRemoveCol` hook callback.
|
181
|
+
*
|
182
|
+
* @param {number} col Visual index of starter column.
|
183
|
+
* @param {number} amount Amount of columns to be removed.
|
184
|
+
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
185
|
+
* @returns {*|boolean} If false is returned the action is canceled.
|
186
|
+
*/
|
187
|
+
_classPrivateMethodInitSpec(this, _onBeforeRemoveCol);
|
188
|
+
/**
|
189
|
+
* `beforeRemoveRow` hook callback.
|
190
|
+
*
|
191
|
+
* @param {number} row Visual index of starter row.
|
192
|
+
* @param {number} amount Amount of rows to be removed.
|
193
|
+
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
194
|
+
* @returns {*|boolean} If false is returned the action is canceled.
|
195
|
+
*/
|
196
|
+
_classPrivateMethodInitSpec(this, _onBeforeRemoveRow);
|
197
|
+
/**
|
198
|
+
* `beforeCreateCol` hook callback.
|
199
|
+
*
|
200
|
+
* @param {number} visualColumn Represents the visual index of first newly created column in the data source.
|
201
|
+
* @param {number} amount Number of newly created columns in the data source.
|
202
|
+
* @returns {*|boolean} If false is returned the action is canceled.
|
203
|
+
*/
|
204
|
+
_classPrivateMethodInitSpec(this, _onBeforeCreateCol);
|
205
|
+
/**
|
206
|
+
* `beforeCreateRow` hook callback.
|
207
|
+
*
|
208
|
+
* @param {number} visualRow Represents the visual index of first newly created row in the data source array.
|
209
|
+
* @param {number} amount Number of newly created rows in the data source array.
|
210
|
+
* @returns {*|boolean} If false is returned the action is canceled.
|
211
|
+
*/
|
212
|
+
_classPrivateMethodInitSpec(this, _onBeforeCreateRow);
|
213
|
+
/**
|
214
|
+
* `onAfterSetSourceDataAtCell` hook callback.
|
215
|
+
*
|
216
|
+
* @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
|
217
|
+
* @param {string} [source] String that identifies source of hook call
|
218
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
219
|
+
*/
|
220
|
+
_classPrivateMethodInitSpec(this, _onAfterSetSourceDataAtCell);
|
221
|
+
/**
|
222
|
+
* `onAfterSetDataAtCell` hook callback.
|
223
|
+
*
|
224
|
+
* @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
|
225
|
+
* @param {string} [source] String that identifies source of hook call
|
226
|
+
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
227
|
+
*/
|
228
|
+
_classPrivateMethodInitSpec(this, _onAfterSetDataAtCell);
|
229
|
+
/**
|
230
|
+
* `modifySourceData` hook callback.
|
231
|
+
*
|
232
|
+
* @param {number} row Physical row index.
|
233
|
+
* @param {number|string} columnOrProp Physical column index or prop.
|
234
|
+
* @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
|
235
|
+
* property.
|
236
|
+
* @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
|
237
|
+
*/
|
238
|
+
_classPrivateMethodInitSpec(this, _onModifySourceData);
|
239
|
+
/**
|
240
|
+
* `modifyData` hook callback.
|
241
|
+
*
|
242
|
+
* @param {number} physicalRow Physical row index.
|
243
|
+
* @param {number} visualColumn Visual column index.
|
244
|
+
* @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
|
245
|
+
* property.
|
246
|
+
* @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
|
247
|
+
*/
|
248
|
+
_classPrivateMethodInitSpec(this, _onModifyData);
|
249
|
+
/**
|
250
|
+
* `afterLoadData` hook callback.
|
251
|
+
*
|
252
|
+
* @param {Array} sourceData Array of arrays or array of objects containing data.
|
253
|
+
* @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
|
254
|
+
* @param {string} [source] Source of the call.
|
255
|
+
*/
|
256
|
+
_classPrivateMethodInitSpec(this, _onAfterLoadData);
|
257
|
+
/**
|
258
|
+
* Callback to `afterCellMetaReset` hook which is triggered after setting cell meta.
|
259
|
+
*/
|
260
|
+
_classPrivateMethodInitSpec(this, _onAfterCellMetaReset);
|
261
|
+
/**
|
262
|
+
* `beforeLoadData` hook callback.
|
263
|
+
*
|
264
|
+
* @param {Array} sourceData Array of arrays or array of objects containing data.
|
265
|
+
* @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
|
266
|
+
* @param {string} [source] Source of the call.
|
267
|
+
*/
|
268
|
+
_classPrivateMethodInitSpec(this, _onBeforeLoadData);
|
269
|
+
/**
|
270
|
+
* `onBeforeAutofill` hook callback.
|
271
|
+
*
|
272
|
+
* @param {Array[]} fillData The data that was used to fill the `targetRange`. If `beforeAutofill` was used
|
273
|
+
* and returned `[[]]`, this will be the same object that was returned from `beforeAutofill`.
|
274
|
+
* @param {CellRange} sourceRange The range values will be filled from.
|
275
|
+
* @param {CellRange} targetRange The range new values will be filled into.
|
276
|
+
* @returns {boolean|*}
|
277
|
+
*/
|
278
|
+
_classPrivateMethodInitSpec(this, _onBeforeAutofill);
|
60
279
|
/**
|
61
280
|
* The hook allows to translate the formula value to calculated value before it goes to the
|
62
281
|
* validator function.
|
@@ -66,57 +285,66 @@ export class Formulas extends BasePlugin {
|
|
66
285
|
* @param {number|string} prop The visual column index or property name of the column.
|
67
286
|
* @returns {*} Returns value to validate.
|
68
287
|
*/
|
69
|
-
_classPrivateMethodInitSpec(this,
|
288
|
+
_classPrivateMethodInitSpec(this, _onBeforeValidate);
|
70
289
|
/**
|
71
290
|
* Flag used to bypass hooks in internal operations.
|
72
291
|
*
|
73
292
|
* @private
|
74
293
|
* @type {boolean}
|
75
294
|
*/
|
76
|
-
_classPrivateFieldInitSpec(this, _internalOperationPending,
|
295
|
+
_classPrivateFieldInitSpec(this, _internalOperationPending, {
|
296
|
+
writable: true,
|
297
|
+
value: false
|
298
|
+
});
|
77
299
|
/**
|
78
300
|
* Flag needed to mark if Handsontable was initialized with no data.
|
79
301
|
* (Required to work around the fact, that Handsontable auto-generates sample data, when no data is provided).
|
80
302
|
*
|
81
303
|
* @type {boolean}
|
82
304
|
*/
|
83
|
-
_classPrivateFieldInitSpec(this, _hotWasInitializedWithEmptyData,
|
305
|
+
_classPrivateFieldInitSpec(this, _hotWasInitializedWithEmptyData, {
|
306
|
+
writable: true,
|
307
|
+
value: false
|
308
|
+
});
|
84
309
|
/**
|
85
310
|
* The list of the HyperFormula listeners.
|
86
311
|
*
|
87
312
|
* @type {Array}
|
88
313
|
*/
|
89
|
-
_classPrivateFieldInitSpec(this, _engineListeners,
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
314
|
+
_classPrivateFieldInitSpec(this, _engineListeners, {
|
315
|
+
writable: true,
|
316
|
+
value: [['valuesUpdated', function () {
|
317
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
318
|
+
args[_key] = arguments[_key];
|
319
|
+
}
|
320
|
+
return _classPrivateMethodGet(_this, _onEngineValuesUpdated, _onEngineValuesUpdated2).call(_this, ...args);
|
321
|
+
}], ['namedExpressionAdded', function () {
|
322
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
323
|
+
args[_key2] = arguments[_key2];
|
324
|
+
}
|
325
|
+
return _classPrivateMethodGet(_this, _onEngineNamedExpressionsAdded, _onEngineNamedExpressionsAdded2).call(_this, ...args);
|
326
|
+
}], ['namedExpressionRemoved', function () {
|
327
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
328
|
+
args[_key3] = arguments[_key3];
|
329
|
+
}
|
330
|
+
return _classPrivateMethodGet(_this, _onEngineNamedExpressionsRemoved, _onEngineNamedExpressionsRemoved2).call(_this, ...args);
|
331
|
+
}], ['sheetAdded', function () {
|
332
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
333
|
+
args[_key4] = arguments[_key4];
|
334
|
+
}
|
335
|
+
return _classPrivateMethodGet(_this, _onEngineSheetAdded, _onEngineSheetAdded2).call(_this, ...args);
|
336
|
+
}], ['sheetRenamed', function () {
|
337
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
338
|
+
args[_key5] = arguments[_key5];
|
339
|
+
}
|
340
|
+
return _classPrivateMethodGet(_this, _onEngineSheetRenamed, _onEngineSheetRenamed2).call(_this, ...args);
|
341
|
+
}], ['sheetRemoved', function () {
|
342
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
343
|
+
args[_key6] = arguments[_key6];
|
344
|
+
}
|
345
|
+
return _classPrivateMethodGet(_this, _onEngineSheetRemoved, _onEngineSheetRemoved2).call(_this, ...args);
|
346
|
+
}]]
|
347
|
+
});
|
120
348
|
/**
|
121
349
|
* Static register used to set up one global HyperFormula instance.
|
122
350
|
* TODO: currently used in tests, might be removed later.
|
@@ -211,13 +439,13 @@ export class Formulas extends BasePlugin {
|
|
211
439
|
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
212
440
|
args[_key7] = arguments[_key7];
|
213
441
|
}
|
214
|
-
return
|
442
|
+
return _classPrivateMethodGet(_this2, _onBeforeLoadData, _onBeforeLoadData2).call(_this2, ...args);
|
215
443
|
});
|
216
444
|
this.addHook('afterLoadData', function () {
|
217
445
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
218
446
|
args[_key8] = arguments[_key8];
|
219
447
|
}
|
220
|
-
return
|
448
|
+
return _classPrivateMethodGet(_this2, _onAfterLoadData, _onAfterLoadData2).call(_this2, ...args);
|
221
449
|
});
|
222
450
|
|
223
451
|
// The `updateData` hooks utilize the same logic as the `loadData` hooks.
|
@@ -225,97 +453,97 @@ export class Formulas extends BasePlugin {
|
|
225
453
|
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
226
454
|
args[_key9] = arguments[_key9];
|
227
455
|
}
|
228
|
-
return
|
456
|
+
return _classPrivateMethodGet(_this2, _onBeforeLoadData, _onBeforeLoadData2).call(_this2, ...args);
|
229
457
|
});
|
230
458
|
this.addHook('afterUpdateData', function () {
|
231
459
|
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
232
460
|
args[_key10] = arguments[_key10];
|
233
461
|
}
|
234
|
-
return
|
462
|
+
return _classPrivateMethodGet(_this2, _onAfterLoadData, _onAfterLoadData2).call(_this2, ...args);
|
235
463
|
});
|
236
464
|
this.addHook('modifyData', function () {
|
237
465
|
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
238
466
|
args[_key11] = arguments[_key11];
|
239
467
|
}
|
240
|
-
return
|
468
|
+
return _classPrivateMethodGet(_this2, _onModifyData, _onModifyData2).call(_this2, ...args);
|
241
469
|
});
|
242
470
|
this.addHook('modifySourceData', function () {
|
243
471
|
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
|
244
472
|
args[_key12] = arguments[_key12];
|
245
473
|
}
|
246
|
-
return
|
474
|
+
return _classPrivateMethodGet(_this2, _onModifySourceData, _onModifySourceData2).call(_this2, ...args);
|
247
475
|
});
|
248
476
|
this.addHook('beforeValidate', function () {
|
249
477
|
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
|
250
478
|
args[_key13] = arguments[_key13];
|
251
479
|
}
|
252
|
-
return
|
480
|
+
return _classPrivateMethodGet(_this2, _onBeforeValidate, _onBeforeValidate2).call(_this2, ...args);
|
253
481
|
});
|
254
482
|
this.addHook('afterSetSourceDataAtCell', function () {
|
255
483
|
for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
|
256
484
|
args[_key14] = arguments[_key14];
|
257
485
|
}
|
258
|
-
return
|
486
|
+
return _classPrivateMethodGet(_this2, _onAfterSetSourceDataAtCell, _onAfterSetSourceDataAtCell2).call(_this2, ...args);
|
259
487
|
});
|
260
488
|
this.addHook('afterSetDataAtCell', function () {
|
261
489
|
for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
|
262
490
|
args[_key15] = arguments[_key15];
|
263
491
|
}
|
264
|
-
return
|
492
|
+
return _classPrivateMethodGet(_this2, _onAfterSetDataAtCell, _onAfterSetDataAtCell2).call(_this2, ...args);
|
265
493
|
});
|
266
494
|
this.addHook('afterSetDataAtRowProp', function () {
|
267
495
|
for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
|
268
496
|
args[_key16] = arguments[_key16];
|
269
497
|
}
|
270
|
-
return
|
498
|
+
return _classPrivateMethodGet(_this2, _onAfterSetDataAtCell, _onAfterSetDataAtCell2).call(_this2, ...args);
|
271
499
|
});
|
272
500
|
this.addHook('beforeCreateRow', function () {
|
273
501
|
for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
|
274
502
|
args[_key17] = arguments[_key17];
|
275
503
|
}
|
276
|
-
return
|
504
|
+
return _classPrivateMethodGet(_this2, _onBeforeCreateRow, _onBeforeCreateRow2).call(_this2, ...args);
|
277
505
|
});
|
278
506
|
this.addHook('beforeCreateCol', function () {
|
279
507
|
for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
|
280
508
|
args[_key18] = arguments[_key18];
|
281
509
|
}
|
282
|
-
return
|
510
|
+
return _classPrivateMethodGet(_this2, _onBeforeCreateCol, _onBeforeCreateCol2).call(_this2, ...args);
|
283
511
|
});
|
284
512
|
this.addHook('afterCreateRow', function () {
|
285
513
|
for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
|
286
514
|
args[_key19] = arguments[_key19];
|
287
515
|
}
|
288
|
-
return
|
516
|
+
return _classPrivateMethodGet(_this2, _onAfterCreateRow, _onAfterCreateRow2).call(_this2, ...args);
|
289
517
|
});
|
290
518
|
this.addHook('afterCreateCol', function () {
|
291
519
|
for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
|
292
520
|
args[_key20] = arguments[_key20];
|
293
521
|
}
|
294
|
-
return
|
522
|
+
return _classPrivateMethodGet(_this2, _onAfterCreateCol, _onAfterCreateCol2).call(_this2, ...args);
|
295
523
|
});
|
296
524
|
this.addHook('beforeRemoveRow', function () {
|
297
525
|
for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
|
298
526
|
args[_key21] = arguments[_key21];
|
299
527
|
}
|
300
|
-
return
|
528
|
+
return _classPrivateMethodGet(_this2, _onBeforeRemoveRow, _onBeforeRemoveRow2).call(_this2, ...args);
|
301
529
|
});
|
302
530
|
this.addHook('beforeRemoveCol', function () {
|
303
531
|
for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
|
304
532
|
args[_key22] = arguments[_key22];
|
305
533
|
}
|
306
|
-
return
|
534
|
+
return _classPrivateMethodGet(_this2, _onBeforeRemoveCol, _onBeforeRemoveCol2).call(_this2, ...args);
|
307
535
|
});
|
308
536
|
this.addHook('afterRemoveRow', function () {
|
309
537
|
for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
|
310
538
|
args[_key23] = arguments[_key23];
|
311
539
|
}
|
312
|
-
return
|
540
|
+
return _classPrivateMethodGet(_this2, _onAfterRemoveRow, _onAfterRemoveRow2).call(_this2, ...args);
|
313
541
|
});
|
314
542
|
this.addHook('afterRemoveCol', function () {
|
315
543
|
for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
|
316
544
|
args[_key24] = arguments[_key24];
|
317
545
|
}
|
318
|
-
return
|
546
|
+
return _classPrivateMethodGet(_this2, _onAfterRemoveCol, _onAfterRemoveCol2).call(_this2, ...args);
|
319
547
|
});
|
320
548
|
this.indexSyncer = new IndexSyncer(this.hot.rowIndexMapper, this.hot.columnIndexMapper, postponedAction => {
|
321
549
|
this.hot.addHookOnce('init', () => {
|
@@ -360,7 +588,7 @@ export class Formulas extends BasePlugin {
|
|
360
588
|
for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {
|
361
589
|
args[_key25] = arguments[_key25];
|
362
590
|
}
|
363
|
-
return
|
591
|
+
return _classPrivateMethodGet(_this2, _onAfterCellMetaReset, _onAfterCellMetaReset2).call(_this2, ...args);
|
364
592
|
});
|
365
593
|
|
366
594
|
// Handling undo actions on data just using HyperFormula's UndoRedo mechanism
|
@@ -384,15 +612,15 @@ export class Formulas extends BasePlugin {
|
|
384
612
|
for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {
|
385
613
|
args[_key26] = arguments[_key26];
|
386
614
|
}
|
387
|
-
return
|
615
|
+
return _classPrivateMethodGet(_this2, _onAfterDetachChild, _onAfterDetachChild2).call(_this2, ...args);
|
388
616
|
});
|
389
617
|
this.addHook('beforeAutofill', function () {
|
390
618
|
for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {
|
391
619
|
args[_key27] = arguments[_key27];
|
392
620
|
}
|
393
|
-
return
|
621
|
+
return _classPrivateMethodGet(_this2, _onBeforeAutofill, _onBeforeAutofill2).call(_this2, ...args);
|
394
622
|
});
|
395
|
-
_classPrivateFieldGet(
|
623
|
+
_classPrivateFieldGet(this, _engineListeners).forEach(_ref => {
|
396
624
|
let [eventName, listener] = _ref;
|
397
625
|
return this.engine.on(eventName, listener);
|
398
626
|
});
|
@@ -403,7 +631,7 @@ export class Formulas extends BasePlugin {
|
|
403
631
|
* Disables the plugin functionality for this Handsontable instance.
|
404
632
|
*/
|
405
633
|
disablePlugin() {
|
406
|
-
_classPrivateFieldGet(
|
634
|
+
_classPrivateFieldGet(this, _engineListeners).forEach(_ref2 => {
|
407
635
|
let [eventName, listener] = _ref2;
|
408
636
|
return this.engine.off(eventName, listener);
|
409
637
|
});
|
@@ -445,12 +673,12 @@ export class Formulas extends BasePlugin {
|
|
445
673
|
* Destroys the plugin instance.
|
446
674
|
*/
|
447
675
|
destroy() {
|
448
|
-
_classPrivateFieldGet(
|
676
|
+
_classPrivateFieldGet(this, _engineListeners).forEach(_ref3 => {
|
449
677
|
var _this$engine;
|
450
678
|
let [eventName, listener] = _ref3;
|
451
679
|
return (_this$engine = this.engine) === null || _this$engine === void 0 ? void 0 : _this$engine.off(eventName, listener);
|
452
680
|
});
|
453
|
-
_classPrivateFieldSet(
|
681
|
+
_classPrivateFieldSet(this, _engineListeners, null);
|
454
682
|
unregisterEngine(this.engine, this.hot);
|
455
683
|
this.engine = null;
|
456
684
|
super.destroy();
|
@@ -659,7 +887,7 @@ export class Formulas extends BasePlugin {
|
|
659
887
|
return this.engine.setCellContents(address, newValue);
|
660
888
|
}
|
661
889
|
}
|
662
|
-
function
|
890
|
+
function _onBeforeValidate2(value, visualRow, prop) {
|
663
891
|
const visualColumn = this.hot.propToCol(prop);
|
664
892
|
if (this.isFormulaCellType(visualRow, visualColumn)) {
|
665
893
|
const address = {
|
@@ -679,16 +907,7 @@ function _onBeforeValidate(value, visualRow, prop) {
|
|
679
907
|
}
|
680
908
|
return value;
|
681
909
|
}
|
682
|
-
|
683
|
-
* `onBeforeAutofill` hook callback.
|
684
|
-
*
|
685
|
-
* @param {Array[]} fillData The data that was used to fill the `targetRange`. If `beforeAutofill` was used
|
686
|
-
* and returned `[[]]`, this will be the same object that was returned from `beforeAutofill`.
|
687
|
-
* @param {CellRange} sourceRange The range values will be filled from.
|
688
|
-
* @param {CellRange} targetRange The range new values will be filled into.
|
689
|
-
* @returns {boolean|*}
|
690
|
-
*/
|
691
|
-
function _onBeforeAutofill(fillData, sourceRange, targetRange) {
|
910
|
+
function _onBeforeAutofill2(fillData, sourceRange, targetRange) {
|
692
911
|
const {
|
693
912
|
row: sourceTopStartRow,
|
694
913
|
col: sourceTopStartColumn
|
@@ -765,14 +984,7 @@ function _onBeforeAutofill(fillData, sourceRange, targetRange) {
|
|
765
984
|
}
|
766
985
|
return fillRangeData;
|
767
986
|
}
|
768
|
-
|
769
|
-
* `beforeLoadData` hook callback.
|
770
|
-
*
|
771
|
-
* @param {Array} sourceData Array of arrays or array of objects containing data.
|
772
|
-
* @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
|
773
|
-
* @param {string} [source] Source of the call.
|
774
|
-
*/
|
775
|
-
function _onBeforeLoadData(sourceData, initialLoad) {
|
987
|
+
function _onBeforeLoadData2(sourceData, initialLoad) {
|
776
988
|
let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
777
989
|
if (source.includes(toUpperCaseFirst(PLUGIN_KEY))) {
|
778
990
|
return;
|
@@ -780,12 +992,9 @@ function _onBeforeLoadData(sourceData, initialLoad) {
|
|
780
992
|
|
781
993
|
// This flag needs to be defined, because not passing data to HOT results in HOT auto-generating a `null`-filled
|
782
994
|
// initial dataset.
|
783
|
-
_classPrivateFieldSet(
|
995
|
+
_classPrivateFieldSet(this, _hotWasInitializedWithEmptyData, isUndefined(this.hot.getSettings().data));
|
784
996
|
}
|
785
|
-
|
786
|
-
* Callback to `afterCellMetaReset` hook which is triggered after setting cell meta.
|
787
|
-
*/
|
788
|
-
function _onAfterCellMetaReset() {
|
997
|
+
function _onAfterCellMetaReset2() {
|
789
998
|
const sourceDataArray = this.hot.getSourceDataArray();
|
790
999
|
let valueChanged = false;
|
791
1000
|
sourceDataArray.forEach((rowData, rowIndex) => {
|
@@ -805,48 +1014,32 @@ function _onAfterCellMetaReset() {
|
|
805
1014
|
});
|
806
1015
|
});
|
807
1016
|
if (valueChanged === true) {
|
808
|
-
_classPrivateFieldSet(
|
1017
|
+
_classPrivateFieldSet(this, _internalOperationPending, true);
|
809
1018
|
this.engine.setSheetContent(this.sheetId, sourceDataArray);
|
810
|
-
_classPrivateFieldSet(
|
1019
|
+
_classPrivateFieldSet(this, _internalOperationPending, false);
|
811
1020
|
}
|
812
1021
|
}
|
813
|
-
|
814
|
-
* `afterLoadData` hook callback.
|
815
|
-
*
|
816
|
-
* @param {Array} sourceData Array of arrays or array of objects containing data.
|
817
|
-
* @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.
|
818
|
-
* @param {string} [source] Source of the call.
|
819
|
-
*/
|
820
|
-
function _onAfterLoadData(sourceData, initialLoad) {
|
1022
|
+
function _onAfterLoadData2(sourceData, initialLoad) {
|
821
1023
|
let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
822
1024
|
if (source.includes(toUpperCaseFirst(PLUGIN_KEY))) {
|
823
1025
|
return;
|
824
1026
|
}
|
825
1027
|
this.sheetName = setupSheet(this.engine, this.hot.getSettings()[PLUGIN_KEY].sheetName);
|
826
|
-
if (!_classPrivateFieldGet(
|
1028
|
+
if (!_classPrivateFieldGet(this, _hotWasInitializedWithEmptyData)) {
|
827
1029
|
const sourceDataArray = this.hot.getSourceDataArray();
|
828
1030
|
if (this.engine.isItPossibleToReplaceSheetContent(this.sheetId, sourceDataArray)) {
|
829
|
-
_classPrivateFieldSet(
|
1031
|
+
_classPrivateFieldSet(this, _internalOperationPending, true);
|
830
1032
|
const dependentCells = this.engine.setSheetContent(this.sheetId, sourceDataArray);
|
831
1033
|
this.indexSyncer.setupSyncEndpoint(this.engine, this.sheetId);
|
832
1034
|
this.renderDependentSheets(dependentCells);
|
833
|
-
_classPrivateFieldSet(
|
1035
|
+
_classPrivateFieldSet(this, _internalOperationPending, false);
|
834
1036
|
}
|
835
1037
|
} else {
|
836
1038
|
this.switchSheet(this.sheetName);
|
837
1039
|
}
|
838
1040
|
}
|
839
|
-
|
840
|
-
|
841
|
-
*
|
842
|
-
* @param {number} physicalRow Physical row index.
|
843
|
-
* @param {number} visualColumn Visual column index.
|
844
|
-
* @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
|
845
|
-
* property.
|
846
|
-
* @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
|
847
|
-
*/
|
848
|
-
function _onModifyData(physicalRow, visualColumn, valueHolder, ioMode) {
|
849
|
-
if (ioMode !== 'get' || _classPrivateFieldGet(_internalOperationPending, this) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
|
1041
|
+
function _onModifyData2(physicalRow, visualColumn, valueHolder, ioMode) {
|
1042
|
+
if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
|
850
1043
|
return;
|
851
1044
|
}
|
852
1045
|
const visualRow = this.hot.toVisualRow(physicalRow);
|
@@ -888,17 +1081,8 @@ function _onModifyData(physicalRow, visualColumn, valueHolder, ioMode) {
|
|
888
1081
|
const value = typeof cellValue === 'object' && cellValue !== null ? cellValue.value : cellValue;
|
889
1082
|
valueHolder.value = value;
|
890
1083
|
}
|
891
|
-
|
892
|
-
|
893
|
-
*
|
894
|
-
* @param {number} row Physical row index.
|
895
|
-
* @param {number|string} columnOrProp Physical column index or prop.
|
896
|
-
* @param {object} valueHolder Object which contains original value which can be modified by overwriting `.value`
|
897
|
-
* property.
|
898
|
-
* @param {string} ioMode String which indicates for what operation hook is fired (`get` or `set`).
|
899
|
-
*/
|
900
|
-
function _onModifySourceData(row, columnOrProp, valueHolder, ioMode) {
|
901
|
-
if (ioMode !== 'get' || _classPrivateFieldGet(_internalOperationPending, this) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
|
1084
|
+
function _onModifySourceData2(row, columnOrProp, valueHolder, ioMode) {
|
1085
|
+
if (ioMode !== 'get' || _classPrivateFieldGet(this, _internalOperationPending) || this.sheetName === null || !this.engine.doesSheetExist(this.sheetName)) {
|
902
1086
|
return;
|
903
1087
|
}
|
904
1088
|
const visualRow = this.hot.toVisualRow(row);
|
@@ -931,14 +1115,7 @@ function _onModifySourceData(row, columnOrProp, valueHolder, ioMode) {
|
|
931
1115
|
};
|
932
1116
|
valueHolder.value = this.engine.getCellSerialized(address);
|
933
1117
|
}
|
934
|
-
|
935
|
-
* `onAfterSetDataAtCell` hook callback.
|
936
|
-
*
|
937
|
-
* @param {Array[]} changes An array of changes in format [[row, prop, oldValue, value], ...].
|
938
|
-
* @param {string} [source] String that identifies source of hook call
|
939
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
940
|
-
*/
|
941
|
-
function _onAfterSetDataAtCell(changes, source) {
|
1118
|
+
function _onAfterSetDataAtCell2(changes, source) {
|
942
1119
|
if (isBlockedSource(source)) {
|
943
1120
|
return;
|
944
1121
|
}
|
@@ -981,14 +1158,7 @@ function _onAfterSetDataAtCell(changes, source) {
|
|
981
1158
|
this.renderDependentSheets(dependentCells);
|
982
1159
|
this.validateDependentCells(dependentCells, changedCells);
|
983
1160
|
}
|
984
|
-
|
985
|
-
* `onAfterSetSourceDataAtCell` hook callback.
|
986
|
-
*
|
987
|
-
* @param {Array[]} changes An array of changes in format [[row, column, oldValue, value], ...].
|
988
|
-
* @param {string} [source] String that identifies source of hook call
|
989
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
990
|
-
*/
|
991
|
-
function _onAfterSetSourceDataAtCell(changes, source) {
|
1161
|
+
function _onAfterSetSourceDataAtCell2(changes, source) {
|
992
1162
|
if (isBlockedSource(source)) {
|
993
1163
|
return;
|
994
1164
|
}
|
@@ -1017,14 +1187,7 @@ function _onAfterSetSourceDataAtCell(changes, source) {
|
|
1017
1187
|
this.renderDependentSheets(dependentCells);
|
1018
1188
|
this.validateDependentCells(dependentCells, changedCells);
|
1019
1189
|
}
|
1020
|
-
|
1021
|
-
* `beforeCreateRow` hook callback.
|
1022
|
-
*
|
1023
|
-
* @param {number} visualRow Represents the visual index of first newly created row in the data source array.
|
1024
|
-
* @param {number} amount Number of newly created rows in the data source array.
|
1025
|
-
* @returns {*|boolean} If false is returned the action is canceled.
|
1026
|
-
*/
|
1027
|
-
function _onBeforeCreateRow(visualRow, amount) {
|
1190
|
+
function _onBeforeCreateRow2(visualRow, amount) {
|
1028
1191
|
let hfRowIndex = this.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow);
|
1029
1192
|
if (visualRow >= this.hot.countRows()) {
|
1030
1193
|
hfRowIndex = visualRow; // Row beyond the table boundaries.
|
@@ -1033,14 +1196,7 @@ function _onBeforeCreateRow(visualRow, amount) {
|
|
1033
1196
|
return false;
|
1034
1197
|
}
|
1035
1198
|
}
|
1036
|
-
|
1037
|
-
* `beforeCreateCol` hook callback.
|
1038
|
-
*
|
1039
|
-
* @param {number} visualColumn Represents the visual index of first newly created column in the data source.
|
1040
|
-
* @param {number} amount Number of newly created columns in the data source.
|
1041
|
-
* @returns {*|boolean} If false is returned the action is canceled.
|
1042
|
-
*/
|
1043
|
-
function _onBeforeCreateCol(visualColumn, amount) {
|
1199
|
+
function _onBeforeCreateCol2(visualColumn, amount) {
|
1044
1200
|
let hfColumnIndex = this.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn);
|
1045
1201
|
if (visualColumn >= this.hot.countCols()) {
|
1046
1202
|
hfColumnIndex = visualColumn; // Column beyond the table boundaries.
|
@@ -1049,76 +1205,35 @@ function _onBeforeCreateCol(visualColumn, amount) {
|
|
1049
1205
|
return false;
|
1050
1206
|
}
|
1051
1207
|
}
|
1052
|
-
|
1053
|
-
* `beforeRemoveRow` hook callback.
|
1054
|
-
*
|
1055
|
-
* @param {number} row Visual index of starter row.
|
1056
|
-
* @param {number} amount Amount of rows to be removed.
|
1057
|
-
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
1058
|
-
* @returns {*|boolean} If false is returned the action is canceled.
|
1059
|
-
*/
|
1060
|
-
function _onBeforeRemoveRow(row, amount, physicalRows) {
|
1208
|
+
function _onBeforeRemoveRow2(row, amount, physicalRows) {
|
1061
1209
|
const hfRows = this.rowAxisSyncer.setRemovedHfIndexes(physicalRows);
|
1062
1210
|
const possible = hfRows.every(hfRow => {
|
1063
1211
|
return this.engine.isItPossibleToRemoveRows(this.sheetId, [hfRow, 1]);
|
1064
1212
|
});
|
1065
1213
|
return possible === false ? false : undefined;
|
1066
1214
|
}
|
1067
|
-
|
1068
|
-
* `beforeRemoveCol` hook callback.
|
1069
|
-
*
|
1070
|
-
* @param {number} col Visual index of starter column.
|
1071
|
-
* @param {number} amount Amount of columns to be removed.
|
1072
|
-
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
1073
|
-
* @returns {*|boolean} If false is returned the action is canceled.
|
1074
|
-
*/
|
1075
|
-
function _onBeforeRemoveCol(col, amount, physicalColumns) {
|
1215
|
+
function _onBeforeRemoveCol2(col, amount, physicalColumns) {
|
1076
1216
|
const hfColumns = this.columnAxisSyncer.setRemovedHfIndexes(physicalColumns);
|
1077
1217
|
const possible = hfColumns.every(hfColumn => {
|
1078
1218
|
return this.engine.isItPossibleToRemoveColumns(this.sheetId, [hfColumn, 1]);
|
1079
1219
|
});
|
1080
1220
|
return possible === false ? false : undefined;
|
1081
1221
|
}
|
1082
|
-
|
1083
|
-
* `afterCreateRow` hook callback.
|
1084
|
-
*
|
1085
|
-
* @param {number} visualRow Represents the visual index of first newly created row in the data source array.
|
1086
|
-
* @param {number} amount Number of newly created rows in the data source array.
|
1087
|
-
* @param {string} [source] String that identifies source of hook call
|
1088
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
1089
|
-
*/
|
1090
|
-
function _onAfterCreateRow(visualRow, amount, source) {
|
1222
|
+
function _onAfterCreateRow2(visualRow, amount, source) {
|
1091
1223
|
if (isBlockedSource(source)) {
|
1092
1224
|
return;
|
1093
1225
|
}
|
1094
1226
|
const changes = this.engine.addRows(this.sheetId, [this.rowAxisSyncer.getHfIndexFromVisualIndex(visualRow), amount]);
|
1095
1227
|
this.renderDependentSheets(changes);
|
1096
1228
|
}
|
1097
|
-
|
1098
|
-
* `afterCreateCol` hook callback.
|
1099
|
-
*
|
1100
|
-
* @param {number} visualColumn Represents the visual index of first newly created column in the data source.
|
1101
|
-
* @param {number} amount Number of newly created columns in the data source.
|
1102
|
-
* @param {string} [source] String that identifies source of hook call
|
1103
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
1104
|
-
*/
|
1105
|
-
function _onAfterCreateCol(visualColumn, amount, source) {
|
1229
|
+
function _onAfterCreateCol2(visualColumn, amount, source) {
|
1106
1230
|
if (isBlockedSource(source)) {
|
1107
1231
|
return;
|
1108
1232
|
}
|
1109
1233
|
const changes = this.engine.addColumns(this.sheetId, [this.columnAxisSyncer.getHfIndexFromVisualIndex(visualColumn), amount]);
|
1110
1234
|
this.renderDependentSheets(changes);
|
1111
1235
|
}
|
1112
|
-
|
1113
|
-
* `afterRemoveRow` hook callback.
|
1114
|
-
*
|
1115
|
-
* @param {number} row Visual index of starter row.
|
1116
|
-
* @param {number} amount An amount of removed rows.
|
1117
|
-
* @param {number[]} physicalRows An array of physical rows removed from the data source.
|
1118
|
-
* @param {string} [source] String that identifies source of hook call
|
1119
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
1120
|
-
*/
|
1121
|
-
function _onAfterRemoveRow(row, amount, physicalRows, source) {
|
1236
|
+
function _onAfterRemoveRow2(row, amount, physicalRows, source) {
|
1122
1237
|
if (isBlockedSource(source)) {
|
1123
1238
|
return;
|
1124
1239
|
}
|
@@ -1130,16 +1245,7 @@ function _onAfterRemoveRow(row, amount, physicalRows, source) {
|
|
1130
1245
|
});
|
1131
1246
|
this.renderDependentSheets(changes);
|
1132
1247
|
}
|
1133
|
-
|
1134
|
-
* `afterRemoveCol` hook callback.
|
1135
|
-
*
|
1136
|
-
* @param {number} col Visual index of starter column.
|
1137
|
-
* @param {number} amount An amount of removed columns.
|
1138
|
-
* @param {number[]} physicalColumns An array of physical columns removed from the data source.
|
1139
|
-
* @param {string} [source] String that identifies source of hook call
|
1140
|
-
* ([list of all available sources]{@link https://handsontable.com/docs/javascript-data-grid/events-and-hooks/#handsontable-hooks}).
|
1141
|
-
*/
|
1142
|
-
function _onAfterRemoveCol(col, amount, physicalColumns, source) {
|
1248
|
+
function _onAfterRemoveCol2(col, amount, physicalColumns, source) {
|
1143
1249
|
if (isBlockedSource(source)) {
|
1144
1250
|
return;
|
1145
1251
|
}
|
@@ -1151,19 +1257,11 @@ function _onAfterRemoveCol(col, amount, physicalColumns, source) {
|
|
1151
1257
|
});
|
1152
1258
|
this.renderDependentSheets(changes);
|
1153
1259
|
}
|
1154
|
-
|
1155
|
-
* `afterDetachChild` hook callback.
|
1156
|
-
* Used to sync the data of the rows detached in the Nested Rows plugin with the engine's dataset.
|
1157
|
-
*
|
1158
|
-
* @param {object} parent An object representing the parent from which the element was detached.
|
1159
|
-
* @param {object} element The detached element.
|
1160
|
-
* @param {number} finalElementRowIndex The final row index of the detached element.
|
1161
|
-
*/
|
1162
|
-
function _onAfterDetachChild(parent, element, finalElementRowIndex) {
|
1260
|
+
function _onAfterDetachChild2(parent, element, finalElementRowIndex) {
|
1163
1261
|
var _element$__children;
|
1164
|
-
_classPrivateFieldSet(
|
1262
|
+
_classPrivateFieldSet(this, _internalOperationPending, true);
|
1165
1263
|
const rowsData = this.hot.getSourceDataArray(finalElementRowIndex, 0, finalElementRowIndex + (((_element$__children = element.__children) === null || _element$__children === void 0 ? void 0 : _element$__children.length) || 0), this.hot.countSourceCols());
|
1166
|
-
_classPrivateFieldSet(
|
1264
|
+
_classPrivateFieldSet(this, _internalOperationPending, false);
|
1167
1265
|
rowsData.forEach((row, relativeRowIndex) => {
|
1168
1266
|
row.forEach((value, colIndex) => {
|
1169
1267
|
this.engine.setCellContents({
|
@@ -1174,62 +1272,22 @@ function _onAfterDetachChild(parent, element, finalElementRowIndex) {
|
|
1174
1272
|
});
|
1175
1273
|
});
|
1176
1274
|
}
|
1177
|
-
|
1178
|
-
* Called when a value is updated in the engine.
|
1179
|
-
*
|
1180
|
-
* @fires Hooks#afterFormulasValuesUpdate
|
1181
|
-
* @param {Array} changes The values and location of applied changes.
|
1182
|
-
*/
|
1183
|
-
function _onEngineValuesUpdated(changes) {
|
1275
|
+
function _onEngineValuesUpdated2(changes) {
|
1184
1276
|
this.hot.runHooks('afterFormulasValuesUpdate', changes);
|
1185
1277
|
}
|
1186
|
-
|
1187
|
-
* Called when a named expression is added to the engine instance.
|
1188
|
-
*
|
1189
|
-
* @fires Hooks#afterNamedExpressionAdded
|
1190
|
-
* @param {string} namedExpressionName The name of the added expression.
|
1191
|
-
* @param {Array} changes The values and location of applied changes.
|
1192
|
-
*/
|
1193
|
-
function _onEngineNamedExpressionsAdded(namedExpressionName, changes) {
|
1278
|
+
function _onEngineNamedExpressionsAdded2(namedExpressionName, changes) {
|
1194
1279
|
this.hot.runHooks('afterNamedExpressionAdded', namedExpressionName, changes);
|
1195
1280
|
}
|
1196
|
-
|
1197
|
-
* Called when a named expression is removed from the engine instance.
|
1198
|
-
*
|
1199
|
-
* @fires Hooks#afterNamedExpressionRemoved
|
1200
|
-
* @param {string} namedExpressionName The name of the removed expression.
|
1201
|
-
* @param {Array} changes The values and location of applied changes.
|
1202
|
-
*/
|
1203
|
-
function _onEngineNamedExpressionsRemoved(namedExpressionName, changes) {
|
1281
|
+
function _onEngineNamedExpressionsRemoved2(namedExpressionName, changes) {
|
1204
1282
|
this.hot.runHooks('afterNamedExpressionRemoved', namedExpressionName, changes);
|
1205
1283
|
}
|
1206
|
-
|
1207
|
-
* Called when a new sheet is added to the engine instance.
|
1208
|
-
*
|
1209
|
-
* @fires Hooks#afterSheetAdded
|
1210
|
-
* @param {string} addedSheetDisplayName The name of the added sheet.
|
1211
|
-
*/
|
1212
|
-
function _onEngineSheetAdded(addedSheetDisplayName) {
|
1284
|
+
function _onEngineSheetAdded2(addedSheetDisplayName) {
|
1213
1285
|
this.hot.runHooks('afterSheetAdded', addedSheetDisplayName);
|
1214
1286
|
}
|
1215
|
-
|
1216
|
-
* Called when a sheet in the engine instance is renamed.
|
1217
|
-
*
|
1218
|
-
* @fires Hooks#afterSheetRenamed
|
1219
|
-
* @param {string} oldDisplayName The old name of the sheet.
|
1220
|
-
* @param {string} newDisplayName The new name of the sheet.
|
1221
|
-
*/
|
1222
|
-
function _onEngineSheetRenamed(oldDisplayName, newDisplayName) {
|
1287
|
+
function _onEngineSheetRenamed2(oldDisplayName, newDisplayName) {
|
1223
1288
|
this.sheetName = newDisplayName;
|
1224
1289
|
this.hot.runHooks('afterSheetRenamed', oldDisplayName, newDisplayName);
|
1225
1290
|
}
|
1226
|
-
|
1227
|
-
* Called when a sheet is removed from the engine instance.
|
1228
|
-
*
|
1229
|
-
* @fires Hooks#afterSheetRemoved
|
1230
|
-
* @param {string} removedSheetDisplayName The removed sheet name.
|
1231
|
-
* @param {Array} changes The values and location of applied changes.
|
1232
|
-
*/
|
1233
|
-
function _onEngineSheetRemoved(removedSheetDisplayName, changes) {
|
1291
|
+
function _onEngineSheetRemoved2(removedSheetDisplayName, changes) {
|
1234
1292
|
this.hot.runHooks('afterSheetRemoved', removedSheetDisplayName, changes);
|
1235
1293
|
}
|