effector-vue
Advanced tools
Comparing version 20.3.3 to 20.4.0
@@ -1,2 +0,2 @@ | ||
'use strict';function e(e,t){void 0===t&&(t={immediate:1});var r=this,o=n.createEvent(),i=n.createStore({});i.on(o,(function(e,t){return t}));var c=function(){r.$watch(e,(function(e,t){o({oldValue:t,newValue:e})}),t)};return r._data?c():r.$once('hook:created',c),i}function t(e){return this.$watchAsStore(e).map((function(e){return e.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var r,o=(r=require('vue'))&&'object'==typeof r&&'default'in r?r.default:r,n=require('effector/compat'),i={created:function(){var e=this,t=e.$options.effector;if('function'==typeof t&&(t=t.call(e)),t)if(n.is.store(t))o.util.defineReactive(e,"state",t.getState()),e._subscription=t.subscribe((function(t){e.state=t}));else{if('object'!=typeof t||null===t)throw Error('property should be Store');var r=n.createStoreObject(t);for(var i in t)o.util.defineReactive(e,i,r.defaultState[i]);e._subscription=r.subscribe((function(t){for(var r in t)e[r]=t[r]}))}},beforeDestroy:function(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=function(r){r.mixin(i),r.prototype.$watchAsStore=e,r.prototype.$store=t},exports.createComponent=function(e,t){return o.extend(Object.assign({},e,t&&{effector:function(){return t}}))}; | ||
'use strict';function e(e,t){void 0===t&&(t={immediate:1});var r=this,o=n.createEvent(),i=n.createStore({});i.on(o,(function(e,t){return t}));var c=function(){r.$watch(e,(function(e,t){o({oldValue:t,newValue:e})}),t)};return r._data?c():r.$once('hook:created',c),i}function t(e){return this.$watchAsStore(e).map((function(e){return e.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var r,o=(r=require('vue'))&&'object'==typeof r&&'default'in r?r.default:r,n=require('effector/compat'),i={beforeCreate:function(){var e=this,t=e.$options.effector;if('function'==typeof t&&(t=t.call(e)),t)if(n.is.store(t))o.util.defineReactive(e,"state",t.getState()),e._subscription=t.watch((function(t){e.state=t}));else{if('object'!=typeof t||null===t)throw Error('property should be Store');var r=n.createStoreObject(t);for(var i in t)o.util.defineReactive(e,i,r.defaultState[i]);e._subscription=r.watch((function(t){for(var r in t)e[r]=t[r]}))}},beforeDestroy:function(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=function(r){r.mixin(i),r.prototype.$watchAsStore=e,r.prototype.$store=t},exports.createComponent=function(e,t){return o.extend(Object.assign({},e,t&&{effector:function(){return t}}))}; | ||
//# sourceMappingURL=compat.js.map |
@@ -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;if('function'==typeof t&&(t=t.call(e)),t)if(effector.is.store(t))r.util.defineReactive(e,"state",t.getState()),e._subscription=t.subscribe(t=>{e.state=t});else{if('object'!=typeof t||null===t)throw Error('property should be Store');{const o=effector.createStoreObject(t);for(const s in t)r.util.defineReactive(e,s,o.defaultState[s]);e._subscription=o.subscribe(t=>{for(const o in t)e[o]=t[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=o=>{o.mixin(s),o.prototype.$watchAsStore=e,o.prototype.$store=t},exports.createComponent=(e,t)=>r.extend(Object.assign({},e,t&&{effector:()=>t})); | ||
function e(e,t={immediate:1}){const o=this,r=effector.createEvent(),i=effector.createStore({});let s;i.on(r,(e,t)=>t);const c=()=>{s=o.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return o._data?c():o.$once('hook:created',c),i}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 i={beforeCreate(){const e=this;let t=e.$options.effector;if('function'==typeof t&&(t=t.call(e)),t)if(effector.is.store(t))r.util.defineReactive(e,"state",t.getState()),e._subscription=t.watch(t=>{e.state=t});else{if('object'!=typeof t||null===t)throw Error('property should be Store');{const o=effector.createStoreObject(t);for(const i in t)r.util.defineReactive(e,i,o.defaultState[i]);e._subscription=o.watch(t=>{for(const o in t)e[o]=t[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};exports.VueEffector=o=>{o.mixin(i),o.prototype.$watchAsStore=e,o.prototype.$store=t},exports.createComponent=(e,t)=>r.extend(Object.assign({},e,t&&{effector:()=>t})); | ||
//# sourceMappingURL=effector-vue.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
function t(t,e){return r.extend(Object.assign({},t,e&&{effector:()=>e}))}function e(t,e={immediate:1}){const o=this,r=n(),i=c({});let s;i.on(r,(t,e)=>e);const u=()=>{s=o.$watch(t,(t,e)=>{r({oldValue:e,newValue:t})},e)};return o._data?u():o.$once('hook:created',u),i}function o(t){return this.$watchAsStore(t).map(({newValue:t})=>t)}import r from'vue';import{is as i,createStoreObject as s,createEvent as n,createStore as c}from'effector';const u={created(){const t=this;let e=t.$options.effector;if('function'==typeof e&&(e=e.call(t)),e)if(i.store(e))r.util.defineReactive(t,"state",e.getState()),t._subscription=e.subscribe(e=>{t.state=e});else{if('object'!=typeof e||null===e)throw Error('property should be Store');{const o=s(e);for(const i in e)r.util.defineReactive(t,i,o.defaultState[i]);t._subscription=o.subscribe(e=>{for(const o in e)t[o]=e[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}},f=t=>{t.mixin(u),t.prototype.$watchAsStore=e,t.prototype.$store=o};export{f as VueEffector,t as createComponent}; | ||
function t(t,e){return r.extend(Object.assign({},t,e&&{effector:()=>e}))}function e(t,e={immediate:1}){const o=this,r=s(),i=c({});let n;i.on(r,(t,e)=>e);const f=()=>{n=o.$watch(t,(t,e)=>{r({oldValue:e,newValue:t})},e)};return o._data?f():o.$once('hook:created',f),i}function o(t){return this.$watchAsStore(t).map(({newValue:t})=>t)}import r from'vue';import{is as i,createStoreObject as n,createEvent as s,createStore as c}from'effector';const f={beforeCreate(){const t=this;let e=t.$options.effector;if('function'==typeof e&&(e=e.call(t)),e)if(i.store(e))r.util.defineReactive(t,"state",e.getState()),t._subscription=e.watch(e=>{t.state=e});else{if('object'!=typeof e||null===e)throw Error('property should be Store');{const o=n(e);for(const i in e)r.util.defineReactive(t,i,o.defaultState[i]);t._subscription=o.watch(e=>{for(const o in e)t[o]=e[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}},a=t=>{t.mixin(f),t.prototype.$watchAsStore=e,t.prototype.$store=o};export{a as VueEffector,t as createComponent}; | ||
//# sourceMappingURL=effector-vue.es.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=e||self).effectorVue={},e.Vue,e.effector)})(this,(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;if('function'==typeof o&&(o=o.call(e)),o)if(effector.is.store(o))t.util.defineReactive(e,"state",o.getState()),e._subscription=o.subscribe(t=>{e.state=t});else{if('object'!=typeof o||null===o)throw Error('property should be Store');{const r=effector.createStoreObject(o);for(const i in o)t.util.defineReactive(e,i,r.defaultState[i]);e._subscription=r.subscribe(t=>{for(const o in t)e[o]=t[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};e.VueEffector=e=>{e.mixin(i),e.prototype.$watchAsStore=o,e.prototype.$store=r},e.createComponent=(e,o)=>t.extend(Object.assign({},e,o&&{effector:()=>o})),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=e||self).effectorVue={},e.Vue,e.effector)})(this,(function(e,t,effector){function o(e,t={immediate:1}){const o=this,r=effector.createEvent(),n=effector.createStore({});let i;n.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),n}function r(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}t=t&&t.hasOwnProperty('default')?t.default:t;const n={beforeCreate(){const e=this;let o=e.$options.effector;if('function'==typeof o&&(o=o.call(e)),o)if(effector.is.store(o))t.util.defineReactive(e,"state",o.getState()),e._subscription=o.watch(t=>{e.state=t});else{if('object'!=typeof o||null===o)throw Error('property should be Store');{const r=effector.createStoreObject(o);for(const n in o)t.util.defineReactive(e,n,r.defaultState[n]);e._subscription=r.watch(t=>{for(const o in t)e[o]=t[o]})}}},beforeDestroy(){this._subscription&&this._subscription.unsubscribe()}};e.VueEffector=e=>{e.mixin(n),e.prototype.$watchAsStore=o,e.prototype.$store=r},e.createComponent=(e,o)=>t.extend(Object.assign({},e,o&&{effector:()=>o})),Object.defineProperty(e,'__esModule',{value:1})})); | ||
//# sourceMappingURL=effector-vue.umd.js.map |
{ | ||
"name": "effector-vue", | ||
"version": "20.3.3", | ||
"version": "20.4.0", | ||
"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
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
41676