{"_id":"@thinkmill/pragmatic-forms","_rev":"68-8c2087f3e48bb2da116a8792a1a3c39a","name":"@thinkmill/pragmatic-forms","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@thinkmill/pragmatic-forms","version":"1.0.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.0.0","maintainers":[{"name":"schmicko","email":"mike.hazell@gmail.com"}],"dist":{"shasum":"93e7a75d24b0c4e8b53b63b1228fe9d493861155","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.0.0.tgz","integrity":"sha512-cvytkfg+w7L/TmJnsTTTvXnrToOdMrBnTQ6dLmtIXsW+QdngCm11ZzJNOYj/djxZyoefTPglnGKwjFUOn81JWA==","signatures":[{"sig":"MEUCIHm+3EQ0T/RjJxoA0O7ga2HQ0LnEOXo1dcqSvDUlN0N+AiEA5NT0cGAXwxM+DogkVel+pk7Xkh46YNg9f0mXThmct8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","gitHead":"2fbca98be313c6959fcec952c5eef08d13bcedd4","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"webpack-dev-server --config webpack.config.js","pretty":"./scripts/pretty.sh","build:example":"webpack","build:release":"mkdir -p ./lib && babel src/index.js --out-file lib/index.js"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"_npmVersion":"5.3.0","description":"A pragmatic approach to form handling in React","directories":{},"_nodeVersion":"8.1.2","devDependencies":{"jest":"^20.0.3","react":"^15.5.4","eslint":"^4.1.1","webpack":"^3.0.0","flow-bin":"^0.51.1","babel-cli":"^6.24.1","react-dom":"^15.6.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","react-json-view":"^1.10.12","styled-components":"^2.1.0","babel-preset-react":"^6.24.1","webpack-dev-server":"^2.4.5","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","eslint-plugin-flowtype":"^2.33.0","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms-1.0.0.tgz_1502756015157_0.2676675710827112","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@thinkmill/pragmatic-forms","version":"1.1.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.1.0","maintainers":[{"name":"intmainvoid","email":"gavin@binarymosaic.com"},{"name":"kevinbrown","email":"kevinbrowntech@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"vitalbone","email":"bz.vito@gmail.com"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"}],"dist":{"shasum":"5d00db9630c2801daf6d0e55069997c2509736fe","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.1.0.tgz","integrity":"sha512-o6VbOsw/1YVL74r5jM8OhaBtLxiGCYn2xRbbl4/fR+a8CFCLRkQ5JuqbiIUq3dCTMBrrnVv+Au8B1WIhS/yVAQ==","signatures":[{"sig":"MEUCIQDde6xm26QVqOFzEcWRPdYy624H5P+lR2nTJQtlyCB3IgIgI7HoxYG2c6wYlSAaa7Ve8eA9unP6KzmwxOrYzWpSSqk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","scripts":{"test":"jest","start":"webpack-dev-server --config webpack.config.js","pretty":"./scripts/pretty.sh","build:example":"webpack","build:release":"mkdir -p ./lib && babel src/index.js --out-file lib/index.js"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"description":"A pragmatic approach to form handling in React","directories":{},"devDependencies":{"jest":"^21.2.1","react":"^15.5.4","eslint":"^4.1.1","webpack":"^3.0.0","flow-bin":"^0.59.0","babel-cli":"^6.24.1","react-dom":"^15.6.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","react-json-view":"^1.10.12","styled-components":"^2.1.0","babel-preset-react":"^6.24.1","webpack-dev-server":"^2.4.5","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","eslint-plugin-flowtype":"^2.33.0","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms-1.1.0.tgz_1511311921854_0.21082382649183273","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@thinkmill/pragmatic-forms","version":"1.2.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.2.0","maintainers":[{"name":"intmainvoid","email":"gavin@binarymosaic.com"},{"name":"kevinbrown","email":"kevinbrowntech@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"vitalbone","email":"bz.vito@gmail.com"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"}],"dist":{"shasum":"254e8c39579b5a129d38c2bdadc6451e2c9c7934","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.2.0.tgz","integrity":"sha512-SamuMW0SdojniqRfv4p15bjLhIsX4pP3s8fZ0q7C1pNiiX0EC4y5fxrRaakgDK2kEXhDZ1f/ei7MnqcgKwmrJw==","signatures":[{"sig":"MEQCIEaUrGjKXXkb6mbjMD1H1Ihqs9ht7bMoJBzcu0OEHqMOAiB9PU7d8qrCIRPpEqe0FXeROtqSNbyoyjm1yYPiTibAAA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","scripts":{"test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","pretty":"./scripts/pretty.sh","prepublish":"./scripts/build.sh"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"description":"A pragmatic approach to form handling in React","directories":{},"devDependencies":{"jest":"^21.2.1","react":"^15.5.4","eslint":"^4.1.1","webpack":"^3.0.0","flow-bin":"^0.59.0","babel-cli":"^6.24.1","react-dom":"^15.6.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","react-json-view":"^1.10.12","styled-components":"^2.1.0","babel-preset-react":"^6.24.1","webpack-dev-server":"^2.4.5","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","eslint-plugin-flowtype":"^2.33.0","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms-1.2.0.tgz_1511390898425_0.6707369750365615","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@thinkmill/pragmatic-forms","version":"1.2.2","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.2.2","maintainers":[{"name":"intmainvoid","email":"gavin@binarymosaic.com"},{"name":"kevinbrown","email":"kevinbrowntech@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"vitalbone","email":"bz.vito@gmail.com"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"}],"dist":{"shasum":"afc3b5c5e9c41168d9f204e62bc0b4f12b4d84dd","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.2.2.tgz","integrity":"sha512-Lysa9I/03M8BhyhEzcwgY+PgLU+OHF2fcI4bt6eDvmWKKztdhG8roZ2xDn3VYsUx6blbJwV4SGQcQbJ2Mx5yMA==","signatures":[{"sig":"MEYCIQDm7lsL4ryYa6mqPed5ySZYHvUWPTiWxxwvKRAnD8WboQIhAJhiDMWiTAy6NoX8Shd1OVbA0mjXTwL0bx9fnTuyyH5H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","scripts":{"test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","pretty":"./scripts/pretty.sh","prepublish":"./scripts/build.sh"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"description":"A pragmatic approach to form handling in React","directories":{},"devDependencies":{"jest":"^21.2.1","react":"^15.5.4","eslint":"^4.1.1","webpack":"^3.0.0","flow-bin":"^0.59.0","babel-cli":"^6.24.1","react-dom":"^15.6.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","react-json-view":"^1.10.12","styled-components":"^2.1.0","babel-preset-react":"^6.24.1","webpack-dev-server":"^2.4.5","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","eslint-plugin-flowtype":"^2.33.0","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms-1.2.2.tgz_1511926100647_0.3528530625626445","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@thinkmill/pragmatic-forms","version":"1.3.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.3.0","maintainers":[{"name":"intmainvoid","email":"gavin@binarymosaic.com"},{"name":"kevinbrown","email":"kevinbrowntech@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"vitalbone","email":"bz.vito@gmail.com"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"}],"dist":{"shasum":"9ab16653014ca79fb161798f8399173a4c81925a","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.3.0.tgz","integrity":"sha512-CbEk+V4UQ7gliKq/XMP/+pWB6JWcHxVagtJRD8jhVAIkVIu7/iNUZw2GVn1wapP29aENDYPqgM2nnbOnl1KPPw==","signatures":[{"sig":"MEYCIQC9TtANF3MDbTrmktHhl0OPGqsGwVGaVl9+vc2e5T7qrQIhAIOOTotvLY/XNlu9Z8Pcr+It1k8zaEAzHrcgjsgThqDE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","scripts":{"test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","doctoc":"doctoc README.md","pretty":"./scripts/pretty.sh","prepublish":"./scripts/build.sh"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"description":"A pragmatic approach to form handling in React","directories":{},"devDependencies":{"jest":"^21.2.1","react":"^15.5.4","doctoc":"^1.3.0","eslint":"^4.1.1","webpack":"^3.0.0","flow-bin":"^0.59.0","babel-cli":"^6.24.1","react-dom":"^15.6.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","react-json-view":"^1.10.12","styled-components":"^2.1.0","babel-preset-react":"^6.24.1","webpack-dev-server":"^2.4.5","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","eslint-plugin-flowtype":"^2.33.0","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms-1.3.0.tgz_1513294064646_0.7383892487268895","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@thinkmill/pragmatic-forms","version":"1.4.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.4.0","maintainers":[{"name":"aghaabbasq","email":"abbasagha201@gmail.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"dominikwilkowski","email":"hi@dominik-wilkowski.com"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"ticidesign","email":"ticipp@gmail.com"},{"name":"timl","email":"tim.leslie@thinkmill.com.au"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"vitalbone","email":"bz.vito@gmail.com"}],"dist":{"shasum":"673b830538ffeeba971ab1c831f4dc92beca365a","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.4.0.tgz","fileCount":28,"integrity":"sha512-WrGnJbPe9JK6tI4wDICM+vznYfBygI33DWL5CAmdVAHM6dmZXX7ZeqK107nkTTq2JnyEQD3pBo/wunv9br7iaw==","signatures":[{"sig":"MEUCIGn6upAYU6O55FO7xd9IEDfeAkeOKW+BMT5VGf4lwaiOAiEApHpyl/s+gE0XF03JClNhvuy5XL5UH+KB4/Ls21ThRiE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6345895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2CWbCRA9TVsSAnZWagAAu/AP/0KTDjRR6Z0C7y6S8Mn1\n2AtLftIGYw4+cOF6c+eOI2ThIj84mnelc5nXXIDUqY131HkZqFJNvvOK0Wop\n7dvyNt3asMVix6wg2ob2asT7aJVvRd16Wisc3Xv4kswk0i/brJ1ppgza+W09\nL/67O1ULbv7RWUlFdc0ZKipVd3PbXaTENM+LG+5IT4U9Kcr6wwL/oS2n6Hp5\nod86/NlrQx5K0IyPV5T8036Eaz5YjM63BgnLTJSC+Xja37s/0hoXwassrQJf\nXSZGYnhvL4bZlg9ZtLqhFb2vVlfiz/LhTA2k4nSDNtrXMBazEpCyvGKo1sI3\n6kPuzhmO6lO98nQRs7Pqovg1Zj0waoF4b6C+9YgPnzxm6GUxTUqkaIDl+dFp\nv7t1ZzsY3yE22KnbbEFv0kbH44ruBY0qsqykAKGWEqyCw3IOqDnB9KtEz+U2\nIQzIEI+u2icg4ZFeea0/+mMNNk9XzSlIUCsKx3woX9lVWMK7YOPGACTler4Q\nx5n0nzBceh36ozJ04JKHD+t/kECbXLvJD39gYDVRP+vvt0S5PM1JJQ8l3gtj\nV6a9HuLxKL9a66dJjBDWVy7M5SS7dItCZyIHBS5r/ZP/J1uGIwqRVXRxvdYS\nHPCUg5lIFNV5PXMj5lZPYG+aUpus9mkDKYM2xHq6bKkh+lXUTevMKxpO2+fS\nBWmQ\r\n=yQIB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"setupFiles":["./tests/_setup.js"]},"main":"lib/index.js","scripts":{"lint":"eslint ./src","test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","doctoc":"doctoc README.md","prepublish":"./scripts/build.sh","build:examples":"webpack"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"repository":{"url":"https://github.com/Thinkmill/pragmatic-forms.git","type":"git"},"description":"A pragmatic approach to form handling in React","directories":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"22.0.3","react":"16.2.0","doctoc":"^1.3.0","enzyme":"^3.2.0","eslint":"4.13.1","webpack":"3.10.0","flow-bin":"0.61.0","babel-cli":"^6.24.1","react-dom":"16.2.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"8.0.3","babel-loader":"^7.1.1","react-json-view":"1.14.0","styled-components":"2.3.3","babel-preset-react":"^6.24.1","webpack-dev-server":"2.9.7","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","react-test-renderer":"^16.2.0","eslint-plugin-flowtype":"2.40.1","enzyme-adapter-react-16":"^1.1.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms_1.4.0_1524114842464_0.26987251834652937","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@thinkmill/pragmatic-forms","version":"1.5.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.5.0","maintainers":[{"name":"aghaabbasq","email":"abbasagha201@gmail.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"dominikwilkowski","email":"hi@dominik-wilkowski.com"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"ticidesign","email":"ticipp@gmail.com"},{"name":"timl","email":"tim.leslie@thinkmill.com.au"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"vitalbone","email":"bz.vito@gmail.com"}],"dist":{"shasum":"fc749d982c675b0895770a9f6e280e6af3c73bfb","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.5.0.tgz","fileCount":28,"integrity":"sha512-0qxQWOQkrgG+yJH53yAQCFF9McSz3Y9TJcL9oqSYOn529ft4MfidIIWxy0xi4k8Yi7ITzBIbChR8UI/reUEWUQ==","signatures":[{"sig":"MEQCIBu3y08vat1ecHyrl3T1CrE7VoyKQvXlyrCVZUuvAc5tAiA0TuXOOx/c3c84oZSoouICvlf7110mFZwVVrVekrjHxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6346557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaS/zCRA9TVsSAnZWagAA5eoQAIVGyj+RA2bwjAB4Z/0m\n6pvqIjgLUpdvdaoRrRpf+vwRCFyavLvEdzjSu3MzswTkXaw9wY8HVKdOK5m3\nTpru5QPBM5RqXo1x8oj2rsbHR6Rc1bB8+kET7FdaLgZkBQSQD9kRKQBZHL9H\npJX5nI8+axoQ6I0pwho4kSfNU/MsItdMiYsSFHMhZctsn7m+H9w3KGNDWCgl\n4JpWnziKW4GXg1NcyE949KSSlz93BjMq709y/empzt66vVKo+Lo6ENEt+H+c\nTEiCpwZCT/0kUvS9Ktoy9iDqRsDCbP4VTXagDjyChfCyqNR9GKs399ANqDqc\ntHO46/dzfI4sXhF8Uy1S0gE68CW4F8dNA2yaHrOZD9cRDFg58fafcRbqp1q2\nG3S3zukx9XguVPUR3PwYWkK/P/qMeA523zg5m3HMQp1X+rfD/PcOBfrxP0py\n6jddqiEAwdxCBe9n/8m1NOjQBWtO1QJ/yjVZ4lFs6TAdAhn3sOAjmNaZEB7y\n/o+InQORHk5KGwNKiUD+e0TEFtentmkF0p+issqU5MTk08HpZ0bA1YGvgjvn\nLwxsBqN0u8x89yQ9iAYPgEwvq3QZy09HPXNXgoaRkBjAJz4+6Yq/WTCUUMOD\n8m3R2RVFjemhEvO8M7lDtHbehQzPRN/UQCrHcSny9OTAA8q49kfIl5ZL/47e\nS8fE\r\n=8vJt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"setupFiles":["./tests/_setup.js"]},"main":"lib/index.js","scripts":{"lint":"eslint ./src","test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","doctoc":"doctoc README.md","prepublish":"./scripts/build.sh","build:examples":"webpack"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"repository":{"url":"https://github.com/Thinkmill/pragmatic-forms.git","type":"git"},"description":"A pragmatic approach to form handling in React","directories":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"22.0.3","react":"16.2.0","doctoc":"^1.3.0","enzyme":"^3.2.0","eslint":"4.13.1","webpack":"3.10.0","flow-bin":"0.61.0","babel-cli":"^6.24.1","react-dom":"16.2.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"8.0.3","babel-loader":"^7.1.1","react-json-view":"1.14.0","styled-components":"2.3.3","babel-preset-react":"^6.24.1","webpack-dev-server":"2.9.7","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","react-test-renderer":"^16.2.0","eslint-plugin-flowtype":"2.40.1","enzyme-adapter-react-16":"^1.1.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms_1.5.0_1533620210332_0.8453469225156718","host":"s3://npm-registry-packages"}},"1.5.1":{"name":"@thinkmill/pragmatic-forms","version":"1.5.1","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@1.5.1","maintainers":[{"name":"aghaabbasq","email":"abbasagha201@gmail.com"},{"name":"bladey","email":"bladey@me.com"},{"name":"cameronbourke","email":"cameron2295@gmail.com"},{"name":"dominikwilkowski","email":"hi@dominik-wilkowski.com"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"molomby","email":"john@molomby.com"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"thinkbot","email":"npm@thinkmill.com.au"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"ticidesign","email":"ticipp@gmail.com"},{"name":"timl","email":"tim.leslie@thinkmill.com.au"},{"name":"tuan23","email":"tuan@thinkmill.com.au"},{"name":"vitalbone","email":"bz.vito@gmail.com"}],"homepage":"https://github.com/Thinkmill/pragmatic-forms#readme","bugs":{"url":"https://github.com/Thinkmill/pragmatic-forms/issues"},"dist":{"shasum":"2e656af0d90780ba6a99cac79797304e387514d4","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-1.5.1.tgz","fileCount":13,"integrity":"sha512-yx/TwqdZwPqyNhRxqHI1drMj9cTaGDtFcnNYYjtpwrLEUoma90IIjEHNZA+WHRQTi2SuL22LGJK2qlgK5IK54A==","signatures":[{"sig":"MEQCIH2QF1vj59gHsF5fP79bnAnQzfEaEnI+sCF9bf0NGc0/AiAKRPmF8KQUaub3aOQSdAosTzJqXhSj/1lkQSiYOvKH/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3522122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfLQFCRA9TVsSAnZWagAAfkUP/07PX3CSOERcS7wUP4T5\nUKr0wnprWgFqmxPb8VzdEzQ7p1xEC2WNftajQtiehY9jcLHVE8yTf7tHZ6P6\nWE0c7Kx+/0UJ/9sLc9/xD1HH4OYztAmXkX/r721g1ZsxK4+isd4glSq65Ob1\nI6rxoxOGYPDjuCO4FoS9LLYi4LzsjG69xj5UFIoNULIoSD3eZUNIpJyp3lD3\nKyOVNA0t9QrSZLkwtVH9SuIxgQVkrkij57mt0S6N3fq/IvWhCsAUGdOfFTB6\ny9Z9XrO7X6Uc8WSJD9bt+xL7SmPTmlyX7n1dq0CzrNVD0cOd+TX8pcUBjt2t\nvIlWcOedkabvM23Aw+hnfsIbNs8cOdlMZ5nVY0N+AF7/Np9OcXX9rPOpnsNz\nk6j6yVqSGzPEht1TY8RoSUY86ww3CPjzv7oW2Fq4YOtHNdOIYNI702GCksJK\no6FoGUV5zAUrXMGkAMz4fATgG0xXShKjC5yA5S4LpI+mhDCT5+u0Il+s+u1x\nTXFgbG6YRDyL4bK/bazAbggX2ckZ4WIXqExxSVmdgp1q7AcSf5mlyv4L54EV\nxCZRMiQizU8AaNBv0EHEZ01EbwNZ6GFGtUJMr+TyHZeamVie6rFklQ466xOL\nk3EdTyo5241XqPwH4jZTEarNqHeQbxLv9pmSMl8zPZy3lqQjDb2TSxuhTP1e\nxRbq\r\n=NTvn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"setupFiles":["./tests/_setup.js"]},"main":"lib/index.js","gitHead":"ad24fb4abca9fe0a05215d4ed539b04dab5b0f79","scripts":{"lint":"eslint ./src","test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","doctoc":"doctoc README.md","prepublish":"./scripts/build.sh","build:examples":"webpack"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"repository":{"url":"git+https://github.com/Thinkmill/pragmatic-forms.git","type":"git"},"_npmVersion":"5.6.0","description":"A pragmatic approach to form handling in React","directories":{},"_nodeVersion":"9.11.2","_hasShrinkwrap":false,"devDependencies":{"jest":"22.0.3","react":"16.2.0","doctoc":"^1.3.0","enzyme":"^3.2.0","eslint":"4.13.1","webpack":"3.10.0","flow-bin":"0.61.0","babel-cli":"^6.24.1","react-dom":"16.2.0","babel-core":"^6.25.0","prop-types":"^15.5.10","babel-eslint":"8.0.3","babel-loader":"^7.1.1","react-json-view":"1.14.0","styled-components":"2.3.3","babel-preset-react":"^6.24.1","webpack-dev-server":"2.9.7","babel-preset-es2015":"^6.24.1","babel-preset-es2017":"^6.24.1","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","react-test-renderer":"^16.2.0","eslint-plugin-flowtype":"2.40.1","enzyme-adapter-react-16":"^1.1.1","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.23.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms_1.5.1_1534899205160_0.16871775651389376","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@thinkmill/pragmatic-forms","version":"2.0.0","keywords":["React","form"],"author":{"name":"Michael Hazell"},"license":"ISC","_id":"@thinkmill/pragmatic-forms@2.0.0","maintainers":[{"name":"bladey","email":"bladey@me.com"},{"name":"dominikwilkowski","email":"hi@dominik-wilkowski.com"},{"name":"gwyneplaine","email":"cc.lee@live.com.au"},{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"},{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},{"name":"molomby","email":"john@molomby.com"},{"name":"nathansimpson95","email":"hello@nathansimpson.design"},{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"schmicko","email":"mike.hazell@gmail.com"},{"name":"simonschwartz","email":"simon.schwartz0@gmail.com"},{"name":"thinkmill-deploy","email":"production@thinkmill.com"},{"name":"ticidesign","email":"ticipp@gmail.com"},{"name":"timl","email":"tim.leslie@thinkmill.com.au"},{"name":"tuan23","email":"tuan@thinkmill.com.au"}],"dist":{"shasum":"21a6228c59c8da8cfd70b6a0b9e723d700d6e2ef","tarball":"https://registry.npmjs.org/@thinkmill/pragmatic-forms/-/pragmatic-forms-2.0.0.tgz","fileCount":14,"integrity":"sha512-kexXULNqizmAL6kseeUn5VbJ5ShswnbKBBxt5FAIPgf+scR6JxSBjQP+sN8gcW5M/XvMRxUEsJ8tt6QbEDDnwA==","signatures":[{"sig":"MEUCIQD+QEW7JUy1wk9//EicPtVO3TsV8n97SxIJlMg8Wz+GZAIge+4UDmbpNS8brc2fOTFN0Q1wj1o1lS26fJzxWoz3RZ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3066514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPrYUCRA9TVsSAnZWagAAUAAP/2T5F8CuM5H1C2/N3+pm\n9vvNTtsfThzknfx5wf2oVpo+FZGRiQL78Uw+KsG7vd9jQg7xUnzd9RDiijWN\nvxSB4ovax5Vn0N3qpMN/AMSPVyvEilhxejQCntp6DoJpf+Xa7V3SgnV+LeJv\nI0rfbaFl5xnPO2oaO4pittCoTy0zs/paR4a9bliplHVKw99XBTTH38BZNmKX\nAqg4u7Jil+/G/7tchT/qo6IJFzeKrk6XVri+A6nT+J0qlZzQWGBWRXqX6FkL\nyBVP4bndOImIgwFxRDwgt2AFVLQbb8mUGgkvXEnddmpLlSgmc2+79Vf3s6eh\nSPeJjcYcrQGwjx2wnNWFbbXqptaMmiVfODc4DmNLHnQ8z9dptGlQf9CQioGZ\nDPIJNmnw9D+cNZRkGBxvLeTBrk9nk9lNrzeVIPQ87ebYvU9euftAo2cR4VcD\nuf7GB6dt701X0s/ZmW4OBlpMiDty8YrjumIw4fbru5s65btGCFO0rpU19rS4\nwSdHcU+UAg+gl+M5xnTji8ELaDnn+y0uXfYAtz7FJP2nIG5PlZHy4+BOJ/UC\nWhaz+cirnqzhaQmk60XpjVYG5/42GNPeasYwAnqgiOhNYtie5DOijXm9ePlG\neIgZvhKY4hsIulTzpStsBbFetplEAMy64/UAMQBRgzkXglUBz1F/yjiJOEo7\nWJCz\r\n=4Lap\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"setupFiles":["./tests/_setup.js"]},"main":"lib/index.js","scripts":{"lint":"eslint ./src","test":"jest","build":"./scripts/build.sh","start":"webpack-dev-server --config webpack.config.js","doctoc":"doctoc README.md","prepublish":"./scripts/build.sh","build:examples":"webpack"},"_npmUser":{"name":"schmicko","email":"mike.hazell@gmail.com"},"repository":{"url":"https://github.com/Thinkmill/pragmatic-forms.git","type":"git"},"description":"A pragmatic approach to form handling in React","directories":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","react":"^16.7.0","doctoc":"^1.3.0","enzyme":"^3.2.0","eslint":"^5.12.0","webpack":"3.10.0","flow-bin":"0.90.0","react-dom":"^16.7.0","@babel/cli":"^7.2.3","prop-types":"^15.5.10","@babel/core":"^7.2.2","babel-eslint":"^10.0.1","babel-loader":"^8.0.5","@babel/runtime":"^7.2.0","react-json-view":"1.19.1","@babel/preset-env":"^7.2.3","styled-components":"^4.1.3","@babel/preset-flow":"^7.0.0","webpack-dev-server":"2.9.7","@babel/preset-react":"^7.0.0","eslint-plugin-react":"^7.0.1","html-webpack-plugin":"^2.28.0","react-test-renderer":"^16.2.0","eslint-plugin-flowtype":"^3.2.1","enzyme-adapter-react-16":"^1.1.1","@babel/plugin-transform-runtime":"^7.2.0","@babel/plugin-proposal-class-properties":"^7.2.3","@babel/plugin-proposal-object-rest-spread":"^7.2.0"},"_npmOperationalInternal":{"tmp":"tmp/pragmatic-forms_2.0.0_1547613715617_0.7827030856650463","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-08-15T00:13:35.440Z","modified":"2026-02-25T01:25:32.944Z","1.0.0":"2017-08-15T00:13:35.440Z","1.1.0":"2017-11-22T00:52:02.496Z","1.2.0":"2017-11-22T22:48:18.704Z","1.2.2":"2017-11-29T03:28:20.843Z","1.3.0":"2017-12-14T23:27:44.755Z","1.4.0":"2018-04-19T05:14:02.857Z","1.5.0":"2018-08-07T05:36:50.584Z","1.5.1":"2018-08-22T00:53:25.321Z","2.0.0":"2019-01-16T04:41:55.767Z"},"author":{"name":"Michael Hazell"},"license":"ISC","keywords":["React","form"],"repository":{"url":"https://github.com/Thinkmill/pragmatic-forms.git","type":"git"},"description":"A pragmatic approach to form handling in React","maintainers":[{"email":"npm2025+dan@dcousens.com","name":"dcousens"},{"email":"npm@emmas.town","name":"emmatown"}],"readme":"# Pragmatic Forms\nA pragmatic approach to forms in React (Web and Native)\n\n![Build Status](https://travis-ci.org/Thinkmill/pragmatic-forms.svg?branch=master)\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n\n- [Goals](#goals)\n- [Example usage](#example-usage)\n- [The Road to release](#the-road-to-release)\n- [API Documentation](#api-documentation)\n  - [`configureForm: function(options:Object)`](#configureform-functionoptionsobject)\n    - [`initFields: Function(props):  { [fieldName: string]: any }`](#initfields-functionprops---fieldname-string-any-)\n    - [`submit: Function(formData, props, formProps): Promise`](#submit-functionformdata-props-formprops-promise)\n    - [`validate?: Function(formData, props, formProps): { [fieldName: string]: any }`](#validate-functionformdata-props-formprops--fieldname-string-any-)\n    - [`onSuccess?: Function(results, props, formProps): void`](#onsuccess-functionresults-props-formprops-void)\n    - [`onError?: Function`](#onerror-function)\n    - [`onChange?: Function(formData, props, formProps): void`](#onchange-functionformdata-props-formprops-void)\n    - [`onFirstInteraction?: Function(formData, props, formProps): void`](#onfirstinteraction-functionformdata-props-formprops-void)\n  - [The `form` Prop](#the-form-prop)\n    - [`form.isLoading: boolean`](#formisloading-boolean)\n    - [`form.isPristine: boolean`](#formispristine-boolean)\n    - [`form.submitError: any`](#formsubmiterror-any)\n    - [`form.submitResult: any`](#formsubmitresult-any)\n    - [`form.errors: { [fieldName: string]: any }`](#formerrors--fieldname-string-any-)\n    - [`form.hasErrors: boolean`](#formhaserrors-boolean)\n    - [`form.fields: Object`](#formfields-object)\n    - [`form.submit: Function(): void`](#formsubmit-function-void)\n    - [`form.reset: Function() :void`](#formreset-function-void)\n    - [`form.onSubmit: Function(event?: any) :void`](#formonsubmit-functionevent-any-void)\n    - [`form.onReset: Function(event?: any) :void`](#formonreset-functionevent-any-void)\n    - [`form.updateField: Function(name:String, value:any) :void`](#formupdatefield-functionnamestring-valueany-void)\n    - [`form.getInputProps: Function(options): InputProps`](#formgetinputprops-functionoptions-inputprops)\n      - [`options`](#options)\n      - [`InputProps`](#inputprops)\n    - [`form.getFieldProps: Function(options): FieldProps`](#formgetfieldprops-functionoptions-fieldprops)\n    - [`state` (Deprecated)](#state-deprecated)\n    - [`actions` (Deprecated)](#actions-deprecated)\n- [Reference material and prior art](#reference-material-and-prior-art)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Goals\n- be simple\n- be declarative\n- be un-magical\n- be performant\n- be just react (and modern JS)\n- work with YOUR state management system\n- work in browser and react-native\n\n# Example usage\n\n```js\nimport { configureForm } from '@thinkmill/pragmatic-forms';\n\nconst RegistrationForm = configureForm({\n\tinitFields: () => ({\n\t\tname: '',\n\t\temail: '',\n\t}),\n\tvalidate: ({ name }) => {\n\t\tconst errors = {};\n\t\tif (!name) errors.name = 'Please enter a name';\n\t\tif (!name) errors.email = 'Please enter an email';\n\t\treturn errors;\n\t},\n\tsubmit: (formData) => {\n\t\treturn fetch('/registration', {\n\t\t\tmethod: 'POST',\n\t\t\tbody: JSON.stringify(formData),\n\t\t})\n\t\t.then(res => res.json());\n\t},\n})(({ form }) => (\n\t<form.Form>\n\t\t{form.hasErrors &&\n\t\t\t<div>\n\t\t\t\t<p style={{ color: 'red' }}>Please correct the your input</p>\n\t\t\t</div>\n\t\t}\n\t\t<input {...form.getInputProps({ name: 'name', type: 'text' })} />\n\t\t<input {...form.getInputProps({ name: 'email', type: 'email' })} />\n\t\t<button\n\t\t\ttype=\"submit\"\n\t\t\tdisabled={form.hasErrors || form.isLoading}\n\t\t>\n\t\t\tSubmit\n\t\t</button>\n\t</form.Form>\n));\n```\n\n# API Documentation\n\nWhen working with `pragmatic-forms` you will be interacting with either the\n`configureForm` method or the `form` prop passed to your component.\n\n## `configureForm: function(options:Object)`\n\nThe `pragmatic-forms` module exports a single named function: `configureForm`. This method creates a configured Higher Order Component to wrap a form providing state and event handlers through a single prop named `form`.\n\n`configureForm` accepts an options object and returns a method for creating a higher order component which will wrap your form to provide state and event handlers.\n\n- `initFields: Function`\n- `submit: Function`\n- `validate?: Function`\n- `onSuccess?: Function`\n- `onReset?: Function`\n- `onError?: Function`\n- `onFirstInteraction?: Function`\n\n### `initFields: Function(props):  { [fieldName: string]: any }`\n**required**\n\nThe `initFields` method will receive props as it's only argument. This method should return an object with key/value pairs that provide the default value for each form field in your form.\n\n> Tip: This is a good place to set a default value for a field to avoid the react warning \"changing an uncontrolled input of type text to be controlled\".\n\neg.\n```js\nconst withForm = configureForm({\n\tinitFields: (props) => ({\n\t\tname: props.name || '',\n\t\temail: props.email || '',\n\t}),\n\t...\n});\n```\n\n### `submit: Function(formData, props, formProps): Promise`\n**required**\n\nThe `submit` method will be called with `formData`, `props` and `formProps` and should return a promise.\n\neg. Trigger a `graphql` mutation using `react-apollo`\n```js\nimport { graphql, gql, compose} from 'react-apollo';\nimport { configureForm } from 'pragmatic-forms';\n\nconst query = gql`\nmutation createUser (\n\t$name: String!\n\t$email: String!\n) {\n\tcreateUser (user: {\n\t\tname: $name\n\t\temail: $email\n\t})\n\t{\n\t\tid\n\t}\n}\n`;\n\nexport const MyForm = compose(\n\tgraphql(query),\n\tconfigureForm({\n\t\tinitFields: () => ({ name: '', email: '' }),\n\t\tsubmit: (formData, props) => {\n\t\t\treturn props.mutate({\n\t\t\t\tvariables: {\n\t\t\t\t\tname: formData.name,\n\t\t\t\t\temail: formData.email,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t})\n)(({ form }) => (\n\t<form onSubmit={form.onSubmit}>\n\t\t{'...'}\n\t</form>\n));\n```\n\n### `validate?: Function(formData, props, formProps): { [fieldName: string]: any }`\n_optional_\n\nThe `validate` method receives `formData`, `props` and `props` and returns a map (Object) of errors keyed by the relevant fieldName.\n\neg.\n```js\nconst withForm = configureForm({\n\tinitFields: () => ({ email: '' }),\n\tsubmit: (formData) => console.log(formData),\n\tvalidate: (formData, props) => {\n\t\tconst errors = {};\n\t\tif (!formData.email.includes('@')) {\n\t\t\terrors.email = 'Please enter a valid email address';\n\t\t}\n\t\treturn errors;\n\t},\n});\n```\n\n## Callbacks\n\nCallbacks provide a way to act on the result of an operation or event within the form. All callbacks are called with an event specific value plus the `props` passed to the form and the `formProps` object.\n\n### `onSuccess?: Function(results, props, formProps): void`\n_optional_\n\nThe `onSuccess` method is called after `submit` has **resolved**, the form state has been update and `setState` has been called.\n\nIt receives the result of the `submit` method, `props` and `formProps` as arguments.\n\n### `onError?: Function(reason, props, formProps)`\n_optional_\n\nThe `onError` method is called after `submit` has **rejected**, the form state has been update and `setState` has been called.\n\nIt receives the rejection reason of the `submit` method `props` and `formProps` as arguments.\n\n### `onReset?: Function(formData, props, formProps): void`\n_optional_\n\nThe `onReset` method is called on a form `reset` event after the form has been reinitialised, the form state has been update and `setState` has been called.\n\nIt receives the newly re-initialised `formData`, `props` and `formProps` as arguments.\n\n### `onChange?: Function(formData, props, formProps): void`\n_optional_\n\nThe `onChange` method is called after the internal `setState` is complete when any form field has fired it's `onChange` or `onValueChange` event.\n\nIt receives the complete `formData` object, `props` and `formProps` as arguments.\n\n### `onFirstInteraction?: Function(formData, props, formProps): void`\n_optional_\n\nThe `onFirstInteraction` method is called when a form fields `onChange` handler is triggered.\n\nIt receives the current `formData`, `props` and `formProps`.\n\n## The `form` Prop\n**aka `formProps`**\n\nThe `form` prop provides access to the `state` and `methods` provided by `pragmatic-forms` inside your component. The same object is also passed as the last parameter to each of the `configureForm` methods (excluding `initFields`).\n\n### `form.isLoading: boolean`\n\n`true` if the submit method has been called and the promise has not resolved or rejected. Otherwise `false`\n\n### `form.isPristine: boolean`\n\n`true` until a `change` event is triggered on one or more of the forms inputs.\n\n### `form.submitError: any`\n\n`submitError` is populated with the rejection `reason` if the form submit Promise is `rejected`.\n\n### `form.submitResult: any`\n\n`submitResult` is populated with the resolved value (if any) once the forms submit Promise has `resolved`.\n\n### `form.errors: { [fieldName: string]: any }`\n\nKey-value pairs giving the validation errors for each field by field name.\nThe `value` will be whatever was returned in the validation method.\n\n### `form.hasErrors: boolean`\n\n`true` if the validate method returned an `error` object with at least one property.\n\n### `form.fields: Object`\n\nProvides access to the form fields as they are stored internally in `pragmatic-forms`.\n\nEach field will have the following shape:\n\n```js\n[fieldName: string]: {\n\tvalue: 'field value', // :any - whatever you put in here.\n\tisDirty: false, // Boolean - has the field been modified\n\terror: 'some error', // ?String - a field level error message (provided by the `validate` method)\n}\n```\n\n### `form.submit: Function(): void`\n\nCalling `form.submit` will trigger the submit handler directly.\n\nUse cases:\n- have a form which is not wrapped in a form tag\n- trigger form submission programatically (eg. on a timer)\n\neg. Create a delete button\n\n```js\nconst withForm = configureForm({\n\tinitFields: (props) => ({ id: props.id }),\n\tsubmit: ({ id }) => {\n\t\treturn fetch(`/item/${id}`, { method: 'delete' });\n\t}\n})\n\nconst DeleteBtn = withForm(({ form }) => (\n\t<button\n\t\ttype=\"button\"\n\t\tonClick={form.submit}\n\t\tdisabled={form.isLoading}\n\t>\n\t\tDelete me\n\t</button>\n));\n```\n\n### `form.reset: Function() :void`\n\nCalling `form.reset` will reset the form to it's original state.\n\n### `form.onSubmit: Function(event?: any) :void`\n\nThe `submit` event handler. This should be passed as `onSubmit` to a `<form>` component.\n\neg.\n```js\nconst withForm = configureForm({ ... });\nconst MyForm = withForm(({ form }) => (\n\t<form onSubmit={form.onSubmit}>\n\t\t...\n\t\t<button type=\"submit\">Submit</button>\n\t</form>\n));\n```\n\n### `form.onReset: Function(event?: any) :void`\n\nThe `reset` event handler. This should be passed as `onReset` to a `<form>` component. When the `reset` event is triggered, the form will be reset to it's original state.\n\neg.\n```js\nconst withForm = configureForm({ ... });\nconst MyForm = withForm(({ form }) => (\n\t<form onReset={form.onReset}>\n\t\t...\n\t\t<button type=\"reset\">Reset</button>\n\t</form>\n));\n```\n\n### `form.updateField: Function(name:String, value:any) :void`\n\nDirectly update the value of a field by name.\n\n### `form.getInputProps: Function(options): InputProps`\n\nReturns an object with props which can be passed to an `input` component.\n\n> NOTE: For checkboxes it is important to provide the correct type. ie. 'checkbox'. This allows the onChange event handler to check the checked state of the input rather than reading the value.\n\n#### `options`\n - `name: string`\n - `type?: string` Defaults to `\"text\"`\n - `value?:any` TODO: Requires explanation.\n - `checked?: boolean` Whether a checkbox is checked. Defaults to `false`\n - `forceType?: 'string' | 'number' | 'boolean'` undefined by default.\n\nIf `forceType` is true, pragmatic-forms will attempt to maintain the primitive type of the initial value of a field. For example, if `initFields` returns a `boolean` for the field `isEnabled` and `onChange` is called with a `string` it will attempt to convert that string back to a boolean. This can be helpful when your Input component converts the value field type to a string.\n\nCurrently `forceType` supports `string`, `number` and `boolean`.\n\n#### `InputProps`\n - `disabled: boolean` `true` while the form `isLoading`\n - `name: string` whatever was provided in `options`.\n - `type: string` whatever was provided in `options`. Defaults to `text`\n - `onChange: (event) => void` a change handler\n - `checked: boolean` Only for a `checkbox` or `radio`\n - `value` Not provided for a `checkbox`.\n\n### `form.getFieldProps: Function(options): FieldProps`\n\nTakes the same options as `form.getInputProps`.\n\nIn addition to the props provided by `form.getInputProps` this method also returns props which can be used to show more information on a custom component.\n\n - `error?: string` Either a string error message or `null` if there is no error.\n - `isDirty: boolean` `true` when the field has been modified.\n - `onValueChange: (value: any) =>` a special change handler which accepts the value directly rather than via a change event.\n\n# Build and release\n\n`yarn build` will compile the code which can then be either published or `yarn link`ed if you are developing.\n\nTo release a new version of run `yarn publish`. This will run the `build` script and prompt for a new `version number`.\n\n# Reference material and prior art\n\nMany of the ideas in here are not new. This is a list of some of the places I have taken inspiration from.\n\n- https://github.com/jaredpalmer/formik\n- http://redux-form.com/\n","readmeFilename":"README.md"}