handsontable 12.3.3 → 12.4.0-next-ddbea0c-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.
Files changed (172) hide show
  1. package/3rdparty/walkontable/src/cell/coords.js +13 -16
  2. package/3rdparty/walkontable/src/cell/coords.mjs +13 -16
  3. package/3rdparty/walkontable/src/cell/range.js +25 -29
  4. package/3rdparty/walkontable/src/cell/range.mjs +24 -28
  5. package/3rdparty/walkontable/src/core/_base.js +16 -20
  6. package/3rdparty/walkontable/src/core/_base.mjs +16 -20
  7. package/3rdparty/walkontable/src/event.js +4 -0
  8. package/3rdparty/walkontable/src/event.mjs +4 -0
  9. package/3rdparty/walkontable/src/overlay/_base.js +6 -7
  10. package/3rdparty/walkontable/src/overlay/_base.mjs +6 -7
  11. package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
  12. package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
  13. package/3rdparty/walkontable/src/overlay/top.js +6 -7
  14. package/3rdparty/walkontable/src/overlay/top.mjs +6 -7
  15. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
  16. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
  17. package/3rdparty/walkontable/src/overlays.js +55 -64
  18. package/3rdparty/walkontable/src/overlays.mjs +55 -64
  19. package/3rdparty/walkontable/src/scroll.js +20 -23
  20. package/3rdparty/walkontable/src/scroll.mjs +20 -23
  21. package/3rdparty/walkontable/src/settings.js +13 -15
  22. package/3rdparty/walkontable/src/settings.mjs +13 -15
  23. package/3rdparty/walkontable/src/table.js +22 -26
  24. package/3rdparty/walkontable/src/table.mjs +22 -26
  25. package/CHANGELOG.md +14 -0
  26. package/base.js +2 -4
  27. package/base.mjs +2 -2
  28. package/core.js +23 -6
  29. package/core.mjs +23 -6
  30. package/dataMap/dataSource.js +5 -5
  31. package/dataMap/dataSource.mjs +5 -5
  32. package/dataMap/metaManager/metaSchema.js +9 -7
  33. package/dataMap/metaManager/metaSchema.mjs +9 -7
  34. package/dist/handsontable.css +2 -2
  35. package/dist/handsontable.full.css +2 -2
  36. package/dist/handsontable.full.js +7364 -5992
  37. package/dist/handsontable.full.min.css +2 -2
  38. package/dist/handsontable.full.min.js +256 -234
  39. package/dist/handsontable.js +4326 -3275
  40. package/dist/handsontable.min.css +2 -2
  41. package/dist/handsontable.min.js +11 -3
  42. package/dist/languages/all.js +133 -0
  43. package/dist/languages/ar-AR.js +7 -0
  44. package/dist/languages/cs-CZ.js +7 -0
  45. package/dist/languages/de-CH.js +7 -0
  46. package/dist/languages/de-DE.js +7 -0
  47. package/dist/languages/en-US.js +7 -0
  48. package/dist/languages/es-MX.js +7 -0
  49. package/dist/languages/fr-FR.js +7 -0
  50. package/dist/languages/it-IT.js +7 -0
  51. package/dist/languages/ja-JP.js +7 -0
  52. package/dist/languages/ko-KR.js +7 -0
  53. package/dist/languages/lv-LV.js +7 -0
  54. package/dist/languages/nb-NO.js +7 -0
  55. package/dist/languages/nl-NL.js +7 -0
  56. package/dist/languages/pl-PL.js +7 -0
  57. package/dist/languages/pt-BR.js +7 -0
  58. package/dist/languages/ru-RU.js +7 -0
  59. package/dist/languages/sr-SP.js +7 -0
  60. package/dist/languages/zh-CN.js +7 -0
  61. package/dist/languages/zh-TW.js +7 -0
  62. package/editors/autocompleteEditor/autocompleteEditor.js +8 -9
  63. package/editors/autocompleteEditor/autocompleteEditor.mjs +8 -9
  64. package/helpers/mixed.js +2 -2
  65. package/helpers/mixed.mjs +2 -2
  66. package/i18n/languages/ar-AR.js +7 -1
  67. package/i18n/languages/cs-CZ.js +7 -1
  68. package/i18n/languages/de-CH.js +7 -1
  69. package/i18n/languages/de-DE.js +7 -1
  70. package/i18n/languages/en-US.js +7 -1
  71. package/i18n/languages/es-MX.js +7 -1
  72. package/i18n/languages/fr-FR.js +7 -1
  73. package/i18n/languages/it-IT.js +7 -1
  74. package/i18n/languages/ja-JP.js +7 -1
  75. package/i18n/languages/ko-KR.js +7 -1
  76. package/i18n/languages/lv-LV.js +7 -1
  77. package/i18n/languages/nb-NO.js +7 -1
  78. package/i18n/languages/nl-NL.js +7 -1
  79. package/i18n/languages/pl-PL.js +7 -1
  80. package/i18n/languages/pt-BR.js +7 -1
  81. package/i18n/languages/ru-RU.js +7 -1
  82. package/i18n/languages/sr-SP.js +7 -1
  83. package/i18n/languages/zh-CN.js +7 -1
  84. package/i18n/languages/zh-TW.js +7 -1
  85. package/languages/all.js +133 -0
  86. package/languages/ar-AR.js +7 -0
  87. package/languages/cs-CZ.js +7 -0
  88. package/languages/de-CH.js +7 -0
  89. package/languages/de-DE.js +7 -0
  90. package/languages/en-US.js +7 -0
  91. package/languages/es-MX.js +7 -0
  92. package/languages/fr-FR.js +7 -0
  93. package/languages/index.js +133 -0
  94. package/languages/it-IT.js +7 -0
  95. package/languages/ja-JP.js +7 -0
  96. package/languages/ko-KR.js +7 -0
  97. package/languages/lv-LV.js +7 -0
  98. package/languages/nb-NO.js +7 -0
  99. package/languages/nl-NL.js +7 -0
  100. package/languages/pl-PL.js +7 -0
  101. package/languages/pt-BR.js +7 -0
  102. package/languages/ru-RU.js +7 -0
  103. package/languages/sr-SP.js +7 -0
  104. package/languages/zh-CN.js +7 -0
  105. package/languages/zh-TW.js +7 -0
  106. package/package.json +3 -2
  107. package/pluginHooks.js +16 -6
  108. package/pluginHooks.mjs +15 -3
  109. package/plugins/autoRowSize/autoRowSize.js +2 -2
  110. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  111. package/plugins/base/base.js +9 -10
  112. package/plugins/base/base.mjs +9 -10
  113. package/plugins/collapsibleColumns/collapsibleColumns.js +24 -7
  114. package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -7
  115. package/plugins/copyPaste/copyPaste.js +92 -16
  116. package/plugins/copyPaste/copyPaste.mjs +92 -16
  117. package/plugins/copyPaste/copyableRanges.js +39 -39
  118. package/plugins/copyPaste/copyableRanges.mjs +32 -32
  119. package/plugins/customBorders/customBorders.d.ts +2 -0
  120. package/plugins/customBorders/customBorders.js +6 -7
  121. package/plugins/customBorders/customBorders.mjs +6 -7
  122. package/plugins/filters/filters.js +5 -0
  123. package/plugins/filters/filters.mjs +5 -0
  124. package/plugins/formulas/engine/register.js +9 -0
  125. package/plugins/formulas/engine/register.mjs +13 -4
  126. package/plugins/formulas/engine/settings.js +18 -3
  127. package/plugins/formulas/engine/settings.mjs +16 -3
  128. package/plugins/formulas/formulas.js +308 -162
  129. package/plugins/formulas/formulas.mjs +308 -163
  130. package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
  131. package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
  132. package/plugins/formulas/indexSyncer/index.js +225 -0
  133. package/plugins/formulas/indexSyncer/index.mjs +219 -0
  134. package/plugins/formulas/utils.js +81 -0
  135. package/plugins/formulas/utils.mjs +74 -0
  136. package/plugins/hiddenColumns/hiddenColumns.js +12 -7
  137. package/plugins/hiddenColumns/hiddenColumns.mjs +12 -7
  138. package/plugins/hiddenRows/hiddenRows.js +12 -7
  139. package/plugins/hiddenRows/hiddenRows.mjs +12 -7
  140. package/plugins/manualRowMove/manualRowMove.js +26 -11
  141. package/plugins/manualRowMove/manualRowMove.mjs +27 -12
  142. package/plugins/nestedHeaders/nestedHeaders.js +26 -7
  143. package/plugins/nestedHeaders/nestedHeaders.mjs +26 -7
  144. package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
  145. package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
  146. package/plugins/nestedHeaders/stateManager/index.js +21 -3
  147. package/plugins/nestedHeaders/stateManager/index.mjs +18 -0
  148. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
  149. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  150. package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -0
  151. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -0
  152. package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
  153. package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
  154. package/plugins/registry.js +3 -1
  155. package/plugins/undoRedo/undoRedo.js +0 -1
  156. package/plugins/undoRedo/undoRedo.mjs +0 -1
  157. package/selection/highlight/visualSelection.js +5 -6
  158. package/selection/highlight/visualSelection.mjs +5 -6
  159. package/tableView.js +62 -72
  160. package/tableView.mjs +62 -72
  161. package/translations/changesObservable/observable.js +41 -46
  162. package/translations/changesObservable/observable.mjs +36 -41
  163. package/translations/changesObservable/observer.js +8 -1
  164. package/translations/changesObservable/observer.mjs +7 -0
  165. package/translations/indexMapper.js +21 -0
  166. package/translations/indexMapper.mjs +21 -0
  167. package/translations/maps/linkedPhysicalIndexToValueMap.js +6 -0
  168. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +6 -0
  169. package/utils/dataStructures/tree.js +15 -18
  170. package/utils/dataStructures/tree.mjs +15 -18
  171. package/utils/parseTable.js +5 -1
  172. package/utils/parseTable.mjs +5 -1
@@ -160,9 +160,33 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
160
160
  args[_key] = arguments[_key];
161
161
  }
162
162
  _this = _super.call.apply(_super, [this].concat(args));
163
+ /**
164
+ * Cached reference to the NestedHeaders plugin.
165
+ *
166
+ * @private
167
+ * @type {NestedHeaders}
168
+ */
163
169
  _defineProperty(_assertThisInitialized(_this), "nestedHeadersPlugin", null);
170
+ /**
171
+ * Event manager instance reference.
172
+ *
173
+ * @private
174
+ * @type {EventManager}
175
+ */
164
176
  _defineProperty(_assertThisInitialized(_this), "eventManager", new _eventManager.default(_assertThisInitialized(_this)));
177
+ /**
178
+ * The NestedHeaders plugin StateManager instance.
179
+ *
180
+ * @private
181
+ * @type {StateManager}
182
+ */
165
183
  _defineProperty(_assertThisInitialized(_this), "headerStateManager", null);
184
+ /**
185
+ * Map of collapsed columns by the plugin.
186
+ *
187
+ * @private
188
+ * @type {HidingMap|null}
189
+ */
166
190
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _collapsedColumnsMap, {
167
191
  writable: true,
168
192
  value: null
@@ -584,13 +608,6 @@ var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
584
608
  get: function get() {
585
609
  return [PLUGIN_KEY].concat(SETTING_KEYS);
586
610
  }
587
-
588
- /**
589
- * Cached reference to the NestedHeaders plugin.
590
- *
591
- * @private
592
- * @type {NestedHeaders}
593
- */
594
611
  }]);
595
612
  return CollapsibleColumns;
596
613
  }(_base.BasePlugin);
@@ -153,9 +153,33 @@ export var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
153
153
  args[_key] = arguments[_key];
154
154
  }
155
155
  _this = _super.call.apply(_super, [this].concat(args));
156
+ /**
157
+ * Cached reference to the NestedHeaders plugin.
158
+ *
159
+ * @private
160
+ * @type {NestedHeaders}
161
+ */
156
162
  _defineProperty(_assertThisInitialized(_this), "nestedHeadersPlugin", null);
163
+ /**
164
+ * Event manager instance reference.
165
+ *
166
+ * @private
167
+ * @type {EventManager}
168
+ */
157
169
  _defineProperty(_assertThisInitialized(_this), "eventManager", new EventManager(_assertThisInitialized(_this)));
170
+ /**
171
+ * The NestedHeaders plugin StateManager instance.
172
+ *
173
+ * @private
174
+ * @type {StateManager}
175
+ */
158
176
  _defineProperty(_assertThisInitialized(_this), "headerStateManager", null);
177
+ /**
178
+ * Map of collapsed columns by the plugin.
179
+ *
180
+ * @private
181
+ * @type {HidingMap|null}
182
+ */
159
183
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _collapsedColumnsMap, {
160
184
  writable: true,
161
185
  value: null
@@ -577,13 +601,6 @@ export var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {
577
601
  get: function get() {
578
602
  return [PLUGIN_KEY].concat(SETTING_KEYS);
579
603
  }
580
-
581
- /**
582
- * Cached reference to the NestedHeaders plugin.
583
- *
584
- * @private
585
- * @type {NestedHeaders}
586
- */
587
604
  }]);
588
605
  return CollapsibleColumns;
589
606
  }(BasePlugin);
@@ -143,35 +143,115 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
143
143
  args[_key] = arguments[_key];
144
144
  }
145
145
  _this = _super.call.apply(_super, [this].concat(args));
146
+ /**
147
+ * Counts how many column headers will be copied based on the passed range.
148
+ *
149
+ * @private
150
+ * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.
151
+ * @returns {{ columnHeadersCount: number }} Returns an object with keys that holds
152
+ * information with the number of copied headers.
153
+ */
146
154
  _classPrivateMethodInitSpec(_assertThisInitialized(_this), _countCopiedHeaders);
155
+ /**
156
+ * The maximum number of columns than can be copied to the clipboard.
157
+ *
158
+ * @type {number}
159
+ * @default Infinity
160
+ */
147
161
  _defineProperty(_assertThisInitialized(_this), "columnsLimit", Infinity);
162
+ /**
163
+ * The maximum number of rows than can be copied to the clipboard.
164
+ *
165
+ * @type {number}
166
+ * @default Infinity
167
+ */
148
168
  _defineProperty(_assertThisInitialized(_this), "rowsLimit", Infinity);
169
+ /**
170
+ * When pasting:
171
+ * - `'overwrite'`: overwrite the currently-selected cells
172
+ * - `'shift_down'`: move currently-selected cells down
173
+ * - `'shift_right'`: move currently-selected cells to the right
174
+ *
175
+ * @type {string}
176
+ * @default 'overwrite'
177
+ */
149
178
  _defineProperty(_assertThisInitialized(_this), "pasteMode", 'overwrite');
179
+ /**
180
+ * The UI container for the secondary focusable element.
181
+ *
182
+ * @type {HTMLElement}
183
+ */
150
184
  _defineProperty(_assertThisInitialized(_this), "uiContainer", _this.hot.rootDocument.body);
185
+ /**
186
+ * Shows the "Copy with headers" item in the context menu and extends the context menu with the
187
+ * `'copy_with_column_headers'` option that can be used for creating custom menus arrangements.
188
+ *
189
+ * @type {boolean}
190
+ * @default false
191
+ */
151
192
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnHeaders, {
152
193
  writable: true,
153
194
  value: false
154
195
  });
196
+ /**
197
+ * Shows the "Copy with group headers" item in the context menu and extends the context menu with the
198
+ * `'copy_with_column_group headers'` option that can be used for creating custom menus arrangements.
199
+ *
200
+ * @type {boolean}
201
+ * @default false
202
+ */
155
203
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnGroupHeaders, {
156
204
  writable: true,
157
205
  value: false
158
206
  });
207
+ /**
208
+ * Shows the "Copy headers only" item in the context menu and extends the context menu with the
209
+ * `'copy_column_headers_only'` option that can be used for creating custom menus arrangements.
210
+ *
211
+ * @type {boolean}
212
+ * @default false
213
+ */
159
214
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnHeadersOnly, {
160
215
  writable: true,
161
216
  value: false
162
217
  });
218
+ /**
219
+ * Defines the data range to copy. Possible values:
220
+ * * `'cells-only'` Copy selected cells only;
221
+ * * `'column-headers-only'` Copy column headers only;
222
+ * * `'with-all-column-headers'` Copy cells with all column headers;
223
+ * * `'with-column-headers'` Copy cells with column headers;
224
+ *
225
+ * @type {'cells-only' | 'column-headers-only' | 'with-all-column-headers' | 'with-column-headers'}
226
+ */
163
227
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _copyMode, {
164
228
  writable: true,
165
229
  value: 'cells-only'
166
230
  });
231
+ /**
232
+ * Flag that is used to prevent copying when the native shortcut was not pressed.
233
+ *
234
+ * @type {boolean}
235
+ */
167
236
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _isTriggeredByCopy, {
168
237
  writable: true,
169
238
  value: false
170
239
  });
240
+ /**
241
+ * Flag that is used to prevent cutting when the native shortcut was not pressed.
242
+ *
243
+ * @type {boolean}
244
+ */
171
245
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _isTriggeredByCut, {
172
246
  writable: true,
173
247
  value: false
174
248
  });
249
+ /**
250
+ * Class that helps generate copyable ranges based on the current selection for different copy mode
251
+ * types.
252
+ *
253
+ * @type {CopyableRangesFactory}
254
+ */
175
255
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _copyableRangesFactory, {
176
256
  writable: true,
177
257
  value: new _copyableRanges.CopyableRangesFactory({
@@ -192,7 +272,19 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
192
272
  }
193
273
  })
194
274
  });
275
+ /**
276
+ * Ranges of the cells coordinates, which should be used to copy/cut/paste actions.
277
+ *
278
+ * @private
279
+ * @type {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>}
280
+ */
195
281
  _defineProperty(_assertThisInitialized(_this), "copyableRanges", []);
282
+ /**
283
+ * Provides focusable element to support IME and copy/paste/cut actions.
284
+ *
285
+ * @private
286
+ * @type {FocusableWrapper}
287
+ */
196
288
  _defineProperty(_assertThisInitialized(_this), "focusableElement", void 0);
197
289
  return _this;
198
290
  }
@@ -501,15 +593,6 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
501
593
  var _this$hot$getActiveEd2;
502
594
  return (_this$hot$getActiveEd2 = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd2 === void 0 ? void 0 : _this$hot$getActiveEd2.isOpened();
503
595
  }
504
-
505
- /**
506
- * Counts how many column headers will be copied based on the passed range.
507
- *
508
- * @private
509
- * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.
510
- * @returns {{ columnHeadersCount: number }} Returns an object with keys that holds
511
- * information with the number of copied headers.
512
- */
513
596
  }, {
514
597
  key: "populateValues",
515
598
  value:
@@ -795,13 +878,6 @@ var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
795
878
  get: function get() {
796
879
  return PLUGIN_PRIORITY;
797
880
  }
798
-
799
- /**
800
- * The maximum number of columns than can be copied to the clipboard.
801
- *
802
- * @type {number}
803
- * @default Infinity
804
- */
805
881
  }]);
806
882
  return CopyPaste;
807
883
  }(_base.BasePlugin);
@@ -136,35 +136,115 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
136
136
  args[_key] = arguments[_key];
137
137
  }
138
138
  _this = _super.call.apply(_super, [this].concat(args));
139
+ /**
140
+ * Counts how many column headers will be copied based on the passed range.
141
+ *
142
+ * @private
143
+ * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.
144
+ * @returns {{ columnHeadersCount: number }} Returns an object with keys that holds
145
+ * information with the number of copied headers.
146
+ */
139
147
  _classPrivateMethodInitSpec(_assertThisInitialized(_this), _countCopiedHeaders);
148
+ /**
149
+ * The maximum number of columns than can be copied to the clipboard.
150
+ *
151
+ * @type {number}
152
+ * @default Infinity
153
+ */
140
154
  _defineProperty(_assertThisInitialized(_this), "columnsLimit", Infinity);
155
+ /**
156
+ * The maximum number of rows than can be copied to the clipboard.
157
+ *
158
+ * @type {number}
159
+ * @default Infinity
160
+ */
141
161
  _defineProperty(_assertThisInitialized(_this), "rowsLimit", Infinity);
162
+ /**
163
+ * When pasting:
164
+ * - `'overwrite'`: overwrite the currently-selected cells
165
+ * - `'shift_down'`: move currently-selected cells down
166
+ * - `'shift_right'`: move currently-selected cells to the right
167
+ *
168
+ * @type {string}
169
+ * @default 'overwrite'
170
+ */
142
171
  _defineProperty(_assertThisInitialized(_this), "pasteMode", 'overwrite');
172
+ /**
173
+ * The UI container for the secondary focusable element.
174
+ *
175
+ * @type {HTMLElement}
176
+ */
143
177
  _defineProperty(_assertThisInitialized(_this), "uiContainer", _this.hot.rootDocument.body);
178
+ /**
179
+ * Shows the "Copy with headers" item in the context menu and extends the context menu with the
180
+ * `'copy_with_column_headers'` option that can be used for creating custom menus arrangements.
181
+ *
182
+ * @type {boolean}
183
+ * @default false
184
+ */
144
185
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnHeaders, {
145
186
  writable: true,
146
187
  value: false
147
188
  });
189
+ /**
190
+ * Shows the "Copy with group headers" item in the context menu and extends the context menu with the
191
+ * `'copy_with_column_group headers'` option that can be used for creating custom menus arrangements.
192
+ *
193
+ * @type {boolean}
194
+ * @default false
195
+ */
148
196
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnGroupHeaders, {
149
197
  writable: true,
150
198
  value: false
151
199
  });
200
+ /**
201
+ * Shows the "Copy headers only" item in the context menu and extends the context menu with the
202
+ * `'copy_column_headers_only'` option that can be used for creating custom menus arrangements.
203
+ *
204
+ * @type {boolean}
205
+ * @default false
206
+ */
152
207
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _enableCopyColumnHeadersOnly, {
153
208
  writable: true,
154
209
  value: false
155
210
  });
211
+ /**
212
+ * Defines the data range to copy. Possible values:
213
+ * * `'cells-only'` Copy selected cells only;
214
+ * * `'column-headers-only'` Copy column headers only;
215
+ * * `'with-all-column-headers'` Copy cells with all column headers;
216
+ * * `'with-column-headers'` Copy cells with column headers;
217
+ *
218
+ * @type {'cells-only' | 'column-headers-only' | 'with-all-column-headers' | 'with-column-headers'}
219
+ */
156
220
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _copyMode, {
157
221
  writable: true,
158
222
  value: 'cells-only'
159
223
  });
224
+ /**
225
+ * Flag that is used to prevent copying when the native shortcut was not pressed.
226
+ *
227
+ * @type {boolean}
228
+ */
160
229
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _isTriggeredByCopy, {
161
230
  writable: true,
162
231
  value: false
163
232
  });
233
+ /**
234
+ * Flag that is used to prevent cutting when the native shortcut was not pressed.
235
+ *
236
+ * @type {boolean}
237
+ */
164
238
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _isTriggeredByCut, {
165
239
  writable: true,
166
240
  value: false
167
241
  });
242
+ /**
243
+ * Class that helps generate copyable ranges based on the current selection for different copy mode
244
+ * types.
245
+ *
246
+ * @type {CopyableRangesFactory}
247
+ */
168
248
  _classPrivateFieldInitSpec(_assertThisInitialized(_this), _copyableRangesFactory, {
169
249
  writable: true,
170
250
  value: new CopyableRangesFactory({
@@ -185,7 +265,19 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
185
265
  }
186
266
  })
187
267
  });
268
+ /**
269
+ * Ranges of the cells coordinates, which should be used to copy/cut/paste actions.
270
+ *
271
+ * @private
272
+ * @type {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>}
273
+ */
188
274
  _defineProperty(_assertThisInitialized(_this), "copyableRanges", []);
275
+ /**
276
+ * Provides focusable element to support IME and copy/paste/cut actions.
277
+ *
278
+ * @private
279
+ * @type {FocusableWrapper}
280
+ */
189
281
  _defineProperty(_assertThisInitialized(_this), "focusableElement", void 0);
190
282
  return _this;
191
283
  }
@@ -494,15 +586,6 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
494
586
  var _this$hot$getActiveEd2;
495
587
  return (_this$hot$getActiveEd2 = this.hot.getActiveEditor()) === null || _this$hot$getActiveEd2 === void 0 ? void 0 : _this$hot$getActiveEd2.isOpened();
496
588
  }
497
-
498
- /**
499
- * Counts how many column headers will be copied based on the passed range.
500
- *
501
- * @private
502
- * @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.
503
- * @returns {{ columnHeadersCount: number }} Returns an object with keys that holds
504
- * information with the number of copied headers.
505
- */
506
589
  }, {
507
590
  key: "populateValues",
508
591
  value:
@@ -788,13 +871,6 @@ export var CopyPaste = /*#__PURE__*/function (_BasePlugin) {
788
871
  get: function get() {
789
872
  return PLUGIN_PRIORITY;
790
873
  }
791
-
792
- /**
793
- * The maximum number of columns than can be copied to the clipboard.
794
- *
795
- * @type {number}
796
- * @default Infinity
797
- */
798
874
  }]);
799
875
  return CopyPaste;
800
876
  }(BasePlugin);
@@ -33,6 +33,13 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
33
33
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
34
34
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
35
35
  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; } }
36
+ /**
37
+ * The utils class produces the selection ranges in the `{startRow, startCol, endRow, endCol}` format
38
+ * based on the current table selection. The CopyPaste plugin consumes that ranges to generate
39
+ * appropriate data ready to copy to the clipboard.
40
+ *
41
+ * @private
42
+ */
36
43
  var _selectedRange = /*#__PURE__*/new WeakMap();
37
44
  var _countRows = /*#__PURE__*/new WeakMap();
38
45
  var _countColumns = /*#__PURE__*/new WeakMap();
@@ -41,38 +48,7 @@ var _columnsLimit = /*#__PURE__*/new WeakMap();
41
48
  var _countColumnHeaders = /*#__PURE__*/new WeakMap();
42
49
  var _trimColumnsRange = /*#__PURE__*/new WeakSet();
43
50
  var _trimRowsRange = /*#__PURE__*/new WeakSet();
44
- /**
45
- * The utils class produces the selection ranges in the `{startRow, startCol, endRow, endCol}` format
46
- * based on the current table selection. The CopyPaste plugin consumes that ranges to generate
47
- * appropriate data ready to copy to the clipboard.
48
- *
49
- * @private
50
- */
51
51
  var CopyableRangesFactory = /*#__PURE__*/function () {
52
- /**
53
- * @type {CellRange}
54
- */
55
-
56
- /**
57
- * @type {function(): number}
58
- */
59
-
60
- /**
61
- * @type {function(): number}
62
- */
63
-
64
- /**
65
- * @type {function(): number}
66
- */
67
-
68
- /**
69
- * @type {function(): number}
70
- */
71
-
72
- /**
73
- * @type {function(): number}
74
- */
75
-
76
52
  /* eslint-disable jsdoc/require-description-complete-sentence */
77
53
  /**
78
54
  * @param {{
@@ -90,28 +66,60 @@ var CopyableRangesFactory = /*#__PURE__*/function () {
90
66
  columnsLimit = _ref.columnsLimit,
91
67
  countColumnHeaders = _ref.countColumnHeaders;
92
68
  _classCallCheck(this, CopyableRangesFactory);
69
+ /**
70
+ * Trimmed the rows range to the limit.
71
+ *
72
+ * @param {*} startRow The lowest row index in the range.
73
+ * @param {*} endRow The highest row index in the range.
74
+ * @returns {number} Returns trimmed row index if it exceeds the limit.
75
+ */
93
76
  _classPrivateMethodInitSpec(this, _trimRowsRange);
77
+ /**
78
+ * Trimmed the columns range to the limit.
79
+ *
80
+ * @param {*} startColumn The lowest column index in the range.
81
+ * @param {*} endColumn The highest column index in the range.
82
+ * @returns {number} Returns trimmed column index if it exceeds the limit.
83
+ */
94
84
  _classPrivateMethodInitSpec(this, _trimColumnsRange);
85
+ /**
86
+ * @type {CellRange}
87
+ */
95
88
  _classPrivateFieldInitSpec(this, _selectedRange, {
96
89
  writable: true,
97
90
  value: void 0
98
91
  });
92
+ /**
93
+ * @type {function(): number}
94
+ */
99
95
  _classPrivateFieldInitSpec(this, _countRows, {
100
96
  writable: true,
101
97
  value: void 0
102
98
  });
99
+ /**
100
+ * @type {function(): number}
101
+ */
103
102
  _classPrivateFieldInitSpec(this, _countColumns, {
104
103
  writable: true,
105
104
  value: void 0
106
105
  });
106
+ /**
107
+ * @type {function(): number}
108
+ */
107
109
  _classPrivateFieldInitSpec(this, _rowsLimit, {
108
110
  writable: true,
109
111
  value: void 0
110
112
  });
113
+ /**
114
+ * @type {function(): number}
115
+ */
111
116
  _classPrivateFieldInitSpec(this, _columnsLimit, {
112
117
  writable: true,
113
118
  value: void 0
114
119
  });
120
+ /**
121
+ * @type {function(): number}
122
+ */
115
123
  _classPrivateFieldInitSpec(this, _countColumnHeaders, {
116
124
  writable: true,
117
125
  value: void 0
@@ -218,14 +226,6 @@ var CopyableRangesFactory = /*#__PURE__*/function () {
218
226
  endCol: finalEndCol
219
227
  };
220
228
  }
221
-
222
- /**
223
- * Trimmed the columns range to the limit.
224
- *
225
- * @param {*} startColumn The lowest column index in the range.
226
- * @param {*} endColumn The highest column index in the range.
227
- * @returns {number} Returns trimmed column index if it exceeds the limit.
228
- */
229
229
  }]);
230
230
  return CopyableRangesFactory;
231
231
  }();
@@ -44,30 +44,6 @@ var _countColumnHeaders = /*#__PURE__*/new WeakMap();
44
44
  var _trimColumnsRange = /*#__PURE__*/new WeakSet();
45
45
  var _trimRowsRange = /*#__PURE__*/new WeakSet();
46
46
  export var CopyableRangesFactory = /*#__PURE__*/function () {
47
- /**
48
- * @type {CellRange}
49
- */
50
-
51
- /**
52
- * @type {function(): number}
53
- */
54
-
55
- /**
56
- * @type {function(): number}
57
- */
58
-
59
- /**
60
- * @type {function(): number}
61
- */
62
-
63
- /**
64
- * @type {function(): number}
65
- */
66
-
67
- /**
68
- * @type {function(): number}
69
- */
70
-
71
47
  /* eslint-disable jsdoc/require-description-complete-sentence */
72
48
  /**
73
49
  * @param {{
@@ -85,28 +61,60 @@ export var CopyableRangesFactory = /*#__PURE__*/function () {
85
61
  columnsLimit = _ref.columnsLimit,
86
62
  countColumnHeaders = _ref.countColumnHeaders;
87
63
  _classCallCheck(this, CopyableRangesFactory);
64
+ /**
65
+ * Trimmed the rows range to the limit.
66
+ *
67
+ * @param {*} startRow The lowest row index in the range.
68
+ * @param {*} endRow The highest row index in the range.
69
+ * @returns {number} Returns trimmed row index if it exceeds the limit.
70
+ */
88
71
  _classPrivateMethodInitSpec(this, _trimRowsRange);
72
+ /**
73
+ * Trimmed the columns range to the limit.
74
+ *
75
+ * @param {*} startColumn The lowest column index in the range.
76
+ * @param {*} endColumn The highest column index in the range.
77
+ * @returns {number} Returns trimmed column index if it exceeds the limit.
78
+ */
89
79
  _classPrivateMethodInitSpec(this, _trimColumnsRange);
80
+ /**
81
+ * @type {CellRange}
82
+ */
90
83
  _classPrivateFieldInitSpec(this, _selectedRange, {
91
84
  writable: true,
92
85
  value: void 0
93
86
  });
87
+ /**
88
+ * @type {function(): number}
89
+ */
94
90
  _classPrivateFieldInitSpec(this, _countRows, {
95
91
  writable: true,
96
92
  value: void 0
97
93
  });
94
+ /**
95
+ * @type {function(): number}
96
+ */
98
97
  _classPrivateFieldInitSpec(this, _countColumns, {
99
98
  writable: true,
100
99
  value: void 0
101
100
  });
101
+ /**
102
+ * @type {function(): number}
103
+ */
102
104
  _classPrivateFieldInitSpec(this, _rowsLimit, {
103
105
  writable: true,
104
106
  value: void 0
105
107
  });
108
+ /**
109
+ * @type {function(): number}
110
+ */
106
111
  _classPrivateFieldInitSpec(this, _columnsLimit, {
107
112
  writable: true,
108
113
  value: void 0
109
114
  });
115
+ /**
116
+ * @type {function(): number}
117
+ */
110
118
  _classPrivateFieldInitSpec(this, _countColumnHeaders, {
111
119
  writable: true,
112
120
  value: void 0
@@ -213,14 +221,6 @@ export var CopyableRangesFactory = /*#__PURE__*/function () {
213
221
  endCol: finalEndCol
214
222
  };
215
223
  }
216
-
217
- /**
218
- * Trimmed the columns range to the limit.
219
- *
220
- * @param {*} startColumn The lowest column index in the range.
221
- * @param {*} endColumn The highest column index in the range.
222
- * @returns {number} Returns trimmed column index if it exceeds the limit.
223
- */
224
224
  }]);
225
225
  return CopyableRangesFactory;
226
226
  }();
@@ -14,6 +14,8 @@ export interface BorderRange {
14
14
  };
15
15
  }
16
16
  export type DetailedSettings = (SimpleCellCoords | BorderRange) & {
17
+ start?: BorderOptions | string;
18
+ end?: BorderOptions | string;
17
19
  left?: BorderOptions | string;
18
20
  right?: BorderOptions | string;
19
21
  top?: BorderOptions | string;
@@ -129,6 +129,12 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
129
129
  args[_key] = arguments[_key];
130
130
  }
131
131
  _this = _super.call.apply(_super, [this].concat(args));
132
+ /**
133
+ * Saved borders.
134
+ *
135
+ * @private
136
+ * @type {Array}
137
+ */
132
138
  _defineProperty(_assertThisInitialized(_this), "savedBorders", []);
133
139
  return _this;
134
140
  }
@@ -879,13 +885,6 @@ var CustomBorders = /*#__PURE__*/function (_BasePlugin) {
879
885
  get: function get() {
880
886
  return PLUGIN_PRIORITY;
881
887
  }
882
-
883
- /**
884
- * Saved borders.
885
- *
886
- * @private
887
- * @type {Array}
888
- */
889
888
  }]);
890
889
  return CustomBorders;
891
890
  }(_base.BasePlugin);