@handsontable/react-wrapper 0.0.0-next-0437dba-20260331 → 0.0.0-next-2645bc1-20260401

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.
@@ -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-0437dba-20260331 (built at Tue Mar 31 2026 13:38:36 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-2645bc1-20260401 (built at Wed Apr 01 2026 08:58:32 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'), require('handsontable/renderers/registry'), require('handsontable/editors/registry')) :
@@ -40,38 +40,46 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultCompat(ReactDOM);
40
40
  var Handsontable__default = /*#__PURE__*/_interopDefaultCompat(Handsontable);
41
41
 
42
42
  var bulkComponentContainer = null;
43
- /**
44
- * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
43
+
44
+ /**
45
+ * Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
45
46
  */
46
47
  var AUTOSIZE_WARNING = 'Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with ' + ' the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.';
47
- /**
48
- * Warning message for the `hot-renderer` obsolete renderer passing method.
48
+
49
+ /**
50
+ * Warning message for the `hot-renderer` obsolete renderer passing method.
49
51
  */
50
52
  var OBSOLETE_HOTRENDERER_WARNING = 'Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. ' + 'Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead.';
51
- /**
52
- * Warning message for the `hot-editor` obsolete editor passing method.
53
+
54
+ /**
55
+ * Warning message for the `hot-editor` obsolete editor passing method.
53
56
  */
54
57
  var OBSOLETE_HOTEDITOR_WARNING = 'Providing a component-based editor using `hot-editor`-annotated component is no longer supported. ' + 'Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead.';
55
- /**
56
- * Warning message for the unexpected children of HotTable component.
58
+
59
+ /**
60
+ * Warning message for the unexpected children of HotTable component.
57
61
  */
58
62
  var UNEXPECTED_HOTTABLE_CHILDREN_WARNING = 'Unexpected children nodes found in HotTable component. ' + 'Only HotColumn components are allowed.';
59
- /**
60
- * Warning message for the unexpected children of HotColumn component.
63
+
64
+ /**
65
+ * Warning message for the unexpected children of HotColumn component.
61
66
  */
62
67
  var UNEXPECTED_HOTCOLUMN_CHILDREN_WARNING = 'Unexpected children nodes found in HotColumn component. ' + 'HotColumn components do not support any children.';
63
- /**
64
- * Message for the warning thrown if the Handsontable instance has been destroyed.
68
+
69
+ /**
70
+ * Message for the warning thrown if the Handsontable instance has been destroyed.
65
71
  */
66
72
  var HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
67
- /**
68
- * Default classname given to the wrapper container.
73
+
74
+ /**
75
+ * Default classname given to the wrapper container.
69
76
  */
70
77
  var DEFAULT_CLASSNAME = 'hot-wrapper-editor-container';
71
- /**
72
- * Logs warn to the console if the `console` object is exposed.
73
- *
74
- * @param {...*} args Values which will be logged.
78
+
79
+ /**
80
+ * Logs warn to the console if the `console` object is exposed.
81
+ *
82
+ * @param {...*} args Values which will be logged.
75
83
  */
76
84
  function warn() {
77
85
  if (typeof console !== 'undefined') {
@@ -79,10 +87,11 @@ function warn() {
79
87
  (_console = console).warn.apply(_console, arguments);
80
88
  }
81
89
  }
82
- /**
83
- * Detect if `hot-renderer` or `hot-editor` is defined, and if so, throw an incompatibility warning.
84
- *
85
- * @returns {boolean} 'true' if the warning was issued
90
+
91
+ /**
92
+ * Detect if `hot-renderer` or `hot-editor` is defined, and if so, throw an incompatibility warning.
93
+ *
94
+ * @returns {boolean} 'true' if the warning was issued
86
95
  */
87
96
  function displayObsoleteRenderersEditorsWarning(children) {
88
97
  if (hasChildElementOfType(children, 'hot-renderer')) {
@@ -95,12 +104,13 @@ function displayObsoleteRenderersEditorsWarning(children) {
95
104
  }
96
105
  return false;
97
106
  }
98
- /**
99
- * Detect if children of specified type are defined, and if so, throw an incompatibility warning.
100
- *
101
- * @param {ReactNode} children Component children nodes
102
- * @param {ComponentType} Component Component type to check
103
- * @returns {boolean} 'true' if the warning was issued
107
+
108
+ /**
109
+ * Detect if children of specified type are defined, and if so, throw an incompatibility warning.
110
+ *
111
+ * @param {ReactNode} children Component children nodes
112
+ * @param {ComponentType} Component Component type to check
113
+ * @returns {boolean} 'true' if the warning was issued
104
114
  */
105
115
  function displayChildrenOfTypeWarning(children, Component) {
106
116
  var childrenArray = React__default["default"].Children.toArray(children);
@@ -112,11 +122,12 @@ function displayChildrenOfTypeWarning(children, Component) {
112
122
  }
113
123
  return false;
114
124
  }
115
- /**
116
- * Detect if children is defined, and if so, throw an incompatibility warning.
117
- *
118
- * @param {ReactNode} children Component children nodes
119
- * @returns {boolean} 'true' if the warning was issued
125
+
126
+ /**
127
+ * Detect if children is defined, and if so, throw an incompatibility warning.
128
+ *
129
+ * @param {ReactNode} children Component children nodes
130
+ * @returns {boolean} 'true' if the warning was issued
120
131
  */
121
132
  function displayAnyChildrenWarning(children) {
122
133
  var childrenArray = React__default["default"].Children.toArray(children);
@@ -126,12 +137,13 @@ function displayAnyChildrenWarning(children) {
126
137
  }
127
138
  return false;
128
139
  }
129
- /**
130
- * Check the existence of elements of the provided `type` from the `HotColumn` component's children.
131
- *
132
- * @param {ReactNode} children HotTable children array.
133
- * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.
134
- * @returns {boolean} `true` if the child of that type was found, `false` otherwise.
140
+
141
+ /**
142
+ * Check the existence of elements of the provided `type` from the `HotColumn` component's children.
143
+ *
144
+ * @param {ReactNode} children HotTable children array.
145
+ * @param {String} type Either `'hot-renderer'` or `'hot-editor'`.
146
+ * @returns {boolean} `true` if the child of that type was found, `false` otherwise.
135
147
  */
136
148
  function hasChildElementOfType(children, type) {
137
149
  var childrenArray = React__default["default"].Children.toArray(children);
@@ -139,30 +151,32 @@ function hasChildElementOfType(children, type) {
139
151
  return child.props[type] !== void 0;
140
152
  });
141
153
  }
142
- /**
143
- * Create an editor portal.
144
- *
145
- * @param {Document} doc Document to be used.
146
- * @param {ComponentType} Editor Editor component or render function.
147
- * @returns {ReactPortal} The portal for the editor.
154
+
155
+ /**
156
+ * Create an editor portal.
157
+ *
158
+ * @param {Document} doc Document to be used.
159
+ * @param {ComponentType} Editor Editor component or render function.
160
+ * @returns {ReactPortal} The portal for the editor.
148
161
  */
149
162
  function createEditorPortal(doc, Editor) {
150
163
  if (!doc || !Editor || typeof Editor === 'boolean') {
151
164
  return null;
152
165
  }
153
- var editorElement = React__default["default"].createElement(Editor, null);
166
+ var editorElement = /*#__PURE__*/React__default["default"].createElement(Editor, null);
154
167
  var containerProps = getContainerAttributesProps({}, false);
155
168
  containerProps.className = "".concat(DEFAULT_CLASSNAME, " ").concat(containerProps.className);
156
- return ReactDOM__default["default"].createPortal(React__default["default"].createElement("div", Object.assign({}, containerProps), editorElement), doc.body);
169
+ return /*#__PURE__*/ReactDOM__default["default"].createPortal(/*#__PURE__*/React__default["default"].createElement("div", containerProps, editorElement), doc.body);
157
170
  }
158
- /**
159
- * Render a cell component to an external DOM node.
160
- *
161
- * @param {React.ReactElement} rElement React element to be used as a base for the component.
162
- * @param {Document} [ownerDocument] The owner document to set the portal up into.
163
- * @param {String} portalKey The key to be used for the portal.
164
- * @param {HTMLElement} [cachedContainer] The cached container to be used for the portal.
165
- * @returns {{portal: ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.
171
+
172
+ /**
173
+ * Render a cell component to an external DOM node.
174
+ *
175
+ * @param {React.ReactElement} rElement React element to be used as a base for the component.
176
+ * @param {Document} [ownerDocument] The owner document to set the portal up into.
177
+ * @param {String} portalKey The key to be used for the portal.
178
+ * @param {HTMLElement} [cachedContainer] The cached container to be used for the portal.
179
+ * @returns {{portal: ReactPortal, portalContainer: HTMLElement}} An object containing the portal and its container.
166
180
  */
167
181
  function createPortal(rElement) {
168
182
  var ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
@@ -177,18 +191,19 @@ function createPortal(rElement) {
177
191
  var portalContainer = cachedContainer !== null && cachedContainer !== void 0 ? cachedContainer : ownerDocument.createElement('DIV');
178
192
  bulkComponentContainer.appendChild(portalContainer);
179
193
  return {
180
- portal: ReactDOM__default["default"].createPortal(rElement, portalContainer, portalKey),
194
+ portal: /*#__PURE__*/ReactDOM__default["default"].createPortal(rElement, portalContainer, portalKey),
181
195
  portalContainer: portalContainer
182
196
  };
183
197
  }
184
- /**
185
- * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
186
- * component.
187
- *
188
- * @param {HotTableProps} props Object containing the React element props.
189
- * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.
190
- * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
191
- * component.
198
+
199
+ /**
200
+ * Get an object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
201
+ * component.
202
+ *
203
+ * @param {HotTableProps} props Object containing the React element props.
204
+ * @param {Boolean} randomizeId If set to `true`, the function will randomize the `id` property when no `id` was present in the `prop` object.
205
+ * @returns An object containing the `id`, `className` and `style` keys, representing the corresponding props passed to the
206
+ * component.
192
207
  */
193
208
  function getContainerAttributesProps(props) {
194
209
  var randomizeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
@@ -198,19 +213,21 @@ function getContainerAttributesProps(props) {
198
213
  style: props.style || {}
199
214
  };
200
215
  }
201
- /**
202
- * Checks if the environment that the code runs in is a browser.
203
- *
204
- * @returns {boolean}
216
+
217
+ /**
218
+ * Checks if the environment that the code runs in is a browser.
219
+ *
220
+ * @returns {boolean}
205
221
  */
206
222
  function isCSR() {
207
223
  return typeof window !== 'undefined';
208
224
  }
209
- /**
210
- * A variant of useEffect hook that does not trigger on initial mount, only updates
211
- *
212
- * @param effect Effect function
213
- * @param deps Effect dependencies
225
+
226
+ /**
227
+ * A variant of useEffect hook that does not trigger on initial mount, only updates
228
+ *
229
+ * @param effect Effect function
230
+ * @param deps Effect dependencies
214
231
  */
215
232
  function useUpdateEffect(effect, deps) {
216
233
  var notInitialRender = React__default["default"].useRef(false);
@@ -263,6 +280,15 @@ function _defineProperty(e, r, t) {
263
280
  writable: true
264
281
  }) : e[r] = t, e;
265
282
  }
283
+ function _extends() {
284
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
285
+ for (var e = 1; e < arguments.length; e++) {
286
+ var t = arguments[e];
287
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
288
+ }
289
+ return n;
290
+ }, _extends.apply(null, arguments);
291
+ }
266
292
  function _getPrototypeOf(t) {
267
293
  return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
268
294
  return t.__proto__ || Object.getPrototypeOf(t);
@@ -407,14 +433,14 @@ var SettingsMapper = /*#__PURE__*/function () {
407
433
  return _createClass(SettingsMapper, null, [{
408
434
  key: "getSettings",
409
435
  value:
410
- /**
411
- * Parse component settings into Handsontable-compatible settings.
412
- *
413
- * @param {Object} properties Object containing properties from the HotTable object.
414
- * @param {Object} additionalSettings Additional settings.
415
- * @param {boolean} additionalSettings.isInit Flag determining whether the settings are being set during initialization.
416
- * @param {string[]} additionalSettings.initOnlySettingKeys Array of keys that can be set only during initialization.
417
- * @returns {Object} Handsontable-compatible settings object.
436
+ /**
437
+ * Parse component settings into Handsontable-compatible settings.
438
+ *
439
+ * @param {Object} properties Object containing properties from the HotTable object.
440
+ * @param {Object} additionalSettings Additional settings.
441
+ * @param {boolean} additionalSettings.isInit Flag determining whether the settings are being set during initialization.
442
+ * @param {string[]} additionalSettings.initOnlySettingKeys Array of keys that can be set only during initialization.
443
+ * @returns {Object} Handsontable-compatible settings object.
418
444
  */
419
445
  function getSettings(properties) {
420
446
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -442,7 +468,7 @@ var SettingsMapper = /*#__PURE__*/function () {
442
468
  }]);
443
469
  }();
444
470
 
445
- var HotTableContext = React.createContext(undefined);
471
+ var HotTableContext = /*#__PURE__*/React.createContext(undefined);
446
472
  var HotTableContextProvider = function HotTableContextProvider(_ref) {
447
473
  var children = _ref.children;
448
474
  var columnsSettings = React.useRef([]);
@@ -462,6 +488,7 @@ var HotTableContextProvider = function HotTableContextProvider(_ref) {
462
488
  var getRendererWrapper = React.useCallback(function (Renderer) {
463
489
  return function __internalRenderer(instance, TD, row, col, prop, value, cellProperties) {
464
490
  var key = "".concat(row, "-").concat(col);
491
+
465
492
  // Handsontable.Core type is missing guid
466
493
  var instanceGuid = instance.guid;
467
494
  var portalContainerKey = "".concat(instanceGuid, "-").concat(key);
@@ -475,11 +502,12 @@ var HotTableContextProvider = function HotTableContextProvider(_ref) {
475
502
  while (TD.firstChild) {
476
503
  TD.removeChild(TD.firstChild);
477
504
  }
505
+
478
506
  // if portal already exists, do not recreate
479
507
  if (cachedPortal && cachedPortalContainer) {
480
508
  TD.appendChild(cachedPortalContainer);
481
509
  } else {
482
- var rendererElement = React__default["default"].createElement(Renderer, {
510
+ var rendererElement = /*#__PURE__*/React__default["default"].createElement(Renderer, {
483
511
  instance: instance,
484
512
  TD: TD,
485
513
  row: row,
@@ -521,20 +549,21 @@ var HotTableContextProvider = function HotTableContextProvider(_ref) {
521
549
  pushCellPortalsIntoPortalManager: pushCellPortalsIntoPortalManager
522
550
  };
523
551
  }, [setHotColumnSettings, getRendererWrapper, clearRenderedCellCache, setRenderersPortalManagerRef, pushCellPortalsIntoPortalManager]);
524
- return React__default["default"].createElement(HotTableContext.Provider, {
552
+ return /*#__PURE__*/React__default["default"].createElement(HotTableContext.Provider, {
525
553
  value: contextImpl
526
554
  }, children);
527
555
  };
528
- /**
529
- * Exposes the table context object to components
530
- *
531
- * @returns HotTableContext
556
+
557
+ /**
558
+ * Exposes the table context object to components
559
+ *
560
+ * @returns HotTableContext
532
561
  */
533
562
  function useHotTableContext() {
534
563
  return React.useContext(HotTableContext);
535
564
  }
536
565
 
537
- var HotColumnContext = React.createContext(undefined);
566
+ var HotColumnContext = /*#__PURE__*/React.createContext(undefined);
538
567
  var HotColumnContextProvider = function HotColumnContextProvider(_ref) {
539
568
  var columnIndex = _ref.columnIndex,
540
569
  getOwnerDocument = _ref.getOwnerDocument,
@@ -545,7 +574,7 @@ var HotColumnContextProvider = function HotColumnContextProvider(_ref) {
545
574
  getOwnerDocument: getOwnerDocument
546
575
  };
547
576
  }, [columnIndex, getOwnerDocument]);
548
- return React__default["default"].createElement(HotColumnContext.Provider, {
577
+ return /*#__PURE__*/React__default["default"].createElement(HotColumnContext.Provider, {
549
578
  value: contextImpl
550
579
  }, children);
551
580
  };
@@ -561,12 +590,13 @@ var MethodsMap = {
561
590
  prepare: 'onPrepare',
562
591
  focus: 'onFocus'
563
592
  };
564
- /**
565
- * Create a class to be passed to the Handsontable's settings.
566
- *
567
- * @param {RefObject<HotEditorHooks>} hooksRef Reference to component-based editor overridden hooks object.
568
- * @param {RefObject} instanceRef Reference to Handsontable-native custom editor class instance.
569
- * @returns {Function} A class to be passed to the Handsontable editor settings.
593
+
594
+ /**
595
+ * Create a class to be passed to the Handsontable's settings.
596
+ *
597
+ * @param {RefObject<HotEditorHooks>} hooksRef Reference to component-based editor overridden hooks object.
598
+ * @param {RefObject} instanceRef Reference to Handsontable-native custom editor class instance.
599
+ * @returns {Function} A class to be passed to the Handsontable editor settings.
570
600
  */
571
601
  function makeEditorClass(hooksRef, instanceRef) {
572
602
  return /*#__PURE__*/function (_Handsontable$editors) {
@@ -590,8 +620,8 @@ function makeEditorClass(hooksRef, instanceRef) {
590
620
  result = baseMethod.call.apply(baseMethod, [this].concat(args)); // call super
591
621
  }
592
622
  if (MethodsMap[propName] && (_hooksRef$current = hooksRef.current) !== null && _hooksRef$current !== void 0 && _hooksRef$current[MethodsMap[propName]]) {
593
- var _hooksRef$current$Met;
594
- result = (_hooksRef$current$Met = hooksRef.current[MethodsMap[propName]]).call.apply(_hooksRef$current$Met, [this].concat(args));
623
+ var _ref;
624
+ result = (_ref = hooksRef.current[MethodsMap[propName]]).call.apply(_ref, [this].concat(args));
595
625
  }
596
626
  return result;
597
627
  }.bind(_this);
@@ -621,31 +651,31 @@ function makeEditorClass(hooksRef, instanceRef) {
621
651
  }]);
622
652
  }(Handsontable__default["default"].editors.BaseEditor);
623
653
  }
624
- /**
625
- * Context to provide Handsontable-native custom editor class instance to overridden hooks object.
654
+ /**
655
+ * Context to provide Handsontable-native custom editor class instance to overridden hooks object.
626
656
  */
627
- var EditorContext = React.createContext(undefined);
628
- /**
629
- * Provider of the context that exposes Handsontable-native editor instance and passes hooks object
630
- * for custom editor components.
631
- *
632
- * @param {Ref} hooksRef Reference for component-based editor overridden hooks object.
633
- * @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.
657
+ var EditorContext = /*#__PURE__*/React.createContext(undefined);
658
+ /**
659
+ * Provider of the context that exposes Handsontable-native editor instance and passes hooks object
660
+ * for custom editor components.
661
+ *
662
+ * @param {Ref} hooksRef Reference for component-based editor overridden hooks object.
663
+ * @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.
634
664
  */
635
- var EditorContextProvider = function EditorContextProvider(_ref) {
636
- var hooksRef = _ref.hooksRef,
637
- hotCustomEditorInstanceRef = _ref.hotCustomEditorInstanceRef,
638
- children = _ref.children;
639
- return React__default["default"].createElement(EditorContext.Provider, {
665
+ var EditorContextProvider = function EditorContextProvider(_ref2) {
666
+ var hooksRef = _ref2.hooksRef,
667
+ hotCustomEditorInstanceRef = _ref2.hotCustomEditorInstanceRef,
668
+ children = _ref2.children;
669
+ return /*#__PURE__*/React__default["default"].createElement(EditorContext.Provider, {
640
670
  value: {
641
671
  hooksRef: hooksRef,
642
672
  hotCustomEditorInstanceRef: hotCustomEditorInstanceRef
643
673
  }
644
674
  }, children);
645
675
  };
646
- /**
647
- * Applies editor overlay position/dimensions to an element.
648
- * @returns true if position was applied, false if editor should close (e.g. cell no longer available).
676
+ /**
677
+ * Applies editor overlay position/dimensions to an element.
678
+ * @returns true if position was applied, false if editor should close (e.g. cell no longer available).
649
679
  */
650
680
  function applyEditorPosition(el, editor, hot, td) {
651
681
  var _rootWindow$pageXOffs, _rootWindow$pageYOffs;
@@ -695,17 +725,18 @@ function applyEditorPosition(el, editor, hot, td) {
695
725
  }
696
726
  return false;
697
727
  }
698
- /**
699
- * Hook that allows encapsulating custom behaviours of component-based editor by customizing passed ref with overridden hooks object.
700
- *
701
- * @param {HotEditorHooks} overriddenHooks Overrides specific for the custom editor.
702
- * @param {DependencyList} deps Overridden hooks object React dependency list.
703
- * @returns {UseHotEditorImpl} Editor API methods
728
+
729
+ /**
730
+ * Hook that allows encapsulating custom behaviours of component-based editor by customizing passed ref with overridden hooks object.
731
+ *
732
+ * @param {HotEditorHooks} overriddenHooks Overrides specific for the custom editor.
733
+ * @param {DependencyList} deps Overridden hooks object React dependency list.
734
+ * @returns {UseHotEditorImpl} Editor API methods
704
735
  */
705
736
  function useHotEditor(overriddenHooks, deps) {
706
- var _useContext = React.useContext(EditorContext),
707
- hooksRef = _useContext.hooksRef,
708
- hotCustomEditorInstanceRef = _useContext.hotCustomEditorInstanceRef;
737
+ var _ref3 = React.useContext(EditorContext),
738
+ hooksRef = _ref3.hooksRef,
739
+ hotCustomEditorInstanceRef = _ref3.hotCustomEditorInstanceRef;
709
740
  var _useState = React.useState(0),
710
741
  _useState2 = _slicedToArray(_useState, 2),
711
742
  rerenderTrigger = _useState2[0],
@@ -714,6 +745,7 @@ function useHotEditor(overriddenHooks, deps) {
714
745
  _useState4 = _slicedToArray(_useState3, 2),
715
746
  editorValue = _useState4[0],
716
747
  setEditorValue = _useState4[1];
748
+
717
749
  // return a deferred value that allows for optimizing performance by delaying the update of a value until the next render.
718
750
  var deferredValue = React.useDeferredValue(editorValue);
719
751
  React.useImperativeHandle(hooksRef, function () {
@@ -757,23 +789,28 @@ function useHotEditor(overriddenHooks, deps) {
757
789
  };
758
790
  }, [rerenderTrigger, hotCustomEditorInstanceRef, deferredValue]);
759
791
  }
760
- function EditorComponent(_ref2) {
761
- var _onPrepare = _ref2.onPrepare,
762
- _onClose = _ref2.onClose,
763
- _onOpen = _ref2.onOpen,
764
- _onFocus = _ref2.onFocus,
765
- children = _ref2.children,
766
- _ref2$shortcutsGroup = _ref2.shortcutsGroup,
767
- shortcutsGroup = _ref2$shortcutsGroup === void 0 ? "custom-editor" : _ref2$shortcutsGroup,
768
- shortcuts = _ref2.shortcuts;
792
+
793
+ // Render prop function type
794
+
795
+ // EditorComponent props - children typed to work with JSX syntax
796
+
797
+ function EditorComponent(_ref4) {
798
+ var _onPrepare = _ref4.onPrepare,
799
+ _onClose = _ref4.onClose,
800
+ _onOpen = _ref4.onOpen,
801
+ _onFocus = _ref4.onFocus,
802
+ children = _ref4.children,
803
+ _ref4$shortcutsGroup = _ref4.shortcutsGroup,
804
+ shortcutsGroup = _ref4$shortcutsGroup === void 0 ? "custom-editor" : _ref4$shortcutsGroup,
805
+ shortcuts = _ref4.shortcuts;
769
806
  var mainElementRef = React.useRef(null);
770
807
  var currentValue = React.useRef(undefined);
771
808
  var _useState5 = React.useState(),
772
809
  _useState6 = _slicedToArray(_useState5, 2),
773
810
  themeClassName = _useState6[0],
774
811
  setThemeClassName = _useState6[1];
775
- var _useContext2 = React.useContext(EditorContext),
776
- hotCustomEditorInstanceRef = _useContext2.hotCustomEditorInstanceRef;
812
+ var _ref5 = React.useContext(EditorContext),
813
+ hotCustomEditorInstanceRef = _ref5.hotCustomEditorInstanceRef;
777
814
  var registerShortcuts = React.useCallback(function () {
778
815
  var _hotCustomEditorInsta8, _hotCustomEditorInsta9, _hotCustomEditorInsta0;
779
816
  if (!((_hotCustomEditorInsta8 = hotCustomEditorInstanceRef.current) !== null && _hotCustomEditorInsta8 !== void 0 && _hotCustomEditorInsta8.hot)) return;
@@ -876,7 +913,7 @@ function EditorComponent(_ref2) {
876
913
  var stopMousedownPropagation = function stopMousedownPropagation(e) {
877
914
  e.stopPropagation();
878
915
  };
879
- return React__default["default"].createElement("div", {
916
+ return /*#__PURE__*/React__default["default"].createElement("div", {
880
917
  ref: mainElementRef,
881
918
  className: themeClassName,
882
919
  style: {
@@ -911,22 +948,25 @@ var HotColumn = function HotColumn(props) {
911
948
  var _useHotColumnContext = useHotColumnContext(),
912
949
  columnIndex = _useHotColumnContext.columnIndex,
913
950
  getOwnerDocument = _useHotColumnContext.getOwnerDocument;
914
- /**
915
- * Reference to component-based editor overridden hooks object.
951
+
952
+ /**
953
+ * Reference to component-based editor overridden hooks object.
916
954
  */
917
955
  var localEditorHooksRef = React.useRef(null);
918
- /**
919
- * Reference to HOT-native custom editor class instance.
956
+
957
+ /**
958
+ * Reference to HOT-native custom editor class instance.
920
959
  */
921
960
  var localEditorClassInstance = React.useRef(null);
922
- /**
923
- * Logic performed after mounting & updating of the HotColumn component.
961
+
962
+ /**
963
+ * Logic performed after mounting & updating of the HotColumn component.
924
964
  */
925
965
  React.useEffect(function () {
926
- /**
927
- * Filter out all the internal properties and return an object with just the Handsontable-related props.
928
- *
929
- * @returns {Object}
966
+ /**
967
+ * Filter out all the internal properties and return an object with just the Handsontable-related props.
968
+ *
969
+ * @returns {Object}
930
970
  */
931
971
  var getSettingsProps = function getSettingsProps() {
932
972
  return Object.keys(props).filter(function (key) {
@@ -936,8 +976,9 @@ var HotColumn = function HotColumn(props) {
936
976
  return obj;
937
977
  }, {});
938
978
  };
939
- /**
940
- * Create the column settings based on the data provided to the `HotColumn` component and its child components.
979
+
980
+ /**
981
+ * Create the column settings based on the data provided to the `HotColumn` component and its child components.
941
982
  */
942
983
  var createColumnSettings = function createColumnSettings() {
943
984
  var columnSettings = SettingsMapper.getSettings(getSettingsProps());
@@ -961,23 +1002,24 @@ var HotColumn = function HotColumn(props) {
961
1002
  }
962
1003
  });
963
1004
  var editorPortal = createEditorPortal(getOwnerDocument(), props.editor);
964
- /**
965
- * Render the portals of the editors, if there are any.
966
- *
967
- * @returns {ReactElement}
1005
+
1006
+ /**
1007
+ * Render the portals of the editors, if there are any.
1008
+ *
1009
+ * @returns {ReactElement}
968
1010
  */
969
- return React__default["default"].createElement(EditorContextProvider, {
1011
+ return /*#__PURE__*/React__default["default"].createElement(EditorContextProvider, {
970
1012
  hooksRef: localEditorHooksRef,
971
1013
  hotCustomEditorInstanceRef: localEditorClassInstance
972
1014
  }, editorPortal);
973
1015
  };
974
1016
 
975
- var version="0.0.0-next-0437dba-20260331";
1017
+ var version="0.0.0-next-2645bc1-20260401";
976
1018
 
977
- /**
978
- * Component used to manage the renderer component portals.
1019
+ /**
1020
+ * Component used to manage the renderer component portals.
979
1021
  */
980
- var RenderersPortalManager = React.forwardRef(function (_, ref) {
1022
+ var RenderersPortalManager = /*#__PURE__*/React.forwardRef(function (_, ref) {
981
1023
  var _useState = React.useState([]),
982
1024
  _useState2 = _slicedToArray(_useState, 2),
983
1025
  portals = _useState2[0],
@@ -985,7 +1027,7 @@ var RenderersPortalManager = React.forwardRef(function (_, ref) {
985
1027
  React.useImperativeHandle(ref, function () {
986
1028
  return setPortals;
987
1029
  });
988
- return React__default["default"].createElement(React.Fragment, null, portals);
1030
+ return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, portals);
989
1031
  });
990
1032
 
991
1033
  function getDefaultExportFromCjs (x) {
@@ -1084,33 +1126,39 @@ function requireFactoryWithThrowingShims() {
1084
1126
  var propTypesExports = propTypes.exports;
1085
1127
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
1086
1128
 
1087
- var HotTableInner = React.forwardRef(function (props, ref) {
1088
- /**
1089
- * Reference to the Handsontable instance.
1129
+ var HotTableInner = /*#__PURE__*/React.forwardRef(function (props, ref) {
1130
+ /**
1131
+ * Reference to the Handsontable instance.
1090
1132
  */
1091
1133
  var __hotInstance = React.useRef(null);
1092
- /**
1093
- * Reference to the main Handsontable DOM element.
1134
+
1135
+ /**
1136
+ * Reference to the main Handsontable DOM element.
1094
1137
  */
1095
1138
  var hotElementRef = React.useRef(null);
1096
- /**
1097
- * Reference to component-based editor overridden hooks object.
1139
+
1140
+ /**
1141
+ * Reference to component-based editor overridden hooks object.
1098
1142
  */
1099
1143
  var globalEditorHooksRef = React.useRef(null);
1100
- /**
1101
- * Reference to HOT-native custom editor class instance.
1144
+
1145
+ /**
1146
+ * Reference to HOT-native custom editor class instance.
1102
1147
  */
1103
1148
  var globalEditorClassInstance = React.useRef(null);
1104
- /**
1105
- * Reference to the previous props object.
1149
+
1150
+ /**
1151
+ * Reference to the previous props object.
1106
1152
  */
1107
1153
  var prevProps = React.useRef();
1108
- /**
1109
- * HotTable context exposing helper functions.
1154
+
1155
+ /**
1156
+ * HotTable context exposing helper functions.
1110
1157
  */
1111
1158
  var context = useHotTableContext();
1112
- /**
1113
- * Getter for the property storing the Handsontable instance.
1159
+
1160
+ /**
1161
+ * Getter for the property storing the Handsontable instance.
1114
1162
  */
1115
1163
  var getHotInstance = React.useCallback(function () {
1116
1164
  if (!__hotInstance.current || !__hotInstance.current.isDestroyed) {
@@ -1124,17 +1172,19 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1124
1172
  var isHotInstanceDestroyed = React.useCallback(function () {
1125
1173
  return !__hotInstance.current || __hotInstance.current.isDestroyed;
1126
1174
  }, [__hotInstance]);
1127
- /**
1128
- * Clear both the editor and the renderer cache.
1175
+
1176
+ /**
1177
+ * Clear both the editor and the renderer cache.
1129
1178
  */
1130
1179
  var clearCache = React.useCallback(function () {
1131
1180
  context.clearRenderedCellCache();
1132
1181
  context.componentRendererColumns.clear();
1133
1182
  }, [context]);
1134
- /**
1135
- * Get the `Document` object corresponding to the main component element.
1136
- *
1137
- * @returns The `Document` object used by the component.
1183
+
1184
+ /**
1185
+ * Get the `Document` object corresponding to the main component element.
1186
+ *
1187
+ * @returns The `Document` object used by the component.
1138
1188
  */
1139
1189
  var getOwnerDocument = React.useCallback(function () {
1140
1190
  if (isCSR()) {
@@ -1142,10 +1192,11 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1142
1192
  }
1143
1193
  return null;
1144
1194
  }, [hotElementRef]);
1145
- /**
1146
- * Create a new settings object containing the column settings and global editors and renderers.
1147
- *
1148
- * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.
1195
+
1196
+ /**
1197
+ * Create a new settings object containing the column settings and global editors and renderers.
1198
+ *
1199
+ * @returns {Handsontable.GridSettings} New global set of settings for Handsontable.
1149
1200
  */
1150
1201
  var createNewGlobalSettings = function createNewGlobalSettings() {
1151
1202
  var _getHotInstance;
@@ -1175,8 +1226,9 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1175
1226
  }
1176
1227
  return newSettings;
1177
1228
  };
1178
- /**
1179
- * Detect if `autoRowSize` or `autoColumnSize` is defined, and if so, throw an incompatibility warning.
1229
+
1230
+ /**
1231
+ * Detect if `autoRowSize` or `autoColumnSize` is defined, and if so, throw an incompatibility warning.
1180
1232
  */
1181
1233
  var displayAutoSizeWarning = function displayAutoSizeWarning(hotInstance) {
1182
1234
  var _hotInstance$getPlugi, _hotInstance$getPlugi2;
@@ -1186,23 +1238,27 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1186
1238
  }
1187
1239
  }
1188
1240
  };
1189
- /**
1190
- * Initialize Handsontable after the component has mounted.
1241
+
1242
+ /**
1243
+ * Initialize Handsontable after the component has mounted.
1191
1244
  */
1192
1245
  React.useEffect(function () {
1193
1246
  var newGlobalSettings = createNewGlobalSettings(true);
1247
+
1194
1248
  // Update prevProps with the current props
1195
1249
  prevProps.current = props;
1196
1250
  __hotInstance.current = new Handsontable__default["default"].Core(hotElementRef.current, newGlobalSettings);
1197
- /**
1198
- * Handsontable's `beforeViewRender` hook callback.
1251
+
1252
+ /**
1253
+ * Handsontable's `beforeViewRender` hook callback.
1199
1254
  */
1200
1255
  __hotInstance.current.addHook('beforeViewRender', function () {
1201
1256
  context.clearPortalCache();
1202
1257
  context.clearRenderedCellCache();
1203
1258
  });
1204
- /**
1205
- * Handsontable's `afterViewRender` hook callback.
1259
+
1260
+ /**
1261
+ * Handsontable's `afterViewRender` hook callback.
1206
1262
  */
1207
1263
  __hotInstance.current.addHook('afterViewRender', function () {
1208
1264
  context.pushCellPortalsIntoPortalManager();
@@ -1212,8 +1268,9 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1212
1268
  if (!displayObsoleteRenderersEditorsWarning(props.children)) {
1213
1269
  displayChildrenOfTypeWarning(props.children, HotColumn);
1214
1270
  }
1215
- /**
1216
- * Destroy the Handsontable instance when the parent component unmounts.
1271
+
1272
+ /**
1273
+ * Destroy the Handsontable instance when the parent component unmounts.
1217
1274
  */
1218
1275
  return function () {
1219
1276
  var _getHotInstance2;
@@ -1221,21 +1278,24 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1221
1278
  (_getHotInstance2 = getHotInstance()) === null || _getHotInstance2 === void 0 || _getHotInstance2.destroy();
1222
1279
  };
1223
1280
  }, []);
1224
- /**
1225
- * Logic performed after the component update.
1281
+
1282
+ /**
1283
+ * Logic performed after the component update.
1226
1284
  */
1227
1285
  useUpdateEffect(function () {
1228
1286
  clearCache();
1229
1287
  var hotInstance = getHotInstance();
1230
1288
  var newGlobalSettings = createNewGlobalSettings(false, prevProps.current);
1289
+
1231
1290
  // Update prevProps with the current props
1232
1291
  prevProps.current = props;
1233
1292
  hotInstance === null || hotInstance === void 0 || hotInstance.updateSettings(newGlobalSettings, false);
1234
1293
  displayAutoSizeWarning(hotInstance);
1235
1294
  displayObsoleteRenderersEditorsWarning(props.children);
1236
1295
  });
1237
- /**
1238
- * Interface exposed to parent components by HotTable instance via React ref
1296
+
1297
+ /**
1298
+ * Interface exposed to parent components by HotTable instance via React ref
1239
1299
  */
1240
1300
  React.useImperativeHandle(ref, function () {
1241
1301
  return {
@@ -1247,11 +1307,12 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1247
1307
  }
1248
1308
  };
1249
1309
  });
1250
- /**
1251
- * Render the component.
1310
+
1311
+ /**
1312
+ * Render the component.
1252
1313
  */
1253
1314
  var hotColumnWrapped = React.Children.toArray(props.children).filter(isHotColumn).map(function (childNode, columnIndex) {
1254
- return React__default["default"].createElement(HotColumnContextProvider, {
1315
+ return /*#__PURE__*/React__default["default"].createElement(HotColumnContextProvider, {
1255
1316
  columnIndex: columnIndex,
1256
1317
  getOwnerDocument: getOwnerDocument,
1257
1318
  key: columnIndex
@@ -1259,17 +1320,18 @@ var HotTableInner = React.forwardRef(function (props, ref) {
1259
1320
  });
1260
1321
  var containerProps = getContainerAttributesProps(props);
1261
1322
  var editorPortal = createEditorPortal(getOwnerDocument(), props.editor);
1262
- return React__default["default"].createElement(React.Fragment, null, React__default["default"].createElement("div", Object.assign({
1323
+ return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", _extends({
1263
1324
  ref: hotElementRef
1264
- }, containerProps), hotColumnWrapped), React__default["default"].createElement(RenderersPortalManager, {
1325
+ }, containerProps), hotColumnWrapped), /*#__PURE__*/React__default["default"].createElement(RenderersPortalManager, {
1265
1326
  ref: context.setRenderersPortalManagerRef
1266
- }), React__default["default"].createElement(EditorContextProvider, {
1327
+ }), /*#__PURE__*/React__default["default"].createElement(EditorContextProvider, {
1267
1328
  hooksRef: globalEditorHooksRef,
1268
1329
  hotCustomEditorInstanceRef: globalEditorClassInstance
1269
1330
  }, editorPortal));
1270
1331
  });
1271
- /**
1272
- * Prop types to be checked at runtime.
1332
+
1333
+ /**
1334
+ * Prop types to be checked at runtime.
1273
1335
  */
1274
1336
  HotTableInner.propTypes = {
1275
1337
  style: PropTypes.object,
@@ -1278,41 +1340,42 @@ HotTableInner.propTypes = {
1278
1340
  };
1279
1341
 
1280
1342
  var _excluded = ["children"];
1281
- /**
1282
- * A Handsontable-ReactJS wrapper.
1283
- *
1284
- * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.
1285
- * For example:
1286
- *
1287
- * ```js
1288
- * <HotTable id="hot" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH="all" />
1289
- *
1290
- * // is analogous to
1291
- * let hot = new Handsontable(document.getElementById('hot'), {
1292
- * data: dataObject,
1293
- * contextMenu: true,
1294
- * colHeaders: true,
1295
- * width: 600
1296
- * height: 300
1297
- * });
1298
- *
1299
- * ```
1343
+ /**
1344
+ * A Handsontable-ReactJS wrapper.
1345
+ *
1346
+ * To implement, use the `HotTable` tag with properties corresponding to Handsontable options.
1347
+ * For example:
1348
+ *
1349
+ * ```js
1350
+ * <HotTable id="hot" data={dataObject} contextMenu={true} colHeaders={true} width={600} height={300} stretchH="all" />
1351
+ *
1352
+ * // is analogous to
1353
+ * let hot = new Handsontable(document.getElementById('hot'), {
1354
+ * data: dataObject,
1355
+ * contextMenu: true,
1356
+ * colHeaders: true,
1357
+ * width: 600
1358
+ * height: 300
1359
+ * });
1360
+ *
1361
+ * ```
1300
1362
  */
1301
- var HotTable = React.forwardRef(function (_ref, ref) {
1363
+ var HotTable = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1302
1364
  var _props$id;
1303
1365
  var children = _ref.children,
1304
1366
  props = _objectWithoutProperties(_ref, _excluded);
1305
1367
  var componentId = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : React.useId();
1306
- return React__default["default"].createElement(HotTableContextProvider, null, React__default["default"].createElement(HotTableInner, Object.assign({
1368
+ return /*#__PURE__*/React__default["default"].createElement(HotTableContextProvider, null, /*#__PURE__*/React__default["default"].createElement(HotTableInner, _extends({
1307
1369
  id: componentId
1308
1370
  }, props, {
1309
1371
  ref: ref
1310
1372
  }), children));
1311
1373
  });
1312
- /**
1313
- * Package version.
1314
- *
1315
- * @returns The version number of the package.
1374
+
1375
+ /**
1376
+ * Package version.
1377
+ *
1378
+ * @returns The version number of the package.
1316
1379
  */
1317
1380
  HotTable.version = version;
1318
1381