{"_id":"@emekalites/react-final-form-listeners","_rev":"2-357aa60ad642946c86ce925d213b14b5","name":"@emekalites/react-final-form-listeners","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@emekalites/react-final-form-listeners","version":"1.0.0","description":"A collection of components to listen to 🏁 React Final Form fields","main":"dist/react-final-form-listeners.cjs.js","jsnext:main":"dist/react-final-form-listeners.es.js","module":"dist/react-final-form-listeners.es.js","sideEffects":false,"scripts":{"start":"nps","test":"nps test","precommit":"lint-staged && npm start validate"},"author":{"name":"Erik Rasmussen","email":"rasmussenerik@gmail.com","url":"http://github.com/erikras"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emekalites/react-final-form-listeners.git"},"bugs":{"url":"https://github.com/emekalites/react-final-form-listeners/issues"},"homepage":"https://github.com/emekalites/react-final-form-listeners#readme","dependencies":{"@babel/runtime":"^7.23.6"},"devDependencies":{"@babel/core":"^7.23.6","@babel/plugin-external-helpers":"^7.23.3","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-decorators":"^7.23.6","@babel/plugin-proposal-export-namespace-from":"^7.18.9","@babel/plugin-proposal-function-sent":"^7.23.3","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-numeric-separator":"^7.18.6","@babel/plugin-proposal-throw-expressions":"^7.23.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-flow-strip-types":"^7.23.3","@babel/plugin-transform-runtime":"^7.23.6","@babel/preset-env":"^7.23.6","@babel/preset-flow":"^7.23.3","@babel/preset-react":"^7.23.3","@testing-library/react":"^14.1.2","babel-core":"^6.26.3","babel-eslint":"^10.1.0","babel-jest":"^29.7.0","bundlesize":"^0.18.1","doctoc":"^2.2.1","eslint":"^8.55.0","eslint-config-react-app":"^7.0.1","eslint-plugin-babel":"^5.3.1","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","final-form":"^4.20.10","flow-bin":"^0.63.1","glow":"^1.2.2","husky":"^8.0.3","jest":"^29.7.0","lint-staged":"^15.2.0","nps":"^5.10.0","nps-utils":"^1.7.0","prettier":"^3.1.1","prettier-eslint-cli":"^8.0.1","prop-types":"^15.8.1","raf":"^3.4.1","react":"^18.2.0","react-dom":"^18.2.0","react-final-form":"^6.5.9","rollup":"^1.32.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-flow":"^1.1.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.4"},"peerDependencies":{"final-form":">=4.0.0","prop-types":"^15.8.1","react":"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0","react-final-form":">=3.0.0"},"jest":{"setupFiles":["raf/polyfill"]},"lint-staged":{"*.{js*,ts*,json,md,css}":["prettier --write","git add"]},"bundlesize":[{"path":"dist/react-final-form-listeners.umd.min.js","threshold":"2kB"},{"path":"dist/react-final-form-listeners.es.js","threshold":"3kB"},{"path":"dist/react-final-form-listeners.cjs.js","threshold":"3kB"}],"collective":{"type":"opencollective","url":"https://opencollective.com/final-form"},"gitHead":"0da4bb98f3d9632f7cb84e4128dae08dff893bde","_id":"@emekalites/react-final-form-listeners@1.0.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-PCN4y1lAO6KEW8dro9zsKkgxTOXPHWE4+IauHNlGoWb9xMxFxF9r/HGXG8OJPyKpQKnb7MRQ+ZWyJyYS0vSDTg==","shasum":"e23987413bc2c42c51dbe98bbf45da6ad7f9b06f","tarball":"https://registry.npmjs.org/@emekalites/react-final-form-listeners/-/react-final-form-listeners-1.0.0.tgz","fileCount":3,"unpackedSize":8655,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw4Q4F++tbMyl4mT2kW9dhaKXHX7kXg5cocMNQt/0zXQIhANNMQXZZtSSR8LO34C3W+qH8kyh84EYSj+VJUZgmIU/u"}]},"_npmUser":{"name":"emekalites","email":"caihedoro@gmail.com"},"directories":{},"maintainers":[{"name":"emekalites","email":"caihedoro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-final-form-listeners_1.0.0_1702643236447_0.37668753978601344"},"_hasShrinkwrap":false},"1.0.1":{"name":"@emekalites/react-final-form-listeners","version":"1.0.1","description":"A collection of components to listen to 🏁 React Final Form fields","main":"dist/react-final-form-listeners.cjs.js","jsnext:main":"dist/react-final-form-listeners.es.js","module":"dist/react-final-form-listeners.es.js","sideEffects":false,"scripts":{"start":"nps","test":"nps test","precommit":"lint-staged && npm start validate"},"author":{"name":"Erik Rasmussen","email":"rasmussenerik@gmail.com","url":"http://github.com/erikras"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emekalites/react-final-form-listeners.git"},"bugs":{"url":"https://github.com/emekalites/react-final-form-listeners/issues"},"homepage":"https://github.com/emekalites/react-final-form-listeners#readme","dependencies":{"@babel/runtime":"^7.23.6"},"devDependencies":{"@babel/core":"^7.23.6","@babel/plugin-external-helpers":"^7.23.3","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-decorators":"^7.23.6","@babel/plugin-proposal-export-namespace-from":"^7.18.9","@babel/plugin-proposal-function-sent":"^7.23.3","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-numeric-separator":"^7.18.6","@babel/plugin-proposal-throw-expressions":"^7.23.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-flow-strip-types":"^7.23.3","@babel/plugin-transform-runtime":"^7.23.6","@babel/preset-env":"^7.23.6","@babel/preset-flow":"^7.23.3","@babel/preset-react":"^7.23.3","@testing-library/react":"^14.1.2","babel-core":"^6.26.3","babel-eslint":"^10.1.0","babel-jest":"^29.7.0","bundlesize":"^0.18.1","doctoc":"^2.2.1","eslint":"^8.55.0","eslint-config-react-app":"^7.0.1","eslint-plugin-babel":"^5.3.1","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","final-form":"^4.20.10","flow-bin":"^0.63.1","glow":"^1.2.2","husky":"^8.0.3","jest":"^29.7.0","lint-staged":"^15.2.0","nps":"^5.10.0","nps-utils":"^1.7.0","prettier":"^3.1.1","prettier-eslint-cli":"^8.0.1","prop-types":"^15.8.1","raf":"^3.4.1","react":"^18.2.0","react-dom":"^18.2.0","react-final-form":"^6.5.9","rollup":"^1.32.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-flow":"^1.1.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.4"},"peerDependencies":{"final-form":">=4.0.0","prop-types":"^15.8.1","react":"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0","react-final-form":">=3.0.0"},"jest":{"setupFiles":["raf/polyfill"]},"lint-staged":{"*.{js*,ts*,json,md,css}":["prettier --write","git add"]},"bundlesize":[{"path":"dist/react-final-form-listeners.umd.min.js","threshold":"2kB"},{"path":"dist/react-final-form-listeners.es.js","threshold":"3kB"},{"path":"dist/react-final-form-listeners.cjs.js","threshold":"3kB"}],"collective":{"type":"opencollective","url":"https://opencollective.com/final-form"},"gitHead":"0da4bb98f3d9632f7cb84e4128dae08dff893bde","_id":"@emekalites/react-final-form-listeners@1.0.1","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-898DMeUN8bMVs/GAAhhOy2VBW0HWaS1uq3EAaTpFh3b301G4fDr+i1W2IQm5H5A4XjoP/tp4fsLEpO+WQubNMQ==","shasum":"766c0c3229dd8290dc560a7020c75c42cdcf6931","tarball":"https://registry.npmjs.org/@emekalites/react-final-form-listeners/-/react-final-form-listeners-1.0.1.tgz","fileCount":13,"unpackedSize":31625,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYtmmR/2UoPPI8I1V8fF6hZfe5XuUMlpZxQOBYzzni4wIhALZJUft4cylsS1hQI4fOHmEGOqQDCaMx8H9eW6G6Z9bf"}]},"_npmUser":{"name":"emekalites","email":"caihedoro@gmail.com"},"directories":{},"maintainers":[{"name":"emekalites","email":"caihedoro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-final-form-listeners_1.0.1_1702643563490_0.5176606213056656"},"_hasShrinkwrap":false},"1.0.2":{"name":"@emekalites/react-final-form-listeners","version":"1.0.2","description":"A collection of components to listen to 🏁 React Final Form fields","main":"dist/react-final-form-listeners.cjs.js","jsnext:main":"dist/react-final-form-listeners.es.js","module":"dist/react-final-form-listeners.es.js","sideEffects":false,"scripts":{"start":"nps","test":"nps test","precommit":"lint-staged && npm start validate"},"author":{"name":"Erik Rasmussen","email":"rasmussenerik@gmail.com","url":"http://github.com/erikras"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emekalites/react-final-form-listeners.git"},"bugs":{"url":"https://github.com/emekalites/react-final-form-listeners/issues"},"homepage":"https://github.com/emekalites/react-final-form-listeners#readme","dependencies":{"@babel/runtime":"^7.23.6"},"devDependencies":{"@babel/core":"^7.23.6","@babel/plugin-external-helpers":"^7.23.3","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-decorators":"^7.23.6","@babel/plugin-proposal-export-namespace-from":"^7.18.9","@babel/plugin-proposal-function-sent":"^7.23.3","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-numeric-separator":"^7.18.6","@babel/plugin-proposal-throw-expressions":"^7.23.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-flow-strip-types":"^7.23.3","@babel/plugin-transform-runtime":"^7.23.6","@babel/preset-env":"^7.23.6","@babel/preset-flow":"^7.23.3","@babel/preset-react":"^7.23.3","@testing-library/react":"^14.1.2","babel-core":"^6.26.3","babel-eslint":"^10.1.0","babel-jest":"^29.7.0","bundlesize":"^0.18.1","doctoc":"^2.2.1","eslint":"^8.55.0","eslint-config-react-app":"^7.0.1","eslint-plugin-babel":"^5.3.1","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.29.1","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","final-form":"^4.20.10","flow-bin":"^0.63.1","glow":"^1.2.2","husky":"^8.0.3","jest":"^29.7.0","lint-staged":"^15.2.0","nps":"^5.10.0","nps-utils":"^1.7.0","prettier":"^3.1.1","prettier-eslint-cli":"^8.0.1","prop-types":"^15.8.1","raf":"^3.4.1","react":"^18.2.0","react-dom":"^18.2.0","react-final-form":"^6.5.9","rollup":"^1.32.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-flow":"^1.1.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.4"},"peerDependencies":{"final-form":">=4.0.0","prop-types":"^15.8.1","react":"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0","react-final-form":">=3.0.0"},"jest":{"setupFiles":["raf/polyfill"]},"lint-staged":{"*.{js*,ts*,json,md,css}":["prettier --write","git add"]},"bundlesize":[{"path":"dist/react-final-form-listeners.umd.min.js","threshold":"2kB"},{"path":"dist/react-final-form-listeners.es.js","threshold":"3kB"},{"path":"dist/react-final-form-listeners.cjs.js","threshold":"3kB"}],"collective":{"type":"opencollective","url":"https://opencollective.com/final-form"},"gitHead":"1f31f2cecf2f80497142a393d90dd91d2a8decc0","_id":"@emekalites/react-final-form-listeners@1.0.2","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-XPQ4EwAhJox2fx+RpTUWdwHnY11O8xl4aMKTIv9UsGxLFnLfGUgUrleRVzjFoGXrl70hzdH3U7+aBSJIZXks5Q==","shasum":"7ea686263a80fc39bb5a8ccfb08100359879ae28","tarball":"https://registry.npmjs.org/@emekalites/react-final-form-listeners/-/react-final-form-listeners-1.0.2.tgz","fileCount":13,"unpackedSize":31673,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE6ClelnSxNKrkeXQGQtcRlx44ymgXLU11rZRBIzXyVBAiEAvDKqrttEGuNXQWBKNhGacncodTYlrTUDpAlN110j7Wk="}]},"_npmUser":{"name":"emekalites","email":"caihedoro@gmail.com"},"directories":{},"maintainers":[{"name":"emekalites","email":"caihedoro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-final-form-listeners_1.0.2_1702644204480_0.1503344960637374"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-15T12:27:16.331Z","1.0.0":"2023-12-15T12:27:16.604Z","modified":"2023-12-15T12:43:25.049Z","1.0.1":"2023-12-15T12:32:43.693Z","1.0.2":"2023-12-15T12:43:24.861Z"},"maintainers":[{"name":"emekalites","email":"caihedoro@gmail.com"}],"description":"A collection of components to listen to 🏁 React Final Form fields","homepage":"https://github.com/emekalites/react-final-form-listeners#readme","repository":{"type":"git","url":"git+https://github.com/emekalites/react-final-form-listeners.git"},"author":{"name":"Erik Rasmussen","email":"rasmussenerik@gmail.com","url":"http://github.com/erikras"},"bugs":{"url":"https://github.com/emekalites/react-final-form-listeners/issues"},"license":"MIT","readme":"# 🏁 React Final Form Listeners\n\n[![NPM Version](https://img.shields.io/npm/v/react-final-form-listeners.svg?style=flat)](https://www.npmjs.com/package/react-final-form-listeners)\n[![NPM Downloads](https://img.shields.io/npm/dm/react-final-form-listeners.svg?style=flat)](https://www.npmjs.com/package/react-final-form-listeners)\n[![Build Status](https://travis-ci.org/final-form/react-final-form-listeners.svg?branch=master)](https://travis-ci.org/final-form/react-final-form-listeners)\n[![codecov.io](https://codecov.io/gh/final-form/react-final-form-listeners/branch/master/graph/badge.svg)](https://codecov.io/gh/final-form/react-final-form-listeners)\n\n---\n\n🏁 React Final Form Listeners is a collection of useful components for listening to fields in a [🏁 React Final Form](https://github.com/final-form/react-final-form#-react-final-form).\n\n## Installation\n\n```bash\nnpm install --save @emekalites/react-final-form-listeners react-final-form final-form\n```\n\nor\n\n```bash\nyarn add @emekalites/react-final-form-listeners react-final-form final-form\n```\n\n## Usage\n\n```jsx\nimport { Form, Field } from 'react-final-form'\nimport { OnChange } from '@emekalites/react-final-form-listeners'\n\nconst MyForm = () => (\n  <Form\n    onSubmit={onSubmit}\n    render={({ handleSubmit, pristine, invalid }) => (\n      <form onSubmit={handleSubmit}>\n        <div>\n          <label>\n            <Field name=\"foo\" component=\"input\" type=\"checkbox\" /> Turn foo on?\n          </label>\n          <OnChange name=\"foo\">\n            {(value, previous) => {\n              // do something\n            }}\n          </OnChange>\n        </div>\n        ...\n      </form>\n    )}\n  />\n)\n```\n\n## Table of Contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n* [Components](#components)\n  * [`ExternallyChanged`](#externallychanged)\n    * [`name : String`](#name--string)\n    * [`children: (externallyChanged: boolean) => React.Node`](#children-externallychanged-boolean--reactnode)\n  * [`OnBlur`](#onblur)\n    * [`name : String`](#name--string-1)\n    * [`children: () => void`](#children---void)\n  * [`OnChange`](#onchange)\n    * [`name : String`](#name--string-2)\n    * [`children: (value: any, previous: any) => void`](#children-value-any-previous-any--void)\n  * [`OnFocus`](#onfocus)\n    * [`name : String`](#name--string-3)\n    * [`children: () => void`](#children---void-1)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Components\n\nThe following can be imported from `@emekalites/react-final-form-listeners`.\n\n### `ExternallyChanged`\n\nRenders is render prop with a `boolean` flag when the specified field was last updated externally (changed while not active).\n\n#### `name : String`\n\nThe name of the field to listen to.\n\n#### `children: (externallyChanged: boolean) => React.Node`\n\nA render prop given the boolean flag.\n\n### `OnChange`\n\nCalls its `children` callback whenever the specified field changes. It renders nothing.\n\n#### `name : String`\n\nThe name of the field to listen to.\n\n#### `children: (value: any, previous: any) => void`\n\nA function that will be called whenever the specified field is changed. It is passed the new value and the previous value.\n\n### `OnFocus`\n\nCalls its `children` callback whenever the specified field becomes active. It renders nothing.\n\n#### `name : String`\n\nThe name of the field to listen to.\n\n#### `children: () => void`\n\nA function that will be called whenever the specified field is changed. It is passed the new value and the previous value.\n\n### `OnBlur`\n\nCalls its `children` callback whenever the specified field is blurred. It renders nothing.\n\n#### `name : String`\n\nThe name of the field to listen to.\n\n#### `children: () => void`\n\nA function that will be called whenever the specified field is blurred.\n","readmeFilename":"README.md"}