handsontable 0.0.0-next-c3d199b-20230626 → 0.0.0-next-74a68c1-20230627
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/CHANGELOG.md +31 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +3347 -3475
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +53 -53
- package/dist/handsontable.js +5524 -5652
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +1 -1
- package/plugins/comments/commentEditor.js +0 -1
- package/plugins/comments/commentEditor.mjs +0 -1
- package/plugins/comments/comments.js +231 -263
- package/plugins/comments/comments.mjs +241 -271
- package/plugins/copyPaste/copyPaste.js +1 -1
- package/plugins/copyPaste/copyPaste.mjs +1 -1
- package/plugins/filters/filters.js +62 -42
- package/plugins/filters/filters.mjs +61 -41
- package/shortcutContexts/commands/index.js +2 -1
- package/shortcutContexts/commands/index.mjs +2 -1
- package/shortcutContexts/commands/scrollToFocusedCell.js +38 -0
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +33 -0
- package/shortcutContexts/grid.js +5 -0
- package/shortcutContexts/grid.mjs +5 -0
- package/tableView.js +2 -5
- package/tableView.mjs +2 -5
- package/translations/indexMapper.d.ts +0 -2
- package/plugins/comments/contextMenuItem/addEditComment.js +0 -51
- package/plugins/comments/contextMenuItem/addEditComment.mjs +0 -35
- package/plugins/comments/contextMenuItem/readOnlyComment.js +0 -63
- package/plugins/comments/contextMenuItem/readOnlyComment.mjs +0 -55
- package/plugins/comments/contextMenuItem/removeComment.js +0 -48
- package/plugins/comments/contextMenuItem/removeComment.mjs +0 -32
@@ -1,51 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
6
|
-
require("core-js/modules/es.string.iterator.js");
|
7
|
-
require("core-js/modules/es.weak-map.js");
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
9
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
10
|
-
require("core-js/modules/es.symbol.js");
|
11
|
-
require("core-js/modules/es.symbol.description.js");
|
12
|
-
require("core-js/modules/es.symbol.iterator.js");
|
13
|
-
exports.__esModule = true;
|
14
|
-
exports.default = addEditCommentItem;
|
15
|
-
var C = _interopRequireWildcard(require("../../../i18n/constants"));
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
18
|
-
/**
|
19
|
-
* @param {Comments} plugin The Comments plugin instance.
|
20
|
-
* @returns {object}
|
21
|
-
*/
|
22
|
-
function addEditCommentItem(plugin) {
|
23
|
-
return {
|
24
|
-
key: 'commentsAddEdit',
|
25
|
-
name: function name() {
|
26
|
-
var _this$getSelectedRang;
|
27
|
-
var highlight = (_this$getSelectedRang = this.getSelectedRangeLast()) === null || _this$getSelectedRang === void 0 ? void 0 : _this$getSelectedRang.highlight;
|
28
|
-
if (highlight && highlight.isCell() && plugin.getCommentAtCell(highlight.row, highlight.col)) {
|
29
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_EDIT_COMMENT);
|
30
|
-
}
|
31
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ADD_COMMENT);
|
32
|
-
},
|
33
|
-
callback: function callback() {
|
34
|
-
var range = this.getSelectedRangeLast();
|
35
|
-
this.deselectCell();
|
36
|
-
plugin.setRange(range);
|
37
|
-
plugin.show();
|
38
|
-
plugin.focusEditor();
|
39
|
-
},
|
40
|
-
disabled: function disabled() {
|
41
|
-
var range = this.getSelectedRangeLast();
|
42
|
-
if (!range) {
|
43
|
-
return true;
|
44
|
-
}
|
45
|
-
if (range.highlight.isHeader()) {
|
46
|
-
return true;
|
47
|
-
}
|
48
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
49
|
-
}
|
50
|
-
};
|
51
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import * as C from "../../../i18n/constants.mjs";
|
2
|
-
/**
|
3
|
-
* @param {Comments} plugin The Comments plugin instance.
|
4
|
-
* @returns {object}
|
5
|
-
*/
|
6
|
-
export default function addEditCommentItem(plugin) {
|
7
|
-
return {
|
8
|
-
key: 'commentsAddEdit',
|
9
|
-
name: function name() {
|
10
|
-
var _this$getSelectedRang;
|
11
|
-
var highlight = (_this$getSelectedRang = this.getSelectedRangeLast()) === null || _this$getSelectedRang === void 0 ? void 0 : _this$getSelectedRang.highlight;
|
12
|
-
if (highlight && highlight.isCell() && plugin.getCommentAtCell(highlight.row, highlight.col)) {
|
13
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_EDIT_COMMENT);
|
14
|
-
}
|
15
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ADD_COMMENT);
|
16
|
-
},
|
17
|
-
callback: function callback() {
|
18
|
-
var range = this.getSelectedRangeLast();
|
19
|
-
this.deselectCell();
|
20
|
-
plugin.setRange(range);
|
21
|
-
plugin.show();
|
22
|
-
plugin.focusEditor();
|
23
|
-
},
|
24
|
-
disabled: function disabled() {
|
25
|
-
var range = this.getSelectedRangeLast();
|
26
|
-
if (!range) {
|
27
|
-
return true;
|
28
|
-
}
|
29
|
-
if (range.highlight.isHeader()) {
|
30
|
-
return true;
|
31
|
-
}
|
32
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
33
|
-
}
|
34
|
-
};
|
35
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
require("core-js/modules/es.symbol.iterator.js");
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
5
|
-
require("core-js/modules/es.string.iterator.js");
|
6
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
7
|
-
require("core-js/modules/es.weak-map.js");
|
8
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
9
|
-
exports.__esModule = true;
|
10
|
-
exports.default = readOnlyCommentItem;
|
11
|
-
require("core-js/modules/es.symbol.to-primitive.js");
|
12
|
-
require("core-js/modules/es.date.to-primitive.js");
|
13
|
-
require("core-js/modules/es.symbol.js");
|
14
|
-
require("core-js/modules/es.symbol.description.js");
|
15
|
-
require("core-js/modules/es.object.to-string.js");
|
16
|
-
require("core-js/modules/es.number.constructor.js");
|
17
|
-
var C = _interopRequireWildcard(require("../../../i18n/constants"));
|
18
|
-
var _utils = require("../../contextMenu/utils");
|
19
|
-
var _comments = require("../comments");
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
22
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
23
|
-
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; }
|
24
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
25
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
26
|
-
/**
|
27
|
-
* @param {Comments} plugin The Comments plugin instance.
|
28
|
-
* @returns {object}
|
29
|
-
*/
|
30
|
-
function readOnlyCommentItem(plugin) {
|
31
|
-
return {
|
32
|
-
key: 'commentsReadOnly',
|
33
|
-
name: function name() {
|
34
|
-
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);
|
35
|
-
var areReadOnly = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
|
36
|
-
return plugin.getCommentMeta(row, col, _comments.META_READONLY);
|
37
|
-
});
|
38
|
-
return areReadOnly ? (0, _utils.markLabelAsSelected)(label) : label;
|
39
|
-
},
|
40
|
-
callback: function callback() {
|
41
|
-
var range = this.getSelectedRangeLast();
|
42
|
-
range.forAll(function (row, column) {
|
43
|
-
if (row >= 0 && column >= 0) {
|
44
|
-
var currentState = !!plugin.getCommentMeta(row, column, _comments.META_READONLY);
|
45
|
-
plugin.updateCommentMeta(row, column, _defineProperty({}, _comments.META_READONLY, !currentState));
|
46
|
-
}
|
47
|
-
});
|
48
|
-
},
|
49
|
-
disabled: function disabled() {
|
50
|
-
var range = this.getSelectedRangeLast();
|
51
|
-
if (!range) {
|
52
|
-
return true;
|
53
|
-
}
|
54
|
-
if (range.highlight.isHeader()) {
|
55
|
-
return true;
|
56
|
-
}
|
57
|
-
if (!plugin.getCommentAtCell(range.highlight.row, range.highlight.col)) {
|
58
|
-
return true;
|
59
|
-
}
|
60
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
61
|
-
}
|
62
|
-
};
|
63
|
-
}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.symbol.to-primitive.js";
|
2
|
-
import "core-js/modules/es.date.to-primitive.js";
|
3
|
-
import "core-js/modules/es.symbol.js";
|
4
|
-
import "core-js/modules/es.symbol.description.js";
|
5
|
-
import "core-js/modules/es.object.to-string.js";
|
6
|
-
import "core-js/modules/es.number.constructor.js";
|
7
|
-
import "core-js/modules/es.symbol.iterator.js";
|
8
|
-
import "core-js/modules/es.array.iterator.js";
|
9
|
-
import "core-js/modules/es.string.iterator.js";
|
10
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
11
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
12
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
14
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
15
|
-
import * as C from "../../../i18n/constants.mjs";
|
16
|
-
import { checkSelectionConsistency, markLabelAsSelected } from "../../contextMenu/utils.mjs";
|
17
|
-
import { META_READONLY } from "../comments.mjs";
|
18
|
-
/**
|
19
|
-
* @param {Comments} plugin The Comments plugin instance.
|
20
|
-
* @returns {object}
|
21
|
-
*/
|
22
|
-
export default function readOnlyCommentItem(plugin) {
|
23
|
-
return {
|
24
|
-
key: 'commentsReadOnly',
|
25
|
-
name: function name() {
|
26
|
-
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);
|
27
|
-
var areReadOnly = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {
|
28
|
-
return plugin.getCommentMeta(row, col, META_READONLY);
|
29
|
-
});
|
30
|
-
return areReadOnly ? markLabelAsSelected(label) : label;
|
31
|
-
},
|
32
|
-
callback: function callback() {
|
33
|
-
var range = this.getSelectedRangeLast();
|
34
|
-
range.forAll(function (row, column) {
|
35
|
-
if (row >= 0 && column >= 0) {
|
36
|
-
var currentState = !!plugin.getCommentMeta(row, column, META_READONLY);
|
37
|
-
plugin.updateCommentMeta(row, column, _defineProperty({}, META_READONLY, !currentState));
|
38
|
-
}
|
39
|
-
});
|
40
|
-
},
|
41
|
-
disabled: function disabled() {
|
42
|
-
var range = this.getSelectedRangeLast();
|
43
|
-
if (!range) {
|
44
|
-
return true;
|
45
|
-
}
|
46
|
-
if (range.highlight.isHeader()) {
|
47
|
-
return true;
|
48
|
-
}
|
49
|
-
if (!plugin.getCommentAtCell(range.highlight.row, range.highlight.col)) {
|
50
|
-
return true;
|
51
|
-
}
|
52
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
53
|
-
}
|
54
|
-
};
|
55
|
-
}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
6
|
-
require("core-js/modules/es.string.iterator.js");
|
7
|
-
require("core-js/modules/es.weak-map.js");
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
9
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
10
|
-
require("core-js/modules/es.symbol.js");
|
11
|
-
require("core-js/modules/es.symbol.description.js");
|
12
|
-
require("core-js/modules/es.symbol.iterator.js");
|
13
|
-
exports.__esModule = true;
|
14
|
-
exports.default = removeCommentItem;
|
15
|
-
var C = _interopRequireWildcard(require("../../../i18n/constants"));
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
18
|
-
/**
|
19
|
-
* @param {Comments} plugin The Comments plugin instance.
|
20
|
-
* @returns {object}
|
21
|
-
*/
|
22
|
-
function removeCommentItem(plugin) {
|
23
|
-
return {
|
24
|
-
key: 'commentsRemove',
|
25
|
-
name: function name() {
|
26
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COMMENT);
|
27
|
-
},
|
28
|
-
callback: function callback() {
|
29
|
-
var range = this.getSelectedRangeLast();
|
30
|
-
range.forAll(function (row, column) {
|
31
|
-
if (row >= 0 && column >= 0) {
|
32
|
-
plugin.removeCommentAtCell(row, column, false);
|
33
|
-
}
|
34
|
-
});
|
35
|
-
this.render();
|
36
|
-
},
|
37
|
-
disabled: function disabled() {
|
38
|
-
var range = this.getSelectedRangeLast();
|
39
|
-
if (!range) {
|
40
|
-
return true;
|
41
|
-
}
|
42
|
-
if (range.highlight.isHeader()) {
|
43
|
-
return true;
|
44
|
-
}
|
45
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
46
|
-
}
|
47
|
-
};
|
48
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import * as C from "../../../i18n/constants.mjs";
|
2
|
-
/**
|
3
|
-
* @param {Comments} plugin The Comments plugin instance.
|
4
|
-
* @returns {object}
|
5
|
-
*/
|
6
|
-
export default function removeCommentItem(plugin) {
|
7
|
-
return {
|
8
|
-
key: 'commentsRemove',
|
9
|
-
name: function name() {
|
10
|
-
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COMMENT);
|
11
|
-
},
|
12
|
-
callback: function callback() {
|
13
|
-
var range = this.getSelectedRangeLast();
|
14
|
-
range.forAll(function (row, column) {
|
15
|
-
if (row >= 0 && column >= 0) {
|
16
|
-
plugin.removeCommentAtCell(row, column, false);
|
17
|
-
}
|
18
|
-
});
|
19
|
-
this.render();
|
20
|
-
},
|
21
|
-
disabled: function disabled() {
|
22
|
-
var range = this.getSelectedRangeLast();
|
23
|
-
if (!range) {
|
24
|
-
return true;
|
25
|
-
}
|
26
|
-
if (range.highlight.isHeader()) {
|
27
|
-
return true;
|
28
|
-
}
|
29
|
-
return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
|
30
|
-
}
|
31
|
-
};
|
32
|
-
}
|