@zodiac-ui/ng-observable
Version:
Create powerful reactive components with Angular. AoT compatible and Ivy ready.
2 lines • 7.89 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("@angular/core"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@zodiac-ui/ng-observable",["exports","rxjs","@angular/core","rxjs/operators"],e):e(((t=t||self)["zodiac-ui"]=t["zodiac-ui"]||{},t["zodiac-ui"]["ng-observable"]={}),t.rxjs,t.ng.core,t.rxjs.operators)}(this,function(t,e,n,r){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function c(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),c=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return c}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}var a=Symbol(),s=function(t){function e(e){var n=this.constructor;t.call(this);return Object.setPrototypeOf(e,n.prototype)}return i(e,t),e}(Function),p=function(t){function n(n){var r=t.call(this,n||function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;0===n?r.next():1===n?r.next(t[0]):r.next(t)})||this;return Object.assign(r,new e.Subject),r}var r;return i(n,t),n[a]=(r=n,void[e.Observable,e.Subject].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(e){Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e)||{})})})),n}(s);var h=function(){function t(){}return t.prototype.ngOnChanges=function(t){this.ngOnChanges.next([this,t])},t.prototype.ngOnInit=function(){this.ngOnInit.next(this)},t.prototype.ngDoCheck=function(){this.ngDoCheck.next(this)},t.prototype.ngAfterContentInit=function(){this.ngAfterContentInit.next(this)},t.prototype.ngAfterContentChecked=function(){this.ngAfterContentChecked.next(this)},t.prototype.ngAfterViewInit=function(){this.ngAfterViewInit.next(this)},t.prototype.ngAfterViewChecked=function(){this.ngAfterViewChecked.next(this)},t.prototype.ngOnDestroy=function(){this.ngOnDestroy.next(this)},t[a]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.length,r=0;n--;)r+=t[n];return r}.apply(void 0,f(t));return function(t){1&n&&(t.prototype.ngOnChanges=new p(t.prototype.ngOnChanges)),2&n&&(t.prototype.ngOnInit=new p(t.prototype.ngOnInit)),4&n&&(t.prototype.ngDoCheck=new p(t.prototype.ngDoCheck)),8&n&&(t.prototype.ngAfterContentInit=new p(t.prototype.ngAfterContentInit)),16&n&&(t.prototype.ngAfterContentChecked=new p(t.prototype.ngAfterContentChecked)),32&n&&(t.prototype.ngAfterViewInit=new p(t.prototype.ngAfterViewInit)),64&n&&(t.prototype.ngAfterViewChecked=new p(t.prototype.ngAfterViewChecked)),128&n&&(t.prototype.ngOnDestroy=new p(t.prototype.ngOnDestroy))}}(255)(t),t}(),l={REATTACH:0,DETACH:1};l[l.REATTACH]="REATTACH",l[l.DETACH]="DETACH";var y=new n.InjectionToken("STATE_CHANGE_STRATEGY");function g(t){return typeof t&&"function"==typeof t.unsubscribe}var v=function(t){function r(){var n=this,r=new e.Subscription;return(n=t.call(this,function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return function(){for(var r,o,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];try{for(var f=c(i),a=f.next();!a.done;a=f.next()){var s=a.value;t.add(e.from(s).subscribe(function(t){var e,r;try{for(var o=c(n),i=o.next();!i.done;i=o.next()){var u=i.value;"function"==typeof u?u(t):u.next(t)}}catch(f){e={error:f}}finally{try{i&&!i.done&&(r=o["return"])&&r.call(o)}finally{if(e)throw e.error}}}))}}catch(p){r={error:p}}finally{try{a&&!a.done&&(o=f["return"])&&o.call(f)}finally{if(r)throw r.error}}}}}(r))||this).sub=r,n}return i(r,t),Object.defineProperty(r.prototype,"sink",{set:function(t){var n,r,o,i=this;if(t)if(null==(o=t)||"function"==typeof o||"function"==typeof o.unsubscribe)this.sub.add(t);else if(Array.isArray(t))try{for(var u=c(t),f=u.next();!f.done;f=u.next()){var a=f.value;this.sink=a}}catch(s){n={error:s}}finally{try{f&&!f.done&&(r=u["return"])&&r.call(u)}finally{if(n)throw n.error}}else this.sink=e.from(t).subscribe(function(t){i.sink=t})},enumerable:!0,configurable:!0}),r.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.sink=t},r.prototype.complete=function(){this.sub.unsubscribe()},r.prototype.ngOnDestroy=function(){this.complete()},r.decorators=[{type:n.Injectable}],r.ctorParameters=function(){return[]},r}(s),d=function(t){function e(e,n){var r=t.call(this,Object.create(e))||this;return r.valueRef=e,r.next=function(t){r.patchValue(t),n()},r.patchValue=function(n){Object.assign(e,n),t.prototype.next.call(r,Object.create(e))},r}return i(e,t),e}(e.BehaviorSubject),b=function(){function t(t,e){this.stream=new v,this.cdr=e,this.strategy=t,this.checkNoChanges=n.isDevMode()}return t.prototype.create=function(t){var n=this.cdr,o=this.strategy,i=this.stream,c=this.checkNoChanges,u=new p,f=new d(t,u),a=o===l.DETACH;if(n){var s=function(){n.detectChanges(),c&&n.checkNoChanges()};a?n.detach():n.reattach(),Promise.resolve().then(function(){a&&s(),i(s)(r.debounceTime(0,e.asapScheduler)(u))})}return f},t.prototype.ngOnDestroy=function(){this.stream.complete()},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:l,decorators:[{type:n.Inject,args:[y]}]},{type:n.ChangeDetectorRef,decorators:[{type:n.Optional}]}]},t}();function C(t){return t}function O(t){return function(e,n){var r,o,i;r=e,o=n,i=t,Object.defineProperty(r,o,{set:function(){var t=i();Object.defineProperty(this,o,{get:function(){return t(Object.create(this))},enumerable:!0})},enumerable:!0,configurable:!0})}}function A(t,e,n){var r=t[n];t[n]=new p(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this[e].apply(this,t),r.apply(this,t)})}function w(){return function(t,e){return A(t,e,"ngOnChanges")}}function x(){return function(t,e){return A(t,e,"ngOnInit")}}function j(){return function(t,e){return A(t,e,"ngAfterContentChecked")}}function k(){return function(t,e){return A(t,e,"ngAfterViewChecked")}}function m(t,n,o,i){void 0===i&&(i=[r.filter(function(e){return e===t})]);var c=t[n];if(o&&i.push(r.take(1)),e.isObservable(c))return c.pipe.apply(c,f(i));throw console.error(n+" is not an observable! Error context: ",t),new Error}function I(t){return m(t,"ngDoCheck")}function S(t){return m(t,"ngAfterContentInit",!0)}function D(t){return m(t,"ngAfterViewInit",!0)}function T(t){return m(t,"ngOnDestroy",!0)}var E=C(O),N=C(w),V=C(x),_=C(I),P=C(S),H=C(j),R=C(D),z=C(k),G=C(T);t.Computed=E,t.InvokeSubject=p,t.NgAfterContentChecked=H,t.NgAfterContentInit=P,t.NgAfterViewChecked=z,t.NgAfterViewInit=R,t.NgDoCheck=_,t.NgObservable=h,t.NgOnChanges=N,t.NgOnDestroy=G,t.NgOnInit=V,t.STATE_CHANGE_STRATEGY=y,t.State=d,t.StateChangeStrategy=l,t.StateFactory=b,t.Stream=v,t.unsubscribe=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var o=c(n),i=o.next();!i.done;i=o.next()){var u=i.value;"function"==typeof u.complete&&u.complete(),g(u)&&u.unsubscribe()}}catch(f){t={error:f}}finally{try{i&&!i.done&&(e=o["return"])&&e.call(o)}finally{if(t)throw t.error}}},t.useStateChangeStrategy=function(t){return{provide:y,useValue:t}},t.ɵa=s,t.ɵb=C,t.ɵc=O,t.ɵd=w,t.ɵe=x,t.ɵf=j,t.ɵg=k,t.ɵh=I,t.ɵi=S,t.ɵj=D,t.ɵk=T,t.ɵl=m,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=zodiac-ui-ng-observable.umd.min.js.map