effector-vue
Advanced tools
Comparing version 21.1.0 to 21.1.1
@@ -1,2 +0,2 @@ | ||
'use strict';function t(t){return t&&'object'==typeof t&&'default'in t?t.default:t}function e(t,e){var r=this;void 0===e&&(e={immediate:1});var o=n.createEvent(),i=n.restore(o,{}),a=function(){r.$watch(t,(function(t,e){o({oldValue:e,newValue:t})}),e)};return this._data?a():this.$once('hook:created',a),i}function r(t){return this.$watchAsStore(t).map((function(t){return t.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var o=require('vue'),n=require('effector/compat'),i=t(o),a={beforeCreate:function(){var t=this,e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),e){this.$options.computed||(this.$options.computed={});var r={};if(n.is.store(e))r={state:e};else{if('object'!=typeof e)throw Error('property should be Store');r=Object.assign({},e)}this.__clear=n.createEvent(),n.withRegion(this.__clear,(function(){var e={},o=0;for(var a in r){var c=r[a];if(n.is.store(c))e[a]=c;else{if(!n.is.event(c)&&!n.is.effect(c))throw Error("Effector property "+a+" should be Store or Unit (will be transform to Store<number>)");e[a]=n.restore(c.map((function(){return++o})),null)}}var s=n.combine(e),f=i.observable({state:s.defaultState});s.watch((function(t){return f.state=t}));var u=function(r){var o=n.createEvent();n.forward({from:o,to:e[r]}),t.$options.computed[r]={get:function(){return f.state[r]},set:o}};for(var p in e)u(p)}))}},beforeDestroy:function(){this.__clear&&n.clearNode(this.__clear)}};exports.VueEffector=function(t){t.mixin(a),t.prototype.$watchAsStore=e,t.prototype.$store=r},exports.createComponent=function(t,e){return i.extend(Object.assign({},t,e&&{effector:function(){return e}}))}; | ||
'use strict';function e(e){return e&&'object'==typeof e&&'default'in e?e.default:e}function t(e,t){var r=this;void 0===t&&(t={immediate:1});var o=n.createEvent(),i=n.restore(o,{}),a=function(){r.$watch(e,(function(e,t){o({oldValue:t,newValue:e})}),t)};return this._data?a():this.$once('hook:created',a),i}function r(e){return this.$watchAsStore(e).map((function(e){return e.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var o=require('vue'),n=require('effector/compat'),i=e(o),a={beforeCreate:function(){var e=this,t=this.$options.effector;if("function"==typeof t&&(t=t.call(this)),t){this.$options.computed||(this.$options.computed={});var r={};if(n.is.store(t))r={state:t};else{if('object'!=typeof t)throw Error('property should be Store');r=Object.assign({},t)}this.__clear=n.createEvent(),n.withRegion(this.__clear,(function(){var t={},o=0;for(var a in r){var f=r[a];if(n.is.store(f))t[a]=f;else{if(!n.is.event(f)&&!n.is.effect(f))throw Error("Effector property "+a+" should be Store or Unit (will be transform to Store<number>)");t[a]=n.restore(f.map((function(){return++o})),null)}}var c=n.combine(t);for(var u in c.defaultState)i.util.defineReactive(e,u,c.defaultState[u]);c.watch((function(t){for(var r in t)e[r]=t[r]}));var s=function(r){var o=n.createEvent();n.forward({from:o,to:t[r]}),e.$options.computed[r]={get:function(){return e[r]},set:o}};for(var l in t)s(l)}))}},beforeDestroy:function(){this.__clear&&n.clearNode(this.__clear)}};exports.VueEffector=function(e){e.mixin(a),e.prototype.$watchAsStore=t,e.prototype.$store=r},exports.createComponent=function(e,t){return i.extend(Object.assign({},e,t&&{effector:function(){return t}}))}; | ||
//# sourceMappingURL=compat.js.map |
@@ -1,2 +0,2 @@ | ||
function e(e){return e&&'object'==typeof e&&'default'in e?e.default:e}function t(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),s=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?s():this.$once('hook:created',s),r}function o(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}Object.defineProperty(exports,'__esModule',{value:1});var r=require('vue'),effector=require('effector'),s=e(r);const i={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let s=t[r];if(effector.is.store(s))e[r]=s;else{if(!effector.is.event(s)&&!effector.is.effect(s))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(s.map((()=>++o)),null)}}let r=effector.combine(e),i=s.observable({state:r.defaultState});r.watch((e=>i.state=e));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>i.state[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};exports.VueEffector=e=>{e.mixin(i),e.prototype.$watchAsStore=t,e.prototype.$store=o},exports.createComponent=(e,t)=>s.extend(Object.assign({},e,t&&{effector:()=>t})); | ||
function e(e){return e&&'object'==typeof e&&'default'in e?e.default:e}function t(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),i=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?i():this.$once('hook:created',i),r}function o(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}Object.defineProperty(exports,'__esModule',{value:1});var r=require('vue'),effector=require('effector'),i=e(r);const s={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let i=t[r];if(effector.is.store(i))e[r]=i;else{if(!effector.is.event(i)&&!effector.is.effect(i))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(i.map((()=>++o)),null)}}let r=effector.combine(e);for(let e in r.defaultState)i.util.defineReactive(this,e,r.defaultState[e]);r.watch((e=>{for(let t in e)this[t]=e[t]}));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>this[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};exports.VueEffector=e=>{e.mixin(s),e.prototype.$watchAsStore=t,e.prototype.$store=o},exports.createComponent=(e,t)=>i.extend(Object.assign({},e,t&&{effector:()=>t})); | ||
//# sourceMappingURL=effector-vue.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).effectorVue={},e.Vue,e.effector)})(this,(function(e,t,effector){function o(e){return e&&'object'==typeof e&&'default'in e?e:{default:e}}function r(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),i=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?i():this.$once('hook:created',i),r}function i(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}var f=o(t);const s={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let i=t[r];if(effector.is.store(i))e[r]=i;else{if(!effector.is.event(i)&&!effector.is.effect(i))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(i.map((()=>++o)),null)}}let r=effector.combine(e),i=f.default.observable({state:r.defaultState});r.watch((e=>i.state=e));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>i.state[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};e.VueEffector=e=>{e.mixin(s),e.prototype.$watchAsStore=r,e.prototype.$store=i},e.createComponent=(e,t)=>f.default.extend(Object.assign({},e,t&&{effector:()=>t})),Object.defineProperty(e,'__esModule',{value:1})})); | ||
((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).effectorVue={},e.Vue,e.effector)})(this,(function(e,t,effector){function o(e){return e&&'object'==typeof e&&'default'in e?e:{default:e}}function r(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),i=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?i():this.$once('hook:created',i),r}function i(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}var f=o(t);const n={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let i=t[r];if(effector.is.store(i))e[r]=i;else{if(!effector.is.event(i)&&!effector.is.effect(i))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(i.map((()=>++o)),null)}}let r=effector.combine(e);for(let e in r.defaultState)f.default.util.defineReactive(this,e,r.defaultState[e]);r.watch((e=>{for(let t in e)this[t]=e[t]}));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>this[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};e.VueEffector=e=>{e.mixin(n),e.prototype.$watchAsStore=r,e.prototype.$store=i},e.createComponent=(e,t)=>f.default.extend(Object.assign({},e,t&&{effector:()=>t})),Object.defineProperty(e,'__esModule',{value:1})})); | ||
//# sourceMappingURL=effector-vue.umd.js.map |
{ | ||
"name": "effector-vue", | ||
"version": "21.1.0", | ||
"version": "21.1.1", | ||
"description": "Vue bindings for effector", | ||
@@ -60,10 +60,13 @@ "main": "effector-vue.cjs.js", | ||
"vue", | ||
"data", | ||
"composition api", | ||
"state management", | ||
"state manager", | ||
"algebraic effects", | ||
"model", | ||
"reactive", | ||
"state", | ||
"frp", | ||
"event", | ||
"effect", | ||
"event", | ||
"functional", | ||
"reactive", | ||
"state manager", | ||
"state-manager", | ||
"state", | ||
"store" | ||
@@ -90,3 +93,13 @@ ], | ||
"access": "public" | ||
} | ||
}, | ||
"funding": [ | ||
{ | ||
"type": "patreon", | ||
"url": "https://www.patreon.com/zero_bias" | ||
}, | ||
{ | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/effector" | ||
} | ||
] | ||
} |
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
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
69686
700