handsontable 12.3.3 → 12.4.0-next-acb5d99-20230512
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/cell/coords.js +13 -16
- package/3rdparty/walkontable/src/cell/coords.mjs +13 -16
- package/3rdparty/walkontable/src/cell/range.js +25 -29
- package/3rdparty/walkontable/src/cell/range.mjs +24 -28
- package/3rdparty/walkontable/src/core/_base.js +16 -20
- package/3rdparty/walkontable/src/core/_base.mjs +16 -20
- package/3rdparty/walkontable/src/event.js +4 -0
- package/3rdparty/walkontable/src/event.mjs +4 -0
- package/3rdparty/walkontable/src/overlay/_base.js +6 -7
- package/3rdparty/walkontable/src/overlay/_base.mjs +6 -7
- package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
- package/3rdparty/walkontable/src/overlay/top.js +6 -7
- package/3rdparty/walkontable/src/overlay/top.mjs +6 -7
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
- package/3rdparty/walkontable/src/overlays.js +55 -64
- package/3rdparty/walkontable/src/overlays.mjs +55 -64
- package/3rdparty/walkontable/src/scroll.js +20 -23
- package/3rdparty/walkontable/src/scroll.mjs +20 -23
- package/3rdparty/walkontable/src/settings.js +13 -15
- package/3rdparty/walkontable/src/settings.mjs +13 -15
- package/3rdparty/walkontable/src/table.js +22 -26
- package/3rdparty/walkontable/src/table.mjs +22 -26
- package/CHANGELOG.md +14 -0
- package/base.js +2 -4
- package/base.mjs +2 -2
- package/core.js +23 -6
- package/core.mjs +23 -6
- package/dataMap/dataSource.js +5 -5
- package/dataMap/dataSource.mjs +5 -5
- package/dataMap/metaManager/metaSchema.js +9 -7
- package/dataMap/metaManager/metaSchema.mjs +9 -7
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +7364 -5992
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +256 -234
- package/dist/handsontable.js +4326 -3275
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +11 -3
- package/dist/languages/all.js +133 -0
- package/dist/languages/ar-AR.js +7 -0
- package/dist/languages/cs-CZ.js +7 -0
- package/dist/languages/de-CH.js +7 -0
- package/dist/languages/de-DE.js +7 -0
- package/dist/languages/en-US.js +7 -0
- package/dist/languages/es-MX.js +7 -0
- package/dist/languages/fr-FR.js +7 -0
- package/dist/languages/it-IT.js +7 -0
- package/dist/languages/ja-JP.js +7 -0
- package/dist/languages/ko-KR.js +7 -0
- package/dist/languages/lv-LV.js +7 -0
- package/dist/languages/nb-NO.js +7 -0
- package/dist/languages/nl-NL.js +7 -0
- package/dist/languages/pl-PL.js +7 -0
- package/dist/languages/pt-BR.js +7 -0
- package/dist/languages/ru-RU.js +7 -0
- package/dist/languages/sr-SP.js +7 -0
- package/dist/languages/zh-CN.js +7 -0
- package/dist/languages/zh-TW.js +7 -0
- package/editors/autocompleteEditor/autocompleteEditor.js +8 -9
- package/editors/autocompleteEditor/autocompleteEditor.mjs +8 -9
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/i18n/languages/ar-AR.js +7 -1
- package/i18n/languages/cs-CZ.js +7 -1
- package/i18n/languages/de-CH.js +7 -1
- package/i18n/languages/de-DE.js +7 -1
- package/i18n/languages/en-US.js +7 -1
- package/i18n/languages/es-MX.js +7 -1
- package/i18n/languages/fr-FR.js +7 -1
- package/i18n/languages/it-IT.js +7 -1
- package/i18n/languages/ja-JP.js +7 -1
- package/i18n/languages/ko-KR.js +7 -1
- package/i18n/languages/lv-LV.js +7 -1
- package/i18n/languages/nb-NO.js +7 -1
- package/i18n/languages/nl-NL.js +7 -1
- package/i18n/languages/pl-PL.js +7 -1
- package/i18n/languages/pt-BR.js +7 -1
- package/i18n/languages/ru-RU.js +7 -1
- package/i18n/languages/sr-SP.js +7 -1
- package/i18n/languages/zh-CN.js +7 -1
- package/i18n/languages/zh-TW.js +7 -1
- package/languages/all.js +133 -0
- package/languages/ar-AR.js +7 -0
- package/languages/cs-CZ.js +7 -0
- package/languages/de-CH.js +7 -0
- package/languages/de-DE.js +7 -0
- package/languages/en-US.js +7 -0
- package/languages/es-MX.js +7 -0
- package/languages/fr-FR.js +7 -0
- package/languages/index.js +133 -0
- package/languages/it-IT.js +7 -0
- package/languages/ja-JP.js +7 -0
- package/languages/ko-KR.js +7 -0
- package/languages/lv-LV.js +7 -0
- package/languages/nb-NO.js +7 -0
- package/languages/nl-NL.js +7 -0
- package/languages/pl-PL.js +7 -0
- package/languages/pt-BR.js +7 -0
- package/languages/ru-RU.js +7 -0
- package/languages/sr-SP.js +7 -0
- package/languages/zh-CN.js +7 -0
- package/languages/zh-TW.js +7 -0
- package/package.json +3 -2
- package/pluginHooks.js +16 -6
- package/pluginHooks.mjs +15 -3
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/base/base.js +9 -10
- package/plugins/base/base.mjs +9 -10
- package/plugins/collapsibleColumns/collapsibleColumns.js +24 -7
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -7
- package/plugins/copyPaste/copyPaste.js +92 -16
- package/plugins/copyPaste/copyPaste.mjs +92 -16
- package/plugins/copyPaste/copyableRanges.js +39 -39
- package/plugins/copyPaste/copyableRanges.mjs +32 -32
- package/plugins/customBorders/customBorders.d.ts +2 -0
- package/plugins/customBorders/customBorders.js +6 -7
- package/plugins/customBorders/customBorders.mjs +6 -7
- package/plugins/filters/filters.js +5 -0
- package/plugins/filters/filters.mjs +5 -0
- package/plugins/formulas/engine/register.js +9 -0
- package/plugins/formulas/engine/register.mjs +13 -4
- package/plugins/formulas/engine/settings.js +18 -3
- package/plugins/formulas/engine/settings.mjs +16 -3
- package/plugins/formulas/formulas.js +308 -162
- package/plugins/formulas/formulas.mjs +308 -163
- package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
- package/plugins/formulas/indexSyncer/index.js +225 -0
- package/plugins/formulas/indexSyncer/index.mjs +219 -0
- package/plugins/formulas/utils.js +81 -0
- package/plugins/formulas/utils.mjs +74 -0
- package/plugins/hiddenColumns/hiddenColumns.js +12 -7
- package/plugins/hiddenColumns/hiddenColumns.mjs +12 -7
- package/plugins/hiddenRows/hiddenRows.js +12 -7
- package/plugins/hiddenRows/hiddenRows.mjs +12 -7
- package/plugins/manualRowMove/manualRowMove.js +26 -11
- package/plugins/manualRowMove/manualRowMove.mjs +27 -12
- package/plugins/nestedHeaders/nestedHeaders.js +26 -7
- package/plugins/nestedHeaders/nestedHeaders.mjs +26 -7
- package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
- package/plugins/nestedHeaders/stateManager/index.js +21 -3
- package/plugins/nestedHeaders/stateManager/index.mjs +18 -0
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -0
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -0
- package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
- package/plugins/registry.js +3 -1
- package/plugins/undoRedo/undoRedo.js +0 -1
- package/plugins/undoRedo/undoRedo.mjs +0 -1
- package/selection/highlight/visualSelection.js +5 -6
- package/selection/highlight/visualSelection.mjs +5 -6
- package/tableView.js +62 -72
- package/tableView.mjs +62 -72
- package/translations/changesObservable/observable.js +41 -46
- package/translations/changesObservable/observable.mjs +36 -41
- package/translations/changesObservable/observer.js +8 -1
- package/translations/changesObservable/observer.mjs +7 -0
- package/translations/indexMapper.js +21 -0
- package/translations/indexMapper.mjs +21 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.js +6 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +6 -0
- package/utils/dataStructures/tree.js +15 -18
- package/utils/dataStructures/tree.mjs +15 -18
- package/utils/parseTable.js +5 -1
- package/utils/parseTable.mjs +5 -1
@@ -119,17 +119,43 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
119
119
|
args[_key] = arguments[_key];
|
120
120
|
}
|
121
121
|
_this = _super.call.apply(_super, [this].concat(args));
|
122
|
+
/**
|
123
|
+
* The state manager for the nested headers.
|
124
|
+
*
|
125
|
+
* @private
|
126
|
+
* @type {StateManager}
|
127
|
+
*/
|
122
128
|
_classPrivateFieldInitSpec(_assertThisInitialized(_this), _stateManager, {
|
123
129
|
writable: true,
|
124
130
|
value: new _stateManager2.default()
|
125
131
|
});
|
132
|
+
/**
|
133
|
+
* The instance of the ChangesObservable class that allows track the changes that happens in the
|
134
|
+
* column indexes.
|
135
|
+
*
|
136
|
+
* @private
|
137
|
+
* @type {ChangesObservable}
|
138
|
+
*/
|
126
139
|
_classPrivateFieldInitSpec(_assertThisInitialized(_this), _hidingIndexMapObserver, {
|
127
140
|
writable: true,
|
128
141
|
value: null
|
129
142
|
});
|
143
|
+
/**
|
144
|
+
* Custom helper for getting widths of the nested headers.
|
145
|
+
*
|
146
|
+
* @private
|
147
|
+
* @type {GhostTable}
|
148
|
+
*/
|
149
|
+
// @TODO This should be changed after refactor handsontable/utils/ghostTable.
|
130
150
|
_defineProperty(_assertThisInitialized(_this), "ghostTable", new _ghostTable.default(_this.hot, function (row, column) {
|
131
151
|
return _this.getHeaderSettings(row, column);
|
132
152
|
}));
|
153
|
+
/**
|
154
|
+
* The flag which determines that the nested header settings contains overlapping headers
|
155
|
+
* configuration.
|
156
|
+
*
|
157
|
+
* @type {boolean}
|
158
|
+
*/
|
133
159
|
_defineProperty(_assertThisInitialized(_this), "detectedOverlappedHeaders", false);
|
134
160
|
return _this;
|
135
161
|
}
|
@@ -761,13 +787,6 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
761
787
|
get: function get() {
|
762
788
|
return PLUGIN_PRIORITY;
|
763
789
|
}
|
764
|
-
|
765
|
-
/**
|
766
|
-
* The state manager for the nested headers.
|
767
|
-
*
|
768
|
-
* @private
|
769
|
-
* @type {StateManager}
|
770
|
-
*/
|
771
790
|
}]);
|
772
791
|
return NestedHeaders;
|
773
792
|
}(_base.BasePlugin);
|
@@ -112,17 +112,43 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
112
112
|
args[_key] = arguments[_key];
|
113
113
|
}
|
114
114
|
_this = _super.call.apply(_super, [this].concat(args));
|
115
|
+
/**
|
116
|
+
* The state manager for the nested headers.
|
117
|
+
*
|
118
|
+
* @private
|
119
|
+
* @type {StateManager}
|
120
|
+
*/
|
115
121
|
_classPrivateFieldInitSpec(_assertThisInitialized(_this), _stateManager, {
|
116
122
|
writable: true,
|
117
123
|
value: new StateManager()
|
118
124
|
});
|
125
|
+
/**
|
126
|
+
* The instance of the ChangesObservable class that allows track the changes that happens in the
|
127
|
+
* column indexes.
|
128
|
+
*
|
129
|
+
* @private
|
130
|
+
* @type {ChangesObservable}
|
131
|
+
*/
|
119
132
|
_classPrivateFieldInitSpec(_assertThisInitialized(_this), _hidingIndexMapObserver, {
|
120
133
|
writable: true,
|
121
134
|
value: null
|
122
135
|
});
|
136
|
+
/**
|
137
|
+
* Custom helper for getting widths of the nested headers.
|
138
|
+
*
|
139
|
+
* @private
|
140
|
+
* @type {GhostTable}
|
141
|
+
*/
|
142
|
+
// @TODO This should be changed after refactor handsontable/utils/ghostTable.
|
123
143
|
_defineProperty(_assertThisInitialized(_this), "ghostTable", new GhostTable(_this.hot, function (row, column) {
|
124
144
|
return _this.getHeaderSettings(row, column);
|
125
145
|
}));
|
146
|
+
/**
|
147
|
+
* The flag which determines that the nested header settings contains overlapping headers
|
148
|
+
* configuration.
|
149
|
+
*
|
150
|
+
* @type {boolean}
|
151
|
+
*/
|
126
152
|
_defineProperty(_assertThisInitialized(_this), "detectedOverlappedHeaders", false);
|
127
153
|
return _this;
|
128
154
|
}
|
@@ -754,13 +780,6 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
754
780
|
get: function get() {
|
755
781
|
return PLUGIN_PRIORITY;
|
756
782
|
}
|
757
|
-
|
758
|
-
/**
|
759
|
-
* The state manager for the nested headers.
|
760
|
-
*
|
761
|
-
* @private
|
762
|
-
* @type {StateManager}
|
763
|
-
*/
|
764
783
|
}]);
|
765
784
|
return NestedHeaders;
|
766
785
|
}(BasePlugin);
|
@@ -48,9 +48,6 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
|
|
48
48
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
49
49
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
50
50
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
51
|
-
var _rootNodes = /*#__PURE__*/new WeakMap();
|
52
|
-
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
53
|
-
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
54
51
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
55
52
|
/**
|
56
53
|
* @private
|
@@ -87,40 +84,40 @@ var _sourceSettings = /*#__PURE__*/new WeakMap();
|
|
87
84
|
*
|
88
85
|
*/
|
89
86
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
87
|
+
var _rootNodes = /*#__PURE__*/new WeakMap();
|
88
|
+
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
89
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
90
90
|
var HeadersTree = /*#__PURE__*/function () {
|
91
|
-
/**
|
92
|
-
* The collection of nested headers settings structured into trees. The root trees are stored
|
93
|
-
* under the visual column index.
|
94
|
-
*
|
95
|
-
* @private
|
96
|
-
* @type {Map<number, TreeNode>}
|
97
|
-
*/
|
98
|
-
|
99
|
-
/**
|
100
|
-
* A map that translates the visual column indexes that intersect the range
|
101
|
-
* defined by the header colspan width to the root index.
|
102
|
-
*
|
103
|
-
* @private
|
104
|
-
* @type {Map<number, number>}
|
105
|
-
*/
|
106
|
-
|
107
|
-
/**
|
108
|
-
* The instance of the SourceSettings class.
|
109
|
-
*
|
110
|
-
* @private
|
111
|
-
* @type {SourceSettings}
|
112
|
-
*/
|
113
|
-
|
114
91
|
function HeadersTree(sourceSettings) {
|
115
92
|
_classCallCheck(this, HeadersTree);
|
93
|
+
/**
|
94
|
+
* The collection of nested headers settings structured into trees. The root trees are stored
|
95
|
+
* under the visual column index.
|
96
|
+
*
|
97
|
+
* @private
|
98
|
+
* @type {Map<number, TreeNode>}
|
99
|
+
*/
|
116
100
|
_classPrivateFieldInitSpec(this, _rootNodes, {
|
117
101
|
writable: true,
|
118
102
|
value: new Map()
|
119
103
|
});
|
104
|
+
/**
|
105
|
+
* A map that translates the visual column indexes that intersect the range
|
106
|
+
* defined by the header colspan width to the root index.
|
107
|
+
*
|
108
|
+
* @private
|
109
|
+
* @type {Map<number, number>}
|
110
|
+
*/
|
120
111
|
_classPrivateFieldInitSpec(this, _rootsIndex, {
|
121
112
|
writable: true,
|
122
113
|
value: new Map()
|
123
114
|
});
|
115
|
+
/**
|
116
|
+
* The instance of the SourceSettings class.
|
117
|
+
*
|
118
|
+
* @private
|
119
|
+
* @type {SourceSettings}
|
120
|
+
*/
|
124
121
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
125
122
|
writable: true,
|
126
123
|
value: null
|
@@ -83,39 +83,36 @@ var _rootNodes = /*#__PURE__*/new WeakMap();
|
|
83
83
|
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
84
84
|
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
85
85
|
var HeadersTree = /*#__PURE__*/function () {
|
86
|
-
/**
|
87
|
-
* The collection of nested headers settings structured into trees. The root trees are stored
|
88
|
-
* under the visual column index.
|
89
|
-
*
|
90
|
-
* @private
|
91
|
-
* @type {Map<number, TreeNode>}
|
92
|
-
*/
|
93
|
-
|
94
|
-
/**
|
95
|
-
* A map that translates the visual column indexes that intersect the range
|
96
|
-
* defined by the header colspan width to the root index.
|
97
|
-
*
|
98
|
-
* @private
|
99
|
-
* @type {Map<number, number>}
|
100
|
-
*/
|
101
|
-
|
102
|
-
/**
|
103
|
-
* The instance of the SourceSettings class.
|
104
|
-
*
|
105
|
-
* @private
|
106
|
-
* @type {SourceSettings}
|
107
|
-
*/
|
108
|
-
|
109
86
|
function HeadersTree(sourceSettings) {
|
110
87
|
_classCallCheck(this, HeadersTree);
|
88
|
+
/**
|
89
|
+
* The collection of nested headers settings structured into trees. The root trees are stored
|
90
|
+
* under the visual column index.
|
91
|
+
*
|
92
|
+
* @private
|
93
|
+
* @type {Map<number, TreeNode>}
|
94
|
+
*/
|
111
95
|
_classPrivateFieldInitSpec(this, _rootNodes, {
|
112
96
|
writable: true,
|
113
97
|
value: new Map()
|
114
98
|
});
|
99
|
+
/**
|
100
|
+
* A map that translates the visual column indexes that intersect the range
|
101
|
+
* defined by the header colspan width to the root index.
|
102
|
+
*
|
103
|
+
* @private
|
104
|
+
* @type {Map<number, number>}
|
105
|
+
*/
|
115
106
|
_classPrivateFieldInitSpec(this, _rootsIndex, {
|
116
107
|
writable: true,
|
117
108
|
value: new Map()
|
118
109
|
});
|
110
|
+
/**
|
111
|
+
* The instance of the SourceSettings class.
|
112
|
+
*
|
113
|
+
* @private
|
114
|
+
* @type {SourceSettings}
|
115
|
+
*/
|
119
116
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
120
117
|
writable: true,
|
121
118
|
value: null
|
@@ -45,9 +45,6 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
|
|
45
45
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
46
46
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
47
47
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
48
|
-
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
49
|
-
var _headersTree = /*#__PURE__*/new WeakMap();
|
50
|
-
var _stateMatrix = /*#__PURE__*/new WeakMap();
|
51
48
|
/**
|
52
49
|
* The state manager is a source of truth for nested headers configuration.
|
53
50
|
* The state generation process is divided into three stages.
|
@@ -76,17 +73,38 @@ var _stateMatrix = /*#__PURE__*/new WeakMap();
|
|
76
73
|
*
|
77
74
|
* @class StateManager
|
78
75
|
*/
|
76
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
77
|
+
var _headersTree = /*#__PURE__*/new WeakMap();
|
78
|
+
var _stateMatrix = /*#__PURE__*/new WeakMap();
|
79
79
|
var StateManager = /*#__PURE__*/function () {
|
80
80
|
function StateManager() {
|
81
81
|
_classCallCheck(this, StateManager);
|
82
|
+
/**
|
83
|
+
* The instance of the source settings class.
|
84
|
+
*
|
85
|
+
* @private
|
86
|
+
* @type {SourceSettings}
|
87
|
+
*/
|
82
88
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
83
89
|
writable: true,
|
84
90
|
value: new _sourceSettings2.default()
|
85
91
|
});
|
92
|
+
/**
|
93
|
+
* The instance of the headers tree. The tree is generated after setting new configuration data.
|
94
|
+
*
|
95
|
+
* @private
|
96
|
+
* @type {HeadersTree}
|
97
|
+
*/
|
86
98
|
_classPrivateFieldInitSpec(this, _headersTree, {
|
87
99
|
writable: true,
|
88
100
|
value: new _headersTree2.default(_classPrivateFieldGet(this, _sourceSettings))
|
89
101
|
});
|
102
|
+
/**
|
103
|
+
* Cached matrix which is generated from the tree structure.
|
104
|
+
*
|
105
|
+
* @private
|
106
|
+
* @type {Array[]}
|
107
|
+
*/
|
90
108
|
_classPrivateFieldInitSpec(this, _stateMatrix, {
|
91
109
|
writable: true,
|
92
110
|
value: [[]]
|
@@ -74,14 +74,32 @@ var _stateMatrix = /*#__PURE__*/new WeakMap();
|
|
74
74
|
var StateManager = /*#__PURE__*/function () {
|
75
75
|
function StateManager() {
|
76
76
|
_classCallCheck(this, StateManager);
|
77
|
+
/**
|
78
|
+
* The instance of the source settings class.
|
79
|
+
*
|
80
|
+
* @private
|
81
|
+
* @type {SourceSettings}
|
82
|
+
*/
|
77
83
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
78
84
|
writable: true,
|
79
85
|
value: new SourceSettings()
|
80
86
|
});
|
87
|
+
/**
|
88
|
+
* The instance of the headers tree. The tree is generated after setting new configuration data.
|
89
|
+
*
|
90
|
+
* @private
|
91
|
+
* @type {HeadersTree}
|
92
|
+
*/
|
81
93
|
_classPrivateFieldInitSpec(this, _headersTree, {
|
82
94
|
writable: true,
|
83
95
|
value: new HeadersTree(_classPrivateFieldGet(this, _sourceSettings))
|
84
96
|
});
|
97
|
+
/**
|
98
|
+
* Cached matrix which is generated from the tree structure.
|
99
|
+
*
|
100
|
+
* @private
|
101
|
+
* @type {Array[]}
|
102
|
+
*/
|
85
103
|
_classPrivateFieldInitSpec(this, _stateMatrix, {
|
86
104
|
writable: true,
|
87
105
|
value: [[]]
|
@@ -10,6 +10,7 @@ require("core-js/modules/es.string.includes.js");
|
|
10
10
|
var _array = require("../../../helpers/array");
|
11
11
|
var _utils = require("./utils");
|
12
12
|
var _excluded = ["crossHiddenColumns"];
|
13
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
13
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
14
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
15
16
|
/**
|
@@ -24,7 +24,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
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
25
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
26
26
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
27
|
-
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 _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; } /* eslint-disable jsdoc/require-description-complete-sentence */
|
28
28
|
/**
|
29
29
|
* A function that normalizes user-defined settings into one predictable
|
30
30
|
* structure. Currently, the developer can declare nested headers by passing
|
@@ -63,14 +63,33 @@ var _columnsLimit = /*#__PURE__*/new WeakMap();
|
|
63
63
|
var SourceSettings = /*#__PURE__*/function () {
|
64
64
|
function SourceSettings() {
|
65
65
|
_classCallCheck(this, SourceSettings);
|
66
|
+
/**
|
67
|
+
* The normalized source data (normalized user-defined settings for nested headers).
|
68
|
+
*
|
69
|
+
* @private
|
70
|
+
* @type {Array[]}
|
71
|
+
*/
|
66
72
|
_classPrivateFieldInitSpec(this, _data, {
|
67
73
|
writable: true,
|
68
74
|
value: []
|
69
75
|
});
|
76
|
+
/**
|
77
|
+
* The total length of the nested header layers.
|
78
|
+
*
|
79
|
+
* @private
|
80
|
+
* @type {number}
|
81
|
+
*/
|
70
82
|
_classPrivateFieldInitSpec(this, _dataLength, {
|
71
83
|
writable: true,
|
72
84
|
value: 0
|
73
85
|
});
|
86
|
+
/**
|
87
|
+
* Columns count limit value trims source settings to that value. If columns
|
88
|
+
* count limit intersects nested header, the header's colspan value is reduced
|
89
|
+
* to keep the whole structure stable (trimmed precisely where the limit is set).
|
90
|
+
*
|
91
|
+
* @type {number}
|
92
|
+
*/
|
74
93
|
_classPrivateFieldInitSpec(this, _columnsLimit, {
|
75
94
|
writable: true,
|
76
95
|
value: Infinity
|
@@ -58,14 +58,33 @@ var _columnsLimit = /*#__PURE__*/new WeakMap();
|
|
58
58
|
var SourceSettings = /*#__PURE__*/function () {
|
59
59
|
function SourceSettings() {
|
60
60
|
_classCallCheck(this, SourceSettings);
|
61
|
+
/**
|
62
|
+
* The normalized source data (normalized user-defined settings for nested headers).
|
63
|
+
*
|
64
|
+
* @private
|
65
|
+
* @type {Array[]}
|
66
|
+
*/
|
61
67
|
_classPrivateFieldInitSpec(this, _data, {
|
62
68
|
writable: true,
|
63
69
|
value: []
|
64
70
|
});
|
71
|
+
/**
|
72
|
+
* The total length of the nested header layers.
|
73
|
+
*
|
74
|
+
* @private
|
75
|
+
* @type {number}
|
76
|
+
*/
|
65
77
|
_classPrivateFieldInitSpec(this, _dataLength, {
|
66
78
|
writable: true,
|
67
79
|
value: 0
|
68
80
|
});
|
81
|
+
/**
|
82
|
+
* Columns count limit value trims source settings to that value. If columns
|
83
|
+
* count limit intersects nested header, the header's colspan value is reduced
|
84
|
+
* to keep the whole structure stable (trimmed precisely where the limit is set).
|
85
|
+
*
|
86
|
+
* @type {number}
|
87
|
+
*/
|
69
88
|
_classPrivateFieldInitSpec(this, _columnsLimit, {
|
70
89
|
writable: true,
|
71
90
|
value: Infinity
|
@@ -29,47 +29,42 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
29
29
|
* @private
|
30
30
|
*/
|
31
31
|
var GhostTable = /*#__PURE__*/function () {
|
32
|
-
/**
|
33
|
-
* Reference to the Handsontable instance.
|
34
|
-
*
|
35
|
-
* @private
|
36
|
-
* @type {Handsontable}
|
37
|
-
*/
|
38
|
-
|
39
|
-
/**
|
40
|
-
* The function for retrieving the nested headers settings.
|
41
|
-
*
|
42
|
-
* @private
|
43
|
-
* @type {Function}
|
44
|
-
*/
|
45
|
-
|
46
|
-
/**
|
47
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
48
|
-
*
|
49
|
-
* @private
|
50
|
-
* @type {number}
|
51
|
-
*/
|
52
|
-
|
53
|
-
/**
|
54
|
-
* Temporary element created to get minimal headers widths.
|
55
|
-
*
|
56
|
-
* @private
|
57
|
-
* @type {*}
|
58
|
-
*/
|
59
|
-
|
60
|
-
/**
|
61
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
62
|
-
*
|
63
|
-
* @private
|
64
|
-
* @type {PhysicalIndexToValueMap}
|
65
|
-
*/
|
66
|
-
|
67
32
|
function GhostTable(hot, nestedHeaderSettingsGetter) {
|
68
33
|
_classCallCheck(this, GhostTable);
|
34
|
+
/**
|
35
|
+
* Reference to the Handsontable instance.
|
36
|
+
*
|
37
|
+
* @private
|
38
|
+
* @type {Handsontable}
|
39
|
+
*/
|
69
40
|
_defineProperty(this, "hot", void 0);
|
41
|
+
/**
|
42
|
+
* The function for retrieving the nested headers settings.
|
43
|
+
*
|
44
|
+
* @private
|
45
|
+
* @type {Function}
|
46
|
+
*/
|
70
47
|
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
48
|
+
/**
|
49
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
50
|
+
*
|
51
|
+
* @private
|
52
|
+
* @type {number}
|
53
|
+
*/
|
71
54
|
_defineProperty(this, "layersCount", 0);
|
55
|
+
/**
|
56
|
+
* Temporary element created to get minimal headers widths.
|
57
|
+
*
|
58
|
+
* @private
|
59
|
+
* @type {*}
|
60
|
+
*/
|
72
61
|
_defineProperty(this, "container", void 0);
|
62
|
+
/**
|
63
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
64
|
+
*
|
65
|
+
* @private
|
66
|
+
* @type {PhysicalIndexToValueMap}
|
67
|
+
*/
|
73
68
|
_defineProperty(this, "widthsMap", void 0);
|
74
69
|
this.hot = hot;
|
75
70
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
@@ -25,47 +25,42 @@ import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
|
|
25
25
|
* @private
|
26
26
|
*/
|
27
27
|
var GhostTable = /*#__PURE__*/function () {
|
28
|
-
/**
|
29
|
-
* Reference to the Handsontable instance.
|
30
|
-
*
|
31
|
-
* @private
|
32
|
-
* @type {Handsontable}
|
33
|
-
*/
|
34
|
-
|
35
|
-
/**
|
36
|
-
* The function for retrieving the nested headers settings.
|
37
|
-
*
|
38
|
-
* @private
|
39
|
-
* @type {Function}
|
40
|
-
*/
|
41
|
-
|
42
|
-
/**
|
43
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
44
|
-
*
|
45
|
-
* @private
|
46
|
-
* @type {number}
|
47
|
-
*/
|
48
|
-
|
49
|
-
/**
|
50
|
-
* Temporary element created to get minimal headers widths.
|
51
|
-
*
|
52
|
-
* @private
|
53
|
-
* @type {*}
|
54
|
-
*/
|
55
|
-
|
56
|
-
/**
|
57
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
58
|
-
*
|
59
|
-
* @private
|
60
|
-
* @type {PhysicalIndexToValueMap}
|
61
|
-
*/
|
62
|
-
|
63
28
|
function GhostTable(hot, nestedHeaderSettingsGetter) {
|
64
29
|
_classCallCheck(this, GhostTable);
|
30
|
+
/**
|
31
|
+
* Reference to the Handsontable instance.
|
32
|
+
*
|
33
|
+
* @private
|
34
|
+
* @type {Handsontable}
|
35
|
+
*/
|
65
36
|
_defineProperty(this, "hot", void 0);
|
37
|
+
/**
|
38
|
+
* The function for retrieving the nested headers settings.
|
39
|
+
*
|
40
|
+
* @private
|
41
|
+
* @type {Function}
|
42
|
+
*/
|
66
43
|
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
44
|
+
/**
|
45
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
46
|
+
*
|
47
|
+
* @private
|
48
|
+
* @type {number}
|
49
|
+
*/
|
67
50
|
_defineProperty(this, "layersCount", 0);
|
51
|
+
/**
|
52
|
+
* Temporary element created to get minimal headers widths.
|
53
|
+
*
|
54
|
+
* @private
|
55
|
+
* @type {*}
|
56
|
+
*/
|
68
57
|
_defineProperty(this, "container", void 0);
|
58
|
+
/**
|
59
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
60
|
+
*
|
61
|
+
* @private
|
62
|
+
* @type {PhysicalIndexToValueMap}
|
63
|
+
*/
|
69
64
|
_defineProperty(this, "widthsMap", void 0);
|
70
65
|
this.hot = hot;
|
71
66
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
package/plugins/registry.js
CHANGED
@@ -30,7 +30,9 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
30
30
|
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); }
|
31
31
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
32
32
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
33
|
-
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; }
|
33
|
+
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; } /**
|
34
|
+
* Utility to register plugins and common namespace for keeping the reference to all plugins classes.
|
35
|
+
*/
|
34
36
|
var ERROR_PLUGIN_REGISTERED = function ERROR_PLUGIN_REGISTERED(pluginName) {
|
35
37
|
return "There is already registered \"".concat(pluginName, "\" plugin.");
|
36
38
|
};
|
@@ -591,7 +591,6 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
591
591
|
});
|
592
592
|
});
|
593
593
|
instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
|
594
|
-
instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
|
595
594
|
if (typeof this.headers !== 'undefined') {
|
596
595
|
(0, _array.arrayEach)(sortedHeaders, function (headerData, columnIndex) {
|
597
596
|
instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
|
@@ -585,7 +585,6 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
585
585
|
});
|
586
586
|
});
|
587
587
|
instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
|
588
|
-
instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
|
589
588
|
if (typeof this.headers !== 'undefined') {
|
590
589
|
arrayEach(sortedHeaders, function (headerData, columnIndex) {
|
591
590
|
instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
|
@@ -37,16 +37,15 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
37
37
|
var VisualSelection = /*#__PURE__*/function (_Selection) {
|
38
38
|
_inherits(VisualSelection, _Selection);
|
39
39
|
var _super = _createSuper(VisualSelection);
|
40
|
-
/**
|
41
|
-
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
42
|
-
*
|
43
|
-
* @type {null|CellRange}
|
44
|
-
*/
|
45
|
-
|
46
40
|
function VisualSelection(settings, visualCellRange) {
|
47
41
|
var _this;
|
48
42
|
_classCallCheck(this, VisualSelection);
|
49
43
|
_this = _super.call(this, settings, null);
|
44
|
+
/**
|
45
|
+
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
46
|
+
*
|
47
|
+
* @type {null|CellRange}
|
48
|
+
*/
|
50
49
|
_defineProperty(_assertThisInitialized(_this), "visualCellRange", null);
|
51
50
|
_this.visualCellRange = visualCellRange || null;
|
52
51
|
_this.commit();
|
@@ -33,16 +33,15 @@ import { Selection } from "./../../3rdparty/walkontable/src/index.mjs";
|
|
33
33
|
var VisualSelection = /*#__PURE__*/function (_Selection) {
|
34
34
|
_inherits(VisualSelection, _Selection);
|
35
35
|
var _super = _createSuper(VisualSelection);
|
36
|
-
/**
|
37
|
-
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
38
|
-
*
|
39
|
-
* @type {null|CellRange}
|
40
|
-
*/
|
41
|
-
|
42
36
|
function VisualSelection(settings, visualCellRange) {
|
43
37
|
var _this;
|
44
38
|
_classCallCheck(this, VisualSelection);
|
45
39
|
_this = _super.call(this, settings, null);
|
40
|
+
/**
|
41
|
+
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
42
|
+
*
|
43
|
+
* @type {null|CellRange}
|
44
|
+
*/
|
46
45
|
_defineProperty(_assertThisInitialized(_this), "visualCellRange", null);
|
47
46
|
_this.visualCellRange = visualCellRange || null;
|
48
47
|
_this.commit();
|