@storeon/angular
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -362,4 +362,7 @@ (function (global, factory) { | ||
/** @type {?} */ | ||
var originalFactory = cmpType.ngComponentDef.factory; | ||
cmpType.ngComponentDef.factory = (/** | ||
var isNg11 = !!cmpType.ɵfac; | ||
/** @type {?} */ | ||
var originalFactory = isNg11 ? cmpType.ɵfac : cmpType.ngComponentDef.factory; | ||
/** @type {?} */ | ||
var newFactory = (/** | ||
* @return {?} | ||
@@ -369,4 +372,6 @@ */ | ||
/** @type {?} */ | ||
var cmp = originalFactory(cmpType.ngComponentDef.type); | ||
var ngCompType = isNg11 ? cmpType.ɵcmp.type : cmpType.ngComponentDef.type; | ||
/** @type {?} */ | ||
var cmp = originalFactory(ngCompType); | ||
/** @type {?} */ | ||
var storeon = core.ɵɵdirectiveInject(StoreonService); | ||
@@ -383,2 +388,3 @@ config.keys.forEach((/** | ||
}); | ||
cmpType.ɵfac = newFactory; | ||
}); | ||
@@ -385,0 +391,0 @@ } |
@@ -15,3 +15,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@storeon/angular",["exports","@angular/core","rxjs","rxjs/operators"],t):t(((e=e||self).storeon=e.storeon||{},e.storeon.angular={}),e.ng.core,e.rxjs,e.rxjs.operators)}(this,(function(e,t,n,r){"use strict"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var i=new t.InjectionToken("Token for store object"),s=function(){function e(e){var t=this;this.store=e,this.state$=new n.BehaviorSubject(this.store.get()),this.unbind=this.store.on("@changed",(function(e){return t.state$.next(o({},e)),null}))}return e.prototype.useStoreon=function(e){var t;if("string"==typeof e)t=this.state$.pipe(r.pluck(e));else{if("function"!=typeof e)throw new TypeError("Unexpected type '"+typeof e+"' in select operator, expected 'string' or 'function'");t=this.state$.pipe(r.map((function(t){return e(t)})))}return t.pipe(r.distinctUntilChanged())},e.prototype.dispatch=function(e,t){this.store.dispatch(e,t)},e.prototype.ngOnDestroy=function(){this.unbind&&this.unbind()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[i]}]}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i))},token:e,providedIn:"root"}),e}();e.STOREON=i,e.StoreonService=s,e.UseStoreon=function(e){return function(n){var r=n.ngComponentDef.factory;n.ngComponentDef.factory=function(){var o=r(n.ngComponentDef.type),i=t.ɵɵdirectiveInject(s);return e.keys.forEach((function(e){return o[e]=i.useStoreon(e)})),e.dispatcher&&(o[e.dispatcher]=i.dispatch.bind(i)),o}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var i=new t.InjectionToken("Token for store object"),s=function(){function e(e){var t=this;this.store=e,this.state$=new n.BehaviorSubject(this.store.get()),this.unbind=this.store.on("@changed",(function(e){return t.state$.next(o({},e)),null}))}return e.prototype.useStoreon=function(e){var t;if("string"==typeof e)t=this.state$.pipe(r.pluck(e));else{if("function"!=typeof e)throw new TypeError("Unexpected type '"+typeof e+"' in select operator, expected 'string' or 'function'");t=this.state$.pipe(r.map((function(t){return e(t)})))}return t.pipe(r.distinctUntilChanged())},e.prototype.dispatch=function(e,t){this.store.dispatch(e,t)},e.prototype.ngOnDestroy=function(){this.unbind&&this.unbind()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[i]}]}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i))},token:e,providedIn:"root"}),e}();e.STOREON=i,e.StoreonService=s,e.UseStoreon=function(e){return function(n){var r=!!n.ɵfac,o=r?n.ɵfac:n.ngComponentDef.factory;n.ɵfac=function(){var i=r?n.ɵcmp.type:n.ngComponentDef.type,c=o(i),a=t.ɵɵdirectiveInject(s);return e.keys.forEach((function(e){return c[e]=a.useStoreon(e)})),e.dispatcher&&(c[e.dispatcher]=a.dispatch.bind(a)),c}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=storeon-angular.umd.min.js.map |
@@ -25,4 +25,7 @@ /** | ||
/** @type {?} */ | ||
const originalFactory = cmpType.ngComponentDef.factory; | ||
cmpType.ngComponentDef.factory = (/** | ||
const isNg11 = !!cmpType.ɵfac; | ||
/** @type {?} */ | ||
const originalFactory = isNg11 ? cmpType.ɵfac : cmpType.ngComponentDef.factory; | ||
/** @type {?} */ | ||
const newFactory = (/** | ||
* @return {?} | ||
@@ -32,4 +35,6 @@ */ | ||
/** @type {?} */ | ||
const cmp = originalFactory(cmpType.ngComponentDef.type); | ||
const ngCompType = isNg11 ? cmpType.ɵcmp.type : cmpType.ngComponentDef.type; | ||
/** @type {?} */ | ||
const cmp = originalFactory(ngCompType); | ||
/** @type {?} */ | ||
const storeon = directiveInject(StoreonService); | ||
@@ -46,4 +51,5 @@ config.keys.forEach((/** | ||
}); | ||
cmpType.ɵfac = newFactory; | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVvbi5kZWNvcmF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac3RvcmVvbi9hbmd1bGFyLyIsInNvdXJjZXMiOlsibGliL3N0b3Jlb24uZGVjb3JhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLGlCQUFpQixJQUFJLGVBQW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cGUuybVmYWM7XG4gICAgY29uc3Qgb3JpZ2luYWxGYWN0b3J5ID0gaXNOZzExID8gY21wVHlwZS7JtWZhYyA6IGNtcFR5cGUubmdDb21wb25lbnREZWYuZmFjdG9yeTtcbiAgICBjb25zdCBuZXdGYWN0b3J5ID0gKCkgPT4ge1xuICAgICAgY29uc3QgbmdDb21wVHlwZSA9IGlzTmcxMSA/IGNtcFR5cGUuybVjbXAudHlwZSA6IGNtcFR5cGUubmdDb21wb25lbnREZWYudHlwZTtcbiAgICAgIGNvbnN0IGNtcCA9IG9yaWdpbmFsRmFjdG9yeShuZ0NvbXBUeXBlKTtcbiAgICAgIGNvbnN0IHN0b3Jlb24gPSBkaXJlY3RpdmVJbmplY3Q8U3RvcmVvblNlcnZpY2U8U3RhdGUsIEV2ZW50cz4+KFN0b3Jlb25TZXJ2aWNlKTtcblxuICAgICAgY29uZmlnLmtleXMuZm9yRWFjaChrZXkgPT4gY21wW2tleV0gPSBzdG9yZW9uLnVzZVN0b3Jlb24oa2V5KSk7XG5cbiAgICAgIGlmIChjb25maWcuZGlzcGF0Y2hlcikge1xuICAgICAgICBjbXBbY29uZmlnLmRpc3BhdGNoZXJdID0gc3RvcmVvbi5kaXNwYXRjaC5iaW5kKHN0b3Jlb24pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gY21wO1xuICAgIH07XG5cbiAgICBjbXBUeXBlLsm1ZmFjID0gbmV3RmFjdG9yeTtcbiAgfTtcbn1cbiJdfQ== |
@@ -25,4 +25,7 @@ /** | ||
/** @type {?} */ | ||
var originalFactory = cmpType.ngComponentDef.factory; | ||
cmpType.ngComponentDef.factory = (/** | ||
var isNg11 = !!cmpType.ɵfac; | ||
/** @type {?} */ | ||
var originalFactory = isNg11 ? cmpType.ɵfac : cmpType.ngComponentDef.factory; | ||
/** @type {?} */ | ||
var newFactory = (/** | ||
* @return {?} | ||
@@ -32,4 +35,6 @@ */ | ||
/** @type {?} */ | ||
var cmp = originalFactory(cmpType.ngComponentDef.type); | ||
var ngCompType = isNg11 ? cmpType.ɵcmp.type : cmpType.ngComponentDef.type; | ||
/** @type {?} */ | ||
var cmp = originalFactory(ngCompType); | ||
/** @type {?} */ | ||
var storeon = directiveInject(StoreonService); | ||
@@ -46,4 +51,5 @@ config.keys.forEach((/** | ||
}); | ||
cmpType.ɵfac = newFactory; | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmVvbi5kZWNvcmF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Ac3RvcmVvbi9hbmd1bGFyLyIsInNvdXJjZXMiOlsibGliL3N0b3Jlb24uZGVjb3JhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLGlCQUFpQixJQUFJLGVBQWUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7Ozs7Ozs7Ozs7O0FBU25ELE1BQU0sVUFBVSxVQUFVLENBQW1ELE1BRzVFO0lBQ0M7Ozs7SUFBTyxVQUFDLE9BQU87O1lBQ1AsZUFBZSxHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUMsT0FBTztRQUN0RCxPQUFPLENBQUMsY0FBYyxDQUFDLE9BQU87OztRQUFHOztnQkFDekIsR0FBRyxHQUFHLGVBQWUsQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQzs7Z0JBRWxELE9BQU8sR0FBRyxlQUFlLENBQWdDLGNBQWMsQ0FBQztZQUU5RSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU87Ozs7WUFBQyxVQUFBLEdBQUcsSUFBSSxPQUFBLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxFQUFsQyxDQUFrQyxFQUFDLENBQUM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RvcmVvbi5kaXNwYXRjaC5iaW5kKHN0b3Jlb24pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gY21wO1xuICAgIH07XG5cbiAgICBjbXBUeXBlLsm1ZmFjID0gbmV3RmFjdG9yeTtcbiAgfTtcbn1cbiJdfQ== |
@@ -129,4 +129,7 @@ import { InjectionToken, Injectable, Inject, ɵɵdefineInjectable, ɵɵinject, ɵɵdirectiveInject } from '@angular/core'; | ||
/** @type {?} */ | ||
const originalFactory = cmpType.ngComponentDef.factory; | ||
cmpType.ngComponentDef.factory = (/** | ||
const isNg11 = !!cmpType.ɵfac; | ||
/** @type {?} */ | ||
const originalFactory = isNg11 ? cmpType.ɵfac : cmpType.ngComponentDef.factory; | ||
/** @type {?} */ | ||
const newFactory = (/** | ||
* @return {?} | ||
@@ -136,4 +139,6 @@ */ | ||
/** @type {?} */ | ||
const cmp = originalFactory(cmpType.ngComponentDef.type); | ||
const ngCompType = isNg11 ? cmpType.ɵcmp.type : cmpType.ngComponentDef.type; | ||
/** @type {?} */ | ||
const cmp = originalFactory(ngCompType); | ||
/** @type {?} */ | ||
const storeon = ɵɵdirectiveInject(StoreonService); | ||
@@ -150,2 +155,3 @@ config.keys.forEach((/** | ||
}); | ||
cmpType.ɵfac = newFactory; | ||
}); | ||
@@ -152,0 +158,0 @@ } |
@@ -142,4 +142,7 @@ import { __assign } from 'tslib'; | ||
/** @type {?} */ | ||
var originalFactory = cmpType.ngComponentDef.factory; | ||
cmpType.ngComponentDef.factory = (/** | ||
var isNg11 = !!cmpType.ɵfac; | ||
/** @type {?} */ | ||
var originalFactory = isNg11 ? cmpType.ɵfac : cmpType.ngComponentDef.factory; | ||
/** @type {?} */ | ||
var newFactory = (/** | ||
* @return {?} | ||
@@ -149,4 +152,6 @@ */ | ||
/** @type {?} */ | ||
var cmp = originalFactory(cmpType.ngComponentDef.type); | ||
var ngCompType = isNg11 ? cmpType.ɵcmp.type : cmpType.ngComponentDef.type; | ||
/** @type {?} */ | ||
var cmp = originalFactory(ngCompType); | ||
/** @type {?} */ | ||
var storeon = ɵɵdirectiveInject(StoreonService); | ||
@@ -163,2 +168,3 @@ config.keys.forEach((/** | ||
}); | ||
cmpType.ɵfac = newFactory; | ||
}); | ||
@@ -165,0 +171,0 @@ } |
{ | ||
"name": "@storeon/angular", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Storeon for Angular 🅰⚡", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
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
124828
1128