@handsontable/react 0.0.0-next-edcfd73-20230207 → 0.0.0-next-75fa2a0-20230210
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.
|
@@ -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-
|
|
580
|
+
var version="0.0.0-next-75fa2a0-20230210";
|
|
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-
|
|
28
|
+
* Version: 0.0.0-next-75fa2a0-20230210 (built at Fri Feb 10 2023 16:29:03 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-
|
|
607
|
+
var version="0.0.0-next-75fa2a0-20230210";
|
|
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-
|
|
28
|
+
* Version: 0.0.0-next-75fa2a0-20230210 (built at Fri Feb 10 2023 16:29:10 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){return s="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},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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,E(o.key),o)}}function p(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(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&&m(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(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=y(t);if(e){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(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 g(t)}(this,n)}}function E(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 b=null,C="global",k="hot-wrapper-editor-container";function S(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 P(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll('[class^="'.concat(k,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function O(){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=[k,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C,o=S(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:C,t)},editorColumnScope:n,isEditor:!0}):null}function I(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;o||(o=document),b||(b=o.createDocumentFragment());var r=o.createElement("DIV");b.appendChild(r);var l=a.default.cloneElement(t,function(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){f(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}({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}}function R(t){return{id:t.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"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(){u(this,t)}return p(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){h(n,t);var e=v(n);function n(t,o){var r;return u(this,n),(r=e.call(this,t,o)).localEditorPortal=null,j(g(r)),r}return p(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 _(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)),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=_(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(O(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){h(n,t);var e=v(n);function n(t){var o;return u(this,n),(o=e.call(this,t)).state={portals:[]},o}return p(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"===s(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"===s(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"===s(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}}();var ot="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function rt(){}function at(){}Function.call.bind(Object.prototype.hasOwnProperty),at.resetWarningCache=rt;var it=D((function(t){t.exports=function(){function t(t,e,n,o,r,a){if(a!==ot){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){h(n,t);var e=v(n);function n(t,o){var r;return u(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(g(r)),r}return p(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),P(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,a,i,l,c){var s=e.getRenderedCellCache();if(s.has("".concat(r,"-").concat(a))&&(o.innerHTML=s.get("".concat(r,"-").concat(a)).innerHTML),o&&!o.getAttribute("ghost-table")){for(var u=I(t,{TD:o,row:r,col:a,prop:i,value:l,cellProperties:c,isRenderer:!0},(function(){}),o.ownerDocument),d=u.portal,p=u.portalContainer;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(p),e.portalCacheArray.push(d)}return s.set("".concat(r,"-").concat(a),o),o}}},{key:"getEditorClass",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,o=w(t),r=null===(e=this.getEditorCache().get(o))||void 0===e?void 0:e.get(n);return this.makeEditorClass(r)}},{key:"makeEditorClass",value:function(t){var e=function(e){h(o,e);var n=v(o);function o(e){var r;return u(this,o),r=n.call(this,e),t.hotCustomEditorInstance=g(r),r.editorComponent=t,r}return p(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 S(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){return _(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var t=this.getGlobalEditorElement(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children);t&&this.setGlobalEditorPortal(O(this.getOwnerDocument(),t,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,C):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(),P(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(),P(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:S.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"0.0.0-next-edcfd73-20230207"}}]),n}(a.default.Component);lt.propTypes={style:it.object,id:it.string,className:it.string};var ct=function(t){h(n,t);var e=v(n);function n(t){var o;return u(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(g(o),t.editorColumnScope),o}return p(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=B,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){return s="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},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(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,E(o.key),o)}}function p(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(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&&m(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(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=y(t);if(e){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(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 g(t)}(this,n)}}function E(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 b=null,C="global",k="hot-wrapper-editor-container";function S(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 P(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll('[class^="'.concat(k,'"]')).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}function O(){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=[k,a].join(" "),l&&Object.assign(n.style,l),t.body.appendChild(n),i.default.createPortal(e,n)}}function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C,o=S(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:C,t)},editorColumnScope:n,isEditor:!0}):null}function I(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;o||(o=document),b||(b=o.createDocumentFragment());var r=o.createElement("DIV");b.appendChild(r);var l=a.default.cloneElement(t,function(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){f(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}({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}}function R(t){return{id:t.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"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(){u(this,t)}return p(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){h(n,t);var e=v(n);function n(t,o){var r;return u(this,n),(r=e.call(this,t,o)).localEditorPortal=null,j(g(r)),r}return p(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 _(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)),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=_(t,e,this.props._columnIndex);n&&this.setLocalEditorPortal(O(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){h(n,t);var e=v(n);function n(t){var o;return u(this,n),(o=e.call(this,t)).state={portals:[]},o}return p(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"===s(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"===s(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"===s(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}}();var ot="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function rt(){}function at(){}Function.call.bind(Object.prototype.hasOwnProperty),at.resetWarningCache=rt;var it=D((function(t){t.exports=function(){function t(t,e,n,o,r,a){if(a!==ot){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){h(n,t);var e=v(n);function n(t,o){var r;return u(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(g(r)),r}return p(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),P(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,a,i,l,c){var s=e.getRenderedCellCache();if(s.has("".concat(r,"-").concat(a))&&(o.innerHTML=s.get("".concat(r,"-").concat(a)).innerHTML),o&&!o.getAttribute("ghost-table")){for(var u=I(t,{TD:o,row:r,col:a,prop:i,value:l,cellProperties:c,isRenderer:!0},(function(){}),o.ownerDocument),d=u.portal,p=u.portalContainer;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(p),e.portalCacheArray.push(d)}return s.set("".concat(r,"-").concat(a),o),o}}},{key:"getEditorClass",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,o=w(t),r=null===(e=this.getEditorCache().get(o))||void 0===e?void 0:e.get(n);return this.makeEditorClass(r)}},{key:"makeEditorClass",value:function(t){var e=function(e){h(o,e);var n=v(o);function o(e){var r;return u(this,o),r=n.call(this,e),t.hotCustomEditorInstance=g(r),r.editorComponent=t,r}return p(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 S(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){return _(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var t=this.getGlobalEditorElement(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children);t&&this.setGlobalEditorPortal(O(this.getOwnerDocument(),t,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,C):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(),P(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(),P(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:S.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"0.0.0-next-75fa2a0-20230210"}}]),n}(a.default.Component);lt.propTypes={style:it.object,id:it.string,className:it.string};var ct=function(t){h(n,t);var e=v(n);function n(t){var o;return u(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(g(o),t.editorColumnScope),o}return p(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=B,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-
|
|
570
|
+
var version="0.0.0-next-75fa2a0-20230210";
|
|
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-
|
|
3
|
+
"version": "0.0.0-next-75fa2a0-20230210",
|
|
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-
|
|
70
|
+
"handsontable": "0.0.0-next-75fa2a0-20230210",
|
|
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-
|
|
90
|
+
"handsontable": "0.0.0-next-75fa2a0-20230210"
|
|
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",
|