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
@@ -0,0 +1,215 @@
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
3
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
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(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
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
8
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
9
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
10
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
11
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
12
|
+
var _totalTargetWidth = /*#__PURE__*/new WeakMap();
|
13
|
+
var _totalColumns = /*#__PURE__*/new WeakMap();
|
14
|
+
var _stretchingColumnWidthFn = /*#__PURE__*/new WeakMap();
|
15
|
+
var _columnWidthFn = /*#__PURE__*/new WeakMap();
|
16
|
+
var _stretchMode = /*#__PURE__*/new WeakMap();
|
17
|
+
/**
|
18
|
+
* @typedef {object} ColumnStretchingOptions
|
19
|
+
* @property {number} totalColumns Total number of columns.
|
20
|
+
* @property {Function} columnWidthFn Function that returns the width of the column at a given index (in px).
|
21
|
+
* @property {'all' | 'last' | 'none'} stretchMode Stretch mode 'all', 'last' or 'none'.
|
22
|
+
* @property {Function} stretchingColumnWidthFn Function that returns the new width of the stretched column.
|
23
|
+
*/
|
24
|
+
/**
|
25
|
+
* @class ColumnStretching
|
26
|
+
*/
|
27
|
+
export class ColumnStretching {
|
28
|
+
/**
|
29
|
+
* Default column width.
|
30
|
+
*
|
31
|
+
* @type {number}
|
32
|
+
*/
|
33
|
+
static get DEFAULT_WIDTH() {
|
34
|
+
return 50;
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* @type {number}
|
39
|
+
*/
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @param {ColumnStretchingOptions} options Object with all options specified for column viewport calculation.
|
43
|
+
*/
|
44
|
+
constructor(_ref) {
|
45
|
+
let {
|
46
|
+
totalColumns,
|
47
|
+
stretchMode,
|
48
|
+
stretchingColumnWidthFn,
|
49
|
+
columnWidthFn
|
50
|
+
} = _ref;
|
51
|
+
_defineProperty(this, "stretchAllRatio", 0);
|
52
|
+
/**
|
53
|
+
* @type {number}
|
54
|
+
*/
|
55
|
+
_defineProperty(this, "stretchLastWidth", 0);
|
56
|
+
/**
|
57
|
+
* @type {number[]}
|
58
|
+
*/
|
59
|
+
_defineProperty(this, "stretchAllColumnsWidth", []);
|
60
|
+
/**
|
61
|
+
* @type {number}
|
62
|
+
*/
|
63
|
+
_classPrivateFieldInitSpec(this, _totalTargetWidth, {
|
64
|
+
writable: true,
|
65
|
+
value: 0
|
66
|
+
});
|
67
|
+
/**
|
68
|
+
* @type {boolean}
|
69
|
+
*/
|
70
|
+
_defineProperty(this, "needVerifyLastColumnWidth", true);
|
71
|
+
/**
|
72
|
+
* The total number of columns.
|
73
|
+
*
|
74
|
+
* @type {function(): number}
|
75
|
+
*/
|
76
|
+
_classPrivateFieldInitSpec(this, _totalColumns, {
|
77
|
+
writable: true,
|
78
|
+
value: () => 0
|
79
|
+
});
|
80
|
+
/**
|
81
|
+
* Function that returns the width of the stretched column at a given index (in px).
|
82
|
+
*
|
83
|
+
* @type {function(): number}
|
84
|
+
*/
|
85
|
+
_classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, {
|
86
|
+
writable: true,
|
87
|
+
value: width => width
|
88
|
+
});
|
89
|
+
/**
|
90
|
+
* Function that returns the width of the column at a given index (in px).
|
91
|
+
*
|
92
|
+
* @type {function(): number}
|
93
|
+
*/
|
94
|
+
_classPrivateFieldInitSpec(this, _columnWidthFn, {
|
95
|
+
writable: true,
|
96
|
+
value: width => width
|
97
|
+
});
|
98
|
+
/**
|
99
|
+
* Stretch mode.
|
100
|
+
*
|
101
|
+
* @type {function(): 'all' | 'last' | 'none'}
|
102
|
+
*/
|
103
|
+
_classPrivateFieldInitSpec(this, _stretchMode, {
|
104
|
+
writable: true,
|
105
|
+
value: () => 'none'
|
106
|
+
});
|
107
|
+
_classPrivateFieldSet(this, _totalColumns, totalColumns);
|
108
|
+
_classPrivateFieldSet(this, _stretchMode, stretchMode);
|
109
|
+
_classPrivateFieldSet(this, _stretchingColumnWidthFn, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(this, _stretchingColumnWidthFn));
|
110
|
+
_classPrivateFieldSet(this, _columnWidthFn, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(this, _columnWidthFn));
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Recalculate columns stretching.
|
115
|
+
*
|
116
|
+
* @param {number} totalWidth The total width of the table.
|
117
|
+
*/
|
118
|
+
refreshStretching(totalWidth) {
|
119
|
+
if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'none') {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
_classPrivateFieldSet(this, _totalTargetWidth, totalWidth);
|
123
|
+
let sumAll = 0;
|
124
|
+
for (let i = 0; i < _classPrivateFieldGet(this, _totalColumns).call(this); i++) {
|
125
|
+
const columnWidth = this._getColumnWidth(i);
|
126
|
+
const permanentColumnWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, undefined, i);
|
127
|
+
if (typeof permanentColumnWidth === 'number') {
|
128
|
+
totalWidth -= permanentColumnWidth;
|
129
|
+
} else {
|
130
|
+
sumAll += columnWidth;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
const remainingSize = totalWidth - sumAll;
|
134
|
+
if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && remainingSize > 0) {
|
135
|
+
this.stretchAllRatio = totalWidth / sumAll;
|
136
|
+
this.stretchAllColumnsWidth = [];
|
137
|
+
this.needVerifyLastColumnWidth = true;
|
138
|
+
} else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && totalWidth !== Infinity) {
|
139
|
+
const columnWidth = this._getColumnWidth(_classPrivateFieldGet(this, _totalColumns).call(this) - 1);
|
140
|
+
const lastColumnWidth = remainingSize + columnWidth;
|
141
|
+
this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.
|
147
|
+
*
|
148
|
+
* @param {number} column The visual column index.
|
149
|
+
* @param {number} baseWidth The default column width.
|
150
|
+
* @returns {number|null}
|
151
|
+
*/
|
152
|
+
getStretchedColumnWidth(column, baseWidth) {
|
153
|
+
let result = null;
|
154
|
+
if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && this.stretchAllRatio !== 0) {
|
155
|
+
result = this._getStretchedAllColumnWidth(column, baseWidth);
|
156
|
+
} else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && this.stretchLastWidth !== 0) {
|
157
|
+
result = this._getStretchedLastColumnWidth(column);
|
158
|
+
}
|
159
|
+
return result;
|
160
|
+
}
|
161
|
+
|
162
|
+
/**
|
163
|
+
* @param {number} column The visual column index.
|
164
|
+
* @param {number} baseWidth The default column width.
|
165
|
+
* @returns {number}
|
166
|
+
* @private
|
167
|
+
*/
|
168
|
+
_getStretchedAllColumnWidth(column, baseWidth) {
|
169
|
+
let sumRatioWidth = 0;
|
170
|
+
if (!this.stretchAllColumnsWidth[column]) {
|
171
|
+
const stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
|
172
|
+
const newStretchedWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, stretchedWidth, column);
|
173
|
+
if (newStretchedWidth === undefined) {
|
174
|
+
this.stretchAllColumnsWidth[column] = stretchedWidth;
|
175
|
+
} else {
|
176
|
+
this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(this, _totalColumns).call(this) && this.needVerifyLastColumnWidth) {
|
180
|
+
this.needVerifyLastColumnWidth = false;
|
181
|
+
for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {
|
182
|
+
sumRatioWidth += this.stretchAllColumnsWidth[i];
|
183
|
+
}
|
184
|
+
if (sumRatioWidth !== _classPrivateFieldGet(this, _totalTargetWidth)) {
|
185
|
+
this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(this, _totalTargetWidth) - sumRatioWidth;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
return this.stretchAllColumnsWidth[column];
|
189
|
+
}
|
190
|
+
|
191
|
+
/**
|
192
|
+
* @param {number} column The visual column index.
|
193
|
+
* @returns {number|null}
|
194
|
+
* @private
|
195
|
+
*/
|
196
|
+
_getStretchedLastColumnWidth(column) {
|
197
|
+
if (column === _classPrivateFieldGet(this, _totalColumns).call(this) - 1) {
|
198
|
+
return this.stretchLastWidth;
|
199
|
+
}
|
200
|
+
return null;
|
201
|
+
}
|
202
|
+
|
203
|
+
/**
|
204
|
+
* @param {number} column The visual column index.
|
205
|
+
* @returns {number}
|
206
|
+
* @private
|
207
|
+
*/
|
208
|
+
_getColumnWidth(column) {
|
209
|
+
let width = _classPrivateFieldGet(this, _columnWidthFn).call(this, column);
|
210
|
+
if (isNaN(width)) {
|
211
|
+
width = ColumnStretching.DEFAULT_WIDTH;
|
212
|
+
}
|
213
|
+
return width;
|
214
|
+
}
|
215
|
+
}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
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
|
/**
|
9
9
|
* Factory for newly created DOM elements.
|
10
10
|
*
|
@@ -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
|
* Factory for newly created DOM elements.
|
7
7
|
*
|
@@ -7,8 +7,8 @@ var _constants = require("./constants");
|
|
7
7
|
var _viewSizeSet = _interopRequireDefault(require("./viewSizeSet"));
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
9
|
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; }
|
10
|
-
function _toPropertyKey(
|
11
|
-
function _toPrimitive(
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
11
|
+
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); }
|
12
12
|
/**
|
13
13
|
* Executive model for each table renderer. It's responsible for injecting DOM nodes in a
|
14
14
|
* specified order and adjusting the number of elements in the root node.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
6
|
import { WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./constants.mjs";
|
7
7
|
import ViewSizeSet from "./viewSizeSet.mjs";
|
8
8
|
/**
|
@@ -3,8 +3,8 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
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
|
/**
|
9
9
|
* Holder for current and next size (count of rendered and to render DOM elements) and offset.
|
10
10
|
*
|
@@ -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
|
* Holder for current and next size (count of rendered and to render DOM elements) and offset.
|
7
7
|
*
|
@@ -6,8 +6,8 @@ var _viewSize = _interopRequireDefault(require("./viewSize"));
|
|
6
6
|
var _constants = require("./constants");
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
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
|
* The class is a source of the truth of information about the current and
|
13
13
|
* next size of the rendered DOM elements and current and next offset of
|
@@ -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 ViewSize from "./viewSize.mjs";
|
6
6
|
import { WORKING_SPACE_ALL, WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./constants.mjs";
|
7
7
|
/**
|
@@ -3,8 +3,8 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
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
|
/**
|
9
9
|
* Row utils class contains all necessary information about sizes of the rows.
|
10
10
|
*
|
@@ -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
|
* Row utils class contains all necessary information about sizes of the rows.
|
7
7
|
*
|
@@ -255,15 +255,15 @@ class Viewport {
|
|
255
255
|
wtSettings,
|
256
256
|
wtTable
|
257
257
|
} = this;
|
258
|
-
|
258
|
+
if (wtSettings.getSetting('renderAllRows') && calculationType === _calculator.RENDER_TYPE) {
|
259
|
+
return new _calculator.RenderAllRowsCalculator({
|
260
|
+
totalRows: wtSettings.getSetting('totalRows')
|
261
|
+
});
|
262
|
+
}
|
263
|
+
let height = this.getViewportHeight();
|
259
264
|
let scrollbarHeight;
|
260
265
|
let fixedRowsHeight;
|
261
266
|
this.rowHeaderWidth = NaN;
|
262
|
-
if (wtSettings.getSetting('renderAllRows') && calculationType === _calculator.RENDER_TYPE) {
|
263
|
-
height = Infinity;
|
264
|
-
} else {
|
265
|
-
height = this.getViewportHeight();
|
266
|
-
}
|
267
267
|
let pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;
|
268
268
|
const fixedRowsTop = wtSettings.getSetting('fixedRowsTop');
|
269
269
|
const fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');
|
@@ -308,6 +308,11 @@ class Viewport {
|
|
308
308
|
wtSettings,
|
309
309
|
wtTable
|
310
310
|
} = this;
|
311
|
+
if (wtSettings.getSetting('renderAllColumns') && calculationType === _calculator.RENDER_TYPE) {
|
312
|
+
return new _calculator.RenderAllColumnsCalculator({
|
313
|
+
totalColumns: wtSettings.getSetting('totalColumns')
|
314
|
+
});
|
315
|
+
}
|
311
316
|
let width = this.getViewportWidth();
|
312
317
|
let pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
|
313
318
|
this.columnHeaderHeight = NaN;
|
@@ -327,10 +332,6 @@ class Viewport {
|
|
327
332
|
columnWidthFn: sourceCol => wtTable.getColumnWidth(sourceCol),
|
328
333
|
overrideFn: wtSettings.getSettingPure('viewportColumnCalculatorOverride'),
|
329
334
|
calculationType,
|
330
|
-
stretchMode: wtSettings.getSetting('stretchH'),
|
331
|
-
stretchingColumnWidthFn: (stretchedWidth, column) => {
|
332
|
-
return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
|
333
|
-
},
|
334
335
|
inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
|
335
336
|
});
|
336
337
|
}
|
@@ -345,22 +346,26 @@ class Viewport {
|
|
345
346
|
*/
|
346
347
|
createRenderCalculators() {
|
347
348
|
let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
348
|
-
|
349
|
-
|
349
|
+
const {
|
350
|
+
wtSettings
|
351
|
+
} = this;
|
352
|
+
if (fastDraw && !wtSettings.getSetting('renderAllRows')) {
|
350
353
|
const proposedRowsVisibleCalculator = this.createRowsCalculator(_calculator.FULLY_VISIBLE_TYPE);
|
354
|
+
fastDraw = this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator);
|
355
|
+
}
|
356
|
+
if (fastDraw && !wtSettings.getSetting('renderAllColumns')) {
|
351
357
|
const proposedColumnsVisibleCalculator = this.createColumnsCalculator(_calculator.FULLY_VISIBLE_TYPE);
|
352
|
-
|
353
|
-
runFastDraw = false;
|
354
|
-
}
|
358
|
+
fastDraw = this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator);
|
355
359
|
}
|
356
|
-
if (!
|
360
|
+
if (!fastDraw) {
|
357
361
|
this.rowsRenderCalculator = this.createRowsCalculator(_calculator.RENDER_TYPE);
|
358
362
|
this.columnsRenderCalculator = this.createColumnsCalculator(_calculator.RENDER_TYPE);
|
359
363
|
}
|
364
|
+
|
360
365
|
// delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator
|
361
366
|
this.rowsVisibleCalculator = null;
|
362
367
|
this.columnsVisibleCalculator = null;
|
363
|
-
return
|
368
|
+
return fastDraw;
|
364
369
|
}
|
365
370
|
|
366
371
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { getScrollbarWidth, getStyle, offset, outerHeight, outerWidth } from "../../../helpers/dom/element.mjs";
|
2
2
|
import { objectEach } from "../../../helpers/object.mjs";
|
3
|
-
import { RENDER_TYPE, FULLY_VISIBLE_TYPE, ViewportColumnsCalculator, ViewportRowsCalculator } from "./calculator/index.mjs";
|
3
|
+
import { RENDER_TYPE, FULLY_VISIBLE_TYPE, RenderAllColumnsCalculator, RenderAllRowsCalculator, ViewportColumnsCalculator, ViewportRowsCalculator } from "./calculator/index.mjs";
|
4
4
|
/**
|
5
5
|
* @class Viewport
|
6
6
|
*/
|
@@ -252,15 +252,15 @@ class Viewport {
|
|
252
252
|
wtSettings,
|
253
253
|
wtTable
|
254
254
|
} = this;
|
255
|
-
|
255
|
+
if (wtSettings.getSetting('renderAllRows') && calculationType === RENDER_TYPE) {
|
256
|
+
return new RenderAllRowsCalculator({
|
257
|
+
totalRows: wtSettings.getSetting('totalRows')
|
258
|
+
});
|
259
|
+
}
|
260
|
+
let height = this.getViewportHeight();
|
256
261
|
let scrollbarHeight;
|
257
262
|
let fixedRowsHeight;
|
258
263
|
this.rowHeaderWidth = NaN;
|
259
|
-
if (wtSettings.getSetting('renderAllRows') && calculationType === RENDER_TYPE) {
|
260
|
-
height = Infinity;
|
261
|
-
} else {
|
262
|
-
height = this.getViewportHeight();
|
263
|
-
}
|
264
264
|
let pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;
|
265
265
|
const fixedRowsTop = wtSettings.getSetting('fixedRowsTop');
|
266
266
|
const fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');
|
@@ -305,6 +305,11 @@ class Viewport {
|
|
305
305
|
wtSettings,
|
306
306
|
wtTable
|
307
307
|
} = this;
|
308
|
+
if (wtSettings.getSetting('renderAllColumns') && calculationType === RENDER_TYPE) {
|
309
|
+
return new RenderAllColumnsCalculator({
|
310
|
+
totalColumns: wtSettings.getSetting('totalColumns')
|
311
|
+
});
|
312
|
+
}
|
308
313
|
let width = this.getViewportWidth();
|
309
314
|
let pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
|
310
315
|
this.columnHeaderHeight = NaN;
|
@@ -324,10 +329,6 @@ class Viewport {
|
|
324
329
|
columnWidthFn: sourceCol => wtTable.getColumnWidth(sourceCol),
|
325
330
|
overrideFn: wtSettings.getSettingPure('viewportColumnCalculatorOverride'),
|
326
331
|
calculationType,
|
327
|
-
stretchMode: wtSettings.getSetting('stretchH'),
|
328
|
-
stretchingColumnWidthFn: (stretchedWidth, column) => {
|
329
|
-
return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
|
330
|
-
},
|
331
332
|
inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
|
332
333
|
});
|
333
334
|
}
|
@@ -342,22 +343,26 @@ class Viewport {
|
|
342
343
|
*/
|
343
344
|
createRenderCalculators() {
|
344
345
|
let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
345
|
-
|
346
|
-
|
346
|
+
const {
|
347
|
+
wtSettings
|
348
|
+
} = this;
|
349
|
+
if (fastDraw && !wtSettings.getSetting('renderAllRows')) {
|
347
350
|
const proposedRowsVisibleCalculator = this.createRowsCalculator(FULLY_VISIBLE_TYPE);
|
351
|
+
fastDraw = this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator);
|
352
|
+
}
|
353
|
+
if (fastDraw && !wtSettings.getSetting('renderAllColumns')) {
|
348
354
|
const proposedColumnsVisibleCalculator = this.createColumnsCalculator(FULLY_VISIBLE_TYPE);
|
349
|
-
|
350
|
-
runFastDraw = false;
|
351
|
-
}
|
355
|
+
fastDraw = this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator);
|
352
356
|
}
|
353
|
-
if (!
|
357
|
+
if (!fastDraw) {
|
354
358
|
this.rowsRenderCalculator = this.createRowsCalculator(RENDER_TYPE);
|
355
359
|
this.columnsRenderCalculator = this.createColumnsCalculator(RENDER_TYPE);
|
356
360
|
}
|
361
|
+
|
357
362
|
// delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator
|
358
363
|
this.rowsVisibleCalculator = null;
|
359
364
|
this.columnsVisibleCalculator = null;
|
360
|
-
return
|
365
|
+
return fastDraw;
|
361
366
|
}
|
362
367
|
|
363
368
|
/**
|
package/CHANGELOG.md
CHANGED
@@ -9,6 +9,42 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
10
10
|
<!-- UNVERSIONED -->
|
11
11
|
|
12
|
+
## [14.1.0] - 2024-01-16
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Added support for the ability to disable column virtualization via the new `renderAllColumns` option [#10599](https://github.com/handsontable/handsontable/pull/10599)
|
16
|
+
- Undoing changes will scroll us back to the changed area in specific case [#10639](https://github.com/handsontable/handsontable/pull/10639)
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
- Disabled table's viewport scrolling on data paste. [#10630](https://github.com/handsontable/handsontable/pull/10630)
|
20
|
+
- Updated typings for the Formulas plugin [#10653](https://github.com/handsontable/handsontable/pull/10653)
|
21
|
+
- Improved plugins TS types. [#10670](https://github.com/handsontable/handsontable/pull/10670)
|
22
|
+
- Improved TS types of the Core related modules. [#10671](https://github.com/handsontable/handsontable/pull/10671)
|
23
|
+
- Improved Select type cell editor [#10673](https://github.com/handsontable/handsontable/pull/10673)
|
24
|
+
- Improved TS types for `CellCoords` and `CellRange` classes. [#10678](https://github.com/handsontable/handsontable/pull/10678)
|
25
|
+
- Maintain the last selected row/column selection after record removal [#10690](https://github.com/handsontable/handsontable/pull/10690)
|
26
|
+
- React: Improved support for SSR frameworks [#10575](https://github.com/handsontable/handsontable/pull/10575)
|
27
|
+
|
28
|
+
### Fixed
|
29
|
+
- Improved TS typings for the CustomBorders plugin [#10515](https://github.com/handsontable/handsontable/issues/10515)
|
30
|
+
- Fixed editor's width miscalculations [#10590](https://github.com/handsontable/handsontable/pull/10590)
|
31
|
+
- Fixed a problem with the text editor's TEXTAREA element's contents being selected after opening the editor with a double-click. [#10595](https://github.com/handsontable/handsontable/pull/10595)
|
32
|
+
- Fixed cells selection after closing the editor [#10622](https://github.com/handsontable/handsontable/pull/10622)
|
33
|
+
- Fixed an error that is thrown after TAB hit in editor [#10632](https://github.com/handsontable/handsontable/pull/10632)
|
34
|
+
- Fixed table jumps after TAB hit [#10634](https://github.com/handsontable/handsontable/pull/10634)
|
35
|
+
- Fixed the TypeError that was thrown in Filters plugin in some specific setup cases [#10637](https://github.com/handsontable/handsontable/pull/10637)
|
36
|
+
- Fixed the focus position after Handsontable options or dataset change [#10642](https://github.com/handsontable/handsontable/pull/10642)
|
37
|
+
- Fixed an issue related to the "listen/unlisten" table's state. [#10648](https://github.com/handsontable/handsontable/pull/10648)
|
38
|
+
- Undoing/redoing removal of cells will restore also cell meta [#10649](https://github.com/handsontable/handsontable/pull/10649)
|
39
|
+
- Fixed manual row and column resize plugins that throw an error when the cell renderer render the cell value in HTML table element. [#10650](https://github.com/handsontable/handsontable/pull/10650)
|
40
|
+
- Fixed a problem where in specific situations the table was not being scrolled after navigating it with the keyboard, fixed an issue with the drag-to-scroll functionality not working for window-scrolled instances. [#10655](https://github.com/handsontable/handsontable/pull/10655)
|
41
|
+
- Added a dropdown renderer and validator and resolved problems with their typescript types. [#10688](https://github.com/handsontable/handsontable/pull/10688)
|
42
|
+
- Fixed problem with uncaught TypeError exception for some CollapsibleColumns plugin configurations [#10693](https://github.com/handsontable/handsontable/pull/10693)
|
43
|
+
- Fixed a bug related to deleting all Date type editor content. [#10696](https://github.com/handsontable/handsontable/pull/10696)
|
44
|
+
- Fixed several problems around ColumnSummary's roundFloat option. [#10701](https://github.com/handsontable/handsontable/pull/10701)
|
45
|
+
- Vue: Fixed "TypeError: Converting circular structure to JSON" when passing `hyperformulaInstance` to `hotSettings` [#8728](https://github.com/handsontable/handsontable/pull/8728)
|
46
|
+
- React: Added missing TS typing for `settings` prop [#10661](https://github.com/handsontable/handsontable/pull/10661)
|
47
|
+
|
12
48
|
## [14.0.0] - 2023-11-22
|
13
49
|
|
14
50
|
### Added
|
package/base.js
CHANGED
@@ -15,7 +15,9 @@ exports.CellRange = _src.CellRange;
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16
16
|
// FIXME: Bug in eslint-plugin-import: https://github.com/benmosher/eslint-plugin-import/issues/1883
|
17
17
|
/* eslint-disable import/named */
|
18
|
+
|
18
19
|
/* eslint-enable import/named */
|
20
|
+
|
19
21
|
// register default mandatory cell type for the Base package
|
20
22
|
(0, _registry2.registerCellType)(_textType.TextCellType);
|
21
23
|
|
@@ -43,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
43
45
|
Handsontable.CellCoords = _src.CellCoords;
|
44
46
|
Handsontable.CellRange = _src.CellRange;
|
45
47
|
Handsontable.packageName = 'handsontable';
|
46
|
-
Handsontable.buildDate = "
|
47
|
-
Handsontable.version = "14.
|
48
|
+
Handsontable.buildDate = "10/01/2024 08:50:44";
|
49
|
+
Handsontable.version = "14.1.0-next-ba8c2b0-20240110";
|
48
50
|
Handsontable.languages = {
|
49
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
50
52
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
|
|
35
35
|
Handsontable.CellCoords = CellCoords;
|
36
36
|
Handsontable.CellRange = CellRange;
|
37
37
|
Handsontable.packageName = 'handsontable';
|
38
|
-
Handsontable.buildDate = "
|
39
|
-
Handsontable.version = "14.
|
38
|
+
Handsontable.buildDate = "10/01/2024 08:50:50";
|
39
|
+
Handsontable.version = "14.1.0-next-ba8c2b0-20240110";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { CellTypeObject } from '../base';
|
2
2
|
import { DropdownEditor } from '../../editors/dropdownEditor';
|
3
|
-
import {
|
4
|
-
import {
|
3
|
+
import { dropdownRenderer } from '../../renderers/dropdownRenderer';
|
4
|
+
import { dropdownValidator } from '../../validators/dropdownValidator';
|
5
5
|
|
6
6
|
export const CELL_TYPE: 'dropdown';
|
7
7
|
export interface DropdownCellType extends CellTypeObject {
|
8
8
|
editor: typeof DropdownEditor;
|
9
|
-
renderer: typeof
|
10
|
-
validator: typeof
|
9
|
+
renderer: typeof dropdownRenderer;
|
10
|
+
validator: typeof dropdownValidator;
|
11
11
|
}
|
12
12
|
|
13
13
|
export namespace DropdownCellType {
|
14
14
|
export { DropdownEditor as editor };
|
15
|
-
export {
|
16
|
-
export {
|
15
|
+
export { dropdownRenderer as renderer };
|
16
|
+
export { dropdownValidator as validator };
|
17
17
|
}
|