handsontable 0.0.0-next-4fd87f2-20230117 → 0.0.0-next-dc185b9-20230124

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

@@ -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/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 = "17/01/2023 08:50:55";
50
- Handsontable.version = "0.0.0-next-4fd87f2-20230117";
49
+ Handsontable.buildDate = "24/01/2023 09:47:10";
50
+ Handsontable.version = "0.0.0-next-dc185b9-20230124";
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 = "17/01/2023 08:51:09";
39
- Handsontable.version = "0.0.0-next-4fd87f2-20230117";
38
+ Handsontable.buildDate = "24/01/2023 09:47:24";
39
+ Handsontable.version = "0.0.0-next-dc185b9-20230124";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys: dictionaryKeys,
42
42
  getLanguageDictionary: getLanguageDictionary,
@@ -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: 0.0.0-next-4fd87f2-20230117
29
- * Release date: 14/12/2022 (built at 17/01/2023 08:51:21)
28
+ * Version: 0.0.0-next-dc185b9-20230124
29
+ * Release date: 14/12/2022 (built at 24/01/2023 09:47:36)
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: 0.0.0-next-4fd87f2-20230117
29
- * Release date: 14/12/2022 (built at 17/01/2023 08:51:21)
28
+ * Version: 0.0.0-next-dc185b9-20230124
29
+ * Release date: 14/12/2022 (built at 24/01/2023 09:47:36)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles