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
@@ -20,9 +20,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
20
20
|
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; }
|
21
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
22
22
|
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); }
|
23
|
-
function
|
24
|
-
function
|
25
|
-
function
|
23
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
24
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
25
|
+
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; } }
|
26
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
27
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
28
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
26
29
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'comments';
|
27
30
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 60;
|
28
31
|
const META_COMMENT = exports.META_COMMENT = 'comment';
|
@@ -129,16 +132,75 @@ var _preventEditorHiding = /*#__PURE__*/new WeakMap();
|
|
129
132
|
var _tempEditorDimensions = /*#__PURE__*/new WeakMap();
|
130
133
|
var _cellBelowCursor = /*#__PURE__*/new WeakMap();
|
131
134
|
var _commentValueBeforeSave = /*#__PURE__*/new WeakMap();
|
132
|
-
var
|
135
|
+
var _onMouseDown = /*#__PURE__*/new WeakSet();
|
136
|
+
var _onMouseOver = /*#__PURE__*/new WeakSet();
|
137
|
+
var _onMouseUp = /*#__PURE__*/new WeakSet();
|
138
|
+
var _onAfterRenderer = /*#__PURE__*/new WeakSet();
|
139
|
+
var _onEditorBlur = /*#__PURE__*/new WeakSet();
|
140
|
+
var _onEditorFocus = /*#__PURE__*/new WeakSet();
|
141
|
+
var _onEditorMouseDown = /*#__PURE__*/new WeakSet();
|
142
|
+
var _onEditorMouseUp = /*#__PURE__*/new WeakSet();
|
143
|
+
var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
|
144
|
+
var _onAfterScroll = /*#__PURE__*/new WeakSet();
|
133
145
|
class Comments extends _base.BasePlugin {
|
134
146
|
constructor() {
|
135
147
|
super(...arguments);
|
148
|
+
/**
|
149
|
+
* Observes the changes in the scroll position if triggered it hides the comment editor.
|
150
|
+
*/
|
151
|
+
_classPrivateMethodInitSpec(this, _onAfterScroll);
|
152
|
+
/**
|
153
|
+
* Observes the pressed keys and if there is already opened the comment editor prevents open
|
154
|
+
* the table editor into the fast edit mode.
|
155
|
+
*
|
156
|
+
* @param {Event} event The keydown event.
|
157
|
+
*/
|
158
|
+
_classPrivateMethodInitSpec(this, _onAfterDocumentKeyDown);
|
159
|
+
/**
|
160
|
+
* `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.
|
161
|
+
*
|
162
|
+
* @param {MouseEvent} event The `mouseup` event.
|
163
|
+
*/
|
164
|
+
_classPrivateMethodInitSpec(this, _onEditorMouseUp);
|
165
|
+
/**
|
166
|
+
* `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.
|
167
|
+
*
|
168
|
+
* @param {MouseEvent} event The `mousedown` event.
|
169
|
+
*/
|
170
|
+
_classPrivateMethodInitSpec(this, _onEditorMouseDown);
|
171
|
+
/**
|
172
|
+
* Hook observer the "focus" event from the comments editor element. The hook takes the control of
|
173
|
+
* the keyboard shortcuts by switching the context to plugins one.
|
174
|
+
*/
|
175
|
+
_classPrivateMethodInitSpec(this, _onEditorFocus);
|
176
|
+
/**
|
177
|
+
* Hook observer the "blur" event from the comments editor element. The hook clears the
|
178
|
+
* editor content and gives back the keyboard shortcuts control by switching to the "grid" context.
|
179
|
+
*/
|
180
|
+
_classPrivateMethodInitSpec(this, _onEditorBlur);
|
181
|
+
/**
|
182
|
+
* The `afterRenderer` hook callback.
|
183
|
+
*
|
184
|
+
* @param {HTMLTableCellElement} TD The rendered `TD` element.
|
185
|
+
* @param {object} cellProperties The rendered cell's property object.
|
186
|
+
*/
|
187
|
+
_classPrivateMethodInitSpec(this, _onAfterRenderer);
|
188
|
+
/**
|
189
|
+
* `mouseup` event callback.
|
190
|
+
*/
|
191
|
+
_classPrivateMethodInitSpec(this, _onMouseUp);
|
192
|
+
/**
|
193
|
+
* `mouseover` event callback.
|
194
|
+
*
|
195
|
+
* @param {MouseEvent} event The `mouseover` event.
|
196
|
+
*/
|
197
|
+
_classPrivateMethodInitSpec(this, _onMouseOver);
|
136
198
|
/**
|
137
199
|
* `mousedown` event callback.
|
138
200
|
*
|
139
201
|
* @param {MouseEvent} event The `mousedown` event.
|
140
202
|
*/
|
141
|
-
_classPrivateMethodInitSpec(this,
|
203
|
+
_classPrivateMethodInitSpec(this, _onMouseDown);
|
142
204
|
/**
|
143
205
|
* Current cell range, an object with `from` property, with `row` and `col` properties (e.q. `{from: {row: 1, col: 6}}`).
|
144
206
|
*
|
@@ -151,21 +213,30 @@ class Comments extends _base.BasePlugin {
|
|
151
213
|
* @private
|
152
214
|
* @type {CommentEditor}
|
153
215
|
*/
|
154
|
-
_classPrivateFieldInitSpec(this, _editor,
|
216
|
+
_classPrivateFieldInitSpec(this, _editor, {
|
217
|
+
writable: true,
|
218
|
+
value: null
|
219
|
+
});
|
155
220
|
/**
|
156
221
|
* Instance of {@link DisplaySwitch}.
|
157
222
|
*
|
158
223
|
* @private
|
159
224
|
* @type {DisplaySwitch}
|
160
225
|
*/
|
161
|
-
_classPrivateFieldInitSpec(this, _displaySwitch,
|
226
|
+
_classPrivateFieldInitSpec(this, _displaySwitch, {
|
227
|
+
writable: true,
|
228
|
+
value: null
|
229
|
+
});
|
162
230
|
/**
|
163
231
|
* Prevents showing/hiding editor that reacts on the logic triggered by the "mouseover" events.
|
164
232
|
*
|
165
233
|
* @private
|
166
234
|
* @type {boolean}
|
167
235
|
*/
|
168
|
-
_classPrivateFieldInitSpec(this, _preventEditorAutoSwitch,
|
236
|
+
_classPrivateFieldInitSpec(this, _preventEditorAutoSwitch, {
|
237
|
+
writable: true,
|
238
|
+
value: false
|
239
|
+
});
|
169
240
|
/**
|
170
241
|
* Prevents hiding editor when the table viewport is scrolled and that scroll is triggered by the
|
171
242
|
* keyboard shortcut that insert or edits the comment.
|
@@ -173,28 +244,40 @@ class Comments extends _base.BasePlugin {
|
|
173
244
|
* @private
|
174
245
|
* @type {boolean}
|
175
246
|
*/
|
176
|
-
_classPrivateFieldInitSpec(this, _preventEditorHiding,
|
247
|
+
_classPrivateFieldInitSpec(this, _preventEditorHiding, {
|
248
|
+
writable: true,
|
249
|
+
value: false
|
250
|
+
});
|
177
251
|
/**
|
178
252
|
* The property for holding editor dimensions for further processing.
|
179
253
|
*
|
180
254
|
* @private
|
181
255
|
* @type {object}
|
182
256
|
*/
|
183
|
-
_classPrivateFieldInitSpec(this, _tempEditorDimensions, {
|
257
|
+
_classPrivateFieldInitSpec(this, _tempEditorDimensions, {
|
258
|
+
writable: true,
|
259
|
+
value: {}
|
260
|
+
});
|
184
261
|
/**
|
185
262
|
* The flag that allows processing mousedown event correctly when comments editor is triggered.
|
186
263
|
*
|
187
264
|
* @private
|
188
265
|
* @type {boolean}
|
189
266
|
*/
|
190
|
-
_classPrivateFieldInitSpec(this, _cellBelowCursor,
|
267
|
+
_classPrivateFieldInitSpec(this, _cellBelowCursor, {
|
268
|
+
writable: true,
|
269
|
+
value: null
|
270
|
+
});
|
191
271
|
/**
|
192
272
|
* Holds the comment value before it's actually saved to the cell meta.
|
193
273
|
*
|
194
274
|
* @private
|
195
275
|
* @type {string}
|
196
276
|
*/
|
197
|
-
_classPrivateFieldInitSpec(this, _commentValueBeforeSave,
|
277
|
+
_classPrivateFieldInitSpec(this, _commentValueBeforeSave, {
|
278
|
+
writable: true,
|
279
|
+
value: ''
|
280
|
+
});
|
198
281
|
}
|
199
282
|
static get PLUGIN_KEY() {
|
200
283
|
return PLUGIN_KEY;
|
@@ -219,19 +302,19 @@ class Comments extends _base.BasePlugin {
|
|
219
302
|
if (this.enabled) {
|
220
303
|
return;
|
221
304
|
}
|
222
|
-
if (!_classPrivateFieldGet(
|
223
|
-
_classPrivateFieldSet(
|
305
|
+
if (!_classPrivateFieldGet(this, _editor)) {
|
306
|
+
_classPrivateFieldSet(this, _editor, new _commentEditor.default(this.hot.rootDocument, this.hot.isRtl()));
|
224
307
|
}
|
225
|
-
if (!_classPrivateFieldGet(
|
226
|
-
_classPrivateFieldSet(
|
308
|
+
if (!_classPrivateFieldGet(this, _displaySwitch)) {
|
309
|
+
_classPrivateFieldSet(this, _displaySwitch, new _displaySwitch2.default(this.getDisplayDelaySetting()));
|
227
310
|
}
|
228
311
|
this.addHook('afterContextMenuDefaultOptions', options => this.addToContextMenu(options));
|
229
|
-
this.addHook('afterRenderer', (TD, row, col, prop, value, cellProperties) =>
|
230
|
-
this.addHook('afterScroll', () =>
|
312
|
+
this.addHook('afterRenderer', (TD, row, col, prop, value, cellProperties) => _classPrivateMethodGet(this, _onAfterRenderer, _onAfterRenderer2).call(this, TD, cellProperties));
|
313
|
+
this.addHook('afterScroll', () => _classPrivateMethodGet(this, _onAfterScroll, _onAfterScroll2).call(this));
|
231
314
|
this.addHook('afterBeginEditing', () => this.hide());
|
232
|
-
this.addHook('afterDocumentKeyDown', event =>
|
233
|
-
_classPrivateFieldGet(
|
234
|
-
_classPrivateFieldGet(
|
315
|
+
this.addHook('afterDocumentKeyDown', event => _classPrivateMethodGet(this, _onAfterDocumentKeyDown, _onAfterDocumentKeyDown2).call(this, event));
|
316
|
+
_classPrivateFieldGet(this, _displaySwitch).addLocalHook('hide', () => this.hide());
|
317
|
+
_classPrivateFieldGet(this, _displaySwitch).addLocalHook('show', (row, col) => this.showAtCell(row, col));
|
235
318
|
this.registerShortcuts();
|
236
319
|
this.registerListeners();
|
237
320
|
super.enablePlugin();
|
@@ -244,7 +327,7 @@ class Comments extends _base.BasePlugin {
|
|
244
327
|
* - [`comments`](@/api/options.md#comments)
|
245
328
|
*/
|
246
329
|
updatePlugin() {
|
247
|
-
_classPrivateFieldGet(
|
330
|
+
_classPrivateFieldGet(this, _displaySwitch).updateDelay(this.getDisplayDelaySetting());
|
248
331
|
super.updatePlugin();
|
249
332
|
}
|
250
333
|
|
@@ -269,34 +352,34 @@ class Comments extends _base.BasePlugin {
|
|
269
352
|
keys: [['Control', 'Alt', 'M']],
|
270
353
|
callback: () => {
|
271
354
|
const range = this.hot.getSelectedRangeLast();
|
272
|
-
_classPrivateFieldSet(
|
355
|
+
_classPrivateFieldSet(this, _preventEditorHiding, true);
|
273
356
|
this.hot.scrollToFocusedCell(() => {
|
274
357
|
this.setRange(range);
|
275
358
|
this.show();
|
276
359
|
this.focusEditor();
|
277
360
|
manager.setActiveContextName(SHORTCUTS_CONTEXT_NAME);
|
278
361
|
this.hot._registerTimeout(() => {
|
279
|
-
_classPrivateFieldSet(
|
362
|
+
_classPrivateFieldSet(this, _preventEditorHiding, false);
|
280
363
|
});
|
281
364
|
});
|
282
365
|
},
|
283
366
|
stopPropagation: true,
|
284
367
|
runOnlyIf: () => {
|
285
368
|
var _this$hot$getSelected;
|
286
|
-
return ((_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isCell()) && !_classPrivateFieldGet(
|
369
|
+
return ((_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight.isCell()) && !_classPrivateFieldGet(this, _editor).isVisible();
|
287
370
|
},
|
288
371
|
group: SHORTCUTS_GROUP
|
289
372
|
});
|
290
373
|
pluginContext.addShortcut({
|
291
374
|
keys: [['Escape']],
|
292
375
|
callback: () => {
|
293
|
-
_classPrivateFieldGet(
|
376
|
+
_classPrivateFieldGet(this, _editor).setValue(_classPrivateFieldGet(this, _commentValueBeforeSave));
|
294
377
|
this.hide();
|
295
378
|
manager.setActiveContextName('grid');
|
296
379
|
},
|
297
380
|
runOnlyIf: () => {
|
298
381
|
var _this$hot$getSelected2;
|
299
|
-
return ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight.isCell()) && _classPrivateFieldGet(
|
382
|
+
return ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.highlight.isCell()) && _classPrivateFieldGet(this, _editor).isVisible();
|
300
383
|
},
|
301
384
|
group: SHORTCUTS_GROUP
|
302
385
|
});
|
@@ -308,7 +391,7 @@ class Comments extends _base.BasePlugin {
|
|
308
391
|
},
|
309
392
|
runOnlyIf: () => {
|
310
393
|
var _this$hot$getSelected3;
|
311
|
-
return ((_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight.isCell()) && _classPrivateFieldGet(
|
394
|
+
return ((_this$hot$getSelected3 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected3 === void 0 ? void 0 : _this$hot$getSelected3.highlight.isCell()) && _classPrivateFieldGet(this, _editor).isVisible();
|
312
395
|
},
|
313
396
|
group: SHORTCUTS_GROUP
|
314
397
|
});
|
@@ -333,13 +416,13 @@ class Comments extends _base.BasePlugin {
|
|
333
416
|
rootDocument
|
334
417
|
} = this.hot;
|
335
418
|
const editorElement = this.getEditorInputElement();
|
336
|
-
this.eventManager.addEventListener(rootDocument, 'mouseover', event =>
|
337
|
-
this.eventManager.addEventListener(rootDocument, 'mousedown', event =>
|
338
|
-
this.eventManager.addEventListener(rootDocument, 'mouseup', () =>
|
339
|
-
this.eventManager.addEventListener(editorElement, 'focus', () =>
|
340
|
-
this.eventManager.addEventListener(editorElement, 'blur', () =>
|
341
|
-
this.eventManager.addEventListener(editorElement, 'mousedown', event =>
|
342
|
-
this.eventManager.addEventListener(editorElement, 'mouseup', event =>
|
419
|
+
this.eventManager.addEventListener(rootDocument, 'mouseover', event => _classPrivateMethodGet(this, _onMouseOver, _onMouseOver2).call(this, event));
|
420
|
+
this.eventManager.addEventListener(rootDocument, 'mousedown', event => _classPrivateMethodGet(this, _onMouseDown, _onMouseDown2).call(this, event));
|
421
|
+
this.eventManager.addEventListener(rootDocument, 'mouseup', () => _classPrivateMethodGet(this, _onMouseUp, _onMouseUp2).call(this));
|
422
|
+
this.eventManager.addEventListener(editorElement, 'focus', () => _classPrivateMethodGet(this, _onEditorFocus, _onEditorFocus2).call(this));
|
423
|
+
this.eventManager.addEventListener(editorElement, 'blur', () => _classPrivateMethodGet(this, _onEditorBlur, _onEditorBlur2).call(this));
|
424
|
+
this.eventManager.addEventListener(editorElement, 'mousedown', event => _classPrivateMethodGet(this, _onEditorMouseDown, _onEditorMouseDown2).call(this, event));
|
425
|
+
this.eventManager.addEventListener(editorElement, 'mouseup', event => _classPrivateMethodGet(this, _onEditorMouseUp, _onEditorMouseUp2).call(this, event));
|
343
426
|
}
|
344
427
|
|
345
428
|
/**
|
@@ -390,7 +473,7 @@ class Comments extends _base.BasePlugin {
|
|
390
473
|
if (!this.range.from) {
|
391
474
|
throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');
|
392
475
|
}
|
393
|
-
const editorValue = _classPrivateFieldGet(
|
476
|
+
const editorValue = _classPrivateFieldGet(this, _editor).getValue();
|
394
477
|
let comment = '';
|
395
478
|
if (value !== null && value !== undefined) {
|
396
479
|
comment = value;
|
@@ -493,9 +576,9 @@ class Comments extends _base.BasePlugin {
|
|
493
576
|
return false;
|
494
577
|
}
|
495
578
|
const meta = this.hot.getCellMeta(this.range.from.row, this.range.from.col);
|
496
|
-
_classPrivateFieldGet(
|
497
|
-
_classPrivateFieldGet(
|
498
|
-
_classPrivateFieldGet(
|
579
|
+
_classPrivateFieldGet(this, _displaySwitch).cancelHiding();
|
580
|
+
_classPrivateFieldGet(this, _editor).setValue((_ref = meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null) !== null && _ref !== void 0 ? _ref : '');
|
581
|
+
_classPrivateFieldGet(this, _editor).show();
|
499
582
|
this.refreshEditor(true);
|
500
583
|
return true;
|
501
584
|
}
|
@@ -518,7 +601,7 @@ class Comments extends _base.BasePlugin {
|
|
518
601
|
* Hides the comment editor.
|
519
602
|
*/
|
520
603
|
hide() {
|
521
|
-
_classPrivateFieldGet(
|
604
|
+
_classPrivateFieldGet(this, _editor).hide();
|
522
605
|
}
|
523
606
|
|
524
607
|
/**
|
@@ -529,7 +612,7 @@ class Comments extends _base.BasePlugin {
|
|
529
612
|
refreshEditor() {
|
530
613
|
var _renderableRow, _renderableColumn;
|
531
614
|
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
532
|
-
if (!force && (!this.range.from || !_classPrivateFieldGet(
|
615
|
+
if (!force && (!this.range.from || !_classPrivateFieldGet(this, _editor).isVisible())) {
|
533
616
|
return;
|
534
617
|
}
|
535
618
|
const {
|
@@ -547,7 +630,7 @@ class Comments extends _base.BasePlugin {
|
|
547
630
|
|
548
631
|
// Reset the editor position to (0, 0) so the opening direction calculation wouldn't be influenced by its
|
549
632
|
// previous position
|
550
|
-
_classPrivateFieldGet(
|
633
|
+
_classPrivateFieldGet(this, _editor).setPosition(0, 0);
|
551
634
|
if (renderableRow === null) {
|
552
635
|
renderableRow = rowIndexMapper.getRenderableFromVisualIndex(rowIndexMapper.getNearestNotHiddenIndex(visualRow, -1));
|
553
636
|
}
|
@@ -575,9 +658,9 @@ class Comments extends _base.BasePlugin {
|
|
575
658
|
}, true);
|
576
659
|
const commentStyle = this.getCommentMeta(visualRow, visualColumn, META_STYLE);
|
577
660
|
if (commentStyle) {
|
578
|
-
_classPrivateFieldGet(
|
661
|
+
_classPrivateFieldGet(this, _editor).setSize(commentStyle.width, commentStyle.height);
|
579
662
|
} else {
|
580
|
-
_classPrivateFieldGet(
|
663
|
+
_classPrivateFieldGet(this, _editor).resetSize();
|
581
664
|
}
|
582
665
|
const lastColWidth = isBeforeRenderedColumns ? 0 : wtTable.getStretchedColumnWidth(renderableColumn);
|
583
666
|
const lastRowHeight = targetingPreviousRow && !isBeforeRenderedRows ? (0, _element.outerHeight)(TD) : 0;
|
@@ -590,7 +673,7 @@ class Comments extends _base.BasePlugin {
|
|
590
673
|
const {
|
591
674
|
width: editorWidth,
|
592
675
|
height: editorHeight
|
593
|
-
} = _classPrivateFieldGet(
|
676
|
+
} = _classPrivateFieldGet(this, _editor).getSize();
|
594
677
|
const {
|
595
678
|
innerWidth,
|
596
679
|
innerHeight
|
@@ -611,15 +694,15 @@ class Comments extends _base.BasePlugin {
|
|
611
694
|
if (top + editorHeight > innerHeight) {
|
612
695
|
y -= editorHeight - cellHeight + 1;
|
613
696
|
}
|
614
|
-
_classPrivateFieldGet(
|
615
|
-
_classPrivateFieldGet(
|
697
|
+
_classPrivateFieldGet(this, _editor).setPosition(x, y);
|
698
|
+
_classPrivateFieldGet(this, _editor).setReadOnlyState(this.getCommentMeta(visualRow, visualColumn, META_READONLY));
|
616
699
|
}
|
617
700
|
|
618
701
|
/**
|
619
702
|
* Focuses the comments editor element.
|
620
703
|
*/
|
621
704
|
focusEditor() {
|
622
|
-
_classPrivateFieldGet(
|
705
|
+
_classPrivateFieldGet(this, _editor).focus();
|
623
706
|
}
|
624
707
|
|
625
708
|
/**
|
@@ -688,28 +771,28 @@ class Comments extends _base.BasePlugin {
|
|
688
771
|
* @returns {HTMLTextAreaElement}
|
689
772
|
*/
|
690
773
|
getEditorInputElement() {
|
691
|
-
return _classPrivateFieldGet(
|
774
|
+
return _classPrivateFieldGet(this, _editor).getInputElement();
|
692
775
|
}
|
693
776
|
|
694
777
|
/**
|
695
778
|
* Destroys the plugin instance.
|
696
779
|
*/
|
697
780
|
destroy() {
|
698
|
-
if (_classPrivateFieldGet(
|
699
|
-
_classPrivateFieldGet(
|
781
|
+
if (_classPrivateFieldGet(this, _editor)) {
|
782
|
+
_classPrivateFieldGet(this, _editor).destroy();
|
700
783
|
}
|
701
|
-
if (_classPrivateFieldGet(
|
702
|
-
_classPrivateFieldGet(
|
784
|
+
if (_classPrivateFieldGet(this, _displaySwitch)) {
|
785
|
+
_classPrivateFieldGet(this, _displaySwitch).destroy();
|
703
786
|
}
|
704
787
|
super.destroy();
|
705
788
|
}
|
706
789
|
}
|
707
790
|
exports.Comments = Comments;
|
708
|
-
function
|
791
|
+
function _onMouseDown2(event) {
|
709
792
|
if (!this.hot.view || !this.hot.view._wt) {
|
710
793
|
return;
|
711
794
|
}
|
712
|
-
if (!_classPrivateFieldGet(
|
795
|
+
if (!_classPrivateFieldGet(this, _preventEditorAutoSwitch) && !this.targetIsCommentTextArea(event)) {
|
713
796
|
const eventCell = (0, _element.closest)(event.target, 'TD', 'TBODY');
|
714
797
|
let coordinates = null;
|
715
798
|
if (eventCell) {
|
@@ -720,81 +803,49 @@ function _onMouseDown(event) {
|
|
720
803
|
}
|
721
804
|
}
|
722
805
|
}
|
723
|
-
|
724
|
-
* `mouseover` event callback.
|
725
|
-
*
|
726
|
-
* @param {MouseEvent} event The `mouseover` event.
|
727
|
-
*/
|
728
|
-
function _onMouseOver(event) {
|
806
|
+
function _onMouseOver2(event) {
|
729
807
|
const {
|
730
808
|
rootDocument
|
731
809
|
} = this.hot;
|
732
|
-
if (_classPrivateFieldGet(
|
810
|
+
if (_classPrivateFieldGet(this, _preventEditorAutoSwitch) || _classPrivateFieldGet(this, _editor).isFocused() || (0, _element.hasClass)(event.target, 'wtBorder') || _classPrivateFieldGet(this, _cellBelowCursor) === event.target || !_classPrivateFieldGet(this, _editor)) {
|
733
811
|
return;
|
734
812
|
}
|
735
|
-
_classPrivateFieldSet(
|
813
|
+
_classPrivateFieldSet(this, _cellBelowCursor, rootDocument.elementFromPoint(event.clientX, event.clientY));
|
736
814
|
if (this.targetIsCellWithComment(event)) {
|
737
815
|
const range = this.hot._createCellRange(this.hot.getCoords(event.target));
|
738
|
-
_classPrivateFieldGet(
|
816
|
+
_classPrivateFieldGet(this, _displaySwitch).show(range);
|
739
817
|
} else if ((0, _element.isChildOf)(event.target, rootDocument) && !this.targetIsCommentTextArea(event)) {
|
740
|
-
_classPrivateFieldGet(
|
818
|
+
_classPrivateFieldGet(this, _displaySwitch).hide();
|
741
819
|
}
|
742
820
|
}
|
743
|
-
|
744
|
-
|
745
|
-
*/
|
746
|
-
function _onMouseUp() {
|
747
|
-
_classPrivateFieldSet(_preventEditorAutoSwitch, this, false);
|
821
|
+
function _onMouseUp2() {
|
822
|
+
_classPrivateFieldSet(this, _preventEditorAutoSwitch, false);
|
748
823
|
}
|
749
|
-
|
750
|
-
* The `afterRenderer` hook callback.
|
751
|
-
*
|
752
|
-
* @param {HTMLTableCellElement} TD The rendered `TD` element.
|
753
|
-
* @param {object} cellProperties The rendered cell's property object.
|
754
|
-
*/
|
755
|
-
function _onAfterRenderer(TD, cellProperties) {
|
824
|
+
function _onAfterRenderer2(TD, cellProperties) {
|
756
825
|
if (cellProperties[META_COMMENT] && cellProperties[META_COMMENT][META_COMMENT_VALUE]) {
|
757
826
|
(0, _element.addClass)(TD, cellProperties.commentedCellClassName);
|
758
827
|
}
|
759
828
|
}
|
760
|
-
|
761
|
-
|
762
|
-
* editor content and gives back the keyboard shortcuts control by switching to the "grid" context.
|
763
|
-
*/
|
764
|
-
function _onEditorBlur() {
|
765
|
-
_classPrivateFieldSet(_commentValueBeforeSave, this, '');
|
829
|
+
function _onEditorBlur2() {
|
830
|
+
_classPrivateFieldSet(this, _commentValueBeforeSave, '');
|
766
831
|
this.hot.getShortcutManager().setActiveContextName('grid');
|
767
832
|
this.setComment();
|
768
833
|
}
|
769
|
-
|
770
|
-
|
771
|
-
* the keyboard shortcuts by switching the context to plugins one.
|
772
|
-
*/
|
773
|
-
function _onEditorFocus() {
|
774
|
-
_classPrivateFieldSet(_commentValueBeforeSave, this, this.getComment());
|
834
|
+
function _onEditorFocus2() {
|
835
|
+
_classPrivateFieldSet(this, _commentValueBeforeSave, this.getComment());
|
775
836
|
this.hot.listen();
|
776
837
|
this.hot.getShortcutManager().setActiveContextName(SHORTCUTS_CONTEXT_NAME);
|
777
838
|
}
|
778
|
-
|
779
|
-
|
780
|
-
*
|
781
|
-
* @param {MouseEvent} event The `mousedown` event.
|
782
|
-
*/
|
783
|
-
function _onEditorMouseDown(event) {
|
784
|
-
_classPrivateFieldSet(_tempEditorDimensions, this, {
|
839
|
+
function _onEditorMouseDown2(event) {
|
840
|
+
_classPrivateFieldSet(this, _tempEditorDimensions, {
|
785
841
|
width: (0, _element.outerWidth)(event.target),
|
786
842
|
height: (0, _element.outerHeight)(event.target)
|
787
843
|
});
|
788
844
|
}
|
789
|
-
|
790
|
-
* `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.
|
791
|
-
*
|
792
|
-
* @param {MouseEvent} event The `mouseup` event.
|
793
|
-
*/
|
794
|
-
function _onEditorMouseUp(event) {
|
845
|
+
function _onEditorMouseUp2(event) {
|
795
846
|
const currentWidth = (0, _element.outerWidth)(event.target);
|
796
847
|
const currentHeight = (0, _element.outerHeight)(event.target);
|
797
|
-
if (currentWidth !== _classPrivateFieldGet(
|
848
|
+
if (currentWidth !== _classPrivateFieldGet(this, _tempEditorDimensions).width + 1 || currentHeight !== _classPrivateFieldGet(this, _tempEditorDimensions).height + 2) {
|
798
849
|
this.updateCommentMeta(this.range.from.row, this.range.from.col, {
|
799
850
|
[META_STYLE]: {
|
800
851
|
width: currentWidth,
|
@@ -803,22 +854,13 @@ function _onEditorMouseUp(event) {
|
|
803
854
|
});
|
804
855
|
}
|
805
856
|
}
|
806
|
-
|
807
|
-
|
808
|
-
* the table editor into the fast edit mode.
|
809
|
-
*
|
810
|
-
* @param {Event} event The keydown event.
|
811
|
-
*/
|
812
|
-
function _onAfterDocumentKeyDown(event) {
|
813
|
-
if (_classPrivateFieldGet(_editor, this).isVisible()) {
|
857
|
+
function _onAfterDocumentKeyDown2(event) {
|
858
|
+
if (_classPrivateFieldGet(this, _editor).isVisible()) {
|
814
859
|
(0, _event.stopImmediatePropagation)(event);
|
815
860
|
}
|
816
861
|
}
|
817
|
-
|
818
|
-
|
819
|
-
*/
|
820
|
-
function _onAfterScroll() {
|
821
|
-
if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
|
862
|
+
function _onAfterScroll2() {
|
863
|
+
if (!_classPrivateFieldGet(this, _preventEditorHiding)) {
|
822
864
|
this.hide();
|
823
865
|
}
|
824
866
|
}
|