@handsontable/react-wrapper 0.0.0-next-79bf2e3-20250609 → 0.0.0-next-e474a25-20250610

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/README.md CHANGED
@@ -104,26 +104,25 @@ registerAllModules();
104
104
 
105
105
  const ExampleComponent = () => {
106
106
  return (
107
- <div class="ht-theme-main-dark-auto">
108
- <HotTable
109
- data={[
110
- { company: 'Tagcat', country: 'United Kingdom', rating: 4.4 },
111
- { company: 'Zoomzone', country: 'Japan', rating: 4.5 },
112
- { company: 'Meeveo', country: 'United States', rating: 4.6 },
113
- ]}
114
- rowHeaders={true}
115
- colHeaders={true}
116
- navigableHeaders={true}
117
- tabNavigation={true}
118
- multiColumnSorting={true}
119
- headerClassName="htLeft"
120
- licenseKey="non-commercial-and-evaluation"
121
- >
122
- <HotColumn title="Company" data="company" width="100"></HotColumn>
123
- <HotColumn title="Country" data="country" width="170" type="dropdown" source={['United Kingdom', 'Japan', 'United States']}></HotColumn>
124
- <HotColumn title="Rating" data="rating" width="100" type="numeric"></HotColumn>
125
- </HotTable>
126
- </div>
107
+ <HotTable
108
+ theme="ht-theme-main-dark-auto"
109
+ data={[
110
+ { company: 'Tagcat', country: 'United Kingdom', rating: 4.4 },
111
+ { company: 'Zoomzone', country: 'Japan', rating: 4.5 },
112
+ { company: 'Meeveo', country: 'United States', rating: 4.6 },
113
+ ]}
114
+ rowHeaders={true}
115
+ colHeaders={true}
116
+ navigableHeaders={true}
117
+ tabNavigation={true}
118
+ multiColumnSorting={true}
119
+ headerClassName="htLeft"
120
+ licenseKey="non-commercial-and-evaluation"
121
+ >
122
+ <HotColumn title="Company" data="company" width="100"></HotColumn>
123
+ <HotColumn title="Country" data="country" width="170" type="dropdown" source={['United Kingdom', 'Japan', 'United States']}></HotColumn>
124
+ <HotColumn title="Rating" data="rating" width="100" type="numeric"></HotColumn>
125
+ </HotTable>
127
126
  );
128
127
  };
129
128
  ```
@@ -175,7 +174,7 @@ At first glance, it might seem that a data table, spreadsheet, and data grid are
175
174
  If you're using Handsontable with a free, non-commercial license, you can:
176
175
  - Join the conversation on [GitHub Discussions](https://github.com/handsontable/handsontable/discussions) to share ideas, suggest features, or discuss changes.
177
176
  - Report any bugs you find on our [GitHub Issue Board](https://github.com/handsontable/handsontable/issues).
178
- - Connect with other developers and find answers on our [Developer Forum](https://handsontable.com/forum).
177
+ - Connect with other developers and find answers on our [Developer Forum](https://forum.handsontable.com).
179
178
 
180
179
  If you have a commercial license, feel free to contact us directly at [support@handsontable.com](mailto:support@handsontable.com) or use our [contact form](https://handsontable.com/contact?category=technical_support).
181
180
 
@@ -763,7 +763,7 @@ var HotColumn = function HotColumn(props) {
763
763
  }, editorPortal);
764
764
  };
765
765
 
766
- var version="0.0.0-next-79bf2e3-20250609";
766
+ var version="0.0.0-next-e474a25-20250610";
767
767
 
768
768
  /**
769
769
  * Component used to manage the renderer component portals.
@@ -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-79bf2e3-20250609 (built at Mon Jun 09 2025 10:23:18 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-e474a25-20250610 (built at Tue Jun 10 2025 12:32:39 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')) :
@@ -779,7 +779,7 @@ var HotColumn = function HotColumn(props) {
779
779
  }, editorPortal);
780
780
  };
781
781
 
782
- var version="0.0.0-next-79bf2e3-20250609";
782
+ var version="0.0.0-next-e474a25-20250610";
783
783
 
784
784
  /**
785
785
  * Component used to manage the renderer component portals.
@@ -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-79bf2e3-20250609 (built at Mon Jun 09 2025 10:23:23 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-e474a25-20250610 (built at Tue Jun 10 2025 12:32:43 GMT+0000 (Coordinated Universal Time))
29
29
  */
30
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,(function(e,t,n,r,o,u){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),l=a(n),c=a(r),s=null;function d(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function f(e){return p(e,"hot-renderer")?(d("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."),!0):!!p(e,"hot-editor")&&(d("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."),!0)}function p(e,t){return i.default.Children.toArray(e).some((function(e){return void 0!==e.props[t]}))}function m(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=i.default.createElement(t,null),r=v({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),l.default.createPortal(i.default.createElement("div",Object.assign({},r),n),e.body)}function v(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function h(e,t,n){return t=w(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function O(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,a,i=[],l=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t);else for(;!(l=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==typeof t?t:t+""}function H(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}var T=function(){return O((function e(){b(this,e)}),null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,u=void 0!==o&&o,a=t.initOnlySettingKeys,i=void 0===a?[]:a,l=function(t){return!(u||!i.includes(t))&&r[t]===e[t]},c={};for(var s in e)"children"!==s&&!l(s)&&e.hasOwnProperty(s)&&(c[s]=e[s]);return c}}])}(),x=t.createContext(void 0),_=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback((function(e,t){r.current[t]=e}),[]),u=t.useRef(new Map),a=t.useRef(new Map),c=t.useCallback((function(){return a.current.clear()}),[]),d=t.useRef(new Map),f=t.useCallback((function(){return d.current.clear()}),[]),p=t.useRef(new Map),m=t.useCallback((function(e){return function(t,n,r,o,u,c,f){var m="".concat(r,"-").concat(o),v=t.guid,y="".concat(v,"-").concat(m),h="".concat(m,"-").concat(v);if(a.current.has(m)&&(n.innerHTML=a.current.get(m).innerHTML),n&&!n.getAttribute("ghost-table")){for(var b=d.current.get(h),g=p.current.get(y);n.firstChild;)n.removeChild(n.firstChild);if(b&&g)n.appendChild(g);else{var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t||(t=document),s||(s=t.createDocumentFragment());var o=null!=r?r:t.createElement("DIV");return s.appendChild(o),{portal:l.default.createPortal(e,o,n),portalContainer:o}}(i.default.createElement(e,{instance:t,TD:n,row:r,col:o,prop:u,value:c,cellProperties:f}),n.ownerDocument,h,g),C=O.portal,w=O.portalContainer;p.current.set(y,w),n.appendChild(w),d.current.set(h,C)}}return a.current.set("".concat(r,"-").concat(o),n),n}}),[]),v=t.useRef((function(){})),y=t.useCallback((function(e){v.current=e}),[]),h=t.useCallback((function(){v.current(k(d.current.values()))}),[]),b=t.useMemo((function(){return{componentRendererColumns:u.current,columnsSettings:r.current,emitColumnSettings:o,getRendererWrapper:m,clearPortalCache:f,clearRenderedCellCache:c,setRenderersPortalManagerRef:y,pushCellPortalsIntoPortalManager:h}}),[o,m,c,y,h]);return i.default.createElement(x.Provider,{value:b},n)};function D(){return t.useContext(x)}var M=t.createContext(void 0),A=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.children,u=t.useMemo((function(){return{columnIndex:n,getOwnerDocument:r}}),[n,r]);return i.default.createElement(M.Provider,{value:u},o)},V=["close","focus","open"],z=["getValue","setValue"],N={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function q(e,t){return function(n){function r(n){var o;return b(this,r),o=h(this,r,[n]),t.current=o,Object.getOwnPropertyNames(c.default.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!z.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,a=arguments.length,i=Array(a),l=0;a>l;l++)i[l]=arguments[l];(V.includes(t)||(o=n.call.apply(n,[this].concat(i))),N[t]&&null!==(r=e.current)&&void 0!==r&&r[N[t]])&&(o=(u=e.current[N[t]]).call.apply(u,[this].concat(i)));return o}.bind(o)}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(r,n),O(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(c.default.editors.BaseEditor)}var B=t.createContext(void 0),W=function(e){return i.default.createElement(B.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};var F=function(e){return e.type===L},U=["_columnIndex","_getOwnerDocument","children"],L=function(e){var n=D(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,a=t.useContext(M),l=a.columnIndex,c=a.getOwnerDocument,s=t.useRef(null),p=t.useRef(null);t.useEffect((function(){var t=function(){var t=T.getSettings(Object.keys(e).filter((function(e){return!U.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}));return e.renderer?(t.renderer=u(e.renderer),r.set(l,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=q(s,p):e.hotEditor&&(t.editor=e.hotEditor),t}();o(t,l),f(e.children)||i.default.Children.toArray(e.children).length&&d("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.")}));var v=m(c(),e.editor);return i.default.createElement(W,{hooksRef:s,hotCustomEditorInstanceRef:p},v)},K=t.forwardRef((function(e,n){var r=S(t.useState([]),2),o=r[0],u=r[1];return t.useImperativeHandle(n,(function(){return u})),i.default.createElement(t.Fragment,null,o)}));function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $,G,J,Q,X={exports:{}};X.exports=function(){if(Q)return J;Q=1;var e=G?$:(G=1,$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,J=function(){function r(t,n,r,o,u,a){if(a!==e){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function o(){return r}r.isRequired=r;var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u}}()();var Z=Y(X.exports),ee=t.forwardRef((function(e,n){var r,a,l,s=t.useRef(null),p=t.useRef(null),y=t.useRef(null),h=t.useRef(null),b=t.useRef(),g=D(),O=t.useCallback((function(){return s.current&&s.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):s.current}),[s]),C=t.useCallback((function(){return!s.current||s.current.isDestroyed}),[s]),w=t.useCallback((function(){g.clearRenderedCellCache(),g.componentRendererColumns.clear()}),[g]),R=t.useCallback((function(){return"undefined"!=typeof window?p.current?p.current.ownerDocument:document:null}),[p]),P=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=C()?[]:(null===(t=O())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],i=T.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:a});return i.columns=g.columnsSettings.length?g.columnsSettings:i.columns,e.renderer?(i.renderer=g.getRendererWrapper(e.renderer),g.componentRendererColumns.set("global",!0)):i.renderer=e.hotRenderer||o.getRenderer("text"),i.editor=e.editor?q(y,h):e.hotEditor||u.getEditor("text"),i},E=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&g.componentRendererColumns.size>0&&d("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.")};t.useEffect((function(){var t,n=P(!0);return b.current=e,s.current=new c.default.Core(p.current,n),s.current.addHook("beforeViewRender",(function(){g.clearPortalCache(),g.clearRenderedCellCache()})),s.current.addHook("afterViewRender",(function(){g.pushCellPortalsIntoPortalManager()})),s.current.init(),E(s.current),f(e.children)||(t=L,i.default.Children.toArray(e.children).some((function(e){return e.type!==t}))&&d("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;w(),null===(e=O())||void 0===e||e.destroy()}}),[]),r=function(){w();var t=O(),n=P(!1,b.current);b.current=e,null==t||t.updateSettings(n,!1),E(t),f(e.children)},l=i.default.useRef(!1),t.useEffect((function(){if(l.current)return r();l.current=!0}),a),t.useImperativeHandle(n,(function(){return{get hotElementRef(){return p.current},get hotInstance(){return O()}}}));var j=t.Children.toArray(e.children).filter(F).map((function(e,t){return i.default.createElement(A,{columnIndex:t,getOwnerDocument:R,key:t},e)})),S=v(e),k=m(R(),e.editor);return i.default.createElement(t.Fragment,null,i.default.createElement("div",Object.assign({ref:p},S),j),i.default.createElement(K,{ref:g.setRenderersPortalManagerRef}),i.default.createElement(W,{hooksRef:y,hotCustomEditorInstanceRef:h},k))}));ee.propTypes={style:Z.object,id:Z.string,className:Z.string};var te=["children"],ne=t.forwardRef((function(e,n){var r,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;u.length>r;r++)-1===t.indexOf(n=u[r])&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,te),a=null!==(r=u.id)&&void 0!==r?r:t.useId();return i.default.createElement(_,null,i.default.createElement(ee,Object.assign({id:a},u,{ref:n}),o))}));ne.version="0.0.0-next-79bf2e3-20250609",e.HotColumn=L,e.HotTable=ne,e.default=ne,e.isHotColumn=F,e.useHotEditor=function(e,n){var r=t.useContext(B),o=r.hooksRef,u=r.hotCustomEditorInstanceRef,a=S(t.useState(0),2),i=a[0],l=a[1],c=S(t.useState(),2),s=c[1],d=t.useDeferredValue(c[0]);return t.useImperativeHandle(o,(function(){return E(E({},e),{},{onOpen:function(){var t,n;s(null===(t=u.current)||void 0===t?void 0:t.getValue()),null==e||null===(n=e.onOpen)||void 0===n||n.call(e),l((function(e){return e+1}))}})}),n),t.useMemo((function(){return{get value(){return d},setValue:function(e){var t;s(e),null===(t=u.current)||void 0===t||t.setValue(e)},get isOpen(){var e,t;return null!==(e=null===(t=u.current)||void 0===t?void 0:t.isOpened())&&void 0!==e&&e},finishEditing:function(){var e;null===(e=u.current)||void 0===e||e.finishEditing()},get row(){var e;return null===(e=u.current)||void 0===e?void 0:e.row},get col(){var e;return null===(e=u.current)||void 0===e?void 0:e.col}}}),[i,u,d])},Object.defineProperty(e,"__esModule",{value:!0})}));
30
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,(function(e,t,n,r,o,u){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),l=a(n),c=a(r),s=null;function d(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function f(e){return p(e,"hot-renderer")?(d("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."),!0):!!p(e,"hot-editor")&&(d("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."),!0)}function p(e,t){return i.default.Children.toArray(e).some((function(e){return void 0!==e.props[t]}))}function m(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=i.default.createElement(t,null),r=v({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),l.default.createPortal(i.default.createElement("div",Object.assign({},r),n),e.body)}function v(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function h(e,t,n){return t=w(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function O(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,a,i=[],l=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t);else for(;!(l=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==typeof t?t:t+""}function H(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}var T=function(){return O((function e(){b(this,e)}),null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,u=void 0!==o&&o,a=t.initOnlySettingKeys,i=void 0===a?[]:a,l=function(t){return!(u||!i.includes(t))&&r[t]===e[t]},c={};for(var s in e)"children"!==s&&!l(s)&&e.hasOwnProperty(s)&&(c[s]=e[s]);return c}}])}(),x=t.createContext(void 0),_=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback((function(e,t){r.current[t]=e}),[]),u=t.useRef(new Map),a=t.useRef(new Map),c=t.useCallback((function(){return a.current.clear()}),[]),d=t.useRef(new Map),f=t.useCallback((function(){return d.current.clear()}),[]),p=t.useRef(new Map),m=t.useCallback((function(e){return function(t,n,r,o,u,c,f){var m="".concat(r,"-").concat(o),v=t.guid,y="".concat(v,"-").concat(m),h="".concat(m,"-").concat(v);if(a.current.has(m)&&(n.innerHTML=a.current.get(m).innerHTML),n&&!n.getAttribute("ghost-table")){for(var b=d.current.get(h),g=p.current.get(y);n.firstChild;)n.removeChild(n.firstChild);if(b&&g)n.appendChild(g);else{var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t||(t=document),s||(s=t.createDocumentFragment());var o=null!=r?r:t.createElement("DIV");return s.appendChild(o),{portal:l.default.createPortal(e,o,n),portalContainer:o}}(i.default.createElement(e,{instance:t,TD:n,row:r,col:o,prop:u,value:c,cellProperties:f}),n.ownerDocument,h,g),C=O.portal,w=O.portalContainer;p.current.set(y,w),n.appendChild(w),d.current.set(h,C)}}return a.current.set("".concat(r,"-").concat(o),n),n}}),[]),v=t.useRef((function(){})),y=t.useCallback((function(e){v.current=e}),[]),h=t.useCallback((function(){v.current(k(d.current.values()))}),[]),b=t.useMemo((function(){return{componentRendererColumns:u.current,columnsSettings:r.current,emitColumnSettings:o,getRendererWrapper:m,clearPortalCache:f,clearRenderedCellCache:c,setRenderersPortalManagerRef:y,pushCellPortalsIntoPortalManager:h}}),[o,m,c,y,h]);return i.default.createElement(x.Provider,{value:b},n)};function D(){return t.useContext(x)}var M=t.createContext(void 0),A=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.children,u=t.useMemo((function(){return{columnIndex:n,getOwnerDocument:r}}),[n,r]);return i.default.createElement(M.Provider,{value:u},o)},V=["close","focus","open"],z=["getValue","setValue"],N={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function q(e,t){return function(n){function r(n){var o;return b(this,r),o=h(this,r,[n]),t.current=o,Object.getOwnPropertyNames(c.default.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!z.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,a=arguments.length,i=Array(a),l=0;a>l;l++)i[l]=arguments[l];(V.includes(t)||(o=n.call.apply(n,[this].concat(i))),N[t]&&null!==(r=e.current)&&void 0!==r&&r[N[t]])&&(o=(u=e.current[N[t]]).call.apply(u,[this].concat(i)));return o}.bind(o)}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(r,n),O(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(c.default.editors.BaseEditor)}var B=t.createContext(void 0),W=function(e){return i.default.createElement(B.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};var F=function(e){return e.type===L},U=["_columnIndex","_getOwnerDocument","children"],L=function(e){var n=D(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,a=t.useContext(M),l=a.columnIndex,c=a.getOwnerDocument,s=t.useRef(null),p=t.useRef(null);t.useEffect((function(){var t=function(){var t=T.getSettings(Object.keys(e).filter((function(e){return!U.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}));return e.renderer?(t.renderer=u(e.renderer),r.set(l,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=q(s,p):e.hotEditor&&(t.editor=e.hotEditor),t}();o(t,l),f(e.children)||i.default.Children.toArray(e.children).length&&d("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.")}));var v=m(c(),e.editor);return i.default.createElement(W,{hooksRef:s,hotCustomEditorInstanceRef:p},v)},K=t.forwardRef((function(e,n){var r=S(t.useState([]),2),o=r[0],u=r[1];return t.useImperativeHandle(n,(function(){return u})),i.default.createElement(t.Fragment,null,o)}));function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $,G,J,Q,X={exports:{}};X.exports=function(){if(Q)return J;Q=1;var e=G?$:(G=1,$="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,J=function(){function r(t,n,r,o,u,a){if(a!==e){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function o(){return r}r.isRequired=r;var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u}}()();var Z=Y(X.exports),ee=t.forwardRef((function(e,n){var r,a,l,s=t.useRef(null),p=t.useRef(null),y=t.useRef(null),h=t.useRef(null),b=t.useRef(),g=D(),O=t.useCallback((function(){return s.current&&s.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):s.current}),[s]),C=t.useCallback((function(){return!s.current||s.current.isDestroyed}),[s]),w=t.useCallback((function(){g.clearRenderedCellCache(),g.componentRendererColumns.clear()}),[g]),R=t.useCallback((function(){return"undefined"!=typeof window?p.current?p.current.ownerDocument:document:null}),[p]),P=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=C()?[]:(null===(t=O())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],i=T.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:a});return i.columns=g.columnsSettings.length?g.columnsSettings:i.columns,e.renderer?(i.renderer=g.getRendererWrapper(e.renderer),g.componentRendererColumns.set("global",!0)):i.renderer=e.hotRenderer||o.getRenderer("text"),i.editor=e.editor?q(y,h):e.hotEditor||u.getEditor("text"),i},E=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&g.componentRendererColumns.size>0&&d("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.")};t.useEffect((function(){var t,n=P(!0);return b.current=e,s.current=new c.default.Core(p.current,n),s.current.addHook("beforeViewRender",(function(){g.clearPortalCache(),g.clearRenderedCellCache()})),s.current.addHook("afterViewRender",(function(){g.pushCellPortalsIntoPortalManager()})),s.current.init(),E(s.current),f(e.children)||(t=L,i.default.Children.toArray(e.children).some((function(e){return e.type!==t}))&&d("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;w(),null===(e=O())||void 0===e||e.destroy()}}),[]),r=function(){w();var t=O(),n=P(!1,b.current);b.current=e,null==t||t.updateSettings(n,!1),E(t),f(e.children)},l=i.default.useRef(!1),t.useEffect((function(){if(l.current)return r();l.current=!0}),a),t.useImperativeHandle(n,(function(){return{get hotElementRef(){return p.current},get hotInstance(){return O()}}}));var j=t.Children.toArray(e.children).filter(F).map((function(e,t){return i.default.createElement(A,{columnIndex:t,getOwnerDocument:R,key:t},e)})),S=v(e),k=m(R(),e.editor);return i.default.createElement(t.Fragment,null,i.default.createElement("div",Object.assign({ref:p},S),j),i.default.createElement(K,{ref:g.setRenderersPortalManagerRef}),i.default.createElement(W,{hooksRef:y,hotCustomEditorInstanceRef:h},k))}));ee.propTypes={style:Z.object,id:Z.string,className:Z.string};var te=["children"],ne=t.forwardRef((function(e,n){var r,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;u.length>r;r++)-1===t.indexOf(n=u[r])&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,te),a=null!==(r=u.id)&&void 0!==r?r:t.useId();return i.default.createElement(_,null,i.default.createElement(ee,Object.assign({id:a},u,{ref:n}),o))}));ne.version="0.0.0-next-e474a25-20250610",e.HotColumn=L,e.HotTable=ne,e.default=ne,e.isHotColumn=F,e.useHotEditor=function(e,n){var r=t.useContext(B),o=r.hooksRef,u=r.hotCustomEditorInstanceRef,a=S(t.useState(0),2),i=a[0],l=a[1],c=S(t.useState(),2),s=c[1],d=t.useDeferredValue(c[0]);return t.useImperativeHandle(o,(function(){return E(E({},e),{},{onOpen:function(){var t,n;s(null===(t=u.current)||void 0===t?void 0:t.getValue()),null==e||null===(n=e.onOpen)||void 0===n||n.call(e),l((function(e){return e+1}))}})}),n),t.useMemo((function(){return{get value(){return d},setValue:function(e){var t;s(e),null===(t=u.current)||void 0===t||t.setValue(e)},get isOpen(){var e,t;return null!==(e=null===(t=u.current)||void 0===t?void 0:t.isOpened())&&void 0!==e&&e},finishEditing:function(){var e;null===(e=u.current)||void 0===e||e.finishEditing()},get row(){var e;return null===(e=u.current)||void 0===e?void 0:e.row},get col(){var e;return null===(e=u.current)||void 0===e?void 0:e.col}}}),[i,u,d])},Object.defineProperty(e,"__esModule",{value:!0})}));
31
31
  //# sourceMappingURL=react-handsontable.min.js.map
@@ -753,7 +753,7 @@ var HotColumn = function HotColumn(props) {
753
753
  }, editorPortal);
754
754
  };
755
755
 
756
- var version="0.0.0-next-79bf2e3-20250609";
756
+ var version="0.0.0-next-e474a25-20250610";
757
757
 
758
758
  /**
759
759
  * Component used to manage the renderer component portals.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handsontable/react-wrapper",
3
- "version": "0.0.0-next-79bf2e3-20250609",
3
+ "version": "0.0.0-next-e474a25-20250610",
4
4
  "description": "Best Data Grid for React with Spreadsheet Look and Feel.",
5
5
  "author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
6
6
  "homepage": "https://handsontable.com",
@@ -71,7 +71,7 @@
71
71
  "@types/react-dom": "^18.2.0",
72
72
  "@types/react-redux": "^7.1.7",
73
73
  "cross-env": "^7.0.3",
74
- "handsontable": "0.0.0-next-79bf2e3-20250609",
74
+ "handsontable": "0.0.0-next-e474a25-20250610",
75
75
  "jest": "^29.7.0",
76
76
  "prop-types": "^15.7.2",
77
77
  "react": "^18.2.0",
@@ -86,7 +86,7 @@
86
86
  "uglify-js": "^3.4.9"
87
87
  },
88
88
  "peerDependencies": {
89
- "handsontable": "0.0.0-next-79bf2e3-20250609"
89
+ "handsontable": "0.0.0-next-e474a25-20250610"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min && npm run prepare:types",