@handsontable/react 12.1.1 → 12.1.2
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.
|
@@ -679,7 +679,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
679
679
|
return PortalManager;
|
|
680
680
|
}(React__default["default"].Component);
|
|
681
681
|
|
|
682
|
-
var version="12.1.
|
|
682
|
+
var version="12.1.2";
|
|
683
683
|
|
|
684
684
|
function createCommonjsModule(fn, module) {
|
|
685
685
|
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: 12.1.
|
|
28
|
+
* Version: 12.1.2 (built at Fri Jul 08 2022 09:09:26 GMT+0200 (Central European Summer 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')) :
|
|
@@ -706,7 +706,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
706
706
|
return PortalManager;
|
|
707
707
|
}(React__default["default"].Component);
|
|
708
708
|
|
|
709
|
-
var version="12.1.
|
|
709
|
+
var version="12.1.2";
|
|
710
710
|
|
|
711
711
|
function createCommonjsModule(fn, module) {
|
|
712
712
|
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: 12.1.
|
|
28
|
+
* Version: 12.1.2 (built at Fri Jul 08 2022 09:09:28 GMT+0200 (Central European Summer 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,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 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)}}var C=null,k="global",S="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 w(t){return t?t.type.WrappedComponent?t.type.WrappedComponent:t.type:null}function O(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.querySelectorAll('[class^="'.concat(S,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function _(){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=R(e.props,!1),r=o.id,a=o.className,l=o.style;return r&&(n.id=r),n.className=[S,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function I(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k,o=P(t,"hot-editor"),r=w(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:k,t)},editorColumnScope:n,isEditor:!0}):null}function R(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 j(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 A=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}(),B=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,j(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:"hasProp",value:function(t){return!!this.props[t]}},{key:"getLocalEditorElement",value:function(){return I(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=A.getSettings(this.getSettingsProps()),null!==t?(this.columnSettings.renderer=this.props._getRendererWrapper(t),this.props._componentRendererColumns.set(this.props._columnIndex,!0)):this.columnSettings.renderer=this.hasProp("renderer")?this.props.renderer:void 0,this.columnSettings.editor=null!==e?this.props._getEditorClass(e,this.props._columnIndex):this.hasProp("editor")?this.props.editor:void 0}},{key:"createLocalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.props._getEditorCache(),n=I(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(_(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),M=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 D(t,e){return t(e={exports:{}},e.exports),e.exports}var T="function"==typeof Symbol&&Symbol.for,x=T?Symbol.for("react.element"):60103,W=T?Symbol.for("react.portal"):60106,H=T?Symbol.for("react.fragment"):60107,$=T?Symbol.for("react.strict_mode"):60108,V=T?Symbol.for("react.profiler"):60114,N=T?Symbol.for("react.provider"):60109,F=T?Symbol.for("react.context"):60110,G=T?Symbol.for("react.async_mode"):60111,L=T?Symbol.for("react.concurrent_mode"):60111,z=T?Symbol.for("react.forward_ref"):60112,U=T?Symbol.for("react.suspense"):60113,q=T?Symbol.for("react.suspense_list"):60120,K=T?Symbol.for("react.memo"):60115,Y=T?Symbol.for("react.lazy"):60116,Z=T?Symbol.for("react.block"):60121,J=T?Symbol.for("react.fundamental"):60117,Q=T?Symbol.for("react.responder"):60118,X=T?Symbol.for("react.scope"):60119;function tt(t){if("object"===u(t)&&null!==t){var e=t.$$typeof;switch(e){case x:switch(t=t.type){case G:case L:case H:case V:case $:case U:return t;default:switch(t=t&&t.$$typeof){case F:case z:case Y:case K:case N:return t;default:return e}}case W:return e}}}function et(t){return tt(t)===L}var nt={AsyncMode:G,ConcurrentMode:L,ContextConsumer:F,ContextProvider:N,Element:x,ForwardRef:z,Fragment:H,Lazy:Y,Memo:K,Portal:W,Profiler:V,StrictMode:$,Suspense:U,isAsyncMode:function(t){return et(t)||tt(t)===G},isConcurrentMode:et,isContextConsumer:function(t){return tt(t)===F},isContextProvider:function(t){return tt(t)===N},isElement:function(t){return"object"===u(t)&&null!==t&&t.$$typeof===x},isForwardRef:function(t){return tt(t)===z},isFragment:function(t){return tt(t)===H},isLazy:function(t){return tt(t)===Y},isMemo:function(t){return tt(t)===K},isPortal:function(t){return tt(t)===W},isProfiler:function(t){return tt(t)===V},isStrictMode:function(t){return tt(t)===$},isSuspense:function(t){return tt(t)===U},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===H||t===L||t===V||t===$||t===U||t===q||"object"===u(t)&&null!==t&&(t.$$typeof===Y||t.$$typeof===K||t.$$typeof===N||t.$$typeof===F||t.$$typeof===z||t.$$typeof===J||t.$$typeof===Q||t.$$typeof===X||t.$$typeof===Z)},typeOf:tt};D((function(t,e){}));D((function(t){t.exports=nt}));!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 ot(){}function rt(){}Function.call.bind(Object.prototype.hasOwnProperty),rt.resetWarningCache=ot;var at=D((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:rt,resetWarningCache:ot};return n.PropTypes=n,n}()})),it=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,j(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),O(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),C||(C=o.createDocumentFragment());var r=o.createElement("DIV");C.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]:k,o=w(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 I(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(_(this.getOwnerDocument(),e,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var t=A.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,k):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(),O(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(),O(this.getOwnerDocument())}},{key:"render",value:function(){var t=this,e=R(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===B}(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(M,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"12.1.1"}}]),n}(a.default.Component);it.propTypes={style:at.object,id:at.string,className:at.string};var lt=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=lt,t.HotColumn=B,t.HotTable=it,t.default=it,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,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 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)}}var C=null,k="global",S="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 w(t){return t?t.type.WrappedComponent?t.type.WrappedComponent:t.type:null}function O(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.querySelectorAll('[class^="'.concat(S,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function _(){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=R(e.props,!1),r=o.id,a=o.className,l=o.style;return r&&(n.id=r),n.className=[S,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function I(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k,o=P(t,"hot-editor"),r=w(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:k,t)},editorColumnScope:n,isEditor:!0}):null}function R(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 j(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 A=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}(),B=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,j(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:"hasProp",value:function(t){return!!this.props[t]}},{key:"getLocalEditorElement",value:function(){return I(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=A.getSettings(this.getSettingsProps()),null!==t?(this.columnSettings.renderer=this.props._getRendererWrapper(t),this.props._componentRendererColumns.set(this.props._columnIndex,!0)):this.columnSettings.renderer=this.hasProp("renderer")?this.props.renderer:void 0,this.columnSettings.editor=null!==e?this.props._getEditorClass(e,this.props._columnIndex):this.hasProp("editor")?this.props.editor:void 0}},{key:"createLocalEditorPortal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,e=this.props._getEditorCache(),n=I(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(_(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),M=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 D(t,e){return t(e={exports:{}},e.exports),e.exports}var T="function"==typeof Symbol&&Symbol.for,x=T?Symbol.for("react.element"):60103,W=T?Symbol.for("react.portal"):60106,H=T?Symbol.for("react.fragment"):60107,$=T?Symbol.for("react.strict_mode"):60108,V=T?Symbol.for("react.profiler"):60114,N=T?Symbol.for("react.provider"):60109,F=T?Symbol.for("react.context"):60110,G=T?Symbol.for("react.async_mode"):60111,L=T?Symbol.for("react.concurrent_mode"):60111,z=T?Symbol.for("react.forward_ref"):60112,U=T?Symbol.for("react.suspense"):60113,q=T?Symbol.for("react.suspense_list"):60120,K=T?Symbol.for("react.memo"):60115,Y=T?Symbol.for("react.lazy"):60116,Z=T?Symbol.for("react.block"):60121,J=T?Symbol.for("react.fundamental"):60117,Q=T?Symbol.for("react.responder"):60118,X=T?Symbol.for("react.scope"):60119;function tt(t){if("object"===u(t)&&null!==t){var e=t.$$typeof;switch(e){case x:switch(t=t.type){case G:case L:case H:case V:case $:case U:return t;default:switch(t=t&&t.$$typeof){case F:case z:case Y:case K:case N:return t;default:return e}}case W:return e}}}function et(t){return tt(t)===L}var nt={AsyncMode:G,ConcurrentMode:L,ContextConsumer:F,ContextProvider:N,Element:x,ForwardRef:z,Fragment:H,Lazy:Y,Memo:K,Portal:W,Profiler:V,StrictMode:$,Suspense:U,isAsyncMode:function(t){return et(t)||tt(t)===G},isConcurrentMode:et,isContextConsumer:function(t){return tt(t)===F},isContextProvider:function(t){return tt(t)===N},isElement:function(t){return"object"===u(t)&&null!==t&&t.$$typeof===x},isForwardRef:function(t){return tt(t)===z},isFragment:function(t){return tt(t)===H},isLazy:function(t){return tt(t)===Y},isMemo:function(t){return tt(t)===K},isPortal:function(t){return tt(t)===W},isProfiler:function(t){return tt(t)===V},isStrictMode:function(t){return tt(t)===$},isSuspense:function(t){return tt(t)===U},isValidElementType:function(t){return"string"==typeof t||"function"==typeof t||t===H||t===L||t===V||t===$||t===U||t===q||"object"===u(t)&&null!==t&&(t.$$typeof===Y||t.$$typeof===K||t.$$typeof===N||t.$$typeof===F||t.$$typeof===z||t.$$typeof===J||t.$$typeof===Q||t.$$typeof===X||t.$$typeof===Z)},typeOf:tt};D((function(t,e){}));D((function(t){t.exports=nt}));!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 ot(){}function rt(){}Function.call.bind(Object.prototype.hasOwnProperty),rt.resetWarningCache=ot;var at=D((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:rt,resetWarningCache:ot};return n.PropTypes=n,n}()})),it=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,j(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),O(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),C||(C=o.createDocumentFragment());var r=o.createElement("DIV");C.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]:k,o=w(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 I(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(_(this.getOwnerDocument(),e,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var t=A.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,k):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(),O(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(),O(this.getOwnerDocument())}},{key:"render",value:function(){var t=this,e=R(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===B}(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(M,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"12.1.2"}}]),n}(a.default.Component);it.propTypes={style:at.object,id:at.string,className:at.string};var lt=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=lt,t.HotColumn=B,t.HotTable=it,t.default=it,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
31
31
|
//# sourceMappingURL=react-handsontable.min.js.map
|
package/es/react-handsontable.js
CHANGED
|
@@ -669,7 +669,7 @@ var PortalManager = /*#__PURE__*/function (_React$Component) {
|
|
|
669
669
|
return PortalManager;
|
|
670
670
|
}(React.Component);
|
|
671
671
|
|
|
672
|
-
var version="12.1.
|
|
672
|
+
var version="12.1.2";
|
|
673
673
|
|
|
674
674
|
function createCommonjsModule(fn, module) {
|
|
675
675
|
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": "12.1.
|
|
3
|
+
"version": "12.1.2",
|
|
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",
|