{"_id":"@mihanizm56/redux-core-modules","_rev":"98-b653303dd9f69262af212bf8c2df886c","name":"@mihanizm56/redux-core-modules","dist-tags":{"latest":"1.5.10","beta":"1.6.0-beta.10"},"versions":{"0.0.1":{"name":"@mihanizm56/redux-core-modules","version":"0.0.1","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d82272433bec82545894926efafa7dc70625b797","_id":"@mihanizm56/redux-core-modules@0.0.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-HccQEd+6CT4m43OlcnZBjlR2QWxMUe6HRjsjWkM9qh5VA4F1wtJ6HhyFdXLhFY26LpPjy3hRDXqqWKFZA4Y/Mw==","shasum":"28adda075adea2b2e39ff39f66d3668457fabf1c","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.1.tgz","fileCount":141,"unpackedSize":106280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehNUWCRA9TVsSAnZWagAAJ80P/0nzO2nHUZuk4OrLhVHN\no6mgfCs0C470hWynukd1eKNZ279SXaulK1Nc8KKtJy0pwcA5pyOki3JwqmGY\nmhb3tTGUzU4GEP+43WIOq9omUElkGmXk6UwK8mCCdHHkV/bVwSWH/QeUL9L3\n4SopI9thTrwWB90RzwqggD36r1G4t9u26pwGGiBvfF5WmdtzNJ2taagFKh8I\nyHjF2ZKKEGRsOqQm6SiU4MEWXQPQFv04ZJwaNKI2eScPlzwzxlyfrUNRrReV\ndzsEjw4h+jjMqy7MnIHQyQ2XAiOpRhZvh4NDMH3lN/qiA6qjqKJyjn6ooIr4\nBCrNXDqL4Xpe+vmUsNRKNKYBabQ4AXS2Icu0cIVARbLGNrdtY9dzEJnzVNTq\n5QffFXAKPGTiDLAwuwrTpgvZ0+PFeRzWS0rcMiyv0z9IzIBQuaLOI9Naoh09\nM9sq8sowKeu4ZMnoPoSTONOvZeuth2dPtqsxxTApnJKHjnNvYD/6wV7tviym\ngPsBipHAVATSKPdpmgo8/x8AbMjwtieBt0t7/7hjsys3ZM31fb0V+9vWC/mq\n0acsYPbt6ADnE0f82065v9FjPLWzSekulU9V01yoOKdtsv09mjHsOarV5e48\nboXnZjqH68k64cUs9WA3V2WnJ4yX3cHncA0nCHcViAp8WEqbJatrhMYHjwTl\nY2We\r\n=SUoG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAWKdikIPg2R5bT3Pt9IlTtieUU7DiWIf/QKI93tf5WZAiEA/16cKL2BCa+9bG8O8SecEt3DbtQDbA516HXHMPUD2FM="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.1_1585763605611_0.5812231191384085"},"_hasShrinkwrap":false},"0.0.2":{"name":"@mihanizm56/redux-core-modules","version":"0.0.2","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"7c172b5a3421a6cd0baabf8378219df9f4c39a3b","_id":"@mihanizm56/redux-core-modules@0.0.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Tr59u3GDEn559Zh2e04m1t44Cfl/l4EBduDcmWIhcsfAR0vaDrW8rtkxT7Jxo/BRbbjfGngTV2SDwt+nDRjkaA==","shasum":"2af672eff6239a87c33b6f0514d46c54bb8aee33","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.2.tgz","fileCount":141,"unpackedSize":106280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehNb7CRA9TVsSAnZWagAAXfgP/iWHs+B1EzFYIsrBuOQd\nEZYzgIM5Cw4Kq+u+8oKbo6b8z1S24IXBujF9N6tmdg6LGI1f0KyI7mr9cyQF\n+75O63c3Rpl+EskhZzD96SE7Jeo9kapWy1DQ/JGPIIrpCKY59FTzx62XNqDQ\n85Ak2DF7PxS6GVeL5KUbOQltIOnTQTTPDCDkP22LA0YbeM3gZKwKYR4rCSLp\nPKcT4yrmljRGj5hMdil1uSetQQjrNy7Bxidrcj3dYopCLlBwah7PIJ1IeJiY\nIUaGHKrSV4pKJAJagr/apKb7ejiVYF6hc80wodW1Vo+LzXpzgjLdi9/DBq7E\n8zQ1/Svt9wPiTnwj/ofo65d0I58GD2uLKbvLpFLUaQr/myMr9AZiH1uLLGAq\nGK+AxP7j6qMwAHYL80Ez7CAEdAV9Vhxafc5zM/5i3B2VIwiBlx9foL061Mxz\nYYjpNqiUnZeoK9zLEueB/JhYF6mTrAnwRg9RxP0qLW2yhInTzxaW25s9Diuk\n274FruM28dM8hVdpzwMbjmWu+fNfNoTh43ZftFFdAI4yFF1VHlxS2OXaK5ND\nwnlNiix3ds3EUqqji44M9RjQuzUHZbiFVEJPb3mMYlpMvsczgjIjmVFXzsCw\nipslxH/MfYKjfdRTALkWAWAW6LfmIi2yTGwFCn5Fl00Zl12J1/MpNWGheGu5\nenib\r\n=PMBV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ5sD/4KGVgsNuEGgfRFbikfvgYTjKtfjlyVC7uEgLJgIhANPtO8Fn6dXtpsSTG4/SrvnpdDl6bQCtw35YSyQ+GzLY"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.2_1585764091448_0.7679392462440708"},"_hasShrinkwrap":false},"0.0.3":{"name":"@mihanizm56/redux-core-modules","version":"0.0.3","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"7c172b5a3421a6cd0baabf8378219df9f4c39a3b","_id":"@mihanizm56/redux-core-modules@0.0.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-3illXB1go33ZCxVzbE9uTNdxKlCeC2mWmcRlfjScb9FNJ827OVHRChmlLEwZAGbdvq6f6fu5OM9o8/ms8+iULQ==","shasum":"c74b4bd95f476859e811ae27d2c102ef2a4245cc","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.3.tgz","fileCount":141,"unpackedSize":105834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehNeiCRA9TVsSAnZWagAAMT4P/1ABBMkHEchvR4Rs06fO\nuUTTZBYpSDZAyFb8g3cCZ1ymL4+x8g9B/lWfbawYhjhhUCgRsJER/vRILY3V\nx02jzZ3dYljuY38HGBXQ9b1KRQYlTpMvd8qY3bQQDfaEW+ioPI6BLpASa4cA\n/Y11Lp2nEOW885H/iZxONTSPweFckFCcB8aNabvmC60CHy7xaPUuUth5QMME\noD5Xn7xdWEp/r3jMViHcxLQu37Z9h7K/HTcQMOF0MPPPxsOWpIWx1SUKI5vF\n6DvYKevbMOdKBdTg6FdtXN5DOvf1ibrtVloqstQAsRmS8HGQY/cGLeLXszzA\ncmxBxYS/j5wVwe4AaQ48J4lMKMQ7IXElhO7auwHE4zZkIsJzxgf6KrJ0rLpY\nx7O43pGI2RRs8QaBs3cjRANm1MCRRtf+gViWM29Tjm6p3Puiq0z0I1neI/9P\nmZzyJi6XekEXMOqEO+3g/PuqyGHyMvQPNbzkBuliJHQwzvebRLMzAfJpYmIH\n1slH3x0u+RiuuZ0I3Agt9bJewAEF+9/dtT+wylPU7Tnk6/ZBPmCgDvUqMWcM\noWEKu9FgMSg/8ap9nyOSs9mT9dZlewZ/BXtl+ODYIDXCR/Q8HOH8uyISo06H\nKlH1+o7kX+2mJdUrheDUJVQ2do0W/qDBvxdcN/1kJw8l2i1xcVINf6s+FtFt\nAgrz\r\n=v35y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFyZDTsSakKFFMVaSeOh8OQo12IANyM4hG/f1JLbHXIoAiEAtuLpbQUTnrdL6c80lZnKe6RDUFww7CvWFo6V4zHANwE="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.3_1585764258268_0.2586275899563262"},"_hasShrinkwrap":false},"0.0.4":{"name":"@mihanizm56/redux-core-modules","version":"0.0.4","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"34200cfd2978d612dec7646fbc8037e9e2aa5bdc","_id":"@mihanizm56/redux-core-modules@0.0.4","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-dH9wQvOtwJ0T0eEFHw0RpGVvhKJBVrDuejS2zcWYYLnw4kaPMX/hD2SZtoGadDKbvLxZfiOxtF0cWxt8+lMr+Q==","shasum":"73d641b26a634ef1764d6f940d694eeb7ad72b64","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.4.tgz","fileCount":141,"unpackedSize":106117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehOXpCRA9TVsSAnZWagAAdpIP/2UYDvMsb7Q8Nl0wKgku\nbmBQZY9YE2qKNGe4YGmhKrrV2sJvk0hP0hYvWsTCzuXAUWv6Dg+ttauZ2xkt\nWrlEJzoqvdqDR92B9oBD1XyszOSIsZh3V30fg3wQfl6xIfH6givv7LuHMEdR\nOqiespmNU/H909xyuOzexWY9hqQKFwIVjr8Nf8qTJ4cF6AWOV7J/zI2OtGU+\nxrnZ1s16jaJFlMVMEmzehc8JW/IjM1gzHAwN3wsMQbgTYu6t7SSp4hew+Ond\nJjeeV5qxRfFucO30E5fnD7vUBhK8cGu59Ueg1+fr8OIJREc08uG1+6IfqpCw\nGOIz/wAdTEFRL7wHn3QblhlQ+soNo3chtMAa1TilQ1FpkoH5qgGygebcymUE\nxqLILxDucg2ldEkFZV3Mxk7ihrzoo0Dc0PlKusIh0Pp3TzB1XN9dnSgf84g/\n2Odtmu3StXXpOYO545UFAvxapQNmrv/zcZyArIJpOMLCKo4fU+YFA9cAXud2\nGaNGzlU8YWx3PkYl+APqtnExFlTURRBnW50RuKFp/pNF5czLpELlL4CC00Mb\nTYgqQmNU5UsPJmJTpI6Oq/TvRBjCRC+3Nbz+BPx0nL6W/iKTs5AUODHOmgFv\nCehYIGn3SDgAm2rvdGLSy8OiWZrzOSUZ7xu0SrSxHPoQPmcB8hi7pbDn1n9p\n9Mkz\r\n=OCng\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChMUHVuF8yl8dghV5BZg+ybSarCLfTahDb8jophb4B4QIhAL5Ehfix6YtfIgwQ5C2Mvyp7b0oAKXHKoNaDHq4zBHIP"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.4_1585767912709_0.0820506932447711"},"_hasShrinkwrap":false},"0.0.5":{"name":"@mihanizm56/redux-core-modules","version":"0.0.5","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"ab7ef39349c8640a66ebec04fbade209c8ff3850","_id":"@mihanizm56/redux-core-modules@0.0.5","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-C9CRDxfO/ILTUHOlkUAOSLIOcmws+vLxh1f9PCM70qImuzOlLaryacb3hs7jrIMTiYWD3hkyBkLNOi8bdxXMIw==","shasum":"b7aa689f2ff614c39da7b36b432675f283062173","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.5.tgz","fileCount":141,"unpackedSize":106068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehOi8CRA9TVsSAnZWagAAEYAQAKBq0WdMc5E6QCDmw3XH\n5ila8ts/+L75j4r49rMqCYs3zXq6wEtvN31/6qHyipuCo18qSD9kC20JnYWX\n8XjaBpvpADKQfoU1HmJRZIGR4FdVCOELWLqBWSJOE5ozkRBznTqUuLxyq3gZ\nngVXfv/xDlY8DXB8p82uc/kzUwR+bZTvIVATUPRTX0E5LS+/8DNuJexePKUU\n/KEFgC8SRuSbNDzBBkB3ccZNxJbmARXrEnv1sIR3edbsMZQPONxviUl6HCUS\nPhg5rhX/bP2LVyhNtEzl8hNHXixNkvzelrYXG2XqSBlgLhuNDHqSviUCXrpR\nG/PslyDyO7zQDEZ9IpBwvJrUZHrVy6BL1w8ihqNBQWKp5Yp9polyHRe0hHG5\ntMWYFnYnhM/i6Bg1+oJIOmp+Up862FXKu2GfvjJHxwAKIb+dwTyi74pvXm4C\nyTvT0I2vpTR2/R8ZTA9LBI9xdNQ4PJLVhRmXxna4MO2BKQvpCyR1QbZKAQe9\nC4nnXAy2u/HJljvEnzsC+4rEpnHj/VZHEOhMMdVgbXqNO+c/gcAmsbNB6Eu4\nMN4EP0xALLNtQlE59omYtSnkm6//M6zVn16dYaeD7s9ZDNwWR2C6WFAVbJoI\nD7f7NiTQkb2Lex0U7Q2UNr0ZoitY2Awa3FHF9MYhGQDEFz6I79wQZm24m0xk\ngMWz\r\n=27xc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICA4XPDAHnh8Ce2VPw3Q99N3GcOS90PaC/UPX4tFkcoFAiALAX0Kq+WTzthtVScBB2HXZSf1RXYkMjXAOqpFhz+ucQ=="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.5_1585768635525_0.003295806346802932"},"_hasShrinkwrap":false},"0.0.6":{"name":"@mihanizm56/redux-core-modules","version":"0.0.6","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"86e1c5f77e054545339936f568e5bd2572187826","_id":"@mihanizm56/redux-core-modules@0.0.6","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-13gFjBCdlueLtX+HnZLyeUo2UOoL1Guudy/R234o9kzMtCAbE6evpOQgVAmgGxPySmMgpqiDast7BWGGw7ZIfQ==","shasum":"128ca5499465693ecc889b9fbd9c378e89d5eb12","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.6.tgz","fileCount":141,"unpackedSize":106374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehR1gCRA9TVsSAnZWagAAgW0P/RxhAkUjrn2k1wkbtGjo\nW4ztVVM/LO2pfDMBHpvhTpA4HJ9GRUJypL3CBrqwT9CNX0ROqL7uWN5xEjbq\nHhgwzbNg8KwPEWgYS3aHUTUJL8JncbDUmTNJ5ij9+kHfNSFFJ5s7L7Z806wp\nez0Y/DvvojPlkcOJsrSAstAAsRGkIcgJ+ntLOCT4eJjAbIEqSvfl36TbUXLX\noAN4Aj/iwtCz6aFW9oJ1di8ekBWw6oulryGrwPra6Tv1ay/5ow5mS/PoQhIx\nU599IweEu2B7mSGEZNUscn7zC3SV+D1T+cPHzmgHtIESCvQgR/I+k78ZwY50\nqPk8vZbQnJmj+LA4dsBZI8mmVJQ45FiM8TxqNHysZYbENAR7SJ4QPT6kmYWT\ncpliXnh5uKlPqtEZ/rsBHXVCTcx1ZgWG4Hefh6tX+o/gQh/rEmKI7R1yaRl1\nHeRmj45jpK/jn+bB0a6qQ9Xgepx5Ncxre2OWF5KE+vPuEwgym1gR0p9b5VCB\nFAcXGWJAh3OL1eTz+eO6Is5+0yZxYvCmM/JpdAO+z9MXyUQjY+UwOUdETks1\n7w5/V3192o1IDiFvoj/Rs9MYP0Ch8sQNEuHcur1xnziQ3V2mfoO4m7sSx9ou\n3Kd+/hK3Nmz5tSMM4WEusdkcUnCmCJ+yyKVIxgeoPhbv99nAwjeAd9unrO8P\nw+ID\r\n=UuTz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/B7lFENcYrfpxIAJdIO/WCjupNgOMpE44G25/1YKDTwIgaY7OQ/kZdv+TfdF7ALk9pUaI8ftrau318H/IquzPEr0="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.6_1585782111866_0.3518892778152274"},"_hasShrinkwrap":false},"0.0.7":{"name":"@mihanizm56/redux-core-modules","version":"0.0.7","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"887d4f60cecf5e8eed24534548f257c0c89fff70","_id":"@mihanizm56/redux-core-modules@0.0.7","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-LmXBHLhY6sMDCXR21wPzXviz/M0AVBDMmhiC+GdGvIfztDZek1TuxCPLp5uKKpU33Vzptxux5UKTKodA7Gkhog==","shasum":"eab27dcf159184b1f92de780929f05a167fb3451","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.7.tgz","fileCount":141,"unpackedSize":106374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehR67CRA9TVsSAnZWagAAvCgQAIjCqQdPfFKwA6ZrePsm\nyvSmRwe+C8y5yhDOs36lhdj4DsghfnIoeENz+efETkDUSHsBOt/OoNTwFx3j\nywZSJa0ol8CRtBhFSyrrWZjOlODxzok6NGwPJ8s07CdUg3865cVB8ADHPOu6\nBtiFzOifr/75SHwEA925tZlNiXVYtdow5oRJDVgZ3k9IKa7vUbgdsUP79/s1\n7ll54jVtHdgkCXjLvjxlM+AroSdxYyvjCKs4OTdFtFE79D3IGI8Z22BTcx5W\nc04++/+IFv/PbL+SXEjPz8I8jkRS0xY8ZyPHeS23n/sONPKNIwz7j+jghjrl\n0PDuq63Uno4k9LBSTll2WUhB5TD/ugJjTM2DibxhaizauNszzZCWz5Fev2pi\nEMrm1zBFCjTe5VVnyVfMrH0vHBmbglP5Pz1xKgNVgPEdQ9rPu0pPtm5MT21q\nyoOd3RDcaT4LwfBZ0c6VlEO1MriAn0bIV2RNST5c3hNAIq2DOszN3SXnVnFC\nWOAdOHI+BDpyWdTwY3eoU4bx8cXk35MzIRuQ0GmHLVSJg4Og2EmeQEVuaaAD\n4TAOGcHWnyWivCb5AxMHD2E6th1ufgcQSdFU43NpcpdOStin/OYvLbm0XFSX\nvsiWCJQ6M526ZvYkUieecFV8dJIk8xz77Fy6e/bMC2fQrrU40LknB1f3I0lO\nQqQw\r\n=NOr8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP2F63cEJK9sVdCObfHRb0q27cid3qZyKDndeA0KFJywIgZ/3ZkSpk3UR18e5/Lthmmwiu+wq8yFvF9iZURXJVOaw="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.7_1585782458645_0.657915487725004"},"_hasShrinkwrap":false},"0.0.8":{"name":"@mihanizm56/redux-core-modules","version":"0.0.8","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d84054521c44ebbd31219ebdfd3d9f7397762d20","_id":"@mihanizm56/redux-core-modules@0.0.8","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-YKjIPm1TvJHjqEKxaQ1ihThlxESClF1XrbP/+OGsDF8sbyjm4Vzl4cpVf07KrlMyZUroo0n0LCVck4DfGPzrBw==","shasum":"1eb33b58a7489225646ad2da873bd80957650275","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.8.tgz","fileCount":3,"unpackedSize":3423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehSFHCRA9TVsSAnZWagAAB9AP/iGUQmSRWCqZLJAq6snH\nouRyEodEm0xzLrRWo2pu8ovPvGUlr2XoLnZPVNqOrplmPLtxD4PZ2W7VcmJm\np8vOm3xmIyFYhrFNvGzGxlQ9m+2Xwu0LcMSetjTF4Ur7fnCCxXrOGzAm6Zwr\n+NiPXUrrGpIhBpf0NkkPOx/pG1yfq8XFLNEBrDqQHkrYlAojxZu+MLI1EbZy\n/JqtcL75p73pPv5QwfsgR8/s6g3ccMnkUmBhrIX2l0AhDYUJevUvQxDr3RjX\nwXWRDQKdKhRAhLm4X+Tfu7orIq1mMwdq0t1PVuFmoyY8C2E6EaqPuvIPT7VK\nJjn2OoIFKcIIqS2G/kOwY0AS7jfZeJxzA4iePv3SWPj1nHoXSW+ol/c/ocX5\nbqJcoytgRKUO0Lgxbn2Nr5stpX7VwRn94vaWPOcShpdanbXakz2+W0Ex5ZEU\nanSkFuapC2df5zLmrOeoZEYPWKh3E8HmnGr+QrgETH7+Dr5+r3aHEsNOIfb9\nr1p5sLmWPIxEO0xD8yg05qEIYHmuBkSg0Z0WVxDxH85FkQRZWwyXF747T7tX\njpP5ah3oEw4LA1UmKwv6Xtm2chSVijgjOr72ZRF4KcLmVOcUtfIBkBIsZFhc\nqodPFsELtXEygvTkrPeNrCRmx7HZfBlvODHgIlINv6P6Z1s+iV6zaTTE1e5/\nduG6\r\n=MpLk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID+MocCcH2uskt6DHIBahjyeJagVDGM+cQgojKU9sxA7AiEA/pROectLi9SDNpFsxI3/oGKxObdyH6Rf1WKQJ9Fa/r4="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.8_1585783110988_0.42221917577455637"},"_hasShrinkwrap":false},"0.0.9":{"name":"@mihanizm56/redux-core-modules","version":"0.0.9","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"07ade434c20d81051817971752bfd0fa0e9ac463","_id":"@mihanizm56/redux-core-modules@0.0.9","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wx62elXXB2tIqDZDFsf3NbxVr5krjDQA0r7Sp178tiksHKjkYkxeS4wWh5ZnX3z4akMr6+B7tY6SzXkTGn+TEw==","shasum":"27289acf98f011f2bcbfe2841e8c0a9f3a598acb","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.9.tgz","fileCount":93,"unpackedSize":66062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehSGpCRA9TVsSAnZWagAAJ74P/itPPIJKR5N15NT3XdJt\nQyksVVlhEUb200siq0p5dljfBAyuBU7JM4al8HjYBfa1kvI6uP/KjfIPWqbf\nTrmOPyTcJtIphPUW33QVJ1WCWL03GV85W0rIvslAG/oml1TRDXt/xdlaGQYE\nQMTQ/i22lYIG8/lI1m5sD+AORQSAI2J+droH2CZQ/YhlJaHrDkKZ9sA6Bce3\n0jyS/RdpQo+iBJalm3g+zHVprMJbpgYz6iJUBGvaIcMpzb2wsW4wmWh7TfqZ\nJ5EN9lb0W2MEwsuwOXPiyYDXxTUURjNT27TKjFKNABw7d5ARZOuYYLif4qdy\n/ulYjWIE9Htw5ozlGsQvVVS7u0zjQGCzKxOxeHGgFn5LWz+XNaYmUULz627n\n4Oz8/TNcQ4/q8UWXVclgvb10VO2M9A0xGQjKzoY43cQwoCCSMfsi1LtNTyU6\nLF7IpE/3ciW9+OxUkjB2LqsryAIEOuYzeSxhOdDHaL9vUuiyh2ng2cL0yibC\neFtz4QdswBFGSQfojGgiVyo3LilP2ycKOM5QFBwENfeWB/9aPwIrqGuuEkJL\nU56WXnj8r+VksJbzzj/rQh7BTlzuU7SDj8OP1XiYV9OwBROyP85n5WveHs3N\nWm+jJNxEyK4PcAIYqrHL3vyRnTfrXR64u97DIuRREiauFj7sjZoIuQCUIjAg\nSwKj\r\n=PtQb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAjvSBUuTjrmgk1dqHwZS2FvLd+HEvVEzplPP82TVHwwAiEAtqs/a82yP9mM4uD93NN9RAAdyb9XY7ZwwX98Q92C1Z8="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.9_1585783208834_0.8431560977346964"},"_hasShrinkwrap":false},"0.0.10":{"name":"@mihanizm56/redux-core-modules","version":"0.0.10","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"85a3a05904fa12b946e2223683517d7cf4a8c7be","_id":"@mihanizm56/redux-core-modules@0.0.10","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-i6ZWfL0nRt9GjnC6bwJ1fbaX6AAK/Mt/phCYxG9Ag8r4SBamkMF6sogvBLJWCtBvhfVyArrB7UeOxC4Vdy+9VA==","shasum":"aaf984d70265544047ae9997a51f643d6ecf4e0d","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.10.tgz","fileCount":93,"unpackedSize":66101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehSI/CRA9TVsSAnZWagAA3EYP/3KdV/4mdUs9pzkwShvG\nqfypc4C15My8HPoO9vgDzkiUuq4DSSHUUOAfAvrMG6hWxt2Q6dq/5Q0PFzsK\nfvbL3fszNUgLLjgjM3E4utSUekd6bKgkvb9+J4ZfQJLkknrQ9fTLZt5WkqUs\nJYo0XCNsA6LHbrqpMxZRIhpJ1lCezKg5jxiPqfDwWxAX6ub9JxqgqQ/DRRe0\nxj9vhmX7b7DlPysrTrLDoXHZGt2oKg8D5+d2jtP6NLSpTLji+fqke0xL35xy\nZLeEkcWQqRIAn7kCRk/KmxV2RjcsubYDyGAGXMQGz4lQvsY/WMxNYVNY316E\ng2MyQh9WvKn36h5+kfW9B7jeHh3mz0fvdn0F++8lqey+FsHYAJavCuW75ZAO\nATCUkRioqenN/sKSVGODIZOO58r2F0ZoEYK0CgF2Ir27TzDpL1I8ymBeCT2L\nusM+vJVtCkjLa/ygajXoxtRvudsYlZ87gGDbxoygFBIBdVBjThBGOKUGIrqr\nlk3jwWMksEXCDytS0UeFW37UyNeTOzIZ5jXzIoduI482h9+7kS6WzfsTmqGp\nfGSRHA2OZA6yiMy9OhucLgNMRLGCXwmn+/hxWDZfBea8BfbOZc4ttCDvvsB3\nFqDJVOWep53nWhU+Ry6fVYefgaRHRlXPDr/jAl6W2ZJ5bK+HuEBbtw6uQybQ\n9Jci\r\n=t28d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE0MIYmSApCeUYUYw+gvh7pqxl/QxO/rfVwg9NpDWwpQIhAMzVthyrystIwOFdTxAbYi0P0pvv8SfpUTfp3aWBgDct"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.10_1585783358574_0.09228891000957695"},"_hasShrinkwrap":false},"0.0.11":{"name":"@mihanizm56/redux-core-modules","version":"0.0.11","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","save":"npm run commit && git push && git push && npm run pub","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"f4363888027046c404618438e3e8776b2f36ae1a","_id":"@mihanizm56/redux-core-modules@0.0.11","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-QXaDNcHxzLEQMt/6kTkjbf3aBMvgCxLuhxW0T9kEamObFeFHkURnEm89wU/YfUeMOy/rV4j3sPk66ZzRWzQMdw==","shasum":"f155c57dc0c0900952af49f9ef4e77bf3b597e36","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.11.tgz","fileCount":93,"unpackedSize":66127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehSNNCRA9TVsSAnZWagAAm80P/jfr23ZRiH0DqcCFd/j1\nl/qrwu2minXvviaqAftFNZebgF0s5Bt03M/AjS0o8g+TDGu2E2q93aIfSRSz\njQgEJL8d5/9wXdpTeqsfbyBpOgtWr8Aty3YrQKp7LqcR9OY7vDQIETTFQemg\nSnRf9w81EGY+CktaDDAiPDyePeDtAkBDQFjBxwbeQwqOVqPwFOmRHPDkqEfA\nHFSdLcksByquiECqjbC/C6WyDAqD/dWbFVg73xbGG+5ePHn7/cq2kiii2FvE\nFRbIaxsf9OKCH7PK/V+c66RvGjC7Yc+kOxcQSEj3yhWdxYM7Cl1I/qHnIub4\nDrJDRAsNand3TjisMkb0r1Ai6jrSwHaPfzrK6P3eLDsxmf5fKoQPKMLtMn8q\noqU0o+aEcHRAnX5IG/vpBob0sHOesvqSdojTjUX5DTkipCRXUOCElnZsWjz7\nrBYqZN81mDzEfguUM8AExF2fxtaanStcjIxZJ0wIXLVAlUpxlPONbnG0t84F\nCyZWYi8ai8rjd6xx02A+R8OWaE2Ks306OT8nAsXbm6T477VHigC6xvrcEEoH\nSwxpdbtj1+LjHQ2hSkUlRS5mY2T3QwErxit93IXCgRZP7QRPVUeVlYLdF2ZV\ndoUGdhI8ybdvgvqSlBMnyvmJ2/bYEZiK4B/fg7Ed7SfVb3tkDMj3mDnl9C0x\ncvt+\r\n=RiAP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC5arXJtWp7QEHKPNFZcjuNSqmrmooecVWduLj30JOTeAiEAzcQIyeVCX3rlKT1WzH0vhJ77HkFoMU2Ww92QYK8EErw="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.11_1585783628972_0.9424085323254843"},"_hasShrinkwrap":false},"0.0.12":{"name":"@mihanizm56/redux-core-modules","version":"0.0.12","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"67f02512857fe8fe543304217128d701c84289a0","_id":"@mihanizm56/redux-core-modules@0.0.12","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-0YehwfMLzkHCz/itNVBFasS4CAVPT7+z9qxMXB0D0ggN3GuWrf6jPoB/9VobKWGrlmi3t52L3nS3EQYJEzIFvg==","shasum":"bdbb37ff4ce9bb3ceb0e3531fc176202f76eae3e","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.12.tgz","fileCount":93,"unpackedSize":66794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehSg5CRA9TVsSAnZWagAA3CEP/3kXNT4t330MozMycMpZ\nBHHlDCJR8NydPgcuHJqhgElniWBZDaaAiHakA1QtXRElhbN6XqVA8FOMB9wV\nHsUDovKvKYoNW954IrVh+CEU+8WsroUCO/J+K+GWPZVjKHG2DtRK0cSlkpPN\n63Q4h5G3G7qIpJAlrMdxhkez8gosr8JFN8JsSHJ9ZWrhjYU9N/E8fJpTj6Jt\nYFVa5UAz6uQI3He6V7Ig5p7NlKRXEnT8WIs5B9kzu+wydDb3cczs6rulqbZq\nZDoKLlnk3mbpgzaCMRaO/YD2RF5NLvkfWeEYA/g09tYwCEGeXPBMYwfYPsN7\nTznBS2x7o4QM6p2I9Ui7T1apGUuA1lOb5IP1+Ln+jS/h6s3sWWyGFguMiTeP\nkxHVuKC1nhKX/NwjVZn6TxYRzIYAlkekfizIbkPKN8Id245xhp/0z/cq6y6t\nGEys+LQ917KTj+H5bxFzr1R1xscFR9wP7aQ4u8ZC2AaqnKJyeX+yESrz8DoS\nCmOiBj37YKJkkSu8cTuCscTuATVe50rpmJHdOO4ZCmZXc6x2LQ3rA3MVQDRF\n6HU+nEoFPoKciHU8EQH9A502AT9wS2Y1xykvvjEqdF8XQk283Oy6Ne0uuIeM\nZH2wyVZxDUlzLNfK/tKQO2LQ4c3Dct5JMVS3AR50vnQViWp25v4VPVSB4S94\n2N8b\r\n=alOS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDMc+D36ecUId+f44N8K0g8FgLNlaxsUoL32P8/XeQpgIhAKnigUfP1t94WyXg48bDJcPJg/dSntGjhC8pNi1YTxjY"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.12_1585784889535_0.6245493190021856"},"_hasShrinkwrap":false},"0.0.13":{"name":"@mihanizm56/redux-core-modules","version":"0.0.13","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"bb93583f06f6fb02c719376d2a8f126dccf2ed20","_id":"@mihanizm56/redux-core-modules@0.0.13","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-uUbV5WLvwjEDTkIhAgMeibH6/VhjJDG0gAy0uV5ftKNiNphhOIF0Kseqx5CtYeHtrKLeNL+QnXoQAKw52macPQ==","shasum":"38ddd8c3979a01f405971e3f27d6182155f43cfb","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-0.0.13.tgz","fileCount":93,"unpackedSize":67294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehTImCRA9TVsSAnZWagAAl7UQAIMCCOz4ORk5e3qVM1W2\nCmEZejRSL1uvB+HW5SpWSMlvJTr/0BZMmSWCFeCjYocBA6xbxv3TGK5OEszR\nogqOFFVqiN0p/GgrlMX/MdUp7aLwmk/vAxuN2lhuYTWxPtJjQ1rVZg5q3Zrz\nAYjqrj77ImWYSky9FJz9LT4LUPdrgyBC5MKrjNjh0Jg3zjShGgd/6voX+TMo\nZ73wQwIojBdfFNST4jVoH/HYU/Jv+lc7ptl30MheogO6DZhOARbCPOWlX+b4\nu0O4BQIZt1jWgNl4onVhlhZN/be0CcILXCGagYwmSK6woQtmGHFQExtgHO8q\naSnuY4PKLsqiT275sg80dLTLLVvigZa4ASJfgXiCnf234EDGzia15lJkbmPT\nFcdnb4yOrnG5gmHWX5ivnEuaG/NxXf3pGLCUhNhB2LF/DC0zbZ7b3IcVvtOZ\n9VIO8VcLcroxEZMSUQb6am4hKZZVwZx6A0DIBfsgWNhYJpmSRaFS2VPKUlFb\nDzj+ZTVuOFMjX6RU9cGvnZlzkhX1A9grr/YpnJAd9QKImfkWtk3FPv3t5bh4\nrPOAcnqOmi7JDMLmtTLu3txDlOsjIfsoqDOnf4Y07DNa4tMDTocpq1crgU/2\ndPOyMHYOoBVUDpo3IZTm0OFD0PB0YDICskO1w/P9XTQcX7l/Aj5Iem9aatW1\ncFj2\r\n=lh4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdwPE3noQin/NEj0NulzbNURpjN3feU5AlmJp656w8MAiEAgy6ETZ/hunVnUPrLGNVZ/H35Loq0lKI9nySrjOPBx5k="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_0.0.13_1585787430040_0.40565858587684733"},"_hasShrinkwrap":false},"1.0.0":{"name":"@mihanizm56/redux-core-modules","version":"1.0.0","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0","router5":"8.0.1","typescript":"3.8.3"},"devDependencies":{"@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"b6dc1d1a09a85091b95c40fafe11abaca1efb557","_id":"@mihanizm56/redux-core-modules@1.0.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Km7ImfOkIKb/pGlwiclkwf3+Ym/G4UoUbJSCzbnhy5xn3+u0PCDRfdr3XG76kV6eEy/RoovYXYL5SbSpSJfIfw==","shasum":"de956ba91ff2dbb450130a89c4f5faaff34d2f57","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.0.0.tgz","fileCount":93,"unpackedSize":72863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehTv1CRA9TVsSAnZWagAAksQP/imMVIaQ82p+YbkWYd98\nFDnQeG+hj7NlrO+GXxL7ZJh69DPsWXfrk5dsezaM7R8imZGdEDNehZfpiWY/\naHohsNgBrSIgEHVz+04nzgw7WMYXk0DuhRrJwWTFjAJ+ZFqkPlU6pF6+ly4L\na/eAloq9GLLFH5aGhz5udAnPdeJX0gocT8YODwVenc4UWDhvMqaGWuhL7d0Y\njEImJHyeWfS7wAPmWQfN8eNH6v2XNINugHcGH4l7Z5OV1WYaBq3XMcp6niHY\neXUGF+hM4I58/LywZLxE17eb5YwkPxgzfA3M59PnCqwzhQnI9DMw+ZYEGGv5\nruKFzXz9tRD1FU16LQKorcQ0jM2fOsUOCKTqBAQFyWyhWRdk4U/lPjScA2ai\n3nPNSuEH2qHApAIORLPDN1juf3TKqwAKNg5MRrGzW1UnppTTVHBebCBOYnC8\nCxwzEbUXSJDXTQ3CgQk1u55VUiAhZh8WXG//sq7lgaQBVBhIeI1xPr5bIexU\n3o0bLfYOJyNI9RAMRs03ATGYJLaBR+/RZ1TPNwCL/x2H2TlBegXqlhbcyHHo\npEDt4OrjpQElkwIWNqtHWISNKdb+SrNRCwHazlntWBapuZtU7VyGH167UO0m\niKgwG4quI0ljFoCKgpz6WoG2u4olYqydKRoOIxDrdxrivnO27Emd86QMuxC3\nVxso\r\n=leTw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM6erUOSMeAgo2tYDsTK7ug7kYTAoXIUpEUlwOzh0ZOAIgZUxK+O8IpjTmThwGPfXIhpbfFmphBWPQTzs/vsSRRuM="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.0.0_1585789940881_0.9172231359820542"},"_hasShrinkwrap":false},"1.0.1":{"name":"@mihanizm56/redux-core-modules","version":"1.0.1","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"c8f9a073cd62d1f6627b4cf004e9c7b069beb626","_id":"@mihanizm56/redux-core-modules@1.0.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-b3fJzhr3+cUZ98h1krlymM/aQBXrR0ZcH44eyx24gB0xAAYGxwAiYP2C899ohCHbtQpcArERFBukE3m3gSUmxQ==","shasum":"718c5d2d04a27d6c065facab2c47b249f2ce4ea4","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.0.1.tgz","fileCount":93,"unpackedSize":72863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehi2HCRA9TVsSAnZWagAA2TEP/340jUUPVPVsLNkJ92LW\ncOW87NtOOSFs1Oz1MG7KJkO/Vv60LP7cyON0pTNq+luqwaK472xaLmsN8ro5\nZ2ufALwb3UkzaYU8TYNnR7PUt3cvGoPF8YzyM51Aemr6z99UkcYJcRZB3KQ7\ncOI5sPjsYS6dEgMFbAVjnXgfEB+9gRI+4J0DWVqvw8cdInqV+6aGi5buW//g\nW6iD8WODVYI82984gEMIxkirY+oWIuXiOwfcbnR5i0r3oVsRNr26dcsgJtzI\n/oQiA20mky2aoWOWUPUUthn2F4tmZ2bj3mV0ClehJQMopDGwDlp4W9daF2ni\nCN4E/bAq2pVxHVQpTuL+cbaXcMEJumd0pYaq/Y2dCOuyolHwdp3ycgvBJAxX\ny3QBX55gkr9WpaFO2nMoYmyNaXKM69vrtemoCI9mAZQFfMICjbfWOjK8xpA0\n6iTGIGpcrN6JvsYQqKaKAVD4ZbcwO6nEeLGP0Dk95MInoK+AG2SisyvOTXdC\nV5QKaMxDl9ytyjH43ff6ydMrGnosquYzP60bn/V/AixYMenZ9eqzfkutTbS6\nMFMuZ5L2FmwIQDfNSyhATWoBg/2UIEuNbQ9tzKqag+2+qhUZJFhq2nmoOpFn\ngH2GijGAmYXp8F/mxX9azgV9m9R7C5J5aawMF76eYEw/EryIbXkUozGDy6Um\nFjCg\r\n=cRha\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh1hBGH8FCgrNaXFnC9Mu6wzsmf/BJ+1UlKHNrkj+dSgIgKRXZ4FYbPfbrEk8BwxCxT0WwQeYdqgvoNdLxcKtIQXk="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.0.1_1585851783075_0.6226908925910595"},"_hasShrinkwrap":false},"1.0.2":{"name":"@mihanizm56/redux-core-modules","version":"1.0.2","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"c8f9a073cd62d1f6627b4cf004e9c7b069beb626","_id":"@mihanizm56/redux-core-modules@1.0.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-AEnHJkiGuDmXzwK6uzqfSWORnVLVhPHaGmNW53VL2XRIGzXEQ+QSnBvFa3gInJhHX+67IocWxsqkyo3FSCb+8g==","shasum":"2651d125778a3049a3765ee39bad8c54948061a7","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.0.2.tgz","fileCount":93,"unpackedSize":72863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehi23CRA9TVsSAnZWagAAMnUQAI0av2XpVm/zNHI30bPy\nJujpgvDgx7LsEnTl8Jr2ZIe/duClBtbxg4IT99WLMKqPz36ENuYRXa1aIGcX\nxUJgG3MG0diCh3hoNTF+LxSGks8RLNM/Hzo/wnTGvLfQqduNw+zhp1UPWZ8Q\nITb6DhfESrlx8Q6oxg+Wcqg0/DaS0G4W3Ch7fFEwwX9NXEj0Oteh8LOShKNS\n1dtKJL9yDx+hs10ErgpCujiIM9VnOivyrAa/gJj+WhR65rwmKKBGJZWoGwSg\nZ/eMcW1jgzSg8bf6AROldxj0QjPtfjrAqM6dSBlqQJ4pymnLdwHWAzp7db2Q\nowfdPWwtEvE746SuxMKsiYRdUtlfGXFBdIONClzG2E1fXjsyZPWfFjrsFV60\nes6DkD/zCiybaULMjUz/qSG05NSRSbhjMMO+6hnE1j/kvPu/ig0FWf6KqH6T\nkQefLk8s3kojvoPU7zDpJcYMOK2QN8nqxd4kP+kmT2nGLDg06dmuUuphvbs5\n/h6ZWihLeESFceMlZsLl6mCiTinrhG9xk0QY1UZ5ub235KfSEzlPzpgUlwNW\njGNMDG5rnsyl4YijxGV0cLFtyJgm+TscjCYa0Y2RVoG10Ac++oqbmUxyH5xj\nh6U+zu3OTeeNb7qu4xxcfTXgdUb8T1GTkRC+ZUXK7lsnYCXIiTqyw9aA93l8\n1hxi\r\n=roed\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwO8goWguJSPC7efavrztD4Lg0CQuZ/oAoW/+bdgDKLAiEAqwJJ7sByoOgWRf0ERtDB2uoYxLD+WnoqJRcPz2fH1jY="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.0.2_1585851831112_0.882007380802297"},"_hasShrinkwrap":false},"1.0.3":{"name":"@mihanizm56/redux-core-modules","version":"1.0.3","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/fetch-api":"3.0.3","lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"2a9cf95b4df2afbf15667925584661be29e46635","_id":"@mihanizm56/redux-core-modules@1.0.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-rxPugBGAAbL4SwsFNOiXLNtA5tZxQAGWgwTgOranEWWKd2S/MVDkDx5UEVwUIRHkdGqH5EoUdPo2NeU4cAB7yA==","shasum":"bb38ca9942adbe767c3863c4017a4ad8d861e5d3","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.0.3.tgz","fileCount":93,"unpackedSize":72863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehi35CRA9TVsSAnZWagAAN/wP/3XiNLpPdFGgGCLExWXq\n/h1F/Zg/rtg+1bgR1FwaIso3Lh4MwWPSKZmqUSh6TTtb0mwMLP1/Xl0QY8zP\n4BgaykI339f06adYWh69V+wNVBdRKfO4IvLwNIvvsBX3CHNCSWS2o+eCoAqg\ndkkN8TThqZRNk8kp94L9xGhDyvyiRTOiLK7kykbqnsJHciRt/lzZlqDtPRvY\nsv4+ZNm/+S4EqSsVhg05C6hvs+Hg9xeOmgteDmiNAcC3JCvkJTPMl588F2fw\nXsK3YwO0eURkWEr8TPo/YZXWxDxoQuljf1I+7valKl7HOAv2uP6u/C6lE38o\nyaMa1YNi9zcX6L6O7nJhJrCQbwYbkCxC8kAOJoVvM5aogEcmejVX0QUfCQV6\n14WFAANyMhuZMHTS01sXC8MIhVjuHxYwwH6XOeugIGqPhr5xDCEZKWj29fMz\n9Zy2oyKtTYYygWjpqAEpuzbK1dUh+ydf4+8mRlqcA2O+rRpqQtjjiQFzpq68\nzbPqnvcWw/geG9so9R6cSl7xAAURLZoePLRnyrMPzw3mdmf+P4voD+cZ0ImN\nuu4QrgmiqE69N1Cuqso08AT75pToz89232EOUKInzBOgxLAopiMZfowVjMo2\nA+Nu1NHs76ea1sWAkU0hTvs9IXpFTWRJmW80pRK/ciP+uIDXAg/5wwobf+fa\nHxcb\r\n=jgtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9O7iMGo1LWU09visNtTYXPYdTw4PGMlA2LNaJk5WjGgIgYxNiP8k6wV95V2/Olxynvq4v9Je2KjE5zCw02rBPExI="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.0.3_1585851896777_0.9560074726786394"},"_hasShrinkwrap":false},"1.1.0":{"name":"@mihanizm56/redux-core-modules","version":"1.1.0","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"@mihanizm56/fetch-api":"3.0.3","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"1a2a4af6128db55e863d5e40ba7a4c915f2064a2","_id":"@mihanizm56/redux-core-modules@1.1.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-1M6Dbt1GbhZ3DyaPT0T28s0LdKAOCl0dShTHMFnxmitnLzaDDogHpLJUdYcU3/q5RZ+k/inZauRYul6Ud/p6bQ==","shasum":"1d18364da935b84b013287ae6775f6398d8f3b16","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.1.0.tgz","fileCount":95,"unpackedSize":73435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehjHgCRA9TVsSAnZWagAAgBkP/05la8GNQsTQJwDCXHAF\nKva3mPiINELl6W3rTCgKbH4oL9M/hyhPdQ0dHtQTlgYYc7UPuiWMq+CWH2wr\nDLIaDizaYpBA00FSoY4GdZWwTyr/ejU4TIbKY7fwbXhf/KM5Xjj14zkfT95M\nt9EJ3k5EMelqrtI17cL0PkaBsSW+MCLi5w1keg8XPaLC43h249x5Lzf3u42z\nd+Lsb4nUVeIJxEJXoQGQeiKN7nxWmScmLZkAQKMgVHtXeKYi0cRyCohilHd0\n76M68KRLzHiwzfCaCGgXOscwRS6CeKOin4fA5yfe/0rbuahjpTJmiNy8YTte\nC0PePTr1Dk/QQx/61YnREvtageob2pRVgFNx+9kDF8wXMpbEuBk7ry7ixk6+\nEHhskyHzbLYQNQSztLV6pnzOySkFALkNvuS5i3D2ZOTToeYMC3QiTru/dK3T\ndc1TB9cVLXFKnXzFPif7nyEdBcVAPgj7UCIwQ4JGpv6vVrhZ8DqAjyMMGmTW\naDOPrs5TJO8dbImO8C4NpCl/VmnkIec9iFua+51UGSYdcWazOTTlYl1sNac/\nYynfH/hV0zJQuQO5QrT48BstLd1sedohXW0gr4E6PoXcAI2viFArD8mh9dfY\n5lgk8thpDWay0NoCVyKMvO/XoQu/5qVCpxru93XsoGWogQTvFJIv7KPf2tx/\n3G40\r\n=zBrF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeXgOy707w2oCSJyUn2feiaX6RH9KTaBiRzEe2x+qXYgIgK3mMFm1dbkT9ts/d4BrnvM623GAjEm+upEoOqDaRVHA="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.1.0_1585852896005_0.7762210921415129"},"_hasShrinkwrap":false},"1.1.1":{"name":"@mihanizm56/redux-core-modules","version":"1.1.1","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"lodash-es":"4.17.15","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"@mihanizm56/fetch-api":"3.0.3","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"b9394947e0becc429d0bd6a7bd16340e8cbb6adf","_id":"@mihanizm56/redux-core-modules@1.1.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-qcP8paQSw7v5/WgqiD5LqAWVwLAQA6je2SvbA7mZAvltyF4IbmGxcCEJ6MJ06GHJNByDBtfgz8zeGtj5LIB++A==","shasum":"07133583bdabf56af4c8e8b79f8c0a6ecdcb0e46","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.1.1.tgz","fileCount":95,"unpackedSize":74096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh0P3CRA9TVsSAnZWagAAHiAP/3rNYPLIGGdxMZAPcsyK\nha1MtCbaKp9HP1IbdyPDeoKkA3PV2j+XjYzJu/yRnQy2ZaeYEKVWYcIGztKR\n17TQl8OCvQb+CUyKma1uPQWTpU7HeGbXLnJzhJgamzT63CoMweYIEq6/jNbM\nbLXw/xgyiKMXYolsJW1XzPT3zo8ANOSu7r2ewOsnuvOOfs/VDC0QlJMGqK8D\noM7JmWlJPtShpn4BHnPywatvPGqUgvvBm7e9+/AOWhu4t7S56zr1LjgC4apY\nn8mOnhpV99pTbV6eJqjx2w+9AFSL/PVhUTlDa/Uvf0e6FZTz4dJki0Bbrp89\nDq4MKI7dEckW4QiWdBXLCbYCvDLVqLFSDEIqiSzTCmck7ZUCgJ2SOk9R6Msd\nOgDNFre0Ox5ANymEEdeKF8a6pGLfJ8aiyf5waHMmYqurs/VLpPqcNLPEYbnr\nX8m/Jns7BSWty+iEBNR05gEB2l1BQ4NxNH69Oj4gPNNPuVfuTM0F8UK8rKJE\nrk/v+uUsWifqBUWxmi6kLjiw2RoFQidtwGRo9SL6u/jwHM9zf9cb3Ccl4KJB\nIkU/YEUV5fAm8fS0U2HRBR/XXa6eRX2/ITVWLm6alQoYgcsKu934MXRH8tvg\nwBy7+Zg0lFHKc9702vQaA01CfU6N9YUOmRGGn3Oq2X2wGdI5kAkm9QllQofS\nMJgR\r\n=BkgQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVe7nfYToEmPHtZuMFinzPjUwVwlN/Gan+si+Y4GDdsAIhANDFOTjuOn3Grwep/hl0G5twlry+jwi5dqpLWO5gk9Ae"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.1.1_1585923062886_0.9907474042508482"},"_hasShrinkwrap":false},"1.2.0":{"name":"@mihanizm56/redux-core-modules","version":"1.2.0","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"e2e72104e90db6053803e9a1fe9e940913216a4f","_id":"@mihanizm56/redux-core-modules@1.2.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-outr/HXZQi14UuxRpMBmluhpDae0KJC2yLt92iMQiUF9a5jYHB+Fo5VQ6uSVtKaH6j1fiQSVKvl+EXaq501Wcg==","shasum":"63c3fcc61274edd76d517d938ed17b5943120bbe","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.0.tgz","fileCount":95,"unpackedSize":70908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiQ4rCRA9TVsSAnZWagAAYZ0QAIJDS7KVP1WfcJ1PcACv\n6vNIS+2s6gMAzJCX1Y5KNiVrcL6G/OfR5kAmNL3eEt7ojSOhev8o4YrHi5yW\n4VoYTNLyv6/AK2N13m0mkcFvcD14is7rhVNeSfgkI/nYoUgMeXtfX9EfrlZH\nP3KgMRVb/786WcCg3n4uUxIlR2sBLGHiRZIUInLdoK2sMPSTtk0lP8fGm+Zc\n5KXbdTwb/DpPwVuglO76p34H0J8SzpWBZkHoFP7a+nEkHt1nbCnLnDRa9CCh\nL/3dagsVAGct5baoF3yo7uRB5yU25wh50cItBANdQE6+mhaRqTn4vgUSgEbc\nvbJBeWvscCWm5TNMW4jR7iAdfBeoSHqVqWfJsWgv9f1qMQX6L0M9DX/ivmll\n6cl/3xUUJy3lWtHybMxScKgZqZWThKislBOAyGurEfPwrRhFrwUt6b4OJrov\nrONFNsjp7suCNpSAeEZenApo3luYuR1CaF3o82Hjp9+ulo+KhjGWdq4JfvtJ\ndTTlwEZblRhjveJgTFLMaNtPTEmtStANfZ5MTjG8W1hqNBmFwJdRP1chOqt5\nXRliT1ahs0x9z3n6cvrlsdLwZXFm3noqCMCLXcdcLXnqZNqpGCZmXUYyohIF\nl9GAYwfgU1M4FZFgOGE3O5dOyyygpJYjt2InZovOGEdLaQp0P5vkEdNuXbEb\n1tme\r\n=39zl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5uV1wa6f/ptK6wTR39gqvLloHcrMJ/nPD+t0RB1+U2AIhAPDnje9JXgtXsN+R0r8y17L1htSwOwxnJQL6ZR8IwQ+X"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.0_1586040363259_0.6491847461799525"},"_hasShrinkwrap":false},"1.2.0-beta-1":{"name":"@mihanizm56/redux-core-modules","version":"1.2.0-beta-1","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"@mihanizm56/redux-core-modules":"node ./","test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"4af8f5955adfedc295c29509098ff1ff08dc2019","_id":"@mihanizm56/redux-core-modules@1.2.0-beta-1","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-uCxnkiOk5Zs6aMKI9vc3GOxfvHJk1RlTmakuoH5swzXOxah86EX7ao/0EckZ3E06Z6jqUa2kwkgGQxcObuqpYQ==","shasum":"27888d4102ad32b0f19a07ec9f938931bd71a90c","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.0-beta-1.tgz","fileCount":96,"unpackedSize":71020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihBdCRA9TVsSAnZWagAAdSQP/R/H5yD1XI4tCZB9Ly34\nXasPnwC3qcbAlaX3XFZkj2y3bXmCS/u1eNxqOnqoDHvCEbj0XCbE3sWoJQAv\npwM6lGT3+1QfF5ncGVKuobVchSGM9/u9JjPCa5nFU/S4NbdkPC9li/fIzwQ+\n0vmqmm/+9IDKbkuMVWwG1aL+3nBtE6z0ei/I6srMfps5b/EuLWNOKxLeZY2k\nQAcrd4P605+l3F1YoOSp63Vmmse6W5EjAW+lfeADo3HG9oAryOM5jT5qtqXb\nGONFa7UDTl/8zkWOmyEVCv3y5Tkq6BfTVP8H1o6IfR6kA5Xg+Fftvk9pRmPE\nkUNignmgVbSlH/3I8agBqiRGjmbDToAA3VlE2vueERZE2POcErfJueOr9dDZ\nMTgXXvZmmA53h2xG0f/Run4jOQs7FWRLpYuaASiEtoTLB4VJ9aqB8eMKSyNr\nDTMW1K2zIvWKFm4vV1nMUF7rHSv3zCRv5E5QXDpWE9RcYGCMPg3y62ETGUjY\nEC9B93EcjteAqBufhrC94K9nq5703FlZPScpSlq8go6EgYqWkt27hYeBlSr9\nwzVSCaDqZnOHtxPH0RWcgdhNMo9bZJ+tvF+SBVkkSDoC2q0qvG1CsKwATMoh\nFJ8n9xNA2P+oOuDrdcWbme/8lzDejTrBbVPb6dAd3JGKLjTuXZH59EywBGzK\nbVJB\r\n=gu+l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRV3/Cvi/l3ea7CzY9SYYdLto4tkWkiJHKdBdhEWLBMAiEAxEiNbp0Iw4tm0KnZTGQOGL96ZruiA2Oz/CrBMBAzb9g="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.0-beta-1_1586106460650_0.0433731398643844"},"_hasShrinkwrap":false},"1.2.0-beta-2":{"name":"@mihanizm56/redux-core-modules","version":"1.2.0-beta-2","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"@mihanizm56/redux-core-modules":"node ./hello.js","test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"4114def856a6b900f1f60d3b6b10f44abd47ccb5","_id":"@mihanizm56/redux-core-modules@1.2.0-beta-2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-klJ7iLy9kEHajyQL/L8+qi7uKlL5otr9+qQ3VMnLEs31lE2QpzjD5EcOGR8aueL5C9tVTXaamgXlMNS5e32Hbg==","shasum":"1a93996826b8c4adc7be22f43cc4bb026f55ccf6","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.0-beta-2.tgz","fileCount":96,"unpackedSize":71028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihD+CRA9TVsSAnZWagAACtcP/3W0ZOFpymJSUXz9F1Xb\nij1NDT2K46kjGcSbpz6AL1Eyfwj6j8XEZIzWRa2zEUPl5HNbUQWC1mIZTDHF\nerMtVIHEm3KonUO+kzfIHHul5TpHb1sYnoyOh9KxdyT4DBDcw0rGvJGpGjSL\n9ZpQrUrdWEZTj59OyTFS8IjATiCB6UNRzbWwDs0o5FSREA4zTdkVQw5iehv8\ngCTUwEFvg0aI1KJWfn2lgakPi7PaAk3DONkXaphqicQkfBx4e/yigSGhRqHZ\n+DuVroXWoNkl/tXdXrMudLgJb/Y0QVKtlS1Nx/mDCaHk13M9ue5c1EWaW8Jy\nBbyH1qAgg5nM2w5Z5aesJpLdULqw4biUis9s2EYTCHFaSj5oPULOxIHtvux+\nEqXp6yOcyzpEOavPmWWK+uui7lHQZduOY8LWp1QoYq8DsHhvzg8vPsKoxiAO\nEUEGSbWJRNgmVc12rRIewq2V9On69TDdAAKFPkQYfdA0XzFyfPDLhW81mjl8\nzWmPnArrp1ydylAvIbeefqapHQLAqQcKJW9R9aHLHohu8GmVk7AAam3Dmg1P\neTycLDX5jAmmgQEuGPvqL1C51Htpx84ELDRFiX5Dh3dpZ7M3mz/frmzvc/FH\nY4VWG6gZcQmGqhO12sCpmBVkHWIRqHL+IFpEPDgLM8UramltqudDheQI/Q88\n4K5q\r\n=vALQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/OG9SY+cfkBL1uxlktCBGQ0yA3aeur0v9u7frvOQ8FAIgNpmhfSGSMVWcuR0jFAIlCWncgl65M/0U+XiJKfagY9Q="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.0-beta-2_1586106621930_0.8636422675626789"},"_hasShrinkwrap":false},"1.2.1":{"name":"@mihanizm56/redux-core-modules","version":"1.2.1","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"redux-core-modules-setup-test":"node ./hello.js","test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"8782bf42523c0f534eb64d8ff46a76666924ae12","_id":"@mihanizm56/redux-core-modules@1.2.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-dpnfO0v+5JjjzEvhrhXsRNHk4AzHNC1/rqqBw76i+uqsXakOBqVUaWRt0977IfVDjcyZppgUzsCujwY0SgWQYg==","shasum":"9b2d2b3d5415949f0bdee11399c2cca4100e852f","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.1.tgz","fileCount":96,"unpackedSize":71020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihGVCRA9TVsSAnZWagAAK7kQAJjTw/nJAlEp5wXaVHrP\nM10/7zbA393QzJMjU6Ov0EWAtZQVxmyVwa3AlRl6wfAfFDCcatBcUqPb8ukq\nAYymEPFy1+MQMMu1UvUzkev8u2WfwSMyLbMv5x3DkA5HKeK2xxFgEbIbehGI\nENmETG/UeSZhkeIh2a0nEdsIkZuE+YBOqpRabzvDUzdbm7BovpPj3tPxR3x7\n757rFo1NhyjOpOOAVydirbxmWewd0jyMDUk7o8q32bxSJLfv30/VvPUN1hLl\nQFegQ7XfFkxmWUNOZtEW+7I6mebm09XonOoQmn+84H3xnRmI7QW5BnuyS6BE\ni1xOW7l5MmcSULsrvUv5Aa8pim9KjHZZCqfiVaJGqedwg1YmncUVdELnFlRX\nLKqoyF6mBmzhB05jtLjNt7zcJNkDYLltisiE7P5Wq1nNj8BmhSazcSCVQaVW\n/higxTT49BadYzt/LrVwxlUI0L7pMNnwncP327mO+cub52rtuWGLZ5p7G6BV\nEtTyQVKqnRwu3OQdLMq5TjXm39Y6CxEyCQ2R96y2rpM7XU208tqkOolY9y//\nifVKcSOh9p/+jMjHtayianoX1Czush8K6i8bwPlKl7Mquv5HOPwBEoc/J+Q9\nCi7se77/Q60K1JEFiFjCMGJ+b5gJxb6/WslqO4U5ZIGbObCtHgM4agI6v98S\n4Cd7\r\n=Wce4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS/ilYuYt+5W5iZ1VCi4zwl00EKS07rCwfAjNK5LAvywIgFc7bkvu0Fv4+rOC/mGkMUnIMfzmPVcLuOLMTtl89W7M="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.1_1586106772766_0.73753040143801"},"_hasShrinkwrap":false},"1.2.2":{"name":"@mihanizm56/redux-core-modules","version":"1.2.2","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules-setup-test":"hello.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"ec0cf69295d1e274b36d97ea261879d49677c0d7","_id":"@mihanizm56/redux-core-modules@1.2.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-DKFXI5yok2snjXiHR49rC3OlBivM6+ms1FbAZW+/lW5L3ZIvhj0sUrC3MUuqx0URmhhCi85Yf9l5Seb+WhWwLA==","shasum":"13ac7edc337c6dd61dc8d280cab0d3144bdf338b","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.2.tgz","fileCount":96,"unpackedSize":71051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihVjCRA9TVsSAnZWagAAkdoP/0yyglfRK5bd3fumJb7+\nUICGei05sT45YaENlw0e5xExLks1AGnzWFaHkTyllpq1OSzsE7fg0VwxU3KY\nOA3RtN/y32VQ9Z5WzbwE/6uQzjXSrFlZ97uUdckvzosyI8zuiLG2Xd+vZJvz\nCNR7r/FAl4ZuC+CuvrOsJjhh6ELrfBFWlhbG5nGFM7yFgZ2GMipQLlveV+1y\n/gW77pE366Y8tSPqUBcQDNiWjdDxKl1Nf3XQ69Q8/xGgNqmld+4YBjRbHZ87\ncIKjjNtRYScM8Iyqsa1thuNDyO3wRPz9fpISkKIB/E39OFxEzKE2v+dqwmKW\nFn+eY+0x+VEdk4pWP34h8Drg3KQdgu7HrlvDxipduccGK2C3PCep3VF6QHcl\n/+SplpojqaTurMt7r11gQUz8tFznYbE6Rg0kkcRx+YbZKQoa/6Ndgfqn5PXV\nF8stoyZweQHcBayfyrNb0r/bdaPBYJv7AGnItrbk6DP8VmGK3ZRx0gzt3/Lu\no6qMMiROM41NWx4OHJO/WIDVof9AXu2bcsaKIIVhwKiqXJe6RtQDv+U7D16W\n+2zzM7jeVcC0hnMOsn2pyApSpsgYp8CHzzHIQZg+uiCzntZJBK74P3WT2Q9V\nHwCrVHVX1K9D08048TzEsTcRzSXf/lyUgSGgpSRxU25oVbpf8FTUc3VMXSHz\neE48\r\n=i6wy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTZl8pvHlpFlvyFsjo0kP8Tvs8P7ShLbcgwbnrBsZXkAiEAzALt/ekGDMzYNrAvf24uA8buac0T2bMYmPKP6mys0rw="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.2_1586107747455_0.8714254658933596"},"_hasShrinkwrap":false},"1.2.3":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules-setup-test":"hello.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"e1970732121f10796caed2b2f030c7861cde5bd0","_id":"@mihanizm56/redux-core-modules@1.2.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-5s3sg6vmPK3yNqu3NfNfpjPhW72spRygA6wMpQlzJ3orawSwQt0yPqg+efMXcjQRzTEhTH4KAL9eVVGDc2zcdQ==","shasum":"c7b9acc7614301f8a825230e20eefe00f8ff879c","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3.tgz","fileCount":96,"unpackedSize":71051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihWlCRA9TVsSAnZWagAAmwsP/j0KQlWVWll6BPplqGyv\nbk1cmXvQUhI3zXm3qTIlhiGnasCH4EhDRzHp+CGkWzoe/uMxP6oMV/SaZ/3q\nx5tP+UwXVbrtogjNjR9rMg3lfjAafEYWHXh/LLl5xFdUahZ36ThRpPsV1WLh\n6a6ccsEI0B9akSbf6OcjBZhJV/pKYo8TkaEkjANqZ3UqM1aYs9wlio0+ht4k\nckKjVXE1vtt1/7Ru0it74NK64xuTaC3bpCWmtGy4t1fXWt+92/a/NXGeUHbb\notA6O/Mg0eDQKtwUMeurP/zSWXhvFiaBhRebbSGy9NogNp1ZyDPmXwN1Wfy0\nI0gHJYYZfhCQcxRVhPzZU6NvwBBrFWuVxqW4CYBvttaNSOYYU6HvfzZTZTWS\n+8znw4l44lugiYLegw3fQazNoYTyqC9Cr3si1NTs5f1AtXWkk9wDkAK91GCC\nfGVEBZMHtzYhuf42VzlvYCXaN27Ck1hIGaAdaMk3tYTBCzCP1MgkAUzUfBzv\n1C4qgsmaFBgCAlxqg5hBdyqhpkKJ24/Wr/KSSpPDaKgGj5xHnWs/PKiMXa5H\nbY4nZQdR78H3483aA/p6f5u4TnR5fHlOiuJvw8HayGIYazKOUnjoBb9zbf8p\n+jsoOf/BPdZCOWZL2to7mBieDjW6pqPHdkxGFVTz8WpJufGN8KFHqJDtILFE\nU9lZ\r\n=EoYK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5WfTCW4gXp07rAQrvSgixmhoJx3qVOZzKx2Znvf2IrAiEA1ExHVbIct10XP8CMbAWrsUeP2Ebl5XQJ/+7anQG98NE="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3_1586107812612_0.32931583711808665"},"_hasShrinkwrap":false},"1.2.3-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.2","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"hello.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"416c420eb9e3881ee6b3e75d0616d8e999c5ad92","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Z4oBQY+apheHsqbOMG57dXOz16Mi3d+TsFNyQPUfQlPfu+eNfwnu7UicxXy930MlwKPf1UMSFGHbJI0wLpT8Rg==","shasum":"6674a6e125baa63d41d6dee5d8ce2466c6d5a0ea","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.2.tgz","fileCount":96,"unpackedSize":71097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihfPCRA9TVsSAnZWagAAs48P/jX+QhDJ6oInsJoL57t7\nms8IS6g2++Wdddmp8RuRKoTiTn4h5Zphw8pOqE2G4/zor8S99My98klwo9Kw\nRT2etKR1Q02LsXQgB3BbfKlag3fba1Y1LYMjhddj5mBiHFkclXlIXgTdNNWm\nFoc9E1Gk0oALHrqN7WRkIMdW+jnXQGJKndQSzlW6VEszm5UJt9guS7bm6/U2\nA1xQrwE+tfg6gSENhxnQK0RQGAmTGdvaJ+5lRLvzJD35bUHU/NoK6Sx5NELT\nYtpV2X7b8Z4z5L2PB1YN7S3e68g2m2iZtZsVkjfFEFcf++lNUAgkUCi1PUgc\n+6bTdW1aE2kDYxvIZo2wQvTY87cK6U277IRRSAC5/DC30GtPSFHxBOgFeF1t\n8H76Gp223DUM+u6YdU/lM5QeEAVfdWg7Minve+CHNKh6GQjylTbGwfgKtmHf\n0kJQjube2ItesG7ZXTTAlnH8TIoH4pZnHok7YrcKUsQxCO/kj9RM4C76njSp\n1TwzxrGD9d2YU17htj+DqEz/2fiw5WI2gyDbbsEpOB1r8Dz+Rw4Ng2Yp31kz\nEFTZWjOjyHVD8ERD4dQpQfej0IpuWa/WmyqY9KL5lk0ftO4w29W7/CEM+jza\nSjcWkJnHZftmhhCP/2FL0yFNExB4KQhCOAe/1FZu1RnpeYgYUyQTibfn43D3\n+RCp\r\n=aHlf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAR+D7ixCXznCeGjEM7InLnNfe0yhDEh7V+6KYJGrAbkAiEA1xmljFbxLFbctERV/pwEwDvH8yl55yrZ5kKCmyvvU4o="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.2_1586108367515_0.4006096059471822"},"_hasShrinkwrap":false},"1.2.3-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.3","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"hello.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"dbea319a9f552ab390cb35550ec41e3c58fb0878","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-0NTjf5qVAw8gsLkjlTb4kyXU+3Gxpdpi8eQ6i+Vfu0Cif/HjCaa+E9b9g5njgi1DnKbKswN0Pv1PLBPTDQmdUg==","shasum":"7188852c7c057db9ae13aca126a31f814a91b283","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.3.tgz","fileCount":96,"unpackedSize":71103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihhqCRA9TVsSAnZWagAAE8UP/j/OOmdQTIlDmazBMGwS\niGj5cADiwvKZQonuhoDHs21NocwA2QXZFeM3k79WSV7JWFRi3HkL6dzWGfr9\noRaSzOSZk2zNLrVxGD4KDZFhdKLEh2DAP2kdIDEpYFN2WISYGXwutvU2xlTC\n1RNPvNYaDFdMTDs+nilaDYqF/a5Sd0Nh+TAYzpwB8++T2M13/Q+WKVSasMAi\nLicngHwDrQpBFUzYdzUXe1RpPOrjs/5JOksUQzhOOCBfG1DiBRoV/nRD9X0F\nzvwggfmV1vjCrigK26dsA4SwtWX7HklkmhLDMpL5UWibgASiCCX+lq9z3YkF\nu9tZxJEs/K2ae0wel3gczkdRBPyZdFb9a0FD0EzLwkiNPFMIwg1vy96bwcvN\nNeQ75p7f71KGGQ90jMPu55ChmjfXPr8J2Prx1w51DPRcb7V9eOBgXdd21yhE\nA98L+ISRDg3Dc/4rUMywbE4zYXs60WAt01Eve37cKx9wpzfj/bemqHXoryoZ\nTrC9fL57yYJWQQSwvWehT3MjPZrDDhU6ZA/wl3J0s8L6i7oSmk2gvuT6ApbV\nddvG6ohwWn8qwafi7vBP/WCphgYFfE7R07phQZQgZ7R6LTpjlh5YVyyXTTRi\ncFwhj2WOmPWobBpC9Ybm1QIwyF/xrGKLLzr83mawXOJZHnPWI1kEr4P1EuhU\ncVv6\r\n=ERwI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTN9hBjWIixrEGNguhKQrPDPjiu1Hd7ugjX4Nk6lJ3fwIgTE7n7RzoaNZtw1vcT0/VH34ASy2oWaNPPf7nST2fSpg="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.3_1586108522342_0.9063521224009121"},"_hasShrinkwrap":false},"1.2.3-beta.4":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.4","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"hello.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"1b236708c77f3e3d09f760c600ef93eac4c3ca50","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.4","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-n87klbMqEcbKSMMxEm3HOd4XwnbHtwPJYrwiDWA8sJIMvlYn4Vk+oEbv9BWQ3nIFNeyAdBJVZRk8mtBLC/GKBA==","shasum":"116bddd5d30a651a6dc47fb0c93d59f931cec638","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.4.tgz","fileCount":96,"unpackedSize":71103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeihkaCRA9TVsSAnZWagAAyksP/2ewUdFVivaX8YIrB7nP\nf/rDOWtQ54h1LX5ymt0x8ppyRsxfnBhAUWznEbNe5er8xMjtE89Pg8JZa872\nXQjYEmHaOUABiow6Jr+D5DQYR8URFl4edBU0Vm72KYrUb0JI3cjXaTFLzB5D\nculE4qFp1TVkqVg7oNhnQy8pvHXaCXNTIenwiVNdbuFUId7bkaIYIG98XqfI\nJoVH9sImslx0MdQMWxd1NeZWuunUNgF355KWQXqtxgSJTD/31/oBRNB2gSXH\ncTUC8LJvID47NQzNUyNOyq7sUoEqMqSbFGHwC0UeZF8b5SeyDrNZh/wc++Ym\nSk4wsaW49686GN+j6OVONxkzMGMH0q+vBij5/eBjEAPtZeVXeUCyQXvZfFqZ\nGu3lPTdfVPiOa8jMBNJBItgfXWXI6FLTNq9Yd/qBTDWIXD8fFy0EWFLFjI4s\nwPN5/DGB5Eo+82W0BMTyvvk8SJtYlx3o632pmQ26gzB3Rdu0QQ3QSNLK9wIg\nIoiYDCSGg1gn0y0TyrMHKkNmtf9YIARtZesokFUH8TQx3kxiqcZzbDNstRuy\nW8msp1VttITIahLDMbLKBt3BqfQMe0D7266v+CPZ5aM7LU6wCXwsTFoHJu7j\nRTUpsnSkDcY+9h0jU15qyq9Unb5+BL+S2+gUYMa95Dzcz+xJklaHG3V3HmF7\nFKUr\r\n=cQWT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZUCw09KZmc7YKr7FFPXaf3FW9LsZwyyRMsvDY1DfTAAiEAvMEAItLN0mIBQaG9ErXTe1hzsuYWv4Q0WfQoGWeb7Iw="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.4_1586108697785_0.0209685488411695"},"_hasShrinkwrap":false},"1.2.3-beta.5":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.5","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"fd09cc374db54de796ddcc5e1c977f5978762b6c","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.5","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-0JX1+H7GKVF9ZlMqoJcHf/8keN9R1Vb3lyMO1hB90wgWsbx+CmuuddZUpNCtBgq3baKtQgheg34ZpG4duf8IPg==","shasum":"204af94577eda4802702dfe801be54ea7f5437f6","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.5.tgz","fileCount":96,"unpackedSize":71395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeih8GCRA9TVsSAnZWagAAg+AP/22wBsrLqe/tHh5uHAo5\nznHWxuUn2yzzafeZrYmEPXXOYYBK8+MzAZJ9QDh5MUSplOX7FzThvq315Zf5\n/ao95jzj5UTeNLv/FoxjNpYbp/cO9cPAdy4YkADW7v/Llko1LusmLe651fc4\n0B+qVNNCP5CB6XCLzbE5f/I0h1BDHjgdxtX4XdSVqDucgO1iuDnCNWHZw+cx\nAR0bu3PHxnjFjk3Z7LbXRBCanOcBE+hyhytJW59JSJf6LzzkHTq6+/dDfjRn\nm9iAYgqQOnWMVt3F9dIpcir6f5gcaDDFrjpcb+iHlePawCRNnCFaQQ7ogHMh\nP49ZtlIHNY39iIJ69HZCkgxa0WudgPiUSLRlabOflKrYuCOTPcYbJlq3k56O\nmGA51EYCW+0w7EJbipJtg5AHTn9KQm9menvEbayhnnoL/yrV/r5hw7UeRL7s\nrjPjkJURtREUXJCRJ5nzDqNyynWx6Ff8iEHhErP31Xrd2GRfo0ovmDgXs1fm\nXDj9zkzP2eIBDlcGdk+D3kPiiivCTpdg0v4XLcqx09b0eJtGc7pJGJDCGfMT\ngS1XO+4TP+qLylEXEfWIZpUHcNBdWLHoUUpa599a9imqoCfMNVUqsCN/dcSH\nP8lfsJ6n70E3fzCNpWBnvxt79tzv3P96CuCV+z5B6ABxmsvbb90W4sAM6fcd\n0J/c\r\n=cdTf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmiY4/wZfzukxP3qiaPBm7N3cOeIJJrsPiVdX9vdvYBwIgac5a59v9gaOjKRCJXi6u8zFpo/gh4s6WNctrigc+Les="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.5_1586110213993_0.7644514950660353"},"_hasShrinkwrap":false},"1.2.3-beta.8":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.8","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"b62e1f77f7b9d44a7964014a75115a3ac952138c","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.8","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-736a86jN96ARtx4fG37vDieHj3SKAdiIMROo1HwF5K5OO1MfYh1bNtJ61NPoRmg6u6R/PttdbjVp+XyUoR+55w==","shasum":"642abb9ef5a285e007b8cd1e7e7409cad10ea0c0","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.8.tgz","fileCount":102,"unpackedSize":74099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiiNLCRA9TVsSAnZWagAAIkgQAI4i9OQcwXkpAJW6mm17\nflBMgG04Xo/qGlQ08M+LnOrh6g9FTytwA0GNhx/bizQ7C0/8U6JqFixK4obJ\nHM22f5TGe3quJQv5gtrH43oD28SIcEisW6SAJl97tpyciHzjcpFh8dZskx7q\nSswQc077UT5a4MnqnRD/uHRgkESqK3DN6cqloCSwggztncwO0Za32s9EE058\nEzNoTqoUiu5qFBbv+4JcSLtwHtRzwNx+V6jtYL2+aHS0pQezva5D7ruSL1eq\nXowvP6XmTbIume6ZNsKM/TQyocDGuaLGmSfI7mxZMmZF72cQQGfyzrye93T3\nkDM1yZlVP/zHZvNsMBG9bsr6pbnmtktBmpG61/5mNMCwihQjJ48GZb4hNgde\noua7BW+rHRyCcWWdSdD9rLalcnFKvl12WxkoR9XbuLjZ5tLMgJFblVjo1lmI\nWgXYKkZGwHzCDum3y2BXciDsew00Slk6MYkys9gyMuIxPq/42VEoT0AVq+VB\noetMtuyFtWuov2D4onVOti9bJrRZZkfaWGbQIsgnFBbiHhlp/qI1/4GebK/l\nR77V6uoF6Ad+x7a41O2oZ4/y2vHvMatQE5rD3Ho8JHpN0MnhQWraLiW917np\ncuvZo2J8MiU0YHoVwP9GT/lALJfQaMRus/uPzqa1I4Jm25LBIjGGz3kMi6Ve\nF2jY\r\n=b6qe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtH5wRS+0xBgh6XFD9hHuyigMoOB0nslpKTIqX4yOFzgIhALDCFRQ0q1zBKibv1Re45HNXBT30srZkQSjGd99MnkPZ"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.8_1586111306728_0.039351887482955705"},"_hasShrinkwrap":false},"1.2.3-beta.9":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.9","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"ef1b30360a1190329482c911c56c39df66c4eda1","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.9","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-AjXxD9B1/F7fwSb4onnhiQUq5TnP3Ua+iMpdrRo6v++7Eo9QjeoNDGbLv8uCYy8Avl9z1jUz4jeFkLtVs+RvzQ==","shasum":"ba468edbd5e621b02475b192fcf3526c17452daa","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.9.tgz","fileCount":100,"unpackedSize":74165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiiWCCRA9TVsSAnZWagAA8sIP+wXL1IxtzJ9Nt1jve011\nvw6PzaVXglHKCdFDUJIiHd/AfRWbezYnon8YdvjpdET61qc8pKbkchhB37eV\nbeAqGhPRlteJCm51Jiwnq28rnOZ2MmcKEogPtuO6+GUOLnSvKYjXi0W3c6SI\nVx33I0mDr8F3xXpQQw80afivBrk7EA6goasjPY+KvCiFXqOtBXaJYpW14O3n\n4SChdMc9EMSMS/PIxGCSpHF9fgENQxTL/O1uAWzXqu/vjic0relXtWdFLkAo\nmv2CDIceRHaBYu1End66SjwEUzKVZwIzGxG+5dDhyhOIYLXJKjbJM3xRFYUH\n5AKKJbikoQl7mvfuRXm/Dxrz/maDgXEjTP4W9xfk2nfu09K1VPXFVaTkDGDP\nlRF9d3/LwZwKoCkI/akR6Em5qhX3Iac18/mINrDccs1P69+ILzjXv03WZOl8\nyv3hFb+jdGWw2laKqOrAVcxYa5wz1th+rtwgE8DwV+J34bEAa3mj0Dj+NExv\n6UPzJBrI8zOXhhTcA2M9nJ5PRv7bDGp8bWrC+tOhY6zPji2RWeFFFH/YzyIs\nvu8SbsH7MnbzXPQplKEeBNMds0JhoRdLhaNkxhREmXYVaPamnHnCNev4kckO\ngWdiSI+nluxyjvUi1zmrAn3hFRCv+Kq7ZtKqPMAM3npbNz0N84nhO80dOfAg\n6UNc\r\n=htGM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6hlOyPnO9EeBJGWp7q0ATkAg3AE1sVlod83MrzAj3zwIhAOhFsUo1o3lau2Go3YT43ST/GTesIL0zRXTMbUDuFhiN"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.9_1586111874360_0.12149559218257733"},"_hasShrinkwrap":false},"1.2.3-beta.10":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.10","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"592cafda6057f5f92d1a3c226b68a6d14143689a","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.10","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-kR8kpTETxNHLhlmIM3sgEcPDjp9EYC00OLFQJRtrgyxqWlYE5zxL9sjdOFbKtDiAnoBRefUF8v1gCf5D4v/tQA==","shasum":"09c9e91909bab37106bcd617228e603bd7cd3163","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.10.tgz","fileCount":100,"unpackedSize":74166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiiZBCRA9TVsSAnZWagAA7m4P/j6nccSIngvodx4DwVQn\nWAlmpNZgptIFWJws6s4777R/sc4GMdwXvrDYBSZOhlbaQhI8bICsIfw63j95\nUoVWmV/yDFKw5IYMvN6+KIQLUq0JD1lX0Z0IffA2dfTxK5w9o9H95ItwDqwV\n6Wa6wSGIP4jx01yBYniFVkTqalMWz7/x5Q3coWHmbVEoYiaCJ/LpjkMzfOg0\nQsCgBZSm7WbS8/SFrFPt5Vt5uuiLJV9v2z8ed0ygYLXUUj93GLmrJF+kbMHY\nF8H10nkjyUwm5RVthyemRiB9H99hoBcjgaw2a3kYIKUaNLZ2Q7oHgXjdnpqx\nbM4p7oNlbYu43KeEFme4fb3TjPSjabfyf/VevQ8NBxwgJdtl56We5KTws+wZ\nXqmYj6jaHJrsF1KWqodr4jio8dY6LiIePU/FHjfHcJTuf+z8EFdol2c6KFe6\nmCYoulT90dE3vLHhQYXnMSwhyMEURk8EwTjCLREbX0nCfrO2fe0+Dct2MvFg\nFxkXLuNWAlPAEWfsGm19fC0A9Uev2e7yqEPipiXqEi7tVmldkWWKxcYmDpJB\naTnFI5DsMt9wuBmtJv1IiAtIX+1kZvuOFI08DFkuUxlRyc8v+Q4HoVvFDxSX\nerBtewLXwTAK2AeZTdCAYh+0/ZbKd1bMTQUal4dgRt0sA3pC37R0PZLeoH8s\nfgwV\r\n=PAKs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAg5PwMfesxAzVg4j6eGPY8UhTNsIguGKrP4KWzSqRk1AiBnZ66ixUxWwWTNSjvbBpNUtUJ4iYckKf3hiSrTLIx7yg=="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.10_1586112064862_0.6867509758195793"},"_hasShrinkwrap":false},"1.2.3-beta.11":{"name":"@mihanizm56/redux-core-modules","version":"1.2.3-beta.11","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @mihanizm56/redux-core-modules\n\n## Sollution for redux-store and root modules implementation\n\n### Benefits:\n\n- Gives an opportunity to initialize the redux store with root modules 'in a one string'\n- Includes the main redux-saga managers\n- Exports all root reducers and watcher-sagas to be implemeted into your own store\n- Exports all necessary typings and default action types (Action and BaseAction)\n- Has batching mode in the store initialization (redux-batched-actions library)\n- Provides redirect-manager-module based on the Router5 to be able to navigate in your worker sagas\n- Gives injecting reducers and sagas mechanizm\n\n## Examples of usage\n\n#### installation\n\n```javascript\nnpm install @mihanizm56/redux-core-modules\n```\n\n#### implementing store in regular App\n\n```javascript\nimport { createAppStore } from '@mihanizm56/redux-core-modules';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router: any = configureRouter();\n\nconst store = createAppStore({ router });\n\nrouter.setDependencies({\n  store,\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App router={router} />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n#### Example usage of form-manager-module\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@mihanizm56/redux-core-modules';\n\nsubmitForm = (formValues: SignatureRenewalFormDataType) => {\n    const {\n        formLoadingStart,\n        formLoadingStop,\n        submitForm,\n        formSaveAction,\n    } = this.props;\n\n    const formManagerSubmitOptions = {\n        resetInitialDataAction: formSaveAction,\n        formValues,\n        loadingStartAction: formLoadingStart,\n        loadingStopAction: formLoadingStop,\n        formRequest: signatureRenewalFormSubmitRequest,\n        showNotification: true,\n        withoutFormattingError: true,\n        redirectSuccessActionParams: {\n            pathName: 'home.supplier-card',\n        },\n    };\n\n    this.props.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n  };\n```\n\n#### Example usage of init-loader-manager\n\n```javascript\nimport { initLoadManagerActionSaga } from '@mihanizm56/redux-core-modules';\n\nconst loadDataConfig = {\n  requestConfigList: [\n    {\n      request: initSupplierInfoRequest,\n      isDataCritical: false,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'supplierName',\n          action: setSupplierNameAction,\n        },\n        {\n          fieldName: 'contactInfo',\n          action: setContactInfoAction,\n        },\n        {\n          fieldName: 'warehouses',\n          action: setWarehousesAction,\n        },\n      ],\n    },\n  ],\n};\n\nthis.props.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n#### Example usage redirect-manager-module\n\n```javascript\nimport { redirectManagerWorkerSaga } from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(redirectManagerSagaAction({\n  pathName: 'pathName',\n  params: {\n    foo:'bar'\n  },\n  actionAfterRedirect: setModalAction,\n  actionAfterRedirectParams: {\n    status: 'success',\n    text: 'some message',\n    id: uniqueId('notification_'),\n  },\n  reload: true;\n}));\n```\n\n#### Example usage ui-module\n\n```javascript\nimport { \n    startPageLoadingAction,\n    stopPageLoadingAction,\n    setErrorsMapAction,\n    setAppErrorAction,\n    removeAppErrorAction\n} from '@mihanizm56/redux-core-modules';\n\nthis.props.dispatch(startPageLoadingAction);\n\nthis.props.dispatch(stopPageLoadingAction);\n\nthis.props.dispatch(setAppErrorAction);\n\nthis.props.dispatch(removeAppErrorAction);\n\nthis.props.dispatch(setErrorsMapAction({\n    TIMEOUT_ERROR: 'timeout error';\n    REQUEST_DEFAULT_ERROR: 'sorry the request in invalid';\n    FORBIDDEN: 'sorry the response is forbidden'\n}));\n```\n\n#### Example of import modules into your own root reducer\n\n```javascript\n// root-reducers.ts\nimport {\n    notificationsModuleReducer,\n    uiModuleReducer\n} from '@mihanizm56/redux-core-modules';\n\nconst rootReducers = {\n  notificationsModuleReducer,\n  uiModuleReducer,\n};\n```\n\n#### Example of import modules into your own root-saga\n\n```javascript\n// root-saga.ts\nimport { all, fork } from 'redux-saga/effects';\nimport { Router } from 'router5';\nimport { Dispatch } from 'redux';\nimport { \n    formManagerWatcherSaga,\n    initLoadManagerWatcherSaga,\n    requestExtraDataHandlerWatcherSaga,\n    redirectManagerWatcherSaga \n} from '@mihanizm56/redux-core-modules';\n\ntype RootSagaParams = {\n  router: Router;\n  dispatch: Dispatch;\n};\n\nfunction* rootSaga({ router, dispatch }: RootSagaParams) {\n  yield all([\n    fork(formManagerWatcherSaga),\n    fork(initLoadManagerWatcherSaga),\n    fork(requestExtraDataHandlerWatcherSaga),\n    fork(redirectManagerWatcherSaga, { router, dispatch }),\n  ]);\n}\n```","readmeFilename":"README.md","gitHead":"b943c4a2e762152697e219ad90b5ffe78cd31bc5","_id":"@mihanizm56/redux-core-modules@1.2.3-beta.11","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4MbGGLKdspMDQgVIG1sTTYnPnr04xVOK4msAk2HpxG+GT1sgysP4XbSTyllAk5Ie/yu1AdEcBt1lh6Q2z4sRpg==","shasum":"cc0e25bd9db6f8b5f11929f920a2f3d38329ca40","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.3-beta.11.tgz","fileCount":100,"unpackedSize":74341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiicnCRA9TVsSAnZWagAAI8oP/1npuZZobb2pNQ7bC1f8\ny08IYEOreWALo5/TWQz/scST9mRzuQlZXq3GWkvsqcm8ZxWXP1c4xE2UQNXg\nLka9mapMfeblC8PQm9SLfjjKEUgPqq1qTyvBV6dbLk55YKWPcdXL9B9q8igT\nSI2MCTvOoJg6A7r52QG9ivUL8Br+xFtYaECVbTmucZSSoAt7uKM6raM4BT0c\nDWkBcyozEs1DTPrNy+e/win4f7/fYKb0szYiJK4En5kX0ET7GswaaDI9riGI\nOSIKa/GZSY3o6cAH8MWVugRHQF4FFddi9xFyAAExJstxaDeZIOgnad9irBXp\nhnY78aRL75gMbkYEH/G1Lri68W+LvglNof/qsBEfrb9Au04sSt6HN4WhsdNv\nHawXvza1pCv0uJoAZEl2vVAYmXAkwK3B+YduK1KfwoRuQDEJ0xc0lzzBOdWn\nlzDF7d+4Bh3FnQRrOfydxyODumj3fDvZuZa4HA6aKU5ZtOsCGbm0a38deopk\nYKz16cTQuoEChpWfM1zZqxR7nNYJ5LmCiQYjjQRQK0HvPMTDvYmXe1NOnTn0\n7DQyx8wpvt6AWEGHsJy1mHvWUTi5dvf4mjUqs2thqfFtFlzyO08F0JScHnEP\npaC/Y+MfzOpoFuiElfKdkBNqA4ucP2FGHVN5FRj6wBpgs9GpxB6C8scg+VsG\nVr6T\r\n=SDla\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXDmICMn6/OWdYGtYNTM9Ghy1dKRKgVGqE5/C5cmDDvwIhAJIXqStjzoQyXJqcZQfUiYV/bhjKSr++HCR9dE0po0F2"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.3-beta.11_1586112294735_0.10615897659803242"},"_hasShrinkwrap":false},"1.2.4":{"name":"@mihanizm56/redux-core-modules","version":"1.2.4","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"8d19c415822c89bcd74327a77ae2657232c837c8","_id":"@mihanizm56/redux-core-modules@1.2.4","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-m8YMDrPE/4KeouZR9vUMvXwOseXWbKK+SnUV6QqI9EBYnNTy/KeOV+i7j73jEZ0Ti/qBj/3WrmgkHvm6IrC1kg==","shasum":"1366e214684b81c93b39e2ead7008af6f9b72ce8","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.4.tgz","fileCount":100,"unpackedSize":74333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiiiWCRA9TVsSAnZWagAAFpgQAKQVTvIgjPeNFtEk11pr\nvXsnhY1UCUQ0q93rorif1iZyhQd1SvSJIg7MolRdm8lsix7bTlG/qadENifE\n043noFonOOTBiZU9x4L2s5Mru32TwWtwV5nTgHTq6VJPQ4pv8WwOoYDRudfz\nPkpe7PKD1k7HqD9D6/+UcdC/kWzYJjBgro/Z+D8ZuNBjv3bcTm4Wix73KD/W\nbYpmL6UNmIdwMgl43HF/qY6FY3ukTg2s67PmlbxoRcEtDFnYak+u83btCgNe\nBBnvES9iGOSF6rL4kW23syQPGSMynkh/6Q95BHoYpjys/wi1Ib9XAPB7wOLC\nfqt8K37RsCNPaDWYHj1c0eEi9ed/UCu1Y0tuhxJGcykQoqQT17Ln603tRg4Q\nVq7Mvwq9FhXXrIxyGKfVN5yoz8mgkTHh+WVB2jZOQ45EDJlAmwIjlxyPU3kC\n3hvivOPCjPEd0GSQ1KYS9pkru0Y+wBr6ju9VGuUzxO3TxWGomG6Xdn/IkiGD\nr92gzMNC3JHBcBhXgFQ1AdaGDOmK81heYoRDbyCkQdwEfWcJESwZH82EDTGp\nPIWDTlwZdNYxsWt5BJmpCb+h8VwUWNSMQe4wqdkS98NYA53PAFvcNu3/jtnH\nyHT+wNCVI4J3/rldFp80CYU/0h723s4ldXyoJsPolHQNqvRT5YN+3JvntrYl\n7x4/\r\n=OeER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLGJgM2KCj/lQMqlMI8z6RPXEdskmf9NjNwwnQqKAAGAiANs4Qga5nhWAv4weksIn/UpC6L8kaNDNkBBrqeOE6Zvg=="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.4_1586112662253_0.6115648482771485"},"_hasShrinkwrap":false},"1.2.5":{"name":"@mihanizm56/redux-core-modules","version":"1.2.5","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/redux-core-modules":"^1.2.4","mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"2e5091e5b4153c996826c273ffa6dafe292dba38","_id":"@mihanizm56/redux-core-modules@1.2.5","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vBx+VL/TUgj3F8TNy4/PyVTRg+uW1maQqr5FN9loY7t09JXVEy+9FJH/liVOzRbrAD4U5/ld+54si1WoYmNemA==","shasum":"26e0ade97a69d6ab232a572abb6906ec676ec53e","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.5.tgz","fileCount":100,"unpackedSize":74381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiitaCRA9TVsSAnZWagAAjvgP/2WwoZkwLHti0OUgUhE2\n4Aji2b5KoLqXwSlCQTsNtqU/J1u1xpEmgw0mzGIbAn0Qhi03AidsRll5lY37\ngxRtkgI9k1I6teWeRc9WFfA3wx/kiwLAYtanOvcQwTkPcVcBkmzlayso7h1f\nevr10DLYYlEnq4qRrc3Cla0Mx/7og84j0rv31nF2Fz1PSf2JRtNU4XP0bGh5\ntGVaQ/MuNc7DIjXYaT/jkzWEBmI9LMhONecLpcvhmiVEOE0Jbo8EKizAyl8J\n+TB0Yv+P9AOiL5auziG+U7QiNB4ilw0ls7daBKQqPghzDOSqFGUWoPG20BoX\n2LxPqmHJkyHisce3FU2s7kTt9o6e8a8tPuJtV/49Dus7hVp2PXNFbbXQuVW7\nWzKsHJEO1ppt7xjzC3yPuhLuHGvc63GkRT6wJX0rSRbJ9dzp+Rjl7TFxODac\nWkhlTkjlgotmyjF6JhzRmyjcgAXu16pAbKKVh8WRCkpxkHemfpqbSGGlb3tM\n+i7ws9uZVM7/+xoVWrDggLTUngg8aSqyKixRUsOkrbEExOKamMy8WpcWOZry\nCM51Cg+SqTA0TnC7WXO+gaPQPvO3cWNL3DXW71BjlTAerHZqLsrvAtg0ta89\nEyh3WLtaG673VzS70ja2bqLPFggrKqHgNtWsfq4/qe34l+qrjS6ii+t+EGiD\nZRO2\r\n=ieqU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy2OQwnX7dJzLFI20avOiweZMYw+iNOpaOT1D8HMpPQQIgLfEVbTciO//myykrSkXNYQzclVB08sicRGjzicHtPYE="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.5_1586113370082_0.20795348718946216"},"_hasShrinkwrap":false},"1.2.6":{"name":"@mihanizm56/redux-core-modules","version":"1.2.6","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"bin":{"redux-core-modules":"execute/runner.js"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"@mihanizm56/redux-core-modules":"^1.2.3-beta.11","mkdirp-promise":"^5.0.1","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tsconfig-paths":"3.9.0","tscpaths":"0.0.9","typescript-transform-paths":"1.1.14"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"ec7c42b2d2f2389e79c6348e3bbd4b042def47d1","_id":"@mihanizm56/redux-core-modules@1.2.6","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-8DcyTRfLcYKY5F8stmb8biugqGKKP1XKr+rt1R7sy4ceN4RS3b9dYVqzrs+UB7iGJY9KiYAU5p2KIFOylk1liQ==","shasum":"0d62f9c5b820b77edfc76bc5433b2f95123f0623","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.6.tgz","fileCount":100,"unpackedSize":74549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiizzCRA9TVsSAnZWagAA0JMP/jvKad6Xi063yAptFVze\nWIHJ1a9IzsL2Y5K+EkIrXc3L+vzQ0WzmIJfmDlZja6M6u/wR/bPt35TVITnI\nkSoN40GZ1a4k+1gFHgrcmjIyFhQRoGV65DinKicCskYUktL8Mm15a3FLzXBw\nz3NkYUtJ79dEa90wwqYZhMIjPMNMrd0czEnUYEEyuwq1gbOpvMUj8n4soZdv\nAa9h7869GDlSnjQnrKNXcf28S8u5r1sE6hqNXYusYH/r2LvjkAEUltffuwvx\n+5kFM/waVqjOHzBjVKEaEGinhUQblP52JcRXW7SQldQ9MTAriG5Td/vExRF5\nlXUBzhZlKb5ZZkFt9lQ+1i9YtmwGRNDvpeTFzIKNXg5c0Hx45gJxRxg8TFIe\nwr2kXFPwlUIJZEJuJgVL24xRrtgDS0WnvLvrVZVNd8Kx4mxS4kbzz2Uns6oL\n9z0q3+f2M7F7UdvtHuGQ06U0E9Zx+xY5GtA7NzKzTFGgP5LHvZqKOMfJI32w\n9oCLfsxf2ZLDlp0CP/kEt9Lq07i6ByZGOIPDJk4Va/4FbqNrsbuuIKlbuMZk\nwxck2DCb766yTatg28N+JKa/sDqZmpCJiu2zYpEtNpL15iWKpAGAmlVJMGQU\nKE3YhfCcQ8HZeXn0Eg2+9sTpyBpClQ7JXWiYvuDrhV07M2LhcWhBr+e97G98\nvc3a\r\n=6zuB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkWAYo7ieME8nbBoX8J5x/1O73DnlM4+vz9HWeZRqcrgIhANRZotGdylhhg4EloaMGiEV2m5cC5mlCGY1MOHrpD0+s"}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.6_1586113778646_0.8482557570641076"},"_hasShrinkwrap":false},"1.2.7":{"name":"@mihanizm56/redux-core-modules","version":"1.2.7","description":"core redux modules","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","compile":"tsc --project tsconfig.json && tscpaths -p tsconfig.json -s ./lib -o ./dist","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","pub":"npm publish --access=public","size":"pkgfiles"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"author":{"name":"mihanizm56"},"license":"MIT","bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","dependencies":{"redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.3","reselect":"4.0.0"},"devDependencies":{"lodash-es":"4.17.15","@mihanizm56/fetch-api":"3.1.2","router5":"8.0.1","typescript":"3.8.3","@types/lodash-es":"4.17.3","@commitlint/cli":"8.2.0","@types/jest":"24.9.1","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.0.3","cz-customizable":"6.2.0","eslint":"6.8.0","eslint-config-airbnb-base":"14.1.0","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-loader":"3.0.2","eslint-plugin-import":"2.18.2","eslint-plugin-prettier":"3.1.1","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","pkgfiles":"2.3.2","prettier":"1.18.2","ts-jest":"25.2.1","tscpaths":"0.0.9"},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d3afd119167c17c2de63aa011fa6404124c0bf07","_id":"@mihanizm56/redux-core-modules@1.2.7","_nodeVersion":"12.13.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-qJlACwg+597UhmLPpcXz1Drsb+C4dloSGPaH69Zt6YMBBFURkYrPfNt/19xhmr3OFbutcnouwww6MDWSAvKbnw==","shasum":"c9ef68064b304b36b6f9797266a3d0d3e1e09b8d","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.2.7.tgz","fileCount":95,"unpackedSize":70987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiltnCRA9TVsSAnZWagAAui8P+wbILB2TjHVLMznIMdzQ\nRMwfDWFVXnLyq8MKGiD1cCu9f9sIjk5+T5o39X7mR5AbcnJbr3lvFJdXaj1X\nFz37bxPQgNux6f59rjwpWSpnSU2ny+lJpp4bt33NWIJOX3uJe4jIzDME5xOu\na7HppgSEXca8sbULXk9TqUj6QOLlO3YZperRTz72j76ZCi4x/lDX3UiecRGO\nKCyRkJeb2AVTB3sYXWtffVl1rAkgFtPGGFW7Aq2voeeDpbGgnsfZC9OA0cgf\nMmwIfZ6t6bcEvPKthKrhaRHi/qQCKJwAkpprnEwJBVvcqN+KMtnDb0H9hbKZ\nxo0R8L/U+q1QsGW9z1tYrzBCH8BBQVK2kySR5+DxYjoObjHgQPn2u0uKG0IW\nBqCBBOvxR9D4ZwYzUZJ6wbcTmAIYydqRXv9jhQjW+uOUHtG49rHAS23SvRn2\nFYXlIneVX9i7ynE5N/xysEacGI07bqfWim9cPxBctEXQaVaCnggPPgXP6XLC\noDeGm76Us3AEM7VJBtwOs+WitkQBvPX/XfvhrzwoAgfl7qJwG7mqOFDxTT+F\nvFGf48iBG+yCMWaDwSFIJhlj2uacBzUaYZHQo/84H+nlgRzdqwLBGekT0zn+\n5Lz5pEJFTsvFFjkhxKNGYblAUuyzriYBEoRiy49ymHRbI4PGnJY0eD1nM7dP\nPV05\r\n=IqPq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ7OdU2XpHM2gB0HO+O3ZNdvOMbA7JAwB7RJHtVhdyCAIgO8Q1tGo9VpuDddNihi0Ehdbjtl8MFu9MhFitE3Wbrxo="}]},"maintainers":[{"name":"mihanizm56","email":"m.727507@gmail.com"}],"_npmUser":{"name":"mihanizm56","email":"m.727507@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.2.7_1586125671478_0.7811692765550109"},"_hasShrinkwrap":false},"1.3.0":{"name":"@mihanizm56/redux-core-modules","version":"1.3.0","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"lodash-es":"4.17.15","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","js-file-download":"0.4.11","reselect":"4.0.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@wildberries/notifications":"1.0.6","@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"fdf3fa7f1a299605440b60538e3054c164e10197","_id":"@mihanizm56/redux-core-modules@1.3.0","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-w2/iz+k6oD6LjC1ujJ66v4ueDUCl6JQE4tUBJGZ4qD7BPSpQ0eKgn6duRXb0WL9KmaDXEinAvk5YEboH0EzjrA==","shasum":"e811651893ad51b9d52fd6d12f210e02781fbf14","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.0.tgz","fileCount":133,"unpackedSize":155149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdMuCRA9TVsSAnZWagAAo4sP/i3nTuBc1efFxPsQEnzn\n83yk7dE0fDU6xyRvoT2QC1Xynm43rCSeSpX/yGKsxhgq0IPQkvxeRzNN2/yp\nRF7ZlD2rttdqGNF1SMPddyrUrhyAxaFWAskCcZ1EyTy6O1pEn0zU39fpSB7s\n9m8x8tvkWP0OVa8z6fpxaKkqX1i57O6C9KPXhYlhVL6PLIqMJHwrQWU/t9+m\n/JGRP4UQ6Ghd6MJDn/cTQTJVlySGezWlZjjDH7Z8ll3feYEw7e/aXHDqXhFS\n7R2zKbXDmVPduv7j0IiCXBgTzR2wzClAwKIn/DsWL2NpIbGHsJlTHg515fqW\n2/4d2d8RNbwClamiKNpDQTdSL/imEelsS/q1ofVx0TQYQR2abuKf+J3qWBCh\n2lh6HM7EuAX9cKO/6swZAV6KmmimZPZ9jZeQrxqtZYryuH5N1jqOAIe7UoWe\n2mI/y/3+xlajIpxaBX4r3aC+FODFFC7Q1gHlu9e/+EclVzEGtlOLw/wU/U7T\nyGV5XOe8iOZ/S0kCDEmB3btkmVxYE1dmBTBUgy54dJ17kPkY9T84hoyFAyYB\n4DRLnUdn5dBpG8wWyYLRmj9ACLDzDbiwsMrkoR9e3E8cdhWcokYnmomN70kT\nJlexSzvJRRjRf2D06/uQtpOXn3k2cy0TBMtBrV1iH6Bp9h9U9r48se3Z9jOi\ncrL0\r\n=bpNw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7tOCW431nrBfUCqdipr3GrWi/c3hfwBDlDNryvVCaTAiEA4ELGHvcKsyWzWQNQEZXx1o6nsBlKceEDflCWu5NeHCQ="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.0_1612305198221_0.5283404226383803"},"_hasShrinkwrap":false},"1.3.1-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.1-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"66a9b5426bcd3e2f32fb97fc9dbd50bbe5d8071c","_id":"@mihanizm56/redux-core-modules@1.3.1-beta.1","_nodeVersion":"12.17.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-gAOigURnc3R4zHLdoOz9SVcrdWW8IlPNd4SymA0dJJZc4y8fe+nM3T20xHeIC9o8opVsw0wDtMybaQChdYbPsQ==","shasum":"3cbb9f51a8aaa00e23c9c95eb5d21351dc1563ea","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.1-beta.1.tgz","fileCount":133,"unpackedSize":155174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOlkXCRA9TVsSAnZWagAAHtIP/R3x5a+QzldEjl2aReYi\n6eqHdDArgkahRPji4hKAwPdiOpRZ8c1dGl4+DnKX3bT925D3I3oDHHtleAac\nC0DxiXrB62ezGe6jGPbYHZnJ+/jXPqDWPC62pWnUXVJFfBl0kk07F3vGwrpO\n+zfP56LPRK1TIdCUUMDcv/y0JQtKk/GshqS5+gUki5QTcg7DvX3zitHR6Cxd\nHptJ24C6rftjgjRhwrL1dFhv8DmXh2pM7bEosYddzl+dav3zSLw9/A4rlBke\nU7Tg8evJh/hHTa78Hcc6QYv2rj313AzFreMg5PV/LIBz4rEOJKVVL+RssG8p\njzoYOcMxlyZbLfFkYcu+CnMcfDte7lbmACwaY0Ds3ZV3GbPVyVXdjmY2OdHQ\nP5ei9IXoliK8uh2+V58YeTN0T9HFqVho9pV0V8FNxW4livaxuOwFEaZAp1Xy\nmJw9mFs3vi9EdfkAEmTbLP5hG8RDeVDBn2JwZR0TKFmZmYJ02kIcC8mZr94p\nnrkamT69mWVLDi+fZGTUizitQDq1vWEZe9tgSIBgO/eTAte7loClH18+9fiP\nsPl45daI4owt/XKHbWzW4NG86NzW2Nd7qTEXiRwyHnAOGOuxIiZ+qNhkukOE\n2rjO8AzcFvSuqdvZEH7c27a53bzCGsMZrey3fbi/dgXaV9U4QGgsTzAOMMRK\niA1r\r\n=M141\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChiVj8zy3ESf9Z+cGT5OBKWEMphM6JyTCx4+7YHcrzGwIgGZNFu8HJ8SY2+aNympTPzw8IZlKgRZx8aIlBLVjSAbU="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.1-beta.1_1614436630381_0.09876101543547366"},"_hasShrinkwrap":false},"1.3.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"cc37a09e2141d69362c3dadfdb443ac647c2531a","_id":"@mihanizm56/redux-core-modules@1.3.1","_nodeVersion":"12.17.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-4TEhpLnbsHTdlQhRZCuVWtk8RicGprM3GNjTcfkw4QJw2XxP9uTfzCAag5LUAl+mqmpO7GQQD6R2SYX/2GWocQ==","shasum":"6a4763a46dfaddc53a79a925945348032699b7c0","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.1.tgz","fileCount":133,"unpackedSize":155167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOlp7CRA9TVsSAnZWagAA08wQAKUuzrPzFk7E/G2urPtl\n2QRTi0KEzsjVPi8RcGSm033dh8rgF10I6lKr7N6GKOGBGjTIROVtlaoq+imN\n9gCQqK11tIPxd1FnRVMGMwnBSWGLepdWKrCCmjpBrZflq4YMNR7rEG876BOt\nBmRNlDXmjdHgnDO0HGNB0e72to2xrMivBEDNY80CdZpji8KYiH8aOtGgQHBi\nARDmjhOJu7NTL4W9bPCKWQolWMshI5kFEihTUQ5iMgj6/6mFt7gHrQeHfUQV\nr4gBPCvAWYwgHkTFGItguCtOaScjatoxgAwJD3PtGQyFGivA214OkPMc+ZAb\nO7ll9aCexSQUU68+BvR/y7wkWBp1zK5dyAEd/AjrRxRNlUbtBzpjGr4vl1Qq\npKN7XpL9znMo5PeNTA3jQ+HFWwHRGa15lgGXzCb/dUpO9Vq3qe7puGYHoozZ\nwa7Tnh7vmsDuTmb0ZADXaoxZSRPAA3h1VKxGLP/n5/mr0cgAwJ0qJqZSPauF\nMeE/OJ4765P3evBGcc3bid2cQkJtiYwzpx59X/pUMVayA8WVP6Udqaa6uYi5\nAU7yOmJKMCPXMHMtkpwB5PLoR+KDYOW8fVH07Sx2Al6xDOYeZMz8zCYlYvyF\nIWH8XrYdvT9ba40WE8pZkk3Apd6dZvx7QTxg3mv8/YCk1S75bcw5dv8XbvYG\nFRI2\r\n=MoQZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4279z21aIvUPwjXG2kaATnZAhvN0LvBKnyvSh0T+zlgIhAKzrj4zVjpk8MQalbcQ4VpFVcBlnuKyGB38snRgtdiPs"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.1_1614436987531_0.4671245193481395"},"_hasShrinkwrap":false},"1.3.2-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.2-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"0b42c461b57ae54dee51bdf87f212ab3d570e541","_id":"@mihanizm56/redux-core-modules@1.3.2-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WcRjCVpF8gKX6DaoEJXyfxuSiovLzo2vV7NIvR+JLEhzt4E75ErvyqJjp5FaUk+9p/exZbpruYWzhpq9UPOe6A==","shasum":"62c83dd7971392590ff07004f30cef2488182314","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.2-beta.1.tgz","fileCount":133,"unpackedSize":154903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfalBCRA9TVsSAnZWagAA5DUP/iseyPZVFm5UA5obNpFj\nHFqoA9QHdZu3sHGcJVZJq1NTEmlwBuBtHoP0RlfMgQjqvcDBldQRAqSQqkoX\nu2c3fUgcjLl96wvH5LZcyhDWFXlEOZCv0Du/ZEsBkhg+garh73tfKUdM/dJO\nLYMDyyfhaMvC0vOY4/YIOhkHpGrxsWv8UOemGCByjkA4nGFj+uO9hiwRL7Ro\nmuVNX9/bCMnSns84fycuT4AUPZYYVbebLK+DLWXIzt2N5XKU8ESlNxBBGJ2Q\nSJSAPbM8FnXOjOykIYHRIAvMO2QJPlRmT+Z6QNoLbHhTfse9k7zldfpsrVU7\n5FJvysc09zlcuo1OyIkHV/mFXbCmM85MBXtblVIWH8VcGGcCgW9fKa6MKNxS\nZcaVJy36auyOLIzYuJDJ1nWJCUqTchag3lU6zPM3+hEwbZxgyeH2IlC5a7sG\n/5qOMis7UHRT4nAUn+XCFBuLrqQSEg6uQVeD07aORNG+q81bd/U/G7sze3S2\nkstekcKthOzX+ahlVMprbpMSf5L91CxbmI/kJ2Xy4Bidl9tTvchdYQxKQ37p\npIor3IY+tLYzJwTPJVlvDcrqgLjlIQ4LPe4nmZhugrcPL1ZRDDbxGKIjjpLH\nEU+vg7K+MB0HJxWh/jd2pibZi1nuE32NpONKDoOAPwQlK/904ewU/NRNmKDz\nxcZs\r\n=5LTR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9bmZcu4PpP1JPpxreZQJsoqM7dWT72Q7YTJgbSXh88QIhAOiXpNp1lgztLN9TSkK+cGzxM16JnoYmCR3JzmYMXNk3"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.2-beta.1_1618848063947_0.8079639155627734"},"_hasShrinkwrap":false},"1.3.2":{"name":"@mihanizm56/redux-core-modules","version":"1.3.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"4ce124a966382f6a86415ddefc6dd16739d69e3f","_id":"@mihanizm56/redux-core-modules@1.3.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Q4N1j2dlvkFHvMZ6zrfpe1lFoDnhqa8rKKoCbyATyucg3qzL4AiG/kmWLBa6ESi/whbZIjlnPgKMqEvuVDr5wg==","shasum":"a5e7177cfcaf9fdc33d06de51f4e81058bc5e5b1","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.2.tgz","fileCount":133,"unpackedSize":154896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf3ocCRA9TVsSAnZWagAAAkIQAJbg57rBzEFCLqeFHuI3\nZ7U0P5i54jg3ZLzm/qZMYV+w9QGm3BcjoXqZ4mYP0iEyK02DBWlkySy+Ku7h\n8judFsdmn5l135K28uSYCobssBU+EKjj8Y9oH6yDbtDEAgPGkLWPD84fTSLj\nuI2WyuuCL4XNI5rhpVWwxcvUcJSDvSED51xKa6cIxLqWskXBm2CRoDQX9Lp1\nEC777pJ0CG2zlPkMG0lEA1jUEW7ZM+RJzM+oM7BIxfxNY7TpxODhfOAzChsq\nzOMIYVJ+/6HzicRKNZxrYxwt91EEqGkD0/ex18D2JECiIYIgSNuLsuD/Sg4g\n5oRkmZDOoIxquFVdpvGE3NPA53vfxrRT18sFdI8meqE8LAjo2OF8+VnOu0Es\nqn01AnSk5G5ED+pRSTkIF+r4SNmYqlPt87NiFbNKKZSE1LWuxOKB/xAGWAVf\nlreJ7e7pV4Ikrib3NQrZQmpnEQ7iNhLRzcN8fec5MRtuPcJH1gM+wF7FCLZa\nmeV8MQ2t5eFP5GjFpyWe7I4IcoR9NSfD9Wj/K84boldttq++i7ysGzsn0RL0\n7UK1axV5DNwk9bJipLt557f/0UudQIRLYyhYobgbUsvXkDrbI2Txnb8FZczI\noE7U7lgexVJ7R7GBvE/w+5kI3ijdKP5dwF/8z23xJt8HDItsm6lcWHltkKNj\n9XFP\r\n=heKp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxdAHks50ippzSdaXWB5VrPNQWnWMBdOYZ0ILVFGhtugIhAJooBIiOYB9OwYWaWjrLvuN/UYtIQtA8rQRstMbReEaG"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.2_1618967067759_0.926371727601192"},"_hasShrinkwrap":false},"1.3.3-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.3-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.5.0","@typescript-eslint/parser":"2.5.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","prettier":"1.18.2","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"6292a0d8315931afea98a5eecd8bc3d9ca48302c","_id":"@mihanizm56/redux-core-modules@1.3.3-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-JUSu4TYJlS5vWMy74vYRfBklhKrh2ddTQyu+RvfxoyVV6b7sMLPA6oCZjW/JsrrxP/nlyaQZZ8jsuZaDlcv40A==","shasum":"ecff19fcc58cf4809b6a08e6ce8a8600f40653ec","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.3-beta.1.tgz","fileCount":131,"unpackedSize":154051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx2ZUCRA9TVsSAnZWagAAXA8QAIy9tGzZdfy0Inxl3nx2\nORvkvEN9tmBLmk4w/0j74NkXVKshBS4a8K0Xy5ZS4SVngI7YcwCEVu685WV/\nxX9HWZt0f4+FxW9jRD316M/iRK0A506Fe9h2n+VKzS3Z6Zlqm93RPORknP3f\nlCvAz8mYmMY6f6X9wUk7X6Vnmiuv7PA45KP2scctPKaASsSJJv6PyYctzs3e\nKCcT8gVQgWO+9vGNdqr5QMN9CDU6fIZ/NLfZ18YeSRtiXugDzuxG2jlKf+/Y\ndmAh4luanGlv6fBpYfUMZEuamU+AsUZwlZ1NwO20fRQaLczkmA866LZ93AQk\nL1kvzRtE6lKdg6/u0B2K6V/6Tb+f5CqlzhAWIk7DnTRGBz5r5v/usKY6dsUZ\nkcdGYSFyPSIOj6UySrjJsR6vYLutiltfBqDMwzwsAHMzqTjCAQ5ODVztHHGZ\nZLY7lfBy1O6hmUhUuQHKhWNp9Xnv1Jd8sG8b8wahphbejjQlSUASQIc4OAzH\nO8GFi8dlFH0tcaI8gO5cNG3JbP9Xm6/shEI3SgmILdiovrOL3GB3MmtvNITa\nlgpRU5lkq60YBagj87JJij93M4w/6/vtJqu8I+hG/tjMHVEbvk5EJ6K1lzR3\nKoD8TkL1ceCs938zQS5JX4tXzOA0hPTqX5dMUWoQYMmLY5pLKe38e+g5F+AI\nZsJJ\r\n=KSM0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFkAT3x8dMsXED2HV1rPe4IXG71EKUnOmLtodvDPsaZwIhAPwJiA0HKDdZbk0BE2TLDzDwq5QLvpcXPuYPEXQNnJi9"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.3-beta.1_1623680596177_0.8115453894140983"},"_hasShrinkwrap":false},"1.3.3-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.3.3-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"69c8478df2983922c578e9c769f022e8d9836ab1","_id":"@mihanizm56/redux-core-modules@1.3.3-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-zWlIs+//z8vTDW01oGSZNBVOVFnH1CXHbyNAJOhZX8nho7Jl8WV0JPHuyPpeuEa27VAKYFuDrCQVM9P6fGR/uw==","shasum":"ab9f9116337e531233fdf61a42f333a99e899810","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.3-beta.2.tgz","fileCount":131,"unpackedSize":155894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx+YkCRA9TVsSAnZWagAAj/MP/i4TYKYDn8CEiQjZ7Mq/\nIC8hjlzW8tcZAhCXaFDo1TDdx+gEVv4BCFqfDSsA47z8mkXQN/EhsljQ8QlC\nubMVP/u870SYrkGU6HDzB9qtCrP6CSQDBGZcabcWiMsIA0E/QMfhu21j0ei2\nGvrMR3VhhLfGnvcSl0cBAQax66SSfhRPEQc10da9YIDzVc0xKtQHCv95AVQF\nnz+e7j5aA9KhDNlw8aprulzP/SM9U0y9RChw5fBOXsVv0VHzV2g4BQDM7no+\nRCzOsXvyRWM4l4dUpFOzVfWHNK38J7xoPmghUYJ2c2su9Hj6LXgdAcGXGPhO\nCkJCVKKSCwI3LnjadntiEqMH+1ufQMgJLaV5BNR0gZndVqAJr5XDMgoyHW6T\n/JgPngqVNjnJP/zmsnXsytoCHdDPBXljm8FAz49z9MEIyLjZqFxwtZdg8Rh4\nPhvX5r82tKAIhIh4RjjILjrthd7t8NM6z/FXYPDUpI9lRiiBe+72R+sFZGct\npN0qqlCcouAkacq87J0nHoVxwYVZCfjjgmVlODjfx+fF5J3cP4+/hBeJdk0S\npFjzXW/ZJJRzGxZuYYNcfwqS+82ae1da/kfhBH48UL7JI03KbdTdYp2lsfdE\nuBvSUsqu6NJYyFC7K0chze7U952RyNX5rJGVieETAJ8viLZtggGTuijkim4n\nwv/5\r\n=ikM5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDenhxshkDFnyjfc33WFyqyE7YnsZ/68q6Ze63s0BVyDQIge2433ANekyue5LAeYp/jku41WzZIE0xHOPINdqlmytA="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.3-beta.2_1623713316454_0.08800907861792706"},"_hasShrinkwrap":false},"1.3.3-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.3.3-beta.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"beb3c65c37888f95baf8a7ff8b2929755847971f","_id":"@mihanizm56/redux-core-modules@1.3.3-beta.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-FaXKARPnm6lcapu3r3jsyJCOEcrufCGXz75A6wYq4ZAke/YDJ7vjs30UmdyHC3TuMt3ZdzE9N9Dvuhl2LaD2nQ==","shasum":"8383d05b0d360139f4829261cd28f1ff93defd1c","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.3-beta.3.tgz","fileCount":131,"unpackedSize":156615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgz1vlCRA9TVsSAnZWagAAs0MP/2xY29v++VjuFjAwLTPe\nWl+fvYs5q/W4W90QwNydZqorD9WsvVSWBjST4Nie+fyK7JljJsFuvE2GUfUn\ngN1kazNcm1A5t/VCGYRdfRQfQFbz9V5w1LggjqTqmdBN3DdEx1Q4qd9MSciC\nhyCZqzokTA17Cf4q5TnXer0Np2U/dv3GqsnELKEvbRjTTrUNPLNDD47lWA+s\nSaz9m+XYsUMP7Sc4MlTha6mghBRWkw0Jb+Whh+UbWvMNNmMrX8ECCuGgdAp9\nMzgA7vq3VjxRiVUMSy5RHsWVKd+uENFmthOQkT8NwsTSYv7UXaY9d+8SlM2/\nddbbIsTU4Tmdk0wGMcMOmUVfIX3Wi7MFq4iF95Q4DellHpHqYrF8gV2GMj3V\nY6HJtMDnmMzRHg7CJPjCQmFo1DipuvZ8++ChdJkQb+cR7rfigmSqIv2ywFzf\nDrN0qWoqIsxxSa+dDV6O1ZlgZWFyCR8WlguvkmwspakJ1vHCl8eXuHfbUGG/\n7FK2riN+ngvoMrzSTCgQf1VP6RnUor0mLrxh/gvLHDc3nWCV9Jh8d400GbDA\ng9NJkRD+bBSCUipNdW7t07LKmam+1Xkbml9d7l1gmQQtpiCpNyB9gIiVPFQB\noDS90Ey9GVD39eYG1tI86Z8tYZboxq87S1AQLTpbPApPuQRysK6yyu7P7SuK\nAzcg\r\n=97XU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICP8fe+HD/MQjo9yApk5nE0dD6hgm6KF3SG+CTQM795JAiEAgpXemaGsIVMd8/1zkrpPrl1fHidOpaQiwtMiGtI/rzI="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.3-beta.3_1624202212763_0.574463354250309"},"_hasShrinkwrap":false},"1.3.3":{"name":"@mihanizm56/redux-core-modules","version":"1.3.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"54fa981c267fb7520b7f16244adf3418aeccaafc","_id":"@mihanizm56/redux-core-modules@1.3.3","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-cxWOYuIhmAu5vpKJCAMt+LG58aIiYa6tTxLw/jYf6IQhG9/IKXYmaznfEfBGaezEUnsISQ4gjEf8aC2IH9Xigw==","shasum":"23bad90443fb2aba0b574fef817028e6fc613504","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.3.tgz","fileCount":131,"unpackedSize":156608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0dNNCRA9TVsSAnZWagAAbNkP/iGLqr0fJderDAjuO/Pr\nkxHKBTsZEmfg/XbZq0Sss8Gu8F1tHVJ03WaEFAiK/GbqYdLR0x0oKIta8Qzs\nMC5D1/d6udKnrJOkmGNQhzXmxYETRl1Jm7pHK+25fMsXVNiqPWI9dlqzNftd\nMmdMWFlqHinVQYT55WwIW2oB47D5V4gRqF75pj5amuqK0xUazkpWFIvHaLro\naQrAtiCxhlzr7umuG+2XfEaiiRZaR7JY5swIiJCpNjYb4Bc2kb55IrFjFI5O\ntwk5sMJE0E2FhRFtF9oPoGMVEIB2l7opGORjmtoRLeF8zMBsow2Dbe4eLp3s\nc14q6CTXg1GEiPLgo8D9lBiu8ZPzmruvIJoaqdBN6xbTgPLxIqXeyMt/h3VF\nKhfMmjvF/d+NSX5NR/mCVlYW0xs9GVoqgYWIek1RaHj/5P7MLKzDY9o6tluq\nBUpLAF8IwNNkIZRueDycDUp4FPk1lc3Nh/y1WoxdhU79kqcrF3RX42vVugvW\nr3YBtp+rm4dKzlfVxih+VB08/p83yWVrFVzeXmW4EDkG+FuzmxCWM7TF9KBa\nNv7yIufiXwVXn5RMqy/UPOLtzryHQl6JvDb5nt3usQg/d4m+4vUugQk+yQa7\ntanJxqRjKcd//VYQWrpapUG9OEVXQ/o2fN4vTOaicOIGP1ylYu63o2GSLbEP\nHxxy\r\n=bdfY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEpeKV0L+Dh1OOqH38mKFQQyTttt/fvF85178Iiqe0IQIhAJLiPtwC2Fwjpz6MhLiZVZj9A82gaO021DPIAs8xLP9j"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.3_1624363852970_0.7110409068893224"},"_hasShrinkwrap":false},"1.3.4-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.4-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"9d4097ba928ab7ce817fa0cfad23a8f037fb1c32","_id":"@mihanizm56/redux-core-modules@1.3.4-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-pSIdgVE+es/+s8E0FpT9LOOQ2B/vBHl5E46XZ+yu+AdLsaMB7sEbb2A9oDvAlNe6jxiBLCkGkGBOtZAgNrNy9w==","shasum":"1b8fe0ac99abdca856c0bc9ca6d7af0a42a1233a","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.4-beta.1.tgz","fileCount":131,"unpackedSize":157814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9eExCRA9TVsSAnZWagAA0o4P/iZmvQjwqkOsyqOQx5sb\njrj3jj2rDsEBQkx+G7/kObTmBrBZG8xphIlsCg8gdT8lH8/gT8QwzPzmnp96\nH30Sb+qaZonkHX1vp1Fl8Arm2aqHnVm4O++Y3aAHsIBgs7b2+XsFJ0nKjs3d\nNBSUNkOgE5xdalmlIa95WbB75/mCIPbbE/HiciOmonFOMUmTfa0IuYDcf0Nx\nH3cEollB8EBH6ZT6NZ6gV9UAgadv87ZtTUu3T+qmACZgT9HYYTY6/EhLbUSQ\njK4NzzYo6urbqHAjmN04zOn7+XeihV1S4j2wFpQfYd01N/jzouXRPBnlyaWZ\nOwjPDg687wV2uNVdpeiXIY2wWauZ180x+pNvEv0QRJCCK9sHUn57PsCcYmej\nKSwG8WwRIyqdO3ozNKfliE1P9XTPZNAadZahERZheqgKVkbS5wo6DNfwteXj\n9PYWSFJEj5ShbQr8BnnRWWsdaQ0FMqse5c1dnFti/YNn0DW2ybmL1/Xk/UbF\np+zSicE/5zfUmvgr+tA3XIRdoohzxmvT5ncH4vHPokHg4bQP8wyw+/VGS7W0\nirPcbPA/eEYHwyVXfwFM2ZWhy60IgyF3KrYVSyJdP6SD8+wt1FDLR8LnWarW\n9i+avHOBW7YK1wMqYJXVwvmUHIMrrCMMXMewNwkjJ+3nHLicWmJklQFyvcCT\nsQml\r\n=PmNB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3ZPxl6L/6UUJ7vZxcv8SJnfxNs64hRB/soGXucExfYAiARRDqeIcxNo/Yrgv4lVHBiwgnLbJMaFCMBbc1W1Q7+vQ=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.4-beta.1_1626726705288_0.34708643780286574"},"_hasShrinkwrap":false},"1.3.4-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.3.4-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"3ea1d394ceb86969ca8ef46b37d0c3e5e3000414","_id":"@mihanizm56/redux-core-modules@1.3.4-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-qtfONvao05uxr9FMPPdJTBN791IJuuwWzvjEzztbrARkP3iFv1oTo8VoVEVhrKVVVU8dltzLCVAuoBK+slvd4w==","shasum":"18f050bd72fbf9d8066be2bccbc456900f183ae2","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.4-beta.2.tgz","fileCount":131,"unpackedSize":158934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9e2HCRA9TVsSAnZWagAAnVIP/1ACjXnGOgfdU0/vIujU\n+nSwjIur/ZYZHLJHea/bRWSBgs/7Awss0zVwbFMfvQUT+SxJr14ub7yp3utO\nNcU7nG2XaT/uJu8GchG4/OANIIDV/zU5hchpj03DSQQVgZ390kvGgNM+Ef4H\netoBxiv8hkOXezm/CBKI3/892JkjqRpyAa7tnhiDar2YfujRmcT45Jfpigub\neiy/CcFuKT8v5wJ5wJhCBbbYVRcl8V6vCsxQViastS2ucogFht6kfHrzMX22\nulCA6/9oql5rAy0VE1oXz1hI9NMEc8LatLCmySssjCls68UIiUdKNFaAK5R2\nn5JbF73a4LkmG9R783UfcAzL1pUdaOm6KSvGGphYOGO8cR2mGJgMS193wf3n\ngbyl7GPazrCV4w3n5TOtRF7pm60D6LV05qh+PNnRo6BS5UYZMW6ujYUsv+vw\n/7h46tANKO6J14ijVUEkPADuBU06sPEFKs4a0DQ6oazPbhEZYRc/wCyPe5X3\nQZpagR9Wso+IyIdngX5UrHm+Wb3grAAurj0+iZWHxIDwq5+4Ty/PGjU7tier\nkf1d6Hral+05BzhcoqpuSRyHUfEEBorw1LSHHrvVIJDElCVy6PmMFkfGyF+w\ngaCdqfcujVJYkKITk7LyNY0Bb0OkD+xgpgsIjWEmArdLp3jXLBKs6J0unItG\nQ1jQ\r\n=s5pN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+5KPhGyLEOmHAUdpqBSP/HjBW9MUIke8stihOEDMHlAiEA8C9/uNgoPFx7bvSy2tmhNqHjl6OukxDzuteV7aKrcNs="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.4-beta.2_1626729863518_0.7860955353060317"},"_hasShrinkwrap":false},"1.3.4":{"name":"@mihanizm56/redux-core-modules","version":"1.3.4","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"259e465686a98455db995c70292362a79dc2789f","_id":"@mihanizm56/redux-core-modules@1.3.4","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NPdYSyCTMO2WBaPKAdodMvzvwkbQV7kFq8PQ/33Ecn+wrGVSzSoeiP1wpZq5ZHD90eA++YivxmjjcuWgVNTWOg==","shasum":"8980b3d73a502c2bc21e4c1b2c5d60876af8f3d1","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.4.tgz","fileCount":131,"unpackedSize":158927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9e4ICRA9TVsSAnZWagAAI+4QAI9Yu4iILjSTe0ih0enL\n1pw2kt6EYDQo99webLZx4Br1W2CRNBBrfkobm5L6XvnEKPGg7BDOrkhkUJeK\nPur9yvCwFRbmONw3yETg2sWsZJ/9Qe51cEyw138qcbx62syCqD89S4QlJrXr\nwehsgxzXb+BSAqc3UnOjLUhXOv61h63XFp7UeJv0SZU0/Y9NhKIgsnwKjFyR\n8mrHk7j1LZZdoygbR4VHhiC2RZLhPytgfKx4iW/6VrUqxc+JG+SYoA+DkxSV\nleG6c8zHP2OzSwaJUraFhwlo2H6MAcn5WPlueom/xTlwjtlJGHHgFNemal+D\nTgUYqnJDETEHnEZrvxIPvnTiyR5tIAzHAGkgwgfzeQJ5eq0Ims0EapOF1vjR\n9jqcrLiTmF/D/Drc7cR3dTdvaBJGZCY8sn0k/IWgBAYwRpPBU9nNfMD4rjD7\nDgU8DQ0jy2A8Xymfig97Y75icPk+WKUYiB7JcYUk6dIi5YJns5HwXiSN89UK\nqSXL1oeOERvYLHiWPTKXTnAQfxusVY8Th9E18UrVwAK7tkcAPFp4z4fMF+3k\nLdUjg1hr8jK4A9zDU+Q6cDZyMNonkFVT0ryAqeLg5glZfVIuWelGh7GRu1VO\ngWOxM8saHY7ncmUzdDkTAA1doRABZDfQCg5nVXUltKMJAAwHS/DRMOpWv8G9\no+Ik\r\n=/Row\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICi5w8pK7JHhMh8k8BmqeKJdXw+a8S4UvnWXv+1Ca9HrAiEAlOs9EVQ7d+DRPED9KTAvF0ePq4CJRxSVzRFiNy9oPsE="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.4_1626729992459_0.5614699344376819"},"_hasShrinkwrap":false},"1.3.5-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.5-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"a61561506a9c08bd760565e2970a4d0ed8655cb0","_id":"@mihanizm56/redux-core-modules@1.3.5-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-n3N/oZnPJFWXiwUiBETo2h/SG2+WQETGJtnazrGWSdz5tHhSAHYejqU/rmWW1ULhjbkr8PxzC7epXyv4lv6TNQ==","shasum":"7f153de0a77d416e1e293629c0d6d1e23c0d95e3","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.5-beta.1.tgz","fileCount":131,"unpackedSize":159036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9rmvCRA9TVsSAnZWagAARQ4P/3JDDiEAa97+cABRMvVG\n8qDnE6dPLc7lxIWb6aEEZd+glcgkNOWbGak0gIWs56CQXzV5muUG9Vl4Hv0J\nrMjkbKvS7cptZe1WZ3hUhMnVyXm1sl7/FgFstCpXD+8Ce1cOCgj0t/REVizt\nrb5tyyxva2sHqs0CgY/NZYc9pvZyASjuX9awTByYuHmMGw2sSiaDMXkyn1EB\nKC8ldy+TBOSt9bNGQClOmX0/1DwBdU7j8Mdscj++PXXounksNZCD/a95ydLt\nweekk+Kgoa5NHbHk+6p8nC3Xlo8jqiDk3rtAORpeVaeL8hyxyJCCMSdsl+Kw\ne1I4wpsTuYpsr7utLM0kv5ZvDG3wqmOyJltvJa1uCcxX9RgBSQSa5Ip2fY46\nBhpQ2CSMX7yDmWouy8eiBCtxErwc3Y9b6S2uRkMbZ6TPBSgpOjby49BT/KOA\nY8x2IMLzr+YDk0H0++BG4r7luhTX5iLwJzU5z8oaw16vxHpzBxG98SBKgDen\nII3cx8K5IMnwWyOYfEa+dJK4rnvJCYwxKLgqRqZorbvdSnroee2+73bGXszR\n8+e74tpG+FaWkF/OnPNvOnpoMZ/3c29XE61AnIV1jH/FhNtTf745aZenOIv7\nO9/Swsi/SXPXRo0g3GRZL33cdyXpJwrSKfG1XHiwIfub5NQDj6MCHnUgx3En\nHj64\r\n=SekB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnQQpzVcUE1I6f7iuSPRaI4g07skR9M7mt5amTg2JFPAiAxgj9vmY5sXEvy3wWT8ccZ06gfF4eol5EuPLnsFz1jxw=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.5-beta.1_1626782127860_0.1585699636941802"},"_hasShrinkwrap":false},"1.3.5-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.3.5-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n\n\n","readmeFilename":"README.md","gitHead":"5dcbfca3ed586c622ef9985122a5ec2d6860a62b","_id":"@mihanizm56/redux-core-modules@1.3.5-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-eoa7binJjcxpkSCjs7cgG9E1g72VSY68CLCcu7RUjiCb+NkA6mNjyU3eRONx6La+Y64V7r4IAt8YnegHoNxqLQ==","shasum":"17b0cb6543d6f65d1840601c022cf6ec3182b067","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.5-beta.2.tgz","fileCount":131,"unpackedSize":159386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9t/zCRA9TVsSAnZWagAALmgP/RHmkuqRlSldaoiRUN7h\nRkDPUn2Eh5Qw2xxFRYjPtb5zNl3Y4MG/1la0sP9wtWiHerc4bJiVAS8+9v2C\n5Ma+oaHsdb3Dgf6y97C73aOp/Q/WvubXxjmR7HCzLzc4JQMAvjdKc0rLZHFx\nyG64ZeuXVB+69bW7M6nnvKV8kCehd32yRcilCvSGFHRKDFqoChlrncuYfEnG\nx+D1yX9fzNml/6JTca6yA5SytmIvG4EJvS1RcS8O3hgS4iU8CzUvN2FsrJSv\ndFqv0Lau4GiPZKjEmcLSfcHK/85z3Ngm1/j0q98wxaRBR1AKGRm7rC5JrMLb\nb780r7VEF2VexQTIgannRFBisGjR295iBSVuSk2tF9rXwzJwBC0+WsKny/LL\nKi6jHIHsx5ad4bU8UsxdZBZQVOXxcB8M6DgYXgFeqDjk8/GLvIsppYaxDgiI\no/WH0Whi/Bk6j9SpesWoXKalbRC2X+14lu82SMaVSk5XZVKEO5Rm5aVOnjL2\n6Kclaz4hNKMs//VVqOYldlbx+K4eBUnxLxiOIYHSe69113yTf5uhWf2LxaKM\nQxkt3PDoEvhF4F2lTrk58CfdSBoZAUsmGAg92o4bho31hVihD7MT3ww2ldmK\n9b+FswoIsEIiHTbX12u+bcXXtqMFtyHYDITWqu5YNTk9gwlBjbrWgHygLQU0\nEuh6\r\n=a4z4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5XpgLStBNpdYniytyzXEVw5VYn64IjeH4a4lC3z6VoAiAjmlf+8favJdI9ijOBo3NgqJeibMIIB1+rQN6gG+yUKA=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.5-beta.2_1626791922794_0.13498702263880324"},"_hasShrinkwrap":false},"1.3.5":{"name":"@mihanizm56/redux-core-modules","version":"1.3.5","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d856788f672bf21967719ff58ff272732ef6a16e","_id":"@mihanizm56/redux-core-modules@1.3.5","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ZmH7fDEJCAg78pTsMVScS1YM7KyOH/ldqFvrG/nLH6gBFQDajhMUcTLFIFRk6hodT2DfGXPrFnAhgcpy563zTQ==","shasum":"413d3c86c6508e24a4ad82fb8c9851ca342b6142","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.5.tgz","fileCount":131,"unpackedSize":159379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/LCTCRA9TVsSAnZWagAAlZgP/A4yyXhzUhtxsm7y4tuB\ndioI1yqcQH1gnxMB0mA3aUCrYZjk8Q8pKgPDWyLmFFjMmE6K6A9VwI6C1qhv\n7yaVakK9N5wz9pt+YSrAXdCrRB/wjXFMdNuQbhMJFPH5PJz3trhRD1YXGoPi\nkiUg6VDEdLr1ZVgjwfbRkfjN42KvkOWVyNvUd1KZhqWRmYGO//hsi/khniY+\nwo/LRqtp3AeehsTHaY/GNkEzlmSzJW2ZW6I5gNqz1SKlpj6v+T6v32gjQmWF\n5leCOrU1NAioJ94/muVs9+5flNPpRcIEDXfiMU0cW9r9TmAezxYGybvEBQTR\n0Yw4LQ/airKQxuLcqFY9y4nCsCNXePobK+K0sHRStEyu282om3N8dPmh1TXK\nBBty4OfqgmAcDo3DnCD46hXIDVDg2PFBGztgsMVwi0pSvdjPxDXJJBTZWJiE\nEPm1EVqUw4GOh71w8gTDRo79Y0o91Sdf5KG7gkUP+KLIoSVnuDPxNWQkESkR\ngksxHHcnm6/BzekwJ9srF5RXU6o+tALs19wcGgyRosx5dWoAefOf8kzVi82r\nQTqv3AdAc2dva7nf4G3wN7M+Zs7g3HlSdrKmIYJfvS/Ew6uvkhwSwN4cZCSN\n+EzMJWQXMIjXyTocC2q8Ng3m8uS7omGjeIswPIKjFCnuXLYqsT6zqaLRj7FG\nGQpq\r\n=tgpl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAl1Cnunk1QdGN0nM76uWL5sbpDYkBaeoHw81zJXva30AiEAxRXeTQj3L3LeRQjSp5FpIMQbggKNCNJnpRnCBbhtgEo="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.5_1627173011741_0.9791324122440095"},"_hasShrinkwrap":false},"1.3.6-alpha.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.6-alpha.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"fe5d9b3c3f205dedf1b1347829e484ab63fd185d","_id":"@mihanizm56/redux-core-modules@1.3.6-alpha.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-HkyIdVK5IGuL8inWiB412sXnLbNFSxIAFUpn1HXbRh/sT7K+Cy3owO9F7i99o5TcjVX50COX7sQdnwJtMOPmlA==","shasum":"91b899e42286ef0568be95c01963ec31a40cb8a4","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.6-alpha.1.tgz","fileCount":131,"unpackedSize":168681,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCm3WDDsDwKkkzusXkkGbqFmktFFRGju4KgU/fneW+DnAIhALUUuemEK36neNUGi+W0hwM+hMmLSo+eYpiWcIkdemdH"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.6-alpha.1_1632181862841_0.9716052486628377"},"_hasShrinkwrap":false},"1.3.6-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.3.6-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"df317ceba698eb7612ff68dc40142ed761aac7e1","_id":"@mihanizm56/redux-core-modules@1.3.6-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-OCTbKdPtCA56HniaZTw4LjE9NIENB1gJLJl2p2jp01daO/vevu2+Zb2UjrGpfiOIlFMc1ML9GFu+0S0y9KxZeA==","shasum":"ae2c54bb43ef853154811362d941ba3509b28784","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.3.6-beta.1.tgz","fileCount":131,"unpackedSize":161334,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7AKN7B/0CpXhL6TZPXqDzAYB9zzk2b7z1E6jd4/XUTAiBgH8MBb2Y3dU+xCBBc56fWNgypqhg9AHFMbdIXVV6vfQ=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.3.6-beta.1_1635344190007_0.35630003909027974"},"_hasShrinkwrap":false},"1.4.0-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.4.0-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"89fcc392b9f3de2d67191b1afb41402a91e42252","_id":"@mihanizm56/redux-core-modules@1.4.0-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-bKB6U6rT44pxo2i06nKgxxZGjAMPrK7Jycf6p5U9pe0F8gLQ0sNHsSpDOGW0L8Wjyg0bp7Me+CyCojN0WRjoDg==","shasum":"dee0aa86ac061e990f4e940f162f473c7af6c410","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.0-beta.1.tgz","fileCount":131,"unpackedSize":161136,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo73gZSoxVm/lUdNP48gEeolV98HmDx9GZkFVNVoywKwIhAL/mBz9BSKHjDSQ/NwQ3bUKFzJrRHCkt6iS12g2QcICd"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.0-beta.1_1635344383181_0.8743604208990898"},"_hasShrinkwrap":false},"1.4.0-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.4.0-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"d8aad4b5ccf44df935fcbf319657b2eabb7f00e0","_id":"@mihanizm56/redux-core-modules@1.4.0-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-tJiBGbWZtSlMsrzHgnGnGRpltrrRBo/Vqt3dS0qAc6uEvSKMNDxLVIj0K7hJLPrfmQmwZt1Sit4O1786SbTPxQ==","shasum":"1c46556808c732448d9d0a05064e75fa03334f03","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.0-beta.2.tgz","fileCount":135,"unpackedSize":166443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+DuvqQol7Z+e/hreVKIdyISYHQz5tfB2lrUtA34dlGAiAMOQxHO33WMMJMgvkw2nrTS52eZFeIr6zpIwlLl0RmjQ=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.0-beta.2_1635423163332_0.8050295356166468"},"_hasShrinkwrap":false},"1.4.0":{"name":"@mihanizm56/redux-core-modules","version":"1.4.0","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d8aad4b5ccf44df935fcbf319657b2eabb7f00e0","_id":"@mihanizm56/redux-core-modules@1.4.0","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-jBACl7CZU+ucD+VoqrARmMxOZZlaCm43Ce1+aopN20D4V7XsEz7+lVeI02MZJdvqBL5Z+hSEu5YJ5qYHy6lbWA==","shasum":"1813c44e328962c8c3a702d27cbd131a43c77682","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.0.tgz","fileCount":135,"unpackedSize":166436,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMrKspOsM2HmfB3aibIuLQLRKC/G3sEdsI3J0aN4b6qAiAjp/yxY+D6o6yVPeY0oz1wJNDueolIf1x8jgzZt59L8g=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.0_1635423425618_0.2777777089193114"},"_hasShrinkwrap":false},"1.4.1":{"name":"@mihanizm56/redux-core-modules","version":"1.4.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"d8aad4b5ccf44df935fcbf319657b2eabb7f00e0","_id":"@mihanizm56/redux-core-modules@1.4.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ikcNcFsU6hjuofIgF7qEXMsVc8O5cieI0J1BikTRS1FjhXOsiKwHmNNIl0URdp+Lb4imDe2a6A+3jw4glAEAtg==","shasum":"bd4688cd06abd04e192014ef6ba569381757b9c2","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.1.tgz","fileCount":135,"unpackedSize":166744,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDw6qSGXhgi604gP9Eu/9SheFIC3z+yP3/IZGquJQo+CwIgEqiTis+rL7xp8tvUmDG1IN4mtNk7O1rkDTt3lwLhNR4="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.1_1635423880468_0.8281340126515258"},"_hasShrinkwrap":false},"1.4.2-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.4.2-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  isSSR: true,\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"710be413d4683cbfb67c9d27183c980eedc5178a","_id":"@mihanizm56/redux-core-modules@1.4.2-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-CSCIVUINrykfcYD3v410C2Y+kZ2qPXLouWEXuqnw7s8ehc9HgpnY6ABDwuHFSVILMizFOFkiHARFyx0Gre21Mw==","shasum":"5f0846935ee841495030c8ba7aa48ba15711df22","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.2-beta.1.tgz","fileCount":135,"unpackedSize":165152,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgV49cXB50ugwkePTyRGEzfnaALA19H3gKqiM0YtV6HQIhAKzPNsAwDK9mTx2NAKc73oTg4PDn4WJxFz4O4QFaqubs"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.2-beta.1_1635461737022_0.5119411886698622"},"_hasShrinkwrap":false},"1.4.2-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.4.2-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"60c26d78e5532a1ddce0231aa81061221150d8be","_id":"@mihanizm56/redux-core-modules@1.4.2-beta.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-PBHw9vgiAphGTSRnCQG9/bFEOo0Wa21DK8qvE6zDzUPqvdUYamT1OGlhlLiXp01g9C9pmBudnwzIRMsHF9uTGA==","shasum":"681745e5aeb0ba33b8506874a82b924c083162f5","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.2-beta.2.tgz","fileCount":135,"unpackedSize":164806,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/n9AYZMjf/G4oMdmL0IE3JAP6PBzNRsvaRk2o2n8+6AiBKqeRr97cV7WGPrc5rBvR47lh8HAkzxodBByn+Oiaklg=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.2-beta.2_1635465594598_0.5374482400973923"},"_hasShrinkwrap":false},"1.4.2":{"name":"@mihanizm56/redux-core-modules","version":"1.4.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","@wildberries/notifications":"1.0.6","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"80223048a6c2e8020525941a15e8fafe029182be","_id":"@mihanizm56/redux-core-modules@1.4.2","_nodeVersion":"12.13.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-fuypDOZDzsgyAwb1Td+zkQTrksccCOKz+0QQl/NR9dEK/m3XVuVqntuwUkwqv1R4Nqb/iYNodRvmtbPEo8P+Yw==","shasum":"ca594d83864c78f4825a93c6ac7a926fae19fc77","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.2.tgz","fileCount":135,"unpackedSize":164709,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZl30frHZMDOvEcyFUO3+4B+VrxtXJVz5OkzWXrYkJXAiBPA5uLneR2O+DpKKdSErCMiG3tMB+ntvWpoNzxNH8SDA=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.2_1635608201647_0.11418455790271942"},"_hasShrinkwrap":false},"1.4.3":{"name":"@mihanizm56/redux-core-modules","version":"1.4.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"ea81e142fc77daf926ac73e56abaeef2a68cfc09","_id":"@mihanizm56/redux-core-modules@1.4.3","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2nGbMToeihLep/XefmKPxsbrHdky29k7yyfusWUUaTIQNNTbLTSQsA1TcjZFXFsym+paQ+E9X9XFYt/OzSNuxQ==","shasum":"73b0e9f6308bc6df90bb85997882da183aa93a3e","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.3.tgz","fileCount":135,"unpackedSize":164666,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFS1dQY49tpM870DJSKT/Ok/WQPARsQ4cMdn3rbvadExAiA1REuMGlqK5KAu7WalisxbUeml9aN6Wb1+S0plgdgc/w=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.3_1636041458027_0.77736432680955"},"_hasShrinkwrap":false},"1.4.4":{"name":"@mihanizm56/redux-core-modules","version":"1.4.4","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.11","react-redux":"7.2.0","redux":"4.0.5","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.8","redux-saga":"1.1.1","reselect":"4.0.0","uniqid":"5.3.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/lodash-es":"4.17.3","@types/react":"16.9.11","@types/react-redux":"7.1.7","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.2.0","@typescript-eslint/eslint-plugin":"2.7.0","@typescript-eslint/parser":"2.7.0","commitizen":"4.2.1","cross-env":"7.0.2","cz-customizable":"6.2.0","eslint":"6.6.0","eslint-config-airbnb":"18.0.1","eslint-config-prettier":"6.5.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.0.0","eslint-import-resolver-webpack":"0.12.1","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.18.2","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-prettier":"3.1.4","eslint-plugin-react":"7.16.0","eslint-plugin-react-hooks":"2.2.0","eslint-plugin-security":"1.4.0","prettier":"1.19.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"3.8.3"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"7de3366fcd0439be285cdb8c718524a6634d42f2","_id":"@mihanizm56/redux-core-modules@1.4.4","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ETQk0lj3dZJcVi/zb9eU6t/w20Xhklg+Onh3vUwKmj6izH/dtfWcdLeU5kIgCnnxZmfffxcFELWcqrGXan+3Yg==","shasum":"7199930fe66c96b47f42c0ec08fe27a5a6c32b25","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.4.4.tgz","fileCount":135,"unpackedSize":164667,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH2RqcMYcifAOP6BsDCD+0vx7cIVWiUXb/Ht6ga2EECoCIQCJHBq00go/jAW1+NDQJkY03kJwV63n996U4wW0MYoAqA=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.4.4_1636051863759_0.5895261639265037"},"_hasShrinkwrap":false},"1.5.0-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.0-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"19baf874e250eefae216d4c9f52d969f78c31f4e","_id":"@mihanizm56/redux-core-modules@1.5.0-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-KI9ege2ms8q62FqupkynPVZYN0t1hb8KvVxZA11+CsO3FZTR2xUX2oxKcGdN4X9f5L0CPXlXJQmoNwWIE6fdRA==","shasum":"68df6faf00f3bfd39ee6893012fec118870eeecc","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.0-beta.1.tgz","fileCount":135,"unpackedSize":165275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAiQeoiP69hCq05JmjCI7uKVK02Y9fWj2HoMpOvnyrYgAiEA5kw6aVUsCqMahIb6mKzAYLU41ncnnowLr9PQJwEgIk4="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.0-beta.1_1636544631450_0.47532544193619297"},"_hasShrinkwrap":false},"1.5.0":{"name":"@mihanizm56/redux-core-modules","version":"1.5.0","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"5901bf6ed62f356993ef85bfca8e137cec68f919","_id":"@mihanizm56/redux-core-modules@1.5.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-/AVCxYYox0KsHdJJz96LjU3UaM0ys7F4nJGxXcmpm1Uai+sOHZCY1fkzj/NOsX3TcGL4ThTxk5yCnv9CzFudiA==","shasum":"787f228b93f349b2b6398dec6684c574307eb438","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.0.tgz","fileCount":135,"unpackedSize":165267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2RiRCRA9TVsSAnZWagAArMIP/0yWOgL5VNZ7X/mp922/\nfaZeYvSvnfFQZhsRtkPhiRiyTVx+L/gm35c4ysfdDgZuOzZGsHseAuqa2dfv\nHbTkKrSiz+zscUMR4jl4kfEHI9mDAhobcJqwvVIVupstfzdK0/7oCdMaS4jg\n1NRdzO2c+ZKAnwEaYYLArU+LjoV9JZcTGlAbC0oIVEGa5ZBJo/JCXmi9Lxj8\n8E2NyqelMnMqBePo0GKuJt0bfBPK/SroP0ttHUlZtUOShM9JP04+9QuuPiko\nn70UY5fk3dPV5qGrrkuzL2j5WqSutwJ5VLYHtSok2cDv4Zh+CaWqrQ9OBjdo\ncrAM7+5qJC85UJNC/0b6u4eGMTqfdb+Zv6VAkePqJMq7S3wgconURC749BHU\njAqFm4hHNjM9UFTF0JedrYC6h+50GU6Gj4J88MjnUGyKgqQNhLIitz5oB68A\nOanpf0OLXNZldT+eBM3+z8HXa6O14ubD9bM9HneLQBhm2PCeGbosHDRnOAU7\ngIx2qqzS4O7Sp9g2paFBbU6/Cf2pVjUcT8EOFUkrIFMheAEz2ArdY3quqa0g\njk2HOVbnaE8+78uxUOBtHkp3QkBfddEyvTJtPuY1BqgeuEy2fWuMRo1Xc1KE\nxBzMwIEO9D90GDl5oRQIv01NZ6IVV/bexlDQurHN6U1AWftilOUBwjxlleEW\n68cf\r\n=vEuy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0YL3anGHIeNiUmoeG+1NuammQbZldxiwAmU9Ui7ES7AiBcJxrfJHSoWf50MqaUHoZFwiVd48SYdfHfwNGRU0NSHg=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.0_1636577374192_0.8459786825545839"},"_hasShrinkwrap":false},"1.5.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"f038d2ef5e4e5e50c4894edd2288fe81657e2a1d","_id":"@mihanizm56/redux-core-modules@1.5.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-J8HhHe8KxA01f93fKLdxbydIhcA60jDRGOtjE+WAY8sXo/Ms7Bh+Ibev5XD/GIIZ0gZyxZkorlg1IHvReijvrw==","shasum":"f6c17f3fb944f844644e9fec43fad06cf97d27db","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.1.tgz","fileCount":137,"unpackedSize":165001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4CLxCRA9TVsSAnZWagAA9XoQAJhFmxPEh9MLIcS0M27N\nS1Xzlh3DOtVwDsAq+HuWjAhV/Njutnm7VyStx76N9q9HZrUT7dW3veDZbW2u\nl99zA+lnYzm8v9eH1DNdb1NSTMARzcZd35WZ/87OH+8uLjVGgVhoa6pTGyEn\nOARWEaaedqY1tIRfNOdztZFZz50lOPwiPrdG0XZf+23W1QLP32gBnXlhwqv5\nnVqQiNh5XME8hVrJfkNTrCia3I7hXCsCyy3eRJtjlegkzYUI0N2NanMgwWt7\nmqb7OHzNhU5kGyQ6pJpM/XRT5HqOVaiG9Abz2Lo9lRfG+DJBo1ZAnykr7sK3\nVaER+i0slSu+aewlc+aicNuMrd2hrIw6HRX6YxpoBiBe8+15md0Env5bS3Ds\nB5Y1IuKWNwkU4s4sYpLYrUIYn8kOQSoWa2CkEwhpFMlle6ZMgV4FJogFThAE\neSrWMNIDOFHeE36hYM2JldhhzkchWl6DL47+WqyNYIs6+xZr9f8jM0gUzo9U\nYZq/WCNiXLuxRZ99+M2ebiQgKMUAxs6vm8F9KF74qtCssrvFhUyydcArf3lT\nb0oIdUT4ojG3UgeiSSCsoURg27MJjjA6RYrGvqaMbTdn6pmV7S/9tzHOouQC\nkL5k8m74d0PhJNCDdL9eR43CYALcZsWbs8IwjzetfMaITiyd+zB9r15+y7x1\nIp3C\r\n=iatx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+qveO/T7Nm1avlJw9J074ZpJS8Vl19Osuqa9IzS4EjAiBMY/h0/wwHiSS8aVBaB6ovJ8rK4I031XjHFYEE32drmg=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.1_1642078961305_0.4938588948690459"},"_hasShrinkwrap":false},"1.5.2":{"name":"@mihanizm56/redux-core-modules","version":"1.5.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"42a498fa1173d9863d554e5f638b2d6254559b82","_id":"@mihanizm56/redux-core-modules@1.5.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9JLdDMFYxsgrb8iX0eXEKEVCVBev6+qG+nGIwiNsqL/dgmdKLAOyg+q8Xtue7vakmnXtIAgyGAs/ONkS2scbzA==","shasum":"74833312730a69516ff6a0571fb10a882c926cce","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.2.tgz","fileCount":137,"unpackedSize":165002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+7hmCRA9TVsSAnZWagAAyUwP/i80IRHsAjuuX4wuAmAD\n9+xf4mZ608YaB7tPjLmTbB4KOuGt7CIcoICiLKFM/GIPXQne6arhij7yrsYu\nb1hr9snCxiHLcPtN1JgBkQsN1PvKKWNUNwxjO3+jriSKxMpVzeRRaT+jvkfd\n4D4DZEx+ViKwOAjN3Hns8HWvWGw4iWUXioAUe5/tA4/2dVwBTobEwmyyLmo3\npzen5h3/cZYKXFfHP3Uwd+J4FPDUKNoFzTkv7H8MsMzGJsv22lHs9IHSo+lX\nnqpAIpnE3RzuZPGYGV/PBubK3Drq2nW6QWE7+vod/wWblk2PnWEEOVsZ20cB\nfBj2DoMA04YAQJYswli2DYb7aEzI912J16D+sPJ08L7TAHh2e0PDcBlWjaHn\n+BeKrq8ACogaFndMVO/77mROj6pSmUXSedIYr+KzTkOF+cuEPsYPd97cU5X1\nix87WH4U6W6Rf8mh2QDWDtyjDFYQNY7VmhlLYTu5K9j4HxjMJJLLXh8+7qaU\n6rovMk94O1tF7A89rqtluI/M9pgh+R9WBnCGINfI5GkvApjo8JQR/LEnabX+\nytw1w8EVCDKnzQki7tHs4p/p9mpYKwtjVEakcuP6YUHPQK6dEPWBoHueUgXS\nkdxH1ava4JZknfC0GIz2BpelL+5WmxSmM4rMkzr2xSoxAbD/J/u1oMtWJeCM\nVBtQ\r\n=oX5s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsZocoUQ56+Up3eM9/UfLgQSNO0haf/uICNpk5sLkw7AIhAKrv95I4d3efn5q8Dai5SjY3NlgI9k8/e8pQYaMm5v1i"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.2_1643886693892_0.3164793100844252"},"_hasShrinkwrap":false},"1.5.3-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.3-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"86386950b473680048c5e352d3e3a5f57101aef9","_id":"@mihanizm56/redux-core-modules@1.5.3-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-8sTlSxbYxTbqAAngdNaO8BkMhHm/UnZRJa7zlw6zZHdEnG9h5HtQJAKXK+b1sM/tqzhYD6gK1bjqp7Tm2eyMmw==","shasum":"fd05b33fe51e427c0a1b32f985a56e34b3b0cde6","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.3-beta.1.tgz","fileCount":137,"unpackedSize":165116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDUupCRA9TVsSAnZWagAAZ/gP/A8BkkibFwV+VVPMV96K\nKW+tHV4eCMKXtJ5huRZFOHeC+zStxu2XJpZqZRG9RXxnKCf6DY11qHc0o6nk\nUkzx97WZIOfoUXAyuKMOm1RbH0fSeCvqWP9gArWuXTNC4FwY/J8vnxECI4IY\nN4qA9l1+Y380G4gqqPg69ZkQOj7hLL96SfNDO3yx81d+89umd3mJvd+k7Ctu\n8z7uMrllDwvg9pHOweQDzzrL3V4yMvpxjt96BmQaygbc6k2t0P34NeGXaAjD\ndACzhBnMVZ+9Dw/f5M8qzprHUgcK/zZBjz2/dfPer/hDDLlyMSESdXkAzXEo\nR/zWfu3N/CihGmom6M7zxDVZCaFkx0DhKcWyDpj1Lt9XmexMfILR6E3g3FDr\nG1k83F5rU6IY9fXP/2YxKhsj3CzQj/99dDuhs7XvG0/QSYiytSWpp6wSzJPD\nC0f+oSsbFGcUvPkHuhNr/zBa6BzXGg98dh7obWJknhDmWu1ZssaYXtMurVzu\njBsn5okl+vDoiF+Y1w3emvVgtL/gF8pGB2t489lj4kQjQtu/vXZchqVG0rKv\ncjhykqJ5et/Hqk3T4G+U2oqnhtu2uC97hGA4yo7sgfnK9trCha+Em9wDtNLL\neUtmtzy0wcSTCqHZR1u5hLaY44o+gYSnPIS00mprvcSm7r/4SfRadrWXXhyi\n4KYG\r\n=wnn5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUrTG4/Pa9j6v/CZBgN8VDYAmJNF54i3ngI23M9IZ+CAiBGSREMKce2ZGxHB0TE8CLoKxI777LKcvKF+jhllCl6fg=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.3-beta.1_1645038505796_0.6982663664815627"},"_hasShrinkwrap":false},"1.5.3":{"name":"@mihanizm56/redux-core-modules","version":"1.5.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"e1f75404d75b25d867a014d4c3f11ae4921c5870","_id":"@mihanizm56/redux-core-modules@1.5.3","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-+fDMvi2UjuLPbSbduFLUdGo+zs6noTHcqn6y4uRfWNZkBnJT7k+4UH9+QN89icAh4qGEsbCmDW6EeFh0blPndg==","shasum":"cda03ac5a9e69f8c1024cc4be44bd98bf3992149","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.3.tgz","fileCount":137,"unpackedSize":165109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEqk1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGDA//V62Ndjvj1JbFLqdQAqZMKfXzCw6hJrXec3F0Z11HNRIkKSHz\r\nfSDOSRGDKAo8LWpL4EUDFrHQTKrdHOYCDfDJPsulMgeRyQnSecfPyT2iDfqB\r\nCgvQClBWygGlPibMbx2fr8/k8+I9hoQo+QiuHMmUnZan8Ihu6JiyqnLKldIx\r\n+2P/WZcdx3KufdavZ5rpHXv7f26ClqeejeCcndUXBV6apGbLMVvsS+7bg3Er\r\nMOh32srslUhNPHZUGvTs504JqSyjwNwF4zuqvU7+2yTi8MLl8mTfkEywCrTR\r\n9UykTmN2rm5cCAnILwOb8HXcMaE7uSlZwlnGkz4bYQxJPOADz+HQnc21vL7N\r\ncEQeNyf5syclKgyJ7cSGS2Xzeysjoo+IERVW75UyqsXPv/ZrMqOwGMHe+IgI\r\nU/itsktnVOTmPsqU6MQ8DtVGdUYsj+hTTpDzvvO2b+LoLhMA4zidSI5Daj4M\r\nh8H7nSz6KfLM4QmZYZ6EmiLfAwXUq5gEl/vrQUidi65Wzy80QPV/WWNBk/cW\r\nmTmw9jYNV1V2I4w6xX4YA9rgQAReLbA6CcloxqaSt6pxc8MY8Qy68SLfjoA/\r\ndKAy730vSKf0ohP/U1Z0aLUz+wZJd0naDjsdTgClgrRbJE0D/3ZMl6gNRo9E\r\nSPv98RRplsuyC46BwMJBF2KTMW0uNx7MOZY=\r\n=WlF/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGwVoT2IxN+vPmOYe1qc8B/B/dixDWIeliZgp9H1v98AiAF7fABrbqCfCldCuTwDg6Tkot5RDyTIsKlR2DIpCfUXA=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.3_1645390132894_0.38751793914105104"},"_hasShrinkwrap":false},"1.5.4-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.4-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"2709e6e8eec9bb484725b2ca5b4c196d98ead923","_id":"@mihanizm56/redux-core-modules@1.5.4-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-J5E9rJgeiX8nYuhuoaVdLnRGhrHznZDDsU2eDsPN4EI3lTwmGlenNuEbvSoMwRdipH7wqsB92ErIBxVT55jhHA==","shasum":"a3ea3135e936bd723f4c6f4e50783a5b7c8522a9","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.4-beta.1.tgz","fileCount":137,"unpackedSize":165315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI/BwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnPw/+LjjjhC/F6p4eASKYtvKXaydhFDo+9IKAN1m4TPooPhhqFD50\r\n16SCBzu3VnKi9LBOJUFsBzVtDXHU4o2JAuqg7s9clE8AP6pPfYj4x4NhN+0l\r\noRSAvwT0tp/JkhDS1TtuWdMx2jcoZUJL2L7IES8GU65IOBMFwESPueF/3j2D\r\n4NYkiFWixE+G6nsvBsEoMhCcucCjC6CZAlC4wqmff7CCRk7P1O6ujjiBH76T\r\nqQW45EWBNfYeHUWbsCywPZ3dYJSR4/dG3ZMNvQeDwu1ZyfgsHEdRtDTvEVgv\r\nRp+mO0xXC/1Dz4+aT75eJhmi8HXy7WIT7YwexSsZYQvLMKOfNAqfmGvQ9GiV\r\nyRMnDFVLZwn0hDx1IiDf/xumXf+xqoFzI1B7ejqzlp0cH0PCCs9Sq8b6oqgH\r\nr39g4jmEuEZoLA4i+De+oomcySi63aHp18PEvvfhh8H3gA1k0tSuhHogd7Ac\r\ni50yk1ZA+nG2x2/qcXga2tMzlGA8XdLHeXIg81D8qMHcr7ZhtkmmE9Lcibcq\r\neTbpr56T2APtKKMkopu2Toc5aiNZ8Y9E4M4sVHJrmoGNVErkFyr/amF2wu88\r\n2TAqHMTmlH2LO5U6wzhsLKUvSaD0pzTOM4XjwcUZXnZnCrQJWsKpswi1Brua\r\nlWIRZKsNBFN5qsqaN1gVxgGuzOCfcoznX0Q=\r\n=2gm6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsvmq/jntW3OP8lBanbg9nVTisC/s00GnSRUd8thhL+gIhALOBS/jd3htV954nMJIFYVJcqtdzVkLAwi1CzNFhB8lD"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.4-beta.1_1646522480625_0.8774129155385768"},"_hasShrinkwrap":false},"1.5.4-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.5.4-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"5036aa83ff7207213ca85375ca533c72df4520c8","_id":"@mihanizm56/redux-core-modules@1.5.4-beta.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ks9Fcyd6gKL6V2/HrPp+VyYgK8NaHgTOwKdOwBop51wOQDKAkIk4BVRrbSKFL3O3PtIcqsMoHkp/cyaP/jorGQ==","shasum":"79f909cc4b2c83a1293e84ad27150c66b2862d64","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.4-beta.2.tgz","fileCount":137,"unpackedSize":167079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJ+BvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8eA/+PdLQ8Q7vVYgqlfaktSDPyT9wfAEn7pp1m0hbllWp3Z/i6YK0\r\ndY8QC35K/ME5A0pZfOojcuWPCYqsnLY4aoG3sPvAvzG+WiJ4g0rRCcdF9E5Z\r\nyGN9ijVLHzSywXa8TbhNHXj1tlgPa/DaInjxepbMHO90xWjt0awSrn0DEGqK\r\nOZOJDT3pa07jMDPQDzW4P1FDrgAbRktZcAMi9hOx/KW3vo3M9TBIY0I4U/q7\r\nmnlZqvGdcpighdGeC2API7wLqlElvohM68X5Ql8TGO4zO7z7ci8s42aloz8X\r\n5z8OWKoSPj459e7YQudqbLamVESTgoLRahJa2xdAeKXW7XJ67gLg3erZ/44M\r\n/NtY3s8EeqHkCQFsAViygW7scfiMg5skmYUFILzCMtN4mHW3Vf0mz5ShF9fm\r\npj+pOnn3EebTqS4lzHBitROjvgURPIro3pTK04i8EvlAO8w1sNLDW4qAcBEQ\r\nYUzalntaDB6bCdQB4if1fAOIZLlr5Q4kbOYSIM3EpOFgJEBbpGwA77IIbGyg\r\nLPrdckmV3/jJrFhCNabIltrirq2x5xe/Tg8+X1+lFdfsXF/90GqD9kLCAdlk\r\na+wCQFSWHph9vuH1+6z7tP6UDLJXF+M4jVQcdWJgmfVknfyLo7Kon9XjxVUj\r\nK7t6CTVar+pO8Xuj0t/jYKIDCX/26Uaq58w=\r\n=02Cg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVehx9LWC5HJALXV9+i5jyBPBrcocjH1MfUVhYycZGmwIhANJaEdofNUok1hRh7AOtnbT3u66We6hNH4LNtIbb93M5"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.4-beta.2_1646780527706_0.6533118798921429"},"_hasShrinkwrap":false},"1.5.4-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.5.4-beta.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"3b0efb21368fc8fc00cce8f78482c7dfa1554bc7","_id":"@mihanizm56/redux-core-modules@1.5.4-beta.3","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-IIF7vpmty9RO0UGgnjbr5YetirwrX7NMRnJcgFmTJGG3sIVGlrbs4V1jlFXlG73whvBDvnB32Ja9b1M4j360hw==","shasum":"f8ccfaba241da3c3eaf6b3022193660482a20a8d","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.4-beta.3.tgz","fileCount":137,"unpackedSize":167626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKod7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiERAAopFfIzqNrKxizkL2IfzbmDGRcX9jGfsrdgCEKkvz8FVke5Xa\r\napcB0KQWbt4w53ls+vbCO55LNS5Up2eDAzR/SiBIxYWMElnYROaRpVMYO/46\r\n/xEDCMslmC4zQTR3lUz2OIyib0dtQJYfnw3qDx4q1Gyl9jKuj5HoUiStm5Yo\r\n/ngSDxHlmhoKbf4AGySMN2aCdtifZf7JIzbkjTRoE6Wn3vWkVBA7n0kgfFNS\r\nkCHDnRtEPxILqr+OspOcx4shS7g8J5MO9v1GW2Df+/GuN65w2/7nMgdALgsM\r\nPFJ3eLs6JmT49XepS0gfPAWv4fZNIoyn2h46Le4zsyxjYv4cXNKqEqZCak4S\r\nU7IjyKNpkNFdX0Wk+08HtykGhlYYGOkeVxyRrmgi7Cbr0u0aAMCilIS3c8/m\r\nPskl7njtC+Aspq3lncH1CLUQFk+LrfZMa/dJn8X+wHn0VHdCgA2Fo0qeEtbY\r\net+NEJoXu54Z8AkJEBMfuBfMXjsKfF6N7cWnIoi1dJ2ys7jP0ycHKQBBlsC/\r\npgOHgERne0ISLNVHvWbYlqvPuNkCAPhIqwM+/uCYeePbnG0APYgNxC0l0RCj\r\nmdGfyxchGg5kU3U33q/10oVfWHUmQjccoMB6XQ172WdT3Mgvhgg0Hn5t0NH4\r\n0rkADXutJZClvnsTGx9BpmYIT0yzmkSmFcU=\r\n=Nv+s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4/nnycIh0GhrwugXxKFTyhQzoGAyoz/69pTjlSZpDlQIhAM1wJxnS20aWGksGustCuIxfkNKk6A2DadjnDnMdx70F"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.4-beta.3_1646954363791_0.27592179705621556"},"_hasShrinkwrap":false},"1.5.4-beta.4":{"name":"@mihanizm56/redux-core-modules","version":"1.5.4-beta.4","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"c5efae313bad800aebcca778c547acc6f9e2d16b","_id":"@mihanizm56/redux-core-modules@1.5.4-beta.4","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Mh/eaWWYpSZzugClG3IOqRFL83qZn0J9D5vHxjidjxipTNRUPMwNkfxMT/lamQeq0PcrmeVlZc1auZLXjTTZHQ==","shasum":"e2808d2c6df2a3472211ab989d628d5c521a8e1f","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.4-beta.4.tgz","fileCount":137,"unpackedSize":167898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKpHwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWABAAiSYkFp45nRzO6b1JUQeMuWNJHP184IhNwsep1oVbAN9AQApO\r\n2IvlKdhNs9HTLDmBZLQEZQaw5kLeJA57y/WBL/e7bca5yq8Fk36m3IXeg1Sb\r\n48piQf/+eF2TBfGL23Yafok7QGY3qfub1RmSSmwSYQNOLAx1ejxhEUvqk7Oi\r\nYQlkwtYBuI4it+YshkN0WrdEfOhWI+NoYwsMuS/Cg08S/gI8SZijxOwfXtFB\r\nAqL2pcaxzGKqAfXbfjo2RdiWNL7F82AZPOdOA8NMrwSPwGllmsyXT+RJSn88\r\nTG2kZSiMShh5iFnzOz5fQymW9EvXqwKB86CHJ47q5NbfRAeMx0XzyV4Sya5a\r\n5D9UJASsd3BELFsBp7G8jUeHgnSW0zCTtOrm41h+pIyp4SfSTM1Jn3+tJg0V\r\na4SrMcd3MO5XNoc86UGiaNcHf2VXfmuC6In7XtILFyHY9fVAcGVZH+zIRw2Z\r\nvyhuUv5X4YhZJg5K0Q1OCKAyI1+0Fa/lzZ6YKbIiAJJ5bzY2Yxjh5kDcZoEj\r\nfJw6AWXqSqqpcSxKiF9KDJ12Gwn42CGdu8DmEqbkLpbBQYpSJfbOgyVGQ/vu\r\nHr8xO8/IMYs1IeBoXEOzOV8h/2uOvkngo0m4QkcCqH/HNZblQLFacj7KXU+K\r\nX9G5WX9FizN+9KvdmMHZvjq6mlEdo1+rtrc=\r\n=NIcX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/64RJg6kqvTOJ+CDgoAueTXUwc9ls1X7psYLgfiau8QIhAOInrqYhftHLPI/6QTiT4THnvjpBjfmNaI8J+HWQMQRe"}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.4-beta.4_1646957040434_0.14838701794654208"},"_hasShrinkwrap":false},"1.5.4":{"name":"@mihanizm56/redux-core-modules","version":"1.5.4","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"236b2a1e15f8ab63c598a7b8253fba2398ca0c7a","_id":"@mihanizm56/redux-core-modules@1.5.4","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-bHp8LXxQuMXKiCLFiPb/PzwTRTq/au/Kfk+nwOKClQm5CgUktFJW1AEUaA1QQvRA7S75uFmnGTO1PRvh7E1KHw==","shasum":"b0b6270f42ea644d47f25af7f4fe3bcbcab5300b","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.4.tgz","fileCount":137,"unpackedSize":167891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK0CwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJjA//UOvTBR90CJhPNJbJMT89JHXclgoQLoMwPqnL8Hpt+KuT6TWe\r\n5ORFmHJILawML7mzlcC1ONg4Xo/uvK1ZrWl4Hxu+r/DfQNfEQEpvCJRyP5uw\r\n5d+K6WqxzR70jOfLQ4EftqmCg+UdiK0D8ckv8jDmcyCtk8HUg2j10cChbOHJ\r\nLPbR4uYITcMutl751BpybrkgG0ZSlDED3/5OEaoaZ+vqyED7N7msCuIBJ4/g\r\nc6P0yVA5iDgZAvaMYR2aOAfJUpPf2bYPoCgWdck1H6Cp5BMbeb7zp1W1wmCH\r\nv9PddFE0ij4bAxe0sqYAf2YesLVP5gwUHGSn2HgqR9q52SnmPkf37fKii+5n\r\nuq2VlACDX/h5CvBatf3HQYe3TUzzofTgeIFyfygjruQ+fryGcSSDntAQAu0+\r\nt0wQnIIj/E3NKdiJ3lCdJlhohgTDmt5Hjf5q9ip3xr/34ci2RgMfoQW5ZXac\r\ndvZZcfVu7qB8+XLIqEkz7isG84vGI7d4cTflyQ+BFKSp48V86CPGKzoV5hNh\r\nhG7tPfD2CUkH771A5ORRpSVxY74rlLwOsSWgNnWBnNu/mdv14NU4t9jmpS7U\r\n1Z/bIRCsKIlbPVy2Mr+vmjnw9LYevONxaII5Jd56Tmcc3QgnjUL4OMdVWwxa\r\ni95DSvIfSNb2d4SyYCP/hdOZ8bb0Zf69t58=\r\n=Yjv3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELQP+pw+wEUHBQugnAFwCmUJfhOinKXeAToLGMQq2ZUAiBtzMVvaVS2HvRyPj55hRovA3lF5rsIVjRG94L0J+X9IQ=="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.4_1647001776111_0.778024064269317"},"_hasShrinkwrap":false},"1.5.5-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.5-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"7e98bd3ae5a1c3e078405c1d96f0b16931f3ce8e","_id":"@mihanizm56/redux-core-modules@1.5.5-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fHJNCkJ7AIiuDXBzI5hN812N65JveOsOM032Uhc65QnfylH1RrWjxiJRH0K9XRn54QtFQ6o5l/T8uk7nQo2rXQ==","shasum":"430c8d228ad41964b0fedd2462c4c465e2452d93","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.5-beta.1.tgz","fileCount":137,"unpackedSize":167956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMSADACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRvA/9HXBX9EguSOvz53aWE8nCnjvZGMxusEY6Mc3gig8lh/FwDO3U\r\ncbuhN30lrIUIoNDwQVDPtUubOoyzMun86acwnGRaL3HpoImyyvFNOZeUncid\r\nHwU0sbQ416ys17wFxPV1aUTLnEPSxCZ2Zcg+QYrm5bx8sLmBoSRPsJiJjMLv\r\nVb8Wex+JqmAhhDORZwcnCALRiottKHJ9d56fEBVB/Qr2ikarp97fnbeqAZqP\r\nkWk8bRSoExVAPtdzkswOf8r4auhH2RyDM/3KTYxZO8F7Bf3oHUu1/orNnt+n\r\n/bPVjCI5n06A3csioQbCe+8FAkZHk0SsRk0W1A4lST1sRmwpF1kr0ebixtH6\r\nrOqaNfoHfTDZIhhnMhL5cokcpcBcrZBZcIhs1mej7yBp7YQkvw9nQQ607q3J\r\n6EBrwsbBvn42n/Ii6pcujOeJqsQ1NWpGxljw8kmds2PkhQmZ+FDCtBKNATwO\r\nGaiqLW18gI5lGN3L4l6EsfjRmENkqFwLLdxY6JThyJsJ3y4oKPwci03Wqc7f\r\n3miB6mkhnfmSBnNGFDJjCdpBtei5XbBTfp40a4ZdYcoYMgImVZSOgdLsgE+r\r\ne5p6kRDB6MUMpJ3jz3XQ2bwqmnUuHUA+DjF1M/ohr5SrnvdT5XxIe5CExk+Z\r\nPKeaVCAtVscsVFROPLA1a6SbOHpaQfpUq2k=\r\n=06lS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFEoBcP7NJEQRNuDANJFg4Mt3dgJWvscFulIVkOrMK1bAiEA/7QoeKvMKn5GiR2MHP77P9Mm83d5H0/BdJuQy0rA2BA="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.5-beta.1_1647386626962_0.9656377156150981"},"_hasShrinkwrap":false},"1.5.5":{"name":"@mihanizm56/redux-core-modules","version":"1.5.5","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"50813a0edbd0d4a3112c9ecf701e5daf44c80676","_id":"@mihanizm56/redux-core-modules@1.5.5","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jCC5+1s/8EyK3n1j3G6h+AmrocsS574b51mbpV7/kBaT2jUJ1dSUjQsDbswZdYQTdtX9ANMgnWyeNnUKAXFw8Q==","shasum":"811ee53bc1182940204cda345977f4a3d8787522","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.5.tgz","fileCount":137,"unpackedSize":167949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMdBlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqs8Q//axpN/D5k2oNXPKUvvCj5aS6G4uGjh1fRwPG5nyIpBvS11+Rt\r\nDf9WoEU6jCHLvw4NmbCyDBLa+ahLOTqG6Qaqo5La4gSI7uAGxqa2+ebXYmgc\r\n4C15fXk9G1dTzciFSsR+YoW4xH3r7K2OoLxrsXCzm7ckislwd8hAoamkhsoD\r\n9t7qGXvI2HpXaPw5070we5g9dnkh4f99wvdi0CpG/OTaoogrWS2H661zQh5u\r\nn+UCc85ga7OB/Tbv8wvSq/7PaTtNMUqaFPapDO7Fviyro1mZjvTqZLZ31leJ\r\nOjMpzNuudg7tuLyFEHthU+K8fG12O7F04LCdl0sqKp7fFoDaEygb9RnkvLNE\r\nNDwefst7lbbne7OcoJgPsdLIbPR8jlp1TdBShVo9VbdyMuzLZg+x8VWYtTAD\r\nMDl1EvqBWVn4EDzI1UjquF0s1ajjHeX+lTE0DlqDtThE0AIdDxQxwGFTLktk\r\nO7MOxcxvpUNJoivpS4/x7xnyg8hy7RPVPTWIepNa2B6CojyBpQ3JVRJGySkP\r\nGz123T4MGSGZDeDWSmlvDGjKCeHS6kSCQ/E9SMbz60s+sVTwmEz/jf2l1wOW\r\n/y4BTeICZ7PYS/CMOXqwNfjzIEOpebMfk49FAHWTF+N+kE9qc8iAVRX1pHup\r\nkW6ZN4EOxjsVRePENPX0pgrfCSQSDpmr50o=\r\n=ExFU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoTWN7XCBlhLOa+tALI974uzaSGsffDXgLCzX9KqVU8wIgd++bXdsAWwKtFj2BJoiSi3IQETxvK2RuC9bylsSebnA="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.5_1647431781091_0.40315477696132684"},"_hasShrinkwrap":false},"1.5.6-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.6-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"7be012064cfa8a35c7525856445ede73f6c2f07d","_id":"@mihanizm56/redux-core-modules@1.5.6-beta.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-zTjlXW94cGPn3UzjR17JGdFuAkCeFgwcZIzgeN8CEREyr/EwBMmIuJbnqwxyg9y1+idQ0KnuipD8ilyJi0iXDg==","shasum":"13fc318605f8f89cf0fb62622d03b11ceb640069","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.6-beta.1.tgz","fileCount":137,"unpackedSize":168209,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA01AqlJujSaykAegr+4YV1J+biZeG+pPZ4/Tez46I1GAiEAiovIYkewWbeQTzaGCA/q9P+dKtX3pNQe04bCJg8j7MI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYExeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6Dg//QYboXK2GYGg+KBbnHCbKdSliQEDUk+AYoIWI4ijcJQUaKzWd\r\nUWc95Exjj+oyaKuw9gNBWOo4uh8N3ev0eKkYNGemshh3EgjOpn7vmpt4kuxs\r\nqbdKWhQ3oPe07XazI0l1Ib3rv7+JbZCcIUYPoS45Z2cAeU6YAQmMwJYa2a2E\r\nT3365U01VBXwAAfABXfd9f580reoY8R5HbVL4A7PtgEy1eKDYcQiGk7n379V\r\n8POvWe1pYnQEaTEV4qCzTHK2yfxoJzYsZM7ngWDKEKS1eEYhMO19FpScW4Pc\r\nP0UVSxnuN63YUx3fboEjcrJSvILohXqgLZ+ZarrviNE1fXUpR8CvffbdMGIT\r\nZVHOfWlAAc3wYURQH7noAIuhstrwvoKkXfKgOQZ+QPQm1haq/Hoj0D1VSW6X\r\nXzEF1WxiYHz81caN+9g1oequ+oqhPXLQTW1HAIsZ1hwtyvomlE5Y9013F5vE\r\nzc1Tkl+uipIWEiiXAxlBaO1/yvVdPGjFvKscLSjb3ZYAfoGRJcjV1TxV4x9A\r\nfQN9qC42Kav8WHaHLghkrHSLWMN1Gnq2lS+slgiYfwjHrxBluExHsSyHb/VR\r\nQawNcF7C8tHqASvHyiPCFh+9dgZeueuqEqzK6idjwZiwgL8cfjuNe4ht1Fsf\r\nsiqJBWWgRW6EesMNu6jgjqaWBoFCfT7fI64=\r\n=YcCa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.6-beta.1_1650478173756_0.1864084739588907"},"_hasShrinkwrap":false},"1.5.6":{"name":"@mihanizm56/redux-core-modules","version":"1.5.6","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"3ce92b1fbffb09f0c18106d299392cd7623ca24b","_id":"@mihanizm56/redux-core-modules@1.5.6","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FIhoUq1u8TTQ6oiGwP0oakOyDvYxueaXVUKc9LOm8gQVNLMcdeOuSi/GXYyPBNRWAHvqjc2FMiDY9jZWZr8dLQ==","shasum":"dc6718202a296f34d7e1efa7ca97eb4a78ecd1c3","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.6.tgz","fileCount":137,"unpackedSize":168202,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCygdQ5onXthcYijh8zg5+exBPPOIdzmww2ABcW/l9bLQIgTjanbRdVco7mjW2bzHuOj8GJlApcg/veVys2EDMd+8o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYItKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxFw/+MnQmscaRTX5imYWuKDVjRUm8cvgL0RCOshOaFqjM8sb9Afi8\r\nqFxL05oFwJoyDWUv09KQuiKl18WMNIeqFo+8e2c43rhQuoBdr1s+6oxZRbFF\r\nvj+yyECCmPDoJoGzyycdaryRiHNogwpoueNWJU6BJMQKUve2Qr38DuP0kGPT\r\nT8aajCMZL1ENZmBOxFyOL+WcEDymAOIGvDcHq7J0Y11jvz5WWVdu+eI7KzAn\r\nqD8bUTE8p2J8jzKxxcK6ML+87bypQEkF3SscXiyOG74nzkET3ba2Y6AAAYxL\r\ndlM/dQ/SXZLAeCi1FTSw2AFaAYqS7583hKr0dxx7wvesIb3/ZbCGLvnBNhpM\r\nfet8xgaTvJ6vPKzXNDIMstLIuz5YlJVvRmci+ZQf4wJhTAvxW39hiB8hEHtG\r\nGjjlv5IGttuzTdYYH4FV+QS0sAFP7kpl11FDRfZO/wCBEo2rLXPs8/VLIKdD\r\n21PVAzdaxFDgNpjleD7/UTBo1HcdlsMbS1sYqTkprN2PZeaLNrtvjJiC+7bj\r\ndbVlc1HFJ7KfkA/1OO1C8qQSB4smgpgKIzv63F6QdgBlpeYqE6/jwYYo/cja\r\nHhulFxllLW+mJekwU2x0RotAvp7qnjnYVbnUNXdSuRF3NvpTn8KJBC43tF/G\r\nDj+TOtydRfanmwC+7iJK0lLKih8/ZUeJR40=\r\n=V8EU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.6_1650494281960_0.9770713078286355"},"_hasShrinkwrap":false},"1.5.7":{"name":"@mihanizm56/redux-core-modules","version":"1.5.7","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test:watch":"jest --watch","test":"set CI=true && jest","test:coverage":"jest --coverage","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/jest":"24.9.1","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","react":"16.14.0","prettier":"2.4.1","husky":"3.0.9","jest":"25.1.0","npm-audit-resolver":"2.1.0","ts-jest":"25.4.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"3f5582155eadab3acc59af7eac8891daa6bfd96a","_id":"@mihanizm56/redux-core-modules@1.5.7","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-JKYS95cwExAjeWc8OZMZZezntkky20jMvavGTIWHr2CEhgtXRlayIpRl4RF8PvT8yP20aICTH2KU72jZUHvoFQ==","shasum":"00de70304bc57d2e655dc6f9d6f23e8f1f4c20ca","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.7.tgz","fileCount":137,"unpackedSize":168419,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFoWntPHTLOoGv/oLceXt3XzSx5MpNfTFTFT2iAifIMtAiBHwggES4aAjIfNhBs3M+gRwu6i/6+mzfoSPiQ7eAh+jw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYKR8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHSw//QIvyt65M5v7QKsQd6I/gf30WFmGwYMrukcXTrhBdyA1ehDuU\r\natEXQBq0tJasRjWVW7Yi34sOfvSZNk39V69Dy/HWS8/0wFFQ5i3NdeKuZCEl\r\nko23/EnLGWHSKNG18WY7cKkpM8M90UOCbwWZEyNUV/8jKyrQOe869NSW5sSr\r\nDUnsn7ampfvpYiREZ2fHyrDPHkdod2jtdPBv2R5cZK0mx28UNwrhhaawnZdy\r\nz3L6ZZxYeJLG5RBSNVpim9MEpk6aNSy1o4V2M9cHcsj7hMePkcp9zUgLUL2h\r\nq/VkDCA7l2h4RU1rBw0Yyk+Zfx+vVB/dsZ2EdNbWRdc5/wKs/tMw0zmu70bo\r\nhcj/iG2IgUsIAxEeVpOa3/1F0jX87Ubpyu8uSaQm8OwoDlhCFQJvHXWhthhd\r\nuW43DvY6YBbuPoLK+qc0ylLp6qO9+x3E9CfAIifawSUojT77bni8gozWCyEw\r\nJ8gSRD4UNm3BKwK3AQbHjoRxoluxv0+yLKBzxnoPNKVMFQSzZY4+74GYhHAY\r\nWj+4kmpUzJRSJas/np0bGp6C7Dw7ae5O7+sm81hQ/ZGJRw5nxJq48VrNlr+2\r\nj05sXBAsXL0IpsTjMdEVaDdVFebRUwJN1PcdmLTs63pTssOZszeII8XRxTHF\r\nGgZdQJ+x9yXmCGNTIn4+A2lf8U2+FCmKAoc=\r\n=lHsG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.7_1650500732114_0.0317641501927044"},"_hasShrinkwrap":false},"1.5.8-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.8-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"b57f1722b583acfd86ed0e9e6d81dc226858a5c1","_id":"@mihanizm56/redux-core-modules@1.5.8-beta.1","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-RG11wr5smTPTrOjNVCK+sBbyyoGPBRmkmNqTODSAsCE9itQHbQT7k9KHoMAft7NMpn1LjCAqYVAK1+a6DQXqBg==","shasum":"35df2a4589efce37fd377a7babbd50356bd1cb98","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.8-beta.1.tgz","fileCount":137,"unpackedSize":170393,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHHu8ELrD8YuvJRdVjI9s4OETGHwRR5G/N2BYQU3bn7AiEAtU01JKx3cEpxR25950XAytwkSjb1NsClysah2EfwZyg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicUTSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/cg/8Dms20yd59x+TzOi4gYNTKZzlPaZU7KaxUQ3bYXwOr0LYs9l1\r\nep6aVa5wINAdNWxSgJ/nCmT7NocgJ4XXvuSEcwrVHU/h4NdTu0XHY7hlOsLx\r\ncvyVb4Ot/aCqGW88FAqsFrNDUEBEK7I5Hj/fhIBAdcjcFyhpZXFuqguvMbIG\r\nUeXQFkgSptlEy6STnaM0JGFBXTl271QlVXRrvadh3Pz5Z+dA1AWm/Y/mght5\r\nQm1830UjOzkPMH1VPclv8XGiTPUXYbmypg18a+Jd1Vp4f678+6ear4PDp2B1\r\n/cpb5XCziJi4IeIn9wIJpZYp+94MyuJePFY6uB9RUtoaxjpYVd/CR836IbLD\r\nHLexysRhiq89XaevCcvdKGmEXk/Dj82znz2C7+hvc3D3RZYu5nkePYlfck/T\r\nJLQB6D3hHXjEqdrSj647f3KX8oS3oC7u4Jrg5pkCed/xaseQunBltX8O4NpR\r\nAWGr1i7eXF9Ffok4A0tix9TyseELm5JDmrIk12i0YrohBJQwMjf0H3Rzqr68\r\ns3hVKnII3qhJRBbKdXZ88o/lsQh/zG+H2t6CM9xXw8iXif+bZyvy+CMl24Xs\r\n0WWNGAIm6mjGTZtwdTC/dZAXC53sunvk8K08Z8s6kiXC3S1IzOaDASTWnGWQ\r\nsMQyPy9gJZ13NnJohopDoeXerp0ADLkLKSg=\r\n=ruwL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.8-beta.1_1651590354671_0.616654818897252"},"_hasShrinkwrap":false},"1.5.8-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.5.8-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"1b73f38a41d41a730cfa39131d235232d82d4419","_id":"@mihanizm56/redux-core-modules@1.5.8-beta.2","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-GNUq7MQcWCFy866zhAFiSg/1v+OjAy3Vfc1ocGp20sDh98r4OjYIpkxMtFzoN7svM1S8XleJJWtG4j5jnVMZ5w==","shasum":"5685874463873a00cdb7d8f35dbdba7cf3c77999","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.8-beta.2.tgz","fileCount":137,"unpackedSize":170381,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVmO/8qtVbu6leNYoh/RfB0NqjsAzi7PY8wLrXnMPaTQIgMCB8v+2Zmb8waBjHpbk9C5ZT3VxwYKYyrQOO3P5/rSQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicUnnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFKQ//ZZkXj7QgKHBkWVeqBC6acW1VQmiuYX2UBJRqVUFpeiLRyDiJ\r\n/nMuHMg9GYqTq19m0h5rdzD+DN5wbkTW4g0ae6AgWeKrIVkLZab7V2+kN3wz\r\n4e0b4/de7qQRQ388YzdZCMViUfgwYrHjEjkjhnCsBDwgWsIq2ylVpir0/YX/\r\nelqCyT8yyCsuJlOou8BKJ0Wb0Fme5Q5VCQQFekxRNW5NSs1Xu6liUuXwHQAS\r\nw+VD+gur8It9O8G+Dcsbu4N92VCO2KRRxclwjX4s18aXlI0T2HeOgG12fmm9\r\n1tXVey44b2+zc9RbZl01DwdLu7WXrvM4WeqWaLoNX/ouyRTrTPmcVaWTipng\r\nwU7TdaRxwWqIQmLY3REG/QFXOC0Nh2ZmirSH8qKSoHYcfnBzHT9qcrdMQbom\r\nnFVwftwTYTVwfMqNRP/9k8L5ZSegnZ1R9xNZ4wATAUMvDZbFmIptOdGyP7tI\r\nSp6z9iCnocJUEludW9McJB75atPZwcA2OtRb93qexta2u838QRVg8p2MBLxn\r\nNQE0+JCmCmledyWn/tcfAMf0Yl6m8kIX21AQTz2RtbSoDx9Ufj5d/c+zmhGl\r\nDWBXPjFAgO9FHZRHUKooYra7UtmRMh7ggh2wpQ63PyItr+NxlsAfYfcXUYyc\r\nUVviNoU7XT9DLRpsubZ+a/dOuKklLGwq8mw=\r\n=3Gxr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.8-beta.2_1651591655399_0.053425710963769246"},"_hasShrinkwrap":false},"1.5.8-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.5.8-beta.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"7202713e2a5aa3b5dc5c380834f91f4b39c6121a","_id":"@mihanizm56/redux-core-modules@1.5.8-beta.3","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-ewDv4VxCBi7igSMhuUmgReTHgCxJYDnW1MI4oTTfRElDbuCKnm6Ji6HvUI+Xw6UeVwtoa+dODscOFZ/4ko3Amw==","shasum":"d5531689d53f7a1965384e89c08bbeab024e3d34","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.8-beta.3.tgz","fileCount":137,"unpackedSize":170883,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+DFeCywc11VD0pjIk+uSWNnQ1xJQJbXnqimjtz3fB/AiEApCw45Klr9QyGXW6pbrzTrWGdp38jiohnBJsPF1+H8lU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJij1DvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTYg/7B2WVZCvo82iPlG9TEC/AKrAseBcEd4Br/fTu+dZjNivFijZS\r\nR7Y3XnEdxHEsNerga+fqONrs1XOFpM+WKjaVD6G7n1E6a/zgVg+6YiLLe2rR\r\nJ49LuAUf8YJapmil6yES0psH9DtuJ28mGED1RkTMHx3zBZvdY2kjUv2NZZ/x\r\nUSPxwJRViff6mdvCukkcQj3CzjoRDrWb+1LaoGWYSmGu54TSK18E1jH6cSza\r\nbA69w+URCIififq/LQPPlSrg+3naXFjN3yagf8M67BDVguZk+1qFDuYshPzC\r\nrITxzKETMLCKU64VMO01g+5UCb9jTSLk+mhFnI5cek/Vk1r/66LkiNbo/WQJ\r\nu1BbmlbGHk7/l9vOfvJYPB4KWg9QpjJxocVxFoq5RBXwmWoIfV0ZHkfXwh3e\r\nkQtAVJXuthPmazEObHmRC6xE/iOq3lTKHHpbaX66VyZQ+ErBFxB/ENPi2bXH\r\nARp0UhHXueLi73ftqb+buAmNBXOD8zGYZz9VcKu0/m5nFEt/zbTHn/Bj2bsj\r\nlKSKPtJ7MWgMzrOLB0a/R1c1WZovmZoXTyUsWCo5aGzf3hKr3RyKlaUNBL6U\r\nBC5rzJaQ/dYs8yaF+tC7z5kLk9ks9oBFUnZQBe1bMymp0YWC7gXCK42egsnu\r\nLmgrA8Ztzdtaw0l2z1WxEcNr4LooxHrK2DQ=\r\n=TCbo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.8-beta.3_1653559535117_0.36573219902889775"},"_hasShrinkwrap":false},"1.5.8":{"name":"@mihanizm56/redux-core-modules","version":"1.5.8","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"1c83f417a5c6dc8590c64f510c6fdec72fa27565","_id":"@mihanizm56/redux-core-modules@1.5.8","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-/kaVQNvdI58zH6s728uQnUzKm7bp8k9yKcKm1IV50ZzM4J0XS7Qef1Qclci4D/najiKhf/BwbgapnO/GK5IFEQ==","shasum":"6527113fcac77f663722efb9b25b2ea6e1132d86","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.8.tgz","fileCount":137,"unpackedSize":170876,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBl5Ul1BvjfVmtfwh8ksdeHi00m9iwp6OzKCX3Ku6d+vAiEA945CG5B0Wrlo4GeGExhuV0H0A1SQ0F8yrB1XxsLER1U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikMAuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoelg//cQABI0g78C0Hdi/gDeuUMkynyS67KAo2lFzodplvNGQu/CP3\r\nRDiYyHcfUlprdUDXqD2WwwNZY5a0G2PoiQtsfSbe9FZIPYtRNYDarpmiJ9hK\r\nfOewg03TE1BnrbM6YtBRKBhcrSzUUGS7kLROGPJBd7MEVwVSaSK+/DaNouqk\r\nj5jh/DSPHnM9LFz9K2nb300fkUvaZofLnuhjXjrCD9IHG+vyfEOtaVfTK4TK\r\nhsKAagcN6Ak8XBZjrl4Qje0V7BKZDsiGStWAthEjfjrVz/UyMQM7LhaHxEe7\r\nPlZIuA81IW6LW6w8TO/svofmXN1uGew22I0VDyKxdlv2o9lIiH+nLzVM57dM\r\n3VZ2oYEExnHTZJbF1VaDEKoQjXclwb+oajk+jU6goeN/uCT32h0OvyFEa1Kx\r\nMz5+nmPtFBkqglgLxGBMv6ljMwD7UM4toaoSxTe8FjcKlymGFQeUVgHGu39t\r\nTFckwiGcufpDOqh3nzEgwqvK5VXCM9ZFfvdh795p7dWBg83WMbsvLjxu5mZ6\r\n6wTJAES8UeicHA++1kZA3ZatkVdV/ibLEsDY6qizANORohPPmGecCrczqs17\r\n0Pqg/pk2sBZZxWHghIgzYlUqf2YHso13nmkANlojctp7NFqMyGYmvtJxGZxx\r\nS5JmgSUl2nrgkxeRzUQ0YsVexa6eo5d+rxc=\r\n=hrcP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.8_1653653550263_0.07463572337666835"},"_hasShrinkwrap":false},"1.5.9-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.5.9-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"f8a99d66428e007b547e627c47e778c6bf5f12d9","_id":"@mihanizm56/redux-core-modules@1.5.9-beta.1","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Fs8bap6+UJcD6uHKsL7InUEjquslBa/jR0NbuU3y66G20DFLXWAD8dIL70DFBAEUb1QGkTTUZds2ki+D+bla4A==","shasum":"e1fc6e852656d9d91e83c9a3b8278f0e7854fe1f","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.9-beta.1.tgz","fileCount":137,"unpackedSize":171086,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeupjw3TmhZpRakLIdIxw2Mv9TenbmAggmXlUrFgwn2AiEAgyD+jic9qcalFLadxe7rn5KTkDNL6SJ3eJgf63qKEKs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJin+QgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJtg//eBAVkT5wD6wc7C7hDFh83kMDetYWz5Ed/B4NgRACUw2ifW1i\r\nAXVK0N2VSz2KjiQTB8jyPqgLE+p6aW2/1Q0BAoBjjeDmrA1pyiUQuKl16eC+\r\n9f9PWf417pg6vu7gZ16sLyE2N1bwLV1YzP/D0LuSyPgPRFYxkSsbo7Jb1PmE\r\nxlgGOzDJd+pl8TLQ3LrkfJet2HfTFMqg23OiWJJO96Jkw9KA8wsOISIYsDqo\r\n7ruMlf/Cdng27MBhJEgknXyC141bMhDByasaHNTdnEvtmW4wu9XWuPbEglya\r\nLfjzR50anNmjPLntsb0gTDb0TG8IiUitJo49LgGFsdE7wQbFawJiiUxe4SfN\r\nUPnz0Z1kjVd/xKCWFlK461UQLpJOFtvJf68eiI1hOquaRJ89JnOryMHJU/rh\r\nS4HZiIdKZGjCXMvPMF2QXHv42wKQhYFilJxsQDrtl8dGdywxUaWyMJUNn/m9\r\nYTz6FSYMumNbMFmSxcVRrUpb7rzLneP+e+pe9IqrGa53TgBEznrycD7dvekX\r\nYF7X7QfU6NEtLGzsas1jcxxptxyCWivEyoqgHNf/QFT3XoQuEgijP+P33v2D\r\nIMqFr7ulxce2GOdM9YCOvBzUH0apmm87f0CJVjv5ADKrUQ7Tc2lchIF8EZzI\r\nV2xPxeH96WCOPNGHAhUX7zEVXHOrAjAfGO0=\r\n=RtXa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.9-beta.1_1654645792515_0.3358786975936001"},"_hasShrinkwrap":false},"1.5.9-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.5.9-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"67b0b0c32ff5babf9d997397ab26bfa75246dafb","_id":"@mihanizm56/redux-core-modules@1.5.9-beta.2","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-ONzilFDnc4NieLVcnYGTElSPNHoOsJVur+xUWnjoZ4AffAi+FgJTIjfsLMx0wK+Leq7BGjDX1ln9cz1qoW0/wA==","shasum":"8e63f9387ee17df2e073c982cca882b815859a53","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.9-beta.2.tgz","fileCount":137,"unpackedSize":172523,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdKOUrMoej3cqTDpdc2DnexDaAHfbzxMBKzyBj49I6+AiEAy551qd9nn/YDEgUDopUH1dw1p/jjOp5RKl3UfI7YE2w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis3ALACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvrQ/+PMukuVI/TAzEvDrhShiwOWlh05BYX6SVU8R1CTi7l6EkhDYU\r\nGjiSzUPbsuIF3Hwhc/XeY/4DJnwQpoyEDm5EbgcS7gT+TA7P1x7tuXdrlvWt\r\ngZ4yHV8YPL458lPpSr6sefHkg2PpTZ7B+4w+SVZeadzMQnt2z2NNW2VS2jzR\r\nnjuRD7L7/zNvY+UKgU/GH7I8VG6lYrqBKU61OGRMIDYsBFkOx27QHT2VSQUN\r\nfkPw2oGcnuv2GVmzXuJsllWMBMSDpI5SQTU69ayQIzhz/0esL74EVDqshezL\r\n3Ofo9ti2YvOhQURAQO3/oA5kk2L9SjNqtW5PORVHGiJDo67ICLrewes5fRK2\r\n9hqGZJ1XjdJoXq8dwqdHXZc+PMJHt7EG2xFWOyKEbyW6/5YEyGtyYLGY2QMk\r\nNQIw9syRx2arqVSDwyGNzOGD2CxsCRupRIu2VIlYF54XKjccgoxKbSPopWpd\r\nzjkJPmC4lNWVrU0b9mABvkreq62Ymssfm8B7mnCzYdm0J4S6FTENupA74w/N\r\nEUXalEaLP/BD3lTCm1oBshqkLHjV8PWr8FveTXWd/cPmeEYTZoRGux9m3rgH\r\nWZ9WgLTSLw/tKQ5u/Hs5+1XtkHarfivEISx0qAdYPFim2iednfXqnI+Ekod1\r\nUPGYWCXyjvqOblDL7tdY/GnEbZBcj08Wtps=\r\n=keXB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.9-beta.2_1655926795513_0.18157620677876807"},"_hasShrinkwrap":false},"1.5.9-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.5.9-beta.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"bd7b692145b2386cf261bb761f56e979f6578dc1","_id":"@mihanizm56/redux-core-modules@1.5.9-beta.3","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-RsArKAUW+qtg7X8twH9GQVrMYaic7V3aCCro4gsss3g19px9axjBUB7gOzItcUJB3s0Kwc/FsJu5izoiZI0ELA==","shasum":"873bf771063de33b984326a6167866d9b4fd4559","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.9-beta.3.tgz","fileCount":137,"unpackedSize":172617,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/g+6whMtZbdJ7spdYDN0ZEYwDCM/cQUGpM1giklVx0AiEAl6I4qk+Y7t9gMSEH3eq1dTf0pFcKLeolxF9EpsHML7E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitH/lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTpQ/9HV04wt1YfT8cJWPARk8aL8Z11CCvEieUzygYb163LrjoWNYO\r\nB3Mfh/aWjS9R7aFL3hrGFZv4znjD0RnYjrrsYOcaKs8SYCKEf3Cdt66XLlYe\r\nUqpOrlFi1lBSiuR7B1XQ54f6mYA56DcAhE2Wqzm82jKOU/iSR7XwN2mrt9jS\r\nqy/4+zQwoaiW6GqYoXSS1JpadtPfdxzHI0q7eCSTV8iSyopNrxTesiRF9YLM\r\nZeFL9BJqlgfn23Xe6zjlyVfkuYybU/FuxX/pr/vNETx8b6VIcOPfASp718GE\r\nn30Y1JYAy4X1/GRFZK7Jd/dZd8HJlqmgMnT+S/FiigpTpUVNC+PFjEObc5Ut\r\neckHMhAu69WvQEeG1SI3veeUI3R0911FyMjjn6gJE1k8mSUfpJ5+K99P348g\r\n/6Mc3c+MSGOAAY9afptHI+izPDQMWfh+6XVtPV2kW0l28n4QXYrhz9YZtMbI\r\nQQFI00dZUloc2Ywg6WvL8zwqiknyAVx3tJFA82DZtewZ3FcZRva446TZVxV9\r\nyuyWkDSh1a0rjVd7twx+Dgj0BwcAYqKKOg20uwNw0r9fsz6Bb7fTgkMO3cGl\r\nZkqR2tQ6+TUrHuMbJEWeZo8AjiU0zRcSgzexLpKm0+MB+Jao3iAPLeRs7sgt\r\ndyL69Ig0jq/7oCoiecuUarqjqMk3MqN/zxg=\r\n=D1KZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.9-beta.3_1655996389243_0.42256852582555293"},"_hasShrinkwrap":false},"1.5.9":{"name":"@mihanizm56/redux-core-modules","version":"1.5.9","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"82e9893d806130d20e1adcd07674578335d6c2f6","_id":"@mihanizm56/redux-core-modules@1.5.9","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-E8bFClBd9DMjAwPY/3/mXgcAQw/xsdHVhJCjjIcgTHCX+UiHcFw3rb+xdIZ70xr3mIvgW64lS7zMTGD9yhBbFQ==","shasum":"4256c802bc810756c6bd15eef0ddf6d8b39bee65","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.9.tgz","fileCount":137,"unpackedSize":172610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT/TpuoIofmJ3CGIr++D7OiF4MKLgGWjNrrnC9pe/QKAIhAOczDPe0WV/0lymv2dVX9PrixRmXwZEX613+TjURv/Kc"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitIC5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOHhAAnh6zj3JaQS7aGnwdTKtr4T0fplp98lUD+3iD1mw4zZtzvXkO\r\nLpjgZA+DdvKQCjSEbMQsE4WA8szgmiMn8QgWeJqxVxvrYQ9zcRzMd/tuiV1N\r\nFW++m6nrUDPEG8GR3zxop7ScodsshuGq8oAeb7LwvfXUmWSv6o/LcbCYrRlU\r\nV5bqTEKxNh1lmAw2ygFH2M+IgOCHYXFAcQcIZBygvFmNtbiZnSU0E3R9QCC1\r\njq4uSJ6tFYnR02uNcO+uCkZNxv88/VKVW93rrVc8PKwWLIttE+8C+i+Bc1kK\r\nX3fqUICLQ+LdSwoAJ+2oXT/E3QJE6CZQPlITLbf51H3s6rl8aAO9CzN6EVjb\r\nd3vEVMVCXm3SpkZfgLR7EXXmzf6URcj1s1iDDssR4cDFujb2kxIKhMeeM5Lg\r\n6umFRZi7+s41trDOt2wQEnY105SFuqpaVEbASjezz+ZikNucB5pkUBuijiTF\r\nnuItcWFVOXh8hqA56wicMPrsSWcguADxQFBb7u70CLB8ofZa5MRi1x7CMMf0\r\n1rm2Km4bqwe+k9JLw2qK6tORbb8z83hBJWLRrN9NIzCZNoj7n2yNZfxJSsfd\r\n3K6gvJHmpH4+UGHlttIZftam2SiMI+OIsbTdeyAjgaVcB8yHyBAM3O79PX1j\r\nftHFEzUJdQoS5KOXKKDuhEA9tEMvKWXWnHI=\r\n=rH8E\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.9_1655996600251_0.3563097704402345"},"_hasShrinkwrap":false},"1.5.10":{"name":"@mihanizm56/redux-core-modules","version":"1.5.10","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"gitHead":"41869d38b4c0567ca182256718eb989662e85435","_id":"@mihanizm56/redux-core-modules@1.5.10","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-4xA40bXZsUncmNmV5RSg24O78lzEaJT/0ujv38iO9T7Bf2fo94tK/1SBpsFT48zymSSAfcUu7JkBRz820IJe3w==","shasum":"0f16181771b0f298b7632a4089178d7301408c54","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.5.10.tgz","fileCount":137,"unpackedSize":172624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3vIU/d1qyktyZI/nNb1p1Z7jM5N4VLct6BcIc4aP/kAiEAwEu4vvZpjMFdXZsZTBZmje3n4esMC+EFErhoZQ/IGXk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8pTPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJTQ//TjFTmyF2auNkIIfN+BRs3wC74teowpP4adTdrCkR+T6dXWdC\r\nGiAfICCDnTjqm00pJQcZDUdcMMK8/fWh2qu/0vlLnleJKPb9uxVV94x4yv38\r\n6WPJqc8j8OubX5xf4r9OCSC+xWJiW+kEBCDh/L5r9uRoGDPFBwS923zjKNVT\r\n7huPm2uXVsnL8ZIvk6VmW4BWozTOJzR5uhvq2MGF3x0LItkkmBpg5QJVqIhy\r\nwaXm5xmyPgu2oCxGd2R3Z3NDzMwlOl4UIpy81qZwPTEj/SovEnjxj6zmpZCy\r\nd6EzcTi14p1jR2x151R8N3dhT0iCcu1aYxzYYzzGWl1BHYmo68UCYsP5Fvn+\r\nrQa1H27HSF/3SaS8tKPy0s7NOIOILLq61I9K88O8CkB9HYWkYQPk4UjLuC9T\r\nTDb4AQD+dinatd88qGMClc0AwxOH/N5muiZzEX6leNrclaa1ClJzgxmhXR/A\r\nQm1L6er5jwGzbjJuNRgbNcXsokEexzrm+gWybDMoBSZZasLnK17fMcaA1qGA\r\nB1pEJgYBbesah+oal+Win6KX28LJawkv9crOw5X8PU9txcuC8PFHyOTVx08l\r\nneBpALRbXIm32X/YK9Ii/Rh8UD/GlK3UVG3s3x/dDE1s0rBHXa2tGksKV0Qz\r\n68Ms60ZkdndQp06PFbpaaPK0LLAMPxPtmrQ=\r\n=nTH1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.5.10_1660064975498_0.5442876950870599"},"_hasShrinkwrap":false},"1.6.0-beta.1":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.1","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"9a8169cd536783a9d5fd32cc48346de99dfa8a83","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.1","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-l6O7GNfj9E8h/q6fnC7Tt3rP3Y/MzxjiwtgE3Yy307Naa+owZQw1/Wqn2P5VqxF5Wby5cF2ma1yPv3kg6n0zoA==","shasum":"7672f84332605507a07a21c1c5813303652a4571","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.1.tgz","fileCount":137,"unpackedSize":172114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGyTCILZwRKjT2sUqtjr0zaPayTBuIl93BV1eeDUZdq0AiAfyQ/uadT5VIdc/TWhhzhgTYMxiTRhU8vpzAaiNrpVPg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi86Y0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAFw//Qa96AdJ6teeZ/hcwpJLkbAdh2pYL8ivkY5pI3+hrSLTRdQUg\r\nR0AqmHd9hLhk6/9s0KjuqrbyjUM0IUwh5tyt5Yelcj1Hcoq20/0fphv8QPIX\r\nuFIw8G0adVg8QWytLGGFd/m06lLzFJH6wdi8G7WE8j5zmuBqMCLto+yltiCJ\r\nrkkT9gbz5umE/Xq3MXvoQGVfk7mWzJ7iOTQLMo66Q+w/rKUtANSb4SCZG995\r\naZc/Gfy1pCiqDLMyuSRK1jSly4oJ53yWUsVsHqxdkDweMkeUxa+ecvOIp9Gw\r\nIanMPg+4D02kAmNQBu6TXOoArdAOIVa4+o5qFsV6wwZdWjeaZ3Wj3rWPnb6S\r\nSyAYi8Y/MTfDW/MwhEFkU/R94pE0zZpPwWFFTMjTPWw1BSi0lWKumyip6xEi\r\nu/9pZ7Z+MsRByE1lFjigD7N+nEQ1sg4JSpKzlsfXPrs6JwtWVzAPdpkhDQLA\r\ncaS9vUuAmXn+XkdI8v+pvjqYvXI2t+JU6aZR6i2Wp+6vnbMuRJ/DxTuYzixu\r\nHIx10PA0PVoQR43QeX4uEenQDvuV6yNX8NozhW3BAFbxcCiq4UlOE/4/4h4A\r\nrIpes/BgBFynj4dgNIUBVLgwsiSesPH0YXWz5PBf7U3jJI+gQVdWdyzMsAf6\r\nJ1oSmz3D8p103zArh0ZoTGBi6TV1YXTWY7E=\r\n=ro7n\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.1_1660134964693_0.4418222015497024"},"_hasShrinkwrap":false},"1.6.0-beta.2":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.2","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"a57ac137f816df026d45afcdf35b381cc797f32a","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.2","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-42wV4jxIqsBAfc6XBe55/Sra1S33WmesN2vdvGfPJcFxDsnr86nQ5t3IxREzjse5O950yFGx4gKJZZ390tRgIg==","shasum":"d7cf417009d433cc3f82b86d13e65d5fb984cab1","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.2.tgz","fileCount":137,"unpackedSize":172008,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVVKTSb7aAR3gmiFPBOn79JxJP13+s3L6/08ZIQySI1AiBzHFpMoHlIdHukznGzVXnA2pmD0RqCAodPAnB9UFcYZg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi86aSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphdQ/7Bri+4+ZbgjzDS+SGZCNOV4r+oAf4jMdN7w+t/nGI6HCBo7Z6\r\nPd/7Iy0DMbe+xbPm8fwTmwofzeJ63e3Fv1nWqtTbPU6QTV/fU2G2pNlRVQDU\r\nzt53uKM4KsrkFCf61hRXVG/BrddYlWNq5yJXP4ck9ntlNf1aQq0GCe0Uer+M\r\ns2tIDGl67yHTAF5Fg1C3pN/Vfjv6YSHSfyMN5r/fmABsHjHHZ0DDkp9A8qwR\r\nM3+BvHDcinYT7H7ZAOi1+9l81n7woW7ph4iXhMm9xTxuPBHAIjDnJgXBXdOE\r\nfWEISPh8sI8lkPrCM4nurZDsHPayYptKfXgxjRhWznYCCs7RXv9Tds69nFUI\r\nQ2d8HSYwlL7ySoemacFXyUBYT+noZVRorsLIIMincfVxG84bR0DW1Y/Zn8BM\r\n7ccQ0t+pV6AsEMhw3NU0gXzDFib/6UIQ/nVd8WeJ9GW4+l1pDx2KFHm7wSs0\r\nTRhPw0Pj0f6In7rdhZA0mVuM+IwrRsbwXWnBQ/h7MhMCy7K2uFV4EJNUT8bC\r\nWvcccpS/DL/ohwdR2jkPXfO/NsuXRYnMh4v0GmaPfsRgCMTyYUOPfVbObm6T\r\nfR01MF5M7Q/cPgsnLD8StztmU6J1qDapbHbUOP4TKJ8iu4IIqs865CBufr8e\r\nJiP8Mo7NaB731ZDFl0e8j8H7z00+DOJqkXI=\r\n=NJ4M\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.2_1660135058243_0.8872130537506693"},"_hasShrinkwrap":false},"1.6.0-beta.3":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.3","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"e3dd396f40aa4a83db541fbb6e7122f6903c4d4e","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.3","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-78hSwp3kKUMc9sR8p2Bp0nwpPSsF5Jr1YHp1q0vj0wJH6vCG+7jHWlMLRryURPIDa0bXaJSxJzrKZMRhdIc++g==","shasum":"d95debe04a1b4cba7e3f3e387f56898fc099e94c","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.3.tgz","fileCount":137,"unpackedSize":172109,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpqZTRsv16pofBSbZhfdykrXMIKWuIajrbynNGm7HKRAiEA90Vx06FM4Nk3oLHEApu91PJMHjwQis8MXjgc4QFnpt0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjF8G8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8Jw/6A61EUfmy4BXimOt4Enw4DgROFhgrYkctn0QTbMLBL+3YTYxg\r\nK6hjgER0i8mVZV/Zn0TqFrWIfW4JciZXHy5lDf1nUinYX/gMV/xW3xYVX2Re\r\nSRymY3PJGmI+CX00v27aviWMgIGr+yGMLPv5lB0JFg321uwBPLJEligVR9pY\r\n1xLIPvSsGizLnkBtaYofAMMe3X2yKzpSA8OsYStQgseT0IRv4/5X+jwtzNNm\r\n1eX8wj2XDUL4gBWsz2X+ws6oFT5my4EdPcFDiURa9X6XHttFIIT9mGlUSRlS\r\nY37gEUyyxsTJ0pCvuJ9/Z5pBUhcKEqhQE6luyE39TQ3RR8K/V5QAHEPAOoBI\r\n8gnhuZid9wttD1hqJctpyB8VtsXOt8yyUa88RWO4W0uYyHEGxHz7xz4ZKVHt\r\nTgjbVkozPvF8g2sqy49kqCnkYdVIHCVbByhBLU1DumMia8iEJQWuuMIMKEdc\r\nUPUVaYEv2MGSrKlGehhdXs9xa6XeuswqF9eu9VNH/XzyzClYzgq2O91iwg12\r\noDe4QulbypNe9zErf2tgtnABzdtMYzITxXt8IyYN2Sskk2kzFHFw733hxUtp\r\nmzQFPqJHNkaDadE+qh1yt/M9CJj2246qnfN8ySRa1E1gNzOxCoafOjKBaPA2\r\nceiBAqo7AEkMz9MPDXVflbsxIGtRNSjHCrc=\r\n=Kw7w\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.3_1662501308585_0.06123482557928073"},"_hasShrinkwrap":false},"1.6.0-beta.5":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.5","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"43d7de3f1d6e42f52f5eef2d87a0012d6e72c8b4","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.5","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-DpbqOye+rLq0fz33A1GZwQCYZVMNN01OF5DenKwzoLwDKXw3uZIfyVZi5Hv4/BleQpmjB+MQT7XtlhSy5E07SQ==","shasum":"3717e8405c37f3e967919ad344a650b49c31aeac","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.5.tgz","fileCount":137,"unpackedSize":174090,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpaN9GIZGVKiExhpBZIO/HGc5TEIrmyxprYgD24v6N4QIgUA65bn90s2SfyOlM+tmMApehhW24DmgLJQdsZKy9+a4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjF+5MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRNxAAg4AwHomR2p261PNgU6rHlZ7O7vdMnbYGtTZIutNWQFcUyBnh\r\nzXEq8C4jVG7uogniQnPYfUsy448kl9Yvp22G1AN3AhnI3vv7EKJigUGxfgIq\r\nTBn6Zu9w79AIf2XZRYSL3GBsl4w4sOeEdA8eNUiFK88KKWJiCvnBYc9UCzNp\r\nPwQf7kP87vl7a58+HH3dF3QYraWRtBdBW9WtlYZDgSCEwZOhBxLW5EaiQXmL\r\nBXVMp25mKie6mg6dIsFNi+0Nk0yvxm/MxNFP0UxJyhdy7gPhUHgPUrylJFv5\r\nhdyWXZcOzAsPrsPP+Gqa2xgjhUpsAihxRNmnvUBR5ntZN2zGy4boYvZlWwUA\r\n9MxEvRcOPJSFYtfZQ9qc3WwjhW7Y8WjSgcwepGVAuaEHyaSKrSniL50OMiFa\r\nKLII0SYusXUzf5hP0vYgTYvpvw0KZ6PGwahpNjQ7KohhRivtmoP2VFEUO6HR\r\nWvTNiof9GKOCQUGZvjuEV/ZmCrC75LUag3kNEgGkN6S0y2mBHEdfAFiy4HB2\r\npOM2jdBUFqNZ5/Gfn14pl8zU+iB1/uO4RvxBpIneGaL1igdEE+GuSMhu1FBe\r\ndJPue0ges2j8y6YT8Xh/6LNhwhaODI747D31VKPEIWooOomH7TlQn4KqUkBT\r\nvWc61/8AbflvQ7XXeK2l/X2HcHkydDJnstU=\r\n=KTEO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.5_1662512716010_0.4361556393214405"},"_hasShrinkwrap":false},"1.6.0-beta.6":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.6","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"656c311bf0b0365a53afec0af8d2070a97b22435","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.6","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-NdFaFh7ry6I5cO+lk5Han4SJ734pIV4GFZf+Dis7Z9WTdO+5W32Bqx/GagDd9+AJjqYT0D8Da+EtRhZ5u4tl1w==","shasum":"05041965770dc945a3d4d3c43921fe98d3405be3","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.6.tgz","fileCount":137,"unpackedSize":175042,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGc9QLTNvFxQUIANeLl4+a1FBWS/VG8UGSxMPEYOQUfFAiB2r1+F9qFdYVtJQV8D2r7cvHL3OzcPOM3IUjkqdDhE9Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN1DyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAnA/+MecTcZnjDFU914vRtU3+pCmPSdFcR2FIV8JbxlZGXfUvXhhY\r\n4eY6WSHTYK0yHri8aiPc0hIsWSEDVOmF3F06G/ytzPg03F7vDiljnRFutqw6\r\noiOqHqaMZdvAdf6jY8OZUCxnx1Ha+RSJ/a9J8stlBGhjo3uHGGHOEM+GALJZ\r\nSWMKmSl3oBl/YnyEr4BnXiECQD3MYgnoYEZPsQn2eL5zU0QUKkpgN0sf2b3m\r\nZB0jjmy5aKfXZioexnJtGW97Ysk6kOBT4Z9Bl6im3NGRYG2o77PFxZ31uiiB\r\ngenwRH/F3Om6H95/5rjHmdZhgaS5WAFztbsOHlGMZ6e6xCZcmxZoeINdsWEt\r\nJCJIFXjW0p/vhQt13wxumaawQgaNlnMWGxgKmWsKm+ziPjkw5L7a6zdDuygb\r\nwHj+FOf7U9cE/0cuBHMUevZf/hzhg4nnbylX7FCBvJnx1YwRvbCAWHmN6Izu\r\nI47IS4nLdWn3BCPKKym+Q52Sz+Us+Ngq5I/TE56gcUeqfsfpBoBan5GxSoCw\r\nSDJdQ9+eS1pR3xWUdvk/tuKhOBYx99WsmupKuTV1i5zM8bi+GRHuBiPRsoPi\r\n5cbSJPr6OEYluEC+WodN5vV/79CvzCU7VRk/1sHZs3Tdg4y2Z8XGM+X76zo4\r\nkLH4nEQEACn4s3UmnrmXQ8xqbsyxC/rJ9Y4=\r\n=PNoY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.6_1664569585713_0.5580343115733768"},"_hasShrinkwrap":false},"1.6.0-beta.7":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.7","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"9d857151f4d9ec03ae4b8c4ad510127fb0970160","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.7","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ovFTu/YgHPtuS/NFZRj0pykma/pi8FrzevRp6/gcp8lpZSbV9ML1gfQ31bz+Q0G1Bp8D5Q9iq4w++0/+GquzXw==","shasum":"ba41751936c6285e7d324cc616010c092c5c025d","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.7.tgz","fileCount":139,"unpackedSize":175672,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQLYl0AuEao5IbAAvpWLSRzNp+Xj20h6Ki1wk27NnE9wIgUuqodUR4hF5kbHVeK7kwc+yJI/VCctBkJT8tdn2FkDE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW9CRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmMA//VqXZFrX3JJZXfFll8H7/3d1s0vux+A0VYYh39VExwFqHiheM\r\nc+YVk51sSL6FbOvFR9HN1F1pmVRz9GACa8p6tD1/nexAu25q84Ze6rNzfl/x\r\nL2hCsrwS3Z7nIgUlKTr/V3J2GtK86ze+PVqpzS3zHZ/eUTLne19n8zF03rRg\r\ng2x5AaGvSy05iSxg2ydUgu4ULDeLXfxmwo6WMMAOskK4db7R1+ki0Knv6k6j\r\n2H72wxtGCKEn8Uby5X7n6wubvRhH0J+m5wKk9FwzwP+yoZcAkDxgwEqGMYnP\r\nbfGOPjTifcTh8R0mhG+dFH5yNz0JbNcIFkzj+6kd1lNQBbYcSQ+mELRDGOUC\r\nqVH7K3C+rxOMhMO8ZWiafWBCZl7rCrbXPFASgz6XHlB3NNvLpkcdd93fvSmE\r\nJDBVzVMBBs2nY+FJWdAfADPgn6/uvkCy0Js1fEfoJIjRxpMFbGBVe75hnfUZ\r\nZCH7pu2IM8O62Wx5uIwFLGUJ8pWzWXYexSqATJttjeChFk6fyRciO7Q4uAn6\r\nF0fyZFL5Xg4F5hmyZv9vC7sf9byekg+OJROK3qeiP8f5M7kewHyX+8gRvwjC\r\nrzYVz/Tn9aDO8EypPf6/ckcaVb0Su0krUs9wA7NlRZPHErpShdM1NCV4NVPB\r\nrSv1pJE6i1dZBmzIkKpa2hPZIbBSVcvoIcc=\r\n=zRHC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.7_1666961553159_0.10696636103312795"},"_hasShrinkwrap":false},"1.6.0-beta.8":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.8","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"3e70036356bac9e49ce80e4da2a938d5f627512d","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.8","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ocJzbtxOO3Sb4VnB3qQKyF0+zTvBrXFOGZp3i+0P1B2sL/uLQHpCDJHQzAbKSaDkoIe3B5U+E6IseF9r9NVvug==","shasum":"5112ed069fae63d31f5b5d2e3158669fe036f51a","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.8.tgz","fileCount":139,"unpackedSize":175677,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbdkb9nruii2aC6zt5kk1TF9aUdEvNDM5X8aLBjNuRPwIhAL+SSnaZhHeWYS3yJTrXlJ5Ojow83Qlo72p7/XwyvcY6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhAkHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkKg//VQ6d60mXKgoTt5ZhpoxE52GEMk+kk7kFHrlmEiqAZKfSLS+s\r\njjq5noVe2xB0wpP8OWOxziWrnW7aXpmLsoNGJy+uW1udKx5rUtWo3tcqy3yH\r\nLkYP06UTex/sUV0BFffXSxhrWeBWWyHjt0LUTmBbt/8e6CBO5O+FZ3lsImn1\r\niuBugOLcLOIyneUqQ2vHe36jP7WKQ/U5mHsN+SANqJDRIINlas1hKn6koaIP\r\ne7aTlyOL2TZAQJRz2rELDwMxAtijrF8e/Uc71RYmHSvmlCkvnFqn0EpPNg/A\r\n15u2/c3DtX3GIG1MdBgtBCoLB5RrM3dmvSki1JpCy8unKEc2hWimJFnlp+r/\r\nN7/pgQmnJ3Rn8Hll/tIwtraYKKmCKmPs+owSOWkvhBvtUUcSqFs/ErsB4giV\r\nJIAoVPKYHhKhGpoLXiSyLEdYs5fkYtCo2Sz61r4Wo/xIf3TeK3JaacvKGSMw\r\n1X/YcHSn2GB+Hi7+ZgJUoxocJ62SNs6RjlGmneQvD1zjmJ78BNILHWXjiKgF\r\n9DX4vvIHz6uwPlNyxCJVC1Zs1XSVycI7M9HtHPPDt3XROchungEkkcfmiTRG\r\n56Ak87Tl39RjvabAJAY7ToVzm3LWSGMzv71kAW4yFPWqRSO3gFgWhe08y/qp\r\nTXprpxfhQd8rIOCGMpKIO9IVX2Qj+Kvd4hs=\r\n=0leq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.8_1669597447366_0.3026709284190341"},"_hasShrinkwrap":false},"1.6.0-beta.9":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.9","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.5.0","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"38c7358bbde9b63073b7814c301ef2c6be2f1ed7","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.9","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-R/UM0QWsX7sUC8+bD8wnSoqvsqJ4BQbYZ6GT/t6caTjCH1x7r/kFL2lr01EpdzaC05tzug2q5cj3UbuYT40afg==","shasum":"1d7d9e921cada75ac12f20dbaa8c2c840a7763f9","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.9.tgz","fileCount":137,"unpackedSize":175042,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmVYTzg06g2sPZ/6DOXBS+xL84qovfbQ9sRhZ70iK2TAiEA3sfCHoOamL6nvniMT4KD510DeQ0OCblDozm4ZgNwfHY="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.9_1702574829125_0.7133684553667632"},"_hasShrinkwrap":false},"1.6.0-beta.10":{"name":"@mihanizm56/redux-core-modules","version":"1.6.0-beta.10","description":"core redux modules","typings":"./dist/index.d.ts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo tests","alias-resolve":"tscpaths -p tsconfig.json -s ./lib -o ./dist","compile":"tsc --project tsconfig.json","lint":"npx eslint . --ext .ts --fix","commit":"git add . && git commit --no-edit","packages-vulnerability-check":"check-audit","release":"npm run commit && git push && npm publish --access=public","beta":"npm run commit && git push && npm publish --tag beta --access=public","build":"rm -fr ./dist && npm run compile && npm run alias-resolve"},"license":"MIT","dependencies":{"js-file-download":"0.4.12","react-redux":"7.2.6","redux":"4.1.2","redux-batched-actions":"0.4.1","redux-devtools-extension":"2.13.9","redux-saga":"1.1.3","reselect":"4.1.2","uniqid":"5.4.0"},"repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"homepage":"https://github.com/mihanizm56/redux-core-modules#readme","devDependencies":{"@commitlint/cli":"9.1.2","@types/react":"16.9.11","@types/react-redux":"7.1.20","@types/redux-batched-actions":"0.1.5","@types/redux-devtools-extension":"2.13.2","@types/redux-saga":"0.10.5","@types/reselect":"2.2.0","@types/router5":"5.0.0","@types/uniqid":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.0","@typescript-eslint/parser":"5.3.0","commitizen":"4.2.4","cross-env":"7.0.3","cz-customizable":"6.2.0","minimist":"1.2.6","ansi-regex":"5.0.1","eslint":"8.2.0","eslint-config-airbnb":"18.2.1","eslint-config-prettier":"8.3.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"2.5.0","eslint-import-resolver-webpack":"0.13.2","eslint-plugin-css-modules":"2.11.0","eslint-plugin-import":"2.25.3","eslint-plugin-jsx-a11y":"6.4.1","eslint-plugin-prettier":"4.0.0","eslint-plugin-react":"7.27.0","eslint-plugin-react-hooks":"4.3.0","eslint-plugin-security":"1.4.0","husky":"3.0.9","npm-audit-resolver":"2.1.0","prettier":"2.4.1","react":"16.14.0","tscpaths":"0.0.9","typescript":"4.4.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS -g config/git/commitlint.js","pre-commit":"npm run lint && git add . && npm run test && npm run build","prepare-commit-msg":"node ./config/git/prepare-commit.js"}},"config":{"commitizen":{"path":"node_modules/cz-customizable"},"cz-customizable":{"config":"config/git/commitizen.js"}},"readme":"# @wildberries/redux-core-modules\n\n## Sollution for redux and redux-saga common cases\n\n### What does it provide:\n\n- Store initialization\n- Core redux-modules for common usage \n- Utils for redux code-splitting\n\n#### installation\n\n```javascript\nnpm install @wildberries/redux-core-modules\n```\n\n## Features:\n\n### Store initialization:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { configureRouter } from '@wildberries/service-router';\nimport { createAppStore } from '@wildberries/redux-core-modules';\nimport {\n  notificationsState,\n  NOTIFICATIONS_REDUCER_NAME,\n  setModalAction,\n} from '@wildberries/notifications';\nimport {\n  confirmModalModuleReducer,\n  confirmModalWatcherSaga,\n  CONFIRM_MODALS_REDUCER_NAME,\n  CONFIRM_MODAL_SAGA_NAME,\n} from '@wildberries/confirm-modal-portal';\n\nconst ROOT_ELEMENT = document.getElementById('root');\n\nconst router = configureRouter({ defaultRoute: 'wb-eu-registration' });\n\nconst store = createAppStore({\n  router,\n  rootReducers: {\n    [NOTIFICATIONS_REDUCER_NAME]: notificationsState,\n    [CONFIRM_MODALS_REDUCER_NAME]: confirmModalModuleReducer,\n  },\n  rootSagas: {\n    [CONFIRM_MODAL_SAGA_NAME]: confirmModalWatcherSaga,\n  },\n  dependencies: { setModalAction },\n});\n\nrouter.start(() => {\n  ReactDOM.render(\n    <Provider store={store}>\n      <App />\n    </Provider>,\n    ROOT_ELEMENT,\n  );\n});\n```\n\n### Core redux-modules for common usage:\n\n - Form-manager-module - helps to work with the form submission\n - Init-load-manager-module - helps to get data when page is rendering\n - Redirect-manager-module - helps to navigate in redux-saga worker saga\n - Request-extra-data-handler-module - helps to make different actions from response data\n - UI-module - helps with working in the whole app ui-data\n\n### Form-manager-module - gets options and make request and handle different operations:\n\n - re-save form data (necessary for react-final-form) before call the request and set new data\n - format form data before to insert to the request\n - start and stops form loading state\n - call error action (of array of actions)\n - call success action (of array of actions)\n - trigger notifications actions on success and error\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - trigger scroll to error fields (if you provide scroll util)\n\n#### Example:\n\n```javascript\nimport { fetchFormManagerSagaAction } from '@wildberries/redux-core-modules';\n\nconst formManagerSubmitOptions: FormManagerType = {\n    formValues: { foo:'bar' },\n    loadingStartAction: ()=>({ type:'loading start' }),\n    loadingStopAction: ()=>({ type:'loading stop' }),\n    formValuesFormatter: (data) => ({ 'baz':data.foo }),\n    formRequest: fetch('http://example.com'),\n    formSuccessAction: (payload)=>({ type:'some example success action', payload }),\n    setErrorAction: (payload)=>({ type:'some example error action', payload }),\n    resetInitialDataAction: (payload)=>({ type:'action to re-save form data', payload }),\n    showNotification: true,\n    redirectSuccessActionParams: {\n        pathName: 'some.path',\n    },\n    scrollToErrorOnField:()=>{\n      // scroll here\n    },\n    // if you need data to be formatted before sended to scrollToErrorOnField\n    scrollFormErrorsFormatterOnSuccess: (data) => {\n      // responseData.data will be provided from response\n    },\n    scrollFormErrorsFormatterOnError: () => {\n      // {errorText, additionalErrors} will be provided from response\n    }\n};\n\nstore.dispatch(fetchFormManagerSagaAction(formManagerSubmitOptions));\n```\n\n### Init-load-manager-module - has the separate config for each request and makes operations:\n\n - start and stop form loading state (not in each request but in the whole action)\n - format request data before and after the request\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n - send data (formatted of not) to the Request-extra-data-handler-module to make some operations with splitted data from response\n - trigger success or error router redirections\n - ability to use batching (in JSON-RPC protocol)\n - cancelling the request if not responded\n - on every request can make a decision to refetch data or not by providing function or redux-selector (or an array of them)\n\n#### Example:\n\n```javascript\nimport { initLoadManagerActionSaga, InitLoadManagerActionPayloadType } from '@wildberries/redux-core-modules';\nimport { getWarehousesListRequest } from '@/services/api/requests/get-warehouses-list';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction, selectorThatDataWasFetched } from '../_redux/warehouses-module';\nimport { warehousesListFormatter } from '../_utils/warehouses-list-formatter';\n\nconst loadDataConfig: InitLoadManagerActionPayloadType = {\n  requestConfigList: [\n    {\n      request: getWarehousesListRequest,\n      requestOptions: { foo:'bar' },\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestDataFormatter: warehousesListFormatter,\n      actionSuccess: setWarehousesAction,\n      isBatchRequest: true,\n      selectorsCheckInitialFetched: selectorThatDataWasFetched\n    },\n    {\n      request: getCountriesListRequest,\n      isDataCritical: true,\n      showErrorNotification: true,\n      showSuccessNotification: false,\n      requestExtraDataHandlerOptions: [\n        {\n          fieldName: 'countries',\n          action: setRegionsAction,\n        },\n      ],\n    },\n  ],\n};\n\nstore.dispatch(initLoadManagerActionSaga(loadDataConfig));\n```\n\n### Download-files-manager-module - manager to download base64 and blob type files:\n\n - start and stop form loading state\n - format request data before to get file to be downloaded\n - get the options (or not) and calls the request\n - trigger notifications actions on success and error\n - call error action (of array of actions)\n - call success action (of array of actions)\n\n#### Example:\n\n```javascript\nimport { downloadFilesManagerSagaAction, DownloadFilesManagerType } from '@wildberries/redux-core-modules';\nimport { someDownloadRequest } from '@/services/api/requests/some-request';\nimport { getCountriesListRequest } from '@/services/api/requests/get-countries-list';\nimport { setRegionsAction } from '../_redux/regions-module';\nimport { setWarehousesAction } from '../_redux/warehouses-module';\n\nconst config: DownloadFilesManagerType = {\n  downloadFileRequest: someDownloadRequest,\n  requestParams: {foo: 'bar'};\n  loadingStartAction: () => ({ type:\"LOADING_START\" });\n  loadingStopAction: () => ({ type:\"LOADING_STOP\" });\n  formSuccessAction: () => ({ type:\"SOME_SUCCESS_ACTION\" });\n  formSuccessActionsArray: [\n    () => ({ type:\"SOME_SUCCESS_ACTION_1\" }),\n    () => ({ type:\"SOME_SUCCESS_ACTION_2\" })\n  ]\n  setErrorAction: () => ({ type:\"SOME_ERROR_ACTION\" });\n  setErrorActionsArray: [\n    () => ({ type:\"SOME_ERROR_ACTION_1\" }),\n    () => ({ type:\"SOME_ERROR_ACTION_2\" })\n  ]\n  showNotificationError: true;\n  showNotificationSuccess: true;\n  notificationSuccessMessage: 'some success notification message';\n  fileType: 'base64';\n  responseDataFormatter?: (response) => ({\n    file:response.foo,\n    contentType:response.bar,\n    name:response.baz\n  })\n};\n\nstore.dispatch(downloadFilesManagerSagaAction(config));\n```\n\n### Redirect-manager-module - simple options-provider to the router.navigate method from router5:\n - redirects to internal routes\n - redirects to external routes (for example if you are using microservice architecture and you stream-app doesn't know about external routes)\n\n#### provides actions:\n```javascript\nimport { redirectManagerSagaAction, redirectToPlatformRouteManagerSagaAction } from '@wildberries/redux-core-modules';\n\nstore.dispatch(redirectManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n\n'there is no differences between action signatures - they are actually go to the one watcher-saga'\n'but to show exactly where do you want to redirect - we provide this method'\n\nstore.dispatch(redirectToPlatformRouteManagerSagaAction({\n  pathName: 'route.path.name';\n  params: { foo:'bar' };\n  actionAfterRedirect: (payload) => ({ type:'action that will be called after redirect', payload })\n  actionAfterRedirectParams: { id: 'test_id' };\n}));\n```\n\n### Request-extra-data-handler-module:\n - gets the data and array of options to process this data with redux-actions\n\n#### provides actions:\n```javascript\nimport { requestExtraDataHandlerActionSaga, RequestExtraDataHandlerActionSagaType } from '@wildberries/redux-core-modules';\n\nstore.dispatch(requestExtraDataHandlerActionSaga({\n  data: {\n      field1: {\n          foo: 'bar'\n      },\n      field2: {\n          someOption: [\n              { foo:'bar' }\n          ]\n      }\n  },\n  options: [\n      {\n        fieldName: 'field1';\n        action: (payload) => ({ type:'action that will be called with the field1 data', payload })\n      },\n      {\n        fieldName: 'field2';\n        action: (payload) => ({ type:'action that will be called with the field2 data', payload })\n      },\n  ]\n}));\n```\n\n### requestErrorHandlerProcess util:\n  - gets the request\n  - provide the validation for the request\n  - dispatches an action or an array of actions if the response is invalid\n  - options for that feature exist in Form-manager-module and in Init-load-manager-module\n\n```javascript\nimport { requestErrorHandlerProcess } from '@wildberries/redux-core-modules';\n\n// inside the saga\nconst validatedData = yield* requestErrorHandlerProcess({\n  request: () =>\n    updateReportRequest({\n      id,\n      status: STATUS_APPROVED,\n    }),\n  requestValidator: () => false,\n  errorAction: () => ({ type: 'test error action' }),\n});\n```\n\n## Utils for redux code-splitting:\n\n### inject reducers:\n\n```javascript\nimport { injectAsyncReducer } from '@wildberries/redux-core-modules';\n\ninjectAsyncReducer({\n    store,                            '-- pure store object'\n    name: 'registrationFormStorage',  '-- reducer name'\n    reducer: registrationFormStorage, '-- reducer instance'\n});\n```\n\n### inject sagas:\n\n```javascript\nimport { injectAsyncSaga } from '@wildberries/redux-core-modules';\n\ninjectAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n    saga: downloadContractOfferWatcherSaga,   '-- saga instance'\n});\n```\n\n### inject sagas and reducers with config that is the same as InjectorConfig for ReduxStoreLoader:\n\n```javascript\nimport { runInjectorConfig } from '@wildberries/redux-core-modules';\n\n// enable SSR mode \n// and enable manualSagaStart - that means not to run saga inside createAppStore function\nconst store = createAppStore({\n  manualSagaStart: true,\n});\n\nconst sagaRunner = store.sagaMiddleware.run(store.rootSaga);\n\nconst storeInjectConfig = { /* here place the config */ }\n\nrunInjectorConfig({ store, storeInjectConfig });\n```\n\n### remove sagas:\n\n```javascript\nimport { removeAsyncSaga } from '@wildberries/redux-core-modules';\n\nremoveAsyncSaga({\n    store,                                    '-- pure store object'\n    name: 'downloadContractOfferWatcherSaga', '-- saga name'\n});\n```\n\n### remove reducers:\n### Warning - please be accurate with this. You can lose your necessary data !\n\n```javascript\nimport { removeAsyncReducer } from '@wildberries/redux-core-modules';\n\nremoveAsyncReducer({\n    store,                                    '-- pure store object'\n    name: 'registrationFormStorage',          '-- saga name'\n});\n```\n\n## Advanced redux with typescript\n\n### actions:\n\n```javascript\nimport { IReduxAction, IReduxBaseAction } from '@mihanizm56/redux-core-modules';\n\nexport const FETCH_DEDUCTION_SAGA = 'FETCH_DEDUCTION_SAGA';\nexport const fetchDeductionActionSaga: IReduxAction<\n  number,\n  typeof FETCH_DEDUCTION_SAGA\n> = payload => ({\n  type: FETCH_DEDUCTION_SAGA,\n  payload,\n});\nfetchDeductionActionSaga.type = FETCH_DEDUCTION_SAGA;\n\nexport const SET_MODAL_OPENED = 'SET_MODAL_OPENED';\nexport const setReportModalOpenedAction: IReduxBaseAction<\n  typeof SET_MODAL_OPENED\n> = () => ({\n  type: SET_MODAL_OPENED,\n});\nsetReportModalOpenedAction.type = SET_MODAL_OPENED; \n```\n\n### reducer:\n\n```javascript\nimport { ReportModalStorage } from './_types';\nimport {\n  setReportModalOpenedAction,\n} from './actions';\n\ntype ActionsType =\n  | ReturnType<typeof setReportModalOpenedAction>\n\nexport const initialState: ReportModalStorage = {\n  isLoading: false,\n  data: {\n    deduction: null,\n    payStatus: null,\n  },\n  isOpened: false,\n  title: '',\n};\n\nconst reducer = (\n  state = initialState,\n  action: ActionsType,\n): ReportModalStorage => {\n  switch (action.type) {\n    case setReportModalOpenedAction.type:\n      return { ...state, isOpened: true };\n\n    default:\n      return state;\n  }\n};\n\nexport default reducer;\n```\n\n\n### watcher-saga:\n\n```javascript\nimport { take, fork } from 'redux-saga/effects';\nimport { fetchDeductionActionSaga } from '../../actions';\nimport { fetchDeductionWorderSaga } from './fetch-deduction-data-worker-saga';\n\nexport const FETCH_DEDUCTION_WATCHER_SAGA_NAME =\n  'FETCH_DEDUCTION_WATCHER_SAGA_NAME';\n\nexport function* fetchDeductionWatcherSaga() {\n  while (true) {\n    const { payload }: ReturnType<typeof fetchDeductionActionSaga> = yield take(\n      fetchDeductionActionSaga.type,\n    );\n\n    yield fork(fetchDeductionWorderSaga, payload);\n  }\n}\n```\n\n\n","readmeFilename":"README.md","gitHead":"75496de6e64375c4551e3aa3bf0894a8235bac0c","_id":"@mihanizm56/redux-core-modules@1.6.0-beta.10","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-jYjWy7Qr25e+NGMJouopVvt6kf5ML1smu1v5afWO3sLmzyJ6RUovRk4A6mHWKTmbO1OH46pe2eJlO2/2q575MA==","shasum":"1a49265641674949fa9839c44ca99c63e7aea701","tarball":"https://registry.npmjs.org/@mihanizm56/redux-core-modules/-/redux-core-modules-1.6.0-beta.10.tgz","fileCount":137,"unpackedSize":175043,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWLOOVPcK9yH8BG7+8L9ouxN1VhlkJ398d8xmNoZ2xCAiEAug12ruJsfCpElWcKDlCq7MNMAziULteS85ThdF0lipE="}]},"_npmUser":{"name":"mihanizm56","email":"m727507.56@mail.ru"},"directories":{},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-core-modules_1.6.0-beta.10_1702579604898_0.7236643754294632"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-01T17:53:25.361Z","0.0.1":"2020-04-01T17:53:25.722Z","modified":"2023-12-14T18:46:45.328Z","0.0.2":"2020-04-01T18:01:31.591Z","0.0.3":"2020-04-01T18:04:18.611Z","0.0.4":"2020-04-01T19:05:12.863Z","0.0.5":"2020-04-01T19:17:15.750Z","0.0.6":"2020-04-01T23:01:52.092Z","0.0.7":"2020-04-01T23:07:38.892Z","0.0.8":"2020-04-01T23:18:31.115Z","0.0.9":"2020-04-01T23:20:08.963Z","0.0.10":"2020-04-01T23:22:38.785Z","0.0.11":"2020-04-01T23:27:09.100Z","0.0.12":"2020-04-01T23:48:09.675Z","0.0.13":"2020-04-02T00:30:30.237Z","1.0.0":"2020-04-02T01:12:20.981Z","1.0.1":"2020-04-02T18:23:03.216Z","1.0.2":"2020-04-02T18:23:51.262Z","1.0.3":"2020-04-02T18:24:56.952Z","1.1.0":"2020-04-02T18:41:36.124Z","1.1.1":"2020-04-03T14:11:03.016Z","1.2.0":"2020-04-04T22:46:03.407Z","1.2.0-beta-1":"2020-04-05T17:07:40.782Z","1.2.0-beta-2":"2020-04-05T17:10:22.055Z","1.2.1":"2020-04-05T17:12:52.861Z","1.2.2":"2020-04-05T17:29:07.622Z","1.2.3":"2020-04-05T17:30:12.757Z","1.2.3-beta.2":"2020-04-05T17:39:27.674Z","1.2.3-beta.3":"2020-04-05T17:42:02.560Z","1.2.3-beta.4":"2020-04-05T17:44:57.973Z","1.2.3-beta.5":"2020-04-05T18:10:14.192Z","1.2.3-beta.8":"2020-04-05T18:28:26.857Z","1.2.3-beta.9":"2020-04-05T18:37:54.501Z","1.2.3-beta.10":"2020-04-05T18:41:04.998Z","1.2.3-beta.11":"2020-04-05T18:44:54.919Z","1.2.4":"2020-04-05T18:51:02.408Z","1.2.5":"2020-04-05T19:02:50.201Z","1.2.6":"2020-04-05T19:09:38.758Z","1.2.7":"2020-04-05T22:27:51.636Z","1.3.0":"2021-02-02T22:33:18.399Z","1.3.1-beta.1":"2021-02-27T14:37:10.520Z","1.3.1":"2021-02-27T14:43:07.673Z","1.3.2-beta.1":"2021-04-19T16:01:04.117Z","1.3.2":"2021-04-21T01:04:27.916Z","1.3.3-beta.1":"2021-06-14T14:23:16.367Z","1.3.3-beta.2":"2021-06-14T23:28:36.584Z","1.3.3-beta.3":"2021-06-20T15:16:52.899Z","1.3.3":"2021-06-22T12:10:53.167Z","1.3.4-beta.1":"2021-07-19T20:31:45.455Z","1.3.4-beta.2":"2021-07-19T21:24:23.736Z","1.3.4":"2021-07-19T21:26:32.587Z","1.3.5-beta.1":"2021-07-20T11:55:27.974Z","1.3.5-beta.2":"2021-07-20T14:38:43.043Z","1.3.5":"2021-07-25T00:30:11.882Z","1.3.6-alpha.1":"2021-09-20T23:51:02.997Z","1.3.6-beta.1":"2021-10-27T14:16:30.199Z","1.4.0-beta.1":"2021-10-27T14:19:43.321Z","1.4.0-beta.2":"2021-10-28T12:12:43.543Z","1.4.0":"2021-10-28T12:17:05.753Z","1.4.1":"2021-10-28T12:24:40.706Z","1.4.2-beta.1":"2021-10-28T22:55:37.238Z","1.4.2-beta.2":"2021-10-28T23:59:54.766Z","1.4.2":"2021-10-30T15:36:41.809Z","1.4.3":"2021-11-04T15:57:38.224Z","1.4.4":"2021-11-04T18:51:03.997Z","1.5.0-beta.1":"2021-11-10T11:43:51.624Z","1.5.0":"2021-11-10T20:49:35.888Z","1.5.1":"2022-01-13T13:02:41.516Z","1.5.2":"2022-02-03T11:11:34.023Z","1.5.3-beta.1":"2022-02-16T19:08:25.941Z","1.5.3":"2022-02-20T20:48:53.072Z","1.5.4-beta.1":"2022-03-05T23:21:20.804Z","1.5.4-beta.2":"2022-03-08T23:02:07.942Z","1.5.4-beta.3":"2022-03-10T23:19:23.944Z","1.5.4-beta.4":"2022-03-11T00:04:00.600Z","1.5.4":"2022-03-11T12:29:36.286Z","1.5.5-beta.1":"2022-03-15T23:23:47.256Z","1.5.5":"2022-03-16T11:56:21.268Z","1.5.6-beta.1":"2022-04-20T18:09:33.998Z","1.5.6":"2022-04-20T22:38:02.226Z","1.5.7":"2022-04-21T00:25:32.336Z","1.5.8-beta.1":"2022-05-03T15:05:54.830Z","1.5.8-beta.2":"2022-05-03T15:27:35.589Z","1.5.8-beta.3":"2022-05-26T10:05:35.359Z","1.5.8":"2022-05-27T12:12:30.436Z","1.5.9-beta.1":"2022-06-07T23:49:52.758Z","1.5.9-beta.2":"2022-06-22T19:39:55.773Z","1.5.9-beta.3":"2022-06-23T14:59:49.407Z","1.5.9":"2022-06-23T15:03:21.081Z","1.5.10":"2022-08-09T17:09:35.716Z","1.6.0-beta.1":"2022-08-10T12:36:04.902Z","1.6.0-beta.2":"2022-08-10T12:37:38.424Z","1.6.0-beta.3":"2022-09-06T21:55:08.858Z","1.6.0-beta.5":"2022-09-07T01:05:16.217Z","1.6.0-beta.6":"2022-09-30T20:26:26.008Z","1.6.0-beta.7":"2022-10-28T12:52:33.341Z","1.6.0-beta.8":"2022-11-28T01:04:07.582Z","1.6.0-beta.9":"2023-12-14T17:27:09.390Z","1.6.0-beta.10":"2023-12-14T18:46:45.163Z"},"maintainers":[{"name":"mihanizm56","email":"m727507.56@mail.ru"}],"description":"core redux modules","homepage":"https://github.com/mihanizm56/redux-core-modules#readme","repository":{"type":"git","url":"git+https://github.com/mihanizm56/redux-core-modules.git"},"bugs":{"url":"https://github.com/mihanizm56/redux-core-modules/issues"},"license":"MIT","readme":"","readmeFilename":""}