handsontable 12.3.1-next-83e8a23-20230111 → 12.3.1-next-8792e1c-20230202

Sign up to get free protection for your applications and to get access to all the features.
@@ -163,11 +163,29 @@ var Overlays = /*#__PURE__*/function () {
163
163
  }
164
164
 
165
165
  /**
166
- * Retrieve browser line height and apply its value to `browserLineHeight`.
166
+ * Get the list of references to all overlays.
167
167
  *
168
- * @private
168
+ * @param {boolean} [includeMaster = false] If set to `true`, the list will contain the master table as the last
169
+ * element.
170
+ * @returns {(TopOverlay|TopInlineStartCornerOverlay|InlineStartOverlay|BottomOverlay|BottomInlineStartCornerOverlay)[]}
169
171
  */
170
172
  _createClass(Overlays, [{
173
+ key: "getOverlays",
174
+ value: function getOverlays() {
175
+ var includeMaster = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
176
+ var overlays = [this.topOverlay, this.topInlineStartCornerOverlay, this.inlineStartOverlay, this.bottomOverlay, this.bottomInlineStartCornerOverlay];
177
+ if (includeMaster) {
178
+ overlays.push(this.wtTable);
179
+ }
180
+ return overlays;
181
+ }
182
+
183
+ /**
184
+ * Retrieve browser line height and apply its value to `browserLineHeight`.
185
+ *
186
+ * @private
187
+ */
188
+ }, {
171
189
  key: "initBrowserLineHeight",
172
190
  value: function initBrowserLineHeight() {
173
191
  var _this$domBindings2 = this.domBindings,
@@ -159,11 +159,29 @@ var Overlays = /*#__PURE__*/function () {
159
159
  }
160
160
 
161
161
  /**
162
- * Retrieve browser line height and apply its value to `browserLineHeight`.
162
+ * Get the list of references to all overlays.
163
163
  *
164
- * @private
164
+ * @param {boolean} [includeMaster = false] If set to `true`, the list will contain the master table as the last
165
+ * element.
166
+ * @returns {(TopOverlay|TopInlineStartCornerOverlay|InlineStartOverlay|BottomOverlay|BottomInlineStartCornerOverlay)[]}
165
167
  */
166
168
  _createClass(Overlays, [{
169
+ key: "getOverlays",
170
+ value: function getOverlays() {
171
+ var includeMaster = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
172
+ var overlays = [this.topOverlay, this.topInlineStartCornerOverlay, this.inlineStartOverlay, this.bottomOverlay, this.bottomInlineStartCornerOverlay];
173
+ if (includeMaster) {
174
+ overlays.push(this.wtTable);
175
+ }
176
+ return overlays;
177
+ }
178
+
179
+ /**
180
+ * Retrieve browser line height and apply its value to `browserLineHeight`.
181
+ *
182
+ * @private
183
+ */
184
+ }, {
167
185
  key: "initBrowserLineHeight",
168
186
  value: function initBrowserLineHeight() {
169
187
  var _this$domBindings2 = this.domBindings,
@@ -594,12 +594,7 @@ var Table = /*#__PURE__*/function () {
594
594
  // column after rendered columns
595
595
  return -4;
596
596
  }
597
- var TR;
598
- if (row < 0) {
599
- TR = this.THEAD.childNodes[this.rowFilter.sourceRowToVisibleColHeadedRow(row)];
600
- } else {
601
- TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
602
- }
597
+ var TR = this.getRow(row);
603
598
  if (!TR && row >= 0) {
604
599
  throw new Error('TR was expected to be rendered but is not');
605
600
  }
@@ -610,6 +605,38 @@ var Table = /*#__PURE__*/function () {
610
605
  return TD;
611
606
  }
612
607
 
608
+ /**
609
+ * Get the DOM element of the row with the provided index.
610
+ *
611
+ * @param {number} rowIndex Row index.
612
+ * @returns {HTMLTableRowElement|boolean} Return the row's DOM element or `false` if the row with the provided
613
+ * index doesn't exist.
614
+ */
615
+ }, {
616
+ key: "getRow",
617
+ value: function getRow(rowIndex) {
618
+ var renderedRowIndex = null;
619
+ var parentElement = null;
620
+ if (rowIndex < 0) {
621
+ var _this$rowFilter;
622
+ renderedRowIndex = (_this$rowFilter = this.rowFilter) === null || _this$rowFilter === void 0 ? void 0 : _this$rowFilter.sourceRowToVisibleColHeadedRow(rowIndex);
623
+ parentElement = this.THEAD;
624
+ } else {
625
+ var _this$rowFilter2;
626
+ renderedRowIndex = (_this$rowFilter2 = this.rowFilter) === null || _this$rowFilter2 === void 0 ? void 0 : _this$rowFilter2.sourceToRendered(rowIndex);
627
+ parentElement = this.TBODY;
628
+ }
629
+ if (renderedRowIndex !== void 0 && parentElement !== void 0) {
630
+ if (parentElement.childNodes.length < renderedRowIndex + 1) {
631
+ return false;
632
+ } else {
633
+ return parentElement.childNodes[renderedRowIndex];
634
+ }
635
+ } else {
636
+ return false;
637
+ }
638
+ }
639
+
613
640
  /**
614
641
  * GetColumnHeader.
615
642
  *
@@ -589,12 +589,7 @@ var Table = /*#__PURE__*/function () {
589
589
  // column after rendered columns
590
590
  return -4;
591
591
  }
592
- var TR;
593
- if (row < 0) {
594
- TR = this.THEAD.childNodes[this.rowFilter.sourceRowToVisibleColHeadedRow(row)];
595
- } else {
596
- TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
597
- }
592
+ var TR = this.getRow(row);
598
593
  if (!TR && row >= 0) {
599
594
  throw new Error('TR was expected to be rendered but is not');
600
595
  }
@@ -605,6 +600,38 @@ var Table = /*#__PURE__*/function () {
605
600
  return TD;
606
601
  }
607
602
 
603
+ /**
604
+ * Get the DOM element of the row with the provided index.
605
+ *
606
+ * @param {number} rowIndex Row index.
607
+ * @returns {HTMLTableRowElement|boolean} Return the row's DOM element or `false` if the row with the provided
608
+ * index doesn't exist.
609
+ */
610
+ }, {
611
+ key: "getRow",
612
+ value: function getRow(rowIndex) {
613
+ var renderedRowIndex = null;
614
+ var parentElement = null;
615
+ if (rowIndex < 0) {
616
+ var _this$rowFilter;
617
+ renderedRowIndex = (_this$rowFilter = this.rowFilter) === null || _this$rowFilter === void 0 ? void 0 : _this$rowFilter.sourceRowToVisibleColHeadedRow(rowIndex);
618
+ parentElement = this.THEAD;
619
+ } else {
620
+ var _this$rowFilter2;
621
+ renderedRowIndex = (_this$rowFilter2 = this.rowFilter) === null || _this$rowFilter2 === void 0 ? void 0 : _this$rowFilter2.sourceToRendered(rowIndex);
622
+ parentElement = this.TBODY;
623
+ }
624
+ if (renderedRowIndex !== void 0 && parentElement !== void 0) {
625
+ if (parentElement.childNodes.length < renderedRowIndex + 1) {
626
+ return false;
627
+ } else {
628
+ return parentElement.childNodes[renderedRowIndex];
629
+ }
630
+ } else {
631
+ return false;
632
+ }
633
+ }
634
+
608
635
  /**
609
636
  * GetColumnHeader.
610
637
  *
package/CHANGELOG.md CHANGED
@@ -9,17 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  <!-- UNVERSIONED -->
11
11
 
12
- ## [12.3.1] - 2023-01-18
12
+ ## [12.3.1] - 2023-02-06
13
13
 
14
- ### Fixed
15
- - Fixed the _NestedRows_ plugin that did not react when the Core `updateData` method was called. [#466](https://github.com/handsontable/handsontable/issues/466)
16
- - Fixed unwanted rendered overlay that was visible in the Filters conditional component. [#83](https://github.com/handsontable/handsontable/issues/83)
14
+ ### Added
15
+ - Added Japanese translation for Copy with Headers feature. [#10201](https://github.com/handsontable/handsontable/pull/10201)
17
16
 
18
17
  ### Removed
19
- - Removed the license key delay condition that prevents printing warnings about key expiration in the console. [#588](https://github.com/handsontable/handsontable/issues/588)
18
+ - Removed the license key delay condition that prevents printing warnings about key expiration in the console. [#10175](https://github.com/handsontable/handsontable/pull/10175)
20
19
 
21
- ### Added
22
- - Added Japanese translation for Copy with Headers feature. [#950](https://github.com/handsontable/handsontable/issues/950)
20
+ ### Fixed
21
+ - Fixed the _NestedRows_ plugin that did not react when the Core `updateData` method was called. [#10178](https://github.com/handsontable/handsontable/pull/10178)
22
+ - Fixed a Chrome issue, where the freshly-merged cells were missing right and bottom borders. [#10212](https://github.com/handsontable/handsontable/pull/10212)
23
+ - Fixed an issue where some browser or system shortcuts left the CTRL/CMD key held down [#6441](https://github.com/handsontable/handsontable/issues/6441)
24
+ - Fixed unwanted rendered overlay that was visible in the Filters conditional component. [#10174](https://github.com/handsontable/handsontable/pull/10174)
23
25
 
24
26
  ## [12.3.0] - 2022-12-14
25
27
 
package/base.js CHANGED
@@ -46,8 +46,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
46
46
  Handsontable.CellCoords = _src.CellCoords;
47
47
  Handsontable.CellRange = _src.CellRange;
48
48
  Handsontable.packageName = 'handsontable';
49
- Handsontable.buildDate = "11/01/2023 12:33:40";
50
- Handsontable.version = "12.3.1-next-83e8a23-20230111";
49
+ Handsontable.buildDate = "02/02/2023 13:08:34";
50
+ Handsontable.version = "12.3.1-next-8792e1c-20230202";
51
51
  Handsontable.languages = {
52
52
  dictionaryKeys: _registry.dictionaryKeys,
53
53
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "11/01/2023 12:33:57";
39
- Handsontable.version = "12.3.1-next-83e8a23-20230111";
38
+ Handsontable.buildDate = "02/02/2023 13:08:48";
39
+ Handsontable.version = "12.3.1-next-8792e1c-20230202";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys: dictionaryKeys,
42
42
  getLanguageDictionary: getLanguageDictionary,
package/core.js CHANGED
@@ -4431,6 +4431,12 @@ function Core(rootElement, userSettings) {
4431
4431
  },
4432
4432
  ownerWindow: this.rootWindow
4433
4433
  });
4434
+ this.addHook('beforeOnCellMouseDown', function (event) {
4435
+ // Releasing keys as some browser/system shortcuts break events sequence (thus the `keyup` event isn't triggered).
4436
+ if (event.ctrlKey === false && event.metaKey === false) {
4437
+ shortcutManager.releasePressedKeys();
4438
+ }
4439
+ });
4434
4440
 
4435
4441
  /**
4436
4442
  * Returns instance of a manager responsible for handling shortcuts stored in some contexts. It run actions after
package/core.mjs CHANGED
@@ -4426,6 +4426,12 @@ export default function Core(rootElement, userSettings) {
4426
4426
  },
4427
4427
  ownerWindow: this.rootWindow
4428
4428
  });
4429
+ this.addHook('beforeOnCellMouseDown', function (event) {
4430
+ // Releasing keys as some browser/system shortcuts break events sequence (thus the `keyup` event isn't triggered).
4431
+ if (event.ctrlKey === false && event.metaKey === false) {
4432
+ shortcutManager.releasePressedKeys();
4433
+ }
4434
+ });
4429
4435
 
4430
4436
  /**
4431
4437
  * Returns instance of a manager responsible for handling shortcuts stored in some contexts. It run actions after
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 12.3.1-next-83e8a23-20230111
29
- * Release date: 18/01/2023 (built at 11/01/2023 12:34:12)
28
+ * Version: 12.3.1-next-8792e1c-20230202
29
+ * Release date: 06/02/2023 (built at 02/02/2023 13:08:59)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 12.3.1-next-83e8a23-20230111
29
- * Release date: 18/01/2023 (built at 11/01/2023 12:34:12)
28
+ * Version: 12.3.1-next-8792e1c-20230202
29
+ * Release date: 06/02/2023 (built at 02/02/2023 13:08:59)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles