handsontable 14.0.0 → 14.1.0-next-514dcd3-20240109
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.
- 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
package/editorManager.js
CHANGED
@@ -11,8 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
11
11
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
12
12
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
13
13
|
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; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
|
+
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); }
|
16
16
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
17
17
|
const SHORTCUTS_GROUP_NAVIGATION = exports.SHORTCUTS_GROUP_NAVIGATION = 'editorManager.navigation';
|
18
18
|
var _onAfterDocumentKeyDown = /*#__PURE__*/new WeakSet();
|
@@ -149,6 +149,7 @@ class EditorManager {
|
|
149
149
|
* Prepare text input to be displayed at given grid cell.
|
150
150
|
*/
|
151
151
|
prepareEditor() {
|
152
|
+
var _this$hot$getSelected;
|
152
153
|
if (this.lock) {
|
153
154
|
return;
|
154
155
|
}
|
@@ -160,10 +161,8 @@ class EditorManager {
|
|
160
161
|
});
|
161
162
|
return;
|
162
163
|
}
|
163
|
-
const
|
164
|
-
|
165
|
-
} = this.hot.getSelectedRangeLast();
|
166
|
-
if (highlight.isHeader()) {
|
164
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
165
|
+
if (!highlight || highlight.isHeader()) {
|
167
166
|
return;
|
168
167
|
}
|
169
168
|
const {
|
package/editorManager.mjs
CHANGED
@@ -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 { isFunctionKey, isCtrlMetaKey } from "./helpers/unicode.mjs";
|
9
9
|
import { isImmediatePropagationStopped } from "./helpers/dom/event.mjs";
|
@@ -145,6 +145,7 @@ class EditorManager {
|
|
145
145
|
* Prepare text input to be displayed at given grid cell.
|
146
146
|
*/
|
147
147
|
prepareEditor() {
|
148
|
+
var _this$hot$getSelected;
|
148
149
|
if (this.lock) {
|
149
150
|
return;
|
150
151
|
}
|
@@ -156,10 +157,8 @@ class EditorManager {
|
|
156
157
|
});
|
157
158
|
return;
|
158
159
|
}
|
159
|
-
const
|
160
|
-
|
161
|
-
} = this.hot.getSelectedRangeLast();
|
162
|
-
if (highlight.isHeader()) {
|
160
|
+
const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
|
161
|
+
if (!highlight || highlight.isHeader()) {
|
163
162
|
return;
|
164
163
|
}
|
165
164
|
const {
|
@@ -15,8 +15,8 @@ var _a11y = require("../../helpers/a11y");
|
|
15
15
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
16
16
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
17
17
|
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; }
|
18
|
-
function _toPropertyKey(
|
19
|
-
function _toPrimitive(
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
|
+
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); }
|
20
20
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
21
21
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
22
22
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
@@ -191,7 +191,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
191
191
|
if (scrollbarWidth === 0 && (0, _browser.isMacOS)()) {
|
192
192
|
scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
|
193
193
|
}
|
194
|
-
|
195
194
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
196
195
|
this.htEditor.updateSettings({
|
197
196
|
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
|
@@ -391,7 +390,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
391
390
|
if (this.htEditor.flipped) {
|
392
391
|
this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
|
393
392
|
}
|
394
|
-
|
395
393
|
this.setDropdownHeight(tempHeight - lastRowHeight);
|
396
394
|
}
|
397
395
|
}
|
@@ -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 _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
9
9
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
10
10
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
@@ -188,7 +188,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
188
188
|
if (scrollbarWidth === 0 && isMacOS()) {
|
189
189
|
scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
|
190
190
|
}
|
191
|
-
|
192
191
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
193
192
|
this.htEditor.updateSettings({
|
194
193
|
colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
|
@@ -388,7 +387,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
388
387
|
if (this.htEditor.flipped) {
|
389
388
|
this.htEditor.rootElement.style.top = `${parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height}px`; // eslint-disable-line max-len
|
390
389
|
}
|
391
|
-
|
392
390
|
this.setDropdownHeight(tempHeight - lastRowHeight);
|
393
391
|
}
|
394
392
|
}
|
@@ -40,7 +40,7 @@ export abstract class BaseEditor {
|
|
40
40
|
isOpened(): boolean;
|
41
41
|
isWaiting(): boolean;
|
42
42
|
abstract open(event?: Event): void;
|
43
|
-
prepare(row: number,
|
43
|
+
prepare(row: number, column: number, prop: string | number, TD: HTMLTableCellElement, originalValue: any, cellProperties: CellProperties): void;
|
44
44
|
saveValue(value?: any, ctrlDown?: boolean): void;
|
45
45
|
abstract setValue(newValue?: any): void;
|
46
46
|
}
|
@@ -9,8 +9,8 @@ var _hooksRefRegisterer = _interopRequireDefault(require("../../mixins/hooksRefR
|
|
9
9
|
var _element = require("../../helpers/dom/element");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
11
|
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; }
|
12
|
-
function _toPropertyKey(
|
13
|
-
function _toPrimitive(
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
|
+
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); }
|
14
14
|
const EDITOR_TYPE = exports.EDITOR_TYPE = 'base';
|
15
15
|
const EDITOR_STATE = exports.EDITOR_STATE = Object.freeze({
|
16
16
|
VIRGIN: 'STATE_VIRGIN',
|
@@ -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
|
import { isDefined, stringify } from "../../helpers/mixed.mjs";
|
6
6
|
import { mixin } from "../../helpers/object.mjs";
|
7
7
|
import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
|
@@ -3,16 +3,15 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
var _moment = _interopRequireDefault(require("moment"));
|
6
|
-
var _pikaday = _interopRequireDefault(require("pikaday"));
|
6
|
+
var _pikaday = _interopRequireDefault(require("@handsontable/pikaday"));
|
7
7
|
var _textEditor = require("../textEditor");
|
8
|
-
var _eventManager = _interopRequireDefault(require("../../eventManager"));
|
9
8
|
var _element = require("../../helpers/dom/element");
|
10
9
|
var _object = require("../../helpers/object");
|
11
10
|
var _unicode = require("../../helpers/unicode");
|
12
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
12
|
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; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
|
+
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); }
|
16
15
|
const EDITOR_TYPE = exports.EDITOR_TYPE = 'date';
|
17
16
|
const SHORTCUTS_GROUP_EDITOR = 'dateEditor';
|
18
17
|
|
@@ -28,10 +27,6 @@ class DateEditor extends _textEditor.TextEditor {
|
|
28
27
|
* @type {string}
|
29
28
|
*/
|
30
29
|
_defineProperty(this, "defaultDateFormat", 'DD/MM/YYYY');
|
31
|
-
/**
|
32
|
-
* @type {boolean}
|
33
|
-
*/
|
34
|
-
_defineProperty(this, "isCellEdited", false);
|
35
30
|
/**
|
36
31
|
* @type {boolean}
|
37
32
|
*/
|
@@ -72,26 +67,16 @@ class DateEditor extends _textEditor.TextEditor {
|
|
72
67
|
this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
|
73
68
|
(0, _element.addClass)(this.datePicker, 'htDatepickerHolder');
|
74
69
|
this.hot.rootDocument.body.appendChild(this.datePicker);
|
75
|
-
const eventManager = new _eventManager.default(this);
|
76
70
|
|
77
71
|
/**
|
78
72
|
* Prevent recognizing clicking on datepicker as clicking outside of table.
|
79
73
|
*/
|
80
|
-
eventManager.addEventListener(this.datePicker, 'mousedown', event => {
|
74
|
+
this.eventManager.addEventListener(this.datePicker, 'mousedown', event => {
|
81
75
|
if ((0, _element.hasClass)(event.target, 'pika-day')) {
|
82
76
|
this.hideDatepicker();
|
83
77
|
}
|
84
78
|
event.stopPropagation();
|
85
79
|
});
|
86
|
-
|
87
|
-
/**
|
88
|
-
* Prevent caret movement in the TEXTAREA when navigating over the date picker.
|
89
|
-
*/
|
90
|
-
eventManager.addEventListener(this.TEXTAREA, 'keydown', event => {
|
91
|
-
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.code)) {
|
92
|
-
event.preventDefault();
|
93
|
-
}
|
94
|
-
});
|
95
80
|
}
|
96
81
|
|
97
82
|
/**
|
@@ -132,13 +117,27 @@ class DateEditor extends _textEditor.TextEditor {
|
|
132
117
|
const editorContext = shortcutManager.getContext('editor');
|
133
118
|
super.open();
|
134
119
|
this.showDatepicker(event);
|
135
|
-
editorContext.
|
136
|
-
keys: [['
|
137
|
-
callback:
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
120
|
+
editorContext.addShortcuts([{
|
121
|
+
keys: [['ArrowLeft']],
|
122
|
+
callback: () => {
|
123
|
+
this.$datePicker.adjustDate('subtract', 1);
|
124
|
+
}
|
125
|
+
}, {
|
126
|
+
keys: [['ArrowRight']],
|
127
|
+
callback: () => {
|
128
|
+
this.$datePicker.adjustDate('add', 1);
|
129
|
+
}
|
130
|
+
}, {
|
131
|
+
keys: [['ArrowUp']],
|
132
|
+
callback: () => {
|
133
|
+
this.$datePicker.adjustDate('subtract', 7);
|
134
|
+
}
|
135
|
+
}, {
|
136
|
+
keys: [['ArrowDown']],
|
137
|
+
callback: () => {
|
138
|
+
this.$datePicker.adjustDate('add', 7);
|
139
|
+
}
|
140
|
+
}], {
|
142
141
|
group: SHORTCUTS_GROUP_EDITOR
|
143
142
|
});
|
144
143
|
}
|
@@ -172,13 +171,6 @@ class DateEditor extends _textEditor.TextEditor {
|
|
172
171
|
finishEditing() {
|
173
172
|
let restoreOriginalValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
174
173
|
let ctrlDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
175
|
-
if (restoreOriginalValue) {
|
176
|
-
// pressed ESC, restore original value
|
177
|
-
const value = this.originalValue;
|
178
|
-
if (value !== undefined) {
|
179
|
-
this.setValue(value);
|
180
|
-
}
|
181
|
-
}
|
182
174
|
super.finishEditing(restoreOriginalValue, ctrlDown);
|
183
175
|
}
|
184
176
|
|
@@ -195,6 +187,9 @@ class DateEditor extends _textEditor.TextEditor {
|
|
195
187
|
let dateStr;
|
196
188
|
this.datePicker.style.display = 'block';
|
197
189
|
this.$datePicker = new _pikaday.default(this.getDatePickerConfig());
|
190
|
+
if (typeof this.$datePicker.useMoment === 'function') {
|
191
|
+
this.$datePicker.useMoment(_moment.default);
|
192
|
+
}
|
198
193
|
this.$datePicker._onInputFocus = function () {};
|
199
194
|
this.datePickerStyle.top = `${this.hot.rootWindow.pageYOffset + offset.top + (0, _element.outerHeight)(this.TD)}px`;
|
200
195
|
let pickerLeftPosition = this.hot.rootWindow.pageXOffset;
|
@@ -257,6 +252,7 @@ class DateEditor extends _textEditor.TextEditor {
|
|
257
252
|
options.trigger = htInput;
|
258
253
|
options.container = this.datePicker;
|
259
254
|
options.bound = false;
|
255
|
+
options.keyboardInput = false;
|
260
256
|
options.format = options.format || this.defaultDateFormat;
|
261
257
|
options.reposition = options.reposition || false;
|
262
258
|
// Set the RTL to `false`. Due to the https://github.com/Pikaday/Pikaday/issues/647 bug, the layout direction
|
@@ -1,11 +1,10 @@
|
|
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
|
import moment from 'moment';
|
6
|
-
import Pikaday from 'pikaday';
|
6
|
+
import Pikaday from '@handsontable/pikaday';
|
7
7
|
import { TextEditor } from "../textEditor/index.mjs";
|
8
|
-
import EventManager from "../../eventManager.mjs";
|
9
8
|
import { addClass, hasClass, outerHeight, outerWidth } from "../../helpers/dom/element.mjs";
|
10
9
|
import { deepExtend } from "../../helpers/object.mjs";
|
11
10
|
import { isFunctionKey } from "../../helpers/unicode.mjs";
|
@@ -24,10 +23,6 @@ export class DateEditor extends TextEditor {
|
|
24
23
|
* @type {string}
|
25
24
|
*/
|
26
25
|
_defineProperty(this, "defaultDateFormat", 'DD/MM/YYYY');
|
27
|
-
/**
|
28
|
-
* @type {boolean}
|
29
|
-
*/
|
30
|
-
_defineProperty(this, "isCellEdited", false);
|
31
26
|
/**
|
32
27
|
* @type {boolean}
|
33
28
|
*/
|
@@ -68,26 +63,16 @@ export class DateEditor extends TextEditor {
|
|
68
63
|
this.datePicker.setAttribute('dir', this.hot.isRtl() ? 'rtl' : 'ltr');
|
69
64
|
addClass(this.datePicker, 'htDatepickerHolder');
|
70
65
|
this.hot.rootDocument.body.appendChild(this.datePicker);
|
71
|
-
const eventManager = new EventManager(this);
|
72
66
|
|
73
67
|
/**
|
74
68
|
* Prevent recognizing clicking on datepicker as clicking outside of table.
|
75
69
|
*/
|
76
|
-
eventManager.addEventListener(this.datePicker, 'mousedown', event => {
|
70
|
+
this.eventManager.addEventListener(this.datePicker, 'mousedown', event => {
|
77
71
|
if (hasClass(event.target, 'pika-day')) {
|
78
72
|
this.hideDatepicker();
|
79
73
|
}
|
80
74
|
event.stopPropagation();
|
81
75
|
});
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Prevent caret movement in the TEXTAREA when navigating over the date picker.
|
85
|
-
*/
|
86
|
-
eventManager.addEventListener(this.TEXTAREA, 'keydown', event => {
|
87
|
-
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.code)) {
|
88
|
-
event.preventDefault();
|
89
|
-
}
|
90
|
-
});
|
91
76
|
}
|
92
77
|
|
93
78
|
/**
|
@@ -128,13 +113,27 @@ export class DateEditor extends TextEditor {
|
|
128
113
|
const editorContext = shortcutManager.getContext('editor');
|
129
114
|
super.open();
|
130
115
|
this.showDatepicker(event);
|
131
|
-
editorContext.
|
132
|
-
keys: [['
|
133
|
-
callback:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
116
|
+
editorContext.addShortcuts([{
|
117
|
+
keys: [['ArrowLeft']],
|
118
|
+
callback: () => {
|
119
|
+
this.$datePicker.adjustDate('subtract', 1);
|
120
|
+
}
|
121
|
+
}, {
|
122
|
+
keys: [['ArrowRight']],
|
123
|
+
callback: () => {
|
124
|
+
this.$datePicker.adjustDate('add', 1);
|
125
|
+
}
|
126
|
+
}, {
|
127
|
+
keys: [['ArrowUp']],
|
128
|
+
callback: () => {
|
129
|
+
this.$datePicker.adjustDate('subtract', 7);
|
130
|
+
}
|
131
|
+
}, {
|
132
|
+
keys: [['ArrowDown']],
|
133
|
+
callback: () => {
|
134
|
+
this.$datePicker.adjustDate('add', 7);
|
135
|
+
}
|
136
|
+
}], {
|
138
137
|
group: SHORTCUTS_GROUP_EDITOR
|
139
138
|
});
|
140
139
|
}
|
@@ -168,13 +167,6 @@ export class DateEditor extends TextEditor {
|
|
168
167
|
finishEditing() {
|
169
168
|
let restoreOriginalValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
170
169
|
let ctrlDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
171
|
-
if (restoreOriginalValue) {
|
172
|
-
// pressed ESC, restore original value
|
173
|
-
const value = this.originalValue;
|
174
|
-
if (value !== undefined) {
|
175
|
-
this.setValue(value);
|
176
|
-
}
|
177
|
-
}
|
178
170
|
super.finishEditing(restoreOriginalValue, ctrlDown);
|
179
171
|
}
|
180
172
|
|
@@ -191,6 +183,9 @@ export class DateEditor extends TextEditor {
|
|
191
183
|
let dateStr;
|
192
184
|
this.datePicker.style.display = 'block';
|
193
185
|
this.$datePicker = new Pikaday(this.getDatePickerConfig());
|
186
|
+
if (typeof this.$datePicker.useMoment === 'function') {
|
187
|
+
this.$datePicker.useMoment(moment);
|
188
|
+
}
|
194
189
|
this.$datePicker._onInputFocus = function () {};
|
195
190
|
this.datePickerStyle.top = `${this.hot.rootWindow.pageYOffset + offset.top + outerHeight(this.TD)}px`;
|
196
191
|
let pickerLeftPosition = this.hot.rootWindow.pageXOffset;
|
@@ -253,6 +248,7 @@ export class DateEditor extends TextEditor {
|
|
253
248
|
options.trigger = htInput;
|
254
249
|
options.container = this.datePicker;
|
255
250
|
options.bound = false;
|
251
|
+
options.keyboardInput = false;
|
256
252
|
options.format = options.format || this.defaultDateFormat;
|
257
253
|
options.reposition = options.reposition || false;
|
258
254
|
// Set the RTL to `false`. Due to the https://github.com/Pikaday/Pikaday/issues/647 bug, the layout direction
|
@@ -137,7 +137,6 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
137
137
|
// if focus is still in the HOT editor
|
138
138
|
this.hot.listen(); // return the focus to the parent HOT instance
|
139
139
|
}
|
140
|
-
|
141
140
|
if (this.htEditor && this.htEditor.getSelectedLast()) {
|
142
141
|
const value = this.htEditor.getValue();
|
143
142
|
if (value !== undefined) {
|
@@ -134,7 +134,6 @@ export class HandsontableEditor extends TextEditor {
|
|
134
134
|
// if focus is still in the HOT editor
|
135
135
|
this.hot.listen(); // return the focus to the parent HOT instance
|
136
136
|
}
|
137
|
-
|
138
137
|
if (this.htEditor && this.htEditor.getSelectedLast()) {
|
139
138
|
const value = this.htEditor.getValue();
|
140
139
|
if (value !== undefined) {
|
@@ -21,9 +21,10 @@ class SelectEditor extends _baseEditor.BaseEditor {
|
|
21
21
|
* Initializes editor instance, DOM Element and mount hooks.
|
22
22
|
*/
|
23
23
|
init() {
|
24
|
-
this.select = this.hot.rootDocument.createElement('
|
25
|
-
|
24
|
+
this.select = this.hot.rootDocument.createElement('select');
|
25
|
+
this.select.setAttribute('data-hot-input', 'true');
|
26
26
|
this.select.style.display = 'none';
|
27
|
+
(0, _element.addClass)(this.select, 'htSelectEditor');
|
27
28
|
this.hot.rootElement.appendChild(this.select);
|
28
29
|
this.registerHooks();
|
29
30
|
}
|
@@ -188,6 +189,7 @@ class SelectEditor extends _baseEditor.BaseEditor {
|
|
188
189
|
registerShortcuts() {
|
189
190
|
const shortcutManager = this.hot.getShortcutManager();
|
190
191
|
const editorContext = shortcutManager.getContext('editor');
|
192
|
+
const gridContext = shortcutManager.getContext('grid');
|
191
193
|
const contextConfig = {
|
192
194
|
group: SHORTCUTS_GROUP
|
193
195
|
};
|
@@ -197,6 +199,10 @@ class SelectEditor extends _baseEditor.BaseEditor {
|
|
197
199
|
return;
|
198
200
|
}
|
199
201
|
editorContext.addShortcuts([{
|
202
|
+
keys: [['Tab'], ['Shift', 'Tab']],
|
203
|
+
forwardToContext: gridContext,
|
204
|
+
callback: () => {}
|
205
|
+
}, {
|
200
206
|
keys: [['ArrowUp']],
|
201
207
|
callback: () => {
|
202
208
|
const previousOptionIndex = this.select.selectedIndex - 1;
|
@@ -18,9 +18,10 @@ export class SelectEditor extends BaseEditor {
|
|
18
18
|
* Initializes editor instance, DOM Element and mount hooks.
|
19
19
|
*/
|
20
20
|
init() {
|
21
|
-
this.select = this.hot.rootDocument.createElement('
|
22
|
-
|
21
|
+
this.select = this.hot.rootDocument.createElement('select');
|
22
|
+
this.select.setAttribute('data-hot-input', 'true');
|
23
23
|
this.select.style.display = 'none';
|
24
|
+
addClass(this.select, 'htSelectEditor');
|
24
25
|
this.hot.rootElement.appendChild(this.select);
|
25
26
|
this.registerHooks();
|
26
27
|
}
|
@@ -185,6 +186,7 @@ export class SelectEditor extends BaseEditor {
|
|
185
186
|
registerShortcuts() {
|
186
187
|
const shortcutManager = this.hot.getShortcutManager();
|
187
188
|
const editorContext = shortcutManager.getContext('editor');
|
189
|
+
const gridContext = shortcutManager.getContext('grid');
|
188
190
|
const contextConfig = {
|
189
191
|
group: SHORTCUTS_GROUP
|
190
192
|
};
|
@@ -194,6 +196,10 @@ export class SelectEditor extends BaseEditor {
|
|
194
196
|
return;
|
195
197
|
}
|
196
198
|
editorContext.addShortcuts([{
|
199
|
+
keys: [['Tab'], ['Shift', 'Tab']],
|
200
|
+
forwardToContext: gridContext,
|
201
|
+
callback: () => {}
|
202
|
+
}, {
|
197
203
|
keys: [['ArrowUp']],
|
198
204
|
callback: () => {
|
199
205
|
const previousOptionIndex = this.select.selectedIndex - 1;
|
@@ -15,8 +15,8 @@ var _caretPositioner = require("./caretPositioner");
|
|
15
15
|
var _a11y = require("../../helpers/a11y");
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
17
|
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; }
|
18
|
-
function _toPropertyKey(
|
19
|
-
function _toPrimitive(
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
|
+
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); }
|
20
20
|
const EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';
|
21
21
|
const EDITOR_HIDDEN_CLASS_NAME = 'ht_editor_hidden';
|
22
22
|
const SHORTCUTS_GROUP = 'textEditor';
|
@@ -128,7 +128,6 @@ class TextEditor extends _baseEditor.BaseEditor {
|
|
128
128
|
if ((0, _element.isThisHotChild)(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
|
129
129
|
this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
|
130
130
|
}
|
131
|
-
|
132
131
|
this.hideEditableElement();
|
133
132
|
this.unregisterShortcuts();
|
134
133
|
}
|
@@ -299,7 +298,6 @@ class TextEditor extends _baseEditor.BaseEditor {
|
|
299
298
|
if (!force) {
|
300
299
|
this.close(); // TODO shouldn't it be this.finishEditing() ?
|
301
300
|
}
|
302
|
-
|
303
301
|
return;
|
304
302
|
}
|
305
303
|
const {
|
@@ -402,7 +400,6 @@ class TextEditor extends _baseEditor.BaseEditor {
|
|
402
400
|
insertNewLine();
|
403
401
|
return false; // Will block closing editor.
|
404
402
|
},
|
405
|
-
|
406
403
|
runOnlyIf: event => !this.hot.selection.isMultiple() &&
|
407
404
|
// We trigger a data population for multiple selection.
|
408
405
|
// catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
|
@@ -413,7 +410,6 @@ class TextEditor extends _baseEditor.BaseEditor {
|
|
413
410
|
insertNewLine();
|
414
411
|
return false; // Will block closing editor.
|
415
412
|
},
|
416
|
-
|
417
413
|
runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
|
418
414
|
}, {
|
419
415
|
keys: [['Alt', 'Enter']],
|
@@ -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
|
import { BaseEditor, EDITOR_STATE } from "../baseEditor/index.mjs";
|
6
6
|
import EventManager from "../../eventManager.mjs";
|
7
7
|
import { isEdge, isIOS } from "../../helpers/browser.mjs";
|
@@ -124,7 +124,6 @@ export class TextEditor extends BaseEditor {
|
|
124
124
|
if (isThisHotChild(this.hot.rootDocument.activeElement, this.hot.rootElement)) {
|
125
125
|
this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
|
126
126
|
}
|
127
|
-
|
128
127
|
this.hideEditableElement();
|
129
128
|
this.unregisterShortcuts();
|
130
129
|
}
|
@@ -295,7 +294,6 @@ export class TextEditor extends BaseEditor {
|
|
295
294
|
if (!force) {
|
296
295
|
this.close(); // TODO shouldn't it be this.finishEditing() ?
|
297
296
|
}
|
298
|
-
|
299
297
|
return;
|
300
298
|
}
|
301
299
|
const {
|
@@ -398,7 +396,6 @@ export class TextEditor extends BaseEditor {
|
|
398
396
|
insertNewLine();
|
399
397
|
return false; // Will block closing editor.
|
400
398
|
},
|
401
|
-
|
402
399
|
runOnlyIf: event => !this.hot.selection.isMultiple() &&
|
403
400
|
// We trigger a data population for multiple selection.
|
404
401
|
// catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
|
@@ -409,7 +406,6 @@ export class TextEditor extends BaseEditor {
|
|
409
406
|
insertNewLine();
|
410
407
|
return false; // Will block closing editor.
|
411
408
|
},
|
412
|
-
|
413
409
|
runOnlyIf: () => !this.hot.selection.isMultiple() // We trigger a data population for multiple selection.
|
414
410
|
}, {
|
415
411
|
keys: [['Alt', 'Enter']],
|
package/eventManager.js
CHANGED
@@ -6,8 +6,8 @@ require("core-js/modules/es.array.push.js");
|
|
6
6
|
require("core-js/modules/es.error.cause.js");
|
7
7
|
var _event = require("./helpers/dom/event");
|
8
8
|
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; }
|
9
|
-
function _toPropertyKey(
|
10
|
-
function _toPrimitive(
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
10
|
+
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); }
|
11
11
|
/**
|
12
12
|
* Counter which tracks unregistered listeners (useful for detecting memory leaks).
|
13
13
|
*
|
@@ -19,7 +19,6 @@ let listenersCounter = 0;
|
|
19
19
|
* Event DOM manager for internal use in Handsontable.
|
20
20
|
*
|
21
21
|
* @class EventManager
|
22
|
-
* @util
|
23
22
|
*/
|
24
23
|
class EventManager {
|
25
24
|
/**
|
@@ -52,6 +51,7 @@ class EventManager {
|
|
52
51
|
addEventListener(element, eventName, callback) {
|
53
52
|
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
54
53
|
/**
|
54
|
+
* @private
|
55
55
|
* @param {Event} event The event object.
|
56
56
|
*/
|
57
57
|
function callbackProxy(event) {
|
@@ -211,6 +211,7 @@ function extendEvent(event) {
|
|
211
211
|
}
|
212
212
|
var _default = exports.default = EventManager;
|
213
213
|
/**
|
214
|
+
* @private
|
214
215
|
* @returns {number}
|
215
216
|
*/
|
216
217
|
function getListenersCounter() {
|