Socket
Socket
Sign inDemoInstall

@tinacms/core

Package Overview
Dependencies
Maintainers
12
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinacms/core - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2-alpha.0

2

build/index.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("final-form-arrays"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","final-form-arrays","final-form"],t):t((e=e||self)["@tinacms/core"]={},e.arrayMutators,e.finalForm)}(this,function(e,u,a){"use strict";u=u&&u.hasOwnProperty("default")?u.default:u;var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function t(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function f(r,n){var i,o,s,e,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,o=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){u.label=t[1];break}if(6===t[0]&&u.label<s[1]){u.label=s[1],s=t;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(t);break}s[2]&&u.ops.pop(),u.trys.pop();continue}t=n.call(r,u)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}var r=(i.prototype.subscribe=function(e){var t=this;return this.__subscribers.push(e),function(){return t.unsubscribe(e)}},i.prototype.unsubscribe=function(e){var t=this.__subscribers.indexOf(e);this.__subscribers.splice(t,1)},i.prototype.notifiySubscribers=function(){this.__subscribers.forEach(function(e){return e()})},i);function i(){this.__subscribers=[]}var o=(s.prototype.discoverHiddenFields=function(e,o){var s=this;Object.entries(e).map(function(e){var t=e[0],r=e[1],n=o?o+"."+t:t;if(Array.isArray(r))if(r.find(function(e){return"object"==typeof e})){var i=n+".INDEX";r.forEach(function(e){s.discoverHiddenFields(e,i)})}else s.hiddenFields[n]={path:n,field:{name:n,component:null},unsubscribe:s.finalForm.registerField(n,function(){},{})};else"object"==typeof r&&null!==r?s.discoverHiddenFields(r,n):s.hiddenFields[n]={path:n,field:{name:n,component:null},unsubscribe:s.finalForm.registerField(n,function(){},{})}})},s.prototype.removeDeclaredFieldsFromHiddenLookup=function(){var r=this;Object.keys(this.fieldSubscriptions).forEach(function(e){var t=r.hiddenFields[e];t&&(t.unsubscribe(),delete r.hiddenFields[e])})},s.prototype.registerFields=function(e,i){var o=this;e.forEach(function(e){var t=i?i+"."+e.name:e.name,r=["group"].includes(e.component);if(["group-list","blocks"].includes(e.component)){var n=e.fields||[];o.registerFields(n,t+".INDEX")}else r?(n=e.fields||[],o.registerFields(n,t)):o.fieldSubscriptions[t]={path:t,field:e,unsubscribe:o.finalForm.registerField(t,function(){},{})}})},Object.defineProperty(s.prototype,"values",{get:function(){return this.finalForm.getState().values},enumerable:!0,configurable:!0}),s);function s(e){var r=this,t=e.id,n=e.label,i=e.fields,o=e.actions,s=function(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 i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["id","label","fields","actions"]);this.fieldSubscriptions={},this.hiddenFields={},this.subscribe=function(e,t){return r.finalForm.subscribe(e,t)},this.submit=function(){return r.finalForm.submit()},this.id=t,this.label=n,this.fields=i,this.finalForm=a.createForm(c({},s,{onSubmit:function(r,n,i){return function(o,s,u,a){return new(u=u||Promise)(function(e,t){function r(e){try{i(a.next(e))}catch(e){t(e)}}function n(e){try{i(a.throw(e))}catch(e){t(e)}}function i(t){t.done?e(t.value):new u(function(e){e(t.value)}).then(r,n)}i((a=a.apply(o,s||[])).next())})}(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return[4,s.onSubmit(r,n,i)];case 1:return t=e.sent(),n.initialize(r),[2,t]}})})},mutators:c({},u,s.mutators)})),this.registerFields(this.fields),this.discoverHiddenFields(s.initialValues),this.removeDeclaredFieldsFromHiddenLookup(),this.actions=o||[]}var l,p=(t(d,l=r),d.prototype.findForm=function(e){return this.__forms[e]},d.prototype.all=function(){var t=this;return Object.keys(this.__forms).map(function(e){return t.__forms[e]})},d);function d(){var r=null!==l&&l.apply(this,arguments)||this;return r.__forms={},r.createForm=function(e){var t=new o(e);return r.__forms[e.id]=t,r.notifiySubscribers(),t},r.removeForm=function(e){delete r.__forms[e],r.notifiySubscribers()},r}var h=(b.prototype.findOrCreateMap=function(e){return this.plugins[e]=this.plugins[e]||new m(e)},b.prototype.add=function(e){this.findOrCreateMap(e.__type).add(e)},b.prototype.remove=function(e){this.findOrCreateMap(e.__type).remove(e)},b.prototype.all=function(e){return this.findOrCreateMap(e).all()},b);function b(){this.plugins={}}var y,m=(t(_,y=r),_.prototype.add=function(e){var t=e;t.__type||(t.__type=this.__type),this.__plugins[t.name]=t,this.notifiySubscribers()},_.prototype.all=function(){var t=this;return Object.keys(this.__plugins).map(function(e){return t.__plugins[e]})},_.prototype.find=function(e){return this.__plugins[e]},_.prototype.remove=function(e){var t="string"==typeof e?e:e.name,r=this.__plugins[t];return delete this.__plugins[t],this.notifiySubscribers(),r},_);function _(e){var t=y.call(this)||this;return t.__type=e,t.__plugins={},t}var v=(g.prototype.registerApi=function(e,t){this.api[e]=t},g);function g(){this.api={},this.forms=new p,this.plugins=new h}e.CMS=v,e.Form=o,e.FormManager=p,e.PluginManager=h,e.PluginType=m,e.Subscribable=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("final-form-arrays"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","final-form-arrays","final-form"],t):t((e=e||self)["@tinacms/core"]={},e.arrayMutators,e.finalForm)}(this,function(e,a,c){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function t(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function f(r,n){var i,o,s,e,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,o=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){u.label=t[1];break}if(6===t[0]&&u.label<s[1]){u.label=s[1],s=t;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(t);break}s[2]&&u.ops.pop(),u.trys.pop();continue}t=n.call(r,u)}catch(e){t=[6,e],o=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}var r=(i.prototype.subscribe=function(e){var t=this;return this.__subscribers.push(e),function(){return t.unsubscribe(e)}},i.prototype.unsubscribe=function(e){var t=this.__subscribers.indexOf(e);this.__subscribers.splice(t,1)},i.prototype.notifiySubscribers=function(){this.__subscribers.forEach(function(e){return e()})},i);function i(){this.__subscribers=[]}var o=(s.prototype.discoverHiddenFields=function(e,o){var s=this;Object.entries(e).map(function(e){var t=e[0],r=e[1],n=o?o+"."+t:t;if(Array.isArray(r))if(r.find(function(e){return"object"==typeof e})){var i=n+".INDEX";r.forEach(function(e){s.discoverHiddenFields(e,i)})}else s.hiddenFields[n]={path:n,field:{name:n,component:null},unsubscribe:s.finalForm.registerField(n,function(){},{})};else"object"==typeof r&&null!==r?s.discoverHiddenFields(r,n):s.hiddenFields[n]={path:n,field:{name:n,component:null},unsubscribe:s.finalForm.registerField(n,function(){},{})}})},s.prototype.removeDeclaredFieldsFromHiddenLookup=function(){var r=this;Object.keys(this.fieldSubscriptions).forEach(function(e){var t=r.hiddenFields[e];t&&(t.unsubscribe(),delete r.hiddenFields[e])})},s.prototype.registerFields=function(e,i){var o=this;e.forEach(function(e){var t=i?i+"."+e.name:e.name,r=["group"].includes(e.component);if(["group-list","blocks"].includes(e.component)){var n=e.fields||[];o.registerFields(n,t+".INDEX")}else r?(n=e.fields||[],o.registerFields(n,t)):o.fieldSubscriptions[t]={path:t,field:e,unsubscribe:o.finalForm.registerField(t,function(){},{})}})},Object.defineProperty(s.prototype,"values",{get:function(){return this.finalForm.getState().values},enumerable:!0,configurable:!0}),s);function s(e){var r=this,t=e.id,n=e.label,i=e.fields,o=e.actions,s=function(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 i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["id","label","fields","actions"]);this.fieldSubscriptions={},this.hiddenFields={},this.subscribe=function(e,t){return r.finalForm.subscribe(e,t)},this.submit=function(){return r.finalForm.submit()};var u=s.initialValues||{};this.id=t,this.label=n,this.fields=i,this.finalForm=c.createForm(l({},s,{initialValues:u,onSubmit:function(r,n,i){return function(o,s,u,a){return new(u=u||Promise)(function(e,t){function r(e){try{i(a.next(e))}catch(e){t(e)}}function n(e){try{i(a.throw(e))}catch(e){t(e)}}function i(t){t.done?e(t.value):new u(function(e){e(t.value)}).then(r,n)}i((a=a.apply(o,s||[])).next())})}(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return[4,s.onSubmit(r,n,i)];case 1:return t=e.sent(),n.initialize(r),[2,t]}})})},mutators:l({},a,s.mutators)})),this.registerFields(this.fields),this.discoverHiddenFields(u),this.removeDeclaredFieldsFromHiddenLookup(),this.actions=o||[]}var u,p=(t(d,u=r),d.prototype.findForm=function(e){return this.__forms[e]},d.prototype.all=function(){var t=this;return Object.keys(this.__forms).map(function(e){return t.__forms[e]})},d);function d(){var r=null!==u&&u.apply(this,arguments)||this;return r.__forms={},r.createForm=function(e){var t=new o(e);return r.__forms[e.id]=t,r.notifiySubscribers(),t},r.removeForm=function(e){delete r.__forms[e],r.notifiySubscribers()},r}var h=(b.prototype.findOrCreateMap=function(e){return this.plugins[e]=this.plugins[e]||new m(e)},b.prototype.add=function(e){this.findOrCreateMap(e.__type).add(e)},b.prototype.remove=function(e){this.findOrCreateMap(e.__type).remove(e)},b.prototype.all=function(e){return this.findOrCreateMap(e).all()},b);function b(){this.plugins={}}var y,m=(t(_,y=r),_.prototype.add=function(e){var t=e;t.__type||(t.__type=this.__type),this.__plugins[t.name]=t,this.notifiySubscribers()},_.prototype.all=function(){var t=this;return Object.keys(this.__plugins).map(function(e){return t.__plugins[e]})},_.prototype.find=function(e){return this.__plugins[e]},_.prototype.remove=function(e){var t="string"==typeof e?e:e.name,r=this.__plugins[t];return delete this.__plugins[t],this.notifiySubscribers(),r},_);function _(e){var t=y.call(this)||this;return t.__type=e,t.__plugins={},t}var v=(g.prototype.registerApi=function(e,t){this.api[e]=t},g);function g(){this.api={},this.forms=new p,this.plugins=new h}e.CMS=v,e.Form=o,e.FormManager=p,e.PluginManager=h,e.PluginType=m,e.Subscribable=r,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "@tinacms/core",
"version": "0.1.1",
"version": "0.1.2-alpha.0",
"main": "build/index.js",

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

"react": "^16.8.6"
},
"gitHead": "990a02ad010aa23e0254c9edafab745dc973d1e7"
}
}
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