@handsontable/react-wrapper 0.0.0-next-f1ffe8e-20260512 → 0.0.0-next-c01ac07-20260512
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.
|
@@ -1079,7 +1079,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1079
1079
|
}, editorPortal);
|
|
1080
1080
|
};
|
|
1081
1081
|
|
|
1082
|
-
var version="0.0.0-next-
|
|
1082
|
+
var version="0.0.0-next-c01ac07-20260512";
|
|
1083
1083
|
|
|
1084
1084
|
/**
|
|
1085
1085
|
* Component used to manage the renderer component portals.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 0.0.0-next-
|
|
28
|
+
* Version: 0.0.0-next-c01ac07-20260512 (built at Tue May 12 2026 08:18:27 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
30
|
(function (global, factory) {
|
|
31
31
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('handsontable/base'), require('handsontable/renderers/registry'), require('handsontable/editors/registry')) :
|
|
@@ -1104,7 +1104,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1104
1104
|
}, editorPortal);
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
1107
|
-
var version="0.0.0-next-
|
|
1107
|
+
var version="0.0.0-next-c01ac07-20260512";
|
|
1108
1108
|
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Component used to manage the renderer component portals.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 0.0.0-next-
|
|
28
|
+
* Version: 0.0.0-next-c01ac07-20260512 (built at Tue May 12 2026 08:18:29 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,function(e,t,n,r,o,u){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(t),a=i(n),c=i(r);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function f(e,t,n){return t=g(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function v(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,i,l=[],a=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t);else for(;!(a=(r=u.call(n)).done)&&(l.push(r.value),l.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function S(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}var x=null;function j(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function k(e){return H(e,"hot-renderer")?(j("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!H(e,"hot-editor")&&(j("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function H(e,t){return l.default.Children.toArray(e).some(function(e){return void 0!==e.props[t]})}function I(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=l.default.createElement(t,null),r=T({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),a.default.createPortal(l.default.createElement("div",r,n),e.body)}function T(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function _(e){return"object"===P(e)&&null!==e}function D(e){if(!_(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function M(e){return Array.isArray(e)}function A(e,t){if(e===t)return!0;if(e instanceof RegExp||t instanceof RegExp)return e instanceof RegExp&&t instanceof RegExp&&(e.source===t.source&&e.flags===t.flags);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(!A(e[n],t[n]))return!1;return!0}if(M(e)||M(t))return!1;if(!_(e)||!_(t))return!1;if(!D(e)||!D(t))return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var u=0,i=r;i.length>u;u++){var l=i[u];if(!Object.prototype.hasOwnProperty.call(t,l))return!1;if(!A(e[l],t[l]))return!1}return!0}var V=["dataSchema","columns"],N=function(){return v(function e(){d(this,e)},null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,u=void 0!==o&&o,i=t.initOnlySettingKeys,l=void 0===i?[]:i,a=function(t){return!u&&V.includes(t)?A(r[t],e[t]):!(u||!l.includes(t))},c={};for(var s in e)"children"!==s&&!a(s)&&e.hasOwnProperty(s)&&(c[s]=e[s]);return c}}])}(),B=t.createContext(void 0),z=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback(function(e,t){r.current[t]=e},[]),u=t.useRef(new Map),i=t.useRef(new Map),c=t.useCallback(function(){return i.current.clear()},[]),s=t.useRef(new Map),f=t.useCallback(function(){return s.current.clear()},[]),d=t.useRef(new Map),p=t.useCallback(function(e){return function(t,n,r,o,u,c,f){var p="".concat(r,"-").concat(o),v=t.guid,y="".concat(v,"-").concat(p),h="".concat(p,"-").concat(v);if(n&&!n.getAttribute("ghost-table")){var g=d.current.get(y),m=!!g&&g.parentNode===n,b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0;t||(t=document);var r=arguments.length>3?arguments[3]:void 0;return r||(x||(x=t.createDocumentFragment()),r=t.createElement("DIV"),x.appendChild(r)),{portal:a.default.createPortal(e,r,n),portalContainer:r}}(l.default.createElement(e,{instance:t,TD:n,row:r,col:o,prop:u,value:c,cellProperties:f}),n.ownerDocument,h,g),O=b.portal,C=b.portalContainer;if(!m){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(C)}d.current.set(y,C),s.current.set(h,O)}return i.current.set(p,n),n}},[]),v=t.useRef(function(){}),y=t.useCallback(function(e){v.current=e},[]),h=t.useCallback(function(){v.current(R(s.current.values()))},[]),g=t.useMemo(function(){return{componentRendererColumns:u.current,columnsSettings:r.current,emitColumnSettings:o,getRendererWrapper:p,clearPortalCache:f,clearRenderedCellCache:c,setRenderersPortalManagerRef:y,pushCellPortalsIntoPortalManager:h}},[o,p,c,y,h]);return l.default.createElement(B.Provider,{value:g},n)};function F(){return t.useContext(B)}var W=t.createContext(void 0),q=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.children,u=t.useMemo(function(){return{columnIndex:n,getOwnerDocument:r}},[n,r]);return l.default.createElement(W.Provider,{value:u},o)},U=["close","focus","open"],G=["getValue","setValue"],Y={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function K(e,t){return function(n){function r(n){var o;return d(this,r),o=f(this,r,[n]),t.current=o,Object.getOwnPropertyNames(c.default.editors.BaseEditor.prototype).forEach(function(t){if("constructor"!==t&&!G.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,i=arguments.length,l=Array(i),a=0;i>a;a++)l[a]=arguments[a];(U.includes(t)||(o=n.call.apply(n,[this].concat(l))),Y[t]&&null!==(r=e.current)&&void 0!==r&&r[Y[t]])&&(o=(u=e.current[Y[t]]).call.apply(u,[this].concat(l)));return o}.bind(o)}}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(r,n),v(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(c.default.editors.BaseEditor)}var L=t.createContext(void 0),X=function(e){return l.default.createElement(L.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};function $(e,t,n,r){var o,u,i=n.rootWindow||window,l=null!==(o=i.pageXOffset)&&void 0!==o?o:0,a=null!==(u=i.pageYOffset)&&void 0!==u?u:0,c="function"==typeof n.isRtl&&n.isRtl();if("portal"===t.position){var s="function"==typeof t.getEditedCell?t.getEditedCell.call(t):null;return!(null==s||!s.getBoundingClientRect)&&(function(t){e.style.top="".concat(a+t.top-1,"px"),e.style.width="".concat(t.width+1,"px"),e.style.height="".concat(t.height+1,"px"),c?(e.style.right="".concat(l+t.right,"px"),e.style.left="auto"):(e.style.left="".concat(l+t.left-1,"px"),e.style.right="auto")}(s.getBoundingClientRect()),!0)}var f=t.getEditedCellRect,d="function"==typeof f?f.call(t):null;if(d){var p=n.rootElement;if(null!=p&&p.getBoundingClientRect){var v=p.getBoundingClientRect();return e.style.top="".concat(a+v.top+d.top,"px"),e.style.width="".concat(d.width,"px"),e.style.height="".concat(d.height,"px"),c?(e.style.right="".concat(l+v.right-d.start,"px"),e.style.left="auto"):(e.style.left="".concat(l+v.left+d.start,"px"),e.style.right="auto"),!0}}return!1}function J(e,n){var r=t.useContext(L),o=r.hooksRef,u=r.hotCustomEditorInstanceRef,i=w(t.useState(0),2),l=i[0],a=i[1],c=w(t.useState(),2),s=c[1],f=t.useDeferredValue(c[0]);return t.useImperativeHandle(o,function(){return O(O({},e),{},{onOpen:function(){var t,n;s(null===(t=u.current)||void 0===t?void 0:t.getValue()),null==e||null===(n=e.onOpen)||void 0===n||n.call(e),a(function(e){return e+1})}})},n),t.useMemo(function(){return{get value(){return f},setValue:function(e){var t;s(e),null===(t=u.current)||void 0===t||t.setValue(e)},get isOpen(){var e,t;return null!==(e=null===(t=u.current)||void 0===t?void 0:t.isOpened())&&void 0!==e&&e},finishEditing:function(){var e;null===(e=u.current)||void 0===e||e.finishEditing()},get row(){var e;return null===(e=u.current)||void 0===e?void 0:e.row},get col(){var e;return null===(e=u.current)||void 0===e?void 0:e.col}}},[l,u,f])}var Q=function(e){return e.type===ee},Z=["_columnIndex","_getOwnerDocument","children"],ee=function(e){var n=F(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,i=t.useContext(W),a=i.columnIndex,c=i.getOwnerDocument,s=t.useRef(null),f=t.useRef(null);t.useEffect(function(){var t=function(){var t=N.getSettings(Object.keys(e).filter(function(e){return!Z.includes(e)}).reduce(function(t,n){return t[n]=e[n],t},{}));return e.renderer?(t.renderer=u(e.renderer),r.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=K(s,f):e.hotEditor&&(t.editor=e.hotEditor),t}();o(t,a),k(e.children)||l.default.Children.toArray(e.children).length&&j("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.")});var d=I(c(),e.editor);return l.default.createElement(X,{hooksRef:s,hotCustomEditorInstanceRef:f},d)},te=t.forwardRef(function(e,n){var r=w(t.useState([]),2),o=r[0],u=r[1];return t.useImperativeHandle(n,function(){return u}),l.default.createElement(t.Fragment,null,o)});function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re,oe,ue,ie,le={exports:{}};le.exports=function(){if(ie)return ue;ie=1;var e=oe?re:(oe=1,re="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,ue=function(){function r(t,n,r,o,u,i){if(i!==e){var l=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 l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u}}()();var ae=ne(le.exports),ce=t.forwardRef(function(e,n){var r,i,a,s=t.useRef(null),f=t.useRef(null),d=t.useRef(null),p=t.useRef(null),v=t.useRef(),y=F(),g=t.useCallback(function(){return s.current&&s.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):s.current},[s]),m=t.useCallback(function(){return!s.current||s.current.isDestroyed},[s]),b=t.useCallback(function(){y.clearRenderedCellCache(),y.componentRendererColumns.clear()},[y]),C=t.useCallback(function(){return"undefined"!=typeof window?f.current?f.current.ownerDocument:document:null},[f]),w=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m()?[]:(null===(t=g())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],l=N.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:i});return y.columnsSettings.length&&(l.columns=y.columnsSettings),e.renderer?(l.renderer=y.getRendererWrapper(e.renderer),y.componentRendererColumns.set("global",!0)):l.renderer=e.hotRenderer||o.getRenderer("text"),l.editor=e.editor?K(d,p):e.hotEditor||u.getEditor("text"),l},R=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&y.componentRendererColumns.size>0&&j("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};t.useEffect(function(){var t,n=w(!0);return v.current=e,s.current=new c.default.Core(f.current,n),s.current.addHook("beforeViewRender",function(){y.clearPortalCache(),y.clearRenderedCellCache()}),s.current.addHook("afterViewRender",function(){y.pushCellPortalsIntoPortalManager()}),s.current.init(),R(s.current),k(e.children)||(t=ee,l.default.Children.toArray(e.children).some(function(e){return e.type!==t})&&j("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;b(),null===(e=g())||void 0===e||e.destroy()}},[]),r=function(){b();var t=g(),n=w(!1,v.current);v.current=e,null==t||t.updateSettings(n,!1),R(t),k(e.children)},a=l.default.useRef(!1),t.useEffect(function(){if(a.current)return r();a.current=!0},i),t.useImperativeHandle(n,function(){return{get hotElementRef(){return f.current},get hotInstance(){return g()}}});var E=t.Children.toArray(e.children).filter(Q).map(function(e,t){return l.default.createElement(q,{columnIndex:t,getOwnerDocument:C,key:t},e)}),P=T(e),S=I(C(),e.editor);return l.default.createElement(t.Fragment,null,l.default.createElement("div",h({ref:f},P,{style:O({height:"100%"},P.style)}),E),l.default.createElement(te,{ref:y.setRenderersPortalManagerRef}),l.default.createElement(X,{hooksRef:d,hotCustomEditorInstanceRef:p},S))});ce.propTypes={style:ae.object,id:ae.string,className:ae.string};var se=["children"],fe=t.forwardRef(function(e,n){var r,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;u.length>r;r++)-1===t.indexOf(n=u[r])&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,se),i=null!==(r=u.id)&&void 0!==r?r:t.useId();return l.default.createElement(z,null,l.default.createElement(ce,h({id:i},u,{ref:n}),o))});fe.version="0.0.0-next-f1ffe8e-20260512",e.EditorComponent=function(e){var n=e.onPrepare,r=e.onClose,o=e.onOpen,u=e.onFocus,i=e.children,a=e.shortcutsGroup,c=void 0===a?"custom-editor":a,s=e.shortcuts,f=t.useRef(null),d=t.useRef(void 0),p=w(t.useState(),2),v=p[0],y=p[1],h=t.useContext(L).hotCustomEditorInstanceRef,g=t.useCallback(function(){var e,t,n;if(null!==(e=h.current)&&void 0!==e&&e.hot){null===(t=h.current)||void 0===t||null===(t=t.hot)||void 0===t||t.getShortcutManager().setActiveContextName("editor");var r=(null===(n=h.current)||void 0===n||null===(n=n.hot)||void 0===n?void 0:n.getShortcutManager()).getContext("editor"),o={group:c};s&&(null==r||r.addShortcuts(s.map(function(e){return O(O({},e),{},{group:e.group||c,relativeToGroup:e.relativeToGroup||"editorManager.handlingEditor",position:e.position||"before",callback:function(t){return e.callback({value:d.current,setValue:S,finishEditing:x},t)}})}),o))}},[s]),m=t.useCallback(function(){var e,t;null!==(e=h.current)&&void 0!==e&&e.hot&&(null===(t=h.current)||void 0===t||null===(t=t.hot)||void 0===t?void 0:t.getShortcutManager()).getContext("editor").removeShortcutsByGroup(c)},[s]),b=t.useCallback(function(){var e=h.current,t=f.current;if(e&&t){var n=e.hot;n&&"function"==typeof e.isOpened&&e.isOpened()&&($(t,e,n)||"function"!=typeof e.close||e.close())}},[]),C=t.useCallback(function(){var e=h.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.removeHook&&(t.removeHook("afterScrollHorizontally",b),t.removeHook("afterScrollVertically",b))},[b]),R=t.useCallback(function(){var e=h.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.addHook&&(t.addHook("afterScrollHorizontally",b),t.addHook("afterScrollVertically",b))},[b]),E=J({onOpen:function(){var e;if(f.current){var t=null===(e=h.current)||void 0===e?void 0:e.hot.getCurrentThemeName();t&&y(t),f.current.style.display="block",null==o||o();var n=f.current,r=h.current;n&&null!=r&&r.hot&&$(n,r,r.hot),g(),R()}},onClose:function(){f.current&&(f.current.style.display="none",null==r||r(),m(),C())},onPrepare:function(e,t,r,o,u,i){null==n||n(e,t,r,o,u,i)},onFocus:function(){null==u||u()}}),P=E.value,S=E.setValue,x=E.finishEditing,j=E.isOpen,k=E.col,H=E.row;return t.useEffect(function(){d.current=P},[P]),l.default.createElement("div",{ref:f,className:v,style:{display:"none",position:"absolute",background:"#fff",border:"0px",padding:"0px",zIndex:100},onMouseDown:function(e){e.stopPropagation()}},i({value:P,setValue:S,finishEditing:x,mainElementRef:f,isOpen:j,col:k,row:H}))},e.EditorContext=L,e.HotColumn=ee,e.HotTable=fe,e.default=fe,e.isHotColumn=Q,e.useHotEditor=J,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
30
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("handsontable/base"),require("handsontable/renderers/registry"),require("handsontable/editors/registry")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","handsontable/base","handsontable/renderers/registry","handsontable/editors/registry"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.react={}),e.React,e.ReactDOM,e.Handsontable,e.Handsontable.renderers,e.Handsontable.editors)}(this,function(e,t,n,r,o,u){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(t),a=i(n),c=i(r);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function f(e,t,n){return t=g(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function v(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,i,l=[],a=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t);else for(;!(a=(r=u.call(n)).done)&&(l.push(r.value),l.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function S(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}var x=null;function j(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function k(e){return H(e,"hot-renderer")?(j("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!H(e,"hot-editor")&&(j("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function H(e,t){return l.default.Children.toArray(e).some(function(e){return void 0!==e.props[t]})}function I(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=l.default.createElement(t,null),r=T({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),a.default.createPortal(l.default.createElement("div",r,n),e.body)}function T(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function _(e){return"object"===P(e)&&null!==e}function D(e){if(!_(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function M(e){return Array.isArray(e)}function A(e,t){if(e===t)return!0;if(e instanceof RegExp||t instanceof RegExp)return e instanceof RegExp&&t instanceof RegExp&&(e.source===t.source&&e.flags===t.flags);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(!A(e[n],t[n]))return!1;return!0}if(M(e)||M(t))return!1;if(!_(e)||!_(t))return!1;if(!D(e)||!D(t))return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var u=0,i=r;i.length>u;u++){var l=i[u];if(!Object.prototype.hasOwnProperty.call(t,l))return!1;if(!A(e[l],t[l]))return!1}return!0}var V=["dataSchema","columns"],N=function(){return v(function e(){d(this,e)},null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,u=void 0!==o&&o,i=t.initOnlySettingKeys,l=void 0===i?[]:i,a=function(t){return!u&&V.includes(t)?A(r[t],e[t]):!(u||!l.includes(t))},c={};for(var s in e)"children"!==s&&!a(s)&&e.hasOwnProperty(s)&&(c[s]=e[s]);return c}}])}(),B=t.createContext(void 0),z=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback(function(e,t){r.current[t]=e},[]),u=t.useRef(new Map),i=t.useRef(new Map),c=t.useCallback(function(){return i.current.clear()},[]),s=t.useRef(new Map),f=t.useCallback(function(){return s.current.clear()},[]),d=t.useRef(new Map),p=t.useCallback(function(e){return function(t,n,r,o,u,c,f){var p="".concat(r,"-").concat(o),v=t.guid,y="".concat(v,"-").concat(p),h="".concat(p,"-").concat(v);if(n&&!n.getAttribute("ghost-table")){var g=d.current.get(y),m=!!g&&g.parentNode===n,b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0;t||(t=document);var r=arguments.length>3?arguments[3]:void 0;return r||(x||(x=t.createDocumentFragment()),r=t.createElement("DIV"),x.appendChild(r)),{portal:a.default.createPortal(e,r,n),portalContainer:r}}(l.default.createElement(e,{instance:t,TD:n,row:r,col:o,prop:u,value:c,cellProperties:f}),n.ownerDocument,h,g),O=b.portal,C=b.portalContainer;if(!m){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(C)}d.current.set(y,C),s.current.set(h,O)}return i.current.set(p,n),n}},[]),v=t.useRef(function(){}),y=t.useCallback(function(e){v.current=e},[]),h=t.useCallback(function(){v.current(R(s.current.values()))},[]),g=t.useMemo(function(){return{componentRendererColumns:u.current,columnsSettings:r.current,emitColumnSettings:o,getRendererWrapper:p,clearPortalCache:f,clearRenderedCellCache:c,setRenderersPortalManagerRef:y,pushCellPortalsIntoPortalManager:h}},[o,p,c,y,h]);return l.default.createElement(B.Provider,{value:g},n)};function F(){return t.useContext(B)}var W=t.createContext(void 0),q=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.children,u=t.useMemo(function(){return{columnIndex:n,getOwnerDocument:r}},[n,r]);return l.default.createElement(W.Provider,{value:u},o)},U=["close","focus","open"],G=["getValue","setValue"],Y={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function K(e,t){return function(n){function r(n){var o;return d(this,r),o=f(this,r,[n]),t.current=o,Object.getOwnPropertyNames(c.default.editors.BaseEditor.prototype).forEach(function(t){if("constructor"!==t&&!G.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,i=arguments.length,l=Array(i),a=0;i>a;a++)l[a]=arguments[a];(U.includes(t)||(o=n.call.apply(n,[this].concat(l))),Y[t]&&null!==(r=e.current)&&void 0!==r&&r[Y[t]])&&(o=(u=e.current[Y[t]]).call.apply(u,[this].concat(l)));return o}.bind(o)}}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(r,n),v(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(c.default.editors.BaseEditor)}var L=t.createContext(void 0),X=function(e){return l.default.createElement(L.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};function $(e,t,n,r){var o,u,i=n.rootWindow||window,l=null!==(o=i.pageXOffset)&&void 0!==o?o:0,a=null!==(u=i.pageYOffset)&&void 0!==u?u:0,c="function"==typeof n.isRtl&&n.isRtl();if("portal"===t.position){var s="function"==typeof t.getEditedCell?t.getEditedCell.call(t):null;return!(null==s||!s.getBoundingClientRect)&&(function(t){e.style.top="".concat(a+t.top-1,"px"),e.style.width="".concat(t.width+1,"px"),e.style.height="".concat(t.height+1,"px"),c?(e.style.right="".concat(l+t.right,"px"),e.style.left="auto"):(e.style.left="".concat(l+t.left-1,"px"),e.style.right="auto")}(s.getBoundingClientRect()),!0)}var f=t.getEditedCellRect,d="function"==typeof f?f.call(t):null;if(d){var p=n.rootElement;if(null!=p&&p.getBoundingClientRect){var v=p.getBoundingClientRect();return e.style.top="".concat(a+v.top+d.top,"px"),e.style.width="".concat(d.width,"px"),e.style.height="".concat(d.height,"px"),c?(e.style.right="".concat(l+v.right-d.start,"px"),e.style.left="auto"):(e.style.left="".concat(l+v.left+d.start,"px"),e.style.right="auto"),!0}}return!1}function J(e,n){var r=t.useContext(L),o=r.hooksRef,u=r.hotCustomEditorInstanceRef,i=w(t.useState(0),2),l=i[0],a=i[1],c=w(t.useState(),2),s=c[1],f=t.useDeferredValue(c[0]);return t.useImperativeHandle(o,function(){return O(O({},e),{},{onOpen:function(){var t,n;s(null===(t=u.current)||void 0===t?void 0:t.getValue()),null==e||null===(n=e.onOpen)||void 0===n||n.call(e),a(function(e){return e+1})}})},n),t.useMemo(function(){return{get value(){return f},setValue:function(e){var t;s(e),null===(t=u.current)||void 0===t||t.setValue(e)},get isOpen(){var e,t;return null!==(e=null===(t=u.current)||void 0===t?void 0:t.isOpened())&&void 0!==e&&e},finishEditing:function(){var e;null===(e=u.current)||void 0===e||e.finishEditing()},get row(){var e;return null===(e=u.current)||void 0===e?void 0:e.row},get col(){var e;return null===(e=u.current)||void 0===e?void 0:e.col}}},[l,u,f])}var Q=function(e){return e.type===ee},Z=["_columnIndex","_getOwnerDocument","children"],ee=function(e){var n=F(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,i=t.useContext(W),a=i.columnIndex,c=i.getOwnerDocument,s=t.useRef(null),f=t.useRef(null);t.useEffect(function(){var t=function(){var t=N.getSettings(Object.keys(e).filter(function(e){return!Z.includes(e)}).reduce(function(t,n){return t[n]=e[n],t},{}));return e.renderer?(t.renderer=u(e.renderer),r.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=K(s,f):e.hotEditor&&(t.editor=e.hotEditor),t}();o(t,a),k(e.children)||l.default.Children.toArray(e.children).length&&j("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.")});var d=I(c(),e.editor);return l.default.createElement(X,{hooksRef:s,hotCustomEditorInstanceRef:f},d)},te=t.forwardRef(function(e,n){var r=w(t.useState([]),2),o=r[0],u=r[1];return t.useImperativeHandle(n,function(){return u}),l.default.createElement(t.Fragment,null,o)});function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re,oe,ue,ie,le={exports:{}};le.exports=function(){if(ie)return ue;ie=1;var e=oe?re:(oe=1,re="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,ue=function(){function r(t,n,r,o,u,i){if(i!==e){var l=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 l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u}}()();var ae=ne(le.exports),ce=t.forwardRef(function(e,n){var r,i,a,s=t.useRef(null),f=t.useRef(null),d=t.useRef(null),p=t.useRef(null),v=t.useRef(),y=F(),g=t.useCallback(function(){return s.current&&s.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):s.current},[s]),m=t.useCallback(function(){return!s.current||s.current.isDestroyed},[s]),b=t.useCallback(function(){y.clearRenderedCellCache(),y.componentRendererColumns.clear()},[y]),C=t.useCallback(function(){return"undefined"!=typeof window?f.current?f.current.ownerDocument:document:null},[f]),w=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m()?[]:(null===(t=g())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],l=N.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:i});return y.columnsSettings.length&&(l.columns=y.columnsSettings),e.renderer?(l.renderer=y.getRendererWrapper(e.renderer),y.componentRendererColumns.set("global",!0)):l.renderer=e.hotRenderer||o.getRenderer("text"),l.editor=e.editor?K(d,p):e.hotEditor||u.getEditor("text"),l},R=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&y.componentRendererColumns.size>0&&j("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};t.useEffect(function(){var t,n=w(!0);return v.current=e,s.current=new c.default.Core(f.current,n),s.current.addHook("beforeViewRender",function(){y.clearPortalCache(),y.clearRenderedCellCache()}),s.current.addHook("afterViewRender",function(){y.pushCellPortalsIntoPortalManager()}),s.current.init(),R(s.current),k(e.children)||(t=ee,l.default.Children.toArray(e.children).some(function(e){return e.type!==t})&&j("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;b(),null===(e=g())||void 0===e||e.destroy()}},[]),r=function(){b();var t=g(),n=w(!1,v.current);v.current=e,null==t||t.updateSettings(n,!1),R(t),k(e.children)},a=l.default.useRef(!1),t.useEffect(function(){if(a.current)return r();a.current=!0},i),t.useImperativeHandle(n,function(){return{get hotElementRef(){return f.current},get hotInstance(){return g()}}});var E=t.Children.toArray(e.children).filter(Q).map(function(e,t){return l.default.createElement(q,{columnIndex:t,getOwnerDocument:C,key:t},e)}),P=T(e),S=I(C(),e.editor);return l.default.createElement(t.Fragment,null,l.default.createElement("div",h({ref:f},P,{style:O({height:"100%"},P.style)}),E),l.default.createElement(te,{ref:y.setRenderersPortalManagerRef}),l.default.createElement(X,{hooksRef:d,hotCustomEditorInstanceRef:p},S))});ce.propTypes={style:ae.object,id:ae.string,className:ae.string};var se=["children"],fe=t.forwardRef(function(e,n){var r,o=e.children,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;u.length>r;r++)-1===t.indexOf(n=u[r])&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,se),i=null!==(r=u.id)&&void 0!==r?r:t.useId();return l.default.createElement(z,null,l.default.createElement(ce,h({id:i},u,{ref:n}),o))});fe.version="0.0.0-next-c01ac07-20260512",e.EditorComponent=function(e){var n=e.onPrepare,r=e.onClose,o=e.onOpen,u=e.onFocus,i=e.children,a=e.shortcutsGroup,c=void 0===a?"custom-editor":a,s=e.shortcuts,f=t.useRef(null),d=t.useRef(void 0),p=w(t.useState(),2),v=p[0],y=p[1],h=t.useContext(L).hotCustomEditorInstanceRef,g=t.useCallback(function(){var e,t,n;if(null!==(e=h.current)&&void 0!==e&&e.hot){null===(t=h.current)||void 0===t||null===(t=t.hot)||void 0===t||t.getShortcutManager().setActiveContextName("editor");var r=(null===(n=h.current)||void 0===n||null===(n=n.hot)||void 0===n?void 0:n.getShortcutManager()).getContext("editor"),o={group:c};s&&(null==r||r.addShortcuts(s.map(function(e){return O(O({},e),{},{group:e.group||c,relativeToGroup:e.relativeToGroup||"editorManager.handlingEditor",position:e.position||"before",callback:function(t){return e.callback({value:d.current,setValue:S,finishEditing:x},t)}})}),o))}},[s]),m=t.useCallback(function(){var e,t;null!==(e=h.current)&&void 0!==e&&e.hot&&(null===(t=h.current)||void 0===t||null===(t=t.hot)||void 0===t?void 0:t.getShortcutManager()).getContext("editor").removeShortcutsByGroup(c)},[s]),b=t.useCallback(function(){var e=h.current,t=f.current;if(e&&t){var n=e.hot;n&&"function"==typeof e.isOpened&&e.isOpened()&&($(t,e,n)||"function"!=typeof e.close||e.close())}},[]),C=t.useCallback(function(){var e=h.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.removeHook&&(t.removeHook("afterScrollHorizontally",b),t.removeHook("afterScrollVertically",b))},[b]),R=t.useCallback(function(){var e=h.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.addHook&&(t.addHook("afterScrollHorizontally",b),t.addHook("afterScrollVertically",b))},[b]),E=J({onOpen:function(){var e;if(f.current){var t=null===(e=h.current)||void 0===e?void 0:e.hot.getCurrentThemeName();t&&y(t),f.current.style.display="block",null==o||o();var n=f.current,r=h.current;n&&null!=r&&r.hot&&$(n,r,r.hot),g(),R()}},onClose:function(){f.current&&(f.current.style.display="none",null==r||r(),m(),C())},onPrepare:function(e,t,r,o,u,i){null==n||n(e,t,r,o,u,i)},onFocus:function(){null==u||u()}}),P=E.value,S=E.setValue,x=E.finishEditing,j=E.isOpen,k=E.col,H=E.row;return t.useEffect(function(){d.current=P},[P]),l.default.createElement("div",{ref:f,className:v,style:{display:"none",position:"absolute",background:"#fff",border:"0px",padding:"0px",zIndex:100},onMouseDown:function(e){e.stopPropagation()}},i({value:P,setValue:S,finishEditing:x,mainElementRef:f,isOpen:j,col:k,row:H}))},e.EditorContext=L,e.HotColumn=ee,e.HotTable=fe,e.default=fe,e.isHotColumn=Q,e.useHotEditor=J,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
31
31
|
//# sourceMappingURL=react-handsontable.min.js.map
|
|
@@ -1069,7 +1069,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1069
1069
|
}, editorPortal);
|
|
1070
1070
|
};
|
|
1071
1071
|
|
|
1072
|
-
var version="0.0.0-next-
|
|
1072
|
+
var version="0.0.0-next-c01ac07-20260512";
|
|
1073
1073
|
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Component used to manage the renderer component portals.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/react-wrapper",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-c01ac07-20260512",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/react-dom": "^18.2.0",
|
|
73
73
|
"@types/react-redux": "^7.1.7",
|
|
74
74
|
"cross-env": "^7.0.3",
|
|
75
|
-
"handsontable": "0.0.0-next-
|
|
75
|
+
"handsontable": "0.0.0-next-c01ac07-20260512",
|
|
76
76
|
"jest": "^27.5.1",
|
|
77
77
|
"jest-environment-jsdom": "^27.5.1",
|
|
78
78
|
"prop-types": "^15.7.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-c01ac07-20260512"
|
|
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 && npm run prepare:types",
|