@unform/core
Advanced tools
Comparing version 1.9.7 to 1.9.8
@@ -15,3 +15,3 @@ import r,{createContext as t,useContext as e,useEffect as n,forwardRef as o,useState as i,useCallback as u,useImperativeHandle as a}from"react";import c from"dot-object";var f=t({});function l(r){var t=e(f),o=t.initialData,i=t.errors,u=t.scopePath,a=t.unregisterField,l=t.registerField,s=u?u+"."+r:r;n((function(){return function(){return a(s)}}),[s,a]);var p=c.pick(s,o),v=i[s];return{fieldName:s,registerField:l,defaultValue:p,error:v}} | ||
and limitations under the License. | ||
***************************************************************************** */var s=function(){return(s=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}).apply(this,arguments)};function p(r,t){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(r,u)}catch(r){i=[6,r],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var v=o((function(t,e){var n=t.initialData,o=void 0===n?{}:n,l=t.children,v=t.onSubmit,h=i({}),d=h[0],b=h[1],y=i([]),g=y[0],m=y[1],w=u((function(r){return g.find((function(t){return t.name===r}))}),[g]),F=u((function(r){var t=r.ref,e=r.path,n=r.getValue;return n?n(t):c.pick(e,t)}),[]),O=u((function(r,t){var e=r.path,n=r.ref,o=r.setValue;return o?o(n,t):c.set(e,t,n)}),[]),P=u((function(r){var t=r.clearValue,e=r.ref,n=r.path;return t?t(e,""):c.set(n,"",e)}),[]),E=u((function(r){void 0===r&&(r={}),g.forEach((function(t){var e=t.name,n=t.ref,o=t.path,i=t.clearValue;return i?i(n,r[e]):c.set(o,r[e]?r[e]:"",n)}))}),[g]),j=u((function(r){var t=c.dot(r);Object.entries(t).forEach((function(r){var t=r[0],e=r[1],n=w(t);n&&O(n,e)}))}),[w,O]),x=u((function(r){var t=c.dot(r);b(t)}),[d]),V=u((function(){var r={};return g.forEach((function(t){r[t.name]=F(t)})),c.object(r),r}),[g,F]),k=u((function(r){return t=void 0,e=void 0,o=function(){var t;return p(this,(function(e){return r&&r.preventDefault(),t=V(),v(t,{reset:E}),[2]}))},new((n=void 0)||(n=Promise))((function(r,i){function u(r){try{c(o.next(r))}catch(r){i(r)}}function a(r){try{c(o.throw(r))}catch(r){i(r)}}function c(t){t.done?r(t.value):new n((function(r){r(t.value)})).then(u,a)}c((o=o.apply(t,e||[])).next())}));var t,e,n,o}),[v,V,E]),D=u((function(r){m((function(t){return function(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;var n=Array(r),o=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n}(t,[r])}))}),[]),S=u((function(r){m((function(t){return t.filter((function(t){return t.name!==r}))}))}),[]);return a(e,(function(){return{getFieldValue:function(r){var t=w(r);return!!t&&F(t)},setFieldValue:function(r,t){var e=w(r);return!!e&&O(e,t)},getFieldError:function(r){return d[r]},setFieldError:function(r,t){var e;b(s(s({},d),((e={})[r]=t,e)))},clearField:function(r){var t=w(r);t&&P(t)},getErrors:function(){return d},setErrors:function(r){return x(r)},getData:function(){return V()},getFieldRef:function(r){var t=w(r);return!!t&&t.ref},setData:function(r){return j(r)},reset:function(r){return E(r)},submitForm:function(){k()}}})),r.createElement(f.Provider,{value:{initialData:o,errors:d,scopePath:"",registerField:D,unregisterField:S,handleSubmit:k}},l)}));function h(t){var n=t.path,o=t.children,i=e(f),u=i.scopePath,a=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e}(i,["scopePath"]);return r.createElement(f.Provider,{value:s(s({},a),{scopePath:u.concat(u?"."+n:n)})},o)}export{v as Form,f as FormContext,h as Scope,l as useField}; | ||
***************************************************************************** */var s=function(){return(s=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}).apply(this,arguments)};function p(r,t){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(r,u)}catch(r){i=[6,r],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var v=o((function(t,e){var n=t.initialData,o=void 0===n?{}:n,l=t.children,v=t.onSubmit,h=i({}),d=h[0],b=h[1],y=i([]),g=y[0],m=y[1],w=u((function(r){return g.find((function(t){return t.name===r}))}),[g]),F=u((function(r){var t=r.ref,e=r.path,n=r.getValue;return n?n(t):c.pick(e,t)}),[]),O=u((function(r,t){var e=r.path,n=r.ref,o=r.setValue;return o?o(n,t):c.set(e,t,n)}),[]),P=u((function(r){var t=r.clearValue,e=r.ref,n=r.path;return t?t(e,""):c.set(n,"",e)}),[]),E=u((function(r){void 0===r&&(r={}),g.forEach((function(t){var e=t.name,n=t.ref,o=t.path,i=t.clearValue;return i?i(n,r[e]):c.set(o,r[e]?r[e]:"",n)}))}),[g]),j=u((function(r){var t=c.dot(r);Object.entries(t).forEach((function(r){var t=r[0],e=r[1],n=w(t);n&&O(n,e)}))}),[w,O]),x=u((function(r){var t=c.dot(r);b(t)}),[]),V=u((function(){var r={};return g.forEach((function(t){r[t.name]=F(t)})),c.object(r),r}),[g,F]),k=u((function(r){return t=void 0,e=void 0,o=function(){var t;return p(this,(function(e){return r&&r.preventDefault(),t=V(),v(t,{reset:E}),[2]}))},new((n=void 0)||(n=Promise))((function(r,i){function u(r){try{c(o.next(r))}catch(r){i(r)}}function a(r){try{c(o.throw(r))}catch(r){i(r)}}function c(t){t.done?r(t.value):new n((function(r){r(t.value)})).then(u,a)}c((o=o.apply(t,e||[])).next())}));var t,e,n,o}),[v,V,E]),D=u((function(r){m((function(t){return function(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;var n=Array(r),o=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n}(t,[r])}))}),[]),S=u((function(r){m((function(t){return t.filter((function(t){return t.name!==r}))}))}),[]);return a(e,(function(){return{getFieldValue:function(r){var t=w(r);return!!t&&F(t)},setFieldValue:function(r,t){var e=w(r);return!!e&&O(e,t)},getFieldError:function(r){return d[r]},setFieldError:function(r,t){var e;b(s(s({},d),((e={})[r]=t,e)))},clearField:function(r){var t=w(r);t&&P(t)},getErrors:function(){return d},setErrors:function(r){return x(r)},getData:function(){return V()},getFieldRef:function(r){var t=w(r);return!!t&&t.ref},setData:function(r){return j(r)},reset:function(r){return E(r)},submitForm:function(){k()}}})),r.createElement(f.Provider,{value:{initialData:o,errors:d,scopePath:"",registerField:D,unregisterField:S,handleSubmit:k}},l)}));function h(t){var n=t.path,o=t.children,i=e(f),u=i.scopePath,a=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e}(i,["scopePath"]);return r.createElement(f.Provider,{value:s(s({},a),{scopePath:u.concat(u?"."+n:n)})},o)}export{v as Form,f as FormContext,h as Scope,l as useField}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -15,3 +15,3 @@ "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),React__default=_interopDefault(React),dot=_interopDefault(require("dot-object")),FormContext=React.createContext({});function useField(e){var t=React.useContext(FormContext),r=t.initialData,n=t.errors,a=t.scopePath,o=t.unregisterField,u=t.registerField,c=a?a+"."+e:e;React.useEffect((function(){return function(){return o(c)}}),[c,o]);var i=dot.pick(c,r),l=n[c];return{fieldName:c,registerField:u,defaultValue:i,error:l}} | ||
and limitations under the License. | ||
***************************************************************************** */var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(a,o){function u(e){try{i(n.next(e))}catch(e){o(e)}}function c(e){try{i(n.throw(e))}catch(e){o(e)}}function i(e){e.done?a(e.value):new r((function(t){t(e.value)})).then(u,c)}i((n=n.apply(e,t||[])).next())}))}function __generator(e,t){var r,n,a,o,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(a=(a=u.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){u.label=o[1];break}if(6===o[0]&&u.label<a[1]){u.label=a[1],a=o;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(o);break}a[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var o=arguments[t],u=0,c=o.length;u<c;u++,a++)n[a]=o[u];return n}var Form=function(e,t){var r=e.initialData,n=void 0===r?{}:r,a=e.children,o=e.onSubmit,u=React.useState({}),c=u[0],i=u[1],l=React.useState([]),f=l[0],s=l[1],p=React.useCallback((function(e){return f.find((function(t){return t.name===e}))}),[f]),d=React.useCallback((function(e){var t=e.ref,r=e.path,n=e.getValue;return n?n(t):dot.pick(r,t)}),[]),v=React.useCallback((function(e,t){var r=e.path,n=e.ref,a=e.setValue;return a?a(n,t):dot.set(r,t,n)}),[]),b=React.useCallback((function(e){var t=e.clearValue,r=e.ref,n=e.path;return t?t(r,""):dot.set(n,"",r)}),[]),h=React.useCallback((function(e){void 0===e&&(e={}),f.forEach((function(t){var r=t.name,n=t.ref,a=t.path,o=t.clearValue;return o?o(n,e[r]):dot.set(a,e[r]?e[r]:"",n)}))}),[f]),_=React.useCallback((function(e){var t=dot.dot(e);Object.entries(t).forEach((function(e){var t=e[0],r=e[1],n=p(t);n&&v(n,r)}))}),[p,v]),y=React.useCallback((function(e){var t=dot.dot(e);i(t)}),[c]),g=React.useCallback((function(){var e={};return f.forEach((function(t){e[t.name]=d(t)})),dot.object(e),e}),[f,d]),m=React.useCallback((function(e){return __awaiter(void 0,void 0,void 0,(function(){var t;return __generator(this,(function(r){return e&&e.preventDefault(),t=g(),o(t,{reset:h}),[2]}))}))}),[o,g,h]),F=React.useCallback((function(e){s((function(t){return __spreadArrays(t,[e])}))}),[]),R=React.useCallback((function(e){s((function(t){return t.filter((function(t){return t.name!==e}))}))}),[]);return React.useImperativeHandle(t,(function(){return{getFieldValue:function(e){var t=p(e);return!!t&&d(t)},setFieldValue:function(e,t){var r=p(e);return!!r&&v(r,t)},getFieldError:function(e){return c[e]},setFieldError:function(e,t){var r;i(__assign(__assign({},c),((r={})[e]=t,r)))},clearField:function(e){var t=p(e);t&&b(t)},getErrors:function(){return c},setErrors:function(e){return y(e)},getData:function(){return g()},getFieldRef:function(e){var t=p(e);return!!t&&t.ref},setData:function(e){return _(e)},reset:function(e){return h(e)},submitForm:function(){m()}}})),React__default.createElement(FormContext.Provider,{value:{initialData:n,errors:c,scopePath:"",registerField:F,unregisterField:R,handleSubmit:m}},a)},Form$1=React.forwardRef(Form);function Scope(e){var t=e.path,r=e.children,n=React.useContext(FormContext),a=n.scopePath,o=__rest(n,["scopePath"]);return React__default.createElement(FormContext.Provider,{value:__assign(__assign({},o),{scopePath:a.concat(a?"."+t:t)})},r)}exports.Form=Form$1,exports.FormContext=FormContext,exports.Scope=Scope,exports.useField=useField; | ||
***************************************************************************** */var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(a,o){function u(e){try{i(n.next(e))}catch(e){o(e)}}function c(e){try{i(n.throw(e))}catch(e){o(e)}}function i(e){e.done?a(e.value):new r((function(t){t(e.value)})).then(u,c)}i((n=n.apply(e,t||[])).next())}))}function __generator(e,t){var r,n,a,o,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(a=(a=u.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){u.label=o[1];break}if(6===o[0]&&u.label<a[1]){u.label=a[1],a=o;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(o);break}a[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var o=arguments[t],u=0,c=o.length;u<c;u++,a++)n[a]=o[u];return n}var Form=function(e,t){var r=e.initialData,n=void 0===r?{}:r,a=e.children,o=e.onSubmit,u=React.useState({}),c=u[0],i=u[1],l=React.useState([]),f=l[0],s=l[1],p=React.useCallback((function(e){return f.find((function(t){return t.name===e}))}),[f]),d=React.useCallback((function(e){var t=e.ref,r=e.path,n=e.getValue;return n?n(t):dot.pick(r,t)}),[]),v=React.useCallback((function(e,t){var r=e.path,n=e.ref,a=e.setValue;return a?a(n,t):dot.set(r,t,n)}),[]),b=React.useCallback((function(e){var t=e.clearValue,r=e.ref,n=e.path;return t?t(r,""):dot.set(n,"",r)}),[]),h=React.useCallback((function(e){void 0===e&&(e={}),f.forEach((function(t){var r=t.name,n=t.ref,a=t.path,o=t.clearValue;return o?o(n,e[r]):dot.set(a,e[r]?e[r]:"",n)}))}),[f]),_=React.useCallback((function(e){var t=dot.dot(e);Object.entries(t).forEach((function(e){var t=e[0],r=e[1],n=p(t);n&&v(n,r)}))}),[p,v]),y=React.useCallback((function(e){var t=dot.dot(e);i(t)}),[]),g=React.useCallback((function(){var e={};return f.forEach((function(t){e[t.name]=d(t)})),dot.object(e),e}),[f,d]),m=React.useCallback((function(e){return __awaiter(void 0,void 0,void 0,(function(){var t;return __generator(this,(function(r){return e&&e.preventDefault(),t=g(),o(t,{reset:h}),[2]}))}))}),[o,g,h]),F=React.useCallback((function(e){s((function(t){return __spreadArrays(t,[e])}))}),[]),R=React.useCallback((function(e){s((function(t){return t.filter((function(t){return t.name!==e}))}))}),[]);return React.useImperativeHandle(t,(function(){return{getFieldValue:function(e){var t=p(e);return!!t&&d(t)},setFieldValue:function(e,t){var r=p(e);return!!r&&v(r,t)},getFieldError:function(e){return c[e]},setFieldError:function(e,t){var r;i(__assign(__assign({},c),((r={})[e]=t,r)))},clearField:function(e){var t=p(e);t&&b(t)},getErrors:function(){return c},setErrors:function(e){return y(e)},getData:function(){return g()},getFieldRef:function(e){var t=p(e);return!!t&&t.ref},setData:function(e){return _(e)},reset:function(e){return h(e)},submitForm:function(){m()}}})),React__default.createElement(FormContext.Provider,{value:{initialData:n,errors:c,scopePath:"",registerField:F,unregisterField:R,handleSubmit:m}},a)},Form$1=React.forwardRef(Form);function Scope(e){var t=e.path,r=e.children,n=React.useContext(FormContext),a=n.scopePath,o=__rest(n,["scopePath"]);return React__default.createElement(FormContext.Provider,{value:__assign(__assign({},o),{scopePath:a.concat(a?"."+t:t)})},r)}exports.Form=Form$1,exports.FormContext=FormContext,exports.Scope=Scope,exports.useField=useField; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@unform/core", | ||
"version": "1.9.7", | ||
"version": "1.9.8", | ||
"description": "Unform core package", | ||
@@ -39,3 +39,3 @@ "author": "Diego Fernandes <diego.schell.f@gmail.com>", | ||
}, | ||
"gitHead": "cf50489687f7cbae6bbbff0b90843a084b6e6ede" | ||
"gitHead": "2b92271d8280ddd98dc79f1682033bbf7c76ebd8" | ||
} |
@@ -40,6 +40,3 @@ import { DetailedHTMLProps, FormHTMLAttributes, FormEvent } from 'react'; | ||
} | ||
export interface FormContent { | ||
[key: string]: any; | ||
} | ||
export interface SubmitHandler<T = FormContent> { | ||
export interface SubmitHandler<T = any> { | ||
(data: T, helpers: FormHelpers): void; | ||
@@ -46,0 +43,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68977
165