handsontable 0.0.0-next-5d3f934-20240403 → 0.0.0-next-53a190b-20240403

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

@@ -13,6 +13,8 @@ exports.getCaretPosition = getCaretPosition;
13
13
  exports.getComputedStyle = getComputedStyle;
14
14
  exports.getCssTransform = getCssTransform;
15
15
  exports.getFrameElement = getFrameElement;
16
+ exports.getMaximumScrollLeft = getMaximumScrollLeft;
17
+ exports.getMaximumScrollTop = getMaximumScrollTop;
16
18
  exports.getParent = getParent;
17
19
  exports.getParentWindow = getParentWindow;
18
20
  exports.getScrollLeft = getScrollLeft;
@@ -664,6 +666,26 @@ function getScrollableElement(element) {
664
666
  return rootWindow;
665
667
  }
666
668
 
669
+ /**
670
+ * Get the maximum available `scrollTop` value for the provided element.
671
+ *
672
+ * @param {HTMLElement} element The element to get the maximum scroll top value from.
673
+ * @returns {number} The maximum scroll top value.
674
+ */
675
+ function getMaximumScrollTop(element) {
676
+ return element.scrollHeight - element.clientHeight;
677
+ }
678
+
679
+ /**
680
+ * Get the maximum available `scrollLeft` value for the provided element.
681
+ *
682
+ * @param {HTMLElement} element The element to get the maximum scroll left value from.
683
+ * @returns {number} The maximum scroll left value.
684
+ */
685
+ function getMaximumScrollLeft(element) {
686
+ return element.scrollWidth - element.clientWidth;
687
+ }
688
+
667
689
  /**
668
690
  * Returns a DOM element responsible for trimming the provided element.
669
691
  *
@@ -606,6 +606,26 @@ export function getScrollableElement(element) {
606
606
  return rootWindow;
607
607
  }
608
608
 
609
+ /**
610
+ * Get the maximum available `scrollTop` value for the provided element.
611
+ *
612
+ * @param {HTMLElement} element The element to get the maximum scroll top value from.
613
+ * @returns {number} The maximum scroll top value.
614
+ */
615
+ export function getMaximumScrollTop(element) {
616
+ return element.scrollHeight - element.clientHeight;
617
+ }
618
+
619
+ /**
620
+ * Get the maximum available `scrollLeft` value for the provided element.
621
+ *
622
+ * @param {HTMLElement} element The element to get the maximum scroll left value from.
623
+ * @returns {number} The maximum scroll left value.
624
+ */
625
+ export function getMaximumScrollLeft(element) {
626
+ return element.scrollWidth - element.clientWidth;
627
+ }
628
+
609
629
  /**
610
630
  * Returns a DOM element responsible for trimming the provided element.
611
631
  *
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-5d3f934-20240403";
137
+ const hotVersion = "0.0.0-next-53a190b-20240403";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-5d3f934-20240403";
127
+ const hotVersion = "0.0.0-next-53a190b-20240403";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-5d3f934-20240403",
13
+ "version": "0.0.0-next-53a190b-20240403",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -221,9 +221,7 @@ class ColumnSorting extends _base.BasePlugin {
221
221
  const {
222
222
  highlight
223
223
  } = this.hot.getSelectedRangeLast();
224
- if (highlight.row === -1 && highlight.col >= 0) {
225
- this.sort(this.getColumnNextConfig(highlight.col));
226
- }
224
+ this.sort(this.getColumnNextConfig(highlight.col));
227
225
 
228
226
  // prevent default Enter behavior (move to the next row within a selection range)
229
227
  return false;
@@ -231,7 +229,7 @@ class ColumnSorting extends _base.BasePlugin {
231
229
  runOnlyIf: () => {
232
230
  var _this$hot$getSelected, _this$hot$getSelected2;
233
231
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
234
- return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
232
+ return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.row === -1 && highlight.col >= 0;
235
233
  },
236
234
  relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
237
235
  position: 'before',
@@ -217,9 +217,7 @@ export class ColumnSorting extends BasePlugin {
217
217
  const {
218
218
  highlight
219
219
  } = this.hot.getSelectedRangeLast();
220
- if (highlight.row === -1 && highlight.col >= 0) {
221
- this.sort(this.getColumnNextConfig(highlight.col));
222
- }
220
+ this.sort(this.getColumnNextConfig(highlight.col));
223
221
 
224
222
  // prevent default Enter behavior (move to the next row within a selection range)
225
223
  return false;
@@ -227,7 +225,7 @@ export class ColumnSorting extends BasePlugin {
227
225
  runOnlyIf: () => {
228
226
  var _this$hot$getSelected, _this$hot$getSelected2;
229
227
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
230
- return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
228
+ return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.row === -1 && highlight.col >= 0;
231
229
  },
232
230
  relativeToGroup: SHORTCUTS_GROUP_EDITOR,
233
231
  position: 'before',
@@ -269,13 +269,11 @@ class NestedRows extends _base.BasePlugin {
269
269
  const {
270
270
  highlight
271
271
  } = this.hot.getSelectedRangeLast();
272
- if (highlight.col === -1 && highlight.row >= 0) {
273
- const row = this.collapsingUI.translateTrimmedRow(highlight.row);
274
- if (this.collapsingUI.areChildrenCollapsed(row)) {
275
- this.collapsingUI.expandChildren(row);
276
- } else {
277
- this.collapsingUI.collapseChildren(row);
278
- }
272
+ const row = this.collapsingUI.translateTrimmedRow(highlight.row);
273
+ if (this.collapsingUI.areChildrenCollapsed(row)) {
274
+ this.collapsingUI.expandChildren(row);
275
+ } else {
276
+ this.collapsingUI.collapseChildren(row);
279
277
  }
280
278
 
281
279
  // prevent default Enter behavior (move to the next row within a selection range)
@@ -284,7 +282,7 @@ class NestedRows extends _base.BasePlugin {
284
282
  runOnlyIf: () => {
285
283
  var _this$hot$getSelected, _this$hot$getSelected2;
286
284
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
287
- return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
285
+ return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.col === -1 && highlight.row >= 0;
288
286
  },
289
287
  group: SHORTCUTS_GROUP,
290
288
  relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
@@ -265,13 +265,11 @@ export class NestedRows extends BasePlugin {
265
265
  const {
266
266
  highlight
267
267
  } = this.hot.getSelectedRangeLast();
268
- if (highlight.col === -1 && highlight.row >= 0) {
269
- const row = this.collapsingUI.translateTrimmedRow(highlight.row);
270
- if (this.collapsingUI.areChildrenCollapsed(row)) {
271
- this.collapsingUI.expandChildren(row);
272
- } else {
273
- this.collapsingUI.collapseChildren(row);
274
- }
268
+ const row = this.collapsingUI.translateTrimmedRow(highlight.row);
269
+ if (this.collapsingUI.areChildrenCollapsed(row)) {
270
+ this.collapsingUI.expandChildren(row);
271
+ } else {
272
+ this.collapsingUI.collapseChildren(row);
275
273
  }
276
274
 
277
275
  // prevent default Enter behavior (move to the next row within a selection range)
@@ -280,7 +278,7 @@ export class NestedRows extends BasePlugin {
280
278
  runOnlyIf: () => {
281
279
  var _this$hot$getSelected, _this$hot$getSelected2;
282
280
  const highlight = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.highlight;
283
- return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.isHeader();
281
+ return highlight && ((_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingle()) && this.hot.selection.isCellVisible(highlight) && highlight.col === -1 && highlight.row >= 0;
284
282
  },
285
283
  group: SHORTCUTS_GROUP,
286
284
  relativeToGroup: SHORTCUTS_GROUP_EDITOR,