{"_id":"@data-provider/connector-react","_rev":"5-acdb6a9f8199fa271c7dc3c5be561d21","name":"@data-provider/connector-react","dist-tags":{"latest":"1.4.2"},"versions":{"1.3.0":{"name":"@data-provider/connector-react","version":"1.3.0","description":"React connector for Data Provider","keywords":["data-provider","reactive","data","crud","react","connect","hoc","plugin","connector"],"author":{"name":"Javier Brea"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/data-provider/connector-react.git"},"publishConfig":{"access":"public"},"main":"dist/data-provider-connector-react.umd.js","module":"dist/data-provider-connector-react.esm.js","scripts":{"prelint":"rimraf demo/src/connector-react","lint":"eslint src test demo/mocks demo/src","lint-staged":"lint-staged","build":"rollup --config","test":"jest","test-ci":"npm run test -- --coverage --ci --verbose=false --coverageReporters=lcov --coverageReporters=text-summary","coveralls":"cat ./coverage/lcov.info | coveralls"},"peerDependencies":{"react":"^16.10.2","@data-provider/core":"^1.6.0"},"dependencies":{"hoist-non-react-statics":"3.3.0","lodash":"4.17.15"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@data-provider/core":"^1.6.0","@data-provider/axios":"^1.4.0","axios":"0.18.0","axios-retry":"^3.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","babel-polyfill":"^6.26.0","coveralls":"^3.0.7","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"6.5.1","eslint-config-prettier":"6.4.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-react":"^7.16.0","husky":"^3.0.9","jest":"^24.9.0","jsdom":"^15.2.0","lint-staged":"^9.4.2","prettier":"^1.18.2","prop-types":"^15.7.2","react":"^16.10.2","react-dom":"^16.10.2","react-test-renderer":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.3","sinon":"^7.5.0"},"lint-staged":{"src/**/*.js":"eslint","demo/mocks/**/*.js":"eslint","demo/src/**/*.js":"eslint","test/**/*.js":"eslint"},"husky":{"hooks":{"pre-commit":"npm run lint-staged"}},"gitHead":"55a38167e313f4c0e85b311bed6f931706f58cb1","bugs":{"url":"https://github.com/data-provider/connector-react/issues"},"homepage":"https://github.com/data-provider/connector-react#readme","_id":"@data-provider/connector-react@1.3.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-HQQCJbZFzdW/UeOOdiCmWVGo7ZfIiuTohKkmLVYKZUXmKpPjkJVfEjX0c8x1V+seJovTeSeODJOq8NQW5kO8ow==","shasum":"46154809421cbbfc01ef0238efe7a543d88a7f21","tarball":"https://registry.npmjs.org/@data-provider/connector-react/-/connector-react-1.3.0.tgz","fileCount":7,"unpackedSize":106807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2RxNCRA9TVsSAnZWagAAr+AP/RDfritdhhxUBaRj9LbT\n5EOofV28R0WsjhkeJ9USUAbw1FydXC8WzgKvjiUgC3H+vgs9k9kIIRrmIzPE\nfO0OvPLF9mpOQ8iNGqKou1LVMQvIw6b+5Ll/rJg5OqasOqlqVwDWXq4xP5+o\nKLrJa169dkQVLkqmQX8r+rp6hdqFEyV43Sgk3jqZ5oVHdjDB+sQ5sM5U0MR2\nmcqhNZfUcLqwCyX9LYO3vCMT59fq/deJ3yzziYVAIWfh3T5qJePZUqaxdKA+\n98PgDjlJqkGdHw3cBd1XBI/09fZj6nFiVEibdBIpC6Ws2I6C8DRaXXR3rFsw\n7k5L1J7DSNVUQW3E3L1cKcmsi2h0MGRXD+/3g8jqceVSQ/rD4hGdb947jygA\nUPOFyORGuI+NbXzENwC8FGG+47qBHKQfTz+TQq9ei6zh/BCrlYxMMQcajdvq\ntegcpADOxA+3bqHrG5hm3l2RWROhoMxrPycBUcX66XFX+8yQKMSMjxdyV1hl\nteiD26wglUk562JE9O/THYWlPBkz8mlqqBrBWuISPw58EeE9g2AafBiOVlPs\nWoYLk2bVOSriL7KcpcU0wkUetVesoiB2XtPhMHYILUMGA4rE8Y7GXQRTuBRi\n1Y4O4/Ng88GXu0H/Rc1jwBUrodka2DQo5KVFaoXDXedmgZbspMfZgPK/uxTE\ng2EU\r\n=O9h9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+38aRtGisRxKXqPPm1lfWq0euRlQjUYpGxQ9Iq+OPcAiEA/JoJDeNYSM1q7F2yo8l47ZtTfomCGCMNv2gAy/Pt5Js="}]},"maintainers":[{"name":"javierbrea","email":"javier.brea@gmail.com"}],"_npmUser":{"name":"javierbrea","email":"javier.brea@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connector-react_1.3.0_1574509644469_0.5778327781743569"},"_hasShrinkwrap":false,"deprecated":"This module has moved and is now available at @data-provider/react. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues."},"1.4.0":{"name":"@data-provider/connector-react","version":"1.4.0","description":"React connector for Data Provider","keywords":["data-provider","reactive","data","crud","react","connect","hoc","plugin","connector"],"author":{"name":"Javier Brea"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/data-provider/connector-react.git"},"publishConfig":{"access":"public"},"main":"dist/data-provider-connector-react.cjs.js","module":"dist/data-provider-connector-react.esm.js","scripts":{"prelint":"rimraf demo/src/connector-react","lint":"eslint src test demo/mocks demo/src","lint-staged":"lint-staged","build":"rollup --config","test":"jest","test-ci":"npm run test -- --coverage --ci --verbose=false --coverageReporters=lcov --coverageReporters=text-summary","coveralls":"cat ./coverage/lcov.info | coveralls"},"peerDependencies":{"react":"^16.10.2","@data-provider/core":"^1.7.0"},"dependencies":{"hoist-non-react-statics":"3.3.0","lodash":"4.17.15"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@data-provider/core":"^1.7.0","@data-provider/axios":"^1.5.0","axios":"0.18.0","axios-retry":"^3.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","babel-polyfill":"^6.26.0","coveralls":"^3.0.7","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"6.5.1","eslint-config-prettier":"6.4.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-react":"^7.16.0","husky":"^3.0.9","jest":"^24.9.0","jsdom":"^15.2.0","lint-staged":"^9.4.2","prettier":"^1.18.2","prop-types":"^15.7.2","react":"^16.10.2","react-dom":"^16.10.2","react-test-renderer":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.3","sinon":"^7.5.0"},"lint-staged":{"src/**/*.js":"eslint","demo/mocks/**/*.js":"eslint","demo/src/**/*.js":"eslint","test/**/*.js":"eslint"},"husky":{"hooks":{"pre-commit":"npm run lint-staged"}},"gitHead":"2b9c107cee79be42c90b81b2b4a03b774c430ad2","bugs":{"url":"https://github.com/data-provider/connector-react/issues"},"homepage":"https://github.com/data-provider/connector-react#readme","_id":"@data-provider/connector-react@1.4.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-jlqJuxitaDhn2L0OPbxgch1XfT/QHHXHLcSEMHZ5edcBmMB6qX2QL6IcVoW1PbADJtk6SPlC5voDdm7nvVDihA==","shasum":"33b43f3f5b8a4ad24f70617a9fdb46b6af624ff3","tarball":"https://registry.npmjs.org/@data-provider/connector-react/-/connector-react-1.4.0.tgz","fileCount":8,"unpackedSize":136504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2mwYCRA9TVsSAnZWagAAlyUP/3R3Sm2nvoZltZq+jpRL\nIQ0JIMw4oaG/uEa4Ij9MIWlApHU94ShHAEUkadNyrc5wH5/plZMXRaC6I4kL\naKp+aVciOlAtTgiW2z3LBKL++tjBo+JxRXWfCtYTBKCG5g58BZvKFBKb3NDd\n7264WH1+FCKofROaXcslW5VrVyP9W5I6Rr1XTbIaGWwJud6M+HSqG8rho+39\nFwOutO6CaDMvoq6UwghiFqB4Qu4621IASfpb+F5VF4TRNcYlaPBn6mCtjt9o\nHcIAQxBhOEWsAns8VN91uFhSN95eosaeOm+vY/Wb1ZCTppLxJjs8ANLPYTQw\nPsiIuqHtUGT06GyWajcAq9uzdvvK6MuGgvYHVSQQ/pRnpWBvcfWjM3dWKXbe\ngi+d72wa5hdjliaFOWyiUMUzVWzy6i/FOD5ESzq5+6Zughz7x6OI+0cMrtvi\nPS90dBGefek3tlhddYlMg1KpMd2ejLFVnRVIA7lHhbYIK+hCe0G28BUidDHv\nsLSsow66XkZAc1RQedyHww+qJ+J0eH3TdppAQBmfT4wuJMwZqE8RqjPbtPbB\n189T2K5FKyyxoR5FO9RtsGp3xP7KMQyNhas4lF4WSre/LaQHv05O4vkLvQR1\n268TKRkhWwApjVl9K7Wr5DHw9WlR/JotKiTxNDhJFZr3voekXLwvbJFVN+Dq\nZta7\r\n=RkJ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtVYcrNUuOFWw9ygk5863EoEOl83R4HGAy7jWI2OJBGAIgQMuh4cqUgbGCk7nnYh+YKP98OXi/e+vuDlbHYjm8baI="}]},"maintainers":[{"name":"javierbrea","email":"javier.brea@gmail.com"}],"_npmUser":{"name":"javierbrea","email":"javier.brea@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connector-react_1.4.0_1574595607860_0.24735346836295347"},"_hasShrinkwrap":false,"deprecated":"This module has moved and is now available at @data-provider/react. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues."},"1.4.1":{"name":"@data-provider/connector-react","version":"1.4.1","description":"React connector for Data Provider","keywords":["data-provider","reactive","data","crud","react","connect","hoc","plugin","connector"],"author":{"name":"Javier Brea"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/data-provider/connector-react.git"},"publishConfig":{"access":"public"},"main":"dist/data-provider-connector-react.cjs.js","module":"dist/data-provider-connector-react.esm.js","scripts":{"prelint":"rimraf demo/src/connector-react","lint":"eslint src test demo/mocks demo/src","lint-staged":"lint-staged","build":"rollup --config","test":"jest","test-ci":"npm run test -- --coverage --ci --verbose=false --coverageReporters=lcov --coverageReporters=text-summary","coveralls":"cat ./coverage/lcov.info | coveralls"},"peerDependencies":{"react":"^16.10.2","@data-provider/core":"^1.7.0"},"dependencies":{"hoist-non-react-statics":"3.3.0","lodash":"4.17.15"},"devDependencies":{"@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@data-provider/core":"^1.7.0","@data-provider/axios":"^1.5.0","axios":"0.18.0","axios-retry":"^3.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","babel-polyfill":"^6.26.0","coveralls":"^3.0.7","enzyme":"^3.10.0","enzyme-adapter-react-16":"^1.15.1","eslint":"6.5.1","eslint-config-prettier":"6.4.0","eslint-plugin-prettier":"^3.1.1","eslint-plugin-react":"^7.16.0","husky":"^3.0.9","jest":"^24.9.0","jsdom":"^15.2.0","lint-staged":"^9.4.2","prettier":"^1.18.2","prop-types":"^15.7.2","react":"^16.10.2","react-dom":"^16.10.2","react-test-renderer":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.3","sinon":"^7.5.0"},"lint-staged":{"src/**/*.js":"eslint","demo/mocks/**/*.js":"eslint","demo/src/**/*.js":"eslint","test/**/*.js":"eslint"},"husky":{"hooks":{"pre-commit":"npm run lint-staged"}},"gitHead":"6160fba7032c9b801b613c1e62e6e0cef8783e8f","bugs":{"url":"https://github.com/data-provider/connector-react/issues"},"homepage":"https://github.com/data-provider/connector-react#readme","_id":"@data-provider/connector-react@1.4.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-pAx9Nr+hncW9iruIlKduLmuJ/A2zTaIuLrDbBALj+MBHYxR6MeRyteVISwgZC3KXP2d/M/u4a5A7rLbCMDCiFQ==","shasum":"ef3906a2fecb1825cd6bcc5df9c5b2bb5b1abbed","tarball":"https://registry.npmjs.org/@data-provider/connector-react/-/connector-react-1.4.1.tgz","fileCount":8,"unpackedSize":136579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2nBdCRA9TVsSAnZWagAAxCsP/3SkJZXIakNc5n2TtFH5\nC1iFng0rbUBGzWvY9V/KHEftKEi2IdDkuXW1rx+DrCXWPbdDGos4mA+LZTnF\n9fFKdWPMwEWeRtN+XweXhKSLkqr+HwNSniWBl9S+7y/1aOU52VKj5/wqTSW4\n5YE+cwlu45/zex0tPi8EVkYRUN1AdL2660QmQUGjhat79F3dCzJeGiavr5kY\nXw+7OBc/X4yB73A8wuj4ZoXtWPuYnhNxiGFrvmdKHdQNoSiovOdsVIqLCXd5\nAvX5uT1pX0jz95a1VMbzCRDRC6+AP1xL39vzEE7twcr7w8drGD0he1v1uQ44\nlg9Ktcf3r5Lv4gEPc8rKvfarevUvxINkccmQiseo06W+mw185JayijU5CO19\neOhT5mb2GGOFjPeL02SxN/pqOHq8yU6oloFiXzua1d9DDv2MNkc10Joq8AJ3\nQytXyQhAmDHPp32Mvsxym2SAsUl+K3dYjv3+ULBpbxmZ4wZ+LaiZSPmNcwbd\n0KWojAhN89wKMsL4liZ7PH5t+dSVm1t0G8K47uJiau0LkPYugJNNtWQWgEqC\nekyLcTNwvK9OzPKQU7qHfXm0y3LWXAUbyXwW8q34vzUm4XQvwxvoFIRGHMbS\nb1sbxrERHzM6Snbe3d8FZ1wHWngIiPtO7ZXzWVPxFHGZhtCOCdxF30LGWM7d\nfsO4\r\n=EPkx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUW0BODdrucaEeFHD2dd0vdl28w2B5s3PE1mv20q+W4wIhAK3e3Pwi7jKNWTCX3Ud1sHoANvyouyov+o6LLoOMzW5r"}]},"maintainers":[{"name":"javierbrea","email":"javier.brea@gmail.com"}],"_npmUser":{"name":"javierbrea","email":"javier.brea@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connector-react_1.4.1_1574596701192_0.507505041070472"},"_hasShrinkwrap":false,"deprecated":"This module has moved and is now available at @data-provider/react. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues."},"1.4.2":{"name":"@data-provider/connector-react","version":"1.4.2","description":"React connector for Data Provider","keywords":["data-provider","reactive","data","crud","react","connect","hoc","plugin","connector"],"author":{"name":"Javier Brea"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/data-provider/connector-react.git"},"publishConfig":{"access":"public"},"main":"dist/data-provider-connector-react.cjs.js","module":"dist/data-provider-connector-react.esm.js","scripts":{"prelint":"rimraf demo/src/connector-react","lint":"eslint src test demo/mocks demo/src","lint-staged":"lint-staged","build":"rollup --config","test":"jest","test-ci":"npm run test -- --coverage --ci --verbose=false --coverageReporters=lcov --coverageReporters=text-summary","coveralls":"cat ./coverage/lcov.info | coveralls"},"peerDependencies":{"react":"^16.10.2","@data-provider/core":"^1.7.0"},"dependencies":{"hoist-non-react-statics":"3.3.1","lodash":"4.17.15"},"devDependencies":{"@babel/core":"7.6.4","@babel/preset-env":"7.6.3","@babel/preset-react":"7.6.3","@data-provider/core":"1.7.1","@data-provider/axios":"1.6.1","axios":"0.19.1","axios-retry":"3.1.2","babel-core":"7.0.0-bridge.0","babel-eslint":"10.0.3","babel-jest":"24.9.0","babel-polyfill":"6.26.0","coveralls":"3.0.7","enzyme":"3.10.0","enzyme-adapter-react-16":"1.15.1","eslint":"6.8.0","eslint-config-prettier":"6.9.0","eslint-plugin-prettier":"3.1.1","eslint-plugin-react":"7.16.0","husky":"4.0.7","jest":"24.9.0","jsdom":"15.2.0","lint-staged":"9.4.2","prettier":"1.18.2","prop-types":"15.7.2","react":"16.10.2","react-dom":"16.10.2","react-test-renderer":"16.10.2","rimraf":"3.0.0","rollup":"1.25.0","rollup-plugin-babel":"4.3.3","rollup-plugin-commonjs":"10.1.0","rollup-plugin-json":"4.0.0","rollup-plugin-node-resolve":"5.2.0","rollup-plugin-uglify":"6.0.3","sinon":"8.0.4"},"lint-staged":{"src/**/*.js":"eslint","demo/mocks/**/*.js":"eslint","demo/src/**/*.js":"eslint","test/**/*.js":"eslint"},"husky":{"hooks":{"pre-commit":"npm run lint-staged"}},"gitHead":"ec1c8670a4db96fb427ba1d1350668ab0f315fd5","bugs":{"url":"https://github.com/data-provider/connector-react/issues"},"homepage":"https://github.com/data-provider/connector-react#readme","_id":"@data-provider/connector-react@1.4.2","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-cSbE9DN19yE9n0zxNd/R7Lr8Zr3od2VN6cYPVAzOj0oI2uEiYTqnpBnYlt/gj6dQCqvrQ7JfFaRPYINsX/WSSw==","shasum":"1e74a56e37c3f66bf4d32ffbb2c1dcf8b58021e1","tarball":"https://registry.npmjs.org/@data-provider/connector-react/-/connector-react-1.4.2.tgz","fileCount":8,"unpackedSize":136719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGwXnCRA9TVsSAnZWagAAwhUQAJZZe1IeaiBo+APP+AOS\nCTZsnN3/IAUis05jOg5BB9vT7oZm93epFwrgYtpB+2GKxX6YTMh6YXadZjG4\nL634Xa2GkTPwKF6jjc4fdvaJASBmI4S4Bvt0fthxD8f8trPKVG7CJGfSYvl1\nMQtQWVnXB4WgRf07PU6CloDHmoq7dFN9g3c6PDUa8yXEi43ai/hVzBb0Oh6s\nkBtIPX7X37H43JhhHik+T/wTJNrJiqC7L1bL64w1aga3mSPNgy5A6af1fadI\npJ22sCkJHIEoKlowGJ2smEPLqJIYqZ+V9Op28s68rpRLy2OTx4UCC3UP+Q82\nIEmTn7gegpfIEECbx3wNwCQEqWu4S4B01Kqxm/Ce7KqZdOCXtyd5x8MBqkZE\nfquLOO9fcaXmnkaXPNCbEY+oOoolTG96l8s7xXnkQb7pAZe4+WNMHNARaT7B\nDkaRrTjssIyITF84ea02oFYaC1l4PYKAly1tmfT818BMtzFTzbje0geJmgIS\naI7dqeGDqBW6FtlTYyEwMc0W0WrPrPkhV0+nb4dC7qRrWCzLnjgPywpiVB/s\nfs6lO7lgA8O8of8twtvuOxDk2BHhHdxeJ8IUjI+j/grVNJHWCViJOcS5An8C\ncSTd/peDaXUBl9R1p+Q82SebvDV1ggd2KAwU4SspYLxEwDWWw0ZHmWMKjfX8\nylUq\r\n=qslu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhbJkjoiRNlh/yZMchbYL9ZVVbtxI4i9aziGYlbvtDEAiEAjGqrfeR9TyxjW9z4eVohwzBudEJ7YE1ldR3PBX1vQko="}]},"maintainers":[{"name":"javierbrea","email":"javier.brea@gmail.com"}],"_npmUser":{"name":"javierbrea","email":"javier.brea@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connector-react_1.4.2_1578829286682_0.49224130157649326"},"_hasShrinkwrap":false,"deprecated":"This module has moved and is now available at @data-provider/react. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues."}},"time":{"created":"2019-11-23T11:47:24.225Z","1.3.0":"2019-11-23T11:47:24.685Z","modified":"2022-04-05T02:50:39.899Z","1.4.0":"2019-11-24T11:40:08.042Z","1.4.1":"2019-11-24T11:58:21.341Z","1.4.2":"2020-01-12T11:41:26.839Z"},"maintainers":[{"name":"javierbrea","email":"javier.brea@gmail.com"}],"description":"React connector for Data Provider","homepage":"https://github.com/data-provider/connector-react#readme","keywords":["data-provider","reactive","data","crud","react","connect","hoc","plugin","connector"],"repository":{"type":"git","url":"git+https://github.com/data-provider/connector-react.git"},"author":{"name":"Javier Brea"},"bugs":{"url":"https://github.com/data-provider/connector-react/issues"},"license":"Apache-2.0","readme":"[![Build status][travisci-image]][travisci-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Quality Gate][quality-gate-image]][quality-gate-url]\n\n[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Greenkeeper badge](https://badges.greenkeeper.io/data-provider/connector-react.svg)](https://greenkeeper.io/) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url] \n\n[![NPM downloads][npm-downloads-image]][npm-downloads-url] [![License][license-image]][license-url]\n\n## Overview\n\nThis package provides reactivity to [Data Provider][data-provider-url] using a React high order component. It also dispatchs automatically the read method of the Data Provider instances.\n\nConnect the desired Data Providers with your components and this library will retrieve the data and re-render your components when corresponds.\n\n## Install\n\n```bash\nnpm i @data-provider/connector-react --save\n```\n\n## Examples\n\nIn the next example, the books will be retrieved automatically from server if they are not cached. The component will be rendered again if a new book is added to the collection by another component, or deleted, etc.\n\nComponents can be connected to [Data Providers or Selectors][data-provider-url]. The interface is the same in all cases.\n\n### Use connect\n\n```jsx\nimport React, { Component } from \"react\";\nimport { connect } from \"@data-provider/connector-react\";\n\nimport { booksCollection } from \"data/books\"; //booksCollection is a Data Provider\n\nexport class Books extends Component {\n  render() {\n    const books = this.props.books.value || [];\n    const loading = this.props.books.loading;\n    const error = this.props.books.error;\n\n    if (error) {\n      return <div>ERROR</div>;\n    }\n\n    if (loading) {\n      return <div>LOADING...</div>;\n    }\n\n    return (\n      <div>\n        <ul>\n          {books.map(book => (\n            <li key={book._id}>\n              {book.title}\n            </li>\n          ))}\n        </ul>\n      </div>\n    );\n  }\n}\n\nexport const mapDataProviderToProps = () => ({\n  books: booksCollection.read\n});\n\nexport const ConnectedBooks = connect(mapDataProviderToProps)(Books);\n\n```\n\n### Querying Data Providers using component \"props\"\n\nIn the next example, the component will render only books of author \"cervantes\", and will request them to the server using the correspondant query (if not cached previously):\n\n```js\nexport const mapDataProviderToProps = props => ({\n  books: booksCollection.ofAuthor(props.author).read\n});\n\nexport const ConnectedModule = connect(mapDataProviderToProps)(Books);\n```\n\n### Connect component to many Data Providers\n\nThe connect function accepts connecting as many Data Providers as you want. Any change on any of the data providers will produce a new render of the component:\n\n```js\nexport const mapDataProviderToProps = () => ({\n  books: booksCollection.read,\n  authors: authorsCollection.read\n});\n\nexport const ConnectedModule = connect(mapDataProviderToProps)(Books);\n```\n\n### Connect component to specific properties of a Data Provider\n\nYou can use the property getters available in data provider instances to pass an specific property to components instead of the full object. This will improve and simplify the usage of props inside the component, because each component prop will be equivalent to an specific property:\n\n```jsx\nimport { connect } from \"@data-provider/connector-react\";\n\nexport const BooksList = ({ books, booksLoading, booksError }) => {\n  if(booksError) {\n    return (<div>Error loading books</div>);\n  }\n  if(booksLoading) {\n    return (<div>Loading books...</div>);\n  }\n  return (\n    <div>\n      <ul>\n        {books.map(book => (\n          <li key={book.id}>\n            {book.title}\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n};\n\nexport const mapDataProviderToProps = () => ({\n  booksError: booksCollection.read.getters.error,\n  books: booksCollection.read.getters.value,\n  booksLoading: booksCollection.read.getters.loading\n});\n\nexport const ConnectedModule = connect(mapDataProviderToProps)(BooksList);\n\n```\n\n### Pass any other type of properties using connect:\n\nThe connect function can pass any other types of properties to the Component, not only Data Provider instances:\n\n```js\nexport const mapDataProviderToProps = props => ({\n  createBook: booksCollection.create,\n  books: booksCollection.read,\n  authors: authorsCollection.read,\n  myProperty: true,\n  anotherProperty: 5,\n  isLoadingAny: props.loading || props.anotherLoading || props.anotherOneLoading,\n  callback: () => {\n    console.log(\"Callback called\");\n  }\n});\n\nexport const ConnectedModule = connect(mapDataProviderToProps)(Books);\n```\n\n### Using connect parser function to prepare data synchronously to component\n\nIn some scenarios, the component is not prepared to handle asynchronous data, and could fail rendering if, for example, the data provider value is not already fullfilled because it is loading. A Selector could be used to ensure data in component properties, but, for more specific behaviors related with loading or error properties, a parser function is available in the connector. This function, if defined, will be executed passing all component properties before rendering it, and the returned object will be applied as properties to the Component.\n\nThe parser function has to be defined as second argument of the connector:\n\n\n```js\nexport const mapDataProviderToProps = () => ({\n  books: booksCollection.read.getters.value,\n  booksLoading: booksCollection.read.getters.loading,\n  authorsLoading: authorsCollection.read.getters.loading\n});\n\nexport const parseProps = props => ({\n  ...props,\n  loading: props.booksLoading || props.authorsLoading\n});\n\nexport const ConnectedModule = connect(\n  mapDataProviderToProps,\n  parseProps\n)(Books);\n```\n\n> This parser function should not be used as a replacement to Data Provider Selectors. As a good practice, the preference is to use Selectors if possible instead of this function.\n\n## Prefetching data on server side rendering\n\nMethods for prefetching data on server side rendering are available too. When data is prefetched in server side, the connect function will pass the `value` property calculated on server side to the components directly. It will not modify the `loading` property until the first load on client side is finished (At first client-side load, the resource will not be considered as `loading` to maintain the server-side value in the component until it finish loading).\n\n> __It is important to define custom an unique \"uuids\" for your Data Provider instances when are going to be read on server side. Otherwise, the `readServerSide` method will trace a warning if detects duplicated \"ids\".__\n\n### Server side data methods and components\n\n* `readOnServerSide(provider)`\n\t* Alias - `addServerSideData`\n\t* Arguments\n\t\t* provider - `<Object> or <Array> of <Objects>` Data Provider instance or instances that should be read when `readServerSide` method is executed. Can be Data Provider origins or selectors of any type, queried or not.\n* `readServerSide([providers])`\n\t* Alias - `readServerSideData`\n\t* Arguments\n\t\t* providers - `<Object> or <Array> of <Objects>` Data Provider instance or instances. Will be added to be read with the `readOnServerSide` method.\n\t* Returns\n\t\t* `<Object>` This method is asynchronous, and, when resolved, it returns an object containing all server side data ready to be set on the `<ServerSideData>` context component.\n* `<ServerSideData data={data} clientSide={true}><App/></ServerSideData>` Component that sets the result of the `readServerSide` method in a context to make it available from all Data Provider connected children components.\n\t* Props\n\t\t* data - `<Object>` Object containing the result of the `readServerSide` method.\n\t\t* clientSide - `<Boolean>` If false, the connect method will not dispatch automatically the read method of the providers marked as \"server-side\", so, for example, api requests will not be repeated on client side, and data retrieved in server side will be always passed to connected components.\n\n### Example of server side prefecth implementation in a Next.js project:\n\nIn the next example, the data of the \"myDataProvider\" Data Provider instance will be fetched on server side and request will not be repeated on client side. The component will be rendered directly with server side data, and no loading state will be set:\n\n```jsx\n// src/home.js\nimport { readOnServerSide, connect } from \"@data-provider/connector-react\";\nimport { myDataProvider } from \"src/data\";\n\nreadOnServerSide(myDataProvider); // provider is marked to be read when readServerSide method is executed.\n\nexport const HomeComponent = ({data}) => {\n  if(data.loading) {\n    return <div>Loading...</div>\n  }\n  return <div>{data.value}</div>\n};\n\nexport const mapDataProviderToProps = () => ({\n  data: myDataProvider.read\n});\n\nexport const Home = connect(mapDataProviderToProps)(HomeComponent)\n\n```\n\n```jsx\n// pages/index.js\nimport { readServerSide, ServerSideData } from \"@data-provider/connector-react\";\nimport { Home } from \"src/home\";\n\nconst Page = ({ serverSideData }) => (\n  <ServerSideData data={serverSideData} clientSide={false} >\n    <Home/>\n  </ServerSideData>\n);\n\nPage.getInitialProps = async () => {\n  return {\n    serverSideData: await readServerSide()\n  }\n}\n\nexport default Page;\n```\n\n## Demo\n\nTo run a real implementation example in a React app, you can clone the project and execute the provided demo:\n\n```bash\ngit clone git@github.com:data-provider/connector-react.git\ncd connector-react\nnpm i\nnpm run build\ncd demo\nnpm i\n```\n\nNow, start mocks server:\n```bash\nnpm run mocks\n```\n\nAnd start the demo app in another shell while mocks are running:\n```bash\nnpm start\n```\n\n## Contributing\n\nContributors are welcome.\nPlease read the [contributing guidelines](.github/CONTRIBUTING.md) and [code of conduct](.github/CODE_OF_CONDUCT.md).\n\n[data-provider-url]: https://github.com/data-provider/core\n\n[coveralls-image]: https://coveralls.io/repos/github/data-provider/connector-react/badge.svg\n[coveralls-url]: https://coveralls.io/github/data-provider/connector-react\n[travisci-image]: https://travis-ci.com/data-provider/connector-react.svg?branch=master\n[travisci-url]: https://travis-ci.com/data-provider/connector-react\n[last-commit-image]: https://img.shields.io/github/last-commit/data-provider/connector-react.svg\n[last-commit-url]: https://github.com/data-provider/connector-react/commits\n[license-image]: https://img.shields.io/npm/l/@data-provider/connector-react.svg\n[license-url]: https://github.com/data-provider/connector-react/blob/master/LICENSE\n[npm-downloads-image]: https://img.shields.io/npm/dm/@data-provider/connector-react.svg\n[npm-downloads-url]: https://www.npmjs.com/package/@data-provider/connector-react\n[npm-dependencies-image]: https://img.shields.io/david/data-provider/connector-react.svg\n[npm-dependencies-url]: https://david-dm.org/data-provider/connector-react\n[quality-gate-image]: https://sonarcloud.io/api/project_badges/measure?project=data-provider-connector-react&metric=alert_status\n[quality-gate-url]: https://sonarcloud.io/dashboard?id=data-provider-connector-react\n[release-image]: https://img.shields.io/github/release-date/data-provider/connector-react.svg\n[release-url]: https://github.com/data-provider/connector-react/releases\n","readmeFilename":"README.md"}