handsontable 12.3.0 → 12.3.1-next-712715f-20230130
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +4 -4
- package/3rdparty/walkontable/src/border.mjs +4 -4
- package/3rdparty/walkontable/src/overlays.js +20 -2
- package/3rdparty/walkontable/src/overlays.mjs +20 -2
- package/3rdparty/walkontable/src/selection.js +2 -2
- package/3rdparty/walkontable/src/selection.mjs +2 -2
- package/3rdparty/walkontable/src/table.js +35 -8
- package/3rdparty/walkontable/src/table.mjs +35 -8
- package/CHANGELOG.md +123 -108
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +10 -4
- package/core.mjs +10 -4
- package/dataMap/dataMap.js +1 -1
- package/dataMap/dataMap.mjs +1 -1
- package/dataMap/metaManager/lazyFactoryMap.js +1 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +3 -3
- package/dataMap/metaManager/metaSchema.mjs +3 -3
- package/dist/handsontable.css +7 -5
- package/dist/handsontable.full.css +7 -5
- package/dist/handsontable.full.js +4399 -4182
- package/dist/handsontable.full.min.css +4 -4
- package/dist/handsontable.full.min.js +107 -107
- package/dist/handsontable.js +2491 -2286
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +1 -1
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ja-JP.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/editorManager.js +2 -2
- package/editorManager.mjs +2 -2
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +2 -2
- package/editors/textEditor/textEditor.js +2 -2
- package/editors/textEditor/textEditor.mjs +2 -2
- package/helpers/dom/element.js +1 -1
- package/helpers/dom/element.mjs +1 -1
- package/helpers/mixed.js +5 -6
- package/helpers/mixed.mjs +5 -6
- package/helpers/number.js +1 -1
- package/helpers/number.mjs +1 -1
- package/i18n/languages/ja-JP.js +1 -1
- package/i18n/languages/ja-JP.mjs +2 -2
- package/languages/all.js +1 -1
- package/languages/index.js +1 -1
- package/languages/ja-JP.js +1 -1
- package/languages/ja-JP.mjs +2 -2
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +3 -3
- package/plugins/autoColumnSize/autoColumnSize.mjs +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/maps/strictBindsMap.js +1 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +1 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +1 -1
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -1
- package/plugins/columnSorting/columnSorting.js +1 -1
- package/plugins/columnSorting/columnSorting.mjs +1 -1
- package/plugins/columnSorting/columnStatesManager.js +2 -2
- package/plugins/columnSorting/columnStatesManager.mjs +2 -2
- package/plugins/columnSorting/rootComparator.js +1 -1
- package/plugins/columnSorting/rootComparator.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.js +2 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +2 -2
- package/plugins/contextMenu/predefinedItems/removeRow.js +2 -2
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +2 -2
- package/plugins/copyPaste/copyPaste.mjs +2 -2
- package/plugins/customBorders/customBorders.js +2 -2
- package/plugins/customBorders/customBorders.mjs +2 -2
- package/plugins/exportFile/dataProvider.js +2 -2
- package/plugins/exportFile/dataProvider.mjs +2 -2
- package/plugins/filters/component/value.js +2 -2
- package/plugins/filters/component/value.mjs +2 -2
- package/plugins/filters/condition/beginsWith.js +2 -2
- package/plugins/filters/condition/beginsWith.mjs +2 -2
- package/plugins/filters/condition/between.js +2 -2
- package/plugins/filters/condition/between.mjs +2 -2
- package/plugins/filters/condition/byValue.js +2 -2
- package/plugins/filters/condition/byValue.mjs +2 -2
- package/plugins/filters/condition/contains.js +2 -2
- package/plugins/filters/condition/contains.mjs +2 -2
- package/plugins/filters/condition/date/after.js +2 -2
- package/plugins/filters/condition/date/after.mjs +2 -2
- package/plugins/filters/condition/date/before.js +2 -2
- package/plugins/filters/condition/date/before.mjs +2 -2
- package/plugins/filters/condition/endsWith.js +2 -2
- package/plugins/filters/condition/endsWith.mjs +2 -2
- package/plugins/filters/condition/equal.js +2 -2
- package/plugins/filters/condition/equal.mjs +2 -2
- package/plugins/filters/condition/greaterThan.js +2 -2
- package/plugins/filters/condition/greaterThan.mjs +2 -2
- package/plugins/filters/condition/greaterThanOrEqual.js +2 -2
- package/plugins/filters/condition/greaterThanOrEqual.mjs +2 -2
- package/plugins/filters/condition/lessThan.js +2 -2
- package/plugins/filters/condition/lessThan.mjs +2 -2
- package/plugins/filters/condition/lessThanOrEqual.js +2 -2
- package/plugins/filters/condition/lessThanOrEqual.mjs +2 -2
- package/plugins/filters/conditionCollection.js +2 -2
- package/plugins/filters/conditionCollection.mjs +2 -2
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/filters/ui/multipleSelect.js +1 -1
- package/plugins/filters/ui/multipleSelect.mjs +1 -1
- package/plugins/formulas/formulas.js +2 -2
- package/plugins/formulas/formulas.mjs +2 -2
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +2 -2
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +2 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +2 -2
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +2 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +2 -2
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +2 -2
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +2 -2
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +2 -2
- package/plugins/mergeCells/calculations/autofill.js +2 -2
- package/plugins/mergeCells/calculations/autofill.mjs +2 -2
- package/plugins/mergeCells/cellsCollection.js +1 -1
- package/plugins/mergeCells/cellsCollection.mjs +1 -1
- package/plugins/mergeCells/mergeCells.js +97 -20
- package/plugins/mergeCells/mergeCells.mjs +97 -20
- package/plugins/multiColumnSorting/rootComparator.js +1 -1
- package/plugins/multiColumnSorting/rootComparator.mjs +1 -1
- package/plugins/nestedHeaders/stateManager/headersTree.js +2 -2
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +2 -2
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +1 -1
- package/plugins/nestedRows/data/dataManager.mjs +1 -1
- package/plugins/nestedRows/nestedRows.js +4 -1
- package/plugins/nestedRows/nestedRows.mjs +4 -1
- package/plugins/nestedRows/ui/collapsing.js +1 -1
- package/plugins/nestedRows/ui/collapsing.mjs +1 -1
- package/plugins/nestedRows/utils/rowMoveController.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
- package/plugins/registry.js +2 -2
- package/plugins/registry.mjs +2 -2
- package/plugins/search/search.js +1 -1
- package/plugins/search/search.mjs +1 -1
- package/plugins/undoRedo/undoRedo.js +2 -2
- package/plugins/undoRedo/undoRedo.mjs +2 -2
- package/selection/highlight/highlight.js +1 -1
- package/selection/highlight/highlight.mjs +1 -1
- package/selection/selection.js +2 -2
- package/selection/selection.mjs +2 -2
- package/selection/utils.js +2 -2
- package/selection/utils.mjs +2 -2
- package/shortcuts/context.js +2 -2
- package/shortcuts/context.mjs +2 -2
- package/shortcuts/manager.js +9 -0
- package/shortcuts/manager.mjs +9 -0
- package/shortcuts/recorder.js +3 -0
- package/shortcuts/recorder.mjs +3 -0
- package/tableView.js +2 -2
- package/tableView.mjs +2 -2
- package/translations/indexMapper.js +1 -1
- package/translations/indexMapper.mjs +1 -1
- package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -1
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -1
- package/translations/maps/utils/indexesSequence.js +1 -1
- package/translations/maps/utils/indexesSequence.mjs +1 -1
- package/translations/maps/utils/physicallyIndexed.js +1 -1
- package/translations/maps/utils/physicallyIndexed.mjs +1 -1
- package/utils/dataStructures/priorityMap.js +2 -2
- package/utils/dataStructures/priorityMap.mjs +2 -2
- package/utils/dataStructures/tree.js +1 -1
- package/utils/dataStructures/tree.mjs +1 -1
- package/utils/dataStructures/uniqueMap.js +2 -2
- package/utils/dataStructures/uniqueMap.mjs +2 -2
- package/utils/dataStructures/uniqueSet.js +1 -1
- package/utils/dataStructures/uniqueSet.mjs +1 -1
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/utils/staticRegister.js +1 -1
- package/utils/staticRegister.mjs +1 -1
@@ -12,8 +12,8 @@ import "core-js/modules/es.regexp.exec.js";
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
13
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
16
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
import * as C from "../../../i18n/constants.mjs";
|
19
19
|
/**
|
@@ -22,8 +22,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
22
22
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
23
23
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
24
24
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
25
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
26
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
26
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
28
28
|
/**
|
29
29
|
* @param {ManualColumnFreeze} manualColumnFreezePlugin The plugin instance.
|
@@ -12,8 +12,8 @@ import "core-js/modules/es.regexp.exec.js";
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
13
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
16
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
import * as C from "../../../i18n/constants.mjs";
|
19
19
|
/**
|
@@ -23,8 +23,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
23
23
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
24
24
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25
25
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
27
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
27
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
28
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
29
29
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
30
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
@@ -2,8 +2,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
2
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
3
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
9
9
|
import "core-js/modules/es.array.index-of.js";
|
@@ -34,7 +34,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
34
34
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
35
35
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
36
36
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
37
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
37
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
38
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
39
39
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
40
40
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
@@ -6,7 +6,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
6
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
7
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
8
8
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
9
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
10
10
|
import "core-js/modules/es.array.index-of.js";
|
11
11
|
import "core-js/modules/es.array.splice.js";
|
12
12
|
import "core-js/modules/es.symbol.to-primitive.js";
|
@@ -13,9 +13,7 @@ require("core-js/modules/es.symbol.description.js");
|
|
13
13
|
require("core-js/modules/es.number.constructor.js");
|
14
14
|
require("core-js/modules/es.symbol.iterator.js");
|
15
15
|
require("core-js/modules/es.array.slice.js");
|
16
|
-
require("core-js/modules/es.function.name.js");
|
17
16
|
require("core-js/modules/es.array.from.js");
|
18
|
-
require("core-js/modules/es.regexp.exec.js");
|
19
17
|
exports.__esModule = true;
|
20
18
|
exports.PLUGIN_PRIORITY = exports.PLUGIN_KEY = exports.MergeCells = void 0;
|
21
19
|
require("core-js/modules/es.array.iterator.js");
|
@@ -25,6 +23,13 @@ require("core-js/modules/es.weak-map.js");
|
|
25
23
|
require("core-js/modules/web.dom-collections.iterator.js");
|
26
24
|
require("core-js/modules/es.array.includes.js");
|
27
25
|
require("core-js/modules/es.string.includes.js");
|
26
|
+
require("core-js/modules/es.weak-set.js");
|
27
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
28
|
+
require("core-js/modules/es.set.js");
|
29
|
+
require("core-js/modules/es.array.map.js");
|
30
|
+
require("core-js/modules/es.function.name.js");
|
31
|
+
require("core-js/modules/es.regexp.exec.js");
|
32
|
+
require("core-js/modules/es.string.replace.js");
|
28
33
|
var _base = require("../base");
|
29
34
|
var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
|
30
35
|
var _cellsCollection = _interopRequireDefault(require("./cellsCollection"));
|
@@ -37,12 +42,18 @@ var _object = require("../../helpers/object");
|
|
37
42
|
var _console = require("../../helpers/console");
|
38
43
|
var _number = require("../../helpers/number");
|
39
44
|
var _utils = require("./utils");
|
45
|
+
var _element = require("../../helpers/dom/element");
|
46
|
+
var _browser = require("../../helpers/browser");
|
40
47
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
48
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
49
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
50
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
51
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
41
52
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
42
53
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
43
54
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
44
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
45
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
55
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
56
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
46
57
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
47
58
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
48
59
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
@@ -58,6 +69,9 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
58
69
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
59
70
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
60
71
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
72
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
73
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
74
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
61
75
|
_pluginHooks.default.getSingleton().register('beforeMergeCells');
|
62
76
|
_pluginHooks.default.getSingleton().register('afterMergeCells');
|
63
77
|
_pluginHooks.default.getSingleton().register('beforeUnmergeCells');
|
@@ -106,6 +120,7 @@ var SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
106
120
|
* ```
|
107
121
|
* :::
|
108
122
|
*/
|
123
|
+
var _ifChromeForceRepaint = /*#__PURE__*/new WeakSet();
|
109
124
|
var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
110
125
|
_inherits(MergeCells, _BasePlugin);
|
111
126
|
var _super = _createSuper(MergeCells);
|
@@ -113,6 +128,7 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
113
128
|
var _this;
|
114
129
|
_classCallCheck(this, MergeCells);
|
115
130
|
_this = _super.call(this, hotInstance);
|
131
|
+
_classPrivateMethodInitSpec(_assertThisInitialized(_this), _ifChromeForceRepaint);
|
116
132
|
privatePool.set(_assertThisInitialized(_this), {
|
117
133
|
lastDesiredCoords: null
|
118
134
|
});
|
@@ -259,7 +275,8 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
259
275
|
/**
|
260
276
|
* Updates the plugin's state.
|
261
277
|
*
|
262
|
-
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
|
278
|
+
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
|
279
|
+
* following configuration options:
|
263
280
|
* - [`mergeCells`](@/api/options.md#mergecells)
|
264
281
|
*/
|
265
282
|
}, {
|
@@ -272,6 +289,16 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
272
289
|
_get(_getPrototypeOf(MergeCells.prototype), "updatePlugin", this).call(this);
|
273
290
|
}
|
274
291
|
|
292
|
+
/**
|
293
|
+
* If the browser is recognized as Chrome, force an additional repaint to prevent showing the effects of a Chrome bug.
|
294
|
+
*
|
295
|
+
* Issue described in https://github.com/handsontable/dev-handsontable/issues/521.
|
296
|
+
*
|
297
|
+
* @private
|
298
|
+
*/
|
299
|
+
}, {
|
300
|
+
key: "validateSetting",
|
301
|
+
value:
|
275
302
|
/**
|
276
303
|
* Validates a single setting object, represented by a single merged cell information object.
|
277
304
|
*
|
@@ -279,9 +306,7 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
279
306
|
* @param {object} setting An object with `row`, `col`, `rowspan` and `colspan` properties.
|
280
307
|
* @returns {boolean}
|
281
308
|
*/
|
282
|
-
|
283
|
-
key: "validateSetting",
|
284
|
-
value: function validateSetting(setting) {
|
309
|
+
function validateSetting(setting) {
|
285
310
|
var valid = true;
|
286
311
|
if (!setting) {
|
287
312
|
return false;
|
@@ -429,8 +454,10 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
429
454
|
* @private
|
430
455
|
* @param {CellRange} cellRange Cell range to merge.
|
431
456
|
* @param {boolean} [auto=false] `true` if is called automatically, e.g. At initialization.
|
432
|
-
* @param {boolean} [preventPopulation=false] `true`, if the method should not run `populateFromArray` at the end,
|
433
|
-
*
|
457
|
+
* @param {boolean} [preventPopulation=false] `true`, if the method should not run `populateFromArray` at the end,
|
458
|
+
* but rather return its arguments.
|
459
|
+
* @returns {Array|boolean} Returns an array of [row, column, dataUnderCollection] if preventPopulation is set to
|
460
|
+
* true. If the the merging process went successful, it returns `true`, otherwise - `false`.
|
434
461
|
* @fires Hooks#beforeMergeCells
|
435
462
|
* @fires Hooks#afterMergeCells
|
436
463
|
*/
|
@@ -476,6 +503,9 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
476
503
|
} else {
|
477
504
|
this.hot.populateFromArray(mergeParent.row, mergeParent.col, clearedData, void 0, void 0, this.pluginName);
|
478
505
|
}
|
506
|
+
if (!auto) {
|
507
|
+
_classPrivateMethodGet(this, _ifChromeForceRepaint, _ifChromeForceRepaint2).call(this);
|
508
|
+
}
|
479
509
|
this.hot.runHooks('afterMergeCells', cellRange, mergeParent, auto);
|
480
510
|
return populationInfo;
|
481
511
|
}
|
@@ -620,7 +650,8 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
620
650
|
}
|
621
651
|
|
622
652
|
/**
|
623
|
-
* Modifies the information on whether the current selection contains multiple cells. The `afterIsMultipleSelection`
|
653
|
+
* Modifies the information on whether the current selection contains multiple cells. The `afterIsMultipleSelection`
|
654
|
+
* hook callback.
|
624
655
|
*
|
625
656
|
* @private
|
626
657
|
* @param {boolean} isMultiple Determines whether the current selection contains multiple cells.
|
@@ -844,7 +875,8 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
844
875
|
|
845
876
|
/**
|
846
877
|
* `beforeSetRangeEnd` hook callback.
|
847
|
-
* While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the
|
878
|
+
* While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the
|
879
|
+
* merged cell.
|
848
880
|
*
|
849
881
|
* Note: Please keep in mind that callback may modify both start and end range coordinates by the reference.
|
850
882
|
*
|
@@ -1216,13 +1248,15 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1216
1248
|
}
|
1217
1249
|
|
1218
1250
|
/**
|
1219
|
-
* `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of
|
1220
|
-
* with the ENTER/SHIFT+ENTER/TAB/SHIFT+TAB keys.
|
1251
|
+
* `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of
|
1252
|
+
* the table with the ENTER/SHIFT+ENTER/TAB/SHIFT+TAB keys.
|
1221
1253
|
*
|
1222
1254
|
* @private
|
1223
1255
|
* @param {CellCoords} coords Coordinates of the to-be-selected cell.
|
1224
|
-
* @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value =
|
1225
|
-
*
|
1256
|
+
* @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value =
|
1257
|
+
* down).
|
1258
|
+
* @param {number} colTransformDir Column transformation direction (negative value = up, 0 = none, positive value =
|
1259
|
+
* down).
|
1226
1260
|
*/
|
1227
1261
|
}, {
|
1228
1262
|
key: "onAfterModifyTransformStart",
|
@@ -1254,9 +1288,11 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1254
1288
|
* @private
|
1255
1289
|
* @param {number} currentRow Visual row index of the currently processed cell.
|
1256
1290
|
* @param {number} currentColumn Visual column index of the currently cell.
|
1257
|
-
* @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow,
|
1291
|
+
* @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow,
|
1292
|
+
* endColumn]`.
|
1258
1293
|
* @param {number|undefined} layerLevel Number indicating which layer of selection is currently processed.
|
1259
|
-
* @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently
|
1294
|
+
* @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently
|
1295
|
+
* processed cell.
|
1260
1296
|
*/
|
1261
1297
|
}, {
|
1262
1298
|
key: "onAfterDrawSelection",
|
@@ -1272,7 +1308,8 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1272
1308
|
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
1273
1309
|
*
|
1274
1310
|
* @private
|
1275
|
-
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1311
|
+
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1312
|
+
* all the cells in the table.
|
1276
1313
|
*/
|
1277
1314
|
}, {
|
1278
1315
|
key: "onBeforeRemoveCellClassNames",
|
@@ -1292,4 +1329,44 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1292
1329
|
}]);
|
1293
1330
|
return MergeCells;
|
1294
1331
|
}(_base.BasePlugin);
|
1295
|
-
exports.MergeCells = MergeCells;
|
1332
|
+
exports.MergeCells = MergeCells;
|
1333
|
+
function _ifChromeForceRepaint2() {
|
1334
|
+
var _this8 = this;
|
1335
|
+
if (!(0, _browser.isChrome)()) {
|
1336
|
+
return;
|
1337
|
+
}
|
1338
|
+
var rowsToRefresh = [];
|
1339
|
+
var rowIndexesToRefresh = [];
|
1340
|
+
this.mergedCellsCollection.mergedCells.forEach(function (mergedCell) {
|
1341
|
+
var row = mergedCell.row,
|
1342
|
+
rowspan = mergedCell.rowspan;
|
1343
|
+
for (var r = row + 1; r < row + rowspan; r++) {
|
1344
|
+
rowIndexesToRefresh.push(r);
|
1345
|
+
}
|
1346
|
+
});
|
1347
|
+
|
1348
|
+
// Remove duplicates
|
1349
|
+
rowIndexesToRefresh = _toConsumableArray(new Set(rowIndexesToRefresh));
|
1350
|
+
rowIndexesToRefresh.forEach(function (rowIndex) {
|
1351
|
+
var renderableRowIndex = _this8.hot.rowIndexMapper.getRenderableFromVisualIndex(rowIndex);
|
1352
|
+
_this8.hot.view._wt.wtOverlays.getOverlays(true).map(function (overlay) {
|
1353
|
+
return (overlay === null || overlay === void 0 ? void 0 : overlay.name) === 'master' ? overlay : overlay.clone.wtTable;
|
1354
|
+
}).forEach(function (wtTableRef) {
|
1355
|
+
var rowToRefresh = wtTableRef.getRow(renderableRowIndex);
|
1356
|
+
if (rowToRefresh) {
|
1357
|
+
// Modify the TR's `background` property to later modify it asynchronously.
|
1358
|
+
// The background color is getting modified only with the alpha, so the change should not be visible (and is
|
1359
|
+
// covered by the TDs' background color).
|
1360
|
+
rowToRefresh.style.background = (0, _element.getStyle)(rowToRefresh, 'backgroundColor').replace(')', ', 0.99)');
|
1361
|
+
rowsToRefresh.push(rowToRefresh);
|
1362
|
+
}
|
1363
|
+
});
|
1364
|
+
});
|
1365
|
+
|
1366
|
+
// Asynchronously revert the TRs' `background` property to force a fresh repaint.
|
1367
|
+
this.hot._registerTimeout(function () {
|
1368
|
+
rowsToRefresh.forEach(function (rowElement) {
|
1369
|
+
rowElement.style.background = (0, _element.getStyle)(rowElement, 'backgroundColor').replace(', 0.99)', ')');
|
1370
|
+
});
|
1371
|
+
}, 1);
|
1372
|
+
}
|
@@ -1,9 +1,13 @@
|
|
1
1
|
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); }
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
2
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
3
7
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
8
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
10
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
7
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9
13
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
@@ -19,6 +23,9 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
19
23
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
20
24
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
21
25
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
26
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
27
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
28
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
22
29
|
import "core-js/modules/es.array.iterator.js";
|
23
30
|
import "core-js/modules/es.object.to-string.js";
|
24
31
|
import "core-js/modules/es.string.iterator.js";
|
@@ -26,6 +33,13 @@ import "core-js/modules/es.weak-map.js";
|
|
26
33
|
import "core-js/modules/web.dom-collections.iterator.js";
|
27
34
|
import "core-js/modules/es.array.includes.js";
|
28
35
|
import "core-js/modules/es.string.includes.js";
|
36
|
+
import "core-js/modules/es.weak-set.js";
|
37
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
38
|
+
import "core-js/modules/es.set.js";
|
39
|
+
import "core-js/modules/es.array.map.js";
|
40
|
+
import "core-js/modules/es.function.name.js";
|
41
|
+
import "core-js/modules/es.regexp.exec.js";
|
42
|
+
import "core-js/modules/es.string.replace.js";
|
29
43
|
import "core-js/modules/es.object.set-prototype-of.js";
|
30
44
|
import "core-js/modules/es.object.get-prototype-of.js";
|
31
45
|
import "core-js/modules/es.reflect.construct.js";
|
@@ -38,9 +52,7 @@ import "core-js/modules/es.symbol.description.js";
|
|
38
52
|
import "core-js/modules/es.number.constructor.js";
|
39
53
|
import "core-js/modules/es.symbol.iterator.js";
|
40
54
|
import "core-js/modules/es.array.slice.js";
|
41
|
-
import "core-js/modules/es.function.name.js";
|
42
55
|
import "core-js/modules/es.array.from.js";
|
43
|
-
import "core-js/modules/es.regexp.exec.js";
|
44
56
|
import { BasePlugin } from "../base/index.mjs";
|
45
57
|
import Hooks from "../../pluginHooks.mjs";
|
46
58
|
import MergedCellsCollection from "./cellsCollection.mjs";
|
@@ -53,6 +65,8 @@ import { isObject, clone } from "../../helpers/object.mjs";
|
|
53
65
|
import { warn } from "../../helpers/console.mjs";
|
54
66
|
import { rangeEach } from "../../helpers/number.mjs";
|
55
67
|
import { applySpanProperties } from "./utils.mjs";
|
68
|
+
import { getStyle } from "../../helpers/dom/element.mjs";
|
69
|
+
import { isChrome } from "../../helpers/browser.mjs";
|
56
70
|
Hooks.getSingleton().register('beforeMergeCells');
|
57
71
|
Hooks.getSingleton().register('afterMergeCells');
|
58
72
|
Hooks.getSingleton().register('beforeUnmergeCells');
|
@@ -99,6 +113,7 @@ var SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
99
113
|
* ```
|
100
114
|
* :::
|
101
115
|
*/
|
116
|
+
var _ifChromeForceRepaint = /*#__PURE__*/new WeakSet();
|
102
117
|
export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
103
118
|
_inherits(MergeCells, _BasePlugin);
|
104
119
|
var _super = _createSuper(MergeCells);
|
@@ -106,6 +121,7 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
106
121
|
var _this;
|
107
122
|
_classCallCheck(this, MergeCells);
|
108
123
|
_this = _super.call(this, hotInstance);
|
124
|
+
_classPrivateMethodInitSpec(_assertThisInitialized(_this), _ifChromeForceRepaint);
|
109
125
|
privatePool.set(_assertThisInitialized(_this), {
|
110
126
|
lastDesiredCoords: null
|
111
127
|
});
|
@@ -252,7 +268,8 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
252
268
|
/**
|
253
269
|
* Updates the plugin's state.
|
254
270
|
*
|
255
|
-
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
|
271
|
+
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
|
272
|
+
* following configuration options:
|
256
273
|
* - [`mergeCells`](@/api/options.md#mergecells)
|
257
274
|
*/
|
258
275
|
}, {
|
@@ -265,6 +282,16 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
265
282
|
_get(_getPrototypeOf(MergeCells.prototype), "updatePlugin", this).call(this);
|
266
283
|
}
|
267
284
|
|
285
|
+
/**
|
286
|
+
* If the browser is recognized as Chrome, force an additional repaint to prevent showing the effects of a Chrome bug.
|
287
|
+
*
|
288
|
+
* Issue described in https://github.com/handsontable/dev-handsontable/issues/521.
|
289
|
+
*
|
290
|
+
* @private
|
291
|
+
*/
|
292
|
+
}, {
|
293
|
+
key: "validateSetting",
|
294
|
+
value:
|
268
295
|
/**
|
269
296
|
* Validates a single setting object, represented by a single merged cell information object.
|
270
297
|
*
|
@@ -272,9 +299,7 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
272
299
|
* @param {object} setting An object with `row`, `col`, `rowspan` and `colspan` properties.
|
273
300
|
* @returns {boolean}
|
274
301
|
*/
|
275
|
-
|
276
|
-
key: "validateSetting",
|
277
|
-
value: function validateSetting(setting) {
|
302
|
+
function validateSetting(setting) {
|
278
303
|
var valid = true;
|
279
304
|
if (!setting) {
|
280
305
|
return false;
|
@@ -422,8 +447,10 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
422
447
|
* @private
|
423
448
|
* @param {CellRange} cellRange Cell range to merge.
|
424
449
|
* @param {boolean} [auto=false] `true` if is called automatically, e.g. At initialization.
|
425
|
-
* @param {boolean} [preventPopulation=false] `true`, if the method should not run `populateFromArray` at the end,
|
426
|
-
*
|
450
|
+
* @param {boolean} [preventPopulation=false] `true`, if the method should not run `populateFromArray` at the end,
|
451
|
+
* but rather return its arguments.
|
452
|
+
* @returns {Array|boolean} Returns an array of [row, column, dataUnderCollection] if preventPopulation is set to
|
453
|
+
* true. If the the merging process went successful, it returns `true`, otherwise - `false`.
|
427
454
|
* @fires Hooks#beforeMergeCells
|
428
455
|
* @fires Hooks#afterMergeCells
|
429
456
|
*/
|
@@ -469,6 +496,9 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
469
496
|
} else {
|
470
497
|
this.hot.populateFromArray(mergeParent.row, mergeParent.col, clearedData, void 0, void 0, this.pluginName);
|
471
498
|
}
|
499
|
+
if (!auto) {
|
500
|
+
_classPrivateMethodGet(this, _ifChromeForceRepaint, _ifChromeForceRepaint2).call(this);
|
501
|
+
}
|
472
502
|
this.hot.runHooks('afterMergeCells', cellRange, mergeParent, auto);
|
473
503
|
return populationInfo;
|
474
504
|
}
|
@@ -613,7 +643,8 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
613
643
|
}
|
614
644
|
|
615
645
|
/**
|
616
|
-
* Modifies the information on whether the current selection contains multiple cells. The `afterIsMultipleSelection`
|
646
|
+
* Modifies the information on whether the current selection contains multiple cells. The `afterIsMultipleSelection`
|
647
|
+
* hook callback.
|
617
648
|
*
|
618
649
|
* @private
|
619
650
|
* @param {boolean} isMultiple Determines whether the current selection contains multiple cells.
|
@@ -837,7 +868,8 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
837
868
|
|
838
869
|
/**
|
839
870
|
* `beforeSetRangeEnd` hook callback.
|
840
|
-
* While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the
|
871
|
+
* While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the
|
872
|
+
* merged cell.
|
841
873
|
*
|
842
874
|
* Note: Please keep in mind that callback may modify both start and end range coordinates by the reference.
|
843
875
|
*
|
@@ -1209,13 +1241,15 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1209
1241
|
}
|
1210
1242
|
|
1211
1243
|
/**
|
1212
|
-
* `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of
|
1213
|
-
* with the ENTER/SHIFT+ENTER/TAB/SHIFT+TAB keys.
|
1244
|
+
* `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of
|
1245
|
+
* the table with the ENTER/SHIFT+ENTER/TAB/SHIFT+TAB keys.
|
1214
1246
|
*
|
1215
1247
|
* @private
|
1216
1248
|
* @param {CellCoords} coords Coordinates of the to-be-selected cell.
|
1217
|
-
* @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value =
|
1218
|
-
*
|
1249
|
+
* @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value =
|
1250
|
+
* down).
|
1251
|
+
* @param {number} colTransformDir Column transformation direction (negative value = up, 0 = none, positive value =
|
1252
|
+
* down).
|
1219
1253
|
*/
|
1220
1254
|
}, {
|
1221
1255
|
key: "onAfterModifyTransformStart",
|
@@ -1247,9 +1281,11 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1247
1281
|
* @private
|
1248
1282
|
* @param {number} currentRow Visual row index of the currently processed cell.
|
1249
1283
|
* @param {number} currentColumn Visual column index of the currently cell.
|
1250
|
-
* @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow,
|
1284
|
+
* @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow,
|
1285
|
+
* endColumn]`.
|
1251
1286
|
* @param {number|undefined} layerLevel Number indicating which layer of selection is currently processed.
|
1252
|
-
* @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently
|
1287
|
+
* @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently
|
1288
|
+
* processed cell.
|
1253
1289
|
*/
|
1254
1290
|
}, {
|
1255
1291
|
key: "onAfterDrawSelection",
|
@@ -1265,7 +1301,8 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1265
1301
|
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
1266
1302
|
*
|
1267
1303
|
* @private
|
1268
|
-
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1304
|
+
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1305
|
+
* all the cells in the table.
|
1269
1306
|
*/
|
1270
1307
|
}, {
|
1271
1308
|
key: "onBeforeRemoveCellClassNames",
|
@@ -1284,4 +1321,44 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1284
1321
|
}
|
1285
1322
|
}]);
|
1286
1323
|
return MergeCells;
|
1287
|
-
}(BasePlugin);
|
1324
|
+
}(BasePlugin);
|
1325
|
+
function _ifChromeForceRepaint2() {
|
1326
|
+
var _this8 = this;
|
1327
|
+
if (!isChrome()) {
|
1328
|
+
return;
|
1329
|
+
}
|
1330
|
+
var rowsToRefresh = [];
|
1331
|
+
var rowIndexesToRefresh = [];
|
1332
|
+
this.mergedCellsCollection.mergedCells.forEach(function (mergedCell) {
|
1333
|
+
var row = mergedCell.row,
|
1334
|
+
rowspan = mergedCell.rowspan;
|
1335
|
+
for (var r = row + 1; r < row + rowspan; r++) {
|
1336
|
+
rowIndexesToRefresh.push(r);
|
1337
|
+
}
|
1338
|
+
});
|
1339
|
+
|
1340
|
+
// Remove duplicates
|
1341
|
+
rowIndexesToRefresh = _toConsumableArray(new Set(rowIndexesToRefresh));
|
1342
|
+
rowIndexesToRefresh.forEach(function (rowIndex) {
|
1343
|
+
var renderableRowIndex = _this8.hot.rowIndexMapper.getRenderableFromVisualIndex(rowIndex);
|
1344
|
+
_this8.hot.view._wt.wtOverlays.getOverlays(true).map(function (overlay) {
|
1345
|
+
return (overlay === null || overlay === void 0 ? void 0 : overlay.name) === 'master' ? overlay : overlay.clone.wtTable;
|
1346
|
+
}).forEach(function (wtTableRef) {
|
1347
|
+
var rowToRefresh = wtTableRef.getRow(renderableRowIndex);
|
1348
|
+
if (rowToRefresh) {
|
1349
|
+
// Modify the TR's `background` property to later modify it asynchronously.
|
1350
|
+
// The background color is getting modified only with the alpha, so the change should not be visible (and is
|
1351
|
+
// covered by the TDs' background color).
|
1352
|
+
rowToRefresh.style.background = getStyle(rowToRefresh, 'backgroundColor').replace(')', ', 0.99)');
|
1353
|
+
rowsToRefresh.push(rowToRefresh);
|
1354
|
+
}
|
1355
|
+
});
|
1356
|
+
});
|
1357
|
+
|
1358
|
+
// Asynchronously revert the TRs' `background` property to force a fresh repaint.
|
1359
|
+
this.hot._registerTimeout(function () {
|
1360
|
+
rowsToRefresh.forEach(function (rowElement) {
|
1361
|
+
rowElement.style.background = getStyle(rowElement, 'backgroundColor').replace(', 0.99)', ')');
|
1362
|
+
});
|
1363
|
+
}, 1);
|
1364
|
+
}
|
@@ -17,7 +17,7 @@ var _sortService = require("../columnSorting/sortService");
|
|
17
17
|
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
18
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19
19
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
21
21
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
23
23
|
/**
|
@@ -12,7 +12,7 @@ import "core-js/modules/es.regexp.exec.js";
|
|
12
12
|
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
13
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
16
16
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
import { getCompareFunctionFactory, DO_NOT_SWAP } from "../columnSorting/sortService/index.mjs";
|
@@ -33,8 +33,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
33
33
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
34
34
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
35
35
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
36
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
37
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
37
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
39
39
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
40
40
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|