handsontable 14.0.0-next-f88c253-20231106 → 14.0.0-next-c080457-20231107

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/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 = "14.0.0-next-f88c253-20231106";
137
+ const hotVersion = "14.0.0-next-c080457-20231107";
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 = "14.0.0-next-f88c253-20231106";
127
+ const hotVersion = "14.0.0-next-c080457-20231107";
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": "14.0.0-next-f88c253-20231106",
13
+ "version": "14.0.0-next-c080457-20231107",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -29,13 +29,10 @@ function addEditCommentItem(plugin) {
29
29
  },
30
30
  disabled() {
31
31
  const range = this.getSelectedRangeLast();
32
- if (!range) {
32
+ if (!range || range.highlight.isHeader() || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
33
33
  return true;
34
34
  }
35
- if (range.highlight.isHeader()) {
36
- return true;
37
- }
38
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
35
+ return false;
39
36
  }
40
37
  };
41
38
  }
@@ -23,13 +23,10 @@ export default function addEditCommentItem(plugin) {
23
23
  },
24
24
  disabled() {
25
25
  const range = this.getSelectedRangeLast();
26
- if (!range) {
26
+ if (!range || range.highlight.isHeader() || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
27
27
  return true;
28
28
  }
29
- if (range.highlight.isHeader()) {
30
- return true;
31
- }
32
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
29
+ return false;
33
30
  }
34
31
  };
35
32
  }
@@ -34,16 +34,10 @@ function readOnlyCommentItem(plugin) {
34
34
  },
35
35
  disabled() {
36
36
  const range = this.getSelectedRangeLast();
37
- if (!range) {
37
+ if (!range || range.highlight.isHeader() || !plugin.getCommentAtCell(range.highlight.row, range.highlight.col) || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
38
38
  return true;
39
39
  }
40
- if (range.highlight.isHeader()) {
41
- return true;
42
- }
43
- if (!plugin.getCommentAtCell(range.highlight.row, range.highlight.col)) {
44
- return true;
45
- }
46
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
40
+ return false;
47
41
  }
48
42
  };
49
43
  }
@@ -28,16 +28,10 @@ export default function readOnlyCommentItem(plugin) {
28
28
  },
29
29
  disabled() {
30
30
  const range = this.getSelectedRangeLast();
31
- if (!range) {
31
+ if (!range || range.highlight.isHeader() || !plugin.getCommentAtCell(range.highlight.row, range.highlight.col) || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
32
32
  return true;
33
33
  }
34
- if (range.highlight.isHeader()) {
35
- return true;
36
- }
37
- if (!plugin.getCommentAtCell(range.highlight.row, range.highlight.col)) {
38
- return true;
39
- }
40
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
34
+ return false;
41
35
  }
42
36
  };
43
37
  }
@@ -26,13 +26,10 @@ function removeCommentItem(plugin) {
26
26
  },
27
27
  disabled() {
28
28
  const range = this.getSelectedRangeLast();
29
- if (!range) {
29
+ if (!range || range.highlight.isHeader() || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
30
30
  return true;
31
31
  }
32
- if (range.highlight.isHeader()) {
33
- return true;
34
- }
35
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
32
+ return false;
36
33
  }
37
34
  };
38
35
  }
@@ -20,13 +20,10 @@ export default function removeCommentItem(plugin) {
20
20
  },
21
21
  disabled() {
22
22
  const range = this.getSelectedRangeLast();
23
- if (!range) {
23
+ if (!range || range.highlight.isHeader() || this.selection.isEntireRowSelected() && this.selection.isEntireColumnSelected() || this.countRenderedRows() === 0 || this.countRenderedCols() === 0) {
24
24
  return true;
25
25
  }
26
- if (range.highlight.isHeader()) {
27
- return true;
28
- }
29
- return this.countRenderedRows() === 0 || this.countRenderedCols() === 0;
26
+ return false;
30
27
  }
31
28
  };
32
29
  }
@@ -179,10 +179,7 @@ class Highlight {
179
179
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
180
180
  }
181
181
 
182
- let disableHighlight = false;
183
- if (coords.isCell()) {
184
- disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
185
- }
182
+ let disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
186
183
  if (typeof disableHighlight === 'string') {
187
184
  disableHighlight = [disableHighlight];
188
185
  }
@@ -170,10 +170,7 @@ class Highlight {
170
170
  type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.
171
171
  }
172
172
 
173
- let disableHighlight = false;
174
- if (coords.isCell()) {
175
- disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
176
- }
173
+ let disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);
177
174
  if (typeof disableHighlight === 'string') {
178
175
  disableHighlight = [disableHighlight];
179
176
  }