@handsontable/react 0.0.0-next-e3a1f27-20230109 → 0.0.0-next-e857cca-20230112

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  <a href="https://handsontable.com" rel="nofollow"><img src="https://raw.githubusercontent.com/handsontable/handsontable/develop/resources/handsontable-logo-blue.svg" alt="Handsontable - data grid for React" width="300"></a>
4
4
 
5
- # Data Grid for React <img src="https://raw.githubusercontent.com/handsontable/handsontable/develop/resources/icons/react-icon.svg" width="22" height="22">
5
+ # React Data Grid <img src="https://raw.githubusercontent.com/handsontable/handsontable/develop/resources/icons/react-icon.svg" width="22" height="22">
6
6
 
7
7
  Handsontable's wrapper for React combines data grid features with spreadsheet-like UX. <br>
8
8
  It provides data binding, data validation, filtering, sorting, and CRUD operations.
@@ -46,57 +46,70 @@ The most popular features of Handsontable for React:
46
46
 
47
47
  <div id="installation"></div>
48
48
 
49
- ## Get Started
50
- ### Install with npm
49
+ ## Get started
51
50
 
52
- Run the following command in your terminal
53
- ```
51
+ ### 1. Install Handsontable
52
+
53
+ Get Handsontable from [npm](https://www.npmjs.com/package/@handsontable/react) or [Yarn](https://yarnpkg.com/package/@handsontable/react).
54
+
55
+ ```bash
54
56
  npm install handsontable @handsontable/react
55
57
  ```
56
58
 
57
- You can load it directly from [jsDelivr](https://jsdelivr.com/package/npm/@handsontable/react) as well.
58
- ```html
59
- <script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
60
- <script src="https://cdn.jsdelivr.net/npm/@handsontable/react/dist/react-handsontable.min.js"></script>
59
+ Import Handsontable's CSS:
61
60
 
62
- <link href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" rel="stylesheet">
61
+ ```jsx
62
+ import 'handsontable/dist/handsontable.full.min.css';
63
63
  ```
64
64
 
65
- The component will be available as `Handsontable.react.HotTable`.
65
+ ### 2. Register Handsontable's modules
66
66
 
67
- ### Usage
67
+ ```jsx
68
+ import { registerAllModules } from 'handsontable/registry';
68
69
 
69
- Use this data grid as you would any other component in your application. [Options](https://handsontable.com/docs/api/options/) can be set as `HotTable` props.
70
-
71
- **Styles**
72
- ```css
73
- @import '~handsontable/dist/handsontable.full.css';
70
+ registerAllModules();
74
71
  ```
75
72
 
76
- **React Component**
77
- ```js
78
- import React from 'react';
79
- import ReactDOM from 'react-dom';
73
+ ### 3. Use the `HotTable` component
74
+
75
+ The main Handsontable component is called `HotTable`.
76
+
77
+ ```jsx
80
78
  import { HotTable } from '@handsontable/react';
79
+ ```
80
+
81
+ To set Handsontable's [configuration options](https://handsontable.com/docs/react-data-grid/configuration-options), use `HotTable`'s props. For example:
81
82
 
82
- class HotApp extends React.Component {
83
- constructor(props) {
84
- super(props);
85
- this.data = [
86
- ['', 'Tesla', 'Mercedes', 'Toyota', 'Volvo'],
87
- ['2019', 10, 11, 12, 13],
88
- ['2020', 20, 11, 14, 13],
89
- ['2021', 30, 15, 12, 13]
90
- ];
91
- }
92
-
93
- render() {
94
- return (<HotTable data={this.data} colHeaders={true} rowHeaders={true} width="600" height="300" />);
95
- }
96
- }
83
+ ```jsx
84
+ import { HotTable } from '@handsontable/react';
85
+ import { registerAllModules } from 'handsontable/registry';
86
+ import 'handsontable/dist/handsontable.full.min.css';
87
+
88
+ registerAllModules();
89
+
90
+ export const ExampleComponent = () => {
91
+
92
+ return (
93
+ <HotTable
94
+ // set `HotTable`'s props here
95
+ data={[
96
+ ['', 'Tesla', 'Volvo', 'Toyota', 'Ford'],
97
+ ['2019', 10, 11, 12, 13],
98
+ ['2020', 20, 11, 14, 13],
99
+ ['2021', 30, 15, 12, 13]
100
+ ]}
101
+ rowHeaders={true}
102
+ colHeaders={true}
103
+ height="auto"
104
+ licenseKey="non-commercial-and-evaluation" // for non-commercial use only
105
+ />
106
+ );
107
+ };
97
108
  ```
98
109
 
99
- ### [View live demo](https://handsontable.com/docs/react-simple-example/)
110
+
111
+
112
+ ### [View live demo](https://handsontable.com/docs/react-data-grid/demo/)
100
113
 
101
114
  ## Support
102
115
 
@@ -577,7 +577,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
577
577
  return PortalManager;
578
578
  }(React__default["default"].Component);
579
579
 
580
- var version="0.0.0-next-e3a1f27-20230109";
580
+ var version="0.0.0-next-e857cca-20230112";
581
581
 
582
582
  function createCommonjsModule(fn, module) {
583
583
  return module = { exports: {} }, fn(module, module.exports), module.exports;
@@ -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-e3a1f27-20230109 (built at Mon Jan 09 2023 13:13:59 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-e857cca-20230112 (built at Thu Jan 12 2023 14:12:01 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')) :
@@ -604,7 +604,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
604
604
  return PortalManager;
605
605
  }(React__default["default"].Component);
606
606
 
607
- var version="0.0.0-next-e3a1f27-20230109";
607
+ var version="0.0.0-next-e857cca-20230112";
608
608
 
609
609
  function createCommonjsModule(fn, module) {
610
610
  return module = { exports: {} }, fn(module, module.exports), module.exports;
@@ -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-e3a1f27-20230109 (built at Mon Jan 09 2023 13:14:09 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-e857cca-20230112 (built at Thu Jan 12 2023 14:12:09 GMT+0000 (Coordinated Universal Time))
29
29
  */
30
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom"),require("handsontable/base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Handsontable=t.Handsontable||{},t.Handsontable.react={}),t.React,t.ReactDOM,t.Handsontable)}(this,(function(t,e,n,o){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=r(e),i=r(n),l=r(o);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;e.length>n;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,C(o.key),o)}}function f(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,n){return(e=C(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return E(this,n)}}function C(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var k=null,S="global",w="hot-wrapper-editor-container";function P(t,e){var n=a.default.Children.toArray(t),o=a.default.Children.count(t),r=null;return 0!==o&&(r=1===o&&n[0].props[e]?n[0]:n.find((function(t){return void 0!==t.props[e]}))),r||null}function O(t){return t?t.type.WrappedComponent?t.type.WrappedComponent:t.type:null}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.querySelectorAll('[class^="'.concat(w,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;if(null!==e){var n=t.createElement("DIV"),o=j(e.props,!1),r=o.id,a=o.className,l=o.style;return r&&(n.id=r),n.className=[w,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function R(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S,o=P(t,"hot-editor"),r=O(o);return o?a.default.cloneElement(o,{emitEditorInstance:function(t,n){e.get(r)||e.set(r,new Map),e.get(r).set(null!=n?n:S,t)},editorColumnScope:n,isEditor:!0}):null}function j(t){var e=1>=arguments.length||void 0===arguments[1]||arguments[1];return{id:t.id||(e?"hot-"+Math.random().toString(36).substring(5):void 0),className:t.className||"",style:t.style||{}}}function A(t){var e=a.default.version.split(".").map((function(t){return parseInt(t)}));(e[0]>=16&&e[1]>=3||e[0]>=17)&&(t.UNSAFE_componentWillUpdate=t.componentWillUpdate,t.componentWillUpdate=void 0,t.UNSAFE_componentWillMount=t.componentWillMount,t.componentWillMount=void 0)}var B=function(){function t(){d(this,t)}return f(t,null,[{key:"getSettings",value:function(t){var e={};if(t.settings){var n=t.settings;for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}for(var r in t)"settings"!==r&&"children"!==r&&t.hasOwnProperty(r)&&(e[r]=t[r]);return e}}]),t}(),M=function(t){y(n,t);var e=b(n);function n(t,o){var r;return d(this,n),(r=e.call(this,t,o)).localEditorPortal=null,A(v(r)),r}return f(n,[{key:"getLocalEditorPortal",value:function(){return this.localEditorPortal}},{key:"setLocalEditorPortal",value:function(t){this.localEditorPortal=t}},{key:"getSettingsProps",value:function(){var t=this;return this.internalProps=["__componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(e){return!t.internalProps.includes(e)})).reduce((function(e,n){return e[n]=t.props[n],e}),{})}},{key:"getLocalEditorElement",value:function(){return R(this.props.children,this.props._getEditorCache(),this.props._columnIndex)}},{key:"createColumnSettings",value:function(){var t=this.props._getChildElementByType(this.props.children,"hot-renderer"),e=this.getLocalEditorElement();this.columnSettings=B.getSettings(this.getSettingsProps()),null!==t&&(this.columnSettings.renderer=this.props._getRendererWrapper(t),this.props._componentRendererColumns.set(this.props._columnIndex,!0)),null!==e&&(this.columnSettings.editor=this.props._getEditorClass(e,this.props._columnIndex))}},{key:"createLocalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.props._getEditorCache(),n=R(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(I(this.props._getOwnerDocument(),n,e))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentWillMount",value:function(){this.createLocalEditorPortal()}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentWillUpdate",value:function(t,e,n){this.createLocalEditorPortal(t.children)}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){return a.default.createElement(a.default.Fragment,null,this.getLocalEditorPortal())}}]),n}(a.default.Component),D=function(t){y(n,t);var e=b(n);function n(t){var o;return d(this,n),(o=e.call(this,t)).state={portals:[]},o}return f(n,[{key:"render",value:function(){return a.default.createElement(a.default.Fragment,null,this.state.portals)}}]),n}(a.default.Component);function T(t,e){return t(e={exports:{}},e.exports),e.exports}var x="function"==typeof Symbol&&Symbol.for,W=x?Symbol.for("react.element"):60103,H=x?Symbol.for("react.portal"):60106,$=x?Symbol.for("react.fragment"):60107,V=x?Symbol.for("react.strict_mode"):60108,N=x?Symbol.for("react.profiler"):60114,F=x?Symbol.for("react.provider"):60109,G=x?Symbol.for("react.context"):60110,L=x?Symbol.for("react.async_mode"):60111,z=x?Symbol.for("react.concurrent_mode"):60111,U=x?Symbol.for("react.forward_ref"):60112,q=x?Symbol.for("react.suspense"):60113,K=x?Symbol.for("react.suspense_list"):60120,Y=x?Symbol.for("react.memo"):60115,Z=x?Symbol.for("react.lazy"):60116,J=x?Symbol.for("react.block"):60121,Q=x?Symbol.for("react.fundamental"):60117,X=x?Symbol.for("react.responder"):60118,tt=x?Symbol.for("react.scope"):60119;function et(t){if("object"===u(t)&&null!==t){var e=t.$$typeof;switch(e){case W:switch(t=t.type){case L:case z:case $:case N:case V:case q:return t;default:switch(t=t&&t.$$typeof){case G:case U:case Z:case Y:case F:return t;default:return e}}case H:return e}}}function nt(t){return et(t)===z}var ot={AsyncMode:L,ConcurrentMode:z,ContextConsumer:G,ContextProvider:F,Element:W,ForwardRef:U,Fragment:$,Lazy:Z,Memo:Y,Portal:H,Profiler:N,StrictMode:V,Suspense:q,isAsyncMode:function(t){return nt(t)||et(t)===L},isConcurrentMode:nt,isContextConsumer:function(t){return et(t)===G},isContextProvider:function(t){return et(t)===F},isElement:function(t){return"object"===u(t)&&null!==t&&t.$$typeof===W},isForwardRef:function(t){return et(t)===U},isFragment:function(t){return et(t)===$},isLazy:function(t){return et(t)===Z},isMemo:function(t){return et(t)===Y},isPortal:function(t){return et(t)===H},isProfiler:function(t){return et(t)===N},isStrictMode:function(t){return et(t)===V},isSuspense:function(t){return et(t)===q},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===$||t===z||t===N||t===V||t===q||t===K||"object"===u(t)&&null!==t&&(t.$$typeof===Z||t.$$typeof===Y||t.$$typeof===F||t.$$typeof===G||t.$$typeof===U||t.$$typeof===Q||t.$$typeof===X||t.$$typeof===tt||t.$$typeof===J)},typeOf:et};T((function(t,e){}));T((function(t){t.exports=ot}));!function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(e).map((function(t){return e[t]}));if("0123456789"!==o.join(""))return!1;var r={};"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}();function rt(){}function at(){}Function.call.bind(Object.prototype.hasOwnProperty),at.resetWarningCache=rt;var it=T((function(t){t.exports=function(){function t(t,e,n,o,r,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){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 e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:at,resetWarningCache:rt};return n.PropTypes=n,n}()})),lt=function(t){y(n,t);var e=b(n);function n(t,o){var r;return d(this,n),(r=e.call(this,t,o)).id=null,r.__hotInstance=null,r.hotElementRef=null,r.columnSettings=[],r.portalManager=null,r.portalCacheArray=[],r.globalEditorPortal=null,r.renderedCellCache=new Map,r.editorCache=new Map,r.componentRendererColumns=new Map,A(v(r)),r}return f(n,[{key:"hotInstance",get:function(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set:function(t){this.__hotInstance=t}},{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"getGlobalEditorPortal",value:function(){return this.globalEditorPortal}},{key:"setGlobalEditorPortal",value:function(t){this.globalEditorPortal=t}},{key:"clearCache",value:function(){var t=this.getRenderedCellCache();this.setGlobalEditorPortal(null),_(this.getOwnerDocument()),this.getEditorCache().clear(),t.clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return this.hotElementRef?this.hotElementRef.ownerDocument:document}},{key:"setHotElementRef",value:function(t){this.hotElementRef=t}},{key:"getRendererWrapper",value:function(t){var e=this;return function(n,o,r,l,c,u,d){var p=e.getRenderedCellCache();if(p.has("".concat(r,"-").concat(l))&&(o.innerHTML=p.get("".concat(r,"-").concat(l)).innerHTML),o&&!o.getAttribute("ghost-table")){for(var f=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;o||(o=document),k||(k=o.createDocumentFragment());var r=o.createElement("DIV");k.appendChild(r);var l=a.default.cloneElement(t,s({key:"".concat(e.row,"-").concat(e.col)},e));return{portal:i.default.createPortal(l,r,"".concat(e.row,"-").concat(e.col,"-").concat(Math.random())),portalContainer:r}}(t,{TD:o,row:r,col:l,prop:c,value:u,cellProperties:d,isRenderer:!0},(function(){}),o.ownerDocument),h=f.portal,y=f.portalContainer;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(y),e.portalCacheArray.push(h)}return p.set("".concat(r,"-").concat(l),o),o}}},{key:"getEditorClass",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S,o=O(t),r=this.getEditorCache(),a=null===(e=r.get(o))||void 0===e?void 0:e.get(n);return this.makeEditorClass(a)}},{key:"makeEditorClass",value:function(t){var e=function(e){y(o,e);var n=b(o);function o(e){var r;return d(this,o),r=n.call(this,e),t.hotCustomEditorInstance=v(r),r.editorComponent=t,r}return f(o,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}]),o}(l.default.editors.BaseEditor);return Object.getOwnPropertyNames(l.default.editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(e.prototype[n]=function(){for(var e,o=arguments.length,r=Array(o),a=0;o>a;a++)r[a]=arguments[a];return(e=t[n]).call.apply(e,[t].concat(r))})})),e}},{key:"getGlobalRendererElement",value:function(){return P(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children;return R(t,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.getGlobalEditorElement(t);e&&this.setGlobalEditorPortal(I(this.getOwnerDocument(),e,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var t=B.getSettings(this.props),e=this.getGlobalRendererElement(),n=this.getGlobalEditorElement();return t.columns=this.columnSettings.length?this.columnSettings:t.columns,t.editor=n?this.getEditorClass(n,S):this.props.editor||(this.props.settings?this.props.settings.editor:void 0),e?(t.renderer=this.getRendererWrapper(e),this.componentRendererColumns.set("global",!0)):t.renderer=this.props.renderer||(this.props.settings?this.props.settings.renderer:void 0),t}},{key:"displayAutoSizeWarning",value:function(t){var e,n;this.hotInstance&&(null!==(e=this.hotInstance.getPlugin("autoRowSize"))&&void 0!==e&&e.enabled||null!==(n=this.hotInstance.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&this.componentRendererColumns.size>0&&function(){var t;void 0!==console&&(t=console).warn.apply(t,arguments)}("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.")}},{key:"setHotColumnSettings",value:function(t,e){this.columnSettings[e]=t}},{key:"handsontableBeforeViewRender",value:function(){this.getRenderedCellCache().clear()}},{key:"handsontableAfterViewRender",value:function(){var t=this;this.portalManager.setState((function(){return Object.assign({},{portals:t.portalCacheArray})}),(function(){t.portalCacheArray.length=0}))}},{key:"updateHot",value:function(t){this.hotInstance&&this.hotInstance.updateSettings(t,!1)}},{key:"setPortalManagerRef",value:function(t){this.portalManager=t}},{key:"componentWillMount",value:function(){this.clearCache(),this.createGlobalEditorPortal()}},{key:"componentDidMount",value:function(){var t=this,e=this.createNewGlobalSettings();this.hotInstance=new l.default.Core(this.hotElementRef,e),this.hotInstance.addHook("beforeViewRender",(function(e){t.handsontableBeforeViewRender()})),this.hotInstance.addHook("afterViewRender",(function(){t.handsontableAfterViewRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(e)}},{key:"componentWillUpdate",value:function(t,e,n){this.clearCache(),_(this.getOwnerDocument()),this.createGlobalEditorPortal(t.children)}},{key:"componentDidUpdate",value:function(){var t=this.createNewGlobalSettings();this.updateHot(t),this.displayAutoSizeWarning(t)}},{key:"componentWillUnmount",value:function(){this.hotInstance&&this.hotInstance.destroy(),_(this.getOwnerDocument())}},{key:"render",value:function(){var t=this,e=j(this.props),n=e.id,o=e.className,r=e.style,i=a.default.Children.toArray(this.props.children),l=(i=i.filter((function(t){return function(t){return t.type===M}(t)}))).map((function(e,n){return a.default.cloneElement(e,{_componentRendererColumns:t.componentRendererColumns,_emitColumnSettings:t.setHotColumnSettings.bind(t),_columnIndex:n,_getChildElementByType:P.bind(t),_getRendererWrapper:t.getRendererWrapper.bind(t),_getEditorClass:t.getEditorClass.bind(t),_getOwnerDocument:t.getOwnerDocument.bind(t),_getEditorCache:t.getEditorCache.bind(t),children:e.props.children})}));return l.push(this.getGlobalEditorPortal()),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{ref:this.setHotElementRef.bind(this),id:n,className:o,style:r},l),a.default.createElement(D,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"0.0.0-next-e3a1f27-20230109"}}]),n}(a.default.Component);lt.propTypes={style:it.object,id:it.string,className:it.string};var ct=function(t){y(n,t);var e=b(n);function n(t){var o;return d(this,n),(o=e.call(this,t)).name="BaseEditorComponent",o.instance=null,o.row=null,o.col=null,o.prop=null,o.TD=null,o.originalValue=null,o.cellProperties=null,o.state=null,o.hotInstance=null,o.hotCustomEditorInstance=null,o.hot=null,t.emitEditorInstance&&t.emitEditorInstance(v(o),t.editorColumnScope),o}return f(n,[{key:"_fireCallbacks",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];(t=l.default.editors.BaseEditor.prototype._fireCallbacks).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.beginEditing).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.cancelChanges).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.checkEditorSection).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.close).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.discardEditor).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.enableFullEditMode).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.extend).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.finishEditing).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.focus).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.init).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isInFullEditMode).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isOpened).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isWaiting).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.open).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(t,e,n,o,r,a){return this.hotInstance=a.instance,this.row=t,this.col=e,this.prop=n,this.TD=o,this.originalValue=r,this.cellProperties=a,l.default.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance,t,e,n,o,r,a)}},{key:"saveValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.saveValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.setValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.addHook).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.removeHooksByKey).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.clearHooks).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCell).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCellRect).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(t,[this.hotCustomEditorInstance].concat(n))}}]),n}(a.default.Component);t.BaseEditorComponent=ct,t.HotColumn=M,t.HotTable=lt,t.default=lt,Object.defineProperty(t,"__esModule",{value:!0})}));
30
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom"),require("handsontable/base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Handsontable=t.Handsontable||{},t.Handsontable.react={}),t.React,t.ReactDOM,t.Handsontable)}(this,(function(t,e,n,o){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=r(e),i=r(n),l=r(o);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;e.length>n;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,C(o.key),o)}}function f(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,n){return(e=C(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return E(this,n)}}function C(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var k=null,S="global",w="hot-wrapper-editor-container";function P(t,e){var n=a.default.Children.toArray(t),o=a.default.Children.count(t),r=null;return 0!==o&&(r=1===o&&n[0].props[e]?n[0]:n.find((function(t){return void 0!==t.props[e]}))),r||null}function O(t){return t?t.type.WrappedComponent?t.type.WrappedComponent:t.type:null}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.querySelectorAll('[class^="'.concat(w,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;if(null!==e){var n=t.createElement("DIV"),o=j(e.props,!1),r=o.id,a=o.className,l=o.style;return r&&(n.id=r),n.className=[w,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function R(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S,o=P(t,"hot-editor"),r=O(o);return o?a.default.cloneElement(o,{emitEditorInstance:function(t,n){e.get(r)||e.set(r,new Map),e.get(r).set(null!=n?n:S,t)},editorColumnScope:n,isEditor:!0}):null}function j(t){var e=1>=arguments.length||void 0===arguments[1]||arguments[1];return{id:t.id||(e?"hot-"+Math.random().toString(36).substring(5):void 0),className:t.className||"",style:t.style||{}}}function A(t){var e=a.default.version.split(".").map((function(t){return parseInt(t)}));(e[0]>=16&&e[1]>=3||e[0]>=17)&&(t.UNSAFE_componentWillUpdate=t.componentWillUpdate,t.componentWillUpdate=void 0,t.UNSAFE_componentWillMount=t.componentWillMount,t.componentWillMount=void 0)}var B=function(){function t(){d(this,t)}return f(t,null,[{key:"getSettings",value:function(t){var e={};if(t.settings){var n=t.settings;for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}for(var r in t)"settings"!==r&&"children"!==r&&t.hasOwnProperty(r)&&(e[r]=t[r]);return e}}]),t}(),M=function(t){y(n,t);var e=b(n);function n(t,o){var r;return d(this,n),(r=e.call(this,t,o)).localEditorPortal=null,A(v(r)),r}return f(n,[{key:"getLocalEditorPortal",value:function(){return this.localEditorPortal}},{key:"setLocalEditorPortal",value:function(t){this.localEditorPortal=t}},{key:"getSettingsProps",value:function(){var t=this;return this.internalProps=["__componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(e){return!t.internalProps.includes(e)})).reduce((function(e,n){return e[n]=t.props[n],e}),{})}},{key:"getLocalEditorElement",value:function(){return R(this.props.children,this.props._getEditorCache(),this.props._columnIndex)}},{key:"createColumnSettings",value:function(){var t=this.props._getChildElementByType(this.props.children,"hot-renderer"),e=this.getLocalEditorElement();this.columnSettings=B.getSettings(this.getSettingsProps()),null!==t&&(this.columnSettings.renderer=this.props._getRendererWrapper(t),this.props._componentRendererColumns.set(this.props._columnIndex,!0)),null!==e&&(this.columnSettings.editor=this.props._getEditorClass(e,this.props._columnIndex))}},{key:"createLocalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.props._getEditorCache(),n=R(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(I(this.props._getOwnerDocument(),n,e))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentWillMount",value:function(){this.createLocalEditorPortal()}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentWillUpdate",value:function(t,e,n){this.createLocalEditorPortal(t.children)}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){return a.default.createElement(a.default.Fragment,null,this.getLocalEditorPortal())}}]),n}(a.default.Component),D=function(t){y(n,t);var e=b(n);function n(t){var o;return d(this,n),(o=e.call(this,t)).state={portals:[]},o}return f(n,[{key:"render",value:function(){return a.default.createElement(a.default.Fragment,null,this.state.portals)}}]),n}(a.default.Component);function T(t,e){return t(e={exports:{}},e.exports),e.exports}var x="function"==typeof Symbol&&Symbol.for,W=x?Symbol.for("react.element"):60103,H=x?Symbol.for("react.portal"):60106,$=x?Symbol.for("react.fragment"):60107,V=x?Symbol.for("react.strict_mode"):60108,N=x?Symbol.for("react.profiler"):60114,F=x?Symbol.for("react.provider"):60109,G=x?Symbol.for("react.context"):60110,L=x?Symbol.for("react.async_mode"):60111,z=x?Symbol.for("react.concurrent_mode"):60111,U=x?Symbol.for("react.forward_ref"):60112,q=x?Symbol.for("react.suspense"):60113,K=x?Symbol.for("react.suspense_list"):60120,Y=x?Symbol.for("react.memo"):60115,Z=x?Symbol.for("react.lazy"):60116,J=x?Symbol.for("react.block"):60121,Q=x?Symbol.for("react.fundamental"):60117,X=x?Symbol.for("react.responder"):60118,tt=x?Symbol.for("react.scope"):60119;function et(t){if("object"===u(t)&&null!==t){var e=t.$$typeof;switch(e){case W:switch(t=t.type){case L:case z:case $:case N:case V:case q:return t;default:switch(t=t&&t.$$typeof){case G:case U:case Z:case Y:case F:return t;default:return e}}case H:return e}}}function nt(t){return et(t)===z}var ot={AsyncMode:L,ConcurrentMode:z,ContextConsumer:G,ContextProvider:F,Element:W,ForwardRef:U,Fragment:$,Lazy:Z,Memo:Y,Portal:H,Profiler:N,StrictMode:V,Suspense:q,isAsyncMode:function(t){return nt(t)||et(t)===L},isConcurrentMode:nt,isContextConsumer:function(t){return et(t)===G},isContextProvider:function(t){return et(t)===F},isElement:function(t){return"object"===u(t)&&null!==t&&t.$$typeof===W},isForwardRef:function(t){return et(t)===U},isFragment:function(t){return et(t)===$},isLazy:function(t){return et(t)===Z},isMemo:function(t){return et(t)===Y},isPortal:function(t){return et(t)===H},isProfiler:function(t){return et(t)===N},isStrictMode:function(t){return et(t)===V},isSuspense:function(t){return et(t)===q},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===$||t===z||t===N||t===V||t===q||t===K||"object"===u(t)&&null!==t&&(t.$$typeof===Z||t.$$typeof===Y||t.$$typeof===F||t.$$typeof===G||t.$$typeof===U||t.$$typeof===Q||t.$$typeof===X||t.$$typeof===tt||t.$$typeof===J)},typeOf:et};T((function(t,e){}));T((function(t){t.exports=ot}));!function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(e).map((function(t){return e[t]}));if("0123456789"!==o.join(""))return!1;var r={};"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}();function rt(){}function at(){}Function.call.bind(Object.prototype.hasOwnProperty),at.resetWarningCache=rt;var it=T((function(t){t.exports=function(){function t(t,e,n,o,r,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){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 e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:at,resetWarningCache:rt};return n.PropTypes=n,n}()})),lt=function(t){y(n,t);var e=b(n);function n(t,o){var r;return d(this,n),(r=e.call(this,t,o)).id=null,r.__hotInstance=null,r.hotElementRef=null,r.columnSettings=[],r.portalManager=null,r.portalCacheArray=[],r.globalEditorPortal=null,r.renderedCellCache=new Map,r.editorCache=new Map,r.componentRendererColumns=new Map,A(v(r)),r}return f(n,[{key:"hotInstance",get:function(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set:function(t){this.__hotInstance=t}},{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"getGlobalEditorPortal",value:function(){return this.globalEditorPortal}},{key:"setGlobalEditorPortal",value:function(t){this.globalEditorPortal=t}},{key:"clearCache",value:function(){var t=this.getRenderedCellCache();this.setGlobalEditorPortal(null),_(this.getOwnerDocument()),this.getEditorCache().clear(),t.clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return this.hotElementRef?this.hotElementRef.ownerDocument:document}},{key:"setHotElementRef",value:function(t){this.hotElementRef=t}},{key:"getRendererWrapper",value:function(t){var e=this;return function(n,o,r,l,c,u,d){var p=e.getRenderedCellCache();if(p.has("".concat(r,"-").concat(l))&&(o.innerHTML=p.get("".concat(r,"-").concat(l)).innerHTML),o&&!o.getAttribute("ghost-table")){for(var f=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;o||(o=document),k||(k=o.createDocumentFragment());var r=o.createElement("DIV");k.appendChild(r);var l=a.default.cloneElement(t,s({key:"".concat(e.row,"-").concat(e.col)},e));return{portal:i.default.createPortal(l,r,"".concat(e.row,"-").concat(e.col,"-").concat(Math.random())),portalContainer:r}}(t,{TD:o,row:r,col:l,prop:c,value:u,cellProperties:d,isRenderer:!0},(function(){}),o.ownerDocument),h=f.portal,y=f.portalContainer;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(y),e.portalCacheArray.push(h)}return p.set("".concat(r,"-").concat(l),o),o}}},{key:"getEditorClass",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S,o=O(t),r=this.getEditorCache(),a=null===(e=r.get(o))||void 0===e?void 0:e.get(n);return this.makeEditorClass(a)}},{key:"makeEditorClass",value:function(t){var e=function(e){y(o,e);var n=b(o);function o(e){var r;return d(this,o),r=n.call(this,e),t.hotCustomEditorInstance=v(r),r.editorComponent=t,r}return f(o,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}]),o}(l.default.editors.BaseEditor);return Object.getOwnPropertyNames(l.default.editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(e.prototype[n]=function(){for(var e,o=arguments.length,r=Array(o),a=0;o>a;a++)r[a]=arguments[a];return(e=t[n]).call.apply(e,[t].concat(r))})})),e}},{key:"getGlobalRendererElement",value:function(){return P(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children;return R(t,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.getGlobalEditorElement(t);e&&this.setGlobalEditorPortal(I(this.getOwnerDocument(),e,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var t=B.getSettings(this.props),e=this.getGlobalRendererElement(),n=this.getGlobalEditorElement();return t.columns=this.columnSettings.length?this.columnSettings:t.columns,t.editor=n?this.getEditorClass(n,S):this.props.editor||(this.props.settings?this.props.settings.editor:void 0),e?(t.renderer=this.getRendererWrapper(e),this.componentRendererColumns.set("global",!0)):t.renderer=this.props.renderer||(this.props.settings?this.props.settings.renderer:void 0),t}},{key:"displayAutoSizeWarning",value:function(t){var e,n;this.hotInstance&&(null!==(e=this.hotInstance.getPlugin("autoRowSize"))&&void 0!==e&&e.enabled||null!==(n=this.hotInstance.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&this.componentRendererColumns.size>0&&function(){var t;void 0!==console&&(t=console).warn.apply(t,arguments)}("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.")}},{key:"setHotColumnSettings",value:function(t,e){this.columnSettings[e]=t}},{key:"handsontableBeforeViewRender",value:function(){this.getRenderedCellCache().clear()}},{key:"handsontableAfterViewRender",value:function(){var t=this;this.portalManager.setState((function(){return Object.assign({},{portals:t.portalCacheArray})}),(function(){t.portalCacheArray.length=0}))}},{key:"updateHot",value:function(t){this.hotInstance&&this.hotInstance.updateSettings(t,!1)}},{key:"setPortalManagerRef",value:function(t){this.portalManager=t}},{key:"componentWillMount",value:function(){this.clearCache(),this.createGlobalEditorPortal()}},{key:"componentDidMount",value:function(){var t=this,e=this.createNewGlobalSettings();this.hotInstance=new l.default.Core(this.hotElementRef,e),this.hotInstance.addHook("beforeViewRender",(function(e){t.handsontableBeforeViewRender()})),this.hotInstance.addHook("afterViewRender",(function(){t.handsontableAfterViewRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(e)}},{key:"componentWillUpdate",value:function(t,e,n){this.clearCache(),_(this.getOwnerDocument()),this.createGlobalEditorPortal(t.children)}},{key:"componentDidUpdate",value:function(){var t=this.createNewGlobalSettings();this.updateHot(t),this.displayAutoSizeWarning(t)}},{key:"componentWillUnmount",value:function(){this.hotInstance&&this.hotInstance.destroy(),_(this.getOwnerDocument())}},{key:"render",value:function(){var t=this,e=j(this.props),n=e.id,o=e.className,r=e.style,i=a.default.Children.toArray(this.props.children),l=(i=i.filter((function(t){return function(t){return t.type===M}(t)}))).map((function(e,n){return a.default.cloneElement(e,{_componentRendererColumns:t.componentRendererColumns,_emitColumnSettings:t.setHotColumnSettings.bind(t),_columnIndex:n,_getChildElementByType:P.bind(t),_getRendererWrapper:t.getRendererWrapper.bind(t),_getEditorClass:t.getEditorClass.bind(t),_getOwnerDocument:t.getOwnerDocument.bind(t),_getEditorCache:t.getEditorCache.bind(t),children:e.props.children})}));return l.push(this.getGlobalEditorPortal()),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{ref:this.setHotElementRef.bind(this),id:n,className:o,style:r},l),a.default.createElement(D,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"0.0.0-next-e857cca-20230112"}}]),n}(a.default.Component);lt.propTypes={style:it.object,id:it.string,className:it.string};var ct=function(t){y(n,t);var e=b(n);function n(t){var o;return d(this,n),(o=e.call(this,t)).name="BaseEditorComponent",o.instance=null,o.row=null,o.col=null,o.prop=null,o.TD=null,o.originalValue=null,o.cellProperties=null,o.state=null,o.hotInstance=null,o.hotCustomEditorInstance=null,o.hot=null,t.emitEditorInstance&&t.emitEditorInstance(v(o),t.editorColumnScope),o}return f(n,[{key:"_fireCallbacks",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];(t=l.default.editors.BaseEditor.prototype._fireCallbacks).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.beginEditing).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.cancelChanges).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.checkEditorSection).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.close).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.discardEditor).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.enableFullEditMode).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.extend).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.finishEditing).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.focus).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.init).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isInFullEditMode).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isOpened).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.isWaiting).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.open).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(t,e,n,o,r,a){return this.hotInstance=a.instance,this.row=t,this.col=e,this.prop=n,this.TD=o,this.originalValue=r,this.cellProperties=a,l.default.editors.BaseEditor.prototype.prepare.call(this.hotCustomEditorInstance,t,e,n,o,r,a)}},{key:"saveValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.saveValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.setValue).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.addHook).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.removeHooksByKey).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.clearHooks).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCell).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCellRect).call.apply(t,[this.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var t,e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return(t=l.default.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(t,[this.hotCustomEditorInstance].concat(n))}}]),n}(a.default.Component);t.BaseEditorComponent=ct,t.HotColumn=M,t.HotTable=lt,t.default=lt,Object.defineProperty(t,"__esModule",{value:!0})}));
31
31
  //# sourceMappingURL=react-handsontable.min.js.map
@@ -567,7 +567,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
567
567
  return PortalManager;
568
568
  }(React.Component);
569
569
 
570
- var version="0.0.0-next-e3a1f27-20230109";
570
+ var version="0.0.0-next-e857cca-20230112";
571
571
 
572
572
  function createCommonjsModule(fn, module) {
573
573
  return module = { exports: {} }, fn(module, module.exports), module.exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handsontable/react",
3
- "version": "0.0.0-next-e3a1f27-20230109",
3
+ "version": "0.0.0-next-e857cca-20230112",
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",
@@ -67,7 +67,7 @@
67
67
  "cpy-cli": "^3.1.1",
68
68
  "cross-env": "^5.2.0",
69
69
  "del-cli": "^3.0.1",
70
- "handsontable": "0.0.0-next-e3a1f27-20230109",
70
+ "handsontable": "0.0.0-next-e857cca-20230112",
71
71
  "jest": "^25.1.0",
72
72
  "prop-types": "^15.7.2",
73
73
  "react": "^16.10.2",
@@ -87,7 +87,7 @@
87
87
  "uglify-js": "^3.4.9"
88
88
  },
89
89
  "peerDependencies": {
90
- "handsontable": "0.0.0-next-e3a1f27-20230109"
90
+ "handsontable": "0.0.0-next-e857cca-20230112"
91
91
  },
92
92
  "scripts": {
93
93
  "build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min",