@handsontable/react 0.0.0-next-62e5d46-20231113 → 0.0.0-next-ccae2b1-20231113
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/commonjs/react-handsontable.js +8 -22
- package/dist/react-handsontable.js +9 -23
- package/dist/react-handsontable.js.map +1 -1
- package/dist/react-handsontable.min.js +2 -2
- package/dist/react-handsontable.min.js.map +1 -1
- package/es/react-handsontable.mjs +8 -22
- package/helpers.d.ts +1 -7
- package/hotTable.d.ts +1 -1
- package/package.json +3 -3
|
@@ -187,7 +187,6 @@ function _toPropertyKey(arg) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
var bulkComponentContainer = null;
|
|
190
|
-
var notifiedMissingIdWarn = false;
|
|
191
190
|
/**
|
|
192
191
|
* Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
|
|
193
192
|
*/
|
|
@@ -252,12 +251,14 @@ function getOriginalEditorClass(editorElement) {
|
|
|
252
251
|
/**
|
|
253
252
|
* Create an editor portal.
|
|
254
253
|
*
|
|
255
|
-
* @param {Document} doc Document to be used.
|
|
254
|
+
* @param {Document} [doc] Document to be used.
|
|
256
255
|
* @param {React.ReactElement} editorElement Editor's element.
|
|
257
256
|
* @returns {React.ReactPortal} The portal for the editor.
|
|
258
257
|
*/
|
|
259
|
-
function createEditorPortal(
|
|
260
|
-
|
|
258
|
+
function createEditorPortal() {
|
|
259
|
+
var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
|
260
|
+
var editorElement = arguments.length > 1 ? arguments[1] : undefined;
|
|
261
|
+
if (editorElement === null) {
|
|
261
262
|
return null;
|
|
262
263
|
}
|
|
263
264
|
var containerProps = getContainerAttributesProps(editorElement.props, false);
|
|
@@ -329,24 +330,12 @@ function createPortal(rElement, props) {
|
|
|
329
330
|
*/
|
|
330
331
|
function getContainerAttributesProps(props) {
|
|
331
332
|
var randomizeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
332
|
-
if (!notifiedMissingIdWarn && !props.id && randomizeId) {
|
|
333
|
-
notifiedMissingIdWarn = true;
|
|
334
|
-
warn('You have to provide an `id` property for the `HotTable` component.');
|
|
335
|
-
}
|
|
336
333
|
return {
|
|
337
334
|
id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : void 0),
|
|
338
335
|
className: props.className || '',
|
|
339
336
|
style: props.style || {}
|
|
340
337
|
};
|
|
341
338
|
}
|
|
342
|
-
/**
|
|
343
|
-
* Checks if the environment that the code runs in is a browser.
|
|
344
|
-
*
|
|
345
|
-
* @returns {boolean}
|
|
346
|
-
*/
|
|
347
|
-
function isCSR() {
|
|
348
|
-
return typeof window !== 'undefined';
|
|
349
|
-
}
|
|
350
339
|
|
|
351
340
|
var SettingsMapper = /*#__PURE__*/function () {
|
|
352
341
|
function SettingsMapper() {
|
|
@@ -505,7 +494,7 @@ var RenderersPortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
505
494
|
return RenderersPortalManager;
|
|
506
495
|
}(React__default["default"].Component);
|
|
507
496
|
|
|
508
|
-
var version="0.0.0-next-
|
|
497
|
+
var version="0.0.0-next-ccae2b1-20231113";
|
|
509
498
|
|
|
510
499
|
function createCommonjsModule(fn, module) {
|
|
511
500
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -1778,10 +1767,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
1778
1767
|
}, {
|
|
1779
1768
|
key: "getOwnerDocument",
|
|
1780
1769
|
value: function getOwnerDocument() {
|
|
1781
|
-
|
|
1782
|
-
return this.hotElementRef ? this.hotElementRef.ownerDocument : document;
|
|
1783
|
-
}
|
|
1784
|
-
return null;
|
|
1770
|
+
return this.hotElementRef ? this.hotElementRef.ownerDocument : document;
|
|
1785
1771
|
}
|
|
1786
1772
|
/**
|
|
1787
1773
|
* Set the reference to the main Handsontable DOM element.
|
|
@@ -2068,6 +2054,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
2068
2054
|
key: "render",
|
|
2069
2055
|
value: function render() {
|
|
2070
2056
|
var _this5 = this;
|
|
2057
|
+
var containerProps = getContainerAttributesProps(this.props);
|
|
2071
2058
|
var isHotColumn = function isHotColumn(childNode) {
|
|
2072
2059
|
return childNode.type === HotColumn;
|
|
2073
2060
|
};
|
|
@@ -2088,7 +2075,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
2088
2075
|
children: childNode.props.children
|
|
2089
2076
|
});
|
|
2090
2077
|
});
|
|
2091
|
-
var containerProps = getContainerAttributesProps(this.props);
|
|
2092
2078
|
var editorPortal = createEditorPortal(this.getOwnerDocument(), this.getGlobalEditorElement());
|
|
2093
2079
|
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("div", Object.assign({
|
|
2094
2080
|
ref: this.setHotElementRef.bind(this)
|
|
@@ -25,7 +25,7 @@
|
|
|
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-
|
|
28
|
+
* Version: 0.0.0-next-ccae2b1-20231113 (built at Mon Nov 13 2023 12:50:06 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
30
|
(function (global, factory) {
|
|
31
31
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('handsontable/base')) :
|
|
@@ -214,7 +214,6 @@ function _toPropertyKey(arg) {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
var bulkComponentContainer = null;
|
|
217
|
-
var notifiedMissingIdWarn = false;
|
|
218
217
|
/**
|
|
219
218
|
* Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
|
|
220
219
|
*/
|
|
@@ -279,12 +278,14 @@ function getOriginalEditorClass(editorElement) {
|
|
|
279
278
|
/**
|
|
280
279
|
* Create an editor portal.
|
|
281
280
|
*
|
|
282
|
-
* @param {Document} doc Document to be used.
|
|
281
|
+
* @param {Document} [doc] Document to be used.
|
|
283
282
|
* @param {React.ReactElement} editorElement Editor's element.
|
|
284
283
|
* @returns {React.ReactPortal} The portal for the editor.
|
|
285
284
|
*/
|
|
286
|
-
function createEditorPortal(
|
|
287
|
-
|
|
285
|
+
function createEditorPortal() {
|
|
286
|
+
var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
|
287
|
+
var editorElement = arguments.length > 1 ? arguments[1] : undefined;
|
|
288
|
+
if (editorElement === null) {
|
|
288
289
|
return null;
|
|
289
290
|
}
|
|
290
291
|
var containerProps = getContainerAttributesProps(editorElement.props, false);
|
|
@@ -356,24 +357,12 @@ function createPortal(rElement, props) {
|
|
|
356
357
|
*/
|
|
357
358
|
function getContainerAttributesProps(props) {
|
|
358
359
|
var randomizeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
359
|
-
if (!notifiedMissingIdWarn && !props.id && randomizeId) {
|
|
360
|
-
notifiedMissingIdWarn = true;
|
|
361
|
-
warn('You have to provide an `id` property for the `HotTable` component.');
|
|
362
|
-
}
|
|
363
360
|
return {
|
|
364
361
|
id: props.id || (randomizeId ? 'hot-' + Math.random().toString(36).substring(5) : void 0),
|
|
365
362
|
className: props.className || '',
|
|
366
363
|
style: props.style || {}
|
|
367
364
|
};
|
|
368
365
|
}
|
|
369
|
-
/**
|
|
370
|
-
* Checks if the environment that the code runs in is a browser.
|
|
371
|
-
*
|
|
372
|
-
* @returns {boolean}
|
|
373
|
-
*/
|
|
374
|
-
function isCSR() {
|
|
375
|
-
return typeof window !== 'undefined';
|
|
376
|
-
}
|
|
377
366
|
|
|
378
367
|
var SettingsMapper = /*#__PURE__*/function () {
|
|
379
368
|
function SettingsMapper() {
|
|
@@ -532,7 +521,7 @@ var RenderersPortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
532
521
|
return RenderersPortalManager;
|
|
533
522
|
}(React__default["default"].Component);
|
|
534
523
|
|
|
535
|
-
var version="0.0.0-next-
|
|
524
|
+
var version="0.0.0-next-ccae2b1-20231113";
|
|
536
525
|
|
|
537
526
|
function createCommonjsModule(fn, module) {
|
|
538
527
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -1027,10 +1016,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
1027
1016
|
}, {
|
|
1028
1017
|
key: "getOwnerDocument",
|
|
1029
1018
|
value: function getOwnerDocument() {
|
|
1030
|
-
|
|
1031
|
-
return this.hotElementRef ? this.hotElementRef.ownerDocument : document;
|
|
1032
|
-
}
|
|
1033
|
-
return null;
|
|
1019
|
+
return this.hotElementRef ? this.hotElementRef.ownerDocument : document;
|
|
1034
1020
|
}
|
|
1035
1021
|
/**
|
|
1036
1022
|
* Set the reference to the main Handsontable DOM element.
|
|
@@ -1317,6 +1303,7 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
1317
1303
|
key: "render",
|
|
1318
1304
|
value: function render() {
|
|
1319
1305
|
var _this5 = this;
|
|
1306
|
+
var containerProps = getContainerAttributesProps(this.props);
|
|
1320
1307
|
var isHotColumn = function isHotColumn(childNode) {
|
|
1321
1308
|
return childNode.type === HotColumn;
|
|
1322
1309
|
};
|
|
@@ -1337,7 +1324,6 @@ var HotTable = /*#__PURE__*/function (_React$Component) {
|
|
|
1337
1324
|
children: childNode.props.children
|
|
1338
1325
|
});
|
|
1339
1326
|
});
|
|
1340
|
-
var containerProps = getContainerAttributesProps(this.props);
|
|
1341
1327
|
var editorPortal = createEditorPortal(this.getOwnerDocument(), this.getGlobalEditorElement());
|
|
1342
1328
|
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("div", Object.assign({
|
|
1343
1329
|
ref: this.setHotElementRef.bind(this)
|