Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uirouter/rx

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uirouter/rx - npm Package Compare versions

Comparing version 0.4.5 to 0.5.0-alpha.1

4

_bundles/ui-router-rx.min.js
/**
* Reactive extensions for UI-Router
* @version v0.4.5
* @version v0.5.0-alpha.1
* @link https://github.com/ui-router/rx#readme
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("rxjs/add/operator/mergeMap"),require("rxjs/add/operator/map"),require("rxjs/ReplaySubject")):"function"==typeof define&&define.amd?define(["exports","rxjs/add/operator/mergeMap","rxjs/add/operator/map","rxjs/ReplaySubject"],r):r(e["@uirouter/rx"]=e["@uirouter/rx"]||{},null,null,e.Rx)}(this,function(e,r,t,n){"use strict";var s=function(){function e(e){function r(r,t){var n={currentStates:e.stateRegistry.get(),registered:[],deregistered:[]};r&&(n[r]=t),u.next(n)}this.name="@uirouter/rx",this.deregisterFns=[];var t=new n.ReplaySubject(1),s=t.mergeMap(function(e){return e.promise.then(function(){return e})}),i=s.map(function(e){return e.params()}),u=new n.ReplaySubject(1);this.deregisterFns.push(e.transitionService.onStart({},function(e){return t.next(e)})),this.deregisterFns.push(e.stateRegistry.onStatesChanged(r)),r(null,null),Object.assign(e.globals,{start$:t,success$:s,params$:i,states$:u})}return e.prototype.dispose=function(){this.deregisterFns.forEach(function(e){return e()}),this.deregisterFns=[]},e}(),i=s;e.UIRouterRx=s,e.UIRouterRxPlugin=i,Object.defineProperty(e,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs/operators")):"function"==typeof define&&define.amd?define(["exports","rxjs/operators"],e):e(t["@uirouter/rx"]={},null)}(this,function(t,e){"use strict";var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};function n(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t){return"function"==typeof t}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;o=t},get useDeprecatedSynchronousErrorHandling(){return o}};function u(t){setTimeout(function(){throw t})}var c={closed:!0,next:function(t){},error:function(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;u(t)},complete:function(){}},h=Array.isArray||function(t){return t&&"number"==typeof t.length};function a(t){return null!=t&&"object"==typeof t}var p,l={e:{}};function f(){try{return p.apply(this,arguments)}catch(t){return l.e=t,l}}function d(t){return p=t,f}var b=function(t){function e(r){var n=t.call(this,r?r.length+" errors occurred during unsubscription:\n "+r.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"")||this;return n.errors=r,n.name="UnsubscriptionError",Object.setPrototypeOf(n,e.prototype),n}return n(e,t),e}(Error),y=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this._parent,n=this._parents,o=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,c=n?n.length:0;r;)r.remove(this),r=++u<c&&n[u]||null;if(i(o))d(o).call(this)===l&&(e=!0,t=t||(l.e instanceof b?v(l.e.errors):[l.e]));if(h(s))for(u=-1,c=s.length;++u<c;){var p=s[u];if(a(p))if(d(p.unsubscribe).call(p)===l){e=!0,t=t||[];var f=l.e;f instanceof b?t=t.concat(v(f.errors)):t.push(f)}}if(e)throw new b(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this._parent,r=this._parents;e&&e!==t?r?-1===r.indexOf(t)&&r.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function v(t){return t.reduce(function(t,e){return t.concat(e instanceof b?e.errors:e)},[])}var w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber",_=function(t){function e(e,r,n){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=c;break;case 1:if(!e){i.destination=c;break}if("object"==typeof e){if(m(e)){var o=e[w]();i.syncErrorThrowable=o.syncErrorThrowable,i.destination=o,o.add(i)}else i.syncErrorThrowable=!0,i.destination=new E(i,e);break}default:i.syncErrorThrowable=!0,i.destination=new E(i,e,r,n)}return i}return n(e,t),e.prototype[w]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(y),E=function(t){function e(e,r,n,o){var s,u=t.call(this)||this;u._parentSubscriber=e;var h=u;return i(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==c&&(i((h=Object.create(r)).unsubscribe)&&u.add(h.unsubscribe.bind(h)),h.unsubscribe=u.unsubscribe.bind(u))),u._context=h,u._next=s,u._error=n,u._complete=o,u}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=s.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):u(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;u(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw t;u(t)}},e.prototype.__tryOrSetError=function(t,e,r){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,r)}catch(e){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(u(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(_);function m(t){return t instanceof _||"syncErrorThrowable"in t&&t[w]}var g="function"==typeof Symbol&&Symbol.observable||"@@observable";function S(){}var x=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=function(t,e,r){if(t){if(t instanceof _)return t;if(t[w])return t[w]()}return t||e||r?new _(t,e,r):new _(c)}(t,e,r);if(n?n.call(i,this.source):i.add(this.source||!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=T(e))(function(e,n){var i;i=r.subscribe(function(e){try{t(e)}catch(t){n(t),i&&i.unsubscribe()}},n,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[g]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 0===e.length?this:((t=e)?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:S)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=T(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function T(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var I=function(t){function e(){var r=t.call(this,"object unsubscribed")||this;return r.name="ObjectUnsubscribedError",Object.setPrototypeOf(r,e.prototype),r}return n(e,t),e}(Error),O=function(t){function e(e,r){var n=t.call(this)||this;return n.subject=e,n.subscriber=r,n.closed=!1,n}return n(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);-1!==r&&e.splice(r,1)}}},e}(y),N=function(t){function e(e){var r=t.call(this,e)||this;return r.destination=e,r}return n(e,t),e}(_),P=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return n(e,t),e.prototype[w]=function(){return new N(this)},e.prototype.lift=function(t){var e=new j(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new I;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new I;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new I;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new I;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new I;return this.hasError?(t.error(this.thrownError),y.EMPTY):this.isStopped?(t.complete(),y.EMPTY):(this.observers.push(t),new O(this,t))},e.prototype.asObservable=function(){var t=new x;return t.source=this,t},e.create=function(t,e){return new j(t,e)},e}(x),j=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):y.EMPTY},e}(P);var k=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,r){return t.call(this)||this}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(y)),A=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return n(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(k),D=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}(),M=function(t){function e(r,n){void 0===n&&(n=D.now);var i=t.call(this,r,function(){return e.delegate&&e.delegate!==i?e.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return n(e,t),e.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(D),H=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(M))(A),V=new x(function(t){return t.complete()});function Y(t){return t?function(t){return new x(function(e){return t.schedule(function(){return e.complete()})})}(t):V}var F=function(t){return function(e){for(var r=0,n=t.length;r<n&&!e.closed;r++)e.next(t[r]);e.closed||e.complete()}};function U(t,e){return new x(e?function(r){var n=new y,i=0;return n.add(e.schedule(function(){i!==t.length?(r.next(t[i++]),r.closed||n.add(this.schedule())):r.complete()})),n}:F(t))}function C(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r,n=t[t.length-1];switch((r=n)&&"function"==typeof r.schedule?t.pop():n=void 0,t.length){case 0:return Y(n);case 1:return n?U(t,n):function(t){var e=new x(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}(t[0]);default:return U(t,n)}}function R(t){var e=t.error;t.subscriber.error(e)}var W=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){var t,e;switch(this.kind){case"N":return C(this.value);case"E":return t=this.error,new x(e?function(r){return e.schedule(R,0,{error:t,subscriber:r})}:function(e){return e.error(t)});case"C":return Y()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),q=function(t){function e(e,r,n){void 0===n&&(n=0);var i=t.call(this,e)||this;return i.scheduler=r,i.delay=n,i}return n(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new z(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(W.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(W.createError(t))},e.prototype._complete=function(){this.scheduleMessage(W.createComplete())},e}(_),z=function(){return function(t,e){this.notification=t,this.destination=e}}(),$=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return n(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new B(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new I;if(this.isStopped||this.hasError?e=y.EMPTY:(this.observers.push(t),e=new O(this,t)),i&&t.add(t=new q(t,i)),r)for(var s=0;s<o&&!t.closed;s++)t.next(n[s]);else for(s=0;s<o&&!t.closed;s++)t.next(n[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||H).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,o=0;o<i&&!(t-n[o].time<r);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&n.splice(0,o),n},e}(P),B=function(){return function(t,e){this.time=t,this.value=e}}();Error,Error,Error;var G=function(){function t(t){this.name="@uirouter/rx",this.deregisterFns=[];var r=new $(1),n=r.pipe(e.mergeMap(function(t){return t.promise.then(function(){return t})})),i=n.pipe(e.map(function(t){return t.params()})),o=new $(1);function s(e,r){var n={currentStates:t.stateRegistry.get(),registered:[],deregistered:[]};e&&(n[e]=r),o.next(n)}this.deregisterFns.push(t.transitionService.onStart({},function(t){return r.next(t)})),this.deregisterFns.push(t.stateRegistry.onStatesChanged(s)),s(null,null),Object.assign(t.globals,{start$:r,success$:n,params$:i,states$:o})}return t.prototype.dispose=function(){this.deregisterFns.forEach(function(t){return t()}),this.deregisterFns=[]},t}(),J=G;t.UIRouterRx=G,t.UIRouterRxPlugin=J,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ui-router-rx.min.js.map

@@ -0,1 +1,16 @@

# 0.5.0-alpha.1 (2018-05-07)
[Compare `@uirouter/rx` versions 0.4.5 and 0.5.0-alpha.1](https://github.com/ui-router/rx/compare/0.4.5...0.5.0-alpha.1)
### Features
* upgrade to rxjs 6 ([46b8158](https://github.com/ui-router/rx/commit/46b8158))
### BREAKING CHANGES
* rxjs 6.0.0 or higher is now required to use this module
## 0.4.5 (2017-10-17)

@@ -2,0 +17,0 @@ [Compare `@uirouter/rx` versions 0.4.4 and 0.4.5](https://github.com/ui-router/rx/compare/0.4.4...0.4.5)

@@ -1,1 +0,1 @@

export * from "./ui-router-rx";
export * from './ui-router-rx';

@@ -1,2 +0,2 @@

export * from "./ui-router-rx";
export * from './ui-router-rx';
//# sourceMappingURL=index.js.map
/** @module rx */
/** */
import "rxjs/add/operator/mergeMap";
import "rxjs/add/operator/map";
import { Observable } from "rxjs/Observable";
import { Transition, UIRouter, StateDeclaration, UIRouterPlugin } from "@uirouter/core";
import { Observable } from 'rxjs';
import { Transition, UIRouter, StateDeclaration, UIRouterPlugin } from '@uirouter/core';
export interface StatesChangedEvent {

@@ -8,0 +6,0 @@ currentStates: StateDeclaration[];

/** @module rx */
/** */
import "rxjs/add/operator/mergeMap";
import "rxjs/add/operator/map";
import { ReplaySubject } from "rxjs/ReplaySubject";
import { ReplaySubject } from 'rxjs';
import { map, mergeMap } from 'rxjs/operators';
/** Augments UIRouterGlobals with observables for transition starts, successful transitions, and state parameters */
var UIRouterRx = (function () {
var UIRouterRx = /** @class */ (function () {
function UIRouterRx(router) {

@@ -12,4 +11,4 @@ this.name = '@uirouter/rx';

var start$ = new ReplaySubject(1);
var success$ = start$.mergeMap(function (t) { return t.promise.then(function () { return t; }); });
var params$ = success$.map(function (transition) { return transition.params(); });
var success$ = start$.pipe(mergeMap(function (t) { return t.promise.then(function () { return t; }); }));
var params$ = success$.pipe(map(function (transition) { return transition.params(); }));
var states$ = new ReplaySubject(1);

@@ -20,3 +19,3 @@ function onStatesChangedEvent(event, states) {

registered: [],
deregistered: []
deregistered: [],
};

@@ -23,0 +22,0 @@ if (event)

@@ -1,1 +0,1 @@

export * from "./ui-router-rx";
export * from './ui-router-rx';
/** @module rx */
/** */
import "rxjs/add/operator/mergeMap";
import "rxjs/add/operator/map";
import { Observable } from "rxjs/Observable";
import { Transition, UIRouter, StateDeclaration, UIRouterPlugin } from "@uirouter/core";
import { Observable } from 'rxjs';
import { Transition, UIRouter, StateDeclaration, UIRouterPlugin } from '@uirouter/core';
export interface StatesChangedEvent {

@@ -8,0 +6,0 @@ currentStates: StateDeclaration[];

@@ -5,14 +5,13 @@ "use strict";

/** */
require("rxjs/add/operator/mergeMap");
require("rxjs/add/operator/map");
var ReplaySubject_1 = require("rxjs/ReplaySubject");
var rxjs_1 = require("rxjs");
var operators_1 = require("rxjs/operators");
/** Augments UIRouterGlobals with observables for transition starts, successful transitions, and state parameters */
var UIRouterRx = (function () {
var UIRouterRx = /** @class */ (function () {
function UIRouterRx(router) {
this.name = '@uirouter/rx';
this.deregisterFns = [];
var start$ = new ReplaySubject_1.ReplaySubject(1);
var success$ = start$.mergeMap(function (t) { return t.promise.then(function () { return t; }); });
var params$ = success$.map(function (transition) { return transition.params(); });
var states$ = new ReplaySubject_1.ReplaySubject(1);
var start$ = new rxjs_1.ReplaySubject(1);
var success$ = start$.pipe(operators_1.mergeMap(function (t) { return t.promise.then(function () { return t; }); }));
var params$ = success$.pipe(operators_1.map(function (transition) { return transition.params(); }));
var states$ = new rxjs_1.ReplaySubject(1);
function onStatesChangedEvent(event, states) {

@@ -22,3 +21,3 @@ var changeEvent = {

registered: [],
deregistered: []
deregistered: [],
};

@@ -25,0 +24,0 @@ if (event)

{
"name": "@uirouter/rx",
"version": "0.4.5",
"version": "0.5.0-alpha.1",
"description": "Reactive extensions for UI-Router",
"scripts": {
"clean": "shx rm -rf lib lib-esm _bundles",
"clean": "shx rm -rf lib lib-esm _bundles yarn-error.log",
"compile": "npm run clean && tsc && tsc -outDir lib-esm -m es6",
"bundle": "rollup -c && rollup -c --environment MINIFY",
"build": "npm run compile && npm run bundle && npm run fixmaps:lib && npm run fixmaps:bundle",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "run-s compile bundle fixmaps:*",
"test": "npm run build && karma start",
"fixmaps:lib": "tweak_sourcemap_paths -a --include 'lib/**/*.js.map' 'lib-esm/**/*.js.map'",
"fixmaps:bundle": "tweak_sourcemap_paths -p ../src --include '_bundles/**/*.js.map'",
"release": "release",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"precommit": "pretty-quick --staged"
},

@@ -36,23 +37,29 @@ "repository": {

"@uirouter/core": ">=5.0.0",
"rxjs": "^5.0.3"
"rxjs": "^6.0.0"
},
"devDependencies": {
"@uirouter/core": ">=5.0.0",
"@uirouter/publish-scripts": "2.0.2",
"conventional-changelog": "^1.1.0",
"conventional-changelog-cli": "^1.2.0",
"readline-sync": "^1.4.5",
"rxjs": "^5.0.3",
"shx": "^0.2.2",
"typescript": "^2.1.4"
},
"dependencies": {
"rollup": "^0.41.6",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-progress": "^0.2.1",
"@uirouter/core": "^5.0.17",
"@uirouter/publish-scripts": "2.3.13",
"husky": "^0.14.3",
"jasmine": "^3.1.0",
"karma": "^2.0.2",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.1",
"karma-mocha-reporter": "^2.2.5",
"karma-rollup-preprocessor": "^6.0.0",
"karma-super-dots-reporter": "^0.1.0",
"prettier": "^1.12.1",
"pretty-quick": "^1.4.1",
"rollup": "^0.58.1",
"rollup-plugin-async": "^1.2.0",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-progress": "^0.4.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^1.0.2",
"rollup-plugin-visualizer": "^0.2.1"
"rollup-plugin-uglify": "^3.0.0",
"rollup-plugin-visualizer": "^0.6.0",
"rxjs": "^6.1.0",
"typescript": "^2.8.3"
}
}
}
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import progress from 'rollup-plugin-progress';
import sourcemaps from 'rollup-plugin-sourcemaps';
import visualizer from 'rollup-plugin-visualizer';
import commonjs from 'rollup-plugin-commonjs';

@@ -11,4 +9,3 @@

let pkg = require('./package.json');
let banner =
`/**
let banner = `/**
* ${pkg.description}

@@ -22,12 +19,5 @@ * @version v${pkg.version}

// retain multiline comment with @license
uglifyOpts.output.comments = (node, comment) =>
comment.type === 'comment2' && /@license/i.test(comment.value);
uglifyOpts.output.comments = (node, comment) => comment.type === 'comment2' && /@license/i.test(comment.value);
let plugins = [
nodeResolve({ jsnext: true }),
progress(),
sourcemaps(),
commonjs(),
visualizer({ sourcemap: true }),
];
let plugins = [nodeResolve({ jsnext: true }), sourcemaps(), commonjs()];

@@ -49,8 +39,3 @@ if (MINIFY) plugins.push(uglify(uglifyOpts));

// except for @angular/router/src/router_config_loader
let externals = [
/^rxjs\/.*/,
/^@uirouter\/.*/,
/^@angular\/.*/,
/^angular$/,
];
let externals = [/^rxjs\/.*/, /^@uirouter\/.*/, /^@angular\/.*/, /^angular$/];
return externals.map(regex => regex.exec(id)).reduce((acc, val) => acc || !!val, false);

@@ -104,5 +89,5 @@ }

'@angular/common': 'ng.common',
}
},
};
export default CONFIG;

Sorry, the diff of this file is too big to display

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc