react-modal-promise
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -1,2 +0,2 @@ | ||
import React, { forwardRef, useState, useCallback, useImperativeHandle, useEffect, useMemo } from 'react'; | ||
import React, { forwardRef, useState, useCallback, useRef, useEffect, useImperativeHandle, useMemo } from 'react'; | ||
@@ -62,3 +62,2 @@ /*! ***************************************************************************** | ||
var SCOPE_KEY = 'factoryStack'; | ||
var scopeStorage = {}; | ||
if (typeof window !== 'undefined') { | ||
@@ -68,17 +67,16 @@ if (!window[SCOPE_KEY]) { | ||
} | ||
scopeStorage = window[SCOPE_KEY]; | ||
} | ||
var registerContainer = function (scope, ref) { | ||
scopeStorage[scope] = ref; | ||
window[SCOPE_KEY][scope] = ref; | ||
return ref; | ||
}; | ||
var unregisterContainer = function (scope) { | ||
delete scopeStorage[scope]; | ||
delete window[SCOPE_KEY][scope]; | ||
}; | ||
var getContainer = function (scope) { | ||
return scopeStorage[scope || DEFAULT_SCOPE]; | ||
return window[SCOPE_KEY][scope || DEFAULT_SCOPE]; | ||
}; | ||
var InstanceContainer = function (props, ref) { | ||
var _a = props || {}, _b = _a.scope, scope = _b === void 0 ? DEFAULT_SCOPE : _b, enterTimeout = _a.enterTimeout, exitTimeout = _a.exitTimeout, isAppendIntances = _a.isAppendIntances, onOpen = _a.onOpen, onRemove = _a.onRemove, onResolve = _a.onResolve, onReject = _a.onReject; | ||
var _a = props || {}, _b = _a.scope, scope = _b === void 0 ? DEFAULT_SCOPE : _b, enterTimeout = _a.enterTimeout, exitTimeout = _a.exitTimeout, isAppendIntances = _a.isAppendIntances, onResolve = _a.onResolve, onReject = _a.onReject; | ||
var _c = useState({}), instances = _c[0], setInstances = _c[1]; | ||
@@ -96,3 +94,4 @@ var _d = useState([]), hashStack = _d[0], setHashStack = _d[1]; | ||
]); | ||
var remove = useCallback(function (hash, options) { | ||
var remove = function (hash, options) { | ||
var _a; | ||
setHashStack(function (stack) { return stack.filter(function (s) { return s !== hash; }); }); | ||
@@ -104,17 +103,21 @@ setTimeout(function () { | ||
}); | ||
onRemove === null || onRemove === void 0 ? void 0 : onRemove(hash); | ||
}, options === null || options === void 0 ? void 0 : options.exitTimeout); | ||
}, [onRemove]); | ||
var create = useCallback(function (Component, options, props) { | ||
(_a = props.onRemove) === null || _a === void 0 ? void 0 : _a.call(props, hash); | ||
}; | ||
var removeRef = useRef(remove); | ||
useEffect(function () { | ||
removeRef.current = remove; | ||
}); | ||
var create = function (Component, options, instanceProps) { | ||
if (options === void 0) { options = {}; } | ||
return new Promise(function (res, rej) { | ||
var hash = (props === null || props === void 0 ? void 0 : props.instanceId) || hexGen(); | ||
var hash = (instanceProps === null || instanceProps === void 0 ? void 0 : instanceProps.instanceId) || hexGen(); | ||
var instanceOptions = __assign({ enterTimeout: enterTimeout, | ||
exitTimeout: exitTimeout, instanceId: hash }, options); | ||
var instance = __assign({ Component: Component, props: __assign(__assign({}, instanceOptions), props), resolve: function (v) { | ||
remove(hash, instanceOptions); | ||
var instance = __assign({ Component: Component, props: __assign(__assign({}, instanceOptions), instanceProps), resolve: function (v) { | ||
removeRef.current(hash, instanceOptions); | ||
res(v); | ||
onResolve === null || onResolve === void 0 ? void 0 : onResolve(v, hash); | ||
}, reject: function (r) { | ||
remove(hash, instanceOptions); | ||
removeRef.current(hash, instanceOptions); | ||
rej(r); | ||
@@ -128,6 +131,9 @@ onReject === null || onReject === void 0 ? void 0 : onReject(r, hash); | ||
}); | ||
setTimeout(function () { return setHashStack(function (stack) { return __spreadArray(__spreadArray([], stack), [hash]); }); }, instanceOptions.enterTimeout); | ||
onOpen === null || onOpen === void 0 ? void 0 : onOpen(hash, instance); | ||
setTimeout(function () { | ||
var _a; | ||
setHashStack(function (stack) { return __spreadArray(__spreadArray([], stack), [hash]); }); | ||
(_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props, hash, instance); | ||
}, instanceOptions.enterTimeout); | ||
}); | ||
}, [enterTimeout, exitTimeout, onOpen, onResolve, onReject, isAppendIntances]); | ||
}; | ||
useImperativeHandle(ref, function () { return ({ | ||
@@ -184,2 +190,2 @@ create: create, | ||
export { Container, DEFAULT_SCOPE, SCOPE_KEY, create, createModal, getContainer, hexGen, registerContainer, unregisterContainer }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy9oZXgtZ2VuLnRzIiwiLi4vc3JjL3V0aWxzL3JlZ2lzdGVyLXNjb3BlLnRzIiwiLi4vc3JjL0NvbnRhaW5lci50c3giLCIuLi9zcmMvY3JlYXRlLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBIZXggPSBzdHJpbmdcblxuZXhwb3J0IGNvbnN0IGhleEdlbiA9IChsZW46IG51bWJlciA9IDEyKTogSGV4ID0+IHtcbiAgY29uc3QgbWF4bGVuID0gOFxuICBjb25zdCBtaW4gPSBNYXRoLnBvdygxNiwgTWF0aC5taW4obGVuLCBtYXhsZW4pIC0gMSlcbiAgY29uc3QgbWF4ID0gTWF0aC5wb3coMTYsIE1hdGgubWluKGxlbiwgbWF4bGVuKSkgLSAxXG4gIGNvbnN0IG4gPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAobWF4IC0gbWluICsgMSkpICsgbWluXG4gIGxldCByID0gbi50b1N0cmluZygxNilcbiAgd2hpbGUgKHIubGVuZ3RoIDwgbGVuKSB7XG4gICAgciA9IHIgKyBoZXhHZW4obGVuIC0gbWF4bGVuKVxuICB9XG4gIHJldHVybiByXG59XG4iLCJpbXBvcnQgeyBTY29wZSwgU2NvcGVNb2RlbCwgQ29udGFpbmVyUmVmIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBERUZBVUxUX1NDT1BFID0gJ3N0YWNrJ1xuZXhwb3J0IGNvbnN0IFNDT1BFX0tFWSA9ICdmYWN0b3J5U3RhY2snXG5kZWNsYXJlIGdsb2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ZTogSW5zdGFuY2VDcmVhdG9yID0gdXNlQ2FsbGJhY2soXG4gICAgKENvbXBvbmVudCwgb3B0aW9ucyA9IHt9LCBwcm9wcykgPT5cbiAgICAgIG5ldyBQcm9taXNlKChyZXMsIHJlaikgPT4ge1xuICAgICAgICBjb25zdCBoYXNoID0gcHJvcHM/Lmluc3RhbmNlSWQgfHwgaGV4R2VuKClcblxuICAgICAgICBjb25zdCBpbnN0YW5jZU9wdGlvbnMgPSB7XG4gICAgICAgICAgZW50ZXJUaW1lb3V0LFxuICAgICAgICAgIGV4aXRUaW1lb3V0LFxuICAgICAgICAgIGluc3RhbmNlSWQ6IGhhc2gsXG4gICAgICAgICAgLi4ub3B0aW9ucyxcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RhbmNlOiBJbnN0YW5jZSA9IHtcbiAgICAgICAgICBDb21wb25lbnQsXG4gICAgICAgICAgcHJvcHM6IHsgLi4uaW5zdGFuY2VPcHRpb25zLCAuLi5wcm9wcyB9LFxuICAgICAgICAgIHJlc29sdmU6IHYgPT4ge1xuICAgICAgICAgICAgcmVtb3ZlKGhhc2gsIGluc3RhbmNlT3B0aW9ucylcbiAgICAgICAgICAgIHJlcyh2KVxuICAgICAgICAgICAgb25SZXNvbHZlPy4odiwgaGFzaClcbiAgICAgICAgICB9LFxuICAgICAgICAgIHJlamVjdDogciA9PiB7XG4gICAgICAgICAgICByZW1vdmUoaGFzaCwgaW5zdGFuY2VPcHRpb25zKVxuICAgICAgICAgICAgcmVqKHIpXG4gICAgICAgICAgICBvblJlamVjdD8uKHIsIGhhc2gpXG4gICAgICAgICAgfSxcbiAgICAgICAgICAuLi5pbnN0YW5jZU9wdGlvbnMsXG4gICAgICAgIH1cblxuICAgICAgICBzZXRJbnN0YW5jZXMoaW5zdGFuY2VzID0+XG4gICAgICAgICAgaXNBcHBlbmRJbnRhbmNlc1xuICAgICAgICAgICAgPyB7XG4gICAgICAgICAgICAgICAgLi4uaW5zdGFuY2VzLFx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ylcbiAgICAgICAgICByZXModilcbiAgICAgICAgICBvblJlc29sdmU/Lih2LCBoYXNoKVxuICAgICAgICB9LFxuICAgICAgICByZWplY3Q6IHIgPT4ge1xuICAgICAgICAgIHJlbW92ZVJlZi5jdXJyZW50KGhhc2gsIGluc3RhbmNlT3B0aW9ucylcbiAgICAgICAgICByZWoocilcbiAgICAgICAgICBvblJlamVjdD8uKHIsIGhhc2gpXG4gICAgICAgIH0sXG4gICAgICAgIC4uLmluc3RhbmNlT3B0aW9ucyxcbiAgICAgIH1cblxuICAgICAgc2V0SW5zdGFuY2VzKGluc3RhbmNlcyA9PlxuICAgICAgICBpc0FwcGVuZEludGFuY2VzXG4gICAgICAgICAgPyB7XG4gICAgICAgICAgICAgIC4uLmluc3RhbmNlcyxcbiAgICAgICAgICAgICAgW2hhc2hdOiBpbnN0YW5jZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICA6IHtcbiAgICAgICAgICAgICAgW2hhc2hdOiBpbnN0YW5jZSxcbiAgICAgICAgICAgICAgLi4uaW5zdGFuY2VzLFxuICAgICAgICAgICAgfVxuICAgICAgKVxuXG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgc2V0SGFzaFN0YWNrKHN0YWNrID0+IFsuLi5zdGFjaywgaGFzaF0pXG4gICAgICAgIHByb3BzLm9uT3Blbj8uKGhhc2gsIGluc3RhbmNlKVxuICAgICAgfSwgaW5zdGFuY2VPcHRpb25zLmVudGVyVGltZW91dClcbiAgICB9KVxuXG4gIHVzZUltcGVyYXRpdmVIYW5kbGUocmVmLCAoKSA9PiAoe1xuICAgIGNyZWF0ZSxcbiAgICByZXNvbHZlLFxuICAgIHJlamVjdCxcbiAgICByZXNvbHZlQWxsLFxuICAgIHJlamVjdEFsbCxcbiAgICBoYXNJbnN0YW5jZSxcbiAgICBnZXRJbnN0YW5jZSxcbiAgfSkpXG5cbiAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICByZWdpc3RlckNvbnRhaW5lcihzY29wZSwge1xuICAgICAgY3JlYXRlLFxuICAgICAgcmVzb2x2ZSxcbiAgICAgIHJlamVjdCxcbiAgICAgIHJlc29sdmVBbGwsXG4gICAgICByZWplY3RBbGwsXG4gICAgICBoYXNJbnN0YW5jZSxcbiAgICAgIGdldEluc3RhbmNlLFxuICAgIH0pXG5cbiAgICByZXR1cm4gKCkgPT4gdW5yZWdpc3RlckNvbnRhaW5lcihzY29wZSlcbiAgfSwgW3Njb3BlXSlcblxuICBjb25zdCBtYXBLZXlzID0gdXNlTWVtbygoKSA9PiB7XG4gICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGluc3RhbmNlcylcblxuICAgIHJldHVybiBrZXlzLm1hcChrZXkgPT4ge1xuICAgICAgY29uc3QgeyBDb21wb25lbnQsIHByb3BzLCByZXNvbHZlLCByZWplY3QgfSA9IGluc3RhbmNlc1trZXldXG5cbiAgICAgIGNvbnN0IGlzT3BlbiA9ICEhaGFzaFN0YWNrLmZpbmQoaCA9PiBoID09PSBrZXkpXG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIDxDb21wb25lbnRcbiAgICAgICAgICB7Li4ucHJvcHN9XG4gICAgICAgICAga2V5PXtrZXl9XG4gICAgICAgICAgaXNPcGVuPXtpc09wZW59XG4gICAgICAgICAgb25SZWplY3Q9e3JlamVjdH1cbiAgICAgICAgICBvblJlc29sdmU9e3Jlc29sdmV9XG4gICAgICAgICAgLyoqIEBkZXByZWNhdGVkICoqL1xuICAgICAgICAgIGNsb3NlPXtyZXNvbHZlfVxuICAgICAgICAgIC8qKiBAZGVwcmVjYXRlZCAqKi9cbiAgICAgICAgICBvcGVuPXtpc09wZW59XG4gICAgICAgIC8+XG4gICAgICApXG4gICAgfSlcbiAgfSwgW2luc3RhbmNlcywgaGFzaFN0YWNrXSlcblxuICByZXR1cm4gPD57bWFwS2V5c308Lz5cbn1cblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IGZvcndhcmRSZWYoSW5zdGFuY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JBRWQsSUFBSSxFQUFFLE1BQU0sSUFDWixFQUNIO1NBQ0YsQ0FBQyxDQUFBO0tBQ0gsRUFBRSxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQyxDQUFBO0lBRTFCLE9BQU8sMENBQUcsT0FBTyxDQUFJLENBQUE7QUFDdkIsQ0FBQyxDQUFBO0lBRVksU0FBUyxHQUFHLFVBQVUsQ0FBQyxpQkFBaUIsRUFBQztBQUV0RCxTQUFTLENBQUMsWUFBWSxHQUFHO0lBQ3ZCLFdBQVcsRUFBRSxHQUFHO0lBQ2hCLFlBQVksRUFBRSxFQUFFO0NBQ2pCOztBQ3pMRDtJQUNhLFdBQVcsR0FBbUIsVUFBQyxTQUFTLEVBQUUsT0FBTyxJQUFLLE9BQUEsVUFBQSxLQUFLO0lBQ3RFLE9BQUEsWUFBWSxDQUFDLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxLQUFLLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxFQUFFLE9BQU8sRUFBRSxLQUFLLENBQUM7QUFBOUQsQ0FBOEQsSUFBQTtJQUVuRCxNQUFNLEdBQW1CLFVBQUMsU0FBUyxFQUFFLE9BQU8sSUFBSyxPQUFBLFVBQUEsS0FBSztJQUNqRSxPQUFBLFlBQVksQ0FBQyxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLFNBQVMsRUFBRSxPQUFPLEVBQUUsS0FBSyxDQUFDO0FBQTlELENBQThEOzs7OzsifQ== |
@@ -70,3 +70,2 @@ 'use strict'; | ||
var SCOPE_KEY = 'factoryStack'; | ||
var scopeStorage = {}; | ||
if (typeof window !== 'undefined') { | ||
@@ -76,17 +75,16 @@ if (!window[SCOPE_KEY]) { | ||
} | ||
scopeStorage = window[SCOPE_KEY]; | ||
} | ||
var registerContainer = function (scope, ref) { | ||
scopeStorage[scope] = ref; | ||
window[SCOPE_KEY][scope] = ref; | ||
return ref; | ||
}; | ||
var unregisterContainer = function (scope) { | ||
delete scopeStorage[scope]; | ||
delete window[SCOPE_KEY][scope]; | ||
}; | ||
var getContainer = function (scope) { | ||
return scopeStorage[scope || DEFAULT_SCOPE]; | ||
return window[SCOPE_KEY][scope || DEFAULT_SCOPE]; | ||
}; | ||
var InstanceContainer = function (props, ref) { | ||
var _a = props || {}, _b = _a.scope, scope = _b === void 0 ? DEFAULT_SCOPE : _b, enterTimeout = _a.enterTimeout, exitTimeout = _a.exitTimeout, isAppendIntances = _a.isAppendIntances, onOpen = _a.onOpen, onRemove = _a.onRemove, onResolve = _a.onResolve, onReject = _a.onReject; | ||
var _a = props || {}, _b = _a.scope, scope = _b === void 0 ? DEFAULT_SCOPE : _b, enterTimeout = _a.enterTimeout, exitTimeout = _a.exitTimeout, isAppendIntances = _a.isAppendIntances, onResolve = _a.onResolve, onReject = _a.onReject; | ||
var _c = React.useState({}), instances = _c[0], setInstances = _c[1]; | ||
@@ -104,3 +102,4 @@ var _d = React.useState([]), hashStack = _d[0], setHashStack = _d[1]; | ||
]); | ||
var remove = React.useCallback(function (hash, options) { | ||
var remove = function (hash, options) { | ||
var _a; | ||
setHashStack(function (stack) { return stack.filter(function (s) { return s !== hash; }); }); | ||
@@ -112,17 +111,21 @@ setTimeout(function () { | ||
}); | ||
onRemove === null || onRemove === void 0 ? void 0 : onRemove(hash); | ||
}, options === null || options === void 0 ? void 0 : options.exitTimeout); | ||
}, [onRemove]); | ||
var create = React.useCallback(function (Component, options, props) { | ||
(_a = props.onRemove) === null || _a === void 0 ? void 0 : _a.call(props, hash); | ||
}; | ||
var removeRef = React.useRef(remove); | ||
React.useEffect(function () { | ||
removeRef.current = remove; | ||
}); | ||
var create = function (Component, options, instanceProps) { | ||
if (options === void 0) { options = {}; } | ||
return new Promise(function (res, rej) { | ||
var hash = (props === null || props === void 0 ? void 0 : props.instanceId) || hexGen(); | ||
var hash = (instanceProps === null || instanceProps === void 0 ? void 0 : instanceProps.instanceId) || hexGen(); | ||
var instanceOptions = __assign({ enterTimeout: enterTimeout, | ||
exitTimeout: exitTimeout, instanceId: hash }, options); | ||
var instance = __assign({ Component: Component, props: __assign(__assign({}, instanceOptions), props), resolve: function (v) { | ||
remove(hash, instanceOptions); | ||
var instance = __assign({ Component: Component, props: __assign(__assign({}, instanceOptions), instanceProps), resolve: function (v) { | ||
removeRef.current(hash, instanceOptions); | ||
res(v); | ||
onResolve === null || onResolve === void 0 ? void 0 : onResolve(v, hash); | ||
}, reject: function (r) { | ||
remove(hash, instanceOptions); | ||
removeRef.current(hash, instanceOptions); | ||
rej(r); | ||
@@ -136,6 +139,9 @@ onReject === null || onReject === void 0 ? void 0 : onReject(r, hash); | ||
}); | ||
setTimeout(function () { return setHashStack(function (stack) { return __spreadArray(__spreadArray([], stack), [hash]); }); }, instanceOptions.enterTimeout); | ||
onOpen === null || onOpen === void 0 ? void 0 : onOpen(hash, instance); | ||
setTimeout(function () { | ||
var _a; | ||
setHashStack(function (stack) { return __spreadArray(__spreadArray([], stack), [hash]); }); | ||
(_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props, hash, instance); | ||
}, instanceOptions.enterTimeout); | ||
}); | ||
}, [enterTimeout, exitTimeout, onOpen, onResolve, onReject, isAppendIntances]); | ||
}; | ||
React.useImperativeHandle(ref, function () { return ({ | ||
@@ -200,2 +206,2 @@ create: create, | ||
exports.unregisterContainer = unregisterContainer; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy9oZXgtZ2VuLnRzIiwiLi4vc3JjL3V0aWxzL3JlZ2lzdGVyLXNjb3BlLnRzIiwiLi4vc3JjL0NvbnRhaW5lci50c3giLCIuLi9zcmMvY3JlYXRlLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBIZXggPSBzdHJpbmdcblx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gICAgIGNvbnN0IGluc3RhbmNlOiBJbnN0YW5jZSA9IHtcbiAgICAgICAgICBDb21wb25lbnQsXG4gICAgICAgICAgcHJvcHM6IHsgLi4uaW5zdGFuY2VPcHRpb25zLCAuLi5wcm9wcyB9LFxuICAgICAgICAgIHJlc29sdmU6IHYgPT4ge1xuICAgICAgICAgICAgcmVtb3ZlKGhhc2gsIGluc3RhbmNlT3B0aW9ucylcbiAgICAgICAgICAgIHJlcyh2KVxuICAgICAgICAgICAgb25SZXNvbHZlPy4odiwgaGFzaClcbiAgICAgICAgICB9LFxuICAgICAgICAgIHJlamVjdDogciA9PiB7XG4gICAgICAgICAgICByZW1vdmUoaGFzaCwgaW5zdGFuY2VPcHRpb25zKVxuICAgICAgICAgICAgcmVqKHIpXG4gICAgICAgICAgICBvblJlamVjdD8uKHIsIGhhc2gpXG4gICAgICAgICAgfSxcbiAgICAgICAgICAuLi5pbnN0YW5jZU9wdGlvbnMsXG4gICAgICAgIH1cblxuICAgICAgICBzZXRJbnN0YW5jZXMoaW5zdGFuY2VzID0+XG4gICAgICAgICAgaXNBcHBlbmRJbnRhbmNlc1xuICAgICAgICAgICAgPyB7XG4gICAgICAgICAgICAgICAgLi4uaW5zdGFuY2VzLFxuICAgICAgICAgICAgICAgIFtoYXNoXTogaW5zdGFuY2UsXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDoge1xuICAgICAgICAgICAgICAgIFtoYXNoXTogaW5zdGFuY2UsXG4gICAgICAgICAgICAgICAgLi4uaW5zdGFuY2VzLFxuICAgICAgICAgICAgICB9XG4gICAgICAgIClcblxuICAgICAgICBzZXRUaW1lb3V0KFxuICAgICAgICAgICgpID0+IHNldEhhc2hTdGFjayhzdGFjayA9PiBbLi4uc3RhY2ssIGhhc2hdKSxcbiAgICAgICAgICBpbnN0YW5jZU9wdGlvbnMuZW50ZXJUaW1lb3V0XG4gICAgICAgIClcblxuICAgICAgICBvbk9wZW4/LihoYXNoLCBpbnN0YW5jZSlcbiA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IHJldHVybiBvbWl0SGFzaFxuICAgICAgfSlcbiAgICB9LCBvcHRpb25zPy5leGl0VGltZW91dClcblxuICAgIHByb3BzLm9uUmVtb3ZlPy4oaGFzaClcbiAgfVxuXG4gIGNvbnN0IHJlbW92ZVJlZiA9IHVzZVJlZihyZW1vdmUpXG5cbiAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICByZW1vdmVSZWYuY3VycmVudCA9IHJlbW92ZVxuICB9KVxuXG4gIGNvbnN0IGNyZWF0ZTogSW5zdGFuY2VDcmVhdG9yID0gKENvbXBvbmVudCwgb3B0aW9ucyA9IHt9LCBpbnN0YW5jZVByb3BzKSA9PlxuICAgIG5ldyBQcm9taXNlKChyZXMsIHJlaikgPT4ge1xuICAgICAgY29uc3QgaGFzaCA9IGluc3RhbmNlUHJvcHM/Lmluc3RhbmNlSWQgfHwgaGV4R2VuKClcblxuICAgICAgY29uc3QgaW5zdGFuY2VPcHRpb25zID0ge1xuICAgICAgICBlbnRlclRpbWVvdXQsXG4gICAgICAgIGV4aXRUaW1lb3V0LFxuICAgICAgICBpbnN0YW5jZUlkOiBoYXNoLFxuICAgICAgICAuLi5vcHRpb25zLFxuICAgICAgfVxuXG4gICAgICBjb25zdCBpbnN0YW5jZTogSW5zdGFuY2UgPSB7XG4gICAgICAgIENvbXBvbmVudCxcbiAgICAgICAgcHJvcHM6IHsgLi4uaW5zdGFuY2VPcHRpb25zLCAuLi5pbnN0YW5jZVByb3BzIH0sXG4gICAgICAgIHJlc29sdmU6IHYgPT4ge1xuICAgICAgICAgIHJlbW92ZVJlZi5jdXJyZW50KGhhc2gsIGluc3RhbmNlT3B0aW9ucylcbiAgICAgICAgICByZXModilcbiAgICAgICAgICBvblJlc29sdmU/Lih2LCBoYXNoKVxuICAgICAgICB9LFxuICAgICAgICByZWplY3Q6IHIgPT4ge1xuICAgICAgICAgIHJlbW92ZVJlZi5jdXJyZW50KGhhc2gsIGluc3RhbmNlT3B0aW9ucylcbiAgICAgICAgICByZWoocilcbiAgICAgICAgICBvblJlamVjdD8uKHIsIGhhc2gpXG4gICAgICAgIH0sXG4gICAgICAgIC4uLmluc3RhbmNlT3B0aW9ucyxcbiAgICAgIH1cblxuICAgICAgc2V0SW5zdGFuY2VzKGluc3RhbmNlcyA9PlxuICAgICAgICBpc0FwcGVuZEludGFuY2VzXG4gICAgICAgICAgPyB7XG4gICAgICAgICAgICAgIC4uLmluc3RhbmNlcyxcbiAgICAgICAgICAgICAgW2hhc2hdOiBpbnN0YW5jZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICA6IHtcbiAgICAgICAgICAgICAgW2hhc2hdOiBpbnN0YW5jZSxcbiAgICAgICAgICAgICAgLi4uaW5zdGFuY2VzLFxuICAgICAgICAgICAgfVxuICAgICAgKVxuXG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgc2V0SGFzaFN0YWNrKHN0YWNrID0+IFsuLi5zdGFjaywgaGFzaF0pXG4gICAgICAgIHByb3BzLm9uT3Blbj8uKGhhc2gsIGluc3RhbmNlKVxuICAgICAgfSwgaW5zdGFuY2VPcHRpb25zLmVudGVyVGltZW91dClcbiAgICB9KVxuXG4gIHVzZUltcGVyYXRpdmVIYW5kbGUocmVmLCAoKSA9PiAoe1xuICAgIGNyZWF0ZSxcbiAgICByZXNvbHZlLFxuICAgIHJlamVjdCxcbiAgICByZXNvbHZlQWxsLFxuICAgIHJlamVjdEFsbCxcbiAgICBoYXNJbnN0YW5jZSxcbiAgICBnZXRJbnN0YW5jZSxcbiAgfSkpXG5cbiAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICByZWdpc3RlckNvbnRhaW5lcihzY29wZSwge1xuICAgICAgY3JlYXRlLFxuICAgICAgcmVzb2x2ZSxcbiAgICAgIHJlamVjdCxcbiAgICAgIHJlc29sdmVBbGwsXG4gICAgICByZWplY3RBbGwsXG4gICAgICBoYXNJbnN0YW5jZSxcbiAgICAgIGdldEluc3RhbmNlLFxuICAgIH0pXG5cbiAgICByZXR1cm4gKCkgPT4gdW5yZWdpc3RlckNvbnRhaW5lcihzY29wZSlcbiAgfSwgW3Njb3BlXSlcblxuICBjb25zdCBtYXBLZXlzID0gdXNlTWVtbygoKSA9PiB7XG4gICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGluc3RhbmNlcylcblxuICAgIHJldHVybiBrZXlzLm1hcChrZXkgPT4ge1xuICAgICAgY29uc3QgeyBDb21wb25lbnQsIHByb3BzLCByZXNvbHZlLCByZWplY3QgfSA9IGluc3RhbmNlc1trZXldXG5cbiAgICAgIGNvbnN0IGlzT3BlbiA9ICEhaGFzaFN0YWNrLmZpbmQoaCA9PiBoID09PSBrZXkpXG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIDxDb21wb25lbnRcbiAgICAgICAgICB7Li4ucHJvcHN9XG4gICAgICAgICAga2V5PXtrZXl9XG4gICAgICAgICAgaXNPcGVuPXtpc09wZW59XG4gICAgICAgICAgb25SZWplY3Q9e3JlamVjdH1cbiAgICAgICAgICBvblJlc29sdmU9e3Jlc29sdmV9XG4gICAgICAgICAgLyoqIEBkZXByZWNhdGVkICoqL1xuICAgICAgICAgIGNsb3NlPXtyZXNvbHZlfVxuICAgICAgICAgIC8qKiBAZGVwcmVjYXRlZCAqKi9cbiAgICAgICAgICBvcGVuPXtpc09wZW59XG4gICAgICAgIC8+XG4gICAgICApXG4gICAgfSlcbiAgfSwgW2luc3RhbmNlcywgaGFzaFN0YWNrXSlcblxuICByZXR1cm4gPD57bWFwS2V5c308Lz5cbn1cblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IGZvcndhcmRSZWYoSW5zdGFuY2VDb250YWluZXIpXG5cbkNvbnRhaW5lci5kZWZhdWx0UHJvcHMgPSB7XG4gIGV4aXRUaW1lb3V0OiA1MDAsXG4gIGVudGVyVGltZW91dDogNTAsXG59XG4iLCJpbXBvcnQgeyBnZXRDb250YWluZXIgfSBmcm9tICcuL3V0aWxzJ1xuaW1wb3J0IHsgQ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QsSUFBSSxFQUFFLE1BQU0sSUFDWixFQUNIO1NBQ0YsQ0FBQyxDQUFBO0tBQ0gsRUFBRSxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQyxDQUFBO0lBRTFCLE9BQU9BLGtGQUFHLE9BQU8sQ0FBSSxDQUFBO0FBQ3ZCLENBQUMsQ0FBQTtJQUVZLFNBQVMsR0FBR0MsZ0JBQVUsQ0FBQyxpQkFBaUIsRUFBQztBQUV0RCxTQUFTLENBQUMsWUFBWSxHQUFHO0lBQ3ZCLFdBQVcsRUFBRSxHQUFHO0lBQ2hCLFlBQVksRUFBRSxFQUFFO0NBQ2pCOztBQ3pMRDtJQUNhLFdBQVcsR0FBbUIsVUFBQyxTQUFTLEVBQUUsT0FBTyxJQUFLLE9BQUEsVUFBQSxLQUFLO0lBQ3RFLE9BQUEsWUFBWSxDQUFDLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxLQUFLLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxFQUFFLE9BQU8sRUFBRSxLQUFLLENBQUM7QUFBOUQsQ0FBOEQsSUFBQTtJQUVuRCxNQUFNLEdBQW1CLFVBQUMsU0FBUyxFQUFFLE9BQU8sSUFBSyxPQUFBLFVBQUEsS0FBSztJQUNqRSxPQUFBLFlBQVksQ0FBQyxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLFNBQVMsRUFBRSxPQUFPLEVBQUUsS0FBSyxDQUFDO0FBQTlELENBQThEOzs7Ozs7Ozs7Ozs7OyJ9 |
@@ -25,3 +25,3 @@ /// <reference types="react" /> | ||
/** @deprecated **/ | ||
close: (result: Result) => void; | ||
close: (result?: Result) => void; | ||
} | ||
@@ -28,0 +28,0 @@ export interface Instance extends InstanceOptions { |
{ | ||
"name": "react-modal-promise", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Promise wrapper for React components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
565
56508