Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinacms/forms

Package Overview
Dependencies
Maintainers
14
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinacms/forms - npm Package Compare versions

Comparing version 0.31.0-alpha.5 to 0.31.0-alpha.6

2

build/form.d.ts

@@ -24,3 +24,3 @@ /**

label: string;
fields: F[];
fields?: F[];
__type?: string;

@@ -27,0 +27,0 @@ reset?(): void;

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("final-form-arrays"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","final-form-arrays","final-form"],e):e((t=t||self)["@tinacms/forms"]={},t.arrayMutators,t.finalForm)}(this,function(t,h,b){"use strict";h=h&&h.hasOwnProperty("default")?h.default:h;var m=function(){return(m=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function y(o,a,u,l){return new(u=u||Promise)(function(t,e){function n(t){try{r(l.next(t))}catch(t){e(t)}}function i(t){try{r(l.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new u(function(t){t(e.value)}).then(n,i)}r((l=l.apply(o,a||[])).next())})}function d(n,i){var r,o,a,t,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=i.call(n,u)}catch(t){e=[6,t],o=0}finally{r=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var e=(Object.defineProperty(n.prototype,"name",{get:function(){return this.id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){if(!this.loading)return this.finalForm.getState().values||this.initialValues},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initialValues",{get:function(){return this.finalForm.getState().initialValues},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pristine",{get:function(){return this.finalForm.getState().pristine},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dirty",{get:function(){return this.finalForm.getState().dirty},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"submitting",{get:function(){return this.finalForm.getState().submitting},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valid",{get:function(){return this.finalForm.getState().valid},enumerable:!0,configurable:!0}),n.prototype.reset=function(){return y(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return this._reset?[4,this._reset()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.finalForm.reset(),[2]}})})},n.prototype.updateFields=function(t){this.fields=t},n.prototype.change=function(t,e){return this.finalForm.change(t,e)},Object.defineProperty(n.prototype,"mutators",{get:function(){return this.finalForm.mutators},enumerable:!0,configurable:!0}),n.prototype.updateValues=function(t){var e=this;this.finalForm.batch(function(){e.finalForm.getState().active?u(e.finalForm,t):i(e.finalForm,t)})},n.prototype.updateInitialValues=function(e){var n=this;this.finalForm.batch(function(){var t=n.values||{};n.finalForm.initialize(e),n.finalForm.getState().active?u(n.finalForm,t):i(n.finalForm,t)})},n);function n(t){var n=this,e=t.id,i=t.label,r=t.fields,o=t.actions,a=t.buttons,u=t.reset,l=t.loadInitialValues,s=t.onChange,f=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(t,["id","label","fields","actions","buttons","reset","loadInitialValues","onChange"]);this.loading=!1,this.subscribe=function(t,e){return n.finalForm.subscribe(t,e)},this.handleSubmit=function(r,o,a){return y(n,void 0,void 0,function(){var e,n,i;return d(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.onSubmit(r,o,a)];case 1:return e=t.sent(),o.initialize(r),[2,e];case 2:return n=t.sent(),[2,(i={},i[b.FORM_ERROR]=n,i)];case 3:return[2]}})})},this.submit=function(){return n.finalForm.submit()};var c=f.initialValues||{};if(this.__type=f.__type||"form",this.id=e,this.label=i,this.fields=r,this.onSubmit=f.onSubmit,this.finalForm=b.createForm(m(m({},f),{initialValues:c,onSubmit:this.handleSubmit,mutators:m(m({},h),f.mutators)})),this._reset=u,this.actions=o||[],this.buttons=a||{save:"Save",reset:"Reset"},this.updateFields(this.fields),l&&(this.loading=!0,l().then(function(t){n.updateInitialValues(t)}).finally(function(){n.loading=!1})),s){var p=!0;this.subscribe(function(t){p?p=!1:s(t)},{values:!0})}}function i(i,t){Object.entries(t).forEach(function(t){var e=t[0],n=t[1];i.change(e,n)})}function u(r,t,o){var a=r.getState().active;Object.entries(t).forEach(function(t){var e=t[0],n=t[1],i=o?o+"."+e:e;"object"==typeof n?a.startsWith(i)?u(r,n,i):r.change(i,n):i!==a&&r.change(i,n)})}t.Form=e,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("final-form-arrays"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","final-form-arrays","final-form"],e):e((t=t||self)["@tinacms/forms"]={},t.arrayMutators,t.finalForm)}(this,function(t,h,b){"use strict";h=h&&h.hasOwnProperty("default")?h.default:h;var m=function(){return(m=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function y(o,a,u,l){return new(u=u||Promise)(function(t,e){function n(t){try{r(l.next(t))}catch(t){e(t)}}function i(t){try{r(l.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new u(function(t){t(e.value)}).then(n,i)}r((l=l.apply(o,a||[])).next())})}function d(n,i){var r,o,a,t,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,a&&(e=[2&e[0],a.value]),e[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){u.label=e[1];break}if(6===e[0]&&u.label<a[1]){u.label=a[1],a=e;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(e);break}a[2]&&u.ops.pop(),u.trys.pop();continue}e=i.call(n,u)}catch(t){e=[6,t],o=0}finally{r=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var e=(Object.defineProperty(n.prototype,"name",{get:function(){return this.id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){if(!this.loading)return this.finalForm.getState().values||this.initialValues},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initialValues",{get:function(){return this.finalForm.getState().initialValues},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pristine",{get:function(){return this.finalForm.getState().pristine},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dirty",{get:function(){return this.finalForm.getState().dirty},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"submitting",{get:function(){return this.finalForm.getState().submitting},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valid",{get:function(){return this.finalForm.getState().valid},enumerable:!0,configurable:!0}),n.prototype.reset=function(){return y(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return this._reset?[4,this._reset()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.finalForm.reset(),[2]}})})},n.prototype.updateFields=function(t){this.fields=t},n.prototype.change=function(t,e){return this.finalForm.change(t,e)},Object.defineProperty(n.prototype,"mutators",{get:function(){return this.finalForm.mutators},enumerable:!0,configurable:!0}),n.prototype.updateValues=function(t){var e=this;this.finalForm.batch(function(){e.finalForm.getState().active?u(e.finalForm,t):i(e.finalForm,t)})},n.prototype.updateInitialValues=function(e){var n=this;this.finalForm.batch(function(){var t=n.values||{};n.finalForm.initialize(e),n.finalForm.getState().active?u(n.finalForm,t):i(n.finalForm,t)})},n);function n(t){var n=this,e=t.id,i=t.label,r=t.fields,o=t.actions,a=t.buttons,u=t.reset,l=t.loadInitialValues,s=t.onChange,f=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(t,["id","label","fields","actions","buttons","reset","loadInitialValues","onChange"]);this.loading=!1,this.subscribe=function(t,e){return n.finalForm.subscribe(t,e)},this.handleSubmit=function(r,o,a){return y(n,void 0,void 0,function(){var e,n,i;return d(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.onSubmit(r,o,a)];case 1:return e=t.sent(),o.initialize(r),[2,e];case 2:return n=t.sent(),[2,(i={},i[b.FORM_ERROR]=n,i)];case 3:return[2]}})})},this.submit=function(){return n.finalForm.submit()};var c=f.initialValues||{};if(this.__type=f.__type||"form",this.id=e,this.label=i,this.fields=r||[],this.onSubmit=f.onSubmit,this.finalForm=b.createForm(m(m({},f),{initialValues:c,onSubmit:this.handleSubmit,mutators:m(m({},h),f.mutators)})),this._reset=u,this.actions=o||[],this.buttons=a||{save:"Save",reset:"Reset"},this.updateFields(this.fields),l&&(this.loading=!0,l().then(function(t){n.updateInitialValues(t)}).finally(function(){n.loading=!1})),s){var p=!0;this.subscribe(function(t){p?p=!1:s(t)},{values:!0})}}function i(i,t){Object.entries(t).forEach(function(t){var e=t[0],n=t[1];i.change(e,n)})}function u(r,t,o){var a=r.getState().active;Object.entries(t).forEach(function(t){var e=t[0],n=t[1],i=o?o+"."+e:e;"object"==typeof n?a.startsWith(i)?u(r,n,i):r.change(i,n):i!==a&&r.change(i,n)})}t.Form=e,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "@tinacms/forms",
"version": "0.31.0-alpha.5",
"version": "0.31.0-alpha.6",
"main": "build/index.js",

@@ -31,3 +31,3 @@ "types": "build/index.d.ts",

"devDependencies": {
"@tinacms/core": "^0.31.0-alpha.5",
"@tinacms/core": "^0.31.0-alpha.6",
"@tinacms/scripts": "^0.29.0"

@@ -42,3 +42,3 @@ },

},
"gitHead": "a85e0e31a2540e4229fe660c99dfb6803cfcbcd7"
"gitHead": "025c74e1d430341260f0f12e4c91bf77db7b3421"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc