handsontable 14.0.0 → 14.1.0-next-ba8c2b0-20240110
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/calculator/index.js +11 -6
- package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
- package/3rdparty/walkontable/src/cell/coords.d.ts +5 -5
- package/3rdparty/walkontable/src/cell/coords.js +2 -2
- package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
- package/3rdparty/walkontable/src/cell/range.d.ts +5 -5
- package/3rdparty/walkontable/src/cell/range.js +16 -41
- package/3rdparty/walkontable/src/cell/range.mjs +16 -41
- package/3rdparty/walkontable/src/core/_base.js +2 -14
- package/3rdparty/walkontable/src/core/_base.mjs +2 -14
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +0 -2
- package/3rdparty/walkontable/src/core/core.mjs +0 -2
- package/3rdparty/walkontable/src/facade/core.js +0 -9
- package/3rdparty/walkontable/src/facade/core.mjs +0 -9
- package/3rdparty/walkontable/src/filter/column.js +2 -2
- package/3rdparty/walkontable/src/filter/column.mjs +2 -2
- package/3rdparty/walkontable/src/filter/row.js +2 -2
- package/3rdparty/walkontable/src/filter/row.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +3 -4
- package/3rdparty/walkontable/src/index.mjs +1 -2
- package/3rdparty/walkontable/src/overlay/_base.js +2 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
- package/3rdparty/walkontable/src/overlays.js +2 -5
- package/3rdparty/walkontable/src/overlays.mjs +2 -6
- package/3rdparty/walkontable/src/renderer/_base.js +2 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +2 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rows.js +6 -5
- package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
- package/3rdparty/walkontable/src/renderer/table.js +2 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
- package/3rdparty/walkontable/src/scroll.js +4 -60
- package/3rdparty/walkontable/src/scroll.mjs +4 -60
- package/3rdparty/walkontable/src/selection/manager.js +0 -1
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
- package/3rdparty/walkontable/src/settings.js +5 -2
- package/3rdparty/walkontable/src/settings.mjs +4 -2
- package/3rdparty/walkontable/src/table.js +2 -3
- package/3rdparty/walkontable/src/table.mjs +2 -3
- package/3rdparty/walkontable/src/utils/column.js +29 -14
- package/3rdparty/walkontable/src/utils/column.mjs +29 -14
- package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
- package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
- package/3rdparty/walkontable/src/utils/row.js +2 -2
- package/3rdparty/walkontable/src/utils/row.mjs +2 -2
- package/3rdparty/walkontable/src/viewport.js +22 -17
- package/3rdparty/walkontable/src/viewport.mjs +23 -18
- package/CHANGELOG.md +36 -0
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/cellTypes/dropdownType/dropdownType.d.ts +6 -6
- package/cellTypes/dropdownType/dropdownType.js +4 -4
- package/cellTypes/dropdownType/dropdownType.mjs +4 -4
- package/core/focusCatcher/index.js +44 -6
- package/core/focusCatcher/index.mjs +44 -6
- package/core.d.ts +19 -19
- package/core.js +7 -12
- package/core.mjs +7 -12
- package/dataMap/dataMap.js +3 -2
- package/dataMap/dataMap.mjs +2 -2
- package/dataMap/dataSource.js +2 -2
- package/dataMap/dataSource.mjs +2 -2
- package/dataMap/metaManager/lazyFactoryMap.js +2 -2
- package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
- package/dataMap/metaManager/metaSchema.js +40 -25
- package/dataMap/metaManager/metaSchema.mjs +40 -25
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
- package/dist/handsontable.css +5 -5
- package/dist/handsontable.full.css +6 -6
- package/dist/handsontable.full.js +4835 -4508
- package/dist/handsontable.full.min.css +4 -4
- package/dist/handsontable.full.min.js +156 -154
- package/dist/handsontable.js +3441 -2825
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +18 -15
- package/editorManager.js +5 -6
- package/editorManager.mjs +5 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
- package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
- package/editors/baseEditor/baseEditor.d.ts +1 -1
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +2 -2
- package/editors/dateEditor/dateEditor.d.ts +1 -1
- package/editors/dateEditor/dateEditor.js +29 -33
- package/editors/dateEditor/dateEditor.mjs +29 -33
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/selectEditor/selectEditor.js +8 -2
- package/editors/selectEditor/selectEditor.mjs +8 -2
- package/editors/textEditor/textEditor.js +2 -6
- package/editors/textEditor/textEditor.mjs +2 -6
- package/eventManager.js +4 -3
- package/eventManager.mjs +4 -3
- package/helpers/browser.js +5 -2
- package/helpers/browser.mjs +5 -2
- package/helpers/feature.js +10 -0
- package/helpers/feature.mjs +9 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/index.d.ts +12 -0
- package/package.json +13 -4
- package/pluginHooks.d.ts +10 -9
- package/pluginHooks.js +10 -8
- package/pluginHooks.mjs +7 -7
- package/plugins/autoColumnSize/autoColumnSize.d.ts +2 -2
- package/plugins/autoColumnSize/autoColumnSize.js +2 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
- package/plugins/autoRowSize/autoRowSize.d.ts +3 -3
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/autofill/autofill.js +2 -2
- package/plugins/autofill/autofill.mjs +2 -2
- package/plugins/base/base.js +2 -2
- package/plugins/base/base.mjs +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.d.ts +1 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
- package/plugins/columnSorting/columnSorting.js +2 -2
- package/plugins/columnSorting/columnSorting.mjs +2 -2
- package/plugins/columnSorting/columnStatesManager.js +2 -2
- package/plugins/columnSorting/columnStatesManager.mjs +2 -2
- package/plugins/columnSummary/columnSummary.d.ts +11 -11
- package/plugins/columnSummary/columnSummary.js +20 -5
- package/plugins/columnSummary/columnSummary.mjs +20 -5
- package/plugins/columnSummary/endpoints.js +19 -5
- package/plugins/columnSummary/endpoints.mjs +19 -5
- package/plugins/comments/commentEditor.js +2 -2
- package/plugins/comments/commentEditor.mjs +2 -2
- package/plugins/comments/comments.js +2 -2
- package/plugins/comments/comments.mjs +2 -2
- package/plugins/comments/displaySwitch.js +2 -2
- package/plugins/comments/displaySwitch.mjs +2 -2
- package/plugins/contextMenu/commandExecutor.js +2 -2
- package/plugins/contextMenu/commandExecutor.mjs +2 -2
- package/plugins/contextMenu/contextMenu.js +2 -2
- package/plugins/contextMenu/contextMenu.mjs +2 -2
- package/plugins/contextMenu/itemsFactory.js +2 -2
- package/plugins/contextMenu/itemsFactory.mjs +2 -2
- package/plugins/contextMenu/menu/cursor.js +2 -2
- package/plugins/contextMenu/menu/cursor.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +2 -2
- package/plugins/contextMenu/menu/menu.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +40 -6
- package/plugins/copyPaste/copyPaste.mjs +40 -6
- package/plugins/customBorders/customBorders.d.ts +17 -8
- package/plugins/customBorders/customBorders.js +2 -7
- package/plugins/customBorders/customBorders.mjs +2 -7
- package/plugins/customBorders/utils.js +0 -1
- package/plugins/customBorders/utils.mjs +0 -1
- package/plugins/dragToScroll/dragToScroll.d.ts +8 -1
- package/plugins/dragToScroll/dragToScroll.js +18 -22
- package/plugins/dragToScroll/dragToScroll.mjs +18 -22
- package/plugins/dropdownMenu/dropdownMenu.js +2 -2
- package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
- package/plugins/exportFile/dataProvider.js +2 -2
- package/plugins/exportFile/dataProvider.mjs +2 -2
- package/plugins/exportFile/exportFile.d.ts +18 -3
- package/plugins/exportFile/types/_base.js +2 -2
- package/plugins/exportFile/types/_base.mjs +2 -2
- package/plugins/filters/component/_base.js +2 -2
- package/plugins/filters/component/_base.mjs +2 -2
- package/plugins/filters/component/actionBar.js +2 -2
- package/plugins/filters/component/actionBar.mjs +2 -2
- package/plugins/filters/component/condition.js +2 -2
- package/plugins/filters/component/condition.mjs +2 -2
- package/plugins/filters/component/operators.js +2 -2
- package/plugins/filters/component/operators.mjs +2 -2
- package/plugins/filters/component/value.js +2 -2
- package/plugins/filters/component/value.mjs +2 -2
- package/plugins/filters/conditionCollection.js +2 -2
- package/plugins/filters/conditionCollection.mjs +2 -2
- package/plugins/filters/conditionUpdateObserver.js +2 -2
- package/plugins/filters/conditionUpdateObserver.mjs +2 -2
- package/plugins/filters/dataFilter.js +2 -2
- package/plugins/filters/dataFilter.mjs +2 -2
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/filters/ui/_base.js +2 -2
- package/plugins/filters/ui/_base.mjs +2 -2
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.d.ts +1 -0
- package/plugins/formulas/formulas.js +2 -4
- package/plugins/formulas/formulas.mjs +2 -4
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
- package/plugins/manualColumnMove/ui/_base.js +2 -2
- package/plugins/manualColumnMove/ui/_base.mjs +2 -2
- package/plugins/manualColumnResize/manualColumnResize.js +6 -2
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -2
- package/plugins/manualRowMove/ui/_base.js +2 -2
- package/plugins/manualRowMove/ui/_base.mjs +2 -2
- package/plugins/manualRowResize/manualRowResize.js +7 -3
- package/plugins/manualRowResize/manualRowResize.mjs +7 -3
- package/plugins/mergeCells/calculations/autofill.js +2 -2
- package/plugins/mergeCells/calculations/autofill.mjs +2 -2
- package/plugins/mergeCells/calculations/selection.js +2 -2
- package/plugins/mergeCells/calculations/selection.mjs +2 -2
- package/plugins/mergeCells/cellCoords.js +2 -2
- package/plugins/mergeCells/cellCoords.mjs +2 -2
- package/plugins/mergeCells/cellsCollection.js +2 -2
- package/plugins/mergeCells/cellsCollection.mjs +2 -2
- package/plugins/mergeCells/mergeCells.js +2 -4
- package/plugins/mergeCells/mergeCells.mjs +2 -4
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.d.ts +8 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
- package/plugins/nestedHeaders/nestedHeaders.js +2 -3
- package/plugins/nestedHeaders/nestedHeaders.mjs +2 -3
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
- package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/nestedRows/nestedRows.js +2 -2
- package/plugins/nestedRows/nestedRows.mjs +2 -2
- package/plugins/nestedRows/ui/_base.js +2 -2
- package/plugins/nestedRows/ui/_base.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +2 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
- package/plugins/nestedRows/utils/rowMoveController.js +2 -2
- package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
- package/plugins/persistentState/persistentState.d.ts +5 -2
- package/plugins/persistentState/persistentState.js +2 -2
- package/plugins/persistentState/persistentState.mjs +2 -2
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +2 -2
- package/plugins/search/search.mjs +2 -2
- package/plugins/touchScroll/touchScroll.js +2 -2
- package/plugins/touchScroll/touchScroll.mjs +2 -2
- package/plugins/trimRows/trimRows.js +2 -2
- package/plugins/trimRows/trimRows.mjs +2 -2
- package/plugins/undoRedo/undoRedo.d.ts +3 -0
- package/plugins/undoRedo/undoRedo.js +64 -7
- package/plugins/undoRedo/undoRedo.mjs +64 -7
- package/renderers/autocompleteRenderer/autocompleteRenderer.d.ts +1 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
- package/renderers/baseRenderer/baseRenderer.d.ts +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.d.ts +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
- package/renderers/dateRenderer/dateRenderer.d.ts +1 -1
- package/renderers/dropdownRenderer/dropdownRenderer.d.ts +5 -0
- package/renderers/dropdownRenderer/dropdownRenderer.js +23 -0
- package/renderers/dropdownRenderer/dropdownRenderer.mjs +19 -0
- package/renderers/dropdownRenderer/index.d.ts +1 -0
- package/renderers/dropdownRenderer/index.js +6 -0
- package/renderers/dropdownRenderer/index.mjs +1 -0
- package/renderers/handsontableRenderer/handsontableRenderer.d.ts +1 -1
- package/renderers/htmlRenderer/htmlRenderer.d.ts +1 -1
- package/renderers/index.d.ts +3 -0
- package/renderers/index.js +12 -0
- package/renderers/index.mjs +7 -1
- package/renderers/numericRenderer/numericRenderer.d.ts +1 -1
- package/renderers/passwordRenderer/passwordRenderer.d.ts +1 -1
- package/renderers/selectRenderer/selectRenderer.d.ts +1 -1
- package/renderers/textRenderer/textRenderer.d.ts +1 -1
- package/renderers/timeRenderer/timeRenderer.d.ts +1 -1
- package/selection/highlight/highlight.js +2 -3
- package/selection/highlight/highlight.mjs +2 -3
- package/selection/highlight/visualSelection.js +2 -2
- package/selection/highlight/visualSelection.mjs +2 -2
- package/selection/range.js +2 -2
- package/selection/range.mjs +2 -2
- package/selection/selection.js +2 -2
- package/selection/selection.mjs +2 -2
- package/settings.d.ts +27 -14
- package/tableView.js +4 -5
- package/tableView.mjs +4 -5
- package/translations/indexMapper.d.ts +1 -1
- package/translations/indexMapper.js +4 -3
- package/translations/indexMapper.mjs +2 -2
- package/translations/mapCollections/aggregatedCollection.js +2 -2
- package/translations/mapCollections/aggregatedCollection.mjs +2 -2
- package/translations/mapCollections/mapCollection.js +2 -2
- package/translations/mapCollections/mapCollection.mjs +2 -2
- package/translations/maps/indexMap.js +2 -2
- package/translations/maps/indexMap.mjs +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
- package/utils/dataStructures/linkedList.js +2 -2
- package/utils/dataStructures/linkedList.mjs +2 -2
- package/utils/dataStructures/tree.js +2 -2
- package/utils/dataStructures/tree.mjs +2 -2
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +2 -2
- package/utils/interval.mjs +2 -2
- package/utils/samplesGenerator.js +2 -2
- package/utils/samplesGenerator.mjs +2 -2
- package/validators/dropdownValidator/dropdownValidator.d.ts +5 -0
- package/validators/dropdownValidator/dropdownValidator.js +18 -0
- package/validators/dropdownValidator/dropdownValidator.mjs +14 -0
- package/validators/dropdownValidator/index.d.ts +1 -0
- package/validators/dropdownValidator/index.js +6 -0
- package/validators/dropdownValidator/index.mjs +1 -0
- package/validators/index.d.ts +2 -0
- package/validators/index.js +4 -0
- package/validators/index.mjs +3 -1
- package/validators/timeValidator/timeValidator.js +0 -1
- package/validators/timeValidator/timeValidator.mjs +0 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
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; }
|
3
|
-
function _toPropertyKey(
|
4
|
-
function _toPrimitive(
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
4
|
+
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); }
|
5
5
|
/**
|
6
6
|
* Helper class for checking if element will fit at the desired side of cursor.
|
7
7
|
*
|
@@ -23,8 +23,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
23
23
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
24
24
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
25
25
|
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; }
|
26
|
-
function _toPropertyKey(
|
27
|
-
function _toPrimitive(
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
27
|
+
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); }
|
28
28
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
29
29
|
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; } }
|
30
30
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
@@ -3,8 +3,8 @@ import "core-js/modules/es.error.cause.js";
|
|
3
3
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
function _toPropertyKey(
|
7
|
-
function _toPrimitive(
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
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 _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
9
9
|
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; } }
|
10
10
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
@@ -23,8 +23,8 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclarati
|
|
23
23
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
24
24
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
25
25
|
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; }
|
26
|
-
function _toPropertyKey(
|
27
|
-
function _toPrimitive(
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
27
|
+
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); }
|
28
28
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
29
29
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
30
30
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
@@ -86,11 +86,13 @@ var _copyMode = /*#__PURE__*/new WeakMap();
|
|
86
86
|
var _isTriggeredByCopy = /*#__PURE__*/new WeakMap();
|
87
87
|
var _isTriggeredByCut = /*#__PURE__*/new WeakMap();
|
88
88
|
var _copyableRangesFactory = /*#__PURE__*/new WeakMap();
|
89
|
+
var _preventViewportScrollOnPaste = /*#__PURE__*/new WeakMap();
|
89
90
|
var _ensureClipboardEventsGetTriggered = /*#__PURE__*/new WeakSet();
|
90
91
|
var _countCopiedHeaders = /*#__PURE__*/new WeakSet();
|
91
92
|
var _addContentEditableToHighlightedCell = /*#__PURE__*/new WeakSet();
|
92
93
|
var _removeContentEditableFromHighlightedCell = /*#__PURE__*/new WeakSet();
|
93
94
|
var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
|
95
|
+
var _onAfterSelection = /*#__PURE__*/new WeakSet();
|
94
96
|
var _onAfterSelectionEnd = /*#__PURE__*/new WeakSet();
|
95
97
|
var _onSafariMouseEnter = /*#__PURE__*/new WeakSet();
|
96
98
|
var _onSafariMouseLeave = /*#__PURE__*/new WeakSet();
|
@@ -116,6 +118,16 @@ class CopyPaste extends _base.BasePlugin {
|
|
116
118
|
* Force focus on focusableElement after end of the selection.
|
117
119
|
*/
|
118
120
|
_classPrivateMethodInitSpec(this, _onAfterSelectionEnd);
|
121
|
+
/**
|
122
|
+
* Disables the viewport scroll after pasting the data.
|
123
|
+
*
|
124
|
+
* @param {number} fromRow Selection start row visual index.
|
125
|
+
* @param {number} fromColumn Selection start column visual index.
|
126
|
+
* @param {number} toRow Selection end row visual index.
|
127
|
+
* @param {number} toColumn Selection end column visual index.
|
128
|
+
* @param {object} preventScrolling Object with `value` property. If `true`, the viewport scroll will be prevented.
|
129
|
+
*/
|
130
|
+
_classPrivateMethodInitSpec(this, _onAfterSelection);
|
119
131
|
/**
|
120
132
|
* Add copy and cut options to the Context Menu.
|
121
133
|
*
|
@@ -255,6 +267,15 @@ class CopyPaste extends _base.BasePlugin {
|
|
255
267
|
countColumnHeaders: () => this.hot.view.getColumnHeadersCount()
|
256
268
|
})
|
257
269
|
});
|
270
|
+
/**
|
271
|
+
* Flag that indicates if the viewport scroll should be prevented after pasting the data.
|
272
|
+
*
|
273
|
+
* @type {boolean}
|
274
|
+
*/
|
275
|
+
_classPrivateFieldInitSpec(this, _preventViewportScrollOnPaste, {
|
276
|
+
writable: true,
|
277
|
+
value: false
|
278
|
+
});
|
258
279
|
/**
|
259
280
|
* Ranges of the cells coordinates, which should be used to copy/cut/paste actions.
|
260
281
|
*
|
@@ -306,6 +327,12 @@ class CopyPaste extends _base.BasePlugin {
|
|
306
327
|
this.uiContainer = (_settings$uiContainer = settings.uiContainer) !== null && _settings$uiContainer !== void 0 ? _settings$uiContainer : this.uiContainer;
|
307
328
|
}
|
308
329
|
this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(this, options));
|
330
|
+
this.addHook('afterSelection', function () {
|
331
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
332
|
+
args[_key] = arguments[_key];
|
333
|
+
}
|
334
|
+
return _classPrivateMethodGet(_this, _onAfterSelection, _onAfterSelection2).call(_this, ...args);
|
335
|
+
});
|
309
336
|
this.addHook('afterSelectionEnd', () => _classPrivateMethodGet(this, _onAfterSelectionEnd, _onAfterSelectionEnd2).call(this));
|
310
337
|
this.eventManager.addEventListener(this.hot.rootDocument, 'copy', function () {
|
311
338
|
return _this.onCopy(...arguments);
|
@@ -320,14 +347,14 @@ class CopyPaste extends _base.BasePlugin {
|
|
320
347
|
// Without this workaround Safari (tested on Safari@16.5.2) does allow copying/cutting from the browser menu.
|
321
348
|
if ((0, _browser.isSafari)()) {
|
322
349
|
this.eventManager.addEventListener(this.hot.rootDocument.body, 'mouseenter', function () {
|
323
|
-
for (var
|
324
|
-
args[
|
350
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
351
|
+
args[_key2] = arguments[_key2];
|
325
352
|
}
|
326
353
|
return _classPrivateMethodGet(_this, _onSafariMouseEnter, _onSafariMouseEnter2).call(_this, ...args);
|
327
354
|
});
|
328
355
|
this.eventManager.addEventListener(this.hot.rootDocument.body, 'mouseleave', function () {
|
329
|
-
for (var
|
330
|
-
args[
|
356
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
357
|
+
args[_key3] = arguments[_key3];
|
331
358
|
}
|
332
359
|
return _classPrivateMethodGet(_this, _onSafariMouseLeave, _onSafariMouseLeave2).call(_this, ...args);
|
333
360
|
});
|
@@ -597,6 +624,7 @@ class CopyPaste extends _base.BasePlugin {
|
|
597
624
|
}
|
598
625
|
newRows.push(newRow);
|
599
626
|
}
|
627
|
+
_classPrivateFieldSet(this, _preventViewportScrollOnPaste, true);
|
600
628
|
this.hot.populateFromArray(startRow, startColumn, newRows, undefined, undefined, 'CopyPaste.paste', this.pasteMode);
|
601
629
|
return [startRow, startColumn, lastVisualRow, lastVisualColumn];
|
602
630
|
}
|
@@ -790,6 +818,12 @@ function _onAfterContextMenuDefaultOptions2(options) {
|
|
790
818
|
}
|
791
819
|
options.items.push((0, _cut.default)(this));
|
792
820
|
}
|
821
|
+
function _onAfterSelection2(fromRow, fromColumn, toRow, toColumn, preventScrolling) {
|
822
|
+
if (_classPrivateFieldGet(this, _preventViewportScrollOnPaste)) {
|
823
|
+
preventScrolling.value = true;
|
824
|
+
}
|
825
|
+
_classPrivateFieldSet(this, _preventViewportScrollOnPaste, false);
|
826
|
+
}
|
793
827
|
function _onAfterSelectionEnd2() {
|
794
828
|
if (this.isEditorOpened()) {
|
795
829
|
return;
|
@@ -4,8 +4,8 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclarati
|
|
4
4
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
5
5
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
6
6
|
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; }
|
7
|
-
function _toPropertyKey(
|
8
|
-
function _toPrimitive(
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
8
|
+
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); }
|
9
9
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
10
10
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
11
11
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
@@ -82,11 +82,13 @@ var _copyMode = /*#__PURE__*/new WeakMap();
|
|
82
82
|
var _isTriggeredByCopy = /*#__PURE__*/new WeakMap();
|
83
83
|
var _isTriggeredByCut = /*#__PURE__*/new WeakMap();
|
84
84
|
var _copyableRangesFactory = /*#__PURE__*/new WeakMap();
|
85
|
+
var _preventViewportScrollOnPaste = /*#__PURE__*/new WeakMap();
|
85
86
|
var _ensureClipboardEventsGetTriggered = /*#__PURE__*/new WeakSet();
|
86
87
|
var _countCopiedHeaders = /*#__PURE__*/new WeakSet();
|
87
88
|
var _addContentEditableToHighlightedCell = /*#__PURE__*/new WeakSet();
|
88
89
|
var _removeContentEditableFromHighlightedCell = /*#__PURE__*/new WeakSet();
|
89
90
|
var _onAfterContextMenuDefaultOptions = /*#__PURE__*/new WeakSet();
|
91
|
+
var _onAfterSelection = /*#__PURE__*/new WeakSet();
|
90
92
|
var _onAfterSelectionEnd = /*#__PURE__*/new WeakSet();
|
91
93
|
var _onSafariMouseEnter = /*#__PURE__*/new WeakSet();
|
92
94
|
var _onSafariMouseLeave = /*#__PURE__*/new WeakSet();
|
@@ -112,6 +114,16 @@ export class CopyPaste extends BasePlugin {
|
|
112
114
|
* Force focus on focusableElement after end of the selection.
|
113
115
|
*/
|
114
116
|
_classPrivateMethodInitSpec(this, _onAfterSelectionEnd);
|
117
|
+
/**
|
118
|
+
* Disables the viewport scroll after pasting the data.
|
119
|
+
*
|
120
|
+
* @param {number} fromRow Selection start row visual index.
|
121
|
+
* @param {number} fromColumn Selection start column visual index.
|
122
|
+
* @param {number} toRow Selection end row visual index.
|
123
|
+
* @param {number} toColumn Selection end column visual index.
|
124
|
+
* @param {object} preventScrolling Object with `value` property. If `true`, the viewport scroll will be prevented.
|
125
|
+
*/
|
126
|
+
_classPrivateMethodInitSpec(this, _onAfterSelection);
|
115
127
|
/**
|
116
128
|
* Add copy and cut options to the Context Menu.
|
117
129
|
*
|
@@ -251,6 +263,15 @@ export class CopyPaste extends BasePlugin {
|
|
251
263
|
countColumnHeaders: () => this.hot.view.getColumnHeadersCount()
|
252
264
|
})
|
253
265
|
});
|
266
|
+
/**
|
267
|
+
* Flag that indicates if the viewport scroll should be prevented after pasting the data.
|
268
|
+
*
|
269
|
+
* @type {boolean}
|
270
|
+
*/
|
271
|
+
_classPrivateFieldInitSpec(this, _preventViewportScrollOnPaste, {
|
272
|
+
writable: true,
|
273
|
+
value: false
|
274
|
+
});
|
254
275
|
/**
|
255
276
|
* Ranges of the cells coordinates, which should be used to copy/cut/paste actions.
|
256
277
|
*
|
@@ -302,6 +323,12 @@ export class CopyPaste extends BasePlugin {
|
|
302
323
|
this.uiContainer = (_settings$uiContainer = settings.uiContainer) !== null && _settings$uiContainer !== void 0 ? _settings$uiContainer : this.uiContainer;
|
303
324
|
}
|
304
325
|
this.addHook('afterContextMenuDefaultOptions', options => _classPrivateMethodGet(this, _onAfterContextMenuDefaultOptions, _onAfterContextMenuDefaultOptions2).call(this, options));
|
326
|
+
this.addHook('afterSelection', function () {
|
327
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
328
|
+
args[_key] = arguments[_key];
|
329
|
+
}
|
330
|
+
return _classPrivateMethodGet(_this, _onAfterSelection, _onAfterSelection2).call(_this, ...args);
|
331
|
+
});
|
305
332
|
this.addHook('afterSelectionEnd', () => _classPrivateMethodGet(this, _onAfterSelectionEnd, _onAfterSelectionEnd2).call(this));
|
306
333
|
this.eventManager.addEventListener(this.hot.rootDocument, 'copy', function () {
|
307
334
|
return _this.onCopy(...arguments);
|
@@ -316,14 +343,14 @@ export class CopyPaste extends BasePlugin {
|
|
316
343
|
// Without this workaround Safari (tested on Safari@16.5.2) does allow copying/cutting from the browser menu.
|
317
344
|
if (isSafari()) {
|
318
345
|
this.eventManager.addEventListener(this.hot.rootDocument.body, 'mouseenter', function () {
|
319
|
-
for (var
|
320
|
-
args[
|
346
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
347
|
+
args[_key2] = arguments[_key2];
|
321
348
|
}
|
322
349
|
return _classPrivateMethodGet(_this, _onSafariMouseEnter, _onSafariMouseEnter2).call(_this, ...args);
|
323
350
|
});
|
324
351
|
this.eventManager.addEventListener(this.hot.rootDocument.body, 'mouseleave', function () {
|
325
|
-
for (var
|
326
|
-
args[
|
352
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
353
|
+
args[_key3] = arguments[_key3];
|
327
354
|
}
|
328
355
|
return _classPrivateMethodGet(_this, _onSafariMouseLeave, _onSafariMouseLeave2).call(_this, ...args);
|
329
356
|
});
|
@@ -593,6 +620,7 @@ export class CopyPaste extends BasePlugin {
|
|
593
620
|
}
|
594
621
|
newRows.push(newRow);
|
595
622
|
}
|
623
|
+
_classPrivateFieldSet(this, _preventViewportScrollOnPaste, true);
|
596
624
|
this.hot.populateFromArray(startRow, startColumn, newRows, undefined, undefined, 'CopyPaste.paste', this.pasteMode);
|
597
625
|
return [startRow, startColumn, lastVisualRow, lastVisualColumn];
|
598
626
|
}
|
@@ -785,6 +813,12 @@ function _onAfterContextMenuDefaultOptions2(options) {
|
|
785
813
|
}
|
786
814
|
options.items.push(cutItem(this));
|
787
815
|
}
|
816
|
+
function _onAfterSelection2(fromRow, fromColumn, toRow, toColumn, preventScrolling) {
|
817
|
+
if (_classPrivateFieldGet(this, _preventViewportScrollOnPaste)) {
|
818
|
+
preventScrolling.value = true;
|
819
|
+
}
|
820
|
+
_classPrivateFieldSet(this, _preventViewportScrollOnPaste, false);
|
821
|
+
}
|
788
822
|
function _onAfterSelectionEnd2() {
|
789
823
|
if (this.isEditorOpened()) {
|
790
824
|
return;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import CellRange from '../../3rdparty/walkontable/src/cell/range';
|
1
2
|
import Core from '../../core';
|
2
3
|
import { BasePlugin } from '../base';
|
3
4
|
import { SimpleCellCoords } from "../../common";
|
@@ -13,6 +14,14 @@ export interface BorderRange {
|
|
13
14
|
to: SimpleCellCoords;
|
14
15
|
};
|
15
16
|
}
|
17
|
+
export interface BorderDescriptor {
|
18
|
+
start?: BorderOptions;
|
19
|
+
end?: BorderOptions;
|
20
|
+
left?: BorderOptions;
|
21
|
+
right?: BorderOptions;
|
22
|
+
top?: BorderOptions;
|
23
|
+
bottom?: BorderOptions;
|
24
|
+
}
|
16
25
|
export type DetailedSettings = (SimpleCellCoords | BorderRange) & {
|
17
26
|
start?: BorderOptions | string;
|
18
27
|
end?: BorderOptions | string;
|
@@ -24,17 +33,17 @@ export type DetailedSettings = (SimpleCellCoords | BorderRange) & {
|
|
24
33
|
|
25
34
|
export type Settings = boolean | DetailedSettings[];
|
26
35
|
|
27
|
-
export interface
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
36
|
+
export interface ComputedBorder extends BorderDescriptor {
|
37
|
+
id: string;
|
38
|
+
row: number;
|
39
|
+
col: number;
|
40
|
+
border?: BorderOptions;
|
32
41
|
}
|
33
42
|
|
34
43
|
export class CustomBorders extends BasePlugin {
|
35
44
|
constructor(hotInstance: Core);
|
36
45
|
isEnabled(): boolean;
|
37
|
-
setBorders(selectionRanges:
|
38
|
-
getBorders(selectionRanges
|
39
|
-
clearBorders(selectionRanges
|
46
|
+
setBorders(selectionRanges: CellRange[] | Array<[number, number, number, number]>, borderObject: BorderDescriptor): void;
|
47
|
+
getBorders(selectionRanges?: CellRange[] | Array<[number, number, number, number]>): ComputedBorder[];
|
48
|
+
clearBorders(selectionRanges?: CellRange[] | Array<[number, number, number, number]>): void;
|
40
49
|
}
|
@@ -16,8 +16,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
16
16
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
17
17
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
18
18
|
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; }
|
19
|
-
function _toPropertyKey(
|
20
|
-
function _toPrimitive(
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
20
|
+
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); }
|
21
21
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
22
22
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'customBorders';
|
23
23
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 90;
|
@@ -323,7 +323,6 @@ class CustomBorders extends _base.BasePlugin {
|
|
323
323
|
}
|
324
324
|
});
|
325
325
|
}
|
326
|
-
|
327
326
|
this.hot.setCellMeta(row, column, 'borders', (0, _utils.denormalizeBorder)(border));
|
328
327
|
this.insertBorderIntoSettings(border, place);
|
329
328
|
}
|
@@ -608,7 +607,6 @@ class CustomBorders extends _base.BasePlugin {
|
|
608
607
|
}
|
609
608
|
});
|
610
609
|
}
|
611
|
-
|
612
610
|
return check;
|
613
611
|
}
|
614
612
|
|
@@ -631,12 +629,10 @@ class CustomBorders extends _base.BasePlugin {
|
|
631
629
|
(0, _array.arrayEach)(borders, borderObject => {
|
632
630
|
borderObject.toggleHiddenClass(place, remove); // TODO this also bad?
|
633
631
|
});
|
634
|
-
|
635
632
|
check = true;
|
636
633
|
return false; // breaks forAll
|
637
634
|
}
|
638
635
|
});
|
639
|
-
|
640
636
|
return check;
|
641
637
|
}
|
642
638
|
|
@@ -672,7 +668,6 @@ class CustomBorders extends _base.BasePlugin {
|
|
672
668
|
}
|
673
669
|
});
|
674
670
|
}
|
675
|
-
|
676
671
|
return check;
|
677
672
|
}
|
678
673
|
|
@@ -3,8 +3,8 @@ import "core-js/modules/es.error.cause.js";
|
|
3
3
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
function _toPropertyKey(
|
7
|
-
function _toPrimitive(
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
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 _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
9
9
|
import { BasePlugin } from "../base/index.mjs";
|
10
10
|
import { hasOwnProperty, deepClone } from "../../helpers/object.mjs";
|
@@ -318,7 +318,6 @@ export class CustomBorders extends BasePlugin {
|
|
318
318
|
}
|
319
319
|
});
|
320
320
|
}
|
321
|
-
|
322
321
|
this.hot.setCellMeta(row, column, 'borders', denormalizeBorder(border));
|
323
322
|
this.insertBorderIntoSettings(border, place);
|
324
323
|
}
|
@@ -603,7 +602,6 @@ export class CustomBorders extends BasePlugin {
|
|
603
602
|
}
|
604
603
|
});
|
605
604
|
}
|
606
|
-
|
607
605
|
return check;
|
608
606
|
}
|
609
607
|
|
@@ -626,12 +624,10 @@ export class CustomBorders extends BasePlugin {
|
|
626
624
|
arrayEach(borders, borderObject => {
|
627
625
|
borderObject.toggleHiddenClass(place, remove); // TODO this also bad?
|
628
626
|
});
|
629
|
-
|
630
627
|
check = true;
|
631
628
|
return false; // breaks forAll
|
632
629
|
}
|
633
630
|
});
|
634
|
-
|
635
631
|
return check;
|
636
632
|
}
|
637
633
|
|
@@ -667,7 +663,6 @@ export class CustomBorders extends BasePlugin {
|
|
667
663
|
}
|
668
664
|
});
|
669
665
|
}
|
670
|
-
|
671
666
|
return check;
|
672
667
|
}
|
673
668
|
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import Core from '../../core';
|
2
2
|
import { BasePlugin } from '../base';
|
3
3
|
|
4
|
+
interface DOMBoundaries {
|
5
|
+
left: number;
|
6
|
+
right: number;
|
7
|
+
top: number;
|
8
|
+
bottom: number;
|
9
|
+
}
|
10
|
+
|
4
11
|
export type Settings = boolean;
|
5
12
|
|
6
13
|
export class DragToScroll extends BasePlugin {
|
@@ -9,7 +16,7 @@ export class DragToScroll extends BasePlugin {
|
|
9
16
|
boundaries: DOMRect | undefined;
|
10
17
|
|
11
18
|
isEnabled(): boolean;
|
12
|
-
setBoundaries(boundaries: DOMRect): void;
|
19
|
+
setBoundaries(boundaries: DOMRect | DOMBoundaries): void;
|
13
20
|
setCallback(callback: () => void): void;
|
14
21
|
check(x: number, y: number): void;
|
15
22
|
}
|
@@ -8,8 +8,8 @@ var _element = require("../../helpers/dom/element");
|
|
8
8
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
9
9
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
10
10
|
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; }
|
11
|
-
function _toPropertyKey(
|
12
|
-
function _toPrimitive(
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
12
|
+
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); }
|
13
13
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
14
14
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'dragToScroll';
|
15
15
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 100;
|
@@ -108,9 +108,16 @@ class DragToScroll extends _base.BasePlugin {
|
|
108
108
|
/**
|
109
109
|
* Sets the value of the visible element.
|
110
110
|
*
|
111
|
-
* @param {DOMRect} boundaries An object with
|
111
|
+
* @param {DOMRect|{left: number, right: number, top: number, bottom: number}} [boundaries] An object with
|
112
|
+
* coordinates. Contains the window boundaries by default. The object is compatible with DOMRect.
|
112
113
|
*/
|
113
|
-
setBoundaries(
|
114
|
+
setBoundaries() {
|
115
|
+
let boundaries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
116
|
+
left: 0,
|
117
|
+
right: this.hot.rootWindow.innerWidth,
|
118
|
+
top: 0,
|
119
|
+
bottom: this.hot.rootWindow.innerHeight
|
120
|
+
};
|
114
121
|
this.boundaries = boundaries;
|
115
122
|
}
|
116
123
|
|
@@ -124,7 +131,7 @@ class DragToScroll extends _base.BasePlugin {
|
|
124
131
|
}
|
125
132
|
|
126
133
|
/**
|
127
|
-
* Checks if the mouse position (X, Y) is outside
|
134
|
+
* Checks if the mouse position (X, Y) is outside the viewport and fires a callback with calculated X an Y diffs
|
128
135
|
* between passed boundaries.
|
129
136
|
*
|
130
137
|
* @param {number} x Mouse X coordinate to check.
|
@@ -229,24 +236,13 @@ function _setupListening2(event) {
|
|
229
236
|
if ((0, _event.isRightClick)(event)) {
|
230
237
|
return;
|
231
238
|
}
|
232
|
-
const scrollHandler = this.hot.view._wt.
|
233
|
-
|
234
|
-
if (scrollHandler === this.hot.rootWindow) {
|
235
|
-
// not much we can do currently
|
236
|
-
return;
|
237
|
-
}
|
238
|
-
this.setBoundaries(scrollHandler.getBoundingClientRect());
|
239
|
+
const scrollHandler = this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;
|
240
|
+
this.setBoundaries(scrollHandler !== this.hot.rootWindow ? scrollHandler.getBoundingClientRect() : undefined);
|
239
241
|
this.setCallback((scrollX, scrollY) => {
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
}
|
245
|
-
if (scrollY < 0) {
|
246
|
-
scrollHandler.scrollTop -= 20;
|
247
|
-
} else if (scrollY > 0) {
|
248
|
-
scrollHandler.scrollTop += 20;
|
249
|
-
}
|
242
|
+
var _scrollHandler$scroll, _scrollHandler$scroll2;
|
243
|
+
const horizontalScrollValue = (_scrollHandler$scroll = scrollHandler.scrollLeft) !== null && _scrollHandler$scroll !== void 0 ? _scrollHandler$scroll : scrollHandler.scrollX;
|
244
|
+
const verticalScrollValue = (_scrollHandler$scroll2 = scrollHandler.scrollTop) !== null && _scrollHandler$scroll2 !== void 0 ? _scrollHandler$scroll2 : scrollHandler.scrollY;
|
245
|
+
scrollHandler.scroll(horizontalScrollValue + Math.sign(scrollX) * 50, verticalScrollValue + Math.sign(scrollY) * 20);
|
250
246
|
});
|
251
247
|
this.listen();
|
252
248
|
}
|
@@ -2,8 +2,8 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
3
3
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
|
-
function _toPropertyKey(
|
6
|
-
function _toPrimitive(
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
7
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
8
8
|
import { BasePlugin } from "../base/index.mjs";
|
9
9
|
import { isRightClick } from "../../helpers/dom/event.mjs";
|
@@ -105,9 +105,16 @@ export class DragToScroll extends BasePlugin {
|
|
105
105
|
/**
|
106
106
|
* Sets the value of the visible element.
|
107
107
|
*
|
108
|
-
* @param {DOMRect} boundaries An object with
|
108
|
+
* @param {DOMRect|{left: number, right: number, top: number, bottom: number}} [boundaries] An object with
|
109
|
+
* coordinates. Contains the window boundaries by default. The object is compatible with DOMRect.
|
109
110
|
*/
|
110
|
-
setBoundaries(
|
111
|
+
setBoundaries() {
|
112
|
+
let boundaries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
113
|
+
left: 0,
|
114
|
+
right: this.hot.rootWindow.innerWidth,
|
115
|
+
top: 0,
|
116
|
+
bottom: this.hot.rootWindow.innerHeight
|
117
|
+
};
|
111
118
|
this.boundaries = boundaries;
|
112
119
|
}
|
113
120
|
|
@@ -121,7 +128,7 @@ export class DragToScroll extends BasePlugin {
|
|
121
128
|
}
|
122
129
|
|
123
130
|
/**
|
124
|
-
* Checks if the mouse position (X, Y) is outside
|
131
|
+
* Checks if the mouse position (X, Y) is outside the viewport and fires a callback with calculated X an Y diffs
|
125
132
|
* between passed boundaries.
|
126
133
|
*
|
127
134
|
* @param {number} x Mouse X coordinate to check.
|
@@ -225,24 +232,13 @@ function _setupListening2(event) {
|
|
225
232
|
if (isRightClick(event)) {
|
226
233
|
return;
|
227
234
|
}
|
228
|
-
const scrollHandler = this.hot.view._wt.
|
229
|
-
|
230
|
-
if (scrollHandler === this.hot.rootWindow) {
|
231
|
-
// not much we can do currently
|
232
|
-
return;
|
233
|
-
}
|
234
|
-
this.setBoundaries(scrollHandler.getBoundingClientRect());
|
235
|
+
const scrollHandler = this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;
|
236
|
+
this.setBoundaries(scrollHandler !== this.hot.rootWindow ? scrollHandler.getBoundingClientRect() : undefined);
|
235
237
|
this.setCallback((scrollX, scrollY) => {
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
}
|
241
|
-
if (scrollY < 0) {
|
242
|
-
scrollHandler.scrollTop -= 20;
|
243
|
-
} else if (scrollY > 0) {
|
244
|
-
scrollHandler.scrollTop += 20;
|
245
|
-
}
|
238
|
+
var _scrollHandler$scroll, _scrollHandler$scroll2;
|
239
|
+
const horizontalScrollValue = (_scrollHandler$scroll = scrollHandler.scrollLeft) !== null && _scrollHandler$scroll !== void 0 ? _scrollHandler$scroll : scrollHandler.scrollX;
|
240
|
+
const verticalScrollValue = (_scrollHandler$scroll2 = scrollHandler.scrollTop) !== null && _scrollHandler$scroll2 !== void 0 ? _scrollHandler$scroll2 : scrollHandler.scrollY;
|
241
|
+
scrollHandler.scroll(horizontalScrollValue + Math.sign(scrollX) * 50, verticalScrollValue + Math.sign(scrollY) * 20);
|
246
242
|
});
|
247
243
|
this.listen();
|
248
244
|
}
|
@@ -17,8 +17,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
17
17
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
18
18
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
19
19
|
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; }
|
20
|
-
function _toPropertyKey(
|
21
|
-
function _toPrimitive(
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
21
|
+
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); }
|
22
22
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
23
23
|
_pluginHooks.default.getSingleton().register('afterDropdownMenuDefaultOptions');
|
24
24
|
_pluginHooks.default.getSingleton().register('beforeDropdownMenuShow');
|
@@ -2,8 +2,8 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
3
3
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
|
-
function _toPropertyKey(
|
6
|
-
function _toPrimitive(
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
7
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
8
8
|
import { BasePlugin } from "../base/index.mjs";
|
9
9
|
import { arrayEach } from "../../helpers/array.mjs";
|