react-modal-promise
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -26,5 +26,5 @@ 'use strict'; | ||
var createModal = function createModal(Component) { | ||
var createModal = function createModal(Component, options) { | ||
return function (props) { | ||
return modal.stack.create(Component)(props); | ||
return modal.stack.create(Component, options)(props); | ||
}; | ||
@@ -35,2 +35,2 @@ }; | ||
exports.createModal = createModal; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2RhbCIsIlByb21pc2VNb2RhbCIsInN0YWNrIiwibm9kZSIsImNyZWF0ZU1vZGFsIiwiY3JlYXRlIiwiQ29tcG9uZW50IiwicHJvcHMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7OztBQUNBOzs7Ozs7QUFFQSxJQUFNQSxRQUFRLEVBQWQ7O0FBRUEsSUFBTUMsZUFBZSxTQUFmQSxZQUFlO0FBQUEsU0FDbkIsOEJBQUMsc0JBQUQsSUFBYyxLQUFLLG1CQUFRO0FBQUVELFlBQU1FLEtBQU4sR0FBY0MsSUFBZDtBQUFvQixLQUFqRCxHQURtQjtBQUFBLENBQXJCOztBQUlBLElBQU1DLGNBQWMsU0FBZEEsV0FBYztBQUFBLFNBQWE7QUFBQSxXQUFTSixNQUFNRSxLQUFOLENBQVlHLE1BQVosQ0FBbUJDLFNBQW5CLEVBQThCQyxLQUE5QixDQUFUO0FBQUEsR0FBYjtBQUFBLENBQXBCOztrQkFFZU4sWTtRQUVORyxXLEdBQUFBLFciLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgTW9kYWxGYWN0b3J5IGZyb20gJy4vTW9kYWxGYWN0b3J5J1xuXG5jb25zdCBtb2RhbCA9IHt9XG5cbmNvbnN0IFByb21pc2VNb2RhbCA9ICgpID0+IChcb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cm9tICdyZWFjdCdcbmltcG9ydCBNb2RhbEZhY3RvcnkgZnJvbSAnLi9Nb2RhbEZhY3RvcnknXG5cbmNvbnN0IG1vZGFsID0ge31cblxuY29uc3QgUHJvbWlzZU1vZGFsID0gKCkgPT4gKFxuICA8TW9kYWxGYWN0b3J5IHJlZj17bm9kZSA9PiB7IG1vZGFsLnN0YWNrID0gbm9kZSB9fSAvPlxuKVxuXG5jb25zdCBjcmVhdGVNb2RhbCA9IChDb21wb25lbnQsIG9wdGlvbnMpID0+IHByb3BzID0+IG1vZGFsLnN0YWNrLmNyZWF0ZShDb21wb25lbnQsIG9wdGlvbnMpKHByb3BzKVxuXG5leHBvcnQgZGVmYXVsdCBQcm9taXNlTW9kYWxcblxuZXhwb3J0IHsgY3JlYXRlTW9kYWwgfVxuIl19 |
@@ -47,2 +47,6 @@ 'use strict'; | ||
}; | ||
_this.defaultOptions = { | ||
exitTimeout: 500, | ||
enterTimeout: 50 | ||
}; | ||
return _this; | ||
@@ -95,6 +99,8 @@ } | ||
this.create = function (Component) { | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
return function (props) { | ||
return new Promise(function (promiseResolve) { | ||
var hash = (0, _randHex2.default)(); | ||
var resultOptions = _extends({}, _this3.defaultOptions, options); | ||
var resolve = function resolve(value) { | ||
@@ -106,11 +112,11 @@ _this3.delete(hash); | ||
_this3.setState({ | ||
modals: _extends(_defineProperty({}, hash, { | ||
modals: _extends(_defineProperty({}, hash, _extends({ | ||
Component: Component, | ||
props: props, | ||
resolve: resolve | ||
}), _this3.state.modals) | ||
}, resultOptions)), _this3.state.modals) | ||
}, function () { | ||
setTimeout(function () { | ||
_this3.setState({ hashStack: [].concat(_toConsumableArray(_this3.state.hashStack), [hash]) }); | ||
}, 50); | ||
}, resultOptions.enterTimeout); | ||
}); | ||
@@ -122,2 +128,5 @@ }); | ||
this.delete = function (hash) { | ||
var target = _this3.state.modals.hash; | ||
var exitTimeout = target && target.exitTimeout; | ||
_this3.setState({ | ||
@@ -128,3 +137,3 @@ hashStack: _this3.state.hashStack.filter(function (h) { | ||
}, function () { | ||
setTimeout(_this3.omitState, 2000, hash); | ||
setTimeout(_this3.omitState, exitTimeout, hash); | ||
}); | ||
@@ -143,2 +152,2 @@ }; | ||
exports.default = ModalFactory; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Nb2RhbEZhY3RvcnkuanN4Il0sIm5hbWVzIjpbIk1vZGFsRmFjdG9yeSIsInByb3BzIiwic3RhdGUiLCJtb2RhbHMiLCJoYXNoU3RhY2siLCJtb2RhbENvbnRhaW5lciIsIm5vZGUiLCJnZXRNb2RhbHMiLCJQdXJlQ29tcG9uZW50Iiwia2V5cyIsIk9iamVjdCIsIm1hcEtleXMiLCJtYXAiLCJrZXkiLCJDb21wb25lbnQiLCJyZXNvbHZlIiwiZmluZCIsImgiLCJjcmVhdGUiLCJQcm9taXNlIiwiaGFzaCIsImRlbGV0ZSIsInByb21pc2VSZXNvbHZlIiwidmFsdWUiLCJzZXRTdGF0ZSIsInNldFRpbWVvdXQiLCJmaWx0ZXIiLCJvbWl0U3RhdGUiLCJfIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7Ozs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBRU1BLFk7OztBQUVKLHdCQUFZQyxLQUFaLEVBQW1CO0FBQUE7O0FBQUEsNEhBQ1hBLEtBRFc7O0FBQUE7O0FBR2pCLFVBQUtDLEtBQUwsR0FBYTtBQUNYQyxjQUFRLEVBREc7QUFFWEMsaUJBQVc7QUFGQSxLQUFiO0FBSGlCO0FBT2xCOzs7OzZCQTREUTtBQUFBOztBQUNQLGFBQ0U7QUFBQTtBQUFBLFVBQUssS0FBSyxtQkFBUTtBQUFFLG1CQUFLQyxjQUFMLEdBQXNCQyxJQUF0QjtBQUE0QixXQUFoRDtBQUNHLGFBQ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ihwcm9wcylcblxuICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICBtb2RhbHM6IHt9LFxuICAgICAgaGFzaFN0YWNrOiBbXVxuICAgIH1cbiAgfVxuXG4gIGdldE1vZGFscyA9ICgpID0+IHtcbiAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXModGhpcy5zdGF0ZS5tb2RhbHMpXG5cbiAgICBjb25zdCBtYXBLZXlzID0ga2V5cy5tYXAoa2V5ID0+IHtcbiAgICAgIGNvbnN0IHsgQ29tcG9uZW50LCBwcm9wcywgcmVzb2x2ZSB9ID0gdGhpcy5zdGF0ZS5tb2RhbHNba2V5XVxuXG4gICAgICByZXR1cm4gKFxuICAgICAgICA8Q29tcG9uZW50XG4gICAgICAgICAgey4uLnByb3BzfVxuICAgICAgICAgIGtleT17a2V5fVxuICAgICAgICAgIGNsb3NlPXtyZXNvbHZlfVxuICAgICAgICAgIG9wZW49e3RoaXMuc3RhdGUuaGFzaFN0YWNrLmZpbmQoaCA9PiBoID09PSBrZXkpIHx8IGZhbHNlfVxuICAgICAgICAvPlxuICAgICAgKVxuICAgIH0pXG5cbiAgICByZXR1cm4gbWFwS2V5c1xuICB9XG5cbiAgY3JlYXRlID0gQ29tcG9uZW50ID0+IHtcbiAgICByZXR1cm4gcHJvcHMgPT4gbmV3IFByb21pc2UocHJvbWlzZVJlc29sdmUgPT4ge1xuICAgICAgY29uc3QgaGFzaCA9IHJhbmRIZXgoKVxuXG4gICAgICBjb25zdCByZXNvbHZlID0gdmFsdWUgPT4ge1xuICAgICAgICB0aGlzLmRlbGV0ZShoYXNoKVxuICAgICAgICBwcm9taXNlUmVzb2x2ZSh2YWx1ZSlcbiAgICAgIH1cblxuICAgICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICAgIG1vZGFsczoge1xuICAgICAgICAgIFtoYXNoXToge1xuICAgICAgICAgICAgQ29tcG9uZW50LFxuICAgICAgICAgICAgcHJvcHMsXG4gICAgICAgICAgICByZXNvbHZlXG4gIC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aGFzaClcbiAgICB9KVxuICB9XG5cbiAgb21pdFN0YXRlID0gaGFzaCA9PiB7XG4gICAgY29uc3QgeyBbaGFzaF06XyAsIC4uLm1vZGFscyB9ID0gdGhpcy5zdGF0ZS5tb2RhbHNcbiAgICB0aGlzLnNldFN0YXRlKHsgbW9kYWxzIH0pXG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXYgcmVmPXtub2RlID0+IHsgdGhpcy5tb2RhbENvbnRhaW5lciA9IG5vZGUgfX0+XG4gICAgICAgIHt0aGlzLmdldE1vZGFscygpfVxuICAgICAgPC9kaXY+XG4gICAgKVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IE1vZGFsRmFjdG9yeVxuIl19 |
{ | ||
"name": "react-modal-promise", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Modal 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
17925
152