{"_id":"redux-saga-modal","_rev":"54-c2df60bdf2446339abfd407bd50b430a","name":"redux-saga-modal","dist-tags":{"latest":"1.3.2","beta":"1.0.0-beta.12","alpha":"0.3.0-alpha.0"},"versions":{"0.2.0":{"name":"redux-saga-modal","version":"0.2.0","private":false,"description":"saga modals","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["redux-saga-modal","redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/KarimAziev/redux-saga-modal.git"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","_id":"redux-saga-modal@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-B4jCtjbMlx6nRTybNSJQlsYy9w8CGwSER/Or2i9fGbtyP/U3zDLyaaB2dE3V5Wf9i4ixPUt2Jh5obIWJaHRfcQ==","shasum":"29f05128d13083ea0d13210023f0a573fd28601d","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.0.tgz","fileCount":18,"unpackedSize":243158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhZOJCRA9TVsSAnZWagAAbcgP/ipwbSY4p0wVZXH7dPnh\nu2Ido0U6Tj2raWKglyAIdQB+NDKFB6dx9vM4Kz87i3kxiQK4bSgSr0j/O3/c\n5b8DS5XBBIpVLwl0sr/mw9SDx+Kiwy7kNNFt1OyCQx4F4zF5nLzyn3aBC5yr\nFwsPrx7QBqx0RziWq0DnM9HzN87NUu1x9dae0763fp6YWxGc3NEZSt8LIH7I\nYh1xsT1E5ADVQ0ALeeDOrbGf+Mdsy+ie3GHxqwDqPlKcCvqLgm4/hv+KMrSB\ngrju9pFr1a+ERSAgqRAplSOQJ0Rq3UVCVzL0RKqPFei20W79cGvbTdVWxx0z\n4oGO8aFXrA3sg8eXyRNRhU0tActitzoBxoo/jw+VnYj6bGdHzZ0wXTKMdKhT\nRTDbYK8NQ9WnTXBNmH+sBI3BzVJa0Ws8CN3gaPhm4nI5bxevp48zbVFu/hap\nCCNOo9ZqWms+VxOOjm0+BsbSMZceJhK8Z0SXPoHFZE7SGIvzPJuY9KD46eFQ\nE9WL8f3PZ+9yRo0lvIoyd6K+0j/Cz315fdaH5uRh2EDPLNjQ1OUgHzv0BUPq\nJoham8z/9hqYmm84YrJog1u/XKDpDdu3ozUI+UeiTXIGrGnrcX7iErSDz64p\n4V79dN7rpax8MC6BD2yg10+r+wtbaYh8sjg7ENKGZ5INq8MJudWBedWm9Idx\nKpIb\r\n=/VW0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7GkK/3WkjcytU7Se9FW5RG8PoanVu9cag1rpWq+OkXQIhAOpbyhSeXVBBuF04idFqJJBVU24wEeTX4Jx4qPaYF+eT"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.0_1535480712634_0.2188581544857593"},"_hasShrinkwrap":false},"0.2.1":{"name":"redux-saga-modal","version":"0.2.1","private":false,"description":"saga modals","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["redux-saga-modal","redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/KarimAziev/redux-saga-modal.git"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","_id":"redux-saga-modal@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-CA/R5JXnOsN0UHffmnPUromI5vneTfkTQwJRfoezFHKmo35i8yBxEvB/4pPSK2VBtw37/lcrppTn1V53uekpPw==","shasum":"cdc64289663b8de8e2ee478ce7bd39d5aa57cf69","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.1.tgz","fileCount":18,"unpackedSize":243156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhZfUCRA9TVsSAnZWagAAbeMP/jvOyferwtSzfHEPaYrU\nrn8QZ0SznFqpQzSoVEQzpe8Xla34FotXlPoQoE/Szdx5WVdL+oXkKEv7qQ/1\nQ+qSXmQx3DxwfQS5YfFItM8q3ol+2n+dDgG9PQ1D9+bk75LSfeUxk2dpLDcA\nxH4tT2N17OI7MMHfRn+83gQ7KUEne+a4/hK4sGNln1iPKxobgvY8cDwx3VFq\nEc6Pw4/wKnhhK143Q7ptP08yMCfNI8NiaCoKU9uRCy7ve7ijwt9uK1aZV3YD\netrN8wtiHXNk4mBa4s95D0vl7waC1rT7cazIG0+rrvvBDMkZchVKYz2NHm7G\nJnQdejoMgHn/MpkY/D3My0i+4t1Layenr6g/YKy+9hfb6CvL3qN5fWgBwYOd\nH4zJHSoPqrEN5xOblaV0mHg+6dbDMxEdIAyICU+j6W6UK+Zo81sMWUc5ITVL\npZNnwE8XhZ+wtj5FJ484ZvcRw3uvA6KB/2VNPw5JfmXBvZL1M1GhL2APh3X/\nOQd4nBCL1YLzrnYEX5KYwdWW9KDpsEokXinhLWZ3gkDtipMCER7/67GjOwEi\nx/QC984GyIKW1fAHdFCPVsJ+nOHhy/nygmgdSSSiW/6wAwe2lqFU+Q7+/zDn\n94vgI9oU2z3DDbGibagCviBjtwUJr1JCStunAOq+uWD/5S9tRZuR422vkyY5\n0REx\r\n=pMmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj5sTQm38yqhu25pbAsQK8Wb1mMpkeakPbXYEMHc/RMgIgRUa8azb0wGreI4nopgSvtImqENiJm5w3rMXTsm8VXl0="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.1_1535481811881_0.006129943335893895"},"_hasShrinkwrap":false},"0.2.3":{"name":"redux-saga-modal","version":"0.2.3","private":false,"description":"redux saga modal","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepublishOnly":"npm run build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga-modal","redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+ssh://git@github.com/KarimAziev/redux-saga-modal.git"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","_id":"redux-saga-modal@0.2.3","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-Xmik3X2Q0dyYWTMlPIwadAlui0Fw9RZwjTvfHt3SgqRNoGkNETjOXVubF43i2xZOATCnE40f8rdw0XYjLzR8EA==","shasum":"6a80562d779c45e90e8caca4b7374e7c5fbc23e3","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.3.tgz","fileCount":18,"unpackedSize":243141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhaQsCRA9TVsSAnZWagAAaVIP+gKAdKZJRzlF3eenVq7S\ntNn7RAOScNNdCI6PuUSG8DA1SC3yjleIU6mPw1Llh0WX+2+f2genkeVscX4j\nbuduGtQsrMNRmVBe4hMXvhcXSkEYoY+a0hGFACSexkMmPbt4ZywMfirGg+YR\n7pp/pVVs010XHGmb0mwUAoc4JBZ6YcOXz6SnXUq66wSjXn5Ej9taXg4wPMQw\n8nJLF3Uc4TIM6HLjwnHYQGhMeAUr/iBoPadg82DGTyttDtJmi6aG/hM/1u0g\nciQu2/Scv5rLyC15tcYTlPMWCzB4s36R/nbFWP7J92tP5XIEc4k0vlD+3DxM\nVsbnxAJ+dH8IFype4DdIIJHroAzwSxEnKNh9usgW6pttoQeHmqqs+w9hojKD\nJBEksxc/1yeypQXDk3/wThk5OKegrv/x5s/vDBLe+Cn7oW4OcUkpEJWlIFdr\ndXiPGMnuxIZrSIRR+luPAJTz7FDoq5AtGC6otXSJXOaOHrbv9zEXD8fHlDQu\nHf7X9LTEfbVEoPDMrUJeuLo18c8LbSl3WLnze1oVDy7jLx8TP+vI9N7ZMZv0\n6v7/CHl4t830oFcyMower6sweObSsvhijXM/VxoQWE6FCg8MhA+d+JVXXr45\nJiVxd5ucyp86FnmWTSLTXleef0hGiMx0TMlCXBvkkosVki1/GVI4Fg7NnK3d\no5w7\r\n=LYQS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJpamhLYF2BQSR51i44EueMms68BNYSAU6TA3XpWCTmQIgdpHShrf7ML3ZBcg+HOkU9/heu3dsi6k2GOZEbcAspQk="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.3_1535484972264_0.30355313747728574"},"_hasShrinkwrap":false},"0.2.4":{"name":"redux-saga-modal","version":"0.2.4","private":false,"description":"redux saga modal","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepublishOnly":"npm run build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+github.com/KarimAziev/redux-saga-modal"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"_id":"redux-saga-modal@0.2.4","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-XnwlMq5NiKe5OeaONTGVs8kF5zR2h8YoYVQhttDNJNUnNEVNPKpmmjOxApCmjE0yQf3GIxTNUtnfZaa6ICmSrw==","shasum":"9e6c6c96c6b6f59325807b7ff9c3bf47923755a8","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.4.tgz","fileCount":18,"unpackedSize":243117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhaZbCRA9TVsSAnZWagAA+IMP/jWdS2uvcnXTDY5KVyc9\nteaEAH4a61+J3Gw939Ft4DzsPAt+0Kt8UIFvIHeLzGxwPf/ODOLccNN1RVNC\nMW1GR9K4bwPIGy518mT4oXrDpVVx+cgwZGNEYIFG6dadfEPJcJE0wpaEqta3\nqqJbH8LY2A8SIza/3R4ufucGnuNXf7YzRCC9K9E6e8wbdYtJP3XRfCCG+MRj\nH0JGS17oymXbwm0DEo75P56PTWUS9BFrs9mHyY3IDYVfLHquv/eL38M6la9q\n8dSZjSsZuDKrlpjypWulWySfT+V0aoOFSL+qgjtO9F+crT6qBTsc2t6iaNgj\nVxNoscSrYpi1JxahoJT0PU3oWEKbjM3rHkHbg84LLRjUIFUI24U/hrDOUHf8\nDLoL+xlnEr3ixyVOvkP+EnNc0SmLOcoAFPTrimXhxkDNxvyqUurHsx+zAE6K\njsD9ULSXDcyPYntWMorgLRL57t+kHJVzri8QHlCfEbREUDepnvA7ekviNSk+\nuw/K27M6szmRr91SABqAVlMEIYp+pI8DDPuQM+3TeF06abdpPaU9cj0Sar3T\nPeW608P/XZzNQ1YJL31IZSZ8/JDn3neixz/R0NBKO4icSxp75nbleuf/lJYX\nFoA2PhXUtuPTD90f7H2ECr68ZNSzoU5vJOL3H3BFRsRMAS1ihc6U+/711c+0\n45yv\r\n=cW2g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdEAyGEMkGhn5QMa3Z4+aajZGG7GroF7MujtQECfULrgIgBSRVYtIujB34j5hxtGnzsr8ONWpQYc/bd+PdZ1fNiSM="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.4_1535485530571_0.9618806521588581"},"_hasShrinkwrap":false},"0.2.5":{"name":"redux-saga-modal","version":"0.2.5","private":false,"description":"redux saga modal","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepublishOnly":"npm run build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+github.com/KarimAziev/redux-saga-modal"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"gitHead":"fdc2701199721fcddede263e5b3823726b82d40c","_id":"redux-saga-modal@0.2.5","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-33xMRfT3oifp/viLzSMXY2LfxydhOJHwEU3ZLMsLA8mkqUnxKGl5lsKvhHSO7DXZaoB3NQwk6C7I3Fm7yszStg==","shasum":"9fda64f14bed8c47162691e9e114158463587c52","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.5.tgz","fileCount":20,"unpackedSize":968339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhagCCRA9TVsSAnZWagAApKYP/2F3lPXWOQ2nsQIzLpHb\nf/HH6t9vKyqg7Cx7ZZd3CcLG6hlHzRcNvpgJTvNKt7evKWwA9rM99T06IJQd\n3ygLT7xKlaC0LEC9YBTQwJSEcMGzK9JjiloNvFguvUqAkUMSbKWGQQz0vH/O\nUozD/jqD6tiya5da1zJvkBNT+HrZ58SBUsWtMPNF9Xb1oZ6RTbaxYNgAUzdq\nhTA0S3FzpYxj43NdN4khHKk6upxRa4qma+iht/fDr5KguELTvrLHzLXQr9Q2\nQU2H7aLCMOpHqr/lBSci28Zyp/OIIUJHL7Lngjm1TH96UwF44nkHk0YKK8xr\nYSjyyh4GCb/QIdf1XX7UJuQj7hGz4BWKbwRKcsmE6LPob69bWiZtFYo4LSv7\nlGm/WlXCpBc+O4lLeVz+DwiGbLNVxdR1Npb9L424u75cswQiLJCxQzaYjOnv\nOyPe6p7wzT2VtMxch8sIgJUojHNMOnNzSYZqIMSevkRWhw43yHEArtikUPMs\n2nsRYnVOe4RmxUn5fFkVi3K1Y9VyNvW2DYMfSUxCHgC3JE1dAHfmQqyB4uoq\nbPbV6OsTw1UTj6h51FeXA6SwIBE0yT8WhLpBA+N9Bi2fSpuMw2mH2WKzulbt\n54zG+O5eNT1nyolxia6yQkOg9qnloa1VvQ09svl7SkdK5/qiE5aEEJ7TbzTb\nt7mS\r\n=/A5E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFaZANkX60i+zv5f/1aOqWhn58ar99m3MhVcsHP9CvpEAiEAgCYp134eQTVqm++zjOk4rI/Z/FGtWOLTaj5ypIonE/8="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.5_1535485953757_0.7973222452315789"},"_hasShrinkwrap":false},"0.2.7":{"name":"redux-saga-modal","version":"0.2.7","private":false,"description":"redux saga modal","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepare":"npm run build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"repository":{"type":"git","url":"git+github.com/KarimAziev/redux-saga-modal"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"gitHead":"2fbd0b4e53e2c705436fa472cd42cbe4db540e35","_id":"redux-saga-modal@0.2.7","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-azjGrwIuJ6CuqEYsNjEamWSGna93DTigMsg5Psd8TSRSWmwxoNcXx2I8sThuErTrZ00CTA45ywWi0iAKJ+J4Dg==","shasum":"003e5bad053ad2176a588e101cfd71d68eb6d850","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.7.tgz","fileCount":20,"unpackedSize":968332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhaoWCRA9TVsSAnZWagAAu7MP/RwyA76JzILscAB8O1o7\nsxN1o02Qj5aHdmj2+WsH7ms+uxxe1bGlbpaby0xypuxu2g9czjgHTphv3rCI\nk/bb7ym3/e4RIDtwD6Iek8CrLFic1fnfe5xZeGGKSwJjp9hFl+rGm3TUZ9RE\nsCCKWjBHumNZV+aBU2biadMcnk0DRMG7FfCxdDgpOPBZkZHEHtms3MhQFDgZ\nlGwpfJ5IThO23AjVv2a9QMrmkSXZBHmaL6iK6M0OOfz7Kg/B+KQZMtdOprKr\n9Pk0oL5eC0w/2iRWFNDuZHEF6uz5fzOdsx59+hAzK/AJ3rcI5V8zBeIhWWOL\nEsx+3gLta/uvyQsdb4jicaWPjXqNpsIY3JVneJrit1rqqz7k9Knnft0n6LFP\nQWWAmc1TMHrHBURw4FKuOz1kbbf5v4LQ3WPEb3zz9M5pxQYhMeIq2gMS1f2t\nXxOky4a+JJ3EeCLlsQAMeGCbyZ93sIFxosifKGIosFif08J39/iCI/f13dsr\nHZ3rNCDiJciZLIQVsMYqNJzBaRPDxcjOnpLyUfESyJIf3oNweoPdaKVk5k2z\n+uQeGBUp8MknBITaRFJaqmVi2gzMmJn+mGbZKLTSxMUuxF+yCVKdVxrWiBQi\nsV6yBbV7FHaTx/V/jbmYODDzPKEHmEUeUCj8rB5+thTUHoam3M8x/F2OwQ5Q\nPlYL\r\n=zJ/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDaBqdvEgogQFd6vpIHpSR59Qleg/Cn4ce0zBQuwJuTwIgey8k076Xg1Ht4mNqErkPDe8YkidgnMUKz5khDNDccqc="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.7_1535486485825_0.5508964379850632"},"_hasShrinkwrap":false},"0.2.8":{"name":"redux-saga-modal","version":"0.2.8","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepare":"npm run build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"https://github.com/KarimAziev/redux-saga-modal"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","licenseText":"MIT License\n\nCopyright (c) 2018 Karim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-saga-modal@0.2.8","dist":{"shasum":"a01512734bdc9fd750fa3b7fe1c29b719c86c718","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.8.tgz","integrity":"sha512-9/p9VDo9FXJUi+aMYRe+q3OkU2+brI3SWBSkM0N0a/8AKnwB5QnXhrr7a4/hq5TZ2kwWrqrt1KABYq9k9wQYQQ==","fileCount":17,"unpackedSize":738896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhoQYCRA9TVsSAnZWagAAJjcP/R1B2jONEHeHQ4Q8Q2nY\n4C6INRW1cVHIWlKgf5i1ji47MM7B29ADrt2UgbjaV3k3n3BkL/Kpr6YJ0mNa\nS5rbBZdcTm8XTJL1l0c4mccYGFs+8GvsyE2Ci4hL7YXxaUwVoTFvT2q/G8JF\nHx/+4FUK5uFE4dJ5IesyKm/6wHvECSxkbMuPNPCBISN5TuRnWm7Gby4qjZqL\nwkVPRiD6IzC4gQ5by8IhVWpR7TWrEGGIP4AMEConxEwiIuG44yrSH5+oO128\ndGXA0VjvjQ+lsWJ9mddRUKnwjYIHf9ZPZ1DcTrPQxb3kta0VuJmjjx3MvE/h\ngLEZkzKNpsDGNL2TG+gkqGdQC5hYPNePT4p+Fp+n8AoUCi9N4L8Wx0Vn7LdX\nG3rxv7mRE9/yptIXXrzwtfihOXVidB+2ueX5DrX3avm2PaDaI9gpPpQt/Lth\nGCWxucwEuEKo/uBGEq2uytzWR3BJ4je2CO8i9wZvdVyXsc/b4QRUvDXxUuN2\nWESdCqn+zFQG5rN1Q88gikMZirS5aznDPC36M/za5GZRG48AyKZp54wKeaAK\nkpMDPfSONNQnGbt+uUSRoNSac7wixcIzaJc1pS7TM4WbWdFDYDj0BPv72rjl\nC6NZ6vHandXiJ82y8aO5zNzzPnbZzosQlGFkgMm9wld8z4B9XVTN14P5zH/H\nWUK4\r\n=bRlc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+Q0MWemewq0+lCbCdpIYK3Uhqcpu+MpUlCb/sekLkqgIgWwyDx8/sXLlF1TnI5tuG8v/Ro0iRwVmmThjWWmAodf8="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.8_1535542296120_0.4740339459801788"},"_hasShrinkwrap":false},"0.2.9":{"name":"redux-saga-modal","version":"0.2.9","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"start:dev":"webpack-dev-server","build":"webpack --mode production","prepare":"yarn build","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose"},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"https://github.com/KarimAziev/redux-saga-modal"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","licenseText":"MIT License\n\nCopyright (c) 2018 Karim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-saga-modal@0.2.9","dist":{"shasum":"278c75d4ed275742e980a5da9c221e1219dd8537","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.9.tgz","integrity":"sha512-ZOqpoIjrnCJDBYsVryaw7tMOPAtWVwPE49p3WDRgXwxnosHf51f3c6EkySNPvML9zKWc3nyqdc23YZdMLnUMnQ==","fileCount":17,"unpackedSize":738893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhoYRCRA9TVsSAnZWagAAQzsP/0L1+j17P2kCwbz8ekWU\n8R4bsIUhHGf9UMaPQmLhoBaMgvRdFSyUGf7JJUjGRb3M49/UiUVjnvkL28L+\nbREv3r4RbkvLaq4/vCl8bfoQ6HfV4iux+yCxLI5SGONr/G7LzTzLI+knxQmE\nLcd9rnwMJ5Ondv24eiM8O2W2wC+lVjyYBZrdr89W71Yw10+GKEZE22jR37VX\nLs2pRuZqrMiAfmZ51AfiGqIsHqFHhWSOq8pv5xk1pgp+1ZSMu/MRTkSSu/ds\nYe/v4qTcwsLrURoN7GnQ1PSxy8rZcnw3jGtpF54e7lzW2NwB/sBe83eQIHp/\nu8CnuWvJBICh6OMLXFLeJFH56nKhraMoHKboNsFBwyCICsfI2N7I41jWGtPs\nR/theJPDLgKcMOorkJFYexlIZTNpbik75sRRc76NW2Ai7sDCe1140ORnxXtq\nTSWnIksaTiGK4f+bKxB1uFe6OuCyz0TjNr2ReVXBbv1WTcCh7SjJ3J4Ytdid\nINCjBkadklOHEBdvvhkAB0fQjucI6PKQrPzRD3Tg//jLhltYeHY23lq2ZEFI\nUgTiJE8joMIoxKGtsnp2yo7v5teeTlhenXcrBPB/W9lSPVp2Fsh1+oB7yW+5\nHApjNW6I2M9qSE5vODQf71lttDIOvByHVjjStsIlaX5iqy8PMOcvLq2J4lgS\nSR+I\r\n=y8CJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLelndkIv4ZPcnbtH5mh/QExGRKZ1S7Dv/lFzfiQlSiQIgfISHOZlNUAa79YxUR7TGFinNhdOkMk/yJPPwKsLq5Vo="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.9_1535542801152_0.04691101288968813"},"_hasShrinkwrap":false},"0.2.10-beta.0":{"name":"redux-saga-modal","version":"0.2.10-beta.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --preRelease=beta --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","readme":"# Redux Saga Modal\n\n`redux-saga-modal` allows to manage your modals within redux-saga and keep its state in the redux store.\n\n## Installation\n```bash\nnpm i redux-saga-modal\n```\n## Usage\nPass the `modalReducer` to your store. It keeps the state of all your modal components.\n\n```javascript\nimport { createStore, combineReducers } from 'redux'\nimport { reducer as modalReducer } from 'redux-saga-modal'\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass formReducer under 'modal' key,\n  // for custom keys use 'getModalState'\n  modals: formReducer\n})\n\nconst store = createStore(rootReducer)\n```\nAdd `modalsSaga` from `redux-saga-modal` to your root saga. \n**NOTE**: You don't need to fork your modals sagas here, instead pass them as a prop to the `sagaModal` wrapper. \n\n```javascript\nimport { fork, all } from 'redux-saga/effects'\nimport { sagas as modalsSaga } from 'redux-saga-modal'\n\nexport default function* rootSaga() {\n  yield all([\n    //...another app sagas, don't fork here modals sagas, pass them to the sagaModal wrapper\n    fork(modalsSaga),\n  ]);\n}\n```\nWrap your modal component with `sagaModal`.  \n```javascript\nimport { sagaModal } from 'redux-saga-modal'\nimport { exampleModalSaga } from '../sagas/modals'\nimport CustomModal from './ExampleModal'\n\nconst ConnectedModal = sagaModal({\n  // a unique name for the modal \n  name: 'bootstrap', \n  // saga to forked\n  saga: exampleModalSaga,\n  // modals own init props\n  initProps: { title: 'Hello' }\n })(CustomModal);\n```\nFrom now you can manage your modals as within you sagas as within its component. As a first argument your saga function will receive object with methods `show`, `hide`, `update`, `click`, and props `name`, `isOpen`. These methods will also passed to your component as a props. Moreover you can use some helpers for saga.\n\n```javascript\nimport { takeModalClick } from 'redux-saga-modal';\nimport { showModal } from 'redux-saga-modal';\nimport { race, call } from 'redux-saga/effects';\nimport api from '../api';\n//first argument is object with methods (already connected to store)\nexport function* exampleModalSaga(modal) {\n  modal.show({ \n    text: 'You are leaving without saving', \n    title: 'Save changes?',\n  })\n  \n  while (true) {\n    const click = yield race({\n      ok: takeModalClick(modal.name, 'ok'),\n      cancel: takeModalClick(modal.name, 'cancel'),\n    })\n\n    if (click.ok) {\n      modal.update({ title: 'Saving', isLoading: true });\n      yield call(api.save);\n      modal.update({ title: 'Changes saved', isLoading: true });\n    }\n    \n    modal.hide();\n    yield put(showModal, 'ANOTHER_MODAL_NAME');\n  }\n}\n```\n## API\n#### Action creators:\n* showModal(modalName, modalProps)\n* hideModal(modalName)\n* clickModal(modalName, clickedValue)\n* updateModal(modalName, modalProps)\n#### Modal methods:\n* show(modalName)\n* hide()\n* update(modalName, modalProps) \n* click(clickedValue) \n#### Saga helpers:\n* takeModalShow(modalName)\n* takeModalHide(modalName)\n* takeModalClick(modalName, modalValue)\n* takeModalUpdate(modalName)\n\n## License\n\nMIT\n","readmeFilename":"README.md","gitHead":"e010afd075b8ba948a9c54331541a5d4f6b557a9","_id":"redux-saga-modal@0.2.10-beta.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-j+Wfkc+lRHJyalB7GVEwmwFKqlDbtYq3Jq7VSzii3jMbS6IZ3vGV3LP2JNbwQe2aLRn5z1kDuDcECF6XfnAzXg==","shasum":"500cc1bdd7aa0be327caed5c4cc16a156f2073f2","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.10-beta.0.tgz","fileCount":14,"unpackedSize":739567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhpjtCRA9TVsSAnZWagAAG9YP/2oOR7PC4lpTImsigjjx\nkYOlI28s7r6c/i/+RAcGx/8kD5YyhiQheuQ6JCbXrnTsP5l9+44kzwYsV6e9\nxEccmJu7xRbbGfdEDKXUrhTcRnRv7PquAaAVJB2KjXW09qwbaOfYAiGFomQy\nMa71K1YUfJ+IN/sBApMCgbATa4kdgpIrj4MqF06WA0yzVpgh9r1BZ3TBX8BN\nqxq9ARreRmPHKeYkrFcqIOWesZlc9yqxKQ8INZXgS2voMFtGvw1oofZujihV\n6NSsw8LIlC2Lp/tUwA8DUD/J6faVNN4uPYx8GV8yJD0YFvJNR3YXv6EZOrJB\neVp5/f8feWRTg+acfh9cnS5h0xgHtX6pFuSQ8z+7+TbmtN3GG5+kKDed2W+m\n6+VtBxn8I8E5Hoj6AUB2SYBH88wwfztWmBL9QM+AwxHF+3KPmPVsn9renPaP\nHp+V1yi6f5CSpqhra+DiKJBu8eSYp4IFpmPcJubWL4i8STSNpFKE/s67Bqr3\nREdJe+4CDvRKSiCPEBfxJkRsQdt+lBcG1ppwXBnLUZ5KoVwPISmqcB+WlO9e\ngllNVEMQOq8yo9FHQoIey99kr0HRuJJQaPTy6OzpDSPkBpS4EkC7OzJNwlpg\n06TchyicIP44cuH9fy19s8Ei1BCfXtehDGe8sGxrlJX4gpGtggnteXAog/ax\nYZMG\r\n=/T7Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs7PDRwyLRf2Tx2WNw9AJxprCxP43zqWcJjg0I651Y9gIhAPuplSGIRyxaDMlbhjowtHY3LhByPJhG+6BL+LsJimPU"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.10-beta.0_1535547628248_0.16495183203663966"},"_hasShrinkwrap":false},"0.2.10":{"name":"redux-saga-modal","version":"0.2.10","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","gitHead":"bdc8fda311c72b40e3ddb68800a5b7c149505f61","_id":"redux-saga-modal@0.2.10","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-WlIlSqbJBf2qgVT4EL7k12saetIcFF8npAS0Iyunv0P3iLd4oksNdhabuRpNbf4CUOqYxr1Qe81OfN3Sdqehyw==","shasum":"17717aab5c8e768a9b69f3d099e7376c8858bdb0","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.10.tgz","fileCount":14,"unpackedSize":739542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhpmPCRA9TVsSAnZWagAAzz4P+QEQXJp38VdsvaFQkMH5\nVwIiBtU7WjCdRvYLpJRbTkC7lnGbHcFii/P5V7etlbtwSEzak1HgTxMrcj43\nvPT4WRbvfyWUAmtO0/BlOBGPEcfgRvIP9pz1YKNAkmY25aDV70DWqEAid55e\nU3g+niXw4V3OCv7LpdPtzsuPjP7xdSp3kQO7gbtwN4e14x4talHouoSEti7B\ntuviy3v3h5rQ2T26SvLft2KZmdIdn9ci0Fqa8bsWKe3K9Uj21ed+E0kS0Rnc\ntQXcjBIxXOAaC+iA+I1hOFuAAJLZTeH9IrkF+9LW2Ae6OtNI+Ne03TbJBY1l\nyQT46DR5wwsqP/nuSGrbHyD9p5uWOO7xuzVWNn/YbOvEHO/eNoDJyUsTd9Dt\nw0Xdg8k4jp4YUw18l231Y1CjDU7aQOzRcC+WKQWYuENf4FVie63fNEPHwgjV\nPrTO0sWI2T0u/5SVMMHo4NbuHmdPOIU9xKJRLcskIOa3tJTt7f0v/JgZ5dqT\nBZXSDkbAvtohr+KFYL+pd5vas0J2s5g2VZUNaDyvI3IkUsPkxcISKtiGN99W\nBchNpSVGVZylUmLIGVgNky3h8YxMrPB0IBI/MQbNO4s5K1sPW9mqdCgHSpbn\na1YGGmJYr+GzfstIKD4kgV30IVQeVjdP0OePoBkmTXuIe0+olr4AdZf9JVKd\nOl6m\r\n=zrHh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTIJ+EAnpmBdQ1VftO0wjqQT9juSRCyoAot1KZ4mfA1AiEA2G93FJOk/fujyQk55WfJAYebz/BfczTlInYptWWPb7k="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.10_1535547790402_0.5745077025864367"},"_hasShrinkwrap":false},"0.2.11":{"name":"redux-saga-modal","version":"0.2.11","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","gitHead":"406695194f2786cba0ca88bdf3a4390203da18a2","_id":"redux-saga-modal@0.2.11","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-9o1N263spCN5XnYmJHE2HSaiS8jyq4atqZUtpLsVF3VNUf7KQ9CaUU7yYZdB0aZ/7J8TRZZ6U6VBM8GmluhG0Q==","shasum":"501975d68e3f2a9900812d8304cc9f1988ac9585","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.11.tgz","fileCount":14,"unpackedSize":740109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhq4eCRA9TVsSAnZWagAAnzsP/20467JUXpdwQllAszVI\nXVcztV+RLQ8gKRDqAtv28SqWAQ60vkLHcaYIpY2cosjdPCxOPeyL/iP3E8bg\nIkaHwSJ0Z7DzOZLeJAj6L8vdooAxa73ScVukyW4QKo6fgqe//OKfZoxGvifD\nrX2mxnkLY8lfp+IGezqKE4l5bRaQ3vVK0QrwG2XJ29odZCjwKR30CTexbqyZ\nBu3UqD2UyxapsCiPTHaiXZVhQHz31S2chJNrgwMXQzflObrpj1Z8ysj+R0ki\njxg7E5Wdi1Fh0Q9s+yTiHhNg02swgzi9yY7hAdedePq58qWoKqYoWUZ+CULi\nYx6sB5J7iZeFngak7e/T39I98YUrxWyONJS5bAfrY999xE8AvA/vvzOD+wrp\nA45W06/HJA75UM6x6H22GnThn1FzK1HZRrewNTwWZ+d3t4yDYW76L77z5BjV\n6GPQsfQFl8uUSAKlCab4crKrbS5XuclcZW3ZtU/yH8u9Gvnu56p8u40Ie9c3\n4hQNodpXtdb5dpD0ao1exHpPjuuHUPoOyIApOEC3iYICa7+mzQUYz2kr4F5S\nsno6u+nutBEmCLhaEY8OEGVU8g35roBsu/b5NRo/R0ebm0GgCZHmsV7rzYrh\nMKQ+A7l6/VgE/1r1nsi6cchCAvfSeIFOzKgdGHOq/zSeUc8D9f/lh/mBoh/c\nNi+b\r\n=Q2ZQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAIzUG+rB66HlfhBQDWn7FIWVYxNw38EakKsbl2TQ7MYAiEApmU9yP8Y10jwPhqiWNcc4lcHnoJcSVDk73z3lR25aC8="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.11_1535553053415_0.2226557488159453"},"_hasShrinkwrap":false},"0.2.12":{"name":"redux-saga-modal","version":"0.2.12","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","gitHead":"ecaf3dda87730d86b6aa3c535e6ee69b0c685227","_id":"redux-saga-modal@0.2.12","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-/bgQ5mCFZMFV4L25amTn36U6hthuVh6exm0SW+NM9faaKEUhf6dV/lt/JWE+EsG2+OcGEXWUper2Vp/EHR773Q==","shasum":"e6a9a99547d35aa3c59e2f33c6f02f6e7d96c86a","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.12.tgz","fileCount":14,"unpackedSize":740249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblnFCCRA9TVsSAnZWagAAsyYP/3Jol3wnF9TJOI+Tr5FJ\nZMeJTQhSnBgp9Pnny+JMkS9W0r7htx9A/SKIDTwZOLTebP4PUvh01IOI2ENs\nWNtmubZFtoU88TkPLtmJ2ElktUJFgkZwPGdoddlcYgcPi0HOUcAjqJkxDv9s\nGwdwPlC8cfDO7aa4gE8WoBkIeSZiwjd9VlbvoRzfPLh5ifvsmJ10RTUXjhow\nv0pfS1ZT8h1qgV4Eq25daR0+kKa4+Bc8+wg+cNl7AwuxvJ9F2wotyvyejC0g\neS5bvV5qWrJMpaQg6v2eVU9ghU5Bq1q3v8Lfgg4JP93U4TjSwF/GMdDDq6E1\nqSkS1TSyNuoEUxcR8QmU8jjVd7jBPkAHApw+n5ebNZM7Zq/d/YbAVAtFB8Or\nqEpg6G/P9SR38IIM1LYA8JJmeG+Y7yTzURXJobD4SGzYCatpHOF0RWsQ/eHa\n14R4C0Zf6xK7KDsfxU9B7cKpgM1iUvcSVVLICPn0ddCvl1WtjqUnvNYG1wh1\noa//kSr4CgFMWfiuDvaQl+kxw2ZCplY8n2TQrGdmG4kUZQJ647ZQR9OptqM1\nWo3SHrRuIb6JbwBSVYJkmQL3rp2f1pdDOK/rti2fOuag0QXKmKNBY0RHVVCa\n9VnSJXC30fp7evkI3qk3xBvg20Mp0l8Gclt+3/tDLZ3/jP5nM/uxj0kDGS+C\nN2ct\r\n=R8gi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIApDxyGhc1sIC7LUVx2N2UpEfbGvPRXT4xl3iWhbW1UuAiA8sjQ8Gm7jdOi92yPcU04yYbhtM26Mfq9ARflqHyhwyw=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.12_1536586049893_0.31563079461053234"},"_hasShrinkwrap":false},"0.2.13":{"name":"redux-saga-modal","version":"0.2.13","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","gitHead":"3167abf23c56a1797747da0c7c3d67f162ff251e","_id":"redux-saga-modal@0.2.13","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-ySzyT2SAQDk/2S4uwFmOBI6xcjOVs7bKrgUU2OvwJ6ov1q2+EPyPG4Qn1GXTFIIEOcVey1Zo65OKZdxcFRO+uQ==","shasum":"e530361f2c8c9c1b1ccbc62a8049ef7e96188934","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.2.13.tgz","fileCount":14,"unpackedSize":740269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblqpECRA9TVsSAnZWagAAPR4P/jvRsMLa18khVtj3w+89\nR2LP9BDLPMRNbegGQF+0O19nhQk5Mhg+5QDtcD0Rh5XF3fYMe7+12LifoZxJ\nh4aBXTd4KrICvGCAPUW1cEnI7rFinr8MuXHt4DfDS360f5TmS9/pS4caR8+H\nhnmim+pZnIpoFr5fGLZEO7rUEm3/JHU5J4FpS0CcgDCkzkn1pHAJmVbD9NzB\nCHTA2NoIVCMJE5E62GJ04UsNzS9ACt7sktR6kdQy97lyuH0c9s3auC6tsKv7\nWHojjQgoC60rZNPR4kJizc4QL1bAj2T/c1VVq2nyj9mfQgGrn7TK3W1d3QMX\nnixmLhoBN6tKZ7wcHT+TCneJhc1z8Fwa+TzGNRdJYzPO0eolt8MKLbDtHSmf\nGdYA5OUmGe8joE9xtfPyA386kclxIA1kHXbkQh5zdARQ7QM9wu+ZXHhHB3Ga\nHniBEp56jqGhfs4U7soL5K6eVe/ErwHDFDo65J5noLRNa8ALxB0xioxnt03p\nQYntMYaFttQtUGedp7gOVQdDNq7tQTTaXyZHNvsCdDTdfj4tgULhkPNAk/M4\ni92faqcVjxQO8FjKClRC7kjqvK+TGTdB1W9XwlWKAiSu/gBRjZhH1NOvB34M\nVAvqbfeIJfSHL1fz2KwdDuHxTaMHePi3B0yuJNb1DiPoRo8yNMcWcQPBLkd6\nYp3o\r\n=s5TL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6MWVqr1uYM17LZy/8fOtqvdXeDXOdRjZsLmZtqZ0N4wIgM2KIcZLJP33q+xImQ2QnkmYpeH+yMvChoWNTPS+tFRQ="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.2.13_1536600643872_0.02333910375239512"},"_hasShrinkwrap":false},"0.3.0-alpha.0":{"name":"redux-saga-modal","version":"0.3.0-alpha.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","readme":"# Redux Saga Modal\n\n`redux-saga-modal` allows to manage your modals within redux-saga by passing a this context to your saga and keep modals's state in the redux store. \n\n## Installation\n```bash\nnpm i redux-saga-modal\n```\n## Usage\nPass the `modalReducer` to your store. It keeps the state of all your modal components.\n\n```javascript\nimport { createStore, combineReducers } from 'redux'\nimport { reducer as modalReducer } from 'redux-saga-modal'\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modal' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer\n})\n\nconst store = createStore(rootReducer)\n```\nAdd `modalsSaga` from `redux-saga-modal` to your root saga. \n> **NOTE**: You don't need to fork your modals sagas here, instead pass them as a prop to the `sagaModal` wrapper. \n\n```javascript\nimport { fork, all } from 'redux-saga/effects'\nimport { sagas as modalsSaga } from 'redux-saga-modal'\n\nexport default function* rootSaga() {\n  yield all([\n    //...another app sagas, don't fork here modals sagas, pass them to the sagaModal wrapper\n    fork(modalsSaga),\n  ]);\n}\n```\nWrap your modal component with `sagaModal`.  \n```javascript\nimport { sagaModal } from 'redux-saga-modal'\nimport { exampleModalSaga } from '../sagas/modals'\nimport CustomModal from './ExampleModal'\n\nconst ConnectedModal = sagaModal({\n  // a unique name for the modal \n  name: 'bootstrap', \n  // saga to forked\n  saga: exampleModalSaga,\n  // modals own init props\n  initProps: { title: 'Hello' },\n  // getModalsState - optional selector. Use it if your modals reducer's name is not \"modals\",\n  getModalsState: state => state.myCustomModalReducer, \n })(CustomModal);\n```\nFrom now you can manage your modals as within you sagas as within its component. Your saga function will fork with context, includes methods `show`, `hide`, `update`, `click`, and prop `name`. It will also be passed to your component as a props. Moreover you can use some helpers for saga.\n\n```javascript\nimport { takeModalClick } from 'redux-saga-modal';\nimport { showModal } from 'redux-saga-modal';\nimport { race, call } from 'redux-saga/effects';\nimport api from '../api';\n\nexport function* exampleModalSaga(props) {\n  this.show({ \n    text: 'You are leaving without saving', \n    title: 'Save changes?',\n  })\n  \n  while (true) {\n    const click = yield race({\n      ok: takeModalClick(this.name, 'ok'),\n      cancel: takeModalClick(this.name, 'cancel'),\n    })\n\n    if (click.ok) {\n      this.update({ title: 'Saving', isLoading: true });\n      yield call(api.save);\n      this.update({ title: 'Changes saved', isLoading: true });\n    }\n    \n    this.hide();\n    yield put(showModal('ANOTHER_MODAL_NAME', { text: 'Goodbye'}));\n  }\n}\n```\n## API\n### Action creators:\n**showModal**(name, props)\n* name  : String [required]\n* props : Object \n\n**hideModal**(name)\n* name: String [required]\n\n**clickModal**(name, value)\n* name: String [required]\n* value: String - a value of an item on the modal that have been clicked\n\n**updateModal**(name, props) \n* name  : String [required]\n* props : Object \n\n### Context:\n**show**() \n\n**hide**()\n\n**update**(props) \n* props : Object \n\n**click**(value) \n* value: String [required]\n\n### Saga helpers:\n**takeModalShow**(name)\n* name  : String [required]\n\n**takeModalHide**(name)\n* name  : String [required]\n\n**takeModalClick**(name, value)\n* name  : String [required]\n* value : String [required]\n\n**takeModalUpdate**(name)\n* name  : String [required]\n## License\n\n**MIT**\n","readmeFilename":"README.md","gitHead":"9cd15b2c31764cd5e930b61b2a246af76cd08ab9","_id":"redux-saga-modal@0.3.0-alpha.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-vtpeFbsGByE7K/ow2surQKEQWFieJROSPhNfTgMKblR4O9Di2M7oGLSEsJTme9dz57aFpu++a5WBJHq2NN4lEw==","shasum":"801280926cc6a3933cd52fda9288a1828d8d2745","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.0-alpha.0.tgz","fileCount":14,"unpackedSize":744028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/+9zCRA9TVsSAnZWagAAwDcP/A9AWS5R/t8GNxNlSgzl\nBlsWb3oPgY7GT0ZorEuAD1YfMMZpJ/k5a7s9Gqu6P2nkK/PocOa1GmxxxVL0\nHzSoE/GJlvHI07Hx71Ea/3VsdEIFbfhnXH8w+doVzlN/15yFEL51e9XCRutR\nAPpwtHDnl7YV1uF62vlN7LLKqriCtrpwl012WhTbBM+w2wTc/0ZXWrnZU/Mh\nrQ87i4rtb1auHqUlPTQhSXeYmgpQolGB0b850TJCYEuGo0cty7+/4aAQNRML\nMN073LZBwb0yGQKrtoPWbLDebv92ImA1V463pZGC7dLgoD94qIgJ+eCGWIdS\n8nxN8gk/fN9MU70oPoGEWjCFY6ES+FTedXv0ETBD1w6TVeU4hHxcPX65Hq5H\neUfwTqrSR7vtRbOIAOTIiKNXiXwX66+CK4jmGcCEYTMfyiYvnXObO+jpFhXP\nZMugP445PU2zyww+LyL7W1VIE9ZdRyOCTfFEPv2kSDwLJ2wJWavkUSE419iU\nRALPqrafuSO/+BQh5Ake9MR2coRqstxrFZIXWwBiIun6yS2gQpuC3YxZPvFW\nn40hpAnuu+wOgmOdk65UcSjXXnI5geqkaSmWLAB1typjZFPK645QwwLO7nva\nSCiLIBuvxGBMFCY+chUTQnpdzvegjc8/Mq5Imlm1kwLrOuxhVOeCMfZmvcMO\ntDyz\r\n=Ik38\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9fMF6aIc6K01FikZAozmJkEm1bG0maRok8XGdQRK3DAIhAMp6sggdL2NONSW2XxD8+SoxLBl71Tvp4Mhv6beNlWiy"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.0-alpha.0_1543499634541_0.22144172031970366"},"_hasShrinkwrap":false},"0.3.0-beta.0":{"name":"redux-saga-modal","version":"0.3.0-beta.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","readme":"# Redux Saga Modal\n\n`redux-saga-modal` allows to manage your modals within redux-saga by passing a this context to your saga and keep modals's state in the redux store. \n\n## Installation\n```bash\nnpm i redux-saga-modal\n```\n## Usage\nPass the `modalReducer` to your store. It keeps the state of all your modal components.\n\n```javascript\nimport { createStore, combineReducers } from 'redux'\nimport { reducer as modalReducer } from 'redux-saga-modal'\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modal' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer\n})\n\nconst store = createStore(rootReducer)\n\n```\nCreate a config object with modals names as keys and sagas as values. Pass the config as argument to `modalsSaga` and fork it in your rootSaga.\n\n```javascript\nimport { fork, all } from 'redux-saga/effects'\nimport { sagas as modalsSaga } from 'redux-saga-modal'\nimport { confirmModalSaga, anotherModalSaga } from './sagas';\n\nconst modalsConfig = {\n  'CONFIRM_MODAL': confirmModalSaga,\n  'ANOTHER_MODAL': anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([\n    //...another app sagas, don't fork here modals sagas, pass them to the sagaModal wrapper\n    fork(modalsSaga, modalsConfig),\n  ]);\n}\n```\nWrap your modal component with `sagaModal`.  \n```javascript\nimport { sagaModal } from 'redux-saga-modal'\nimport CustomModal from './ExampleModal'\n\nconst ConnectedModal = sagaModal({\n  // an unique name for the modal \n  name: 'CONFIRM_MODAL', \n  // saga to forked\n  // modals own init props\n  initProps: { title: 'Hello' },\n  // getModalsState - optional selector. Use it if your modals reducer's name is not \"modals\",\n  getModalsState: state => state.myCustomModalReducer, \n })(CustomModal);\n```\nFrom now your sagas will be called every time when action `showModal` has been dispatched and cancelled after `hideModal`. They will  receive the context includes methods `hide`, `update`, `click`, prop `name` and helper `takeClick`. It will also be passed to your component as a props.\n\n```javascript\nimport { takeModalClick } from 'redux-saga-modal';\nimport { showModal } from 'redux-saga-modal';\nimport { race, call } from 'redux-saga/effects';\nimport api from '../api';\n\nexport function* confirmModalSaga(props) {\n  while (true) {\n   const click = yield race({\n     //will take click with value 'SUBMIT'\n      submit: this.takeClick('SUBMIT'), \n      //if takeClick receive function as an argument it will be called as a custom checker\n      cancel: this.takeClick(value => value === 'CANCEL'),\n    });\n\n    if (click.submit) {\n      yield this.update({ title: 'Saving', isLoading: true });\n      yield call(api.save);\n      yield this.update({ title: 'Changes saved', isLoading: false });\n    }\n    \n    yield this.hide();\n    yield put(showModal('ANOTHER_MODAL', { text: 'Goodbye'}));\n  }\n}\n```\n## API\n### Action creators:\n**showModal**(name, props)\n* name  : string [required]\n* props : object \n\n**hideModal**(name)\n* name: string [required]\n\n**clickModal**(name, value)\n* name: string [required]\n* value: string - a value of an item on the modal that have been clicked\n\n**updateModal**(name, props) \n* name  : string [required]\n* props : object \n\n### Context:\n\n**hide**()\n\n**update**(props) \n* props : object \n\n**click**(value) \n* value: string\n\n**takeClick**(value)\n* value: string | function \n\n## License\n\n**MIT**\n","readmeFilename":"README.md","gitHead":"be1221530b1f5c3a38f86ae0b44488c192a11f67","_id":"redux-saga-modal@0.3.0-beta.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-bysEvDPS3G+WfY0dZGpR+XYWP/K6oWMqErWM4g0sATZIcChP3kSMftfp2cxOKC+pyj1CRu/e0qABkuLy3SGfrw==","shasum":"71886ef11280fc8cc964f05dd6799549caf84007","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.0-beta.0.tgz","fileCount":14,"unpackedSize":738672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD89zCRA9TVsSAnZWagAAuhIP/24cOwJnlKkUUXxVmF0K\n0qmZ4GuUM3vS8sho5623VsP7o5oafucPi/teokIhCTZkAKku8pBv8GfrX07m\nvy+XsdwLJGxDTj0gYinVGK3J/itwo1aHD++zoEVem+CgmhZNz6o2kVwWHYR5\nMRa63cHMWqGSYnfhhaeG4oAXcYJRBhtlokX7CORB5VKf90yNGlIyCBYw2oAB\n1Fzbbo0PQ0Bi5HUbnIylpXMGn5QMKVujLRiN+qW1g34A89Cwd2Od8GFKPNJ6\n8QiumPAlqKQsS1rhNpGLo28gsLEpUumW9gE+r1x/2eANnRmmuNZEMoTYw/tg\nGyYIBoCqzTNj5OJlSKmtrorpTwg0oTj9qKkUmwQ24CHftmV6TQSvwZBR7yYw\nHd0RvD4uMN3okp4b4eMY8AYQTOyw0mvjGewyfRNguS5Me66884gisNugaDz1\ndCl4XSaliUBYbgpmJClAEk+PYJeJSNLHKuKX2DuV485WhMWNbortu1dUG8Cq\nhWhR19IOzIDhvXpQWETT6aLj9NN+JgPEf6coSpSJf92v3FPJdfNfM71LuvNG\nsQzWtXJkmUjG8QSRuj7z28ybtZSpkJDjU90kpKIRHkSkVfK9dRwfqT3UYCn3\nj7OwevsVt5b1mPSeiXK5jTV8UbgedURnlQ1+0zTPl92KP3lB4VSvodrXjbn0\nsIgU\r\n=GXDu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbRkuqZNmZl+nmD6LQzOjTY9Osa2wPvufmV+qBZT2yRwIhANnakI3W2nsFDzPEXzozSNanUByZ9FWZqHXMfevKoyDl"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.0-beta.0_1544540018718_0.8544734940297283"},"_hasShrinkwrap":false},"0.3.0-beta.1":{"name":"redux-saga-modal","version":"0.3.0-beta.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","readme":"# Redux Saga Modal (0.3.0-beta.0)\n\n`redux-saga-modal` allows to manage your modals within [redux-saga](https://github.com/redux-saga/redux-saga) by passing a context to your saga and keep modals's state in the redux store. Old [docs (version 0.2)](https://github.com/KarimAziev/redux-saga-modal/blob/57d356d16510a25bb28dae48ebb90ec3b401a6bc/README.md)\n\n## Installation\n```bash\nnpm i redux-saga-modal@^0.3.0-beta\n```\n## Usage\nPass the `modalReducer` to your store. It keeps the state of all your modal components.\n\n```javascript\nimport { createStore, combineReducers } from 'redux'\nimport { reducer as modalReducer } from 'redux-saga-modal'\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modal' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer\n})\n\nconst store = createStore(rootReducer)\n\n```\nCreate a config object with modals names as keys and sagas as values. Pass the config as argument to `modalsSaga` and fork it in your rootSaga.\n\n```javascript\nimport { fork, all } from 'redux-saga/effects'\nimport { sagas as modalsSaga } from 'redux-saga-modal'\nimport { confirmModalSaga, anotherModalSaga } from './sagas';\n\n\n //key is a modal name and modal is a value\nconst modalsConfig = {\n  'CONFIRM_MODAL': confirmModalSaga,\n  'ANOTHER_MODAL': anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([\n    fork(modalsSaga, modalsConfig),\n  ]);\n}\n```\nWrap your modal component with `sagaModal`.  \n```javascript\nimport { sagaModal } from 'redux-saga-modal'\nimport CustomModal from './ExampleModal'\n\nconst ConnectedModal = sagaModal({\n  // an unique name for the modal \n  name: 'CONFIRM_MODAL', \n  // saga to forked\n  // modals own init props\n  initProps: { title: 'Hello' },\n  // getModalsState - optional selector. Use it if your modals reducer's name is not \"modals\",\n  getModalsState: state => state.myCustomModalReducer, \n })(CustomModal);\n```\nFrom now your sagas will be called every time when action `showModal` has been dispatched and cancelled after `hideModal`. They will  receive the context includes methods `hide`, `update`, `click`, prop `name` and helper `takeClick`. It will also be passed to your component as a props.\n\n```javascript\nimport { takeModalClick } from 'redux-saga-modal';\nimport { showModal } from 'redux-saga-modal';\nimport { race, call } from 'redux-saga/effects';\nimport api from '../api';\n\nexport function* confirmModalSaga(props) {\n  while (true) {\n   const click = yield race({\n     //will take click with value 'SUBMIT'\n      submit: this.takeClick('SUBMIT'), \n      //if takeClick receive function as an argument it will be called as a custom checker\n      cancel: this.takeClick(value => value === 'CANCEL'),\n    });\n\n    if (click.submit) {\n      yield this.update({ title: 'Saving', isLoading: true });\n      yield call(api.save);\n      yield this.update({ title: 'Changes saved', isLoading: false });\n    }\n    \n    yield this.hide();\n    yield put(showModal('ANOTHER_MODAL', { text: 'Goodbye'}));\n  }\n}\n```\n## API\n### Action creators:\n**showModal**(name, props)\n* name  : string [required]\n* props : object \n\n**hideModal**(name)\n* name: string [required]\n\n**clickModal**(name, value)\n* name: string [required]\n* value: string - a value of an item on the modal that have been clicked\n\n**updateModal**(name, props) \n* name  : string [required]\n* props : object \n\n### Context:\n\n**hide**()\n\n**update**(props) \n* props : object \n\n**click**(value) \n* value: string\n\n**takeClick**(value)\n* value: string | function \n\n## License\n\n**MIT**\n","readmeFilename":"README.md","gitHead":"ad247ad1ac1b57cb432d28d7b96a31a1e1746db3","_id":"redux-saga-modal@0.3.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-wr32iYsbZY0jFE09+v470vVXZO9wLSR1OeA8/V8DXtuh+Nayv3RiwOCWnPKydmPWbvD8EVsqrIMxd40NgCHVgA==","shasum":"840ca1640bc736fc594b84549a421eb12a709e98","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.0-beta.1.tgz","fileCount":14,"unpackedSize":738818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD9R5CRA9TVsSAnZWagAA4qYP/3E2xfPtGlH6dYFBmrTg\nGYSd6k9Xi+a2O/60hlsX5tPm7Te7SiCG+JrEWLtz5eO2Eo9Q3IT50zTKs6D/\nnEJZCiXy3aTvakqAKBpihP1sG1cxG+9OANHqu+qS48wTXKseWKxQN92wxxO3\nwEegmykuRwTUaE13ZpqQRcDOXHD/xV+4NHO1+82Sz5KyNMsRcZz5cLMAJD6k\nis3rqkULQrdDQ3SW+IOIBNdu6/xdJi4VQ3M2AfbU4ydou7Il6aApRqR8za3T\nDYpSe8ydOlp0TG/fuxDEQTFP8jUEE4iAWN0VVWQmulHHC5wBkFdekG7jJ1K8\nNEwaRLTQVQ3F4pxNiH/sjEg4PSd1ffoHWKqUT2X0FjFH7HE1W5Nz805eTuDt\n0QZ9ik8exJDmNWd60knW7FwK4JPFK2l8JYCwOF25+tPYIIDDzGS7HM3/wwox\nk138pme4eUAxHii8K4Cc/fx/XBRqErlZ/A2tVU7gSKusu+KmsifuyoGb+aAi\nuum91jJ4c2IgZkrxlxQqS2uDEdLl2LSeSDkjCrYs1F+DVorxwPFQV4DTL+MG\nWcLBZrxClCTkDazHViX3q+8lvFeCshOqFQcWOAENY7JfEBIcE5y0xbWK04Mx\ntQTa9e/BsUkgsmgUXMzArZRwE3JadOxdYW0g+RCs2zIpcxhRPQnq8TCMRe5O\nT2xw\r\n=vQC2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6y3KPhtvcwFB92P9NvoB9QjgYeErvaa/DKxZbOBQ6bQIgNxCwiPcyO5YmgmbG9CvmO8Wd7ZcZaENkk0ppYS8FVXM="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.0-beta.1_1544541304739_0.23605606332196083"},"_hasShrinkwrap":false},"0.3.0":{"name":"redux-saga-modal","version":"0.3.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","prebuild":"yarn clean","start:dev":"webpack-dev-server","build":"webpack --mode production","prepublish":"yarn build","precommit":"lint-staged","build:dev":"webpack --watch --mode development --config webpack.config.babel.js --info-verbosity verbose","release":"release-it --verbose --github.release"},"lint-staged":{"*.{js, json, lock}":["prettier --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"8.2.5","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.1.1","eslint-config-react-app":"^2.1.0","eslint-loader":"^1.6.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","eslint-plugin-react-app":"^3.0.0","lint-staged":"^7.2.2","prettier":"^1.14.2","react":"^16.0.0","react-dom":"^16.0.0","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":"^0.16.0","rimraf":"^2.6.2","webpack":"^4.4.1","webpack-cli":"^2.0.12","webpack-dev-server":"^3.1.4"},"dependencies":{"hoist-non-react-statics":"^2.0.0"},"peerDependencies":{"react":"^0.14.0 || >=15.0.0","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0"},"testURL":"http://localhost","gitHead":"a09a203f1e7d91e7ef5df346cf47efe099de8099","_id":"redux-saga-modal@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-sFqeZHs9z3wZQR7apI9Ss6xEwJFYQM794RIjvMR127JHeAH4uW4WyWpelvJEdfB9A6dc6eV6zdOX+bGwBk56GQ==","shasum":"adce35b893526b4ae8d586c22a21149d93e5f6a8","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.0.tgz","fileCount":14,"unpackedSize":738799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD9WJCRA9TVsSAnZWagAAvIIP/jpHaEOK7Lomb1r30BP2\neD3mTDEwUMJ5QHQTYqHIFcAuNshuGGOpXok0wrLQiabknFW1qb8Wh9wQFcdv\nPIKZbAkjXf+fgKB/eIfqxDD6edmr1f04zgYjR+rT7gp9lKRm7E5K5FKAJSXv\nveHN9TQ9uVazE7R7nHPZyGeOw62Grf6iCQcp7hSaYbfGq1avdCnLfHo/B1KS\nYkwsYmwns3UxWsNqT9oPfqpRW9RJ/9K+o+4gTlNtnoJ6ZU9uRka+B32Cji2c\nPU+se5H8Ll9E58mQ+K1SKTZMC3MAZY1xNiPNoC21A4v8+9ikQ6aRd6YRr1fZ\nnK5Rg/NuUr0rNl9Mv+O6UFqLRQedjAxOnUKtlX5F2g6ScMctcMjHadj5ZmR4\nf/rLvS0ys/LJ+XzezYg/tgBc/r2Uxp8Vj3mJiLfUmpV+RcEaDNPBmDWuUdwl\njiU0+dNh43QPYhWtbZZ1eeHdnrLKk/2671TDS7zyd/Hx/CowKUioyqnK5nID\n1sX5IoMXdo+bXlMNnfPOIi9JbSzlECuQAkGAuUkRxNKsUkWLVUffdQzVgMMv\n4LqwCiwAfa5uoM6jWwpyIIUKTtOjTUPyOvJ8iDsTdjFA7X/OtIzEhPE+dKIu\nL3TFCEa5ABconmJ97H9kA6m0x3AzUKTQhUUXhULX3CB19kTfR/6s4UrhWDzv\nfhOE\r\n=r2qE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXGmtWt4N9q6niUp963DXsOH3Sw0nOczV6pImClZgppAiB3DjxHveQi0DE/+JDbzWHuh1v81/0H7eQX/MK/TH6sDQ=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.0_1544541576498_0.7603144091159972"},"_hasShrinkwrap":false},"0.3.1":{"name":"redux-saga-modal","version":"0.3.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all clean -p build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"yarn run clean","prepublishOnly":"yarn run build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/is":"^1.0.1","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":">=0.15.0","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","react":"^16.8.6","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":"^16.8.6","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"27635a0d03d4cf49e7f6d918c1250f3689486683","_id":"redux-saga-modal@0.3.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-K2P3lN0yeMI4K49TgBjmtXBXSVFhnAoAkT3mR5fRc6br+L6waJonrJ9NRcANj3jQKf347ZdlWoDMFUB/mmC/Cw==","shasum":"ae09a8e24402ac59c92e8d0e4ad991926e33af67","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.1.tgz","fileCount":4,"unpackedSize":14796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6avjCRA9TVsSAnZWagAAKUwP/3oRPOLoi43s6KtDnW7N\n8mmKubNBvT4gukrDhe8y6VKe5xj9p+cz6hvEtWVE9yULI3So+rodRy2WzjOk\nNtaub450NGh27pDATKMJlGbWKpyIXCM/i2gFWWMT/1jsexmKq4B/Va3L1KcS\nXcg6ZAWW2CJoDBp5dWUTAZS82kBt/XSrFgf4OvwmnQ7TTSGVGe0iuP6LE8zR\nozp2v9YWo7Tkb8DikbbcayiOH/RJVsVyDWJNtcLptjFO20FQ58BCWmWn420h\nUDf6qs9SndznYHwxzF6V3uvb4cKiKnK+Qu3uk6W7fbTyOsDG0C8Owzc9E60r\nZDbPy3UT5010EEkMYLQ4xrAACn7+uD8ZYR4EvrxgYxmKtFIF3P+1S46ZB/BG\n2hJMB0hQT0Os8XFi1vkhC9XyXqLl5RsjBJFwfP9TeED4OCROxt3jhj+VsPXz\nyibdJMbmAqY7VKM9JeSTVG1d2YP2wXUaYx+7iBsqwTv1jNU3HURkVsfkZcAI\npoTIiBxhb/61sVIzivaZL4rnHFzTefJg2YKIubH1mncIAgGz444SvCG7eiTm\nSs6KrNBn2gqpHPsj2wdQGW9yqu7q8vqXJLkXUnNB2FD7It1ccb1ZusElxk+l\n7vTKtywzCJXoIOAggjhNNLc3eUYCFjlBUT7Em3ewg1Qu2abvSjA1V/JHEDIE\nCjn9\r\n=31SB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKoXKRlxs6wGyiA/A3n+d0Uw3kdO02812IRHjlMXtv/AiAUe8//7O3lOCgAsT/RwJ4XEas/nOB+wvzg3rnNeJBPDQ=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.1_1558817762483_0.7145493640381761"},"_hasShrinkwrap":false},"0.3.2":{"name":"redux-saga-modal","version":"0.3.2","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all clean -p build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"yarn run clean","prepublishOnly":"yarn run build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/is":"^1.0.1","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react-redux":"^5.0.6","redux":"^3.7.2","redux-saga":">=0.15.0","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","react":"^16.8.6","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":"^16.8.6","react-dom":"^16.8.6","react-redux":"^4.0.0 || ^5.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"69be565e8cb12bc777af7b061b4afae7f0413657","_id":"redux-saga-modal@0.3.2","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-+Vxl8vloGnfxrG8XBlyZnHFSTbcm0Iim/VHlPdPe/euDVA6UYrUuV+fcuJKulX7rdvcuVSfHoY1d7yK5NAwcuQ==","shasum":"8ea4fbb67b68367cf9af917a3edfeba5e3159edf","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.3.2.tgz","fileCount":4,"unpackedSize":14824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6bBYCRA9TVsSAnZWagAAUrwQAKGiFLZHhyBm88Mu5Xmh\nyoN51tXaJFARXEcsqrI/AI67uYXqP0jPZtoMz7kdbLhggVuhwhXtBgIYmDvP\nD+judU/k/IznxO+z/eyH5xw6QFb8dvPYsaVQ1az+Ml0pbeaRNOitOfYPtyF0\nBArkJbIzPPY7JUnnDoGEI6f6MELTBV1aeY/eaN2Agjz6SmWhYm9gsjcjis3r\nJOMIItgm7lyHYiAGEsRGaqBveur5tjIXRlwssbhCwmpu/b9jSYY4vaeuorsx\ny1VDQsRB7Xegx32EkliwhxFQ5WXeqHYrjM64N1S00bxUCyo5SoUlRMEYoBE2\n/cCc4DcuTQD82OERQuKy/tEGrZFKxacYW4y2WistOoVyHSOUpdkg+0mi+eTX\nQDtRurWNI7abgje4VqSYr9UGMjQEtomvomEYpDVQovUu8y5vPv61JDiu1dBS\nuJOFTABh8z6f1GBDpdNYTosYN8lkLcAuTKj9Tm2yBLxtoTYTSTXStx5zFwjN\nkiRRGjNaZvjX619mDeNQHsGkBgDfuz5DK1oJnUqoyS4KQrNGIz7SO8IRndIm\nUOEVGyY77yjayUTEG1wMwPn09qLwwS72xvZOIEDRwRcCH4YOf0uf5i8lwUY+\nUdoeAA9Y8nSD2gi2CQm74SLI1gBCE0b7lhcHdl6gWvZ9ou97j0aEb9SQ3VpO\nR6HH\r\n=nXK+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNp3KXNdlNrCNMo3Ma8tJvlKnXBaSRWn8XQrbe0Y/UGAiAhsLNKX1e9t46QBNRQb0sGRNqQBrwp8negcqi3mkCucQ=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.3.2_1558818903706_0.9892779350350847"},"_hasShrinkwrap":false},"0.4.2":{"name":"redux-saga-modal","version":"0.4.2","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all clean -p build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"yarn run clean","prepublishOnly":"yarn run build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"https://github.com/KarimAziev/redux-saga-modal"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/is":"^1.0.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","licenseText":"MIT License\n\nCopyright (c) 2018 Karim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-saga-modal@0.4.2","dist":{"shasum":"dd1d4394229368e04ae26697f10194a7f2e349e1","integrity":"sha512-7rcfho/2DNKdHBz+AmM4PKpZXb3xEzCXvnJHuddHsGMeG6FPlFFarEjTa5GZ4AuF59uOYW8cLOZTe/yhDafzfQ==","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.2.tgz","fileCount":8,"unpackedSize":29002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7TojCRA9TVsSAnZWagAAv/oP/ihvH8tN7AROusoV+RZF\n9c9oz0J7E2eS5fjiXbG+NiSEgkG86VlSuiWybVQJw8X9PntCd0AMZsJqCXYC\nH/R3CJxfuPVRVBoeU6cHbouUcbHeGybhB/q7eGTAioGmxMmhFqU9rYyJtJv+\nBv/szwZIBYdfAjXFH9dbUYCVFoiY3fihOWRpmXifUNUnkTEdsqropWk3MnkL\n2APKe5XpCuIxHNqjkYtDsUrgca9pNs5KKvzAbcAMrli3gAU+ZmLuuPmkk7TM\nGtCbmayDWDn3Y+/d5jilV0JKr9H/f/F8MDAIhsHYmM/zI/lA34n/muhZqN39\niCE1uvKCXIf5iL62Lfkjb+L0K+4/ZESyVE7rBt31uWybfoIxLQKAwxPh7dqn\ns0bKAWpsz5m93G7X0v/0XmHNO2nz6UblP0PpJBzet0ScBoFYLb6aHLWnLXDb\n4aRK0rGI0bJxf7Degxmy513ksO+jlv7PQ+4RFaZhr/zB+Nz6cl3E1BXpXTOo\nwxldV5KNDKD4UZJ9jSZZQn0HUzhfgm+6ZnBvPDOrxot+G8ek+BpsSuLIGoxL\nvq5rzYbgR+YQ1/W1SIXjSAR2XVDZo7SCf5wIkEHJpQJyQpLax/YQLeKs+LWb\nClpOowGa/V0340SnzMwhb17K7Pg8Z2L0FOXgrCNeMgU0Iuv+PGOz/uikhoOB\nVBIA\r\n=Rdmo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/2zjTZocBRqay9ttPjmnWfZC33Fta4escX1EDyEYeCAiBopQndy64F3VB7DlVymWQ3eY3j6y8tj5i5EEBsx+dXvA=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.2_1559050786370_0.19054916856341797"},"_hasShrinkwrap":false},"0.4.3":{"name":"redux-saga-modal","version":"0.4.3","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all clean -p build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"yarn run clean","prepublishOnly":"yarn run build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"https://github.com/KarimAziev/redux-saga-modal"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","licenseText":"MIT License\n\nCopyright (c) 2018 Karim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-saga-modal@0.4.3","dist":{"shasum":"8ecf2300427888e9ce211d1864e96da9480c28c5","integrity":"sha512-+p0VmXxcI0fPj4TpqLTtRAfxGGkKyAMOKYu4bNiNsVjLIsu1YEEebYEEh131X7uikOLNiBQ697C/zPH9Xttm2A==","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.3.tgz","fileCount":8,"unpackedSize":29002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7TsFCRA9TVsSAnZWagAAiMAP/R2zcjRNUgCxOyPhRJjZ\nqxXvuo6a4oSKfcu3vmjFMN2obHsotT2X0Z4qvZEYSH1alD6r/IjYUraA8GGy\ndMkrfiZrT1SCdE+ayvB0ih4sqwurYUEYNpcFyIDUDtg+cNFouBGKHiXMh9dN\n2DxkMwtH8PaAyi4oSMLDSeLmTGQ1uoMliOuBBpj2DRkspjhtnJKxsyMSCszx\nvP9iWaLlw5ln9c2f7drV1swSAaQ4w8xufC5OF/bhhkDqEUin1otLuGOh/aH5\n4KbdrxcCbXH4UhuTLV56KR2r6/qvXB9GWJlIeZhNOXyZy2iCFVJVMhb+p3eZ\nAsvNmZJhPGgHHzkhJwDoPNBdF26VeEN7WGIPaDYjDPIovv4CuATVA7lONrxe\neO39tbAPNvsvwzyijSVmBdd74vKGVfwynj8x31hrwIY2GTwRAorFQviahNSy\nHtxfI9fC2OW8NmKUZ2v3asdmjdTjedTJGmCyJVkojg+DJtdZRGZ61LzQAzmQ\nY5YeM3fyK5tUulQquIm4YJozMayn8hA1pBa9SCWM25F6B/DVnlkEZU8C1+I5\nKGOhw/k7Weo/5hod3sn8xG1/RIXpgS8UoSO30RFRYCVxgTmYQFLhP2FdLL2B\nAMillzdJTg+T1qUu/A1QixEQDyiKSqNvzlreUtuZxZWGdWTNVCfF12segNcL\nnT/p\r\n=la9C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEONQ2W7yijJPNbhv/otV5nzb86oDaa87y2V11DI1tTAiBONY9XXsw3BkVLjVkmSmCl+Xn1WDWvJn6JF9KikmDkNA=="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.3_1559051013286_0.0372829824877805"},"_hasShrinkwrap":false},"0.4.6":{"name":"redux-saga-modal","version":"0.4.6","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all clean -p build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"yarn run clean","prepublishOnly":"yarn run build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"https://github.com/KarimAziev/redux-saga-modal"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","licenseText":"MIT License\n\nCopyright (c) 2018 Karim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"redux-saga-modal@0.4.6","dist":{"shasum":"0796e3480760fe7fcba1f593fc65c2dbcba06c86","integrity":"sha512-zmkDa+XqpSXkooYGQ8ldn25q9m+zNKLxjya2d/FjqChYt5podF2uiqJm5MjC+hhK7T51h06ODwgu0+uU4ExdkA==","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.6.tgz","fileCount":8,"unpackedSize":28986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7T4gCRA9TVsSAnZWagAABDIP+gKYZbUx2Bv9NhZTOuKk\n2G0Tjldn8iZA/oM1pm0et2/1q2v6z3pNnMaC8nar5nm/a0QTuS33Ujlr2d8I\nWhHNXUc+H9p36MxkNfqrDSwFI0Kl3J2325IHqhrcoQzdwCArA3E0CxoiNJvg\nwKA7V1U19XXVybM9K3M96YA65nI8oIMKgLajylLkSiK4MLy1bQ1fmI2saNqd\nKEmL7p8VgGJ7iIiFB1rLMHYig0eHv0KAajpinkz8pllM5FgX1FN3QnVK57+3\npdvOJh0i/3hBcR4KDnedrjs/yORZs2PQbHySe1p9KL2FcchxQbSL4YpWlpsA\n53pX2FNLoawfvSNwQ99X3t7a73ND7LhjnieHLe/dCH3vSC4+aWXJu3SWSV1I\n2sixXNGzANjRJrw8qJZx4P2/I7xwwgXQKyJGP7hfAZwQ2Rcizs1dimHRiuQu\njuPQ0yrZOpcAqTeaALy5N1PfZ2TpHrc6cfa+zW0AsO0fQ6Dso/4iOw1YGVFR\nN/UQnS1RYywYjTzdSvkdRmHkpn9T6gOO7httOPbKHZmcd/jeRB7jVr88hfP6\nE6kwgu1YFZsTfeAHhp1i+d+ly+8nvFzdxOvDXol84AaS05EYnN8dGADT5QWM\na0F60omb22WhIE3VCQKTrSIGMTefP9IK8xoFJbMipBtEoAgd67L/OwXlhCq3\nhnEF\r\n=yXNb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmiKvztYXjxxjmS4cYIzpxwgLyBsKOFSoiEMYaqfi0dwIhAOhDd0S3MKeP1DoWXZWnkRtSH1Wcmw5uaYedke/1met1"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.6_1559051808010_0.5513880667119238"},"_hasShrinkwrap":false},"0.4.7":{"name":"redux-saga-modal","version":"0.4.7","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"e93038fe6b0fdb45e7e8c4ceb725103042af7712","_id":"redux-saga-modal@0.4.7","_nodeVersion":"11.10.1","_npmVersion":"6.7.0","dist":{"integrity":"sha512-eGcmZjY+I+CMXER7ULxqiVzvL29lCPuqZYEv8WOWu1KupRNc+g3FksPkUaxecHlwv3Kd4CXk2n8Nzo4IMbqJBg==","shasum":"f7b85682a275ce9f07b41c8a7f0c97c2d891fad3","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.7.tgz","fileCount":4,"unpackedSize":25382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7Wa8CRA9TVsSAnZWagAAUEUP/jKsm+OQKPVavlvtzAfA\neq6nKybhybGkIhGJXdpwNY2pwdA/UBX7rhD5RJzih3sRoKH0UykBv3pjLRxu\nQK4CRQDjAACL8XleMoiyXfUrNmKrfri2sNC5g5bZdl9Gthak0uvTYMwsWaPW\n0aNkKsUUYjCdSeotwsMr9zjYX1kTavqqx/7f2QpzWscOMB5NgYfyxMhromKT\nuE4Til77skfAYXPtOR6mrX1yhLq1hQF8fY2bHXMGOQmMXgchQvMF2JlKI8Nf\n3h6QQDezw8ZTN+BZuKnuc9oQfZcNDO0rEEUY+ekwAF/0q28KyZOotta35efd\nVMec9DnRQFNkCy8iMdZXq3b70/bW+sqp+rAQDoQIl6P3WeyWCTSNVDXvWZZ1\nudFdVPnTVRuZ/1ZDU2oCXCp9yz1qb8LsLWxVdkrlkwK990PAyOWie3GjXZtp\n3kHe5sXQBXQctrY5fJAf/WaHo3HTMgBzjFkp3WaBdhU+XnZ/RDcIKU3O9AWm\nZBDg07mafvZz6SE/vjytnN63X3mHntZXQd/J1hdWTLEg/PCyoBbfGiG2BTxK\n984U506rFCTH9OcBfNRa8p6mbDq5Tgi/znqVZC8yVGSph9G5mWu0GuAOFGlB\njgFCJT9JdATArt6jreAtwqsV1WxiMbdGcJXduKUKFN8AFh84kPxifID6GVGR\ndd0H\r\n=HLDa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEiP7XZXWr9jVOGpxsKGk4Ko5UwlBdXmSJrwdaK32ylAiEAmTtSCa24LV0AbwqzGXYugzpIFAzM6nKZsA7yL1ua4Fg="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.7_1559062204056_0.028054484624188136"},"_hasShrinkwrap":false},"0.4.8":{"name":"redux-saga-modal","version":"0.4.8","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"df54097f96fcf663efff93aec7f52dbb22b091ea","_id":"redux-saga-modal@0.4.8","_nodeVersion":"11.10.1","_npmVersion":"6.7.0","dist":{"integrity":"sha512-todSEczK5FpyeYlpgAh0xz2pexskgBPzKmxYgPTeKBhSewDMhC3PxS/WYVvCnL+lTxuD89dRYnwl7u2dglDJxA==","shasum":"d8477533949da9b5b4b77ec82041d6ca64a405fd","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.8.tgz","fileCount":4,"unpackedSize":29236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8XDwCRA9TVsSAnZWagAAxY8P/iEK1Z8Mzd/meJKtKhEw\nTA2RRXp4LmtVG5xoXAwf12wpk7CsV4cjOXbYSfhLC2YwuXvV15gMMcN886zC\nMdIuvJGy4v7yK/udWhhOVK2HKTuuNCWnVXX2QP5Z7Yt2pnrbFCm4yRECWB7U\nECUuY2nA0PfmkSVIRmCXHCNJ7eWXPqE4rPQnTR6L3Y/mmAJUSO0j/FyazHrG\nPV1FnoPj3ff+QcbuwKZDUNSvDsW0mVVYJNA944zD6XkoRSWMC8Ef3GF0Os4y\nSH5BmLwM+Y1ARn2psr1teAcWX28vd9mEeiSi3qP1OO4RTr7SFP7kUASruViz\nRMm7moxxD7XAxnEJLO9rNDHMhATcPodf71ehDqFOhb9+mKFeOcTW/6x9c1s6\nUMxo9QGkvR9CoQa+ONLZssNOvCGBX9gsvehTye6ZC5icZAKII8Z0R9dXLVip\nEtgchIGyFEvUk1AcZ9r/OiP9BNBvQKCtgBL1F0a0gpXo6Je5WT/Frs6dunGt\nj3IZuU4RAvriFfb/QYge7xRdDH75o5GYx9JkcnDWGabKwYF/7OdlxyCVbvVF\ny5TYmihdQ9povOr8sizwLBGr83SLTevRbtvJOxPa+J3pUtWvHFmd6fjmuraE\nF/xpJsPeaERpCViTazSjYMpKFWrOY4i8dm8fkSkCt6Nx3ulV2FaT1XEqWYSR\nomJb\r\n=K9ut\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDomZOaviBcLfyygRXcb2mGqTcbhIx1RITYCtE2vOPBHQIhAN62JKlPIzm0MQlXypzh3tGpDriJO5BBmvNf3fWZ3MYK"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.8_1559326959511_0.9519538517193822"},"_hasShrinkwrap":false},"0.4.9":{"name":"redux-saga-modal","version":"0.4.9","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"f190789d2a3cd61728b27869eccc7ebc862e4e3f","_id":"redux-saga-modal@0.4.9","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-DwFDsv438hXt+hvQ9s1yMG71RZ8njy402rT40JQ014JMDjBEgH5r9lJwzw+5JeoKj9eO2E6YVJS1VOY/S829/g==","shasum":"73d2e1a43186f1734b9c722d3525781bc07a1760","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.9.tgz","fileCount":4,"unpackedSize":29316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9AcHCRA9TVsSAnZWagAAv9EQAJOxApAsRx1+5yhRJJ8X\nScHxOFGzZolX7HRNd9gHmTtUGBgQwMGAfaxXduyg2yYR9S1IXuTM+IFA1WE/\nxc4ClryUJ9TlftP0QtG2dap9dQJxuGMBEs7sWkeP5F5R7xdxSfgwMpEv9frA\na2wKeJdJ7vratvgmytz1PDQEkWlTGiWZdXhUi83NR1swLoe/zDYftzXeSIDj\ngfEY/CB4Pco8uWA+tJbflDl9fj7qZqRSFqB+ikRuKRAYZi1YruqjmbmzOBuy\nPju9rOMQPlzpUacDacDl1cetacMul9o1bxdAWUoMtfgO4Ymq6JsyiMorE6pm\n3rBQqAZOw/emgUFXAv5nY+ZOYpd0jkZkidUVV5nfWkS3uwMG4xrrOg+5jbNh\nvxTT/vF6nIzUnm5aZ7/v/2bukIiuagYhvIedKauMnwmfHIvZ5oHju9Pb9zv3\ns7PINxZxhFdhj3zg8rJydf3KyFzKrEyacWz8R9qdWj9Q9KQwi/IHeHg431ix\nAMNOmjuN4qjkM7AhXLw2BoV/Mv+bWKFxycNDsVCWmfWUBDLzgGVMA6Tcx4ku\nZ0PxnMOgUtDrX4CNr0b6jq+KBkXHQWS9vXsFfSysrTtpuZINKzIYRnHCbMnq\n2E+NbEwAK+Sz9aooM2qHN8MAj6havH/5LvgzAcNT/K2T10vbxvyjtT8vP3as\nMaxh\r\n=rT9Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSofxDWLS2bsDOpLj5fmxrxCfRMkDyVjEDOwfSPZDLGAIgWHstCtMK2/V2eHCpmMLwOoRPD2LvZNgBJfsjIoDdHoc="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.9_1559496453871_0.5655070837825837"},"_hasShrinkwrap":false},"0.4.10":{"name":"redux-saga-modal","version":"0.4.10","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"b9a0c7469915b26aa294dabe7a9837f6fa0415bb","_id":"redux-saga-modal@0.4.10","_nodeVersion":"11.10.1","_npmVersion":"6.7.0","dist":{"integrity":"sha512-QpAhfEUTeUUaHzJUURpcng2NQMLOZtUd9qB2g5S4xtowtssldqLWRtVp9V9FoOBEy0mMuh565RosPj1pjaLeEQ==","shasum":"0537e328ae1d7d3ba8d0d8cfe193ca3543ebe119","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.10.tgz","fileCount":4,"unpackedSize":34674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+Ap3CRA9TVsSAnZWagAAuQcP/3UOM+pHkhg7x7l1X548\naUwwN7sguYqIEkvoi3FZdRH2+mrh8xpveyTEo530u2XVZKltjvAv7wlv5bP/\njvq4fEERyUgJzss9Za0pmNwF3oJ7ZLE3yPlmcSl2HPPUapEWdjVOfpJyxY9b\ntSnoSHQPElYnqFs8sQTmNftC4ugHY+9sNh4566da3cNwaq9PNk08TsbisMTO\nGfD04ZAw+XlZ5pJkz9P6tO0aZwVjloUwQFkVOdxSZa9WJGaEjujRVjtPVJOh\nAAx7F2urEpG37Y5MFZBMzXl6tOIeSyDyB3Hxe9o/gizXtt9zyp2VUKm+H11m\n4AKE6Ra7lns0/nfqeHR2+6g/2bBpAcw0KdSCyBlfYAkIAXnBkl+yXTyT2uql\nICy0batCauwYkyVpusswyxkYuN6zj/riGYuEYRYU/AmNjTVtwh+8E/50ow4+\n8B9cUHq6kHWOMBe9DJ7fhWTGQ6wfatS6ZVMve+mW1SKxZ7ieSL15g8yOp+8Z\nJXvPl1a2XRam44Zx6iarIg2gaWEurcdtumXluCYtRSP6+O3HXItuR1FZm4U2\nFLBSoiQWcqq3a5kQUIpJDzLzqmz0ERiS4SWIncIYw+iupFl6eVDEHpMs9XYX\nF8SRtWim6xV37ksO3tTUgVxN6FZmOcta0SnhoYF+gqvEGOaEYAQd9DWt8yDH\nhSll\r\n=HVdC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFk2oYcdYPo2kwq5FBQ5VMvEGB2CCXE+j5cZHm1BQlPQIgOJzzuNbx7SccdDxV6bu8XHcvLhwxmgWqxmqgyfnf7sI="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.10_1559759478718_0.12805824105059727"},"_hasShrinkwrap":false},"0.4.11":{"name":"redux-saga-modal","version":"0.4.11","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"9b79871a733fe74e2cff4c4131a01f020b4f57e7","_id":"redux-saga-modal@0.4.11","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-Ij2lRosaQTgJUcy153qzYh5giBTMmIukmupaTIu9DiHL7kI3TriKB9iyrW5QWZmWyZbSWPLoSdCh25tIeXg/aw==","shasum":"f356b6b988def06952eca4b0edd02da47ab1b10b","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.11.tgz","fileCount":4,"unpackedSize":34620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+UKZCRA9TVsSAnZWagAAgdoP+wZBmsRaTLgrnvQWfPNH\nqiM2HlQs2DAv9Mt6ytv3yEfha3ETjBlQFTElP8AHHhvzGnIZTnRg0EMT4BQH\nl48IN6mFbzpZn5qLIsQjrd0HXARAZY3mnja+HC7GNx/llPNF/kMyXlUgCcrv\n9IQuSeyz+aBcsFmxNOWPGuj8GDStwIUTAqZQPAZHjn4RIyHEvSvoPK9mRKaJ\nUHPziwL/w/c8cHp8zTdy26JJaEoseJu1r9BqbTo0wSyM/oDzzN5rGbZ9TQES\nvBjqSorapMPVcPHIawIFBk++r8/Daqnw68L9cLTJndKx4VVRnw3mrxBiS3OB\nTAAmjxrAcCIlXI3uPQLpikLEglQQZjSoKlHtaQJUQ398cORael37Sa2ry2gh\n3ePjYo6NbDmN5drM6nuF7oKfqQQN1rIY7l+a7pqQmjRwo6lKHMs4tWt4J9jH\nZ6ZJRf/RUzwTTOlEJztbBK9yaFPPl7gOtk4B3OEN0yDJFLnZLiuFnZdFeOyZ\nj+Xms6DadJ2rAR3rqLwZvHjRHF9lZSGQOyq/PA1f6qvQHc/zhQ39O0Q2vM1Y\njgHWI+TJkx8FDfYi6kxUylBixeqaAT/w5DgsOIibdJODOXK8jNgN7p52S9ue\n1k+KhzUb5iNxoSWu94V0nFnwvsRdP9jJgwfIk2+RrlTofs4aI/NfUwN2X4jh\nQh/6\r\n=EuXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDg40RzeTL+8htV2or3O/adh36iZWOCKjdgNMq3RMZ2gIhAPHrjiYhByUmVw9PJ1l2njnSb9eZ0mmhqCwtxlqM11bi"}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.11_1559839384313_0.05814131834710934"},"_hasShrinkwrap":false},"0.4.12":{"name":"redux-saga-modal","version":"0.4.12","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.2.1","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"ade35a2d2bd5e093321e0f96bc281a99dd7873ed","_id":"redux-saga-modal@0.4.12","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"dist":{"integrity":"sha512-zxRccE+6pxvQElCs3pWJJg/VEruNMAEbjM9NUgP+Cycwa0UZWvcuImbQsZ40Dajoy+yijjKvXhOIlfDs6FN4GQ==","shasum":"9be3d3cc567e557380671375693ddd2f63e22501","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.12.tgz","fileCount":4,"unpackedSize":34779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCRtECRA9TVsSAnZWagAAldYP/RnBqyJlKxv6yVutmuZD\nCGqIVQjFilYPaAhcnmVIF/+LtWY1XTvTtpoiJ/W/bAUTSR/p5UNFpRKGgAJX\nz5icOrrXOgddcny79YamPdo4ewfxsVlW8njDNnigurA0fCzOZYOeT8l6DCee\nvjy/0DMW4PpcWx3mW2I5T+/LX50imtJqr/J96tN34ZAUcZP6hzyplgshNdje\nj39n5W5gjKiF5F6RyRo8y0Z4hzWYj44461RiMUVq1jT4/44Hdy45X7btdNxo\nlk3E0EbBsZQpW1qU2qjx9uO7nyp1T4QFco2wg9n/mTh6gQAA2y5TtyRDR4bg\nl+Usms2pfEHJPn9mH9wmRtuB7bj54VutBfmo/Crd1B40UWQ8eKXHd7Xd63lR\nt6RUviqPVeTqY5vJLaT6PHuMh0MeGDyJDeHQ+uc47FOClNcupxGxhJ51g3Yn\ntXAF/cW6Rh8PO+84XgDEw4t4erVjG8Mkx8enjQzTHcX8HmpgMqmo2ATLc9uM\n6SoDI7ne6Wa1EhJpogTKiI7MhNWIpJpZDs8GtMtu1uzPUSpLdX8mruUNebMr\nZPtIZvfMAluqLg4zxp429Hrr3NUOW2Hje+jChkTQCpcexSSimiQCb8vPMst1\nDm4cCaLMv0KsaO7PcIut87mK90V6caHo6vD5htcoK3XEhwu6IDa5a48pA+5B\nhYXp\r\n=PrBT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTdqDeQVBnn4Hoyqv0upLEDrQCbo2GJIaOrQ6g3GF0vAIgFUrD0FH9gNkaqgqcQGrUhp/IeMl94KTW0hC126CuQbY="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.12_1560877891981_0.5439223632217391"},"_hasShrinkwrap":false},"0.4.13":{"name":"redux-saga-modal","version":"0.4.13","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.3.6","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"c17d8a179b536de8e02b35444863b5a0a7514e4b","_id":"redux-saga-modal@0.4.13","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-oiZUdDBXE4q4lh5LppnYR+jpgAu40Jcqx6OLIujQQ4oNPJNBk/jvbWl5QFmJuRR7KjWETgasQcGoFb463BLlUg==","shasum":"e7bf61b68a7996755bc868f423d1b17b17977a3d","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.13.tgz","fileCount":4,"unpackedSize":34789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeluzCRA9TVsSAnZWagAAy7MQAI2lVKLXGN5aptoJtA4k\nXpRkbVaK0kNjetNbFe+0Bb4zQ5KedKsXwOX7CB/tSjwqrGbO3/4AeCdzbjTi\ny98nXO3oM5LOHjqkjdFAFmuEwBwELrS6cuUPYJJNTp3d5fbOvlX3zTNzBp4V\nGI4XhHYZlDbipx8wgGgliQ9MFAETIZiQVLROHSwAnCP9sMV3FYS318+fuOvM\nejDNOqgxVjY2V/22tZczJeUe/UbSaX2Zeew+Va52rjc+dgXwPqCmEyEuTTF8\nvBjaIg3h4OjKhpGAPDdgbzS6i/zNU/oW3ZLiJ6JkwZpfK+O5yPFw7EoRqmUJ\nUJwPV+6mjRXaEHXeFWX6xPryh3Uo76t3t8dnTy/OhKvnOZrdr+XUvg885s2D\nuBRiVuHRsdWRcb0Vyy7JsKs8cO+0Zhj0L3MmenasAXchgM7baHmK1ZESBY5V\nct7jzc/yAHLtzRX4PZa1lMKoX7mFmsrGGz1IyyyXWhaUzOn/yLUqJPsPyHmR\nndCed2h1C5XZI26tUTamvV0a2ZIcXGN9Y/7VMNOlicuLeAottp2t/00RR1jf\nigljQRozCrhCDfK9xrdxVUbVVQaj7ntkqhNpm0+AorInkPY/DM7E6wUz9d7X\noBKw5a+tgyVvPsOQhma2tvIGBbOOSJJVdFYuaXo/UZFiwhVz696FNAqH/X/c\nl8Ea\r\n=kQZ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHD/z9LFB3z78T6AC3enx0tOJ1Qj6DKNEfc+MV5vm7OjAiEArmDLTtnpTmW36uIy/vV/KIgUzTwt6qEUE/sHtnGjJNM="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.13_1568299954322_0.7318666911320608"},"_hasShrinkwrap":false},"0.14.0":{"name":"redux-saga-modal","version":"0.14.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.3.6","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"f0f4a9c4d9e04a2d62f7d8fbc7c3b0f7febfb063","_id":"redux-saga-modal@0.14.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-nq8VeR3k7Zdy9tDosoz0zQyMzTp5AmUsk8XAFNf0adfVmyPT6BaZ84d5ogpc74tV+0FBuQ4hoLCV+OBlsQe8hw==","shasum":"6c3eca7b18964066ab134a990cc057ddb08b56c1","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.14.0.tgz","fileCount":4,"unpackedSize":34739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdemQcCRA9TVsSAnZWagAA4aMP/RVrMq8GKAENAeSFNVH0\nf4843oLIhfREUvuD4mf4ZUPNLoQtnB7VkBWv61LimAHgy6ASB4Y/aV5VWOhE\nkd/hB/8vstxBP71XIpvN/EiFTwZkfrOQLVmZTme1zdL3cY8LJ84MdepIYnMO\n5WYD668iG8mfo3F8n5wi6DklEJTIHNwLprZvrCmLbq2+Xb43cSxFQstwJJwK\n4/LDGZs3TGChlfXFlxk6QiohcSPXR0pTOWpsymYpsrontmie6XlamocAnVNK\nBkulliRNAXR81FslFIx+Gs/ekrtxhl0E/eoa4te721SQdxYQ08ctrikr0xA2\nFWbnNbCGipY9viMJylV68BMD6wNp3zCdfUlAYc6/KoEblm1PtpV4FZedpqEl\nCyZyDR+fKgU6fFWM3YQj+OkdZpVwehDprrPnjI18bozwsAEewKijjujshD7M\nfZ0Sybgg2ynnrhQ585EVnQraeRMNBq0Cbqm3pSM3I6QQt6rMLwqBkkajszTv\nsQgHiKM7aRyMBmIf3OCA/VPfMDxjG5NMrLf+r/jK1IWkRANjV67/IzIxtwQv\nfdDRedQsUsOeiYD0BOp8BscZIR85xgwKRx+bEjPqUjZ6Gl8rGT/HF0jCwUHZ\nzRRKXgsl8ntmI6Gas+40Hh2f1tmKdV/W3sBARXepD0QBXVEQRXeyOrkrZg0K\nmTvv\r\n=owJR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIsHSlnCJha/iUQ2AN4D+IlxCLaWth05ODC320sfb4ZQIgQTQWvH6SZRgUFf6IGLAJgQf6t6uj3Z8hzmgr8TKa6cg="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.14.0_1568302107194_0.6148987645082815"},"_hasShrinkwrap":false},"0.4.15":{"name":"redux-saga-modal","version":"0.4.15","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","scripts":{"clean":"rimraf lib","flow":"flow","format":"prettier-eslint --write \"src/**/*.js\"","build":"npm-run-all -s clean build:prod","build:dev":"webpack --watch --mode=production","build:prod":"webpack --mode=production","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --verbose --github.release","start":"npm-run-all clean -p build:dev"},"lint-staged":{"*.js":["prettier-eslint --write","git add"]},"keywords":["redux-saga","modal","redux"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@redux-saga/testing-utils":"^1.0.2","babel-eslint":"9.0.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","chai":"^4.2.0","cross-env":"^5.2.0","eslint":"5.12.0","eslint-config-fbjs":"^3.1.0","eslint-config-prettier":"^4.0.0","eslint-config-react-app":"^4.0.0","eslint-loader":"^2.1.2","eslint-plugin-babel":"^5.3.0","eslint-plugin-flowtype":"^3.6.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^3.0.1","eslint-plugin-react":"^7.12.4","flow-bin":"^0.91.0","invariant":"^2.2.4","lint-staged":"^7.2.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","prettier":"^1.16.4","prettier-eslint-cli":"^4.7.1","react":"^16.8.6","react-redux":"^7.0.3","redux":"^3.7.2","redux-saga":">=0.15.0","release-it":"^12.3.6","rimraf":"^2.6.2","sinon":"^7.3.2","webpack":"^4.29.0","webpack-cli":"^3.2.3"},"dependencies":{"@redux-saga/is":"^1.0.2","hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"f0f4a9c4d9e04a2d62f7d8fbc7c3b0f7febfb063","_id":"redux-saga-modal@0.4.15","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-uml/y1cANHslESqg5Qfxdi0EbJGykcAxBrHYm5KV5bVNcUPxNu9bpviKGQcHtM3u5xh97u0DWbgFKcAb6b1geg==","shasum":"f9210aebab7133a3cd3cefee4c70863b30a702ee","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-0.4.15.tgz","fileCount":4,"unpackedSize":34739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdemnUCRA9TVsSAnZWagAAt10QAIuA4Y/VXMmiyrao97uu\nKut8pFER8ZzXXJ/gITuLNTR7vt4Y/nx8GC/VFpN1nxTkCDhx5iuLtdUiJQ8D\nIfV/m33a5yx5RONTHIeV+A8G+ZN+6jsdF6ZyovUJssIvI1uWje6JqHStNHI9\nENTx2+ZMAd239Iy0W2ii+nxeQvmzLZ+cYa3VZ17ShuTNo/Oxcdg3+myRtUqY\nGRxUPmWncl/6aa3721JJu9536yZxNUKXslY5cWV/bPd1RAVzxfDpCQK+irzq\n1U2gSb9a1LTbe4IqakWU//TtOHOt/faW6ciClGpLapRPZjgWl+pWBtU3lgG3\nPegcnk/Hni5jmur3ec3YwLE3jF//uF7M+rO2u6sogWdTQ2nrEPUsuv0uJ+do\nvueoVnIHxY3srcIefHNpB7rj9yhE3DDDh9KU+ZW1iqQ8ijk2ono7AEX0EB6A\nl7FXdO0Wr10KWLv8KAT6hcVt/nnemFd2uhVcOk0yq+lQj236p841yvMTcR3F\nL+W18tNxw2JfVkJYhU3ug4KMNkdm2gH4PcfuQ3T2gYNKneAhcbTeVCwtQzey\nPkXDsp9ufTydwkJ6C5GG2Nxx52w+k3RifedEM9W4naPs6clruxUDtm9MP+ca\nj3WoijSUnQjk9lxrYt1jv61YROUBvHQVsLLgQa9mBWwOPfXFJXrvXKvNxMha\nU8Js\r\n=fYTi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCn5RJEJbFIdv8Wx/MzkDufOHSlTGVKBR6zXbvVuUGeIQIgUnQ7nP9qgaCYbOhI4yBrqYhJFJ4cyTpVsV593v+mo5Q="}]},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_0.4.15_1568303571876_0.13307537013836757"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"redux-saga-modal","version":"1.0.0-beta.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it major --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"59375468374473677bb0531d6afc05500b4dc2ef","_id":"redux-saga-modal@1.0.0-beta.0","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-8HGK1UY20mNRQGCBH8/6CezTIqkegEXXXxSyWeLj2PgBMVdE8dhCI7/XJSY/p4S0HVal60CLKm82vkEHvlGVJA==","shasum":"e2fe7e3d02cb2aa59ad50d2aa1e8379fa080e751","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.0.tgz","fileCount":17,"unpackedSize":52564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr5ZRCRA9TVsSAnZWagAAObYP/0VPYw+VcZPNsB4u915c\nKwB71vtReJszCuMWGxoBEzqBiP+ofhFHj/ZnYK6x4ddJ30MLn9WgHrktwtjL\ndMzKMnAPkjQpfCV/zKikCc1beEpEyQpGnQBG1qJUKj4Ik4bR+KUe37yMuN8z\nWzxg59h5ey6UpeJ7OrAWCWbnhKNO5zxLvkU3mGScaf+/qkZnawQ4CZ3hwu5a\nvTsF0sqx0LSE6tjUnvZ2Qg5FtKv+F5+CXLZDUD8a2avg9bcx/FUbziUWCcU8\n1dHeBOM2X/LxuMNNFc4tatF3BcF2JkWHi76sgzuX2ejMWFathyRVM4k0D6Le\nIaza1Yarf/fLLwwmUYg04krsCDEz1zTCVty0Ic2XUQypgQ96e7yey6c7LwYt\nGXXVeH/NDP9YNH7eh7whPpqK3qsjypQ5Q0Is6qTgnDXYWd2y3dBE1Zkugmvg\n/bBV60XcI8zQ833Y+l/Wj338cmCEiFxAFic7esUIOWVpo2/78W5qRG4GHeir\nO9RR93mUk1EMN/2T5O2IZSBv8U84Ckpj/qrANnXVYYGjZ9HJp9GD+6zUtlfI\n1a3Hqiz5qffThaG52hkvkhJxjsQ+D4632LnpBs7frV8myeb2nfOHBn7vSQf4\nOXpRpfB+CtVCNxSIBcHTJe2iy65sWAOyIhgg4lzIja0/k/bpv+bV7oSq0Hhm\nZD5M\r\n=UwNU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFGYbDeJDDC45GL3pipjRXUhaAWpk+A2/6pPfGOM++VAiBINM/srmXDAQr49JLFTjW1QoIRnw1o2mLrhxWgbS1Wow=="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.0_1622120017405_0.053797872125666224"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"redux-saga-modal","version":"1.0.0-beta.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"2568b84617409cec4bd55f9cfbb8d112375552c4","_id":"redux-saga-modal@1.0.0-beta.1","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-WWIjP8NtmhwXGuc0/99MzaCvRdVxwr2CdmFBoCCTRX/LLF+pvvjviQgNok6YicMERl6v77dEIox/pzJNmV1lNw==","shasum":"4450177c3248dbbedea01d0d0a6ae463eb672850","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.1.tgz","fileCount":16,"unpackedSize":51642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr6AmCRA9TVsSAnZWagAAf0UP/3+7Pnt/6xxkPFeSdsmy\nK8xV6dStNXndDS3UcLgbDo1RTIMYsItfZ0cLL/QgX2HIhaGGMJvjXk1ZfNGl\nx7x2V2yIims6c1ad/iTWJY2jjc9O0XRkMOGzt2t/44VIFmjTglMjUNZ0L/0I\n5t5h8smEvh4Ne7uZ2mnmKH42Bu/19QjvHI4RFLLrXDOK63XwU2pY2mzcP2pO\nINnfNA8DsH7L4fVNdaoYmtbOTZGkJJ8tq8Aci4252XBlK/Ck3f1LA7nfKuIG\n46h8bb28sb73nIJ5ghAz8tcGZ5VFQHZntVuUUlZzaVKvqmJn0ciADUFEg57R\nctP08nAkS/s65RIZRG2mfONRBFFjajKT27JRiNUQ1xrCeCcsCKv6RKC8UPjg\nQVQUz9nuKgICLhcRLvWvzPHd8tXhi1d4Y4TCAQJzFvHzmrqVqsMJxBCVUYTR\nw6/57++Py07SAFdwbRJVdhkkYc9JK2l5LUAKXkmUL+yVzdL+cc4j9l2V+HnA\nLNXNCWk9zV8TRnageOzPWNdW2QGSdN3DCvp077iRV2bSvUyUbe6pieIwIzeB\nkAitrWEEEui0c6wK6O43RClIb5kGJ00A1O1ecHu+2Jg/Tnonb1iTGv0K7bvF\nJHMf5Fcvia5o1EqtIyYJr+zF8JaX75OZJLeGSy6mxEem47PVIEEjppl+VQqZ\ns45O\r\n=5ZcS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGL2ekjJerUBb469IQ/N8XdnHjqRCjxBnpapFtO8jA0oAiEAnnVsDfPBnZa16ID4S5F6Sz+zbsAbURvUmHqyMhVvekk="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.1_1622122533708_0.04081500465771182"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"redux-saga-modal","version":"1.0.0-beta.2","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"5cc5deafb7289fd54a2832ecb79ec60824313bc7","_id":"redux-saga-modal@1.0.0-beta.2","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-+Ies9XOsp2w1WkAyAAktz7OPlsMB0oMrWKevQcbm+PFSAsVZl1nWXGgLl272NBhRk2sk8JI0iAKeM3dpyuMcMA==","shasum":"e6b039280d908172c41757588e78f45f9fbda263","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.2.tgz","fileCount":16,"unpackedSize":51071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr+dhCRA9TVsSAnZWagAA5NMP/Rjk76GSLXaBxQ6BwC8Y\n16H1hFzYZjNB5zTJcNziA6MT6LMr4E+ku8P/wj/HzzwNdOUVqFNUPFZWOWiK\n7dA3W+0issJMtRIicM7MzszIkg1QDWsP1xj1fRhwMFTwaVCtYMXItS30UnCH\nY6Y1LPQurBHv5T8CTS9USirvTPpMYq04b2W62mK+AxP8hlnWeEvw3Kk1HflU\nTBCuiRR2qHyKBx4iLEksrRWruTatEMCr7Vw+n8RKvg4/MNr2iijS/6lmz2Bp\noa0LQ0/oQTzypTuPsNNPyZHUtmcjmPMVAAgzWDGgy5VwlmC8f5btJ65j6daE\njeeAytp6WZpSMI+LXYxUa+MGzP5Pa4GNOZ3ODBooE9EVflkWD34+gAXuOCOw\naeRSuz9hzdFc7DnTSo74/oKxRPHYX5Njn+++PWBGufXqzSsn7sK8YqpUJl6S\nCQkQp/VNYPuepYZFkIsVkrwlJeAUr2OoDm+uZ6wnOmZrKIouFjVtYAURiVjr\nxNMvdCq+atLGcdnEDdka76C5fFDZy5JETPmv/HivF2/S9yCy09mRdpysY6ca\nTkxHTklagpWIYdCuYdxSY9hLbUUiyRpSDz4iGqEgY+dfYbFgWrngQWjkiFxH\nKn7byD4EH1aCxu+lG2Ivw85mVVaB1maw64ylZk1Y4XBdWX9Tkvjsp4bTLmN8\nL22f\r\n=YlUc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpgia/JfWo5yFHJQJ6hO+sGWT9R39r5HSTQOFWQfOULAiA7MdTTJ0kQ/wBmVlh3YMTi2661JBnPIHEHCE11RM/FYg=="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.2_1622140768983_0.06098387785381654"},"_hasShrinkwrap":false},"1.0.0-beta.3":{"name":"redux-saga-modal","version":"1.0.0-beta.3","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"b278de6457b3e8e8427d04ca8d45bb80cc1c49b4","_id":"redux-saga-modal@1.0.0-beta.3","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-SxhHCnGwUrOyQcjPWCVwaOLEAWuciTPH9eykQncPRQrx5rtGMwexeH7Fms39MXBv04W2OijK8AX373Zv5i+0Qg==","shasum":"e97388e05a45518e64f436c65b7fdaee96f00cce","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.3.tgz","fileCount":16,"unpackedSize":50855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr/GyCRA9TVsSAnZWagAAm94QAJsA+5M2TQwk/AqxhOD1\n1Lg5RAmCRr5H6PwmZ4aYe+fpbIo4SG7nqaqjBvOeFPywkHlxlbJaEZWCI4So\nSOg6ZKuaIpsGpGrJJOKvnCUyPHqXMHn/AzfT2dcQ+uN7gZDPBIO2YYtcgV16\nzWETWQQDcnsgguAgS9sZdo+ImXaezgFzihIn9eioysVk7TCy2jzVCtRMEdnB\n22AVlR4AI5EA1RjFYSpQ090O1jTNLOl7jOB1PFRtGnkuP3HOMEJltE9Kk/Pp\nAfXE95U/o+Sn+bbmPSAHbTMiqhqip6ZMTrAwZpPOQq6FteCrNHN9KIHcGjUJ\n1CAtmf+i7ZRSaX2WQ//knz5cGPJVJvF8NkpD/f94n0V5Xc3XecgUpM7zhbfj\na/RR/SEmcipS3hQB7KWGzEu8tj9Tb+WIbcKadfqA2uEC7sh9OaMyASTQ7EyY\nsWecDVv4/NgnwcGXxOMq+hmPprzeol+B1scfG3aLHWlw/7Rqco/nUazZL8Mu\nJWGFcbuKuJ04sBt99kztVje6nZ/OMdaPGx8b4CELwi2a7kC4WYPNVvKzJ5n8\n35Z769m2FiH6EFKjxjsRAI4KfbCLxuWLzZiRWBuwLQAZLFty/t+DV17Flis3\nLdO5QeNL3yJkiAL5SGEiPa2gFRmnMz1kQ+hvOriWXgP/xeDDissxfFO2AuJx\n+rxZ\r\n=WCIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDw5DKJ0d8fUP+MqmAYalDGPrXTHI+DIB71CoZUKI3s0gIgOXenRElPjecgx3dSYoPo3AvC6onPloF5D/+NhHAK9eo="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.3_1622143410158_0.45864807404702956"},"_hasShrinkwrap":false},"1.0.0-beta.4":{"name":"redux-saga-modal","version":"1.0.0-beta.4","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"d8452aeb587e723f886c9a8c5a2d9621b10439bf","_id":"redux-saga-modal@1.0.0-beta.4","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-05GqsrVV2wTZpE2ZDi2ZRnNlpHpYZENBCJDn0LFkLkiqtK48s5WeleekY248sZkmIV2k35dkrukNsv8wr6I4sQ==","shasum":"b02ade198538ca1909583e1f77bce968d9ebaf11","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.4.tgz","fileCount":16,"unpackedSize":51733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsLqUCRA9TVsSAnZWagAAfxEP/3xLKvSTWvLetwsb9Uhs\nLAIhN/cXNuU05/0ihpw5noexMWTRAqhFldXrtpSkpKGjXaQpuWj0BaaCwEhS\nTBjY+O+fc4NcK3/Rc91EIsEV7HGEAojDYlAuZ03CwBEIRQkZt+mcCi//LDwM\nVZscZcskmX5zx8Xnn/Fs5wVxxAxVNVT3KJ4hpJ4pVqNp6yqUR4rgEnSizfYQ\n8wrln49ppOzsbdFIvVE4LQXcJ6WpJDFDphTyolThSrWvTeiwtBb1DrMGbooa\neXriHpwhb1HQq09rfNwlM71J3xW6/3jWi/29kB8MyXARkl557Latufv+3Ipn\nXsTaI39z9tikiNWLx2YNzuRg/n9klnqlCQvWgHKDkD1YEVA/U5xBOvUuQYqR\nIChj0OcTVI2y89e1dJNa0ypYxzkHKVq/FqxP8VwDJkBe4nXa4f5wnTicvxYw\n+iCrKekefUXfk/DGh2CP+ppm0qHdShGi6kVR7jCEYaqjcoNpWmW4ju4NiDWT\nT2hAtn20O59OaIpbQOKjK/pBEcQHSjd62TlzQ3q0XmQtb51qfaKPJo31ghAs\nMpvZEIqOa9Up8gPoGQ6YeosK0kthtMkMisEl/OfBCgM8Ky7a737HhU1IOajO\nLxBG6HfpTU75ReC0Yd0VghMPTpgcwjWha/G/7w5v21AecGcjn/woOHwb/T+A\nEblr\r\n=hCC6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo1okhGOhvHzxtYdlpU04eDS83fH9joXYhYggW5EvS/wIgSIBYsnuy+zoHmQVORjf3E916fFDIQev5XZ55NnpApqg="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.4_1622194835617_0.41651346052471605"},"_hasShrinkwrap":false},"1.0.0-beta.5":{"name":"redux-saga-modal","version":"1.0.0-beta.5","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2","prop-types":"^15.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"60e170dead2215cebb6691d4b963f04f90b1a0e9","_id":"redux-saga-modal@1.0.0-beta.5","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-pzyXE0XUyBrW28M477NR2uIQbhOSRCc0Sr6kfqOfEW4Z5DMxAJ9q2WL3+gNk5R7R2xS+W1ic+KmLYTBIsxObQw==","shasum":"b3b732a0b9b07ce8319868b58f466c41c72e95ac","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.5.tgz","fileCount":16,"unpackedSize":51801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsMECCRA9TVsSAnZWagAAmp0P+wfqNlOEj8GsZwm3sPHL\nC7BFjYk7QprzfNOnEvhbkhcYb21xPc/4ngwsGP9v087BtbFbxGWc+JwzgB3Q\n2a/an3FNqXsuC5oU7tZgRAnUvBPYx9UyBp8EZbLt6+hOUVEtbXXm9KYShUpo\n1kaKQSISmlv0Mq5549PGAEADEPiX5iloimAxu0/ZOH1WA+On/LM3kD/5G5P0\nzLZcjlkeoBuXPh4RoJRrvsWj2ETky/7kA3ftGmQjY0FbXYAIytPg8ccyV6Fs\nwV5hqtjHanPHqnry6hb0D2nyHWEU4v0yh5nIUTxoMf98eTWGs3IGeMquBLMs\ncHoGFdYkJMJrs+fVHA5S2hBKh2CdWnVCrpLwrAF5Ya8h55HBG7UFXj880hxr\nNN/f25j/CeAW3AuSIwJsqG1A4HO2zvMXAaNET1wDrP9xl/Ry+4ttxsQsv3Uk\nC0htloCSGyQ6zD9gCT8o0Y9ce/R+6JJYUImyORTMltYkoHE9YLhNO+PSpwFx\nRBjv62suilSNwaA2GfufJMN35DaZ9A1GnE2JyQu8aadCGCZHigVi9R7rpHaZ\nCTKxiq+ymo+6wEeP9bEt0SVl6gJYOVnBhFxAsfnTaBTXy0xRFfqvayw+9a9k\nqmA1o48aWJ59BtFA5HYejm43jP8ZOVKH3nDKwb1JJQsn7bYSwjJg1tyHeTkp\ntPZ0\r\n=4qzu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHyUcntGTROBWqoYFPuRrmWorKeF+cM+/eShgh+iB+/wIhAKkTpCwZnuSBeX2eMSPdGCHM72O2v254ZJAX64Yg37Bw"}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.5_1622196481806_0.25944648921914815"},"_hasShrinkwrap":false},"1.0.0-beta.6":{"name":"redux-saga-modal","version":"1.0.0-beta.6","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"94e80fba88e646f23bbe06a97f8e3eeeb7baf01a","_id":"redux-saga-modal@1.0.0-beta.6","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-D3C1Q+zxU4GfCpJNugAMacVsLDhNabt+Qy+FqOO5KfebuRBvgN8lqCXzepHNIifWhVk4Z0iTvFzM4+1xOvj/oA==","shasum":"5e3f23bee199611791acea7d4a83c0189f811dfa","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.6.tgz","fileCount":16,"unpackedSize":51822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsMS1CRA9TVsSAnZWagAAtRIP/3jOW+NdLLG4iROVhN8Z\nKH8mGu+wNVZPlX5lWMt9xMC5Owyg70VdhXZ/3Ft/KjVCY0gyTBn+ZLPqeSAX\nqPYuMXajGWxcpRxpOxC+Dt2wdch1LCbbnfkQvV0gjxQXasfqTJfvfdaB2BHP\nPnSHTE6U76PpvD5q3ZhZemfeIQff3mDFb8xHfYxIlH8unDgBOBfmRBnTbCVi\nRMP/e7lm9LWbDDWwtzTE/8N2wE5EmGHsX0kzxmih9dpIBtzYzchlLZdHpX9G\nqRZ+ze1z8nOr7zZ26CTmzYMd6Xcu4f5zUDMDj7lTl73jToj6VdmAr+Cqjtrj\n9tjzWymesmGz2ADHu6dxvrKriEFkim3SGvNXKAeTCOF9XDTYYwR+ukaiTxKy\nQd7yPTQKkh9KNhhNgZtQof+XpUaHoEnSkbmMm7ipYd0gV+DV9ihFRM9nAjYe\nQ+XfGatj6H7YFecy0r5XOxenWY+lyO9mv1+cTOuC0YDkdl/6LjZXpDwLlYx7\no0BNIeGFB5x7SgrEdLWfYtQ5KxDbPetRW2xDXOBDjZozATrFYDVKuJCok7WO\nqstr+sZbVlEY6gBhBCzmrWDEnwYZpVW3T+KeIn0d6lFRVNYo+uSzRIhei6G8\ngrloxAuSRTtz1AdVqudnuxFJMC6pV+LQMVGEfuzycclruCNDZsv8/vh5mple\nkvkX\r\n=T7zi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjKSpueoQ5FK9KkPerwOYYsR5s5CGQLOv4EKwoIgVIwAiEA4XHHsQKkpbMFLZyiyUYGkFUtkXEmZ+S7kwD0nMb/PFM="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.6_1622197429431_0.7586001645364373"},"_hasShrinkwrap":false},"1.0.0-beta.7":{"name":"redux-saga-modal","version":"1.0.0-beta.7","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^3.0.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"e10f7eac8c33aa59d3c83bb59be5d1580c526451","_id":"redux-saga-modal@1.0.0-beta.7","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-/18E0v8JSRRfgFJiffSZ8h5m5SyfcDGqJ7FKwqlUoUG1ndT8urb4RgF6xb5vrEA78tHwQ4hJd8sMiqUi/CeiIA==","shasum":"24c17443a3633063390348379c9c6e65f36458b4","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.7.tgz","fileCount":16,"unpackedSize":51837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsMZCCRA9TVsSAnZWagAADioQAJFdv8BGgIuum5If4Z4G\nIOUrUWLtVuAjALu4Bu0qn29uug4jFg63Bjd2r7TUOS6+CCDqn6VUl0aM50cj\nRrC4bPV6oFZgTojoNvB1waJ41J0lW++jBGlkd2bCJ+QpKuUj445EiTtq474Y\nqFE29y2up2tDHhwDP6jARBDORk4QJbnIAgduEYy4lBRVezJzjTrjvACmtZov\ndyomeWVk/ZDXsKbCBObdi4CLpX3ycJLJ2WEVosO+GksKXQKoSpAaqOYxi3Pl\nN5RqHUOUHymeUjrXJXFj62HRmLIJNGtTfj7u4EqdNeqZkIPohZHlI6YGSMX9\nvhYKTrbOnfHE4c/hA1tMGEfWwWxlA0mX9HJLabhMWfVy9/VgAsUKDol9RLZ3\nMEIw4NyYJklBCHdAT0m0+s+sCSzKJNHDN47lWmN898Tf635Fc92l9q0k07TF\nNVKPha8kVvRLDvct3sKnNGFF8HAc3VRS4PiUWFetV3ERBxE4lD7rLoc2ZE25\nGOF7lMzQNAY7rBeA5+kzdaKRD1k88EiFgFdQuLtfIr4sSHLng6iYSjijzkVD\nKRmwCQNbFliVjG/1VvRCh4/IvKVqLtcwlZ8HkPzUzkU3WyxNjGOQr9LKzQAr\ndQpZLUkRuPYlUZJKto0JyfuNCkXoo9M/VCj5sYKI/72yUenPEsL7i1PCMj0c\n5AYm\r\n=HxNb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP/InUt4KplRc32ICJkW5ivmXqiWig5MUEBD8pJVjUjQIgVqU43xkrxjNFFQDH7HdpT1VikaqSNO8YDHbQdgk2EE0="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.7_1622197825844_0.5603853075660106"},"_hasShrinkwrap":false},"1.0.0-beta.8":{"name":"redux-saga-modal","version":"1.0.0-beta.8","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","hoist-non-react-statics":"^2.0.0","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"cd02a84520eb462df13bee5b050c59a9188b37aa","_id":"redux-saga-modal@1.0.0-beta.8","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-oaGXjZK1gG/JTRhqTPIpBSzlPQHxS6TTH9MRtfZxl0iO4wGk8TB21O4YBwXLOmakMTnpoS3qRcPj08DLRMhS2w==","shasum":"62faa24362aef47b852426e34b8c2a88c32da958","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.8.tgz","fileCount":16,"unpackedSize":52852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsNGACRA9TVsSAnZWagAA210P+wd9cwTVsPzQw5GJZOD8\nkSKsNqIcwHlEMrHXOloI45FzDjfaYtRUcnT0pJkKgvSYwUJCGoyOm9AiVKLz\nfIiz565nWMxSPs/jjulBzU3wjp/vMFiihjqgqsyHnhXbrOZtfpuWPqsXZaC0\n/jxlCmhrX/58G5+HoszknQKAL2voAZYx8FYnkzBe73clKKZZD37se0jCFzCk\nrTE2eegKhwI5mZrrkZ3TuxkuhZAz9cRyw5+NnPk7AHEUFBLXZFbJOlNQAc6T\neAkcKh559nuGpDne4bUEkofqFbAZLHM/Urmn3DHjWHXuQwFBvAFsLAKlrD6O\nu3Y/ZEK4/LUYuDhduCW7yG53vrqYJkXPWIE0jVZY9zOz8Q7ywX7T3JlIkuZh\nioo6G5vWqR7qtaMlN0efNGclF2CXreUTLHgXjU2WQXMbBCtol6Zi47BWDu5B\nTGd5gNiX0pLh4LmrM0g7DCsOdmkXhP/FloDOyl5IIl2BvJroPk9ZN0QoSrSY\neLuZSgqUO8FjdA+zDZL1pbTb4wUPZP1Qujc2A2euHhUWAA9p9CeSV1s0AM0i\n6WugqrK8VZuK7yAbe+aZ535JSN+Erx68ebqNB8SyPX/j+T+L5uvQqUT40xxs\nY1O2nmM8FhIR60MhcQX/F4ZCJnGloEFOMnAtHy8/dIfDHj11I+Y2TdZ5g9Cw\nfTLh\r\n=Mywm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtLI/ypaUpYcnD+GxROfyyRh21XLd8MXGtefnchtQcvgIgWDsJaR8YGS7yF9Dp0apkFoi6m2u6X29DhQ/9c2HELo0="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.8_1622200703984_0.30492729767072424"},"_hasShrinkwrap":false},"1.0.0-beta.9":{"name":"redux-saga-modal","version":"1.0.0-beta.9","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it --preRelease=beta --verbose","test":"echo \"No test specified\""},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","hoist-non-react-statics":"^2.0.0","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","readme":"## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"565144dac296e197bdc5b93f3b603a8cf375683f","_id":"redux-saga-modal@1.0.0-beta.9","_nodeVersion":"14.16.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-P2wnUTeBjxJVMs50rSv2/ejM50vNRKUAEuqN3yfbYRhZfUjeMEUzWSI2R8YIqxqvOrZk7UaIxQXZkh0eEXgPtA==","shasum":"b78410d5961dd45213ad1fed46b0c1b7c84313b6","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.9.tgz","fileCount":16,"unpackedSize":52858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsNo9CRA9TVsSAnZWagAAMsIP/14CuG27BdJVG+03eYqp\nOo0qnrDEjuifgWBw8jaCqYBb1Mkd3iOP4FUuQug39v1oEBWdejkHW+Dxwe0X\neHZZVZD4RRcP0KTR0QNiTH/bQmMehIBv5tKeAk9fJ2MaWRMabd/figfbQfYj\nfQRRWr7Y76pPBTvYSEc5GTUU4ERm+qGdifKC1Q6BCTrxZp40Uaz2oxTHkrdg\nG2zEj3SMsHvchPLVghY1utR1He3/1ZrZqzbtvzszQZwCyOajqWaLdCGuK0Z0\nwglcHdiupvKVo9SH7jFTayEGYE+z2FrRv7GUzI/u8mUWlAJVRhrg7O8eFQNy\nZD4jOBL/7qfKusDVvHG8HKl+jN/jkkFK01nvF8oe7D+pBeGY+kvpycVHyJYg\nPMLsNaP7fNAb0igt8nD610gebp9wtsX3Pe1KiYXiXU61U9bh2Ve2SokZfDGp\n9zNEfcyFybPlg4uje8bR/zS3LV6nIjC06y5dIukY5ZzzjBGcmg4rc5g60kMs\nTTILowaLjZchrAno6gMEA5fWbOmHHvuNA+ak5K/Cuzhp4qIl3eM5S2NR6j6x\nlO1+glf/yEARiCE5PnuKID55+T24YzpraGZozZyjMoMCMerE5qHhrOkgAY1I\nBHZGN8nFJXigU3E5DEiLuc8X93omD1q6CMXi4VeKjT1JjWWRfehIMHU0eNgi\nd6yt\r\n=BT1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGrdIcmZu2JszcICBVxd8m9v5u/6MLgUEeJW6c1WEibXAiEAqGNcuCOAl13J+/ToG8iiW0NI7VFzde0ZwKziCTo9jvQ="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.9_1622202940687_0.7196160629893449"},"_hasShrinkwrap":false},"10.0.0-beta.10":{"name":"redux-saga-modal","version":"10.0.0-beta.10","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it","test":"jest --coverage","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","hoist-non-react-statics":"^2.0.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","readme":"# redux-saga-modal\n\n[![](https://img.shields.io/npm/v/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n[![](https://img.shields.io/travis/KarimAziev/redux-saga-modal.svg)](https://travis-ci.org/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/codecov/c/github/KarimAziev/redux-saga-modal.svg)](https://codecov.io/gh/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/npm/dt/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n\n## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"996865e40050180a7187aa4d37c57364d05adc94","_id":"redux-saga-modal@10.0.0-beta.10","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-26KZ6vhwqCkPxxAFCll0rXVBBRja2W0eXhCnjygRjX3chBaNXVjilfEoSHb8deeFAmyFXgzlVx+tg1NJSirAnw==","shasum":"825389ae223a174ddfeeba295958c1807f481fe0","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-10.0.0-beta.10.tgz","fileCount":17,"unpackedSize":53941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5A4CRA9TVsSAnZWagAAMsEQAICuIj3uiXH4H089jFP+\npPfMeXj6MwU57IAtKnCMJjoqSbVrGe5xR6BnlSl4pO+LqHLLb+oR1JFouzzR\ndLRAIvS4R17879BVQ5nFXqEndp9117IQ3LBFBvAR5Josq7dF3MwlodfwAKbE\n9YdKXwK+MJ3hn521YKUdl38SmKvyiD+RaZBnMtdLYioeSML5HnXmH1d41YWR\nzys6+wLXrv6qBHlAIaUQFThazbgRBi6xE5/fIsHIxgiRfb1I+OEFEZjmeGRU\n3WTWSXTExpKcVNDIrQkSaV59rWye3tI3aXj0crH8abJMwfv5VgyKsvG+S8sW\nozCgq5mdI+vfT/EHfo+fTDQul5C/i4lAX6h9fMXlrecpPYEm/5imt8J+cjky\nvTQNFiOqE8qYJugHBnYzN0xbkdNkWihvlT89u/tRDoMJcO0+/psPdp8sjuP+\nyVrpTpFIAwsc3eRvnWX7H2ilr3rmhwrsJerJZjurde6gSGj2EkrbosY7q2mA\nptjj4+CF8Q2cIKPskCdvSRzKYaElGz76fq/hpip35bEZsbIJEB6TmUKeUItT\neZBB1Z6W9L9Z7wqU5LyFugPuRLlemGQmUgJH1Tw1aUz2iCxIXrp/T4VNNgWV\n0GFD3t9eKEgufGmevSnnhlMIP3LXo5nP2jpeF/TLTdKhqK72+woPJaBVAIYh\nWv8d\r\n=LUaC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWQXcBA36tfIF1Oq0cJ6FwhPYMdbtYyBmeJAdOInmmIAIhANDhchIKsiytPZC3DdUh0NT86fMLMtcCgCbQu4uEDcsw"}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_10.0.0-beta.10_1622904887987_0.42967706053763366"},"_hasShrinkwrap":false},"1.0.0-beta.11":{"name":"redux-saga-modal","version":"1.0.0-beta.11","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","release":"release-it","test":"jest --coverage","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","hoist-non-react-statics":"^2.0.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.7.0","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^2.0.0","prop-types":"^15.7.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","readme":"# redux-saga-modal\n\n[![](https://img.shields.io/npm/v/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n[![](https://img.shields.io/travis/KarimAziev/redux-saga-modal.svg)](https://travis-ci.org/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/codecov/c/github/KarimAziev/redux-saga-modal.svg)](https://codecov.io/gh/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/npm/dt/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n\n## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"817b2ca0fa9aaa7e9c214267ad66537d14eb2b65","_id":"redux-saga-modal@1.0.0-beta.11","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-HvMU8VVl7NC+2IphhV+iHhvgekjodOhgF6Z1bMRe092Rb9z2qTKhg+ZOM4xooh4isf2WPfoDbBHlHBtX83PKiw==","shasum":"1410efe8f9437527945d584004f05f4b8f616337","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.11.tgz","fileCount":17,"unpackedSize":49941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg11wQCRA9TVsSAnZWagAAdU0QAIBJV/gqHhga+PXbMxVG\nf3f3oMd6iC790gWo9W3jwlqnQVwME4SsYXh4IwsnoJDms8aywz1ZUenmzwFD\nVt0da1CTcGdifEuDszt3zO26gRAyaBZO6C2Bc5TtjfnVdOPozZ67pILJB473\nuQJZYCiil+/h1ixe0SVaMT/X4rlOMLtzgwKd9QVGK+lGp3/AiiUNblwJXf8L\n07kKr7uDchL/CsoACJ2iefTonGZ7pibQlY64thyhaqHNGCM0TdP4Y9xSUMqH\n4+7hi7vCBycUzEljYQq1YAlRfqanmjz6Z+0nV/9wRbFO9OIkLApffZ7OAnx5\nvsxAjMPyjqoP78YzVkqzkc507MtFvrWl8L4Pb0vyZHx7lBv/QNgDwAG844oP\njcYbG08S19R+mK/M4cJkDwIgJXRy2qrQ3+p7E5rNQN4NCM3BHQX9jkleCIPj\nQ4/s88Hl/JPn9osbcDD1eNUtRjM5pEE6slAB3y1vz/bKtuHUAvJ91lrjtYG6\nqSDLUppJPtHJS6wa0GICNj+4A3FIIkF6ugxe04blQ54NVyYMpFOg2uJgybit\naO+fS40d1zSyr/Fy2oRz0NyRNC796SQCoTY9RaglmTr10lKQSnCOzG7+5DRv\nHKCt/VQbOh+nbjEN6qy9P132EUwwZABT8P8d+6KF3Aror2e3cML18alLJ/X4\np6/o\r\n=oOY4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFORZa51Cs6DhvFJyudlldbs9OeP+id2CnDYqC0a3odtAiB9Ek9QNlmI2PKBHQZT9E0HEwDLP9LvMleewkFqLbPd+A=="}]},"_npmUser":{"name":"elgreko","email":"karim.aziev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.11_1624726543565_0.10864207606300114"},"_hasShrinkwrap":false},"1.0.0-beta.12":{"name":"redux-saga-modal","version":"1.0.0-beta.12","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","release":"release-it --preRelease=beta --verbose","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"^17.0.2","react-redux":"^7.2.6","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","readme":"# redux-saga-modal\n\n[![](https://img.shields.io/npm/v/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n[![](https://img.shields.io/travis/KarimAziev/redux-saga-modal.svg)](https://travis-ci.org/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/codecov/c/github/KarimAziev/redux-saga-modal.svg)](https://codecov.io/gh/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/npm/dt/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n\n## Installation\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal components, so you only have to pass it once.\n\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // you have to pass modalReducer under 'modals' key,\n  // for custom keys use 'getModalsState'\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```javascript\nimport { sagaModal } from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\n\nconst Modal = ({\n  modal: { name },\n  isOpen,\n  show,\n  update,\n  destroy,\n  click,\n  submit,\n  hide,\n  showModal,\n  updateModal,\n  submitModal,\n  clickModal,\n  hideModal,\n  destroyModal,\n  ...ownProps\n}) => (\n  <ReactModal isOpen={isOpen}>\n    <div onClick={() => click('CUSTOM_VALUE')}>{ownProps.text}</div>\n    <button onClick={() => showModal('ANOTHER_MODAL')}>\n      Show another modal\n    </button>\n    <button onClick={() => hide()}>Cancel</button>\n    <button onClick={() => submit()}>Ok</button>\n  </ReactModal>\n);\n\nexport default sagaModal({\n  // an unique name for the modal\n  name: 'CONFIRM_MODAL',\n})(Modal);\n```\n\nTo create an instance use `createModal` and pass the modal name as the first argument.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators are used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\nAll methods already bound to the modal's name so you don't need manually pass it. The instance will receive properties [actions](#actions), [patterns](#patterns), `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\nimport { race } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps) {\n  const { name, patterns, actions, selector, ...effects } = createModal(\n    'CONFIRM_MODAL',\n  );\n\n  yield effects.show(initProps);\n\n  const winner = yield race({\n    submit: effects.takeSubmit(),\n    hide: effects.takeHide(),\n  });\n\n  if (winner.submit) {\n    yield effects.hide();\n    return true;\n  }\n  yield effects.destroy();\n}\n```\n\nAlternatively if you don't need high-level effects you can use [createModalHelpers](#createModalHelpers). The example above can be rewritten like this:\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { race, take, put } from 'redux-saga/effects';\n\nfunction* confirmModal(initProps = { text: 'Are you sure?' }) {\n  const {\n    name,\n    patterns,\n    actions: { show, hide, submit, destroy, update, click },\n    selector,\n  } = createModalHelpers('CONFIRM_MODAL');\n\n  yield put(show(initProps));\n\n  const winner = yield race({\n    submit: take(patterns.submit),\n    hide: take(patterns.hide),\n  });\n\n  if (winner.submit) {\n    yield put(hide());\n    return true;\n  }\n\n  yield put(destroy());\n}\n```\n\nFor frequently repeated modals tasks create a config object with modals names as keys and tasks as values. Pass the config as the argument to `sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an action `showModal` has been dispatched with it's name and **cancelled** on destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`, `name`, `selector` and high-level [effects](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n```javascript\nimport { race, call, fork, all, getContext } from 'redux-saga/effects';\nimport { sagas as modalsSaga } from 'redux-saga-modal';\nimport { anotherModalSaga } from './sagas';\n\n//key is a modal's name and value is saga\nconst modalsTasks = {\n  CONFIRM_MODAL: function* confirmModal(payload) {\n    const { name, patterns, actions, selector, ...effects } = this;\n\n    const apiCall = getContext('api');\n\n    const winner = yield race({\n      submit: effects.takeSubmit(),\n      hide: effects.takeHide(),\n    });\n\n    if (winner.submit) {\n      yield effects.update({\n        title: 'Saving',\n        loading: true,\n      });\n      yield call(apiCall);\n      yield effects.update({\n        title: 'Changes saved',\n        loading: false,\n      });\n    }\n\n    yield effects.destroy();\n  },\n  ANOTHER_MODAL: anotherModalSaga,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n- [sagas](#sagas)\n- [sagaModal](#sagaModal)\n- [reducer](#reducer)\n- [createModalActions](#createModalActions)\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`, `patterns`, and [effects creators](#effects) `show`, `update`, `hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`. All methods refer to the modal's name so you don't need manually pass it.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalsState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM_MODAL');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties `actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`, `hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **getModalsState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default, the reducer is mounted under the `modals` key.\n\n```javascript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM_MODAL');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or `createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first argument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```javascript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\n  const modal = createModal('CONFIRM_MODAL');\n  yield put(modal.actions.show({ title: 'Some title'}));\n\n  //or\n  const confirmActions = createModalActions('CONFIRM_MODAL');\n  yield put(confirmActions.show({ title: 'Some title'} );\n\n  //or\n  yield put(showModal('CONFIRM_MODAL', { title: 'Some title'} );\n\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take effects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern accepts optional argument for checking payload.\n\nPayload pattern has the [same](https://redux-saga.js.org/docs/api/#takepattern) meaning and rules as in the `redux-saga` but applies not for the whole action but only to its payload.\n\n| Name    | Arguments                                            | Description                                                                                                                                                                   |\n| ------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| show    | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `showModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.   |\n| update  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `updateModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| submit  | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `submitModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'. |\n| click   | payloadPattern?: String \\| Function \\| Array \\| '\\*' | An action matcher for `clickModal` with the same name as it's instance has. You can additionally pass a matcher for payload. Matcher can be function, array, string or '\\*'.  |\n| hide    |                                                      | An action matcher for `hideModal` with the same name as it's instance has                                                                                                     |\n| destroy |                                                      | An action matcher for `destroyModal` with the same name as it's instance has                                                                                                  |\n\n**Example**\n\n```javascript\n  import { createModal } from 'redux-saga-modal';\n\n  const {\n     patterns,\n   } = createModal('CONFIRM_MODAL');\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield take(patterns.click(payload === 'value'));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield take(patterns.show((payload => payload && payload.text === 'Some text')));\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield take(patterns.click);\n  );\n```\n\n### selector\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n   const {\n     selector,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   // the same\n   yield select(selector);\n   yield effects.select();\n\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped `put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the <a href=\"https://redux-saga.js.org/docs/api/#takepattern\" target=\"_blank\" rel=\"nofollow\" title=\"takepattern\">same meaning</a> and rules as in's the `redux-saga`, but applies not for the whole action but only to the payload.\n\n| Name        | Arguments                                               | Effect |                                                                                                            |\n| ----------- | ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |\n| show        | (payload: Object)                                       | put    | Triggers to show a modal and sets payload as it's props                                                    |\n| update      | (payload: Object)                                       | put    | Updates the modal by merging payload with it's current props                                               |\n| submit      | (payload: any)                                          | put    | Triggers that a target's button was pressed                                                                |\n| click       | (payload: any)                                          | put    | A trigger for handling any click on modal                                                                  |\n| hide        | (name: String)                                          | put    | Hide modal without destroying it's state in the redux store                                                |\n| destroy     | (name: String)                                          | put    | Close a modal by destroying it's props                                                                     |\n| select      | (name: String)                                          | select | Select a modal state from the Redux Store                                                                  |\n| takeShow    | (payloadPattern?: String \\| Function \\| Array \\| '\\*' ) | take   | Returns a `take` effect for an action `showModal` with scoped name. Accepts optional pattern for payload   |\n| takeUpdate  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `updateModal` with scoped name. Accepts optional pattern for payload |\n| takeSubmit  | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `sumitModal` with scoped name. Accepts optional pattern for payload  |\n| takeClick   | (payloadPattern?: String \\| Function \\| Array \\| '\\*')  | take   | Returns a `take` effect for an action `clickModal` with scoped name. Accepts optional pattern for payload  |\n| takeHide    |                                                         | take   | Returns a `take` effect for an action `hideModal` with scoped name                                         |\n| takeDestroy |                                                         | take   | Returns a `take` effect for an action `destroyModal` with scoped name                                      |\n\n**Example**\n\n```javascript\n   import { createModal } from 'redux-saga-modal';\n\n  const {\n     name,\n     ...effects\n   } = createModal('CONFIRM_MODAL');\n\n   //result: put(showModal('CONFIRM_MODAL', ({ text: 'Some text' }))\n   yield effects.show({ text: 'Some text' }});\n\n\n   //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload === 'value'\n   yield effects.takeClick('value');\n\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL' && payload && payload.text === 'Some text'\n   yield effects.takeClick(payload => payload && payload.text === 'Some text');\n  //result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM_MODAL'\n   yield effects.takeClick();\n  );\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal` has been dispatched with passed name and **cancelled** on `destroyModal`.\n\n**Arguments**\n\n- **config**(Object)(Required)\n  - <[key: ModalName], Saga: Generator>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: {\n  name\n  };\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n- **config**(Object)\n  - **name** (String)(Required) the name of a modal\n  - **getModalsState** (Function) A selector that takes the Redux store and returns the slice which corresponds to where the redux-saga-modal `reducer` was mounted. By default reducer is mounted under the 'modals' key: `state => state.modals`;\n  - **actions**(Object) Custom actions to bind with redux `dispatch`;\n  - **keepComponentOnHide**(Boolean) Whether keep modal component when `isOpen` equals `false`. By default equals `false`;\n  - **destroyOnHide**(Boolean) Whether automatically dispatch `destroy` to after `hide`. By default equals `true`.\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to redux store under name `modals` or any other but in this case you need to pass selector `getModalsState` to `sagaModal`, `createModal` and `createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- **name**(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`, `submit`, `click` and `destroy` bound to the name of modal. Every pattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","gitHead":"5420136745b37ae049fb779322d0937207168b6b","_id":"redux-saga-modal@1.0.0-beta.12","_nodeVersion":"14.17.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-yT2jaG+07EFC4WaISY0HRF1w7vZN7wijx0vjPhobF3ekc/NKiWoa/CCYCzYt7ruTned/1yljr7HS5XRJDoC+Gg==","shasum":"672d94664a089ac6591e4aca56af87158a8356e1","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0-beta.12.tgz","fileCount":17,"unpackedSize":53524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhycsqCRA9TVsSAnZWagAA26oP/i58nJjjUX0FE1eaKbyb\nLv4f9mIMl9tDQg7ZTpYBiiiT++lCSyYUqCSyA4+R2jU22TKfA3N9OcOjaLIK\n7TTFkQ3AMek1uqiNsVQiRiQP5I7HfUptQL3B7cxXvXnc4FzopMxWxpM6SatK\nfNfzx6QMbXR1mMl+q1EEkB/siNgCJRWloZdvRPhIiUSgFkL0/WuqCR8JxHPp\nBlcar+KZtxwgFV6xtoCxa2u3kL4+OlwmVlPpiCefNlaDEUuJ0Ww1e0CKWiJ9\nsH34CmA5W7JN71UvUfcl7vKOi/sJ+GtNnZXUOcdmOgjuAaHeKuCf+iJW0BK7\n/8cMculhftUu7nUQBUbpYEGU9i/UwX2aSXDJQVdkp6xiT34A1pxZ4/zn7m4V\nZW7kSJcMkGpjO38mxDU4vAZVso1cTljuwxfBAg1HFwaJTJPfD8javx8JQ16V\nboQ/Tf4/Fe89LdVn2knlUIyCTyb2c30HJNQNHV9HU+FV/VZivZnnFnyANXpX\n3Rdc2OCeuiJXHrGcrHE96ZgLMqUZ+vRmcYDctVSAiPoma31tkeOqR86lGmeb\nUa2FecWP0P2RPi/MgP5k+Nvbl1UrKpR30ykBQLImD31aP6fKW8bL3mJjREhc\nvFaj4uvi+xWC4wySI0lOfulx6ittNXxdnO88mt2ejpncwNmqF4r15I66mZnI\ndS6B\r\n=fJ4d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHBBlzeT7h0Ub48z8N9gjK6c0TuT68mgqCv5lHTod5zkAiEArPK6xDqAJElGu9yV4Nbj+77jNPxLpsGIvVoSio0IqUE="}]},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0-beta.12_1640614698627_0.9395035637917053"},"_hasShrinkwrap":false},"1.0.0":{"name":"redux-saga-modal","version":"1.0.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"^17.0.2","react-redux":"^7.2.6","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"681f0c7483274a542e110fc3caf02643f4f3c961","_id":"redux-saga-modal@1.0.0","_nodeVersion":"14.17.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-cDWpROZGssRZoly8DDYv30H3Ep6tWG848f7KreJXAc1hbjy1sMhuDnghWPVc8WZYYv1oQYG58PJx7t3uPh3gXQ==","shasum":"e77339715250cb904f340cb94367deeb33eee24a","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.0.tgz","fileCount":17,"unpackedSize":53488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyc1ZCRA9TVsSAnZWagAAZj8P/A1bjcW+HHYH5v+Qe/jJ\nfXJTABvVFiEpUjvxpi82NXJeNJG5i+HK0HFuVrheC7w97tJ6ElmiSKeyibES\nQpwN+M5DbB8zksjTIas7/GDaOqDwoYrCOQAlyXELlz7OoiCYQoic9mnyvrIu\nBBrRCOZT57hX0X1DMkLjaF17hkf5dEgigVPKxpyKTubmJe+5MHTXSgQmRQbF\nqup7uj2G4wFuvoEv0qz7iVcYgtEV9K5oZ1k6cuI83wVoSVAz7GLCDjjsHWcW\ncop3GXAppDLOI7Kjl7JpkQrCH7PTpwL6qYxHE8os4J3m9Lk9NH1SjDqn+xeB\nHuzp7Nl+/L46NAe0+mNY4kRt3TK6QwKErUuitxAqkgYzIrFgl6uwAXWw6SPv\n/tWqIHdvD340Ah8KI6bZ5sdIg/YsD4masHp22r4vOSI5cARAO1JoghgbCOkF\nIRhZW5iH83Vokpjh6SM82mTG94doM1OEkMFBGErcKLhPlDlIrWWDrxkCMH2m\nIRqKzfr4R1yA3olz4NZeNoM5S2haKFW5SsJl4lSvfjfqBNFTiHN8x+Rhjwk4\nagK79KXthZYd23/3Cwiobbg8rwBSPtYwHL+QJ5GtzG9hi/Ezn2aqJJ7W2haB\nQdG1+RAOOu5Cx21TB+2VxsJgRepJ4h/doYsWhOr5KOzO99BtCcsp4k1OM0FI\nn0S+\r\n=d//3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFyGTsWlkQ9obR40HiyhZFKNfh1PQah/LxyKCTBw0SXSAiBa+3c8dIEeZC5CDSBm66Q1dObkO586QzwCtGrNultxVw=="}]},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.0_1640615257218_0.7099412494621837"},"_hasShrinkwrap":false},"1.0.1":{"name":"redux-saga-modal","version":"1.0.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"^17.0.2","react-redux":"^7.2.6","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"e7ca8e9d9f88ef3afcca6d5244312fbb6b9ab72b","_id":"redux-saga-modal@1.0.1","_nodeVersion":"14.17.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-S0TCol/KMvS+vNoCzOrqqyVgOiMHNUwQ/xMDWVgQaHkcYE63LqHn0l8dcgXYwpRJe0KDyi+NevRjAcZRe1DEBA==","shasum":"a481085d0c64f754a4c45c157ff2ef52ca2fb13f","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.1.tgz","fileCount":17,"unpackedSize":55781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhydUCCRA9TVsSAnZWagAArbYQAJ4ub7oezjjfTPXzK8El\n4LTABAOcZ/GeR30++Hsu8g2+xeVP8CFcxZJFtv6WEe6DwCuzyv3R16WQSvpV\nGBQ13TiDuxnViayaXOa3JL6PL2XacqhMrVEB5XTLiZeV0vXN1bFtlw/Q8ESD\nGoNyE+800SWMbWNe2VX5B/DgYp/hcB112H69v7K2p2AXsBHHGO1B+bTdUDYu\nYBO7YR6K6bQKdKCGCKOxseRocyaH3G7LI8Wwh1cvyL3ZvCFA58la09U7dYn4\nUZ/0s5E24VSBo1+0J03gIRCnyqFdrRkxwpzN8U5tq6ep38/Lcl50b4AHnTkk\nW/wbqR5lfLdaJDZ5/Xjijt5OG+PPwbqMvMbmj+0d2hNbStoEA9J4JHPpUf6u\nivjdbsNOI+8/y7R1JXznU4LHh+AbMxgXmIQ0Y4t7GDAqsYiic8Aogfos9/3x\na1EkTQpK27sMM1xSHgceqNhmM+jN7ueAJpu8UIshT1vbxR2RGT9c+wYwzZFG\nhPhjJNXnd4cBv8mejUcJrr/MyrafjwKA89JTNkb1EiiF1pEfjsBXQgcH1WeS\n793dhUo4M/BXJsGoVPovvNAt20P0d4Oe20DOg2smFTBd/WSGCfWus8rHxRJh\nELjXL/jHIDV1znOkjFWXpmKp/Xvux6/AAA7+BLLEOILFVXx75BeHUn5LL8Mi\nWrZa\r\n=D/K9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2zMa00myWWpTj5qAi/dg4VdfJwyoFfoWlIwlY5Sz9XAiEA2BRC3B1sr4Qwx3myjsV51ecleCMygbMmIfxOAr+IqL4="}]},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.1_1640617217914_0.5510513240750508"},"_hasShrinkwrap":false},"1.0.2":{"name":"redux-saga-modal","version":"1.0.2","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"^7.3.1","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@types/react-redux":"^7.1.11","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"^17.0.2","react-redux":"^7.2.6","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":">=7.0.0","react":">=15.0.0","react-dom":">=15.0.0","react-redux":"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0","redux":"^3.0.0 || ^4.0.0","redux-saga":">=0.15.0"},"testURL":"http://localhost","gitHead":"05de0ecba8833ad31c5f5a3c0dc1d55fc689b86a","_id":"redux-saga-modal@1.0.2","_nodeVersion":"14.17.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-Zfn9IHfU5mt2Ug1dfcbwD+x0GK8n+B/jIdz/VPUDyRMLioXw+6x7ixbTX5J63C3FYhQtO73FFRvT3WYdyiF5aA==","shasum":"4d4a8fa6002383d2e9f06093b7e56f2bbaa053eb","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.0.2.tgz","fileCount":17,"unpackedSize":55797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyd3rCRA9TVsSAnZWagAA9yIP/2BEbteedJxAGgZbCJ7O\niCoxYMvfOI9cHlOUMMzoLvyDJo5RwKM9bJy6PoRSOVbIuFOngOAaUWKOuEHM\nUQSFA6v/G7f0ajnQUwqaQBXe0GDhLXFNDQ2714UAmMLzL+um2hF6GN5jarJP\nZAPLPj43kbpP5G9EGqBHuAUhUgm6gD4+n/DKevAUDKLJJd52QQIDTUYZX5bQ\n8LIbZv/WfXbgIkJez4VQBiyYcB+zrP17lmbn3TGyiTpJAExQUWnuxoRpsJcv\nCI/X80uvI7EFEicCCnZBg/ONTOo8j2LzEhjovCFe+Sg9YJX8cwgfWjQQUQGb\npogGQio9EGz4+Ub6Mc7jieSXCS73eO/XoHt3ZIWUGxReXsaHKI/2wwEYbTSm\n5eRIwLlx7PTk6YGKaY67N7F8R1jRVaCX0GGsDcYXAyR3ORe5iL4K8JY9WkHW\nMecJEG8l4lXVPmrXhOm4IMD3yTh/9dW0eKaGiQGnqOcIbLZaj0mA5rfU08Ta\nxACrkQBKXhYpKoLj/R1Y+fpj7Mom79OZWV7E8shB8KtzyezzLQo0Dr8F4Axr\n5kcYd3Sa/59cm4/9r2Fg6NY9SAUyNmPLD4FknpN+3tmDIiLPgkWK5jIokI/u\nUSWqEV+rm5xkB9EVAmzIbT8VhHYLUAb170+D/sitWIfhg8mcTXzDeHCX/odo\nsIvF\r\n=DIf6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSa3FgtY7QnPdsT47MHh5s6QZB/cmMv0ZG/wBUJsh3fQIgfuiqdmM/4fsrrzsAshQJ4B+4iSJr8SRQSI3YntCzyEg="}]},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.0.2_1640619499280_0.7429676612926848"},"_hasShrinkwrap":false},"1.1.0":{"name":"redux-saga-modal","version":"1.1.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"*","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"952efd8241cd9b2c94c40d1092399ef425aea185","_id":"redux-saga-modal@1.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-z5kQV+p5zPdbJmic6o57BnSv3nptcvfHwT0VJM7cTo9FwLoxMyaOKDnsCkUDs9va3lLLHGWOoUZ067b3xvaIRg==","shasum":"6147d907033a982b1509d4965df0965e6c4d1323","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.1.0.tgz","fileCount":18,"unpackedSize":61624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjJ0qmN9uNx1g1wGGUDO3uWuhaJA8f12e7LVh9Pw4xQQIgLtQUaVNDtnaO7iQuY+ZpDeiKP/JQD9+/qk95Z8jcjIw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiil5lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrILA/8CIPaqFj59rHTD4r9l7W8w1JOT+66QmJhZ/Ya2kzwTAx+KxUn\r\nMK1PwIXojd6CmA+PQiLMr2JiVmLjo+hGadVaYq3jxnerANWQfKMfXPagxe+q\r\nXO1czIu/gYvsD33YCBHH0mlhkfRBfrIMLi5/97b0Mg8BQrEfnyeQN2RR3J6S\r\nGXPgnYbuBArIHtciOYA0mN5JdS6F4CRUIjyKa2I/uSYPI1xg3Jq5WtOs+oJy\r\n+vwG9og7nhv07KlMh9NIU+UkoOW1yAwY2yEUtJBVOJsVQGaFrTfZf7YGr7Hq\r\nw8PfhBMTNLtqbRI7rxiOQG3GXyFwORD2P3JoE0gRcmWsWoAHXpsGzjDd/Wwm\r\n1fV9tcqnK0srcklLSVomxAKQU+mPt1KNrE+Ic2Adg0G124q6y2c7Fb27/n3j\r\nDD9/Rd8CjNFa7kATkiZB9mKOtKbrV2c++yJ0Hu/nD3NUcibDnHcUCMJlfNZx\r\nd80YFpGDnsA6K2qt2XMzRx8VO9o3utL4Xxwx+Cl3+7teSkuxNFShld0FvoXT\r\nFExLNw1ZHzBvAkg6pHZglBFN1VpnJXz2YZXXJ78vmQ6RIAlEv3hVZv/z+wtZ\r\n9r5Vm9mP7byTpUrJvEGzSV0e2/bDG927B1PW4CMlNN0/AHU3wi0E+Q4kOLho\r\nrbLemMP0b6HksdVRHmnyUIxtqlVcS0BwDS8=\r\n=l4LA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.1.0_1653235301380_0.3289591363206752"},"_hasShrinkwrap":false},"1.1.1":{"name":"redux-saga-modal","version":"1.1.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"*","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"bd9d45fd3e3581945f6003adeda4b769449e226c","_id":"redux-saga-modal@1.1.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-WsjFMvR3DySh0xx3HGmaD43dCGGR32yuHaY1txXUsUYYohrWBogytuy7TSTDSzcoEalTWJaJKSDX59Y9Sb0jZw==","shasum":"2c533fd7a2b4016928c5289055e52456dc4a7943","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.1.1.tgz","fileCount":18,"unpackedSize":61752,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtZO6j7yRVJtuqcj0o7/uWXWLKTWZ8E/nFfbcgnlJHHAiAH3ClrdQzrCqJWAlk1HfJbaU2YjF5+3xZ7U7Lc5Q+DCA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqc7FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Xg//YlfJymkeuYk0GQ4qApL9BwAcrpA1Rjx29UH5XtOPyu9wrt+P\r\nG+dl1LnlqlitJsiUNK4yLjBAu1BUNwekAjww6AMeXf1Muod6orImGiXn9xTw\r\nbHkBxwZe8g36VztXo8i30c6kO3BpEElKss8FoGNi9/c2s6mtpv2jAupYIXf2\r\nwm0Rbu8sJKqx4JzXmJ2F0vcN3YGvx+l7G/PvB2Xp5kacaV9h2A+EXkBzsCKM\r\nfqs1ahT6qFT/WsiUNMWF3W51cAyn3MzbADa+keJqcypSm8M1AIZasOwvSCgH\r\nV2TK+wmlk0rtQdu/V7CIIwNCQntC4UC87K0Xdk00iXP5I/24k+ygBAZECN5W\r\nu4fKZKuYyDgzqd67exeIfJ9Hcmj9giciFutnSLdSQQT6AJ9NOycigDdtnGl6\r\nT5b+VIVbN6FBx89Uo8sYroRpwVLTgkY+Csgz9Nlbb83S8NlqOhDk8JKnf5Jn\r\nIeKUSXDK6QcSPZQWbyvDjscx0u9iTDHFoPTB+m63A+9pz/aljr9s/pDXbFEc\r\nV8rc/+vLW9M2UU0Th8em8Ksu2i3YJHnhAXn9IEFgEf+SfxkaruC4EVww5US1\r\n5sPNaaOY/hmInVVw3eBWTq88eWBQd7P/a+G6zUZqKgsgm64NC6XS6ZFj/dhy\r\nOqUY0EeTBoh8Qvy+AXlKiTyw0nGFwxk4v+Q=\r\n=pVrC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.1.1_1655295685127_0.9495367232790779"},"_hasShrinkwrap":false},"1.2.0":{"name":"redux-saga-modal","version":"1.2.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.3.0","@babel/plugin-proposal-object-rest-spread":"^7.3.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/preset-flow":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/register":"^7.4.4","@babel/runtime":"*","@tsconfig/recommended":"^1.0.1","@types/jest":"^26.0.23","@types/react":"^16.9.56","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","babel-loader":"^8.0.5","babel-plugin-add-module-exports":"^1.0.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^27.0.4","lint-staged":"^7.2.2","npm-run-all":"^4.1.5","prettier":"^1.16.4","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^27.0.2","ts-loader":"^8.3.0","typescript":"4.2.4","webpack":"^4.29.0","webpack-cli":"^3.2.3","webpack-node-externals":"^1.7.2"},"dependencies":{"hoist-non-react-statics":"^3.3.2","webpack-node-externals":"^1.7.2"},"peerDependencies":{"@babel/runtime":"*","react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"8f520e6a69bd21b7b7a12cd389c629860692cb24","_id":"redux-saga-modal@1.2.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-rSqt5gcq5vsAu45Tv2xKDQFVUv6m9/8uzOaeUa6HRIbSDZdHNky/0GqUUQX613s77ImiV+lmcgy2BC8RoIXreA==","shasum":"e8ec2befca7e669d448a4258998e8eadbcf13560","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.2.0.tgz","fileCount":18,"unpackedSize":61537,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi6SDGRnPvBU70aabRdlOWxnENbxlM012oGGFMu20LtAIgKC4LS2GzHbrifNoRKtK8rli7KtsSPNghJATj+ofQvbM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqdrkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrV7w/+P/s5d7DvVQY1re8psvdg+TI6MOZg8FdKY9XlGtVF/3hBY7fu\r\nThKwTJC1MYUiFQcWKXUXZnyN8jfWal3qY2cjFiAFYeixVU5gT3UeQhJLv12m\r\n8Rxo8Iwpplljlyznt9IpZEaOMG13pkK8zHqaMWtoN6ubuAIkMZ0fszwaf9an\r\nFbANmZfntw5XSinsPf5fTiGfA5HuaVr9bcRczrCDTZwzBEEREVLOKjE4x13R\r\ntOaw/XxOl7kJHdekXIs9qUfm3L2AgM/UChSvDzSM8RxXb49bVyilfQVf+f4h\r\nia4qQKttTnnkz92MT764XXUneCJKsRZ6Jx4NPF8mwTLu2NvicSRGnN9h+Qci\r\ner8lhRjxVwGLOBZ9NoMCAKjd0mHC8B5hT3VJj0Hq0VaexASmwCKTiBXUrOfk\r\n4Av0QEfa1ugvznPspc1BdcmaAm22Jo001GmNazzrnnf+EXYtTkE/kQvsUrtn\r\nCZmi12biz0eJhSLuTFO6/NV0EcSZou/k0uzK8JPU/gPH7Gt7UxdboZLANxFG\r\ng+4Y6EzdebvHNTdVu5WzDSSbW4Rgn+4+6/ZOUa0L0e/aRhPlUY7WoVsa1WVC\r\n8uTbICc+NZfPigngi77CL0yUk9U2BC9s3GHEV8mIGRHVWQqVDxiTaix86/MP\r\nVj54R3Vb1pF8qjAGCumy2MoN0vCwk52LkuI=\r\n=sjws\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.2.0_1655298788501_0.927440837202091"},"_hasShrinkwrap":false},"1.3.0":{"name":"redux-saga-modal","version":"1.3.0","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@tsconfig/recommended":"^1.0.1","@types/jest":"^28.1.1","@types/react":"^16.9.56","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^28.1.1","lint-staged":"^13.0.1","npm-run-all":"^4.1.5","prettier":"^2.7.1","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^28.0.5","ts-loader":"^8.3.0","typedoc":"^0.22.17","typescript":"^4.3.5","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2"},"peerDependencies":{"react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"3875f231b2cbd55a3548bbf2069c0256ee65f60a","_id":"redux-saga-modal@1.3.0","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Z4UQaspVyjzuknxjBQTi5V9fO3Lca7w30u1qReQSx5WmHtUWkozMGOnaU8daT6mFRSeBsAjuPUl9mix9lAK+oQ==","shasum":"09290c01e86dc08f657e1bb6d2ba13a11e6fc4a3","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.3.0.tgz","fileCount":19,"unpackedSize":66020,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEcbdLDDnHwFCLMfYgl/LoKsdikdOnrPK28edngaQ97AiB0AD4cH2htB40g1JNZNPfEGljxUj5FNL6b+/4cccXvvA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirGl8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFfQ/+Jhij+Gh3tUy5L3NFkwFBBScAdljmwpwpMLzCTrQR/OVZBoXe\r\nxrYS6uvGcLDfSlalk9dtfoXydS/0xYu3YnSJ2YKKqXD9ahAHirIrdaPRzEiU\r\nyX0LJPhWrDPIk6zP5dpLXdDcOzsLhRLRk496CJNOLN1KH88sF8pfirSp7RR4\r\nMFlXEeWF4oKv/asJWaW1hx6oyZtKTsPgOUOPWXkJTTfNXKfH9dl6lYvtt0jv\r\nX4ipV5Ntaq0fRPMlMekqD76YiTAP9IU6/tl1zNooUl7wCLxKL2ECOUw04Lhf\r\nOiYQETRGcXJLgZL5HE4ILSVUlobC20U1+616JdMLf27iPfRsvH+X8C+sOSNY\r\nVvuOggqqhLvUv1TFHcQU+eJ04p4IVj8Pct4frtt9gV64srCton/6hZig/nuO\r\nQjzZRPhzDGbPfdDkoYjIT3ahQudZs4PoRdwesuRsqW3slj7jffmiUDtTlqiv\r\nMzGlNrCq7ZCSk5DBVne5lYIBXqnQykdsQKv8pnBacM7m5KCvRaxKigBCbQBF\r\ng+HjUFceSkcy7evIGHDyjMOHB7kenokkts6IqtQKyNWZocaATllpwPQO0xz5\r\nYgHhY2UWDCvs0acePweEs2iJHfc4jA7nAW9Q6KfbJ3EqYvnZy6AMvUBjTzyG\r\nxuvjnnFla0LIsTOMVwWdNTXTelRn/xjO6k4=\r\n=L1jv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.3.0_1655466364698_0.4060859273477859"},"_hasShrinkwrap":false},"1.3.1":{"name":"redux-saga-modal","version":"1.3.1","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@tsconfig/recommended":"^1.0.1","@types/jest":"^28.1.1","@types/react":"^16.9.56","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^4.24.0","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-typescript":"^0.14.0","jest":"^28.1.1","lint-staged":"^13.0.1","npm-run-all":"^4.1.5","prettier":"^2.7.1","react":"*","react-redux":"*","redux":"*","redux-saga":"*","release-it":"^14.11.8","rimraf":"^2.6.2","ts-jest":"^28.0.5","ts-loader":"^8.3.0","typedoc":"^0.22.17","typescript":"^4.3.5","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2"},"peerDependencies":{"react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"d79682b37a8eb62cb127e0e1c030f60f50f25d0a","_id":"redux-saga-modal@1.3.1","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-eex+Krc+VVC5FPesBuNExLE1kErrTy1qjwf7zlXX/1WaPzKIA0kM2UgxwRLw2Wcxc+BfUAlrm6X9U13nN2UHkg==","shasum":"257d153422fd84dc8dc7965826434287201d71c7","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.3.1.tgz","fileCount":20,"unpackedSize":66315,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCItpGw7Iyck9NXilXzttk7jKbLJxNd5wj30fC6Vk5aBQIhAO9pN5h9K8Yknn313ALIfn57pdNqepkMfH4SX+rwveNp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7maTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom7g//XUTQ/lWWnn/bU8zNCAwUbx3qL7cxrCZGptflW4tSOmufy0pn\r\nWBXKRiDDs5eHxR620XWaUbWp3qpNA4i67FkvNSqSr9dlt7XDicjNV03Wm35a\r\nwMN6gA3n2CtaC76xd+xKt4jVgqCgSkhNv3Md2JyvZO9ScWCW+ZZtvhgQuZmD\r\nHolYH6J43HynhtHnV34XGH3l4FxvyqpfeA7j9RgXx2shN1/vSukQ+TT1km28\r\n6B2tKjLRWk0k/nmRDEyJ/02zCsQLvtmA0lugqXaflRzznlaczSurlphuoUHB\r\neQTVRN+DCjYMdpMsxlHnMfhQmcmxGATS5Xeqb6PxnzvmtRb3qxvS6VMC1HWH\r\nPyze8G5xWvmEqFr0MYiQTMH2hovCwDVotTnviMssyhgi2F46mAdl8vCxBixH\r\neCHKKYjKUc//4+bVR8566biRQNWq1yWebqaMi1TVycyRUGtL6SMCp8oMJCvq\r\n9HAi52PHK+Mp9lwt7lJPXEqaC//gvIBVGyPfopG2CVHS1B94k6cq2l91FPpl\r\nvs+i31YxaoRgM96IiAyj9cx9Sh9XPphpyrcecTU0rbdJ5+pj0v34ptCgHXv2\r\nYa6rV67Le4ordRLuOp52uVxf+LZq+1NhAUOjzgMR0p1O7p6cc6h+1CGXSScJ\r\nzFD3paomczW6Q3tDPViMUBKUjEugT4Ztcwo=\r\n=Be/m\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.3.1_1659790995318_0.9489344769815766"},"_hasShrinkwrap":false},"1.3.2":{"name":"redux-saga-modal","version":"1.3.2","description":"A wrapper to manage modals within redux-saga","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"clean":"rimraf lib es","format":"prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"","build":"webpack --mode production --config webpack.config.js","build:dev":"yarn install --force && yarn build && rm -rf node_modules/react node_modules/react-redux","release":"release-it","lint":"eslint src","prebuild":"npm-run-all -s clean","prepublishOnly":"npm-run-all -s build","precommit":"lint-staged","test":"jest","test:watch":"jest --watch"},"lint-staged":{"*.ts":["prettier --write","git add"]},"npmName":"redux-saga-modal","keywords":["redux-saga","modal","redux","dialog"],"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"jest":{"roots":["<rootDir>/src"],"testMatch":["**/__tests__/**/*.+(ts|tsx|js)","**/?(*.)+(spec|test).+(ts|tsx|js)"],"preset":"ts-jest","transform":{"^.+\\.(ts|tsx)$":"ts-jest"}},"devDependencies":{"@tsconfig/recommended":"^1.0.1","@types/jest":"^28.1.1","@types/react":"18.2.6","@typescript-eslint/eslint-plugin":"^4.24.0","@typescript-eslint/parser":"^5.59.7","codecov":"^3.8.2","cross-env":"^5.2.0","eslint":"^7.27.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-import":"^2.23.2","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-tsdoc":"^0.2.17","jest":"^28.1.1","lint-staged":"^13.0.1","npm-run-all":"^4.1.5","prettier":"^2.7.1","react":"*","react-redux":"8.0.2","redux":"*","redux-saga":"*","rimraf":"^2.6.2","ts-jest":"^28.0.5","ts-loader":"^8.3.0","typedoc":"^0.22.17","typescript":"4.7.4","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"dependencies":{"hoist-non-react-statics":"^3.3.2"},"peerDependencies":{"react":"*","react-redux":"*","redux":"*","redux-saga":"*"},"testURL":"http://localhost","gitHead":"8c0343403c83e0ca276ac43c9e97b13d929e975e","_id":"redux-saga-modal@1.3.2","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-JbSE/2p5iORY14CkCPwSyHWHNP0kxNGZ0RPsOYEsVpdy14pNMY1SPkZf0fTFoeQTPDDLUCAxM84YYJHLpnuRag==","shasum":"457f9f3430c9bb15ae23fa02ace8aeef57140cd8","tarball":"https://registry.npmjs.org/redux-saga-modal/-/redux-saga-modal-1.3.2.tgz","fileCount":20,"unpackedSize":69054,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkbBgjeJ4VUkucG1SWh5ByMqUwMbPXsrS6K8tbdKH2mAIgZadvbJYi/i5WBOvLvjKxaj91+lBEq4TNNoQZEQvOrag="}]},"_npmUser":{"name":"elgreko","email":"karim.aziiev@gmail.com"},"directories":{},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-saga-modal_1.3.2_1684854871850_0.2700797274356963"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-28T18:25:12.633Z","0.2.0":"2018-08-28T18:25:12.777Z","modified":"2023-07-01T07:59:21.501Z","0.2.1":"2018-08-28T18:43:32.041Z","0.2.3":"2018-08-28T19:36:12.428Z","0.2.4":"2018-08-28T19:45:30.701Z","0.2.5":"2018-08-28T19:52:34.013Z","0.2.7":"2018-08-28T20:01:25.991Z","0.2.8":"2018-08-29T11:31:36.351Z","0.2.9":"2018-08-29T11:40:01.473Z","0.2.10-beta.0":"2018-08-29T13:00:28.457Z","0.2.10":"2018-08-29T13:03:10.516Z","0.2.11":"2018-08-29T14:30:53.570Z","0.2.12":"2018-09-10T13:27:30.146Z","0.2.13":"2018-09-10T17:30:44.035Z","0.3.0-alpha.0":"2018-11-29T13:53:54.757Z","0.3.0-beta.0":"2018-12-11T14:53:38.857Z","0.3.0-beta.1":"2018-12-11T15:15:05.037Z","0.3.0":"2018-12-11T15:19:36.733Z","0.3.1":"2019-05-25T20:56:02.604Z","0.3.2":"2019-05-25T21:15:03.819Z","0.4.2":"2019-05-28T13:39:46.495Z","0.4.3":"2019-05-28T13:43:33.443Z","0.4.6":"2019-05-28T13:56:48.141Z","0.4.7":"2019-05-28T16:50:04.188Z","0.4.8":"2019-05-31T18:22:39.671Z","0.4.9":"2019-06-02T17:27:34.310Z","0.4.10":"2019-06-05T18:31:18.844Z","0.4.11":"2019-06-06T16:43:04.455Z","0.4.12":"2019-06-18T17:11:32.062Z","0.4.13":"2019-09-12T14:52:34.436Z","0.14.0":"2019-09-12T15:28:27.314Z","0.4.15":"2019-09-12T15:52:52.006Z","1.0.0-beta.0":"2021-05-27T12:53:37.587Z","1.0.0-beta.1":"2021-05-27T13:35:33.873Z","1.0.0-beta.2":"2021-05-27T18:39:29.163Z","1.0.0-beta.3":"2021-05-27T19:23:30.340Z","1.0.0-beta.4":"2021-05-28T09:40:35.782Z","1.0.0-beta.5":"2021-05-28T10:08:02.000Z","1.0.0-beta.6":"2021-05-28T10:23:49.531Z","1.0.0-beta.7":"2021-05-28T10:30:25.971Z","1.0.0-beta.8":"2021-05-28T11:18:24.108Z","1.0.0-beta.9":"2021-05-28T11:55:40.812Z","10.0.0-beta.10":"2021-06-05T14:54:48.136Z","1.0.0-beta.11":"2021-06-26T16:55:43.736Z","1.0.0-beta.12":"2021-12-27T14:18:18.780Z","1.0.0":"2021-12-27T14:27:37.384Z","1.0.1":"2021-12-27T15:00:18.329Z","1.0.2":"2021-12-27T15:38:19.436Z","1.1.0":"2022-05-22T16:01:41.535Z","1.1.1":"2022-06-15T12:21:25.374Z","1.2.0":"2022-06-15T13:13:08.719Z","1.3.0":"2022-06-17T11:46:04.847Z","1.3.1":"2022-08-06T13:03:15.504Z","1.3.2":"2023-05-23T15:14:32.030Z"},"maintainers":[{"name":"elgreko","email":"karim.aziiev@gmail.com"}],"description":"A wrapper to manage modals within redux-saga","keywords":["redux-saga","modal","redux","dialog"],"repository":{"type":"git","url":"git+https://github.com/KarimAziev/redux-saga-modal.git"},"author":{"name":"Karim Aziev","email":"karim.aziev@gmail.com"},"license":"MIT","readme":"# redux-saga-modal\n\nManage modals with `redux-saga`.\n\n[![](https://img.shields.io/npm/v/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n[![](https://img.shields.io/codecov/c/github/KarimAziev/redux-saga-modal.svg)](https://codecov.io/gh/KarimAziev/redux-saga-modal)\n[![](https://img.shields.io/npm/dt/redux-saga-modal.svg)](https://www.npmjs.com/package/redux-saga-modal)\n\n## [Live Demo](https://codesandbox.io/s/github/KarimAziev/redux-saga-modal-example/tree/master/)\n\n## Install\n\n```bash\nnpm i redux-saga-modal\n```\n\nOr\n\n```bash\nyarn add redux-saga-modal\n```\n\n## Usage\n\nPass the `reducer` to your store. It keeps the state of all your modal\ncomponents, so you only have to pass it once.\n\n```typescript\nimport { createStore, combineReducers } from 'redux';\nimport { reducer as modalReducer } from 'redux-saga-modal';\n\nconst rootReducer = combineReducers({\n  // ...your other reducers\n  // modalReducer should be mounted under 'modals' key,\n  modals: modalReducer,\n});\n\nconst store = createStore(rootReducer);\n```\n\nConnect a component to Redux Store with `sagaModal`.\n\n```typescript\nimport {\n  sagaModal,\n  createModal,\n  SagaModalInjectedProps,\n} from 'redux-saga-modal';\nimport ReactModal from 'react-modal';\nimport { ReactNode } from 'react';\n\nReactModal.setAppElement('#root');\n\nexport interface ConfirmModalOwnProps {\n  title: ReactNode;\n  text: ReactNode;\n}\n\nconst Confirm: React.FC<ConfirmModalOwnProps & SagaModalInjectedProps> = ({\n  isOpen,\n  submit,\n  hide,\n  title,\n  text,\n}) => {\n  const handleSubmit = () => {\n    submit();\n  };\n  return (\n    <ReactModal isOpen={isOpen} onRequestClose={hide} closeTimeoutMS={500}>\n      <h3>{title}</h3>\n      <p>{text}</p>\n      <div>\n        <button onClick={hide}>Cancel</button>\n        <button onClick={handleSubmit}>Confirm</button>\n      </div>\n    </ReactModal>\n  );\n};\n\nconst modal = createModal('confirm');\n\nconst ConnectedConfirmModal = sagaModal({\n  name: modal.name,\n})(Confirm);\n\nexport { modal, ConnectedConfirmModal };\n```\n\nTo create an instance use `createModal` and pass the modal name as the\nfirst argument.\n\n```typescript\nimport { createModal } from 'redux-saga-modal';\nconst modal = createModal('CONFIRM');\n```\n\nResult\n\n```typescript\n{\n  name: 'CONFIRM',\n  selector: function (r) {},\n  patterns: {\n    show: function (n) {},\n    hide: function (n) {},\n    destroy: function (n) {},\n    update: function (n) {},\n    click: function (n) {},\n    submit: function (n) {},\n  },\n  actions: {\n    show: function (n) {},\n    update: function (n) {},\n    submit: function (n) {},\n    click: function (n) {},\n    hide: function () {},\n    destroy: function () {},\n  },\n  takeShow: function (t) {},\n  takeUpdate: function (t) {},\n  takeClick: function (t) {},\n  takeDestroy: function (t) {},\n  takeSubmit: function (t) {},\n  takeHide: function (t) {},\n  show: function (r) {},\n  update: function (r) {},\n  click: function (r) {},\n  submit: function (r) {},\n  hide: function () {},\n  destroy: function () {},\n  select: function () {},\n};\n```\n\nAll methods already bound to the modal's name so you don't need manually\npass it. The instance will receive properties [actions](#actions),\n[patterns](#patterns), `name`, `selector` and high-level\n[effects](#effects) `show`, `update`, `hide`, `submit`, `click`,\n`destroy`, `takeShow`, `takeUpdate`, `takeHide`, `takeSubmit`,\n`takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`,\n`hide`, `submit`, `click` and `destroy`.\n\n```typescript\nimport { race } from 'redux-saga/effects';\nimport { createModal } from 'redux-saga-modal';\n\nconst modal = createModal('confirm');\n\nconst confirmModal = function* (initProps: ConfirmModalOwnProps) {\n  yield modal.show(initProps);\n\n  const [submit]: boolean[] = yield race([\n    modal.takeSubmit(),\n    modal.takeHide(),\n  ]);\n\n  yield modal.hide();\n\n  return !!submit;\n};\n```\n\nAlternatively if you don't need high-level effects you can use\n[createModalHelpers](#createModalHelpers). The example above can be\nrewritten like this:\n\n```typescript\nimport { race, put, take } from 'redux-saga/effects';\nimport { createModalHelpers } from 'redux-saga-modal';\nimport { ConfirmModalOwnProps } from './Modal';\n\nconst modal = createModalHelpers('confirm');\nconst confirmModal = function* (initProps: ConfirmModalOwnProps) {\n  yield put(modal.actions.show(initProps));\n\n  const [submit]: boolean[] = yield race([\n    take(modal.patterns.submit()),\n    take(modal.patterns.hide()),\n  ]);\n\n  yield put(modal.actions.hide());\n\n  return !!submit;\n};\n```\n\nFor frequently repeated modals tasks create a config object with modals\nnames as keys and tasks as values. Pass the config as the argument to\n`sagas` and fork it in your rootSaga.\n\nYour tasks will be called with a `this` context every time when an\naction `showModal` has been dispatched with it's name and **cancelled**\non destroyModal.\n\nThe context of your task will have properties `actions`, `patterns`,\n`name`, `selector` and high-level [effects](#effects) `show`, `update`,\n`hide`, `submit`, `click`, `destroy`, `takeShow`, `takeUpdate`,\n`takeHide`, `takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`,\n`hide`, `submit`, `click` and `destroy`.\n\n```typescript\nimport { race, call, fork, all } from 'redux-saga/effects';\nimport {\n  sagas as modalsSaga,\n  SagaModalInstance,\n  SagaModalAction,\n} from 'redux-saga-modal';\n\ninterface CommentData {\n  id: number;\n  comment: string;\n}\n\nconst saveComment = (data: CommentData) =>\n  new Promise((resolve) => setTimeout(() => resolve({ ok: true }), 1000));\n\nconst saveCommentWorker = function* (this: SagaModalInstance) {\n  const [submitAction]: SagaModalAction<CommentData>[] = yield race([\n    this.takeSubmit(),\n    this.takeHide(),\n  ]);\n\n  if (submitAction) {\n    yield this.update({\n      title: 'Saving',\n      loading: true,\n    });\n\n    yield call(saveComment, submitAction.payload as CommentData);\n    yield this.update({\n      title: 'Changes saved',\n      loading: false,\n    });\n  }\n\n  yield this.hide();\n};\n\nconst modalsTasks = {\n  saveComment: saveCommentWorker,\n};\n\nexport default function* rootSaga() {\n  yield all([fork(modalsSaga, modalsTasks)]);\n}\n```\n\n## API\n\n- [Actions Creators](#Actions-Creators)\n- [Instance Creators](#Instance-properties)\n  - [createModal](#createModal)\n  - [createModalHelpers](#createModalHelpers)\n- [Instance properties](#Instance-properties)\n\n  - [name](#name)\n  - [actions](#actions)\n  - [patterns](#patterns)\n  - [selector](#selector)\n  - [show](#show)\n  - [update](#effects)\n  - [submit](#effects)\n  - [click](#effects)\n  - [hide](#effects)\n  - [destroy](#effects)\n  - [takeShow](#effects)\n  - [takeUpdate](#effects)\n  - [takeSubmit](#effects)\n  - [takeClick](#effects)\n  - [takeHide](#effects)\n  - [takeDestroy](#effects)\n\n- [sagas](#sagas)\n\n- [sagaModal](#sagaModal)\n\n- [reducer](#reducer)\n\n- [createModalActions](#createModalActions)\n\n- [createModalEffects](#createModalEffects)\n\n## Actions Creators\n\nBasic actions creators.\n\n| Name         | Arguments                            | Description                                                  |\n| ------------ | ------------------------------------ | ------------------------------------------------------------ |\n| showModal    | (name: String, payload: Object = {}) | Triggers to show a modal and sets payload as props           |\n| updateModal  | (name: String, payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submitModal  | (name: String, payload: any)         | Triggers that a target's button was pressed                  |\n| clickModal   | (name: String, payload: any)         | A trigger for handling any click on modal                    |\n| hideModal    | (name: String)                       | Hide modal without destroying its state in the redux store   |\n| destroyModal | (name: String)                       | Close a modal by destroying its props                        |\n\n## Instance Creators\n\n### createModal\n\nCreates a modal instance with properties `name`, `selector`, `actions`,\n`patterns`, and [effects creators](#effects) `show`, `update`, `hide`,\n`submit`, `click`, `destroy`, `takeShow`, `takeUpdate`, `takeHide`,\n`takeSubmit`, `takeClick` and `takeDestroy`.\n\nBoth `patterns` and `actions` includes methods named `show`, `update`,\n`hide`, `submit`, `click` and `destroy`. All methods refer to the\nmodal's name so you don't need manually pass it.\n\n**Arguments**\n\n- name(String)(Required) the name of a modal\n\n- config(Object)\n\n  - **getModalsState** (Function) A selector that takes the Redux\n    store and returns the slice which corresponds to where the\n    redux-saga-modal `reducer` was mounted. By default, the reducer\n    is mounted under the `modals` key.\n\n<!-- end list -->\n\n```typescript\nimport { createModal } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  //patterns creators used for filtering actions inside take effects\n  patterns: { show, click, submit, update, hide, destroy },\n  //action creators\n  actions: { show, click, submit, update, hide, destroy },\n  //put effects (already wrapped in redux-saga put)\n  show,\n  click,\n  submit,\n  update,\n  hide,\n  destroy,\n  //take effects (already wrapped in redux-saga take)\n  takeShow,\n  takeClick,\n  takeSubmit,\n  takeUpdate,\n  takeHide,\n  takeDestroy,\n} = createModal('CONFIRM');\n```\n\n## createModalHelpers\n\nCreates a [modal instance](#Instance-properties) with properties\n`actions`, `patterns`, `selector` and `name`.\n\nBoth `patterns` and `actions` have methods named `show`, `update`,\n`hide`, `submit`, `click` and `destroy`.\n\n**Arguments**\n\n- name(String)(Required) the name of a modal\n\n- config(Object)\n\n  - getModalsState (Function) A selector that takes the Redux store\n    and returns the slice which corresponds to where the\n    redux-saga-modal `reducer` was mounted. By default, the reducer\n    is mounted under the `modals` key.\n\n<!-- end list -->\n\n```typescript\nimport { createModalHelpers } from 'redux-saga-modal';\n\nconst {\n  name,\n  selector,\n  patterns: { show, click, submit, update, hide, destroy },\n  actions: { show, click, submit, update, hide, destroy },\n} = createModalHelpers('CONFIRM');\n```\n\n## Instance properties\n\n### name\n\nThe name of the modal instance which was passed to `createModal` or\n`createModalHelpers`. Should be the same as passed one in `sagaModal`.\n\n### actions\n\nSame as [basic actions creators](#Actions-Creators) but the first\nargument is already bound to the modal name.\n\n| Name    | Arguments              | Description                                                  |\n| ------- | ---------------------- | ------------------------------------------------------------ |\n| show    | (payload: Object = {}) | Triggers to show a modal and sets payload as it's props      |\n| update  | (payload: Object = {}) | Updates the modal by merging payload with it's current props |\n| submit  | (payload: any)         | Triggers that a target's button was pressed                  |\n| click   | (payload: any)         | A trigger for handling any click on modal                    |\n| hide    | ()                     | Hide modal without destroying its state in the redux store   |\n| destroy | ()                     | Close a modal by destroying its props                        |\n\n**Example**\n\n```typescript\nimport { createModal, createModalActions, showModal } from 'redux-saga-modal';\n\nconst modal = createModal('CONFIRM');\nyield put(modal.actions.show({ title: 'Some title' }));\n\n//or\nconst confirmActions = createModalActions('CONFIRM');\nyield put(confirmActions.show({ title: 'Some title' }));\n\n//or\nyield put(showModal('CONFIRM', { title: 'Some title' }));\n```\n\n### patterns\n\nMatcher methods for filtering modal actions inside `redux-saga` take\neffects, such as `take`, `takeLatest`, `takeEvery` etc. Every pattern\naccepts optional argument for checking payload.\n\nPayload pattern has the\n[same](https://redux-saga.js.org/docs/api/#takepattern) meaning and\nrules as in the `redux-saga` but applies not for the whole action but\nonly to its payload.\n\n| Name    | Arguments               | Description                                                                  |\n| ------- | ----------------------- | ---------------------------------------------------------------------------- |\n| show    | payloadPattern?: String | Function                                                                     |\n| update  | payloadPattern?: String | Function                                                                     |\n| submit  | payloadPattern?: String | Function                                                                     |\n| click   | payloadPattern?: String | Function                                                                     |\n| hide    |                         | An action matcher for `hideModal` with the same name as it's instance has    |\n| destroy |                         | An action matcher for `destroyModal` with the same name as it's instance has |\n\n**Example**\n\n```typescript\nimport { createModal } from 'redux-saga-modal';\n\nconst { patterns } = createModal('CONFIRM');\n\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM' && payload === 'value'\nyield take(patterns.click(payload === 'value'));\n\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM' && payload && payload.text === 'Some text'\n\nyield take(patterns.show((payload) => payload && payload.text === 'Some text'));\n\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM'\nyield take(patterns.click);\n```\n\n### selector\n\n```typescript\nimport { createModal } from 'redux-saga-modal';\n\nconst { selector, ...effects } = createModal('CONFIRM');\n\n// the same\nyield select(selector);\nyield effects.select();\n```\n\n### effects\n\nProduced with `createModal` or `createModalEffects`. Returns scoped\n`put`, `select` and `take` effects.\n\nPayload pattern in the `take` effects has the same meaning and rules as\nin's the `redux-saga`, but applies not for the whole action but only to\nthe payload.\n\n| Name        | Arguments                | Effect   |                                                                       |\n| ----------- | ------------------------ | -------- | --------------------------------------------------------------------- |\n| show        | (payload: Object)        | put      | Triggers to show a modal and sets payload as it's props               |\n| update      | (payload: Object)        | put      | Updates the modal by merging payload with it's current props          |\n| submit      | (payload: any)           | put      | Triggers that a target's button was pressed                           |\n| click       | (payload: any)           | put      | A trigger for handling any click on modal                             |\n| hide        | (name: String)           | put      | Hide modal without destroying it's state in the redux store           |\n| destroy     | (name: String)           | put      | Close a modal by destroying it's props                                |\n| select      | (name: String)           | select   | Select a modal state from the Redux Store                             |\n| takeShow    | (payloadPattern?: String | Function | Array                                                                 |\n| takeUpdate  | (payloadPattern?: String | Function | Array                                                                 |\n| takeSubmit  | (payloadPattern?: String | Function | Array                                                                 |\n| takeClick   | (payloadPattern?: String | Function | Array                                                                 |\n| takeHide    |                          | take     | Returns a `take` effect for an action `hideModal` with scoped name    |\n| takeDestroy |                          | take     | Returns a `take` effect for an action `destroyModal` with scoped name |\n\n**Example**\n\n```typescript\nimport { createModal } from 'redux-saga-modal';\n\nconst { name, ...effects } = createModal('CONFIRM');\n\n//result: put(showModal('CONFIRM', ({ text: 'Some text' }))\nyield effects.show({ text: 'Some text' });\n\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM' && payload === 'value'\nyield effects.takeClick('value');\n\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM' && payload && payload.text === 'Some text'\nyield effects.takeClick((payload) => payload && payload.text === 'Some text');\n//result: take(action => action.type === clickModal().type && action.meta.name === 'CONFIRM'\nyield effects.takeClick();\n```\n\n## sagas\n\nInvoke your sagas with a `this` context whenever an action `showModal`\nhas been dispatched with passed name and **cancelled** on\n`destroyModal`.\n\n**Arguments**\n\n- config(Object)(Required)\n\n  - \\<\\[key: ModalName\\], Saga: Generator\\>\n\n## sagaModal\n\nConnects a component to Redux store and injects next props:\n\n- modal: { name }\n- name;\n- isOpen;\n- show;\n- update;\n- destroy;\n- click;\n- submit;\n- hide;\n- showModal;\n- updateModal;\n- submitModal;\n- clickModal;\n- hideModal;\n- destroyModal;\n\n**Arguments**\n\n- name(String)(Required) the name of a modal\n\n- config(Object)\n\n  - **name** (String)(Required) the name of a modal\n  - **getModalsState** (Function) A selector that takes the Redux\n    store and returns the slice which corresponds to where the\n    redux-saga-modal `reducer` was mounted. By default reducer is\n    mounted under the 'modals' key: `state => state.modals`\n  - **actions** (Object) Custom actions to bind with redux\n    `dispatch`\n  - **keepComponentOnHide** (Boolean) Whether keep modal component\n    when `isOpen` equals `false` By default equals `false`\n  - **destroyOnHide** (Boolean) Whether automatically dispatch\n    `destroy` to after `hide`. By default equals `true`\n\n## reducer\n\nThe modals reducer keeps state of the all modals. Should be mounted to\nredux store under name `modals` or any other but in this case you need\nto pass selector `getModalsState` to `sagaModal`, `createModal` and\n`createModalHelpers`.\n\n## createModalActions\n\n**Arguments**\n\n- name(String)(Required) the name of a modal\n\nCreates [actions creators](#actions) `show`, `update`, `hide`, `submit`,\n`click` and `destroy` bound to the name of the modal.\n\n## createModalEffects\n\n**Arguments**\n\n- name (String)(Required) the name of a modal\n\nCreates [effects](#effects) `show`, `update`, `hide`, `submit`, `click`\nand `destroy` bound to the name of the modal.\n\n## createModalPatterns\n\n**Arguments**\n\n- name(String)(Required) the name of a modal\n\nCreates [patterns creators](#patterns) `show`, `update`, `hide`,\n`submit`, `click` and `destroy` bound to the name of modal. Every\npattern accepts optional matcher for checking payload.\n\n## License\n\nMIT © [KarimAziev](https://github.com/KarimAziev)\n","readmeFilename":"README.md","homepage":"https://github.com/KarimAziev/redux-saga-modal#readme","bugs":{"url":"https://github.com/KarimAziev/redux-saga-modal/issues"},"users":{"elgreko":true}}