react-modal-global
Advanced tools
Comparing version 0.9.29 to 0.9.30
@@ -8,4 +8,4 @@ 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(a[e]=c[e])};return extendStatics(d,b)}; | ||
e=e.queue;e=e[e.length-1];var g=(null===(a=null===e||void 0===e?void 0:e.params)||void 0===a?0:a.closable)?stopPropagation(e.close):void 0;a=this.props.template||react.Fragment;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",__assign({className:classWithModifiers(this.className,f&&"active"),"aria-modal":!0,"aria-hidden":!f},{children:jsxRuntime.jsx("div",__assign({className:this.className+"__container",onClick:g},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:e|| | ||
null},{children:jsxRuntime.jsx(a,{children:(null===e||void 0===e?void 0:e.component)&&react.createElement(e.component,__assign({},e.params,{key:null===(c=null===e||void 0===e?void 0:e.params)||void 0===c?void 0:c.id}))})}))}))})),this.renderForks()]})};b.prototype.renderForks=function(){var a=this;return this.state.forkedQueue.map(function(c){var e;return jsxRuntime.jsx("div",__assign({className:a.className,"aria-modal":!0},{children:jsxRuntime.jsx("div",__assign({className:a.className+"__container", | ||
onClick:(null===(e=c.params)||void 0===e?0:e.closable)?stopPropagation(c.close):void 0},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:c},{children:jsxRuntime.jsx(c.component,__assign({},c.params))}))}))}),c.params.id)})};return b}(react.Component),DEFAULT_STATE={active:!1,queue:[],forkedQueue:[]},DEFAULT_PARAMS={id:0,closable:!0,weak:!1,fork:!1}; | ||
null},{children:jsxRuntime.jsx(a,{children:(null===e||void 0===e?void 0:e.component)&&react.createElement(e.component,__assign({},e.params,{key:null===(c=null===e||void 0===e?void 0:e.params)||void 0===c?void 0:c.id}))})}))}))})),this.renderForks()]})};b.prototype.renderForks=function(){var a=this;return this.state.forkedQueue.map(function(c){var e;return jsxRuntime.jsx("div",__assign({className:classWithModifiers(a.className,"active"),"aria-modal":!0},{children:jsxRuntime.jsx("div",__assign({className:a.className+ | ||
"__container",onClick:(null===(e=c.params)||void 0===e?0:e.closable)?stopPropagation(c.close):void 0},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:c},{children:jsxRuntime.jsx(c.component,__assign({},c.params))}))}))}),c.params.id)})};return b}(react.Component),DEFAULT_STATE={active:!1,queue:[],forkedQueue:[]},DEFAULT_PARAMS={id:0,closable:!0,weak:!1,fork:!1}; | ||
function dispatch(d){var b=__spreadArray([],__read(containers),!1)[containers.size-1];null==b?console.warn("ModalError: no containers were mounted."):b.setState(d)} | ||
@@ -12,0 +12,0 @@ var Modal=function(){function d(){}d.open=function(b){for(var a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];a=__read(a,1)[0];var e=function(){},f=new Promise(function(h){return e=h}),g={component:b,params:__assign(__assign({},DEFAULT_PARAMS),a),close:function(){e();d.remove(g)}};d.add(g);return __assign(__assign({},g),{then:function(h,k){return f.then(h,k)}})};d.replace=function(b){for(var a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];a=__read(a,1)[0];dispatch(function(e){return __assign(__assign({}, |
{ | ||
"name": "react-modal-global", | ||
"version": "0.9.29", | ||
"version": "0.9.30", | ||
"description": "React Modal but Global", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16443