angular-observe
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -118,7 +118,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
setState('loading'); | ||
subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete); | ||
setState('loading'); | ||
function atPath(path) { | ||
@@ -125,0 +125,0 @@ var first = path.shift(); |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("angular")):"function"==typeof define&&define.amd?define(["angular"],n):"object"==typeof exports?exports.AngularObserve=n(require("angular")):e.AngularObserve=n(e.angular)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(2)},function(n,r){n.exports=e},function(e,n,r){var t=r(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),o.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,n,r,o,i){function u(e,n){var t=(n.asyncBind||n.source).split(/\s+as\s+/i),o=t.shift().split("."),u=t[0]||"$value",s=o.shift(),f=a(e,u);return function(e,n,t){function a(e){function n(e){var n=typeof e;return"boolean"===n||"number"===n||"string"===n}var r=!n(g[u])||!n(e);g[u]=e,d("active",r)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,r){if(r||e!==h){var t=f[e];if(m&&m.$destroy(),!t)return void n.empty();m=g.$new(),h=e,t(m,function(e){n.empty(),n.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,h,v,g=r.$new(!0,e);n.empty(),e.$watch(s,function(e){function n(e){var n=e.shift(),t=e;return function(e){var o=e[n];return o?r(t,o):i.fromValue()}}function r(e,r){var t=c(r);return e.length?i.switchMap.call(t,n(e)):t}v&&(v.unsubscribe(),v=null),v=r(o,e).subscribe(a,l,p),d("loading")}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(n,r){var o={},i={loading:[],active:[],error:[],complete:[]},u=[];t.forEach(n.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(t.forEach(i,function(n,r){if(n.length){c=!0;var i=t.element(n).clone();o[r]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+r+"}}"));var a=t.element(u).clone();o.active=e(a),o.complete=e(a.clone())}return o}return{restrict:"EA",scope:!0,compile:u}}])}])}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("angular")):"function"==typeof define&&define.amd?define(["angular"],n):"object"==typeof exports?exports.AngularObserve=n(require("angular")):e.AngularObserve=n(e.angular)}(this,function(e){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){e.exports=r(2)},function(n,r){n.exports=e},function(e,n,r){var t=r(1);e.exports="filearts.angularObserve";var o=t.module(e.exports,[]);o.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),o.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,n,r,o,i){function u(e,n){var t=(n.asyncBind||n.source).split(/\s+as\s+/i),o=t.shift().split("."),u=t[0]||"$value",s=o.shift(),f=a(e,u);return function(e,n,t){function a(e){function n(e){var n=typeof e;return"boolean"===n||"number"===n||"string"===n}var r=!n(g[u])||!n(e);g[u]=e,d("active",r)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,r){if(r||e!==h){var t=f[e];if(m&&m.$destroy(),!t)return void n.empty();m=g.$new(),h=e,t(m,function(e){n.empty(),n.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,h,v,g=r.$new(!0,e);n.empty(),e.$watch(s,function(e){function n(e){var n=e.shift(),t=e;return function(e){var o=e[n];return o?r(t,o):i.fromValue()}}function r(e,r){var t=c(r);return e.length?i.switchMap.call(t,n(e)):t}v&&(v.unsubscribe(),v=null),d("loading"),v=r(o,e).subscribe(a,l,p)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(n,r){var o={},i={loading:[],active:[],error:[],complete:[]},u=[];t.forEach(n.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(t.forEach(i,function(n,r){if(n.length){c=!0;var i=t.element(n).clone();o[r]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+r+"}}"));var a=t.element(u).clone();o.active=e(a),o.complete=e(a.clone())}return o}return{restrict:"EA",scope:!0,compile:u}}])}])}); |
@@ -129,7 +129,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
setState('loading'); | ||
subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete); | ||
setState('loading'); | ||
function atPath(path) { | ||
@@ -136,0 +136,0 @@ var first = path.shift(); |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("most")):"function"==typeof define&&define.amd?define(["angular","most"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("most")):e.AngularObserve=r(e.angular,e.most)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.fromPromise,e.fromValue=t.of,e.map=t.map,e.switchMap=t.switchLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,m("active",n)}function p(e){m("complete")}function l(e){g.$error=e,m("error")}function m(e,n){if(n||e!==h){var o=f[e];if(d&&d.$destroy(),!o)return void r.empty();d=g.$new(),h=e,o(d,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var d,h,v,g=n.$new(!0,e);r.empty(),e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}v&&(v.unsubscribe(),v=null),v=n(t,e).subscribe(s,l,p),m("loading")}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone();t.active=e(s),t.complete=e(s.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("most")):"function"==typeof define&&define.amd?define(["angular","most"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("most")):e.AngularObserve=r(e.angular,e.most)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.fromPromise,e.fromValue=t.of,e.map=t.map,e.switchMap=t.switchLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,m("active",n)}function p(e){m("complete")}function l(e){g.$error=e,m("error")}function m(e,n){if(n||e!==h){var o=f[e];if(d&&d.$destroy(),!o)return void r.empty();d=g.$new(),h=e,o(d,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var d,h,v,g=n.$new(!0,e);r.empty(),e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}v&&(v.unsubscribe(),v=null),m("loading"),v=n(t,e).subscribe(s,l,p)}),e.$on("$destroy",function(){v&&(v.unsubscribe(),v=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone();t.active=e(s),t.complete=e(s.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); |
@@ -129,7 +129,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
setState('loading'); | ||
subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete); | ||
setState('loading'); | ||
function atPath(path) { | ||
@@ -136,0 +136,0 @@ var first = path.shift(); |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rx")):"function"==typeof define&&define.amd?define(["angular","rx"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rx")):e.AngularObserve=r(e.angular,e.Rx)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.flatMapLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",s=t.shift(),f=a(e,u);return function(e,r,o){function a(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,v,h,g=n.$new(!0,e);r.empty(),e.$watch(s,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),h=n(t,e).subscribe(a,l,p),d("loading")}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var a=o.element(u).clone();t.active=e(a),t.complete=e(a.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rx")):"function"==typeof define&&define.amd?define(["angular","rx"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rx")):e.AngularObserve=r(e.angular,e.Rx)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.flatMapLatest}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",s=t.shift(),f=a(e,u);return function(e,r,o){function a(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,v,h,g=n.$new(!0,e);r.empty(),e.$watch(s,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t,e).subscribe(a,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function a(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var a=o.element(u).clone();t.active=e(a),t.complete=e(a.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); |
@@ -129,7 +129,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
setState('loading'); | ||
subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete); | ||
setState('loading'); | ||
function atPath(path) { | ||
@@ -136,0 +136,0 @@ var first = path.shift(); |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rxjs")):"function"==typeof define&&define.amd?define(["angular","rxjs"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rxjs")):e.AngularObserve=r(e.angular,e.rxjs)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.switchMap}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,v,h,g=n.$new(!0,e);r.empty(),e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),h=n(t,e).subscribe(s,l,p),d("loading")}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone();t.active=e(s),t.complete=e(s.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("angular"),require("rxjs")):"function"==typeof define&&define.amd?define(["angular","rxjs"],r):"object"==typeof exports?exports.AngularObserve=r(require("angular"),require("rxjs")):e.AngularObserve=r(e.angular,e.rxjs)}(this,function(e,r){return function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n={};return r.m=e,r.c=n,r.p="",r(0)}([function(e,r,n){var o=n(1),t=n(3);e.exports=n(2),o.module(e.exports).config(["asyncBindConfigProvider",function(e){e.fromPromise=t.Observable.fromPromise,e.fromValue=t.Observable.of,e.map=t.Observable.prototype.map,e.switchMap=t.Observable.prototype.switchMap}])},function(r,n){r.exports=e},function(e,r,n){var o=n(1);e.exports="filearts.angularObserve";var t=o.module(e.exports,[]);t.provider("asyncBindConfig",[function(){this.fromValue=function(){throw new Error("You need to overwrite `asyncBindConfig.fromValue`.")},this.fromPromise=function(){throw new Error("You need to overwrite `asyncBindConfig.fromPromise`.")},this.map=function(){throw new Error("You need to overwrite `asyncBindConfig.map`.")},this.switchMap=function(){throw new Error("You need to overwrite `asyncBindConfig.switchMap`.")},this.$get=function(){return this}}]),t.directive("asyncBind",["$compile","$q","$rootScope","$timeout","asyncBindConfig",function(e,r,n,t,i){function u(e,r){var o=(r.asyncBind||r.source).split(/\s+as\s+/i),t=o.shift().split("."),u=o[0]||"$value",a=t.shift(),f=s(e,u);return function(e,r,o){function s(e){function r(e){var r=typeof e;return"boolean"===r||"number"===r||"string"===r}var n=!r(g[u])||!r(e);g[u]=e,d("active",n)}function p(e){d("complete")}function l(e){g.$error=e,d("error")}function d(e,n){if(n||e!==v){var o=f[e];if(m&&m.$destroy(),!o)return void r.empty();m=g.$new(),v=e,o(m,function(e){r.empty(),r.append(e)})}g.$root.$$phase||g.$digest(!0)}var m,v,h,g=n.$new(!0,e);r.empty(),e.$watch(a,function(e){function r(e){var r=e.shift(),o=e;return function(e){var t=e[r];return t?n(o,t):i.fromValue()}}function n(e,n){var o=c(n);return e.length?i.switchMap.call(o,r(e)):o}h&&(h.unsubscribe(),h=null),d("loading"),h=n(t,e).subscribe(s,l,p)}),e.$on("$destroy",function(){h&&(h.unsubscribe(),h=null)})}}function c(e){return e&&"function"==typeof e.subscribe?e:e&&"function"==typeof e.then?i.fromPromise(e):i.fromValue(e)}function s(r,n){var t={},i={loading:[],active:[],error:[],complete:[]},u=[];o.forEach(r.contents(),function(e){switch(e.nodeName.toLowerCase()){case"loading":return i.loading.push(e);case"active":return i.active.push(e);case"error":return i.error.push(e);case"complete":return i.complete.push(e);default:return u.push(e)}});var c=!1;if(o.forEach(i,function(r,n){if(r.length){c=!0;var i=o.element(r).clone();t[n]=e(i)}}),!c){u.length||u.push(document.createTextNode("{{"+n+"}}"));var s=o.element(u).clone();t.active=e(s),t.complete=e(s.clone())}return t}return{restrict:"EA",scope:!0,compile:u}}])},function(e,n){e.exports=r}])}); |
{ | ||
"name": "angular-observe", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Angular directive for representing the different states of an Observable.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/angular-observe.js", |
@@ -56,7 +56,7 @@ var Angular = require('angular'); | ||
} | ||
setState('loading'); | ||
subscription = follow(sourcePath, source).subscribe(onNext, onError, onComplete); | ||
setState('loading'); | ||
function atPath(path) { | ||
@@ -63,0 +63,0 @@ var first = path.shift(); |
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