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

@tinacms/react-core

Package Overview
Dependencies
Maintainers
12
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinacms/react-core - npm Package Compare versions

Comparing version 0.3.1-alpha.0 to 0.3.1

2

build/index.js

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@tinacms/forms")):"function"==typeof define&&define.amd?define(["exports","react","@tinacms/forms"],n):n((e=e||self)["@tinacms/react-core"]={},e.React,e.forms)}(this,function(e,c,u){"use strict";var n="useCMS could not find an instance of CMS",t=c.createContext(null);function s(){var e=c.useContext(t);if(!e)throw new Error(n);return e}var r=function(){return(r=Object.assign||function(e){for(var n,t=1,u=arguments.length;t<u;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};var i=o;function o(e){var n,t=s();n=Array.isArray(e)?e:[e],c.useEffect(function(){return n.forEach(function(e){e&&t.plugins.add(e)}),function(){n.forEach(function(e){e&&t.plugins.remove(e)})}},function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var u=Array(e),r=0;for(n=0;n<t;n++)for(var i=arguments[n],o=0,a=i.length;o<a;o++,r++)u[r]=i[o];return u}([t.plugins],n))}function a(e,n){void 0===n&&(n={});var t=e.loadInitialValues,u=function(e,n){var t={};for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&n.indexOf(u)<0&&(t[u]=e[u]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(u=Object.getOwnPropertySymbols(e);r<u.length;r++)n.indexOf(u[r])<0&&Object.prototype.propertyIsEnumerable.call(e,u[r])&&(t[u[r]]=e[u[r]])}return t}(e,["loadInitialValues"]),r=s();u.initialValues=u.initialValues||n.values;var i=c.useState(u.initialValues)[1],o=c.useState(function(){return l(u,function(e){i(e.values)})}),a=o[0],f=o[1];return c.useEffect(function(){a.id!==u.id&&f(l(u,function(e){i(e.values)}))},[u.id]),c.useEffect(function(){r.enabled&&t&&t().then(function(e){a.updateInitialValues(e)})},[a]),function(e,n){c.useEffect(function(){void 0!==n&&e.updateFields(n)},[e,n])}(a,n.fields),function(e,n){c.useEffect(function(){void 0!==n&&(e.label=n)},[e,n])}(a,n.label),function(e,n){c.useEffect(function(){void 0!==n&&e.updateValues(n)},[e,n])}(a,n.values),[a?a.values:u.initialValues,a]}function l(e,n){var t=new u.Form(e);return t.subscribe(n,{values:!0}),t}function f(n,t){return function(e){return i(t),c.createElement(n,r({},e))}}var v=f;e.CMSContext=t,e.ERROR_MISSING_CMS=n,e.useCMS=s,e.useForm=a,e.useLocalForm=function(e,n){void 0===n&&(n={});var t=a(e,n),u=t[0],r=t[1];return o(r),[u,r]},e.usePlugin=i,e.usePlugins=o,e.useSubscribable=function(e,n){var t=c.useState(0)[1];c.useEffect(function(){return e.subscribe(function(){t(function(e){return e+1}),n&&n()})})},e.useWatchFormValues=function(e,t){c.useEffect(function(){if(e){var n=!0;return e.subscribe(function(e){n?n=!1:t(e)},{values:!0})}},[t,e])},e.withPlugin=v,e.withPlugins=f,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@tinacms/forms")):"function"==typeof define&&define.amd?define(["exports","react","@tinacms/forms"],n):n((e=e||self)["@tinacms/react-core"]={},e.React,e.forms)}(this,function(e,c,u){"use strict";var t="useCMS could not find an instance of CMS",r=c.createContext(null);function s(){var e=c.useContext(r);if(!e)throw new Error(t);var n=c.useState(e.enabled)[1];return c.useEffect(function(){return e.events.subscribe("cms",function(){n(e.enabled)})},[e]),e}var i=function(){return(i=Object.assign||function(e){for(var n,t=1,u=arguments.length;t<u;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};var o=a;function a(e){var n,t=s();n=Array.isArray(e)?e:[e],c.useEffect(function(){return n.forEach(function(e){e&&t.plugins.add(e)}),function(){n.forEach(function(e){e&&t.plugins.remove(e)})}},function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var u=Array(e),r=0;for(n=0;n<t;n++)for(var i=arguments[n],o=0,a=i.length;o<a;o++,r++)u[r]=i[o];return u}([t.plugins],n))}function f(e,n){void 0===n&&(n={});var t=e.loadInitialValues,u=function(e,n){var t={};for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&n.indexOf(u)<0&&(t[u]=e[u]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(u=Object.getOwnPropertySymbols(e);r<u.length;r++)n.indexOf(u[r])<0&&Object.prototype.propertyIsEnumerable.call(e,u[r])&&(t[u[r]]=e[u[r]])}return t}(e,["loadInitialValues"]),r=s();u.initialValues=u.initialValues||n.values;var i=c.useState(u.initialValues)[1],o=c.useState(function(){return l(u,function(e){i(e.values)})}),a=o[0],f=o[1];return c.useEffect(function(){a.id!==u.id&&f(l(u,function(e){i(e.values)}))},[u.id]),c.useEffect(function(){r.enabled&&t&&t().then(function(e){a.updateInitialValues(e)})},[a]),function(e,n){c.useEffect(function(){void 0!==n&&e.updateFields(n)},[e,n])}(a,n.fields),function(e,n){c.useEffect(function(){void 0!==n&&(e.label=n)},[e,n])}(a,n.label),function(e,n){c.useEffect(function(){void 0!==n&&e.updateValues(n)},[e,n])}(a,n.values),[a?a.values:u.initialValues,a]}function l(e,n){var t=new u.Form(e);return t.subscribe(n,{values:!0}),t}function n(n,t){return function(e){return o(t),c.createElement(n,i({},e))}}var v=n;e.CMSContext=r,e.ERROR_MISSING_CMS=t,e.useCMS=s,e.useForm=f,e.useLocalForm=function(e,n){void 0===n&&(n={});var t=f(e,n),u=t[0],r=t[1];return a(r),[u,r]},e.usePlugin=o,e.usePlugins=a,e.useSubscribable=function(e,n){var t=c.useState(0)[1];c.useEffect(function(){return e.subscribe(function(){t(function(e){return e+1}),n&&n()})})},e.useWatchFormValues=function(e,t){c.useEffect(function(){if(e){var n=!0;return e.subscribe(function(e){n?n=!1:t(e)},{values:!0})}},[t,e])},e.withPlugin=v,e.withPlugins=n,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -6,2 +6,13 @@ # Change Log

## [0.3.1](https://github.com/tinacms/tinacms/compare/@tinacms/react-core@0.3.1-alpha.0...@tinacms/react-core@0.3.1) (2020-06-23)
### Bug Fixes
* useCMS trigger update when cms is enabled/disabled ([9bbd999](https://github.com/tinacms/tinacms/commit/9bbd999))
## [0.3.1-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/react-core@0.3.0...@tinacms/react-core@0.3.1-alpha.0) (2020-06-17)

@@ -8,0 +19,0 @@

{
"name": "@tinacms/react-core",
"version": "0.3.1-alpha.0",
"version": "0.3.1",
"license": "Apache-2.0",

@@ -23,4 +23,4 @@ "main": "build/index.js",

"dependencies": {
"@tinacms/core": "^0.10.0-alpha.0",
"@tinacms/forms": "^0.6.1-alpha.0"
"@tinacms/core": "^0.10.0",
"@tinacms/forms": "^0.6.1"
},

@@ -33,3 +33,3 @@ "peerDependencies": {

},
"gitHead": "65d302c2e3508f25b4893efdf16c8f80cf43ac43"
"gitHead": "b36e6c8e7e4e8670e4c5de02709a80f7f05194df"
}
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