@handsontable/react-wrapper 0.0.0-next-22a2aba-20261019 → 0.0.0-next-99f9e64-20261019
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.
|
@@ -1305,7 +1305,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1305
1305
|
}, editorPortal);
|
|
1306
1306
|
};
|
|
1307
1307
|
|
|
1308
|
-
var version="0.0.0-next-
|
|
1308
|
+
var version="0.0.0-next-99f9e64-20261019";
|
|
1309
1309
|
|
|
1310
1310
|
function getDefaultExportFromCjs (x) {
|
|
1311
1311
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -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-99f9e64-20261019 (built at Mon Oct 19 2026 13:41:32 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')) :
|
|
@@ -1330,7 +1330,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1330
1330
|
}, editorPortal);
|
|
1331
1331
|
};
|
|
1332
1332
|
|
|
1333
|
-
var version="0.0.0-next-
|
|
1333
|
+
var version="0.0.0-next-99f9e64-20261019";
|
|
1334
1334
|
|
|
1335
1335
|
function getDefaultExportFromCjs (x) {
|
|
1336
1336
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -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-99f9e64-20261019 (built at Mon Oct 19 2026 13:41:35 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=m(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,g()?Reflect.construct(t,n||[],m(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 h(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 y(){return y=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},y.apply(null,arguments)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=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 C(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){h(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 O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(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 k=null;function j(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function x(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){return!!e&&"boolean"!=typeof e}function T(e,t){return!1!==t&&(t&&!0!==t?t:!1!==e&&void 0)}function _(e,t,n){if(!e||!t||"boolean"==typeof t||!n)return null;var r=l.default.createElement(t,null),o=D({},!1);return o.className="".concat("hot-wrapper-editor-container"," ").concat(o.className),a.default.createPortal(l.default.createElement("div",o,r),n)}function D(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-".concat(Math.random().toString(36).substring(5)):void 0),className:e.className||"",style:e.style||{}}}function M(e){return"object"===P(e)&&null!==e}function A(e){if(!M(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function V(e){return Array.isArray(e)}function N(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(V(e)&&V(t)){if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(!N(e[n],t[n]))return!1;return!0}if(V(e)||V(t))return!1;if(!M(e)||!M(t))return!1;if(!A(e)||!A(t))return!1;var r=Object.keys(e),o=Object.keys(t);return r.length===o.length&&r.every(function(n){return Object.prototype.hasOwnProperty.call(t,n)&&N(e[n],t[n])})}var z=["dataSchema","columns","rowHeights","minRowHeights","colWidths"],B=["rowHeights","minRowHeights","colWidths"],W=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=t.currentSettings,c=function(t){return!u&&(!!l.includes(t)||!!z.includes(t)&&N(a&&B.includes(t)?a[t]:r[t],e[t]))},s={};return Object.keys(e).forEach(function(t){"children"===t||c(t)||(s[t]=e[t])}),s}}])}(),F=t.createContext(void 0),q=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback(function(e,t){r.current[t]=e},[]),u=t.useCallback(function(e){r.current.length=e},[]),i=t.useRef(new Map),c=t.useRef(new Map),s=t.useCallback(function(){return c.current.clear()},[]),f=t.useRef(new Map),d=t.useRef(new Map),p=t.useRef(new Set),v=t.useCallback(function(){f.current.clear(),p.current.clear()},[]),h=t.useCallback(function(){return d.current.size},[]),y=t.useRef(new WeakMap),m=t.useRef(0),g=t.useCallback(function(e){var t,n,r=null!==(t=null===(n=e.parentElement)||void 0===n?void 0:n.parentElement)&&void 0!==t?t:e,o=y.current.get(r);if(void 0!==o)return o;var u=m.current;return m.current+=1,y.current.set(r,u),u},[]),b=t.useCallback(function(e){return function(t,n,r,o,u,i,s){var v="".concat(r,"-").concat(o),h=t.guid;if(n&&!n.getAttribute("ghost-table")){var y=g(n),m="".concat(h,"-").concat(y,"-").concat(v),b="".concat(v,"-").concat(y,"-").concat(h),C=d.current.get(m),O=!!C&&C.parentNode===n,w=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||(k||(k=t.createDocumentFragment()),r=t.createElement("DIV"),k.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:i,cellProperties:s}),n.ownerDocument,b,C),R=w.portal,E=w.portalContainer;if(!O){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(E)}d.current.set(m,E),p.current.add(m),f.current.set(b,R)}return c.current.set(v,n),n}},[g]),C=t.useRef(function(){}),O=t.useCallback(function(e){C.current=e},[]),w=t.useCallback(function(){var e=p.current;d.current.forEach(function(t,n){e.has(n)||d.current.delete(n)}),C.current(R(f.current.values()))},[]),E=t.useMemo(function(){return{componentRendererColumns:i.current,columnsSettings:r.current,emitColumnSettings:o,trimColumnSettings:u,getRendererWrapper:b,clearPortalCache:v,clearRenderedCellCache:s,getPortalContainerCacheSize:h,setRenderersPortalManagerRef:O,pushCellPortalsIntoPortalManager:w}},[o,u,b,s,h,O,w]);return l.default.createElement(F.Provider,{value:E},n)};function U(){return t.useContext(F)}var G=t.createContext(void 0),Y=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.getEditorPortalHost,u=e.children,i=t.useMemo(function(){return{columnIndex:n,getOwnerDocument:r,getEditorPortalHost:o}},[n,r,o]);return l.default.createElement(G.Provider,{value:i},u)},K=["close","focus","open"],L=["getValue","setValue"],X={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function $(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&&!L.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,i,l=arguments.length,a=Array(l),c=0;l>c;c++)a[c]=arguments[c];K.includes(t)||(o=(u=n).call.apply(u,[this].concat(a)));X[t]&&null!==(r=e.current)&&void 0!==r&&r[X[t]]&&(o=(i=e.current[X[t]]).call.apply(i,[this].concat(a)));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&&O(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 J=t.createContext(void 0),Q=function(e){return l.default.createElement(J.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};function Z(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 ee(e,n){var r=t.useContext(J),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[0],f=c[1];return t.useImperativeHandle(o,function(){return C(C({},e),{},{onOpen:function(t){var n,r;f(null===(n=u.current)||void 0===n?void 0:n.getValue()),null==e||null===(r=e.onOpen)||void 0===r||r.call(e,t),a(function(e){return e+1})}})},n),t.useMemo(function(){return{get value(){return s},setValue:function(e){var t;f(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,t=null===(e=u.current)||void 0===e?void 0:e.row;return null!=t?t:void 0},get col(){var e,t=null===(e=u.current)||void 0===e?void 0:e.col;return null!=t?t:void 0}}},[l,u,s])}var te=function(e){return e.type===re},ne=["_columnIndex","_getOwnerDocument","children"],re=function(e){var n=U(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,i=t.useContext(G),a=i.columnIndex,c=i.getOwnerDocument,s=i.getEditorPortalHost,f=t.useRef(null),d=t.useRef(null);t.useEffect(function(){var t=function(){var t=W.getSettings(Object.keys(e).filter(function(e){return!ne.includes(e)}).reduce(function(t,n){return t[n]=e[n],t},{}));if(e.renderer?(t.renderer=u(e.renderer),r.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),I(e.editor))t.editor=$(f,d);else{var n=T(e.editor,e.hotEditor);void 0===n?delete t.editor:t.editor=n}return t}();o(t,a),x(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 p=_(c(),e.editor,s());return l.default.createElement(Q,{hooksRef:f,hotCustomEditorInstanceRef:d},p)};function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ue,ie,le,ae,ce={exports:{}};ce.exports=function(){if(ae)return le;ae=1;var e=ie?ue:(ie=1,ue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,le=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 se=oe(ce.exports),fe=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)}),de=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(null),h=t.useRef(),m=U(),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]),b=t.useCallback(function(){return!s.current||s.current.isDestroyed},[s]),O=t.useCallback(function(){m.clearRenderedCellCache(),m.componentRendererColumns.clear()},[m]),w=t.useCallback(function(){return"undefined"!=typeof window?f.current?f.current.ownerDocument:document:null},[f]),R=t.useCallback(function(){var e=w();if(!e)return null;if(v.current)v.current.isConnected||e.body.appendChild(v.current);else{var t=e.createElement("div");t.className="hot-wrapper-editor-portal-host",e.body.appendChild(t),v.current=t}return v.current},[w]),E=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=b()||null===(t=g())||void 0===t?void 0:t.getSettings(),l=W.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:(null==i?void 0:i._initOnlySettings)||[],currentSettings:i});if(m.columnsSettings.length&&(l.columns=m.columnsSettings),e.renderer?(l.renderer=m.getRendererWrapper(e.renderer),m.componentRendererColumns.set("global",!0)):l.renderer=e.hotRenderer||o.getRenderer("text"),I(e.editor))l.editor=$(d,p);else{var a=T(e.editor,e.hotEditor);l.editor=void 0===a?u.getEditor("text"):a}return l},P=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)&&m.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 n=t.Children.toArray(e.children).filter(te).length;m.trimColumnSettings(n);var r=E(!0);h.current=e,s.current=new c.default.Core(f.current,r),s.current.addHook("beforeViewRender",function(){m.clearPortalCache(),m.clearRenderedCellCache()}),s.current.addHook("afterViewRender",function(){m.pushCellPortalsIntoPortalManager()}),s.current.init();var o,u=v.current,i=s.current.rootPortalElement;return u&&i?u.parentNode!==i&&i.appendChild(u):u&&!i&&j("The React editor portal host could not be attached to `rootPortalElement`. The editor stays on `document.body` and clicks on it may fail to commit."),P(s.current),x(e.children)||(o=re,l.default.Children.toArray(e.children).some(function(e){return e.type!==o})&&j("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e,t;null===(e=v.current)||void 0===e||e.remove(),O(),null===(t=g())||void 0===t||t.destroy()}},[]),r=function(){O();var n=g(),r=t.Children.toArray(e.children).filter(te).length;m.trimColumnSettings(r);var o=E(!1,h.current);h.current=e,null==n||n.updateSettings(o,!1),P(n),x(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 S=t.Children.toArray(e.children).filter(te).map(function(e,t){return l.default.createElement(Y,{columnIndex:t,getOwnerDocument:w,getEditorPortalHost:R,key:t},e)}),k=D(e),H=_(w(),e.editor,R());return l.default.createElement(t.Fragment,null,l.default.createElement("div",y({ref:f},k,{style:C({height:"100%"},k.style)}),S),l.default.createElement(fe,{ref:m.setRenderersPortalManagerRef}),l.default.createElement(Q,{hooksRef:d,hotCustomEditorInstanceRef:p},H))});de.propTypes={style:se.object,id:se.string,className:se.string};var pe=["children"],ve=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,pe),i=t.useId(),a=null!==(r=u.id)&&void 0!==r?r:i;return l.default.createElement(q,null,l.default.createElement(de,y({id:a},u,{ref:n}),o))});ve.version="0.0.0-next-22a2aba-20261019",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],h=p[1],y=t.useContext(J).hotCustomEditorInstanceRef,m=t.useCallback(function(){var e,t,n;if(null!==(e=y.current)&&void 0!==e&&e.hot){null===(t=y.current)||void 0===t||null===(t=t.hot)||void 0===t||t.getShortcutManager().setActiveContextName("editor");var r=(null===(n=y.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 C(C({},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:k},t)}})}),o))}},[s]),g=t.useCallback(function(){var e,t;null!==(e=y.current)&&void 0!==e&&e.hot&&(null===(t=y.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=y.current,t=f.current;if(e&&t){var n=e.hot;n&&"function"==typeof e.isOpened&&e.isOpened()&&(Z(t,e,n)||"function"!=typeof e.close||e.close())}},[]),O=t.useCallback(function(){var e=y.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=y.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.addHook&&(t.addHook("afterScrollHorizontally",b),t.addHook("afterScrollVertically",b))},[b]),E=ee({onOpen:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return""+e},t}(function(e){var t;if(f.current){var n=null===(t=y.current)||void 0===t?void 0:t.hot.getCurrentThemeName();n&&h(n),f.current.style.display="block";var r=f.current,u=y.current;r&&null!=u&&u.hot&&Z(r,u,u.hot),null==o||o(e),m(),R()}}),onClose:function(){f.current&&(f.current.style.display="none",null==r||r(),g(),O())},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,k=E.finishEditing,j=E.isOpen,x=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:k,mainElementRef:f,isOpen:j,col:x,row:H}))},e.EditorContext=J,e.HotColumn=re,e.HotTable=ve,e.default=ve,e.isHotColumn=te,e.useHotEditor=ee,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=m(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,g()?Reflect.construct(t,n||[],m(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 h(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 y(){return y=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},y.apply(null,arguments)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=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 C(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){h(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 O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(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 k=null;function j(){var e;void 0!==console&&(e=console).warn.apply(e,arguments)}function x(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){return!!e&&"boolean"!=typeof e}function T(e,t){return!1!==t&&(t&&!0!==t?t:!1!==e&&void 0)}function _(e,t,n){if(!e||!t||"boolean"==typeof t||!n)return null;var r=l.default.createElement(t,null),o=D({},!1);return o.className="".concat("hot-wrapper-editor-container"," ").concat(o.className),a.default.createPortal(l.default.createElement("div",o,r),n)}function D(e){return{id:e.id||(1>=arguments.length||void 0===arguments[1]||arguments[1]?"hot-".concat(Math.random().toString(36).substring(5)):void 0),className:e.className||"",style:e.style||{}}}function M(e){return"object"===P(e)&&null!==e}function A(e){if(!M(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function V(e){return Array.isArray(e)}function N(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(V(e)&&V(t)){if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(!N(e[n],t[n]))return!1;return!0}if(V(e)||V(t))return!1;if(!M(e)||!M(t))return!1;if(!A(e)||!A(t))return!1;var r=Object.keys(e),o=Object.keys(t);return r.length===o.length&&r.every(function(n){return Object.prototype.hasOwnProperty.call(t,n)&&N(e[n],t[n])})}var z=["dataSchema","columns","rowHeights","minRowHeights","colWidths"],B=["rowHeights","minRowHeights","colWidths"],W=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=t.currentSettings,c=function(t){return!u&&(!!l.includes(t)||!!z.includes(t)&&N(a&&B.includes(t)?a[t]:r[t],e[t]))},s={};return Object.keys(e).forEach(function(t){"children"===t||c(t)||(s[t]=e[t])}),s}}])}(),F=t.createContext(void 0),q=function(e){var n=e.children,r=t.useRef([]),o=t.useCallback(function(e,t){r.current[t]=e},[]),u=t.useCallback(function(e){r.current.length=e},[]),i=t.useRef(new Map),c=t.useRef(new Map),s=t.useCallback(function(){return c.current.clear()},[]),f=t.useRef(new Map),d=t.useRef(new Map),p=t.useRef(new Set),v=t.useCallback(function(){f.current.clear(),p.current.clear()},[]),h=t.useCallback(function(){return d.current.size},[]),y=t.useRef(new WeakMap),m=t.useRef(0),g=t.useCallback(function(e){var t,n,r=null!==(t=null===(n=e.parentElement)||void 0===n?void 0:n.parentElement)&&void 0!==t?t:e,o=y.current.get(r);if(void 0!==o)return o;var u=m.current;return m.current+=1,y.current.set(r,u),u},[]),b=t.useCallback(function(e){return function(t,n,r,o,u,i,s){var v="".concat(r,"-").concat(o),h=t.guid;if(n&&!n.getAttribute("ghost-table")){var y=g(n),m="".concat(h,"-").concat(y,"-").concat(v),b="".concat(v,"-").concat(y,"-").concat(h),C=d.current.get(m),O=!!C&&C.parentNode===n,w=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||(k||(k=t.createDocumentFragment()),r=t.createElement("DIV"),k.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:i,cellProperties:s}),n.ownerDocument,b,C),R=w.portal,E=w.portalContainer;if(!O){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(E)}d.current.set(m,E),p.current.add(m),f.current.set(b,R)}return c.current.set(v,n),n}},[g]),C=t.useRef(function(){}),O=t.useCallback(function(e){C.current=e},[]),w=t.useCallback(function(){var e=p.current;d.current.forEach(function(t,n){e.has(n)||d.current.delete(n)}),C.current(R(f.current.values()))},[]),E=t.useMemo(function(){return{componentRendererColumns:i.current,columnsSettings:r.current,emitColumnSettings:o,trimColumnSettings:u,getRendererWrapper:b,clearPortalCache:v,clearRenderedCellCache:s,getPortalContainerCacheSize:h,setRenderersPortalManagerRef:O,pushCellPortalsIntoPortalManager:w}},[o,u,b,s,h,O,w]);return l.default.createElement(F.Provider,{value:E},n)};function U(){return t.useContext(F)}var G=t.createContext(void 0),Y=function(e){var n=e.columnIndex,r=e.getOwnerDocument,o=e.getEditorPortalHost,u=e.children,i=t.useMemo(function(){return{columnIndex:n,getOwnerDocument:r,getEditorPortalHost:o}},[n,r,o]);return l.default.createElement(G.Provider,{value:i},u)},K=["close","focus","open"],L=["getValue","setValue"],X={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function $(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&&!L.includes(t)){var n=c.default.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,u,i,l=arguments.length,a=Array(l),c=0;l>c;c++)a[c]=arguments[c];K.includes(t)||(o=(u=n).call.apply(u,[this].concat(a)));X[t]&&null!==(r=e.current)&&void 0!==r&&r[X[t]]&&(o=(i=e.current[X[t]]).call.apply(i,[this].concat(a)));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&&O(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 J=t.createContext(void 0),Q=function(e){return l.default.createElement(J.Provider,{value:{hooksRef:e.hooksRef,hotCustomEditorInstanceRef:e.hotCustomEditorInstanceRef}},e.children)};function Z(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 ee(e,n){var r=t.useContext(J),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[0],f=c[1];return t.useImperativeHandle(o,function(){return C(C({},e),{},{onOpen:function(t){var n,r;f(null===(n=u.current)||void 0===n?void 0:n.getValue()),null==e||null===(r=e.onOpen)||void 0===r||r.call(e,t),a(function(e){return e+1})}})},n),t.useMemo(function(){return{get value(){return s},setValue:function(e){var t;f(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,t=null===(e=u.current)||void 0===e?void 0:e.row;return null!=t?t:void 0},get col(){var e,t=null===(e=u.current)||void 0===e?void 0:e.col;return null!=t?t:void 0}}},[l,u,s])}var te=function(e){return e.type===re},ne=["_columnIndex","_getOwnerDocument","children"],re=function(e){var n=U(),r=n.componentRendererColumns,o=n.emitColumnSettings,u=n.getRendererWrapper,i=t.useContext(G),a=i.columnIndex,c=i.getOwnerDocument,s=i.getEditorPortalHost,f=t.useRef(null),d=t.useRef(null);t.useEffect(function(){var t=function(){var t=W.getSettings(Object.keys(e).filter(function(e){return!ne.includes(e)}).reduce(function(t,n){return t[n]=e[n],t},{}));if(e.renderer?(t.renderer=u(e.renderer),r.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),I(e.editor))t.editor=$(f,d);else{var n=T(e.editor,e.hotEditor);void 0===n?delete t.editor:t.editor=n}return t}();o(t,a),x(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 p=_(c(),e.editor,s());return l.default.createElement(Q,{hooksRef:f,hotCustomEditorInstanceRef:d},p)};function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ue,ie,le,ae,ce={exports:{}};ce.exports=function(){if(ae)return le;ae=1;var e=ie?ue:(ie=1,ue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,le=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 se=oe(ce.exports),fe=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)}),de=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(null),h=t.useRef(),m=U(),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]),b=t.useCallback(function(){return!s.current||s.current.isDestroyed},[s]),O=t.useCallback(function(){m.clearRenderedCellCache(),m.componentRendererColumns.clear()},[m]),w=t.useCallback(function(){return"undefined"!=typeof window?f.current?f.current.ownerDocument:document:null},[f]),R=t.useCallback(function(){var e=w();if(!e)return null;if(v.current)v.current.isConnected||e.body.appendChild(v.current);else{var t=e.createElement("div");t.className="hot-wrapper-editor-portal-host",e.body.appendChild(t),v.current=t}return v.current},[w]),E=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=b()||null===(t=g())||void 0===t?void 0:t.getSettings(),l=W.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:(null==i?void 0:i._initOnlySettings)||[],currentSettings:i});if(m.columnsSettings.length&&(l.columns=m.columnsSettings),e.renderer?(l.renderer=m.getRendererWrapper(e.renderer),m.componentRendererColumns.set("global",!0)):l.renderer=e.hotRenderer||o.getRenderer("text"),I(e.editor))l.editor=$(d,p);else{var a=T(e.editor,e.hotEditor);l.editor=void 0===a?u.getEditor("text"):a}return l},P=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)&&m.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 n=t.Children.toArray(e.children).filter(te).length;m.trimColumnSettings(n);var r=E(!0);h.current=e,s.current=new c.default.Core(f.current,r),s.current.addHook("beforeViewRender",function(){m.clearPortalCache(),m.clearRenderedCellCache()}),s.current.addHook("afterViewRender",function(){m.pushCellPortalsIntoPortalManager()}),s.current.init();var o,u=v.current,i=s.current.rootPortalElement;return u&&i?u.parentNode!==i&&i.appendChild(u):u&&!i&&j("The React editor portal host could not be attached to `rootPortalElement`. The editor stays on `document.body` and clicks on it may fail to commit."),P(s.current),x(e.children)||(o=re,l.default.Children.toArray(e.children).some(function(e){return e.type!==o})&&j("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e,t;null===(e=v.current)||void 0===e||e.remove(),O(),null===(t=g())||void 0===t||t.destroy()}},[]),r=function(){O();var n=g(),r=t.Children.toArray(e.children).filter(te).length;m.trimColumnSettings(r);var o=E(!1,h.current);h.current=e,null==n||n.updateSettings(o,!1),P(n),x(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 S=t.Children.toArray(e.children).filter(te).map(function(e,t){return l.default.createElement(Y,{columnIndex:t,getOwnerDocument:w,getEditorPortalHost:R,key:t},e)}),k=D(e),H=_(w(),e.editor,R());return l.default.createElement(t.Fragment,null,l.default.createElement("div",y({ref:f},k,{style:C({height:"100%"},k.style)}),S),l.default.createElement(fe,{ref:m.setRenderersPortalManagerRef}),l.default.createElement(Q,{hooksRef:d,hotCustomEditorInstanceRef:p},H))});de.propTypes={style:se.object,id:se.string,className:se.string};var pe=["children"],ve=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,pe),i=t.useId(),a=null!==(r=u.id)&&void 0!==r?r:i;return l.default.createElement(q,null,l.default.createElement(de,y({id:a},u,{ref:n}),o))});ve.version="0.0.0-next-99f9e64-20261019",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],h=p[1],y=t.useContext(J).hotCustomEditorInstanceRef,m=t.useCallback(function(){var e,t,n;if(null!==(e=y.current)&&void 0!==e&&e.hot){null===(t=y.current)||void 0===t||null===(t=t.hot)||void 0===t||t.getShortcutManager().setActiveContextName("editor");var r=(null===(n=y.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 C(C({},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:k},t)}})}),o))}},[s]),g=t.useCallback(function(){var e,t;null!==(e=y.current)&&void 0!==e&&e.hot&&(null===(t=y.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=y.current,t=f.current;if(e&&t){var n=e.hot;n&&"function"==typeof e.isOpened&&e.isOpened()&&(Z(t,e,n)||"function"!=typeof e.close||e.close())}},[]),O=t.useCallback(function(){var e=y.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=y.current,t=null==e?void 0:e.hot;t&&"function"==typeof t.addHook&&(t.addHook("afterScrollHorizontally",b),t.addHook("afterScrollVertically",b))},[b]),E=ee({onOpen:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return""+e},t}(function(e){var t;if(f.current){var n=null===(t=y.current)||void 0===t?void 0:t.hot.getCurrentThemeName();n&&h(n),f.current.style.display="block";var r=f.current,u=y.current;r&&null!=u&&u.hot&&Z(r,u,u.hot),null==o||o(e),m(),R()}}),onClose:function(){f.current&&(f.current.style.display="none",null==r||r(),g(),O())},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,k=E.finishEditing,j=E.isOpen,x=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:k,mainElementRef:f,isOpen:j,col:x,row:H}))},e.EditorContext=J,e.HotColumn=re,e.HotTable=ve,e.default=ve,e.isHotColumn=te,e.useHotEditor=ee,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
31
31
|
//# sourceMappingURL=react-handsontable.min.js.map
|
|
@@ -1295,7 +1295,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1295
1295
|
}, editorPortal);
|
|
1296
1296
|
};
|
|
1297
1297
|
|
|
1298
|
-
var version="0.0.0-next-
|
|
1298
|
+
var version="0.0.0-next-99f9e64-20261019";
|
|
1299
1299
|
|
|
1300
1300
|
function getDefaultExportFromCjs (x) {
|
|
1301
1301
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
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-99f9e64-20261019",
|
|
4
4
|
"description": "Handsontable DataGrid for React with a spreadsheet look and feel.",
|
|
5
5
|
"author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
|
|
6
6
|
"homepage": "https://handsontable.com",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"cross-env": "^7.0.3",
|
|
78
78
|
"eslint": "^8.57.1",
|
|
79
79
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
80
|
-
"handsontable": "0.0.0-next-
|
|
80
|
+
"handsontable": "0.0.0-next-99f9e64-20261019",
|
|
81
81
|
"jest": "^27.5.1",
|
|
82
82
|
"jest-environment-jsdom": "^27.5.1",
|
|
83
83
|
"prop-types": "^15.7.2",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"uglify-js": "^3.4.9"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"handsontable": "0.0.0-next-
|
|
95
|
+
"handsontable": "0.0.0-next-99f9e64-20261019"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min && npm run prepare:types",
|