handsontable 15.0.1-next-ab94a4c-20250207 → 15.1.0-next-dfdf994-20250206
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/index.js +2 -0
- package/3rdparty/walkontable/src/index.mjs +2 -1
- package/3rdparty/walkontable/src/overlays.js +2 -39
- package/3rdparty/walkontable/src/overlays.mjs +2 -39
- package/3rdparty/walkontable/src/renderer/_base.js +3 -4
- package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +7 -11
- package/3rdparty/walkontable/src/renderer/cells.mjs +6 -9
- package/3rdparty/walkontable/src/renderer/colGroup.js +6 -7
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +5 -5
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +4 -5
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/index.js +18 -19
- package/3rdparty/walkontable/src/renderer/index.mjs +6 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -7
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +5 -5
- package/3rdparty/walkontable/src/renderer/rows.js +23 -11
- package/3rdparty/walkontable/src/renderer/rows.mjs +23 -10
- package/3rdparty/walkontable/src/renderer/table.js +1 -1
- package/3rdparty/walkontable/src/renderer/table.mjs +1 -1
- package/3rdparty/walkontable/src/selection/border/border.js +10 -2
- package/3rdparty/walkontable/src/selection/border/border.mjs +10 -2
- package/3rdparty/walkontable/src/utils/nodesPool.js +21 -6
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +21 -6
- package/3rdparty/walkontable/src/utils/orderView/index.js +4 -5
- package/3rdparty/walkontable/src/utils/orderView/index.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +3 -4
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +60 -76
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +59 -74
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.js +138 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.mjs +135 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +72 -0
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +68 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +4 -5
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +3 -3
- package/CHANGELOG.md +51 -2
- package/README.md +3 -3
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/dropdownType/dropdownType.js +4 -2
- package/cellTypes/dropdownType/dropdownType.mjs +4 -2
- package/core.js +39 -38
- package/core.mjs +36 -35
- package/dataMap/dataMap.js +8 -0
- package/dataMap/dataMap.mjs +8 -0
- package/dataMap/dataSource.js +4 -0
- package/dataMap/dataSource.mjs +4 -0
- package/dataMap/metaManager/lazyFactoryMap.js +8 -5
- package/dataMap/metaManager/lazyFactoryMap.mjs +8 -5
- package/dataMap/metaManager/metaSchema.js +24 -9
- package/dataMap/metaManager/metaSchema.mjs +24 -9
- package/dist/handsontable.css +6 -2
- package/dist/handsontable.full.css +6 -2
- package/dist/handsontable.full.js +8026 -6927
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +530 -528
- package/dist/handsontable.js +3833 -2914
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +35 -33
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -3
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -3
- package/editors/dateEditor/dateEditor.js +4 -0
- package/editors/dateEditor/dateEditor.mjs +4 -0
- package/editors/dropdownEditor/dropdownEditor.js +3 -16
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -16
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/focusManager.js +1 -1
- package/focusManager.mjs +1 -1
- package/helpers/dom/element.d.ts +0 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/object.js +4 -0
- package/helpers/object.mjs +4 -0
- package/package.json +2 -2
- package/plugins/base/base.js +0 -7
- package/plugins/base/base.mjs +0 -7
- package/plugins/comments/comments.js +12 -3
- package/plugins/comments/comments.mjs +12 -3
- package/plugins/contextMenu/contextMenu.js +2 -7
- package/plugins/contextMenu/contextMenu.mjs +2 -7
- package/plugins/contextMenu/menu/menu.js +2 -2
- package/plugins/contextMenu/menu/menu.mjs +2 -2
- package/plugins/contextMenu/predefinedItems/clearColumn.js +15 -4
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +15 -4
- package/plugins/copyPaste/copyPaste.js +6 -12
- package/plugins/copyPaste/copyPaste.mjs +6 -12
- package/plugins/filters/conditionCollection.js +8 -7
- package/plugins/filters/conditionCollection.mjs +8 -7
- package/plugins/filters/filters.js +26 -16
- package/plugins/filters/filters.mjs +26 -16
- package/plugins/filters/utils.js +7 -24
- package/plugins/filters/utils.mjs +7 -24
- package/plugins/hiddenColumns/hiddenColumns.js +1 -3
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -3
- package/plugins/hiddenRows/hiddenRows.js +1 -3
- package/plugins/hiddenRows/hiddenRows.mjs +1 -3
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/mergeCells/calculations/autofill.js +60 -44
- package/plugins/mergeCells/calculations/autofill.mjs +60 -44
- package/plugins/mergeCells/cellsCollection.js +25 -8
- package/plugins/mergeCells/cellsCollection.mjs +25 -8
- package/plugins/mergeCells/mergeCells.js +15 -16
- package/plugins/mergeCells/mergeCells.mjs +15 -16
- package/plugins/nestedHeaders/nestedHeaders.js +6 -1
- package/plugins/nestedHeaders/nestedHeaders.mjs +6 -1
- package/plugins/nestedHeaders/stateManager/index.js +1 -2
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -2
- package/plugins/nestedHeaders/utils/ghostTable.js +4 -0
- package/plugins/nestedHeaders/utils/ghostTable.mjs +4 -0
- package/plugins/nestedRows/utils/rowMoveController.js +1 -6
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -6
- package/plugins/undoRedo/actions/_base.js +19 -0
- package/plugins/undoRedo/actions/_base.mjs +15 -0
- package/plugins/undoRedo/actions/cellAlignment.js +85 -0
- package/plugins/undoRedo/actions/cellAlignment.mjs +81 -0
- package/plugins/undoRedo/actions/columnMove.js +84 -0
- package/plugins/undoRedo/actions/columnMove.mjs +80 -0
- package/plugins/undoRedo/actions/columnSort.js +73 -0
- package/plugins/undoRedo/actions/columnSort.mjs +69 -0
- package/plugins/undoRedo/actions/createColumn.js +60 -0
- package/plugins/undoRedo/actions/createColumn.mjs +56 -0
- package/plugins/undoRedo/actions/createRow.js +65 -0
- package/plugins/undoRedo/actions/createRow.mjs +61 -0
- package/plugins/undoRedo/actions/dataChange.js +123 -0
- package/plugins/undoRedo/actions/dataChange.mjs +119 -0
- package/plugins/undoRedo/actions/filters.js +66 -0
- package/plugins/undoRedo/actions/filters.mjs +62 -0
- package/plugins/undoRedo/actions/index.js +27 -0
- package/plugins/undoRedo/actions/index.mjs +23 -0
- package/plugins/undoRedo/actions/mergeCells.js +63 -0
- package/plugins/undoRedo/actions/mergeCells.mjs +59 -0
- package/plugins/undoRedo/actions/removeColumn.js +176 -0
- package/plugins/undoRedo/actions/removeColumn.mjs +172 -0
- package/plugins/undoRedo/actions/removeRow.js +119 -0
- package/plugins/undoRedo/actions/removeRow.mjs +115 -0
- package/plugins/undoRedo/actions/rowMove.js +84 -0
- package/plugins/undoRedo/actions/rowMove.mjs +80 -0
- package/plugins/undoRedo/actions/unmergeCells.js +56 -0
- package/plugins/undoRedo/actions/unmergeCells.mjs +52 -0
- package/plugins/undoRedo/index.js +3 -4
- package/plugins/undoRedo/index.mjs +1 -2
- package/plugins/undoRedo/undoRedo.js +277 -879
- package/plugins/undoRedo/undoRedo.mjs +277 -880
- package/plugins/undoRedo/utils.js +37 -0
- package/plugins/undoRedo/utils.mjs +33 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +8 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -1
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +1 -0
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +1 -0
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -1
- package/styles/handsontable.css +75 -103
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
- package/tableView.js +17 -1
- package/tableView.mjs +17 -1
- package/utils/autoResize.js +1 -1
- package/utils/autoResize.mjs +1 -1
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/dateValidator/dateValidator.mjs +1 -1
@@ -2,7 +2,7 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
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
|
-
import ViewSize from "./viewSize.mjs";
|
5
|
+
import { ViewSize } from "./viewSize.mjs";
|
6
6
|
import { WORKING_SPACE_ALL, WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./constants.mjs";
|
7
7
|
/**
|
8
8
|
* The class is a source of the truth of information about the current and
|
@@ -20,7 +20,7 @@ import { WORKING_SPACE_ALL, WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./co
|
|
20
20
|
*
|
21
21
|
* @class {ViewSizeSet}
|
22
22
|
*/
|
23
|
-
export
|
23
|
+
export class ViewSizeSet {
|
24
24
|
constructor() {
|
25
25
|
/**
|
26
26
|
* Holder for current and next view size and offset.
|
@@ -77,7 +77,7 @@ export default class ViewSizeSet {
|
|
77
77
|
* @returns {boolean}
|
78
78
|
*/
|
79
79
|
isShared() {
|
80
|
-
return this.sharedSize
|
80
|
+
return this.sharedSize !== null;
|
81
81
|
}
|
82
82
|
|
83
83
|
/**
|
package/CHANGELOG.md
CHANGED
@@ -9,10 +9,59 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
10
10
|
<!-- UNVERSIONED -->
|
11
11
|
|
12
|
-
## [15.0
|
12
|
+
## [15.1.0] - 2025-02-12
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Added the `TAB` and `SHIFT + TAB` functionality to the Comments editor. [#11345](https://github.com/handsontable/handsontable/pull/11345)
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- Changed the approach how the table is rendered. [#11264](https://github.com/handsontable/handsontable/pull/11264)
|
19
|
+
- Pass normalized cell values to hooks for numeric cell types [#11346](https://github.com/handsontable/handsontable/pull/11346)
|
20
|
+
- Bump Hyperformula to v3 [#11373](https://github.com/handsontable/handsontable/pull/11373)
|
21
|
+
- Improved performance of the horizontal scrolling [#11412](https://github.com/handsontable/handsontable/pull/11412)
|
22
|
+
|
23
|
+
### Removed
|
24
|
+
- Removed `getComputedStyle` function declaration from types [#11421](https://github.com/handsontable/handsontable/pull/11421)
|
13
25
|
|
14
26
|
### Fixed
|
15
|
-
-
|
27
|
+
- **Breaking change**: Fix the cells size in the first row in the new themes [#11402](https://github.com/handsontable/handsontable/pull/11402)
|
28
|
+
- Fixed data population via autofill handler for merged cells [#11291](https://github.com/handsontable/handsontable/pull/11291)
|
29
|
+
- Fixed missing render call for `minSpareRows` and `minSpareCols` options [#11292](https://github.com/handsontable/handsontable/pull/11292)
|
30
|
+
- Fixed undo/redo scrolling behavior after undo data deletion. [#11297](https://github.com/handsontable/handsontable/pull/11297)
|
31
|
+
- Fixed Page Up/Down keyboard shortcuts for oversized rows [#11301](https://github.com/handsontable/handsontable/pull/11301)
|
32
|
+
- Fixed undo/redo for filters. [#11307](https://github.com/handsontable/handsontable/pull/11307)
|
33
|
+
- Fixed unwanted selection expanding after editor close. [#11311](https://github.com/handsontable/handsontable/pull/11311)
|
34
|
+
- Fixed viewport scroll after row moving for nested rows. [#11312](https://github.com/handsontable/handsontable/pull/11312)
|
35
|
+
- Fixed dropdown cells type validation for custom editors. [#11314](https://github.com/handsontable/handsontable/pull/11314)
|
36
|
+
- Fixed undo/redo for rows/columns with enabled min spare indexes [#11321](https://github.com/handsontable/handsontable/pull/11321)
|
37
|
+
- Fixed table misalign after container size change [#11324](https://github.com/handsontable/handsontable/pull/11324)
|
38
|
+
- Fixed uncaught error for handsontable editor after changing the theme [#11325](https://github.com/handsontable/handsontable/pull/11325)
|
39
|
+
- Fixed broken scroll on overlays when batch is used [#11328](https://github.com/handsontable/handsontable/pull/11328)
|
40
|
+
- Fix RLT datepicker arrows position, and other RTL fixes [#11329](https://github.com/handsontable/handsontable/pull/11329)
|
41
|
+
- Fix autofill corner style for new themes [#11330](https://github.com/handsontable/handsontable/pull/11330)
|
42
|
+
- Fixed uncaught error after viewport scroll [#11341](https://github.com/handsontable/handsontable/pull/11341)
|
43
|
+
- Fixed a problem where calling `updateSettings` with `themeName` set to the current theme name would clear the theme from the table. [#11343](https://github.com/handsontable/handsontable/pull/11343)
|
44
|
+
- Fixed the `getCellsMeta` method results [#11350](https://github.com/handsontable/handsontable/pull/11350)
|
45
|
+
- Fixed rows virtualization for Filter's "by value" component [#11351](https://github.com/handsontable/handsontable/pull/11351)
|
46
|
+
- Fixed columns shifting after render call for new themes [#11352](https://github.com/handsontable/handsontable/pull/11352)
|
47
|
+
- Fix cell editor autoResize width [#11354](https://github.com/handsontable/handsontable/pull/11354)
|
48
|
+
- Disable the "Clear column" option for read-only cells [#11355](https://github.com/handsontable/handsontable/pull/11355)
|
49
|
+
- Fix autocomplete highlight [#11364](https://github.com/handsontable/handsontable/pull/11364)
|
50
|
+
- Fix borders styles for fixed rows and cols [#11369](https://github.com/handsontable/handsontable/pull/11369)
|
51
|
+
- Fix spacing between label text and checkbox [#11377](https://github.com/handsontable/handsontable/pull/11377)
|
52
|
+
- Remove filters active class name from parent elements in the nestedHeaders [#11381](https://github.com/handsontable/handsontable/pull/11381)
|
53
|
+
- Fix editor visibility issue [#11399](https://github.com/handsontable/handsontable/pull/11399)
|
54
|
+
- Fix menu missing initial styles problem [#11400](https://github.com/handsontable/handsontable/pull/11400)
|
55
|
+
- Fix the manual row move guide backlight offset in the new themes [#11401](https://github.com/handsontable/handsontable/pull/11401)
|
56
|
+
- Fix the merge cells selection highlight [#11403](https://github.com/handsontable/handsontable/pull/11403)
|
57
|
+
- Fix context menu offset values [#11404](https://github.com/handsontable/handsontable/pull/11404)
|
58
|
+
- Fixed the CodeQL warnings. [#11405](https://github.com/handsontable/handsontable/pull/11405)
|
59
|
+
- Fix closing date picker on mobile devices [#11406](https://github.com/handsontable/handsontable/pull/11406)
|
60
|
+
- Fixed a problem with header widths when using Nested Headers with the new themes. [#11410](https://github.com/handsontable/handsontable/pull/11410)
|
61
|
+
- Fix header text overlap in nested headers [#11413](https://github.com/handsontable/handsontable/pull/11413)
|
62
|
+
- Fix merged cell height calculation in the new themes [#11418](https://github.com/handsontable/handsontable/pull/11418)
|
63
|
+
- Fix merge cells height calculation, and revert line-height style changes [#11423](https://github.com/handsontable/handsontable/pull/11423)
|
64
|
+
- React: Madee the build scripts of `@handsontable/react-wrapper` place the TS type definitions in the configured directory. [#11296](https://github.com/handsontable/handsontable/pull/11296)
|
16
65
|
|
17
66
|
## [15.0.0] - 2024-12-16
|
18
67
|
|
package/README.md
CHANGED
@@ -143,8 +143,8 @@ You can also use [Yarn](https://yarnpkg.com/package/handsontable), [NuGet](https
|
|
143
143
|
/>
|
144
144
|
</head>
|
145
145
|
<body>
|
146
|
-
<div id="handsontable-grid" class="ht-theme-main"></div>
|
147
|
-
<script src="https://cdn.jsdelivr.net/
|
146
|
+
<div id="handsontable-grid" class="ht-theme-main-dark-auto"></div>
|
147
|
+
<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
|
148
148
|
<script>
|
149
149
|
const element = document.getElementById("handsontable-grid");
|
150
150
|
|
@@ -256,4 +256,4 @@ Created and maintained by the [Handsontable Team](https://handsontable.com/team)
|
|
256
256
|
|
257
257
|
---
|
258
258
|
|
259
|
-
© 2012 -
|
259
|
+
© 2012 - 2025 Handsoncode
|
package/base.js
CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
|
|
45
45
|
Handsontable.CellCoords = _src.CellCoords;
|
46
46
|
Handsontable.CellRange = _src.CellRange;
|
47
47
|
Handsontable.packageName = 'handsontable';
|
48
|
-
Handsontable.buildDate = "
|
49
|
-
Handsontable.version = "15.0
|
48
|
+
Handsontable.buildDate = "06/02/2025 09:04:48";
|
49
|
+
Handsontable.version = "15.1.0-next-dfdf994-20250206";
|
50
50
|
Handsontable.languages = {
|
51
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
52
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 = "15.0
|
38
|
+
Handsontable.buildDate = "06/02/2025 09:04:54";
|
39
|
+
Handsontable.version = "15.1.0-next-dfdf994-20250206";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
@@ -8,7 +8,9 @@ const CELL_TYPE = exports.CELL_TYPE = 'dropdown';
|
|
8
8
|
const DropdownCellType = exports.DropdownCellType = {
|
9
9
|
CELL_TYPE,
|
10
10
|
editor: _dropdownEditor.DropdownEditor,
|
11
|
-
// displays small gray arrow on right side of the cell
|
12
11
|
renderer: _dropdownRenderer.dropdownRenderer,
|
13
|
-
|
12
|
+
// displays small gray arrow on right side of the cell
|
13
|
+
validator: _dropdownValidator.dropdownValidator,
|
14
|
+
filter: false,
|
15
|
+
strict: true
|
14
16
|
};
|
@@ -5,7 +5,9 @@ export const CELL_TYPE = 'dropdown';
|
|
5
5
|
export const DropdownCellType = {
|
6
6
|
CELL_TYPE,
|
7
7
|
editor: DropdownEditor,
|
8
|
-
// displays small gray arrow on right side of the cell
|
9
8
|
renderer: dropdownRenderer,
|
10
|
-
|
9
|
+
// displays small gray arrow on right side of the cell
|
10
|
+
validator: dropdownValidator,
|
11
|
+
filter: false,
|
12
|
+
strict: true
|
11
13
|
};
|
package/core.js
CHANGED
@@ -43,7 +43,7 @@ var _registry5 = require("./i18n/registry");
|
|
43
43
|
var _utils = require("./i18n/utils");
|
44
44
|
var _selection = require("./selection");
|
45
45
|
var _dataMap = require("./dataMap");
|
46
|
-
var
|
46
|
+
var _index = require("./core/index");
|
47
47
|
var _uniqueMap = require("./utils/dataStructures/uniqueMap");
|
48
48
|
var _shortcuts = require("./shortcuts");
|
49
49
|
var _shortcutContexts = require("./shortcutContexts");
|
@@ -510,7 +510,6 @@ function Core(rootElement, userSettings) {
|
|
510
510
|
* @param {boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.
|
511
511
|
*/
|
512
512
|
alter(action, index) {
|
513
|
-
var _index, _index2;
|
514
513
|
let amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
515
514
|
let source = arguments.length > 3 ? arguments[3] : undefined;
|
516
515
|
let keepEmptyRows = arguments.length > 4 ? arguments[4] : undefined;
|
@@ -561,7 +560,7 @@ function Core(rootElement, userSettings) {
|
|
561
560
|
|
562
561
|
// Calling the `insert_row_above` action adds a new row at the beginning of the data set.
|
563
562
|
// eslint-disable-next-line no-param-reassign
|
564
|
-
index =
|
563
|
+
index = index !== null && index !== void 0 ? index : insertRowMode === 'below' ? numberOfSourceRows : 0;
|
565
564
|
const {
|
566
565
|
delta: rowDelta,
|
567
566
|
startPhysicalIndex: startRowPhysicalIndex
|
@@ -578,7 +577,7 @@ function Core(rootElement, userSettings) {
|
|
578
577
|
|
579
578
|
// Calling the `insert_col_start` action adds a new column to the left of the data set.
|
580
579
|
// eslint-disable-next-line no-param-reassign
|
581
|
-
index =
|
580
|
+
index = index !== null && index !== void 0 ? index : insertColumnMode === 'end' ? instance.countSourceCols() : 0;
|
582
581
|
const {
|
583
582
|
delta: colDelta,
|
584
583
|
startPhysicalIndex: startColumnPhysicalIndex
|
@@ -711,10 +710,11 @@ function Core(rootElement, userSettings) {
|
|
711
710
|
default:
|
712
711
|
throw new Error(`There is no such action "${action}"`);
|
713
712
|
}
|
714
|
-
instance.view.render();
|
715
713
|
if (!keepEmptyRows) {
|
716
714
|
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
|
717
715
|
}
|
716
|
+
instance.view.render();
|
717
|
+
instance.view.adjustElementsSize();
|
718
718
|
},
|
719
719
|
/**
|
720
720
|
* Makes sure there are empty rows at the bottom of the table.
|
@@ -763,7 +763,7 @@ function Core(rootElement, userSettings) {
|
|
763
763
|
|
764
764
|
// should I add empty cols to meet minCols?
|
765
765
|
if (minCols && !tableMeta.columns && nrOfColumns < minCols) {
|
766
|
-
// The synchronization with cell meta is not desired here. For `
|
766
|
+
// The synchronization with cell meta is not desired here. For `minCols` option,
|
767
767
|
// we don't want to touch/shift cell meta objects.
|
768
768
|
const colsToCreate = minCols - nrOfColumns;
|
769
769
|
emptyCols += colsToCreate;
|
@@ -777,16 +777,13 @@ function Core(rootElement, userSettings) {
|
|
777
777
|
const emptyColsMissing = minSpareCols - emptyCols;
|
778
778
|
const colsToCreate = Math.min(emptyColsMissing, tableMeta.maxCols - nrOfColumns);
|
779
779
|
|
780
|
-
// The synchronization with cell meta is not desired here. For `
|
780
|
+
// The synchronization with cell meta is not desired here. For `minSpareCols` option,
|
781
781
|
// we don't want to touch/shift cell meta objects.
|
782
782
|
datamap.createCol(nrOfColumns, colsToCreate, {
|
783
783
|
source: 'auto'
|
784
784
|
});
|
785
785
|
}
|
786
786
|
}
|
787
|
-
if (instance.view) {
|
788
|
-
instance.view.adjustElementsSize();
|
789
|
-
}
|
790
787
|
},
|
791
788
|
/**
|
792
789
|
* Populate the data from the provided 2d array from the given cell coordinates.
|
@@ -1046,10 +1043,10 @@ function Core(rootElement, userSettings) {
|
|
1046
1043
|
// Add the theme class name to the license info element.
|
1047
1044
|
instance.view.addClassNameToLicenseElement(instance.getCurrentThemeName());
|
1048
1045
|
editorManager = _editorManager.default.getInstance(instance, tableMeta, selection);
|
1049
|
-
viewportScroller = (0,
|
1046
|
+
viewportScroller = (0, _index.createViewportScroller)(instance);
|
1050
1047
|
focusManager = new _focusManager.FocusManager(instance);
|
1051
1048
|
if ((0, _rootInstance.isRootInstance)(this)) {
|
1052
|
-
(0,
|
1049
|
+
(0, _index.installFocusCatcher)(instance);
|
1053
1050
|
}
|
1054
1051
|
instance.runHooks('init');
|
1055
1052
|
this.forceFullRender = true; // used when data was changed
|
@@ -1137,7 +1134,7 @@ function Core(rootElement, userSettings) {
|
|
1137
1134
|
callback(); // called when async validators are resolved and beforeChange was not async
|
1138
1135
|
};
|
1139
1136
|
for (let i = changes.length - 1; i >= 0; i--) {
|
1140
|
-
const [row, prop
|
1137
|
+
const [row, prop] = changes[i];
|
1141
1138
|
const visualCol = datamap.propToCol(prop);
|
1142
1139
|
let cellProperties;
|
1143
1140
|
if (Number.isInteger(visualCol)) {
|
@@ -1150,9 +1147,6 @@ function Core(rootElement, userSettings) {
|
|
1150
1147
|
...tableMeta
|
1151
1148
|
};
|
1152
1149
|
}
|
1153
|
-
if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
|
1154
|
-
changes[i][3] = getParsedNumber(newValue);
|
1155
|
-
}
|
1156
1150
|
|
1157
1151
|
/* eslint-disable no-loop-func */
|
1158
1152
|
if (instance.getCellValidator(cellProperties)) {
|
@@ -1201,7 +1195,7 @@ function Core(rootElement, userSettings) {
|
|
1201
1195
|
const {
|
1202
1196
|
delta: numberOfCreatedRows
|
1203
1197
|
} = datamap.createRow(undefined, undefined, {
|
1204
|
-
source
|
1198
|
+
source: 'auto'
|
1205
1199
|
});
|
1206
1200
|
if (numberOfCreatedRows === 0) {
|
1207
1201
|
skipThisChange = true;
|
@@ -1214,7 +1208,7 @@ function Core(rootElement, userSettings) {
|
|
1214
1208
|
const {
|
1215
1209
|
delta: numberOfCreatedColumns
|
1216
1210
|
} = datamap.createCol(undefined, undefined, {
|
1217
|
-
source
|
1211
|
+
source: 'auto'
|
1218
1212
|
});
|
1219
1213
|
if (numberOfCreatedColumns === 0) {
|
1220
1214
|
skipThisChange = true;
|
@@ -1373,16 +1367,31 @@ function Core(rootElement, userSettings) {
|
|
1373
1367
|
* @returns {Array} List of changes finally applied to the dataset.
|
1374
1368
|
*/
|
1375
1369
|
function processChanges(changes, source) {
|
1376
|
-
const activeEditor = instance.getActiveEditor();
|
1377
1370
|
const beforeChangeResult = instance.runHooks('beforeChange', changes, source || 'edit');
|
1378
1371
|
// The `beforeChange` hook could add a `null` for purpose of cancelling some dataset's change.
|
1379
1372
|
const filteredChanges = changes.filter(change => change !== null);
|
1380
1373
|
if (beforeChangeResult === false || filteredChanges.length === 0) {
|
1381
|
-
|
1382
|
-
|
1383
|
-
}
|
1374
|
+
var _instance$getActiveEd;
|
1375
|
+
(_instance$getActiveEd = instance.getActiveEditor()) === null || _instance$getActiveEd === void 0 || _instance$getActiveEd.cancelChanges();
|
1384
1376
|
return [];
|
1385
1377
|
}
|
1378
|
+
for (let i = filteredChanges.length - 1; i >= 0; i--) {
|
1379
|
+
const [row, prop,, newValue] = filteredChanges[i];
|
1380
|
+
const visualColumn = datamap.propToCol(prop);
|
1381
|
+
let cellProperties;
|
1382
|
+
if (Number.isInteger(visualColumn)) {
|
1383
|
+
cellProperties = instance.getCellMeta(row, visualColumn);
|
1384
|
+
} else {
|
1385
|
+
// If there's no requested visual column, we can use the table meta as the cell properties
|
1386
|
+
cellProperties = {
|
1387
|
+
...Object.getPrototypeOf(tableMeta),
|
1388
|
+
...tableMeta
|
1389
|
+
};
|
1390
|
+
}
|
1391
|
+
if (cellProperties.type === 'numeric' && typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
|
1392
|
+
filteredChanges[i][3] = getParsedNumber(newValue);
|
1393
|
+
}
|
1394
|
+
}
|
1386
1395
|
return filteredChanges;
|
1387
1396
|
}
|
1388
1397
|
|
@@ -2011,10 +2020,11 @@ function Core(rootElement, userSettings) {
|
|
2011
2020
|
if (!instance.view) {
|
2012
2021
|
return;
|
2013
2022
|
}
|
2023
|
+
const view = instance.view;
|
2014
2024
|
const {
|
2015
2025
|
width: lastWidth,
|
2016
2026
|
height: lastHeight
|
2017
|
-
} =
|
2027
|
+
} = view.getLastSize();
|
2018
2028
|
const {
|
2019
2029
|
width,
|
2020
2030
|
height
|
@@ -2030,9 +2040,10 @@ function Core(rootElement, userSettings) {
|
|
2030
2040
|
if (isResizeBlocked) {
|
2031
2041
|
return;
|
2032
2042
|
}
|
2033
|
-
if (isSizeChanged ||
|
2034
|
-
|
2043
|
+
if (isSizeChanged || view._wt.wtOverlays.scrollableElement === instance.rootWindow) {
|
2044
|
+
view.setLastSize(width, height);
|
2035
2045
|
instance.render();
|
2046
|
+
view.adjustElementsSize();
|
2036
2047
|
}
|
2037
2048
|
instance.runHooks('afterRefreshDimensions', {
|
2038
2049
|
width: lastWidth,
|
@@ -2400,7 +2411,7 @@ function Core(rootElement, userSettings) {
|
|
2400
2411
|
instance.view._wt.exportSettingsAsClassNames();
|
2401
2412
|
const currentThemeName = instance.getCurrentThemeName();
|
2402
2413
|
const themeNameOptionExists = (0, _object.hasOwnProperty)(settings, 'themeName');
|
2403
|
-
if (currentThemeName && themeNameOptionExists) {
|
2414
|
+
if (currentThemeName && themeNameOptionExists && currentThemeName !== settings.themeName) {
|
2404
2415
|
instance.view.getStylesHandler().removeClassNames();
|
2405
2416
|
instance.view.removeClassNameFromLicenseElement(currentThemeName);
|
2406
2417
|
}
|
@@ -2420,9 +2431,6 @@ function Core(rootElement, userSettings) {
|
|
2420
2431
|
instance.view.render();
|
2421
2432
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2422
2433
|
}
|
2423
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2424
|
-
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2425
|
-
}
|
2426
2434
|
};
|
2427
2435
|
|
2428
2436
|
/**
|
@@ -4090,7 +4098,6 @@ function Core(rootElement, userSettings) {
|
|
4090
4098
|
* @returns {boolean} `true` if viewport was scrolled, `false` otherwise.
|
4091
4099
|
*/
|
4092
4100
|
this.scrollViewportTo = function (options) {
|
4093
|
-
var _options;
|
4094
4101
|
// Support for backward compatibility arguments: (row, col, snapToBottom, snapToRight, considerHiddenIndexes)
|
4095
4102
|
if (typeof options === 'number') {
|
4096
4103
|
var _arguments$;
|
@@ -4108,7 +4115,7 @@ function Core(rootElement, userSettings) {
|
|
4108
4115
|
row,
|
4109
4116
|
col,
|
4110
4117
|
considerHiddenIndexes
|
4111
|
-
} =
|
4118
|
+
} = options !== null && options !== void 0 ? options : {};
|
4112
4119
|
let renderableRow = row;
|
4113
4120
|
let renderableColumn = col;
|
4114
4121
|
if (considerHiddenIndexes === undefined || considerHiddenIndexes) {
|
@@ -4418,13 +4425,7 @@ function Core(rootElement, userSettings) {
|
|
4418
4425
|
* @returns {BasePlugin|undefined} The plugin instance or undefined if there is no plugin.
|
4419
4426
|
*/
|
4420
4427
|
this.getPlugin = function (pluginName) {
|
4421
|
-
|
4422
|
-
|
4423
|
-
// Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.
|
4424
|
-
if (unifiedPluginName === 'UndoRedo') {
|
4425
|
-
return this.undoRedo;
|
4426
|
-
}
|
4427
|
-
return pluginsRegistry.getItem(unifiedPluginName);
|
4428
|
+
return pluginsRegistry.getItem((0, _string.toUpperCaseFirst)(pluginName));
|
4428
4429
|
};
|
4429
4430
|
|
4430
4431
|
/**
|
package/core.mjs
CHANGED
@@ -505,7 +505,6 @@ export default function Core(rootElement, userSettings) {
|
|
505
505
|
* @param {boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.
|
506
506
|
*/
|
507
507
|
alter(action, index) {
|
508
|
-
var _index, _index2;
|
509
508
|
let amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
510
509
|
let source = arguments.length > 3 ? arguments[3] : undefined;
|
511
510
|
let keepEmptyRows = arguments.length > 4 ? arguments[4] : undefined;
|
@@ -556,7 +555,7 @@ export default function Core(rootElement, userSettings) {
|
|
556
555
|
|
557
556
|
// Calling the `insert_row_above` action adds a new row at the beginning of the data set.
|
558
557
|
// eslint-disable-next-line no-param-reassign
|
559
|
-
index =
|
558
|
+
index = index !== null && index !== void 0 ? index : insertRowMode === 'below' ? numberOfSourceRows : 0;
|
560
559
|
const {
|
561
560
|
delta: rowDelta,
|
562
561
|
startPhysicalIndex: startRowPhysicalIndex
|
@@ -573,7 +572,7 @@ export default function Core(rootElement, userSettings) {
|
|
573
572
|
|
574
573
|
// Calling the `insert_col_start` action adds a new column to the left of the data set.
|
575
574
|
// eslint-disable-next-line no-param-reassign
|
576
|
-
index =
|
575
|
+
index = index !== null && index !== void 0 ? index : insertColumnMode === 'end' ? instance.countSourceCols() : 0;
|
577
576
|
const {
|
578
577
|
delta: colDelta,
|
579
578
|
startPhysicalIndex: startColumnPhysicalIndex
|
@@ -706,10 +705,11 @@ export default function Core(rootElement, userSettings) {
|
|
706
705
|
default:
|
707
706
|
throw new Error(`There is no such action "${action}"`);
|
708
707
|
}
|
709
|
-
instance.view.render();
|
710
708
|
if (!keepEmptyRows) {
|
711
709
|
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
|
712
710
|
}
|
711
|
+
instance.view.render();
|
712
|
+
instance.view.adjustElementsSize();
|
713
713
|
},
|
714
714
|
/**
|
715
715
|
* Makes sure there are empty rows at the bottom of the table.
|
@@ -758,7 +758,7 @@ export default function Core(rootElement, userSettings) {
|
|
758
758
|
|
759
759
|
// should I add empty cols to meet minCols?
|
760
760
|
if (minCols && !tableMeta.columns && nrOfColumns < minCols) {
|
761
|
-
// The synchronization with cell meta is not desired here. For `
|
761
|
+
// The synchronization with cell meta is not desired here. For `minCols` option,
|
762
762
|
// we don't want to touch/shift cell meta objects.
|
763
763
|
const colsToCreate = minCols - nrOfColumns;
|
764
764
|
emptyCols += colsToCreate;
|
@@ -772,16 +772,13 @@ export default function Core(rootElement, userSettings) {
|
|
772
772
|
const emptyColsMissing = minSpareCols - emptyCols;
|
773
773
|
const colsToCreate = Math.min(emptyColsMissing, tableMeta.maxCols - nrOfColumns);
|
774
774
|
|
775
|
-
// The synchronization with cell meta is not desired here. For `
|
775
|
+
// The synchronization with cell meta is not desired here. For `minSpareCols` option,
|
776
776
|
// we don't want to touch/shift cell meta objects.
|
777
777
|
datamap.createCol(nrOfColumns, colsToCreate, {
|
778
778
|
source: 'auto'
|
779
779
|
});
|
780
780
|
}
|
781
781
|
}
|
782
|
-
if (instance.view) {
|
783
|
-
instance.view.adjustElementsSize();
|
784
|
-
}
|
785
782
|
},
|
786
783
|
/**
|
787
784
|
* Populate the data from the provided 2d array from the given cell coordinates.
|
@@ -1132,7 +1129,7 @@ export default function Core(rootElement, userSettings) {
|
|
1132
1129
|
callback(); // called when async validators are resolved and beforeChange was not async
|
1133
1130
|
};
|
1134
1131
|
for (let i = changes.length - 1; i >= 0; i--) {
|
1135
|
-
const [row, prop
|
1132
|
+
const [row, prop] = changes[i];
|
1136
1133
|
const visualCol = datamap.propToCol(prop);
|
1137
1134
|
let cellProperties;
|
1138
1135
|
if (Number.isInteger(visualCol)) {
|
@@ -1145,9 +1142,6 @@ export default function Core(rootElement, userSettings) {
|
|
1145
1142
|
...tableMeta
|
1146
1143
|
};
|
1147
1144
|
}
|
1148
|
-
if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
|
1149
|
-
changes[i][3] = getParsedNumber(newValue);
|
1150
|
-
}
|
1151
1145
|
|
1152
1146
|
/* eslint-disable no-loop-func */
|
1153
1147
|
if (instance.getCellValidator(cellProperties)) {
|
@@ -1196,7 +1190,7 @@ export default function Core(rootElement, userSettings) {
|
|
1196
1190
|
const {
|
1197
1191
|
delta: numberOfCreatedRows
|
1198
1192
|
} = datamap.createRow(undefined, undefined, {
|
1199
|
-
source
|
1193
|
+
source: 'auto'
|
1200
1194
|
});
|
1201
1195
|
if (numberOfCreatedRows === 0) {
|
1202
1196
|
skipThisChange = true;
|
@@ -1209,7 +1203,7 @@ export default function Core(rootElement, userSettings) {
|
|
1209
1203
|
const {
|
1210
1204
|
delta: numberOfCreatedColumns
|
1211
1205
|
} = datamap.createCol(undefined, undefined, {
|
1212
|
-
source
|
1206
|
+
source: 'auto'
|
1213
1207
|
});
|
1214
1208
|
if (numberOfCreatedColumns === 0) {
|
1215
1209
|
skipThisChange = true;
|
@@ -1368,16 +1362,31 @@ export default function Core(rootElement, userSettings) {
|
|
1368
1362
|
* @returns {Array} List of changes finally applied to the dataset.
|
1369
1363
|
*/
|
1370
1364
|
function processChanges(changes, source) {
|
1371
|
-
const activeEditor = instance.getActiveEditor();
|
1372
1365
|
const beforeChangeResult = instance.runHooks('beforeChange', changes, source || 'edit');
|
1373
1366
|
// The `beforeChange` hook could add a `null` for purpose of cancelling some dataset's change.
|
1374
1367
|
const filteredChanges = changes.filter(change => change !== null);
|
1375
1368
|
if (beforeChangeResult === false || filteredChanges.length === 0) {
|
1376
|
-
|
1377
|
-
|
1378
|
-
}
|
1369
|
+
var _instance$getActiveEd;
|
1370
|
+
(_instance$getActiveEd = instance.getActiveEditor()) === null || _instance$getActiveEd === void 0 || _instance$getActiveEd.cancelChanges();
|
1379
1371
|
return [];
|
1380
1372
|
}
|
1373
|
+
for (let i = filteredChanges.length - 1; i >= 0; i--) {
|
1374
|
+
const [row, prop,, newValue] = filteredChanges[i];
|
1375
|
+
const visualColumn = datamap.propToCol(prop);
|
1376
|
+
let cellProperties;
|
1377
|
+
if (Number.isInteger(visualColumn)) {
|
1378
|
+
cellProperties = instance.getCellMeta(row, visualColumn);
|
1379
|
+
} else {
|
1380
|
+
// If there's no requested visual column, we can use the table meta as the cell properties
|
1381
|
+
cellProperties = {
|
1382
|
+
...Object.getPrototypeOf(tableMeta),
|
1383
|
+
...tableMeta
|
1384
|
+
};
|
1385
|
+
}
|
1386
|
+
if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericLike(newValue)) {
|
1387
|
+
filteredChanges[i][3] = getParsedNumber(newValue);
|
1388
|
+
}
|
1389
|
+
}
|
1381
1390
|
return filteredChanges;
|
1382
1391
|
}
|
1383
1392
|
|
@@ -2006,10 +2015,11 @@ export default function Core(rootElement, userSettings) {
|
|
2006
2015
|
if (!instance.view) {
|
2007
2016
|
return;
|
2008
2017
|
}
|
2018
|
+
const view = instance.view;
|
2009
2019
|
const {
|
2010
2020
|
width: lastWidth,
|
2011
2021
|
height: lastHeight
|
2012
|
-
} =
|
2022
|
+
} = view.getLastSize();
|
2013
2023
|
const {
|
2014
2024
|
width,
|
2015
2025
|
height
|
@@ -2025,9 +2035,10 @@ export default function Core(rootElement, userSettings) {
|
|
2025
2035
|
if (isResizeBlocked) {
|
2026
2036
|
return;
|
2027
2037
|
}
|
2028
|
-
if (isSizeChanged ||
|
2029
|
-
|
2038
|
+
if (isSizeChanged || view._wt.wtOverlays.scrollableElement === instance.rootWindow) {
|
2039
|
+
view.setLastSize(width, height);
|
2030
2040
|
instance.render();
|
2041
|
+
view.adjustElementsSize();
|
2031
2042
|
}
|
2032
2043
|
instance.runHooks('afterRefreshDimensions', {
|
2033
2044
|
width: lastWidth,
|
@@ -2395,7 +2406,7 @@ export default function Core(rootElement, userSettings) {
|
|
2395
2406
|
instance.view._wt.exportSettingsAsClassNames();
|
2396
2407
|
const currentThemeName = instance.getCurrentThemeName();
|
2397
2408
|
const themeNameOptionExists = hasOwnProperty(settings, 'themeName');
|
2398
|
-
if (currentThemeName && themeNameOptionExists) {
|
2409
|
+
if (currentThemeName && themeNameOptionExists && currentThemeName !== settings.themeName) {
|
2399
2410
|
instance.view.getStylesHandler().removeClassNames();
|
2400
2411
|
instance.view.removeClassNameFromLicenseElement(currentThemeName);
|
2401
2412
|
}
|
@@ -2415,9 +2426,6 @@ export default function Core(rootElement, userSettings) {
|
|
2415
2426
|
instance.view.render();
|
2416
2427
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2417
2428
|
}
|
2418
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2419
|
-
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2420
|
-
}
|
2421
2429
|
};
|
2422
2430
|
|
2423
2431
|
/**
|
@@ -4085,7 +4093,6 @@ export default function Core(rootElement, userSettings) {
|
|
4085
4093
|
* @returns {boolean} `true` if viewport was scrolled, `false` otherwise.
|
4086
4094
|
*/
|
4087
4095
|
this.scrollViewportTo = function (options) {
|
4088
|
-
var _options;
|
4089
4096
|
// Support for backward compatibility arguments: (row, col, snapToBottom, snapToRight, considerHiddenIndexes)
|
4090
4097
|
if (typeof options === 'number') {
|
4091
4098
|
var _arguments$;
|
@@ -4103,7 +4110,7 @@ export default function Core(rootElement, userSettings) {
|
|
4103
4110
|
row,
|
4104
4111
|
col,
|
4105
4112
|
considerHiddenIndexes
|
4106
|
-
} =
|
4113
|
+
} = options !== null && options !== void 0 ? options : {};
|
4107
4114
|
let renderableRow = row;
|
4108
4115
|
let renderableColumn = col;
|
4109
4116
|
if (considerHiddenIndexes === undefined || considerHiddenIndexes) {
|
@@ -4413,13 +4420,7 @@ export default function Core(rootElement, userSettings) {
|
|
4413
4420
|
* @returns {BasePlugin|undefined} The plugin instance or undefined if there is no plugin.
|
4414
4421
|
*/
|
4415
4422
|
this.getPlugin = function (pluginName) {
|
4416
|
-
|
4417
|
-
|
4418
|
-
// Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.
|
4419
|
-
if (unifiedPluginName === 'UndoRedo') {
|
4420
|
-
return this.undoRedo;
|
4421
|
-
}
|
4422
|
-
return pluginsRegistry.getItem(unifiedPluginName);
|
4423
|
+
return pluginsRegistry.getItem(toUpperCaseFirst(pluginName));
|
4423
4424
|
};
|
4424
4425
|
|
4425
4426
|
/**
|
package/dataMap/dataMap.js
CHANGED
@@ -758,6 +758,10 @@ class DataMap {
|
|
758
758
|
let ilen;
|
759
759
|
const sliced = prop.split('.');
|
760
760
|
for (i = 0, ilen = sliced.length - 1; i < ilen; i++) {
|
761
|
+
if (sliced[i] === '__proto__' || sliced[i] === 'constructor' || sliced[i] === 'prototype') {
|
762
|
+
// Security: prototype-polluting is not allowed
|
763
|
+
return;
|
764
|
+
}
|
761
765
|
if (typeof out[sliced[i]] === 'undefined') {
|
762
766
|
out[sliced[i]] = {};
|
763
767
|
}
|
@@ -767,6 +771,10 @@ class DataMap {
|
|
767
771
|
} else if (typeof prop === 'function') {
|
768
772
|
prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0], newValue);
|
769
773
|
} else {
|
774
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') {
|
775
|
+
// Security: prototype-polluting is not allowed
|
776
|
+
return;
|
777
|
+
}
|
770
778
|
dataRow[prop] = newValue;
|
771
779
|
}
|
772
780
|
}
|
package/dataMap/dataMap.mjs
CHANGED
@@ -754,6 +754,10 @@ class DataMap {
|
|
754
754
|
let ilen;
|
755
755
|
const sliced = prop.split('.');
|
756
756
|
for (i = 0, ilen = sliced.length - 1; i < ilen; i++) {
|
757
|
+
if (sliced[i] === '__proto__' || sliced[i] === 'constructor' || sliced[i] === 'prototype') {
|
758
|
+
// Security: prototype-polluting is not allowed
|
759
|
+
return;
|
760
|
+
}
|
757
761
|
if (typeof out[sliced[i]] === 'undefined') {
|
758
762
|
out[sliced[i]] = {};
|
759
763
|
}
|
@@ -763,6 +767,10 @@ class DataMap {
|
|
763
767
|
} else if (typeof prop === 'function') {
|
764
768
|
prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0], newValue);
|
765
769
|
} else {
|
770
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') {
|
771
|
+
// Security: prototype-polluting is not allowed
|
772
|
+
return;
|
773
|
+
}
|
766
774
|
dataRow[prop] = newValue;
|
767
775
|
}
|
768
776
|
}
|
package/dataMap/dataSource.js
CHANGED
@@ -185,6 +185,10 @@ class DataSource {
|
|
185
185
|
value = valueHolder.value;
|
186
186
|
}
|
187
187
|
}
|
188
|
+
if (!Number.isInteger(row)) {
|
189
|
+
// invalid row number
|
190
|
+
return;
|
191
|
+
}
|
188
192
|
if (!Number.isInteger(column)) {
|
189
193
|
// column argument is the prop name
|
190
194
|
(0, _object.setProperty)(this.data[row], column, value);
|