effector-vue
Advanced tools
Comparing version 0.18.4 to 0.18.5
@@ -1,2 +0,2 @@ | ||
function e(e,t={immediate:1}){const o=this,r=effector.createEvent(),s=effector.createStore({});let i;s.on(r,(e,t)=>t);const c=()=>{i=o.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return o._data?c():o.$once('hook:created',c),s}function t(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}Object.defineProperty(exports,'__esModule',{value:1});var o,r=(o=require('vue'))&&'object'==typeof o&&'default'in o?o.default:o,effector=require('effector');const s={created(){const e=this;let t=e.$options.effector;'function'==typeof t&&(t=t.call(e)),effector.invariant(effector.isStore(t),'effector-vue: Property should Store, but you passed %s',t),r.util.defineReactive(e,"state",t.getState()),e._subscription=t.subscribe(t=>{e.state=t})},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=(o=>{o.mixin(s),o.prototype.$watchAsStore=e,o.prototype.$store=t}); | ||
function e(e,t={immediate:1}){const o=this,r=effector.createEvent(),s=effector.createStore({});let i;s.on(r,(e,t)=>t);const c=()=>{i=o.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return o._data?c():o.$once('hook:created',c),s}function t(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}Object.defineProperty(exports,'__esModule',{value:1});var o,r=(o=require('vue'))&&'object'==typeof o&&'default'in o?o.default:o,effector=require('effector');const s={created(){const e=this;let t=e.$options.effector;'function'==typeof t&&(t=t.call(e)),t&&(effector.invariant(effector.isStore(t),'effector-vue: Property should Store, but you passed %s',t),r.util.defineReactive(e,"state",t.getState()),e._subscription=t.subscribe(t=>{e.state=t}))},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=(o=>{o.mixin(s),o.prototype.$watchAsStore=e,o.prototype.$store=t}); | ||
//# sourceMappingURL=effector-vue.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
function t(t,e={immediate:1}){const o=this,s=i(),r=c({});let n;r.on(s,(t,e)=>e);const u=()=>{n=o.$watch(t,(t,e)=>{s({oldValue:e,newValue:t})},e)};return o._data?u():o.$once('hook:created',u),r}function e(t){return this.$watchAsStore(t).map(({newValue:t})=>t)}import o from'vue';import{invariant as s,isStore as r,createEvent as i,createStore as c}from'effector';const n={created(){const t=this;let e=t.$options.effector;'function'==typeof e&&(e=e.call(t)),s(r(e),'effector-vue: Property should Store, but you passed %s',e),o.util.defineReactive(t,"state",e.getState()),t._subscription=e.subscribe(e=>{t.state=e})},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}},u=o=>{o.mixin(n),o.prototype.$watchAsStore=t,o.prototype.$store=e};export{u as VueEffector}; | ||
function t(t,e={immediate:1}){const o=this,s=i(),r=c({});let n;r.on(s,(t,e)=>e);const u=()=>{n=o.$watch(t,(t,e)=>{s({oldValue:e,newValue:t})},e)};return o._data?u():o.$once('hook:created',u),r}function e(t){return this.$watchAsStore(t).map(({newValue:t})=>t)}import o from'vue';import{invariant as s,isStore as r,createEvent as i,createStore as c}from'effector';const n={created(){const t=this;let e=t.$options.effector;'function'==typeof e&&(e=e.call(t)),e&&(s(r(e),'effector-vue: Property should Store, but you passed %s',e),o.util.defineReactive(t,"state",e.getState()),t._subscription=e.subscribe(e=>{t.state=e}))},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}},u=o=>{o.mixin(n),o.prototype.$watchAsStore=t,o.prototype.$store=e};export{u as VueEffector}; | ||
//# sourceMappingURL=effector-vue.es.js.map |
@@ -1,2 +0,2 @@ | ||
return e=this,t=function(e,t,effector){function o(e,t={immediate:1}){const o=this,r=effector.createEvent(),i=effector.createStore({});let n;i.on(r,(e,t)=>t);const s=()=>{n=o.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return o._data?s():o.$once('hook:created',s),i}function r(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}t=t&&t.hasOwnProperty('default')?t.default:t;const i={created(){const e=this;let o=e.$options.effector;'function'==typeof o&&(o=o.call(e)),effector.invariant(effector.isStore(o),'effector-vue: Property should Store, but you passed %s',o),t.util.defineReactive(e,"state",o.getState()),e._subscription=o.subscribe(t=>{e.state=t})},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};e.VueEffector=(e=>{e.mixin(i),e.prototype.$watchAsStore=o,e.prototype.$store=r}),Object.defineProperty(e,'__esModule',{value:1})},void('object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e=e||self).effectorVue={},e.Vue,e.effector));var e,t; | ||
return e=this,t=function(e,t,effector){function o(e,t={immediate:1}){const o=this,r=effector.createEvent(),i=effector.createStore({});let n;i.on(r,(e,t)=>t);const s=()=>{n=o.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return o._data?s():o.$once('hook:created',s),i}function r(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}t=t&&t.hasOwnProperty('default')?t.default:t;const i={created(){const e=this;let o=e.$options.effector;'function'==typeof o&&(o=o.call(e)),o&&(effector.invariant(effector.isStore(o),'effector-vue: Property should Store, but you passed %s',o),t.util.defineReactive(e,"state",o.getState()),e._subscription=o.subscribe(t=>{e.state=t}))},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};e.VueEffector=(e=>{e.mixin(i),e.prototype.$watchAsStore=o,e.prototype.$store=r}),Object.defineProperty(e,'__esModule',{value:1})},void('object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e=e||self).effectorVue={},e.Vue,e.effector));var e,t; | ||
//# sourceMappingURL=effector-vue.umd.js.map |
{ | ||
"name": "effector-vue", | ||
"version": "0.18.4", | ||
"version": "0.18.5", | ||
"description": "Vue bindings for effector", | ||
@@ -5,0 +5,0 @@ "main": "effector-vue.cjs.js", |
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
16343