Socket
Socket
Sign inDemoInstall

react-final-form

Package Overview
Dependencies
10
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.1 to 6.3.0

27

dist/react-final-form.cjs.js

@@ -123,3 +123,4 @@ 'use strict';

var version = '6.2.0';
var version = "6.3.0";
var versions = {

@@ -215,3 +216,3 @@ 'final-form': finalForm.version,

useWhenValueChanges(destroyOnUnregister, function () {
form.setConfig('destroyOnUnregister', destroyOnUnregister);
form.destroyOnUnregister = !!destroyOnUnregister;
});

@@ -490,6 +491,11 @@ useWhenValueChanges(initialValues, function () {

var _React$useState = React.useState(function () {
var initialState = {};
var initialState = {}; // temporarily disable destroyOnUnregister
var destroyOnUnregister = form.destroyOnUnregister;
form.destroyOnUnregister = false;
register(function (state) {
initialState = state;
})();
})(); // return destroyOnUnregister to its original value
form.destroyOnUnregister = destroyOnUnregister;
return initialState;

@@ -522,3 +528,13 @@ }),

if (formatOnBlur) {
state.change(format(state.value, state.name));
/**
* Here we must fetch the value directly from Final Form because we cannot
* trust that our `state` closure has the most recent value. This is a problem
* if-and-only-if the library consumer has called `onChange()` immediately
* before calling `onBlur()`, but before the field has had a chance to receive
* the value update from Final Form.
*/
var fieldState = form.getFieldState(state.name); // this ternary is primarily to appease the Flow gods
// istanbul ignore next
state.change(format(fieldState ? fieldState.value : state.value, state.name));
}

@@ -574,2 +590,3 @@ }, // eslint-disable-next-line react-hooks/exhaustive-deps

valid: otherState.valid,
validating: otherState.validating,
visited: otherState.visited

@@ -576,0 +593,0 @@ };

@@ -116,3 +116,4 @@ import _extends from '@babel/runtime/helpers/esm/extends';

var version = '6.2.0';
var version = "6.3.0";
var versions = {

@@ -208,3 +209,3 @@ 'final-form': version$1,

useWhenValueChanges(destroyOnUnregister, function () {
form.setConfig('destroyOnUnregister', destroyOnUnregister);
form.destroyOnUnregister = !!destroyOnUnregister;
});

@@ -483,6 +484,11 @@ useWhenValueChanges(initialValues, function () {

var _React$useState = useState(function () {
var initialState = {};
var initialState = {}; // temporarily disable destroyOnUnregister
var destroyOnUnregister = form.destroyOnUnregister;
form.destroyOnUnregister = false;
register(function (state) {
initialState = state;
})();
})(); // return destroyOnUnregister to its original value
form.destroyOnUnregister = destroyOnUnregister;
return initialState;

@@ -515,3 +521,13 @@ }),

if (formatOnBlur) {
state.change(format(state.value, state.name));
/**
* Here we must fetch the value directly from Final Form because we cannot
* trust that our `state` closure has the most recent value. This is a problem
* if-and-only-if the library consumer has called `onChange()` immediately
* before calling `onBlur()`, but before the field has had a chance to receive
* the value update from Final Form.
*/
var fieldState = form.getFieldState(state.name); // this ternary is primarily to appease the Flow gods
// istanbul ignore next
state.change(format(fieldState ? fieldState.value : state.value, state.name));
}

@@ -567,2 +583,3 @@ }, // eslint-disable-next-line react-hooks/exhaustive-deps

valid: otherState.valid,
validating: otherState.validating,
visited: otherState.visited

@@ -569,0 +586,0 @@ };

@@ -152,3 +152,4 @@ (function (global, factory) {

var version = '6.2.0';
var version = "6.3.0";
var versions = {

@@ -244,3 +245,3 @@ 'final-form': finalForm.version,

useWhenValueChanges(destroyOnUnregister, function () {
form.setConfig('destroyOnUnregister', destroyOnUnregister);
form.destroyOnUnregister = !!destroyOnUnregister;
});

@@ -519,6 +520,11 @@ useWhenValueChanges(initialValues, function () {

var _React$useState = React.useState(function () {
var initialState = {};
var initialState = {}; // temporarily disable destroyOnUnregister
var destroyOnUnregister = form.destroyOnUnregister;
form.destroyOnUnregister = false;
register(function (state) {
initialState = state;
})();
})(); // return destroyOnUnregister to its original value
form.destroyOnUnregister = destroyOnUnregister;
return initialState;

@@ -551,3 +557,13 @@ }),

if (formatOnBlur) {
state.change(format(state.value, state.name));
/**
* Here we must fetch the value directly from Final Form because we cannot
* trust that our `state` closure has the most recent value. This is a problem
* if-and-only-if the library consumer has called `onChange()` immediately
* before calling `onBlur()`, but before the field has had a chance to receive
* the value update from Final Form.
*/
var fieldState = form.getFieldState(state.name); // this ternary is primarily to appease the Flow gods
// istanbul ignore next
state.change(format(fieldState ? fieldState.value : state.value, state.name));
}

@@ -603,2 +619,3 @@ }, // eslint-disable-next-line react-hooks/exhaustive-deps

valid: otherState.valid,
validating: otherState.validating,
visited: otherState.visited

@@ -605,0 +622,0 @@ };

2

dist/react-final-form.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","react","final-form"],t):t((e=e||self)["react-final-form"]={},e.React,e.FinalForm)}(this,function(e,D,O){"use strict";var E="default"in D?D.default:D;function N(){return(N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function z(e,t){if(null==e)return{};var n,r,i={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}function w(e,t){var n=e.render,r=e.children,i=e.component,u=z(e,["render","children","component"]);if(i)return D.createElement(i,N({},u,{children:r,render:n}));if(n)return n(void 0===r?u:N({},u,{children:r}));if("function"!=typeof r)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+t);return r(u)}function V(e,t,n){void 0===n&&(n=function(e,t){return e===t});var r=E.useRef(e);E.useEffect(function(){n(e,r.current)||(t(),r.current=e)})}var C=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),u=0;u<n.length;u++){var a=n[u];if(!i(a)||e[a]!==t[a])return!1}return!0},k=function(e){return!(!e||"function"!=typeof e.stopPropagation)},x=D.createContext();function U(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e}),t}var t="6.2.0",R={"final-form":O.version,"react-final-form":t},j=O.formSubscriptionItems.reduce(function(e,t){return e[t]=!0,e},{});function n(e){var t=e.debug,n=e.decorators,r=e.destroyOnUnregister,i=e.form,u=e.initialValues,a=e.initialValuesEqual,o=e.keepDirtyOnReinitialize,c=e.mutators,l=e.onSubmit,f=e.subscription,s=void 0===f?j:f,d=e.validate,v=e.validateOnBlur,m=z(e,["debug","decorators","destroyOnUnregister","form","initialValues","initialValuesEqual","keepDirtyOnReinitialize","mutators","onSubmit","subscription","validate","validateOnBlur"]),p={debug:t,destroyOnUnregister:r,initialValues:u,keepDirtyOnReinitialize:o,mutators:c,onSubmit:l,validate:d,validateOnBlur:v},b=function(e){var t=E.useRef();return t.current||(t.current=e()),t.current}(function(){var e=i||O.createForm(p);return e.pauseValidation(),e}),y=D.useState(function(){var t={};return b.subscribe(function(e){t=e},s)(),t}),g=y[0],h=y[1],S=U(g);D.useEffect(function(){b.isValidationPaused()&&b.resumeValidation();var e=[b.subscribe(function(e){C(e,S.current)||h(e)},s)].concat(n?n.map(function(e){return e(b)}):[]);return function(){e.forEach(function(e){return e()})}},[n]),V(t,function(){b.setConfig("debug",t)}),V(r,function(){b.setConfig("destroyOnUnregister",r)}),V(u,function(){b.setConfig("initialValues",u)},a||C),V(o,function(){b.setConfig("keepDirtyOnReinitialize",o)}),V(c,function(){b.setConfig("mutators",c)}),V(l,function(){b.setConfig("onSubmit",l)}),V(d,function(){b.setConfig("validate",d)}),V(v,function(){b.setConfig("validateOnBlur",v)});var F=N({},g,{form:N({},b,{reset:function(e){k(e)?b.reset():b.reset(e)}}),handleSubmit:function(e){return e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),b.submit()}});return D.createElement(x.Provider,{value:b},w(N({},m,F,{__versions:R}),"ReactFinalForm"))}function _(e){var t=D.useContext(x);if(!t)throw new Error((e||"useForm")+" must be used inside of a <Form> component");return t}function a(e){var t=void 0===e?{}:e,n=t.onChange,r=t.subscription,i=void 0===r?j:r,u=_("useFormState"),a=D.useRef(!0),o=D.useState(function(){var t={};return u.subscribe(function(e){t=e},i)(),n&&n(t),t}),c=o[0],l=o[1];return D.useEffect(function(){return u.subscribe(function(e){a.current?a.current=!1:(l(e),n&&n(e))},i)},[]),c}function r(e){var t=e.onChange,n=e.subscription,r=z(e,["onChange","subscription"]),i=_("FormSpy"),u=a({onChange:t,subscription:n});return t?null:w(N({},r,u,{form:N({},i,{reset:function(e){k(e)?i.reset():i.reset(e)}})}),"FormSpy")}function I(e,t){return void 0===e?"":e}function L(e,t){return""===e?void 0:e}var M="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,T=O.fieldSubscriptionItems.reduce(function(e,t){return e[t]=!0,e},{});function F(n,e){function r(e){return E.registerField(n,e,g,{afterSubmit:i,beforeSubmit:function(){return V.current()},defaultValue:c,getValidator:function(){return w.current},initialValue:d,isEqual:v,validateFields:F})}var t=void 0===e?{}:e,i=t.afterSubmit,u=t.allowNull,a=t.beforeSubmit,o=t.component,c=t.defaultValue,l=t.format,f=void 0===l?I:l,s=t.formatOnBlur,d=t.initialValue,v=t.isEqual,m=t.multiple,p=t.parse,b=void 0===p?L:p,y=t.subscription,g=void 0===y?T:y,h=t.type,S=t.validate,F=t.validateFields,O=t.value,E=_("useField"),w=U(S),V=U(function(){if(s){var e=f(x.value,x.name);e!==x.value&&x.change(e)}return a&&a()}),C=D.useRef(!0),k=D.useState(function(){var t={};return r(function(e){t=e})(),t}),x=k[0],R=k[1];D.useEffect(function(){return r(function(e){C.current?C.current=!1:R(e)})},[n,c,d,v]);var j={onBlur:D.useCallback(function(e){x.blur(),s&&x.change(f(x.value,x.name))},[x.name,x.value,f,s]),onChange:D.useCallback(function(e){var t=e&&e.target?function(e,t,n,r){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&e.nativeEvent)return e.nativeEvent.text;var i=e.target,u=i.type,a=i.value,o=i.checked;switch(u){case"checkbox":if(void 0===n)return!!o;if(o)return Array.isArray(t)?t.concat(n):[n];if(!Array.isArray(t))return t;var c=t.indexOf(n);return c<0?t:t.slice(0,c).concat(t.slice(c+1));case"select-multiple":return function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options);default:return a}}(e,x.value,O,M):e;x.change(b(t,n))},[O,n,b,x.change,x.value,h]),onFocus:D.useCallback(function(e){x.focus()},[])},q=(x.blur,x.change,x.focus,x.value),B=(x.name,z(x,["blur","change","focus","value","name"])),P={active:B.active,data:B.data,dirty:B.dirty,dirtySinceLastSubmit:B.dirtySinceLastSubmit,error:B.error,initial:B.initial,invalid:B.invalid,length:B.length,modified:B.modified,pristine:B.pristine,submitError:B.submitError,submitFailed:B.submitFailed,submitSucceeded:B.submitSucceeded,submitting:B.submitting,touched:B.touched,valid:B.valid,visited:B.visited};s?"input"===o&&(q=I(q)):q=f(q,n),null!==q||u||(q="");var A=N({name:n,value:q,type:h},j);return"checkbox"===h?void 0===O?A.checked=!!q:(A.checked=!(!Array.isArray(q)||!~q.indexOf(O)),A.value=O):"radio"===h?(A.checked=q===O,A.value=O):"select"===o&&m&&(A.value=A.value||[],A.multiple=!0),{input:A,meta:P}}e.Field=function(e){var t=e.afterSubmit,n=e.allowNull,r=e.beforeSubmit,i=e.children,u=e.component,a=e.defaultValue,o=e.format,c=e.formatOnBlur,l=e.initialValue,f=e.isEqual,s=e.multiple,d=e.name,v=e.parse,m=e.subscription,p=e.type,b=e.validate,y=e.validateFields,g=e.value,h=z(e,["afterSubmit","allowNull","beforeSubmit","children","component","defaultValue","format","formatOnBlur","initialValue","isEqual","multiple","name","parse","subscription","type","validate","validateFields","value"]),S=F(d,{afterSubmit:t,allowNull:n,beforeSubmit:r,children:i,component:u,defaultValue:a,format:o,formatOnBlur:c,initialValue:l,isEqual:f,multiple:s,parse:v,subscription:m,type:p,validate:b,validateFields:y,value:g});return"function"==typeof i?i(N({},S,h)):"string"==typeof u?D.createElement(u,N({},S.input,{children:i},h)):w(N({},S,{children:i,component:u},h),"Field("+d+")")},e.Form=n,e.FormSpy=r,e.useField=F,e.useForm=_,e.useFormState=a,e.version=t,e.withTypes=function(){return{Form:n,FormSpy:r}},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","react","final-form"],t):t((e=e||self)["react-final-form"]={},e.React,e.FinalForm)}(this,function(e,A,F){"use strict";var E="default"in A?A.default:A;function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t){if(null==e)return{};var n,r,i={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}function w(e,t){var n=e.render,r=e.children,i=e.component,u=N(e,["render","children","component"]);if(i)return A.createElement(i,D({},u,{children:r,render:n}));if(n)return n(void 0===r?u:D({},u,{children:r}));if("function"!=typeof r)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+t);return r(u)}function V(e,t,n){void 0===n&&(n=function(e,t){return e===t});var r=E.useRef(e);E.useEffect(function(){n(e,r.current)||(t(),r.current=e)})}var C=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),u=0;u<n.length;u++){var a=n[u];if(!i(a)||e[a]!==t[a])return!1}return!0},k=function(e){return!(!e||"function"!=typeof e.stopPropagation)},x=A.createContext();function z(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e}),t}var t="6.3.0",R={"final-form":F.version,"react-final-form":t},j=F.formSubscriptionItems.reduce(function(e,t){return e[t]=!0,e},{});function n(e){var t=e.debug,n=e.decorators,r=e.destroyOnUnregister,i=e.form,u=e.initialValues,a=e.initialValuesEqual,o=e.keepDirtyOnReinitialize,l=e.mutators,c=e.onSubmit,f=e.subscription,s=void 0===f?j:f,d=e.validate,v=e.validateOnBlur,m=N(e,["debug","decorators","destroyOnUnregister","form","initialValues","initialValuesEqual","keepDirtyOnReinitialize","mutators","onSubmit","subscription","validate","validateOnBlur"]),p={debug:t,destroyOnUnregister:r,initialValues:u,keepDirtyOnReinitialize:o,mutators:l,onSubmit:c,validate:d,validateOnBlur:v},b=function(e){var t=E.useRef();return t.current||(t.current=e()),t.current}(function(){var e=i||F.createForm(p);return e.pauseValidation(),e}),g=A.useState(function(){var t={};return b.subscribe(function(e){t=e},s)(),t}),y=g[0],h=g[1],S=z(y);A.useEffect(function(){b.isValidationPaused()&&b.resumeValidation();var e=[b.subscribe(function(e){C(e,S.current)||h(e)},s)].concat(n?n.map(function(e){return e(b)}):[]);return function(){e.forEach(function(e){return e()})}},[n]),V(t,function(){b.setConfig("debug",t)}),V(r,function(){b.destroyOnUnregister=!!r}),V(u,function(){b.setConfig("initialValues",u)},a||C),V(o,function(){b.setConfig("keepDirtyOnReinitialize",o)}),V(l,function(){b.setConfig("mutators",l)}),V(c,function(){b.setConfig("onSubmit",c)}),V(d,function(){b.setConfig("validate",d)}),V(v,function(){b.setConfig("validateOnBlur",v)});var O=D({},y,{form:D({},b,{reset:function(e){k(e)?b.reset():b.reset(e)}}),handleSubmit:function(e){return e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),b.submit()}});return A.createElement(x.Provider,{value:b},w(D({},m,O,{__versions:R}),"ReactFinalForm"))}function _(e){var t=A.useContext(x);if(!t)throw new Error((e||"useForm")+" must be used inside of a <Form> component");return t}function a(e){var t=void 0===e?{}:e,n=t.onChange,r=t.subscription,i=void 0===r?j:r,u=_("useFormState"),a=A.useRef(!0),o=A.useState(function(){var t={};return u.subscribe(function(e){t=e},i)(),n&&n(t),t}),l=o[0],c=o[1];return A.useEffect(function(){return u.subscribe(function(e){a.current?a.current=!1:(c(e),n&&n(e))},i)},[]),l}function r(e){var t=e.onChange,n=e.subscription,r=N(e,["onChange","subscription"]),i=_("FormSpy"),u=a({onChange:t,subscription:n});return t?null:w(D({},r,u,{form:D({},i,{reset:function(e){k(e)?i.reset():i.reset(e)}})}),"FormSpy")}function I(e,t){return void 0===e?"":e}function L(e,t){return""===e?void 0:e}var M="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,T=F.fieldSubscriptionItems.reduce(function(e,t){return e[t]=!0,e},{});function O(n,e){function r(e){return E.registerField(n,e,y,{afterSubmit:i,beforeSubmit:function(){return V.current()},defaultValue:l,getValidator:function(){return w.current},initialValue:d,isEqual:v,validateFields:O})}var t=void 0===e?{}:e,i=t.afterSubmit,u=t.allowNull,a=t.beforeSubmit,o=t.component,l=t.defaultValue,c=t.format,f=void 0===c?I:c,s=t.formatOnBlur,d=t.initialValue,v=t.isEqual,m=t.multiple,p=t.parse,b=void 0===p?L:p,g=t.subscription,y=void 0===g?T:g,h=t.type,S=t.validate,O=t.validateFields,F=t.value,E=_("useField"),w=z(S),V=z(function(){if(s){var e=f(x.value,x.name);e!==x.value&&x.change(e)}return a&&a()}),C=A.useRef(!0),k=A.useState(function(){var t={},e=E.destroyOnUnregister;return E.destroyOnUnregister=!1,r(function(e){t=e})(),E.destroyOnUnregister=e,t}),x=k[0],R=k[1];A.useEffect(function(){return r(function(e){C.current?C.current=!1:R(e)})},[n,l,d,v]);var j={onBlur:A.useCallback(function(e){if(x.blur(),s){var t=E.getFieldState(x.name);x.change(f(t?t.value:x.value,x.name))}},[x.name,x.value,f,s]),onChange:A.useCallback(function(e){var t=e&&e.target?function(e,t,n,r){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&e.nativeEvent)return e.nativeEvent.text;var i=e.target,u=i.type,a=i.value,o=i.checked;switch(u){case"checkbox":if(void 0===n)return!!o;if(o)return Array.isArray(t)?t.concat(n):[n];if(!Array.isArray(t))return t;var l=t.indexOf(n);return l<0?t:t.slice(0,l).concat(t.slice(l+1));case"select-multiple":return function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options);default:return a}}(e,x.value,F,M):e;x.change(b(t,n))},[F,n,b,x.change,x.value,h]),onFocus:A.useCallback(function(e){x.focus()},[])},q=(x.blur,x.change,x.focus,x.value),B=(x.name,N(x,["blur","change","focus","value","name"])),P={active:B.active,data:B.data,dirty:B.dirty,dirtySinceLastSubmit:B.dirtySinceLastSubmit,error:B.error,initial:B.initial,invalid:B.invalid,length:B.length,modified:B.modified,pristine:B.pristine,submitError:B.submitError,submitFailed:B.submitFailed,submitSucceeded:B.submitSucceeded,submitting:B.submitting,touched:B.touched,valid:B.valid,validating:B.validating,visited:B.visited};s?"input"===o&&(q=I(q)):q=f(q,n),null!==q||u||(q="");var U=D({name:n,value:q,type:h},j);return"checkbox"===h?void 0===F?U.checked=!!q:(U.checked=!(!Array.isArray(q)||!~q.indexOf(F)),U.value=F):"radio"===h?(U.checked=q===F,U.value=F):"select"===o&&m&&(U.value=U.value||[],U.multiple=!0),{input:U,meta:P}}e.Field=function(e){var t=e.afterSubmit,n=e.allowNull,r=e.beforeSubmit,i=e.children,u=e.component,a=e.defaultValue,o=e.format,l=e.formatOnBlur,c=e.initialValue,f=e.isEqual,s=e.multiple,d=e.name,v=e.parse,m=e.subscription,p=e.type,b=e.validate,g=e.validateFields,y=e.value,h=N(e,["afterSubmit","allowNull","beforeSubmit","children","component","defaultValue","format","formatOnBlur","initialValue","isEqual","multiple","name","parse","subscription","type","validate","validateFields","value"]),S=O(d,{afterSubmit:t,allowNull:n,beforeSubmit:r,children:i,component:u,defaultValue:a,format:o,formatOnBlur:l,initialValue:c,isEqual:f,multiple:s,parse:v,subscription:m,type:p,validate:b,validateFields:g,value:y});return"function"==typeof i?i(D({},S,h)):"string"==typeof u?A.createElement(u,D({},S.input,{children:i},h)):w(D({},S,{children:i,component:u},h),"Field("+d+")")},e.Form=n,e.FormSpy=r,e.useField=O,e.useForm=_,e.useFormState=a,e.version=t,e.withTypes=function(){return{Form:n,FormSpy:r}},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=react-final-form.umd.min.js.map
{
"name": "react-final-form",
"version": "6.2.1",
"version": "6.3.0",
"description": "🏁 High performance subscription-based form state management for React",

@@ -65,3 +65,3 @@ "main": "dist/react-final-form.cjs.js",

"fast-deep-equal": "^2.0.1",
"final-form": "^4.15.0",
"final-form": "^4.16.1",
"flow-bin": "^0.98.1",

@@ -84,2 +84,3 @@ "glow": "^1.2.2",

"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.2",

@@ -93,3 +94,3 @@ "rollup-plugin-replace": "^2.2.0",

"peerDependencies": {
"final-form": "^4.15.0",
"final-form": "^4.16.1",
"react": "^16.8.0"

@@ -96,0 +97,0 @@ },

@@ -132,2 +132,3 @@ # 🏁 React Final Form

- [💥 Performance Optimization Through Subscriptions 💥](#-performance-optimization-through-subscriptions-)
- [Strongly Typed Form and Field Values with TypeScript](#strongly-typed-form-and-field-values-with-typescript)
- [Independent Error Component (with Render Props)](#independent-error-component-with-render-props)

@@ -322,2 +323,6 @@ - [Independent Error Component (with Hooks)](#independent-error-component-with-hooks)

### [Strongly Typed Form and Field Values with TypeScript](https://codesandbox.io/s/strongly-typed-form-values-with-react-final-form-26jkd)
Demonstrates how to use JSX generics to strongly type fields, forcing only a component that can accept the type for that field.
### [Independent Error Component (with Render Props)](https://codesandbox.io/s/xoo3xq654p)

@@ -705,2 +710,6 @@

#### `meta.validating?: boolean`
[See the 🏁 Final Form docs on `validating`](https://github.com/final-form/final-form#validating-boolean).
#### `meta.visited?: boolean`

@@ -793,3 +802,3 @@

#### `handleSubmit: (?SyntheticEvent<HTMLFormElement>) => void`
#### `handleSubmit: (?SyntheticEvent<HTMLFormElement>) => ?Promise<?Object>`

@@ -796,0 +805,0 @@ A function intended for you to give directly to the `<form>` tag: `<form onSubmit={handleSubmit}/>`.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc