rxjs-rails 2.5.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rxjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/rx.aggregates.js +367 -284
- data/vendor/assets/javascripts/rx.aggregates.map +1 -1
- data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
- data/vendor/assets/javascripts/rx.all.compat.js +2405 -2438
- data/vendor/assets/javascripts/rx.all.compat.map +1 -1
- data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
- data/vendor/assets/javascripts/rx.all.js +2380 -2395
- data/vendor/assets/javascripts/rx.all.map +1 -1
- data/vendor/assets/javascripts/rx.all.min.js +4 -4
- data/vendor/assets/javascripts/rx.async.compat.js +311 -333
- data/vendor/assets/javascripts/rx.async.compat.map +1 -1
- data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.js +280 -327
- data/vendor/assets/javascripts/rx.async.map +1 -1
- data/vendor/assets/javascripts/rx.async.min.js +1 -1
- data/vendor/assets/javascripts/rx.backpressure.js +208 -176
- data/vendor/assets/javascripts/rx.backpressure.map +1 -1
- data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
- data/vendor/assets/javascripts/rx.binding.js +44 -27
- data/vendor/assets/javascripts/rx.binding.map +1 -1
- data/vendor/assets/javascripts/rx.binding.min.js +1 -1
- data/vendor/assets/javascripts/rx.coincidence.js +220 -453
- data/vendor/assets/javascripts/rx.coincidence.map +1 -1
- data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
- data/vendor/assets/javascripts/rx.compat.js +1366 -1173
- data/vendor/assets/javascripts/rx.compat.map +1 -1
- data/vendor/assets/javascripts/rx.compat.min.js +3 -2
- data/vendor/assets/javascripts/rx.core.binding.js +823 -0
- data/vendor/assets/javascripts/rx.core.binding.map +1 -0
- data/vendor/assets/javascripts/rx.core.binding.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.js +1281 -0
- data/vendor/assets/javascripts/rx.core.map +1 -0
- data/vendor/assets/javascripts/rx.core.min.js +3 -0
- data/vendor/assets/javascripts/rx.core.testing.js +1242 -0
- data/vendor/assets/javascripts/rx.core.testing.map +1 -0
- data/vendor/assets/javascripts/rx.core.testing.min.js +3 -0
- data/vendor/assets/javascripts/rx.experimental.js +85 -123
- data/vendor/assets/javascripts/rx.experimental.map +1 -1
- data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.js +48 -37
- data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
- data/vendor/assets/javascripts/rx.js +1367 -1174
- data/vendor/assets/javascripts/rx.lite.compat.js +1621 -1403
- data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -3
- data/vendor/assets/javascripts/rx.lite.extras.compat.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.js +119 -89
- data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
- data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
- data/vendor/assets/javascripts/rx.lite.js +1583 -1390
- data/vendor/assets/javascripts/rx.lite.map +1 -1
- data/vendor/assets/javascripts/rx.lite.min.js +3 -3
- data/vendor/assets/javascripts/rx.map +1 -1
- data/vendor/assets/javascripts/rx.min.js +3 -2
- data/vendor/assets/javascripts/rx.sorting.js +23 -27
- data/vendor/assets/javascripts/rx.sorting.map +1 -1
- data/vendor/assets/javascripts/rx.sorting.min.js +1 -1
- data/vendor/assets/javascripts/rx.testing.js +11 -15
- data/vendor/assets/javascripts/rx.testing.map +1 -1
- data/vendor/assets/javascripts/rx.testing.min.js +1 -1
- data/vendor/assets/javascripts/rx.time.js +117 -133
- data/vendor/assets/javascripts/rx.time.map +1 -1
- data/vendor/assets/javascripts/rx.time.min.js +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.js +120 -39
- data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
- metadata +12 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rx.async.min.js","sources":["rx.async.js"],"names":["factory","objectTypes","
|
1
|
+
{"version":3,"file":"rx.async.min.js","sources":["rx.async.js"],"names":["factory","objectTypes","function","object","freeExports","exports","nodeType","freeSelf","self","Object","freeWindow","window","freeModule","module","freeGlobal","global","root","this","define","amd","Rx","require","call","exp","undefined","tryCatcher","tryCatchTarget","apply","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","toObservable","obj","Observable","isObservable","isPromise","fromPromise","isGeneratorFunction","isGenerator","spawn","thunkToObservable","isArrayLike","isIterable","arrayToObservable","isObject","objectToObservable","from","flatMap","toArray","defer","observable","key","results","observables","push","map","next","constructor","keys","i","len","length","forkJoin","AnonymousObservable","o","err","res","onError","args","onNext","onCompleted","throw","ctor","name","displayName","prototype","createCbObservable","ctx","selector","AsyncSubject","createCbHandler","asObservable","Array","createNodeObservable","createNodeHandler","ListenDisposable","n","_e","_n","_fn","addEventListener","isDisposed","createEventListener","el","eventName","handler","disposables","CompositeDisposable","elemToString","toString","add","item","eventHandler","observableFromPromise","observableThrow","throwError","disposableCreate","Disposable","create","immediateScheduler","Scheduler","immediate","timeoutScheduler","isScheduler","helpers","wrap","createObservable","__generatorFunction__","gen","processGenerator","ret","done","value","g","subscribe","start","func","context","scheduler","observableToAsync","toAsync","subject","schedule","result","fromCallback","fromNodeCallback","dispose","removeEventListener","config","useNativeEvents","fromEvent","element","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync","promise"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,YAAY,EACZC,QAAU,GAIVC,EAAcH,QAAmBI,WAAYA,UAAYA,QAAQC,UAAYD,QA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MACjBsE,UAAUC,WAZFN,EACL,SAAUC,GAAKH,EAAQK,GAAGpD,EAAWkD,IACrC,SAAUA,GAAKH,EAAQM,IAAIrD,EAAWkD,IACtClE,GAoBR,IAAIiE,GAAmB9G,EAAW8G,iBAAmB,SAAUO,EAAYC,EAAezE,EAAUkD,GAElG,MADAf,GAAYe,KAAeA,EAAYnB,GAChC,GAAI9C,GAAoB,SAAUC,GACvC,QAASwF,KACP,GAAInB,GAAS7G,UAAU,EACvB,OAAIK,GAAWiD,KACbuD,EAAS1G,EAASmD,GAAUvD,MAAM,KAAMC,WACpC6G,IAAW3G,GAAmBsC,EAAEG,QAAQkE,EAAO5G,OAErDuC,GAAEK,OAAOgE,GAGX,GAAIoB,GAAcH,EAAWE,EAC7B,OAAO9C,GAAiB,WACtB7E,EAAW0H,IAAkBA,EAAcC,EAAcC,OAE1DL,UAAUC,WAkBf,OAVApH,GAAWyH,WAAa,SAAUC,GAChC,GAAIC,EACJ,KACEA,EAAUD,IACV,MAAOlI,GACP,MAAO+E,GAAgB/E,GAEzB,MAAO8E,GAAsBqD,IAGxB5I"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
|
2
|
-
(function(a){var b={"
|
2
|
+
(function(a){var b={"function":!0,object:!0},c=b[typeof exports]&&exports&&!exports.nodeType&&exports,d=b[typeof self]&&self.Object&&self,e=b[typeof window]&&window&&window.Object&&window,f=b[typeof module]&&module&&!module.nodeType&&module,g=(f&&f.exports===c&&c,c&&f&&"object"==typeof global&&global&&global.Object&&global),h=h=g||e!==(this&&this.window)&&e||d||this;"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return h.Rx=a(h,c,b),h.Rx}):"object"==typeof module&&module&&module.exports===c?module.exports=a(h,module.exports,require("./rx")):h.Rx=a(h,{},h.Rx)}).call(this,function(a,b,c,d){function e(){try{return t.apply(this,arguments)}catch(a){return G.e=a,G}}function f(a){if(!F(a))throw new TypeError("fn must be a function");return t=a,e}function g(a){return a?u.isObservable(a)?a:E(a)?u.fromPromise(a):l(a)||k(a)?H.call(this,a):F(a)?j.call(this,a):isArrayLike(a)||isIterable(a)?h.call(this,a):isObject(a)?i.call(this,a):a:a}function h(a){return u.from(a).flatMap(g).toArray()}function i(a){function b(a,b){c[b]=d,f.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),f=[],h=0,i=e.length;i>h;h++){var j=e[h],k=g.call(this,a[j]);k&&u.isObservable(k)?b(k,j):c[j]=a[j]}return u.forkJoin.apply(u,f).map(function(){return c})}function j(a){var b=this;return new x(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function k(a){return F(a.next)&&F(a.throw)}function l(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:k(b.prototype):!1}function m(a,b,c,d){var e=new y;return d.push(n(e,b,c)),a.apply(b,d),e.asObservable()}function n(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),g=0;d>g;g++)e[g]=arguments[g];if(F(c)){if(e=f(c).apply(b,e),e===G)return a.onError(e.e);a.onNext(e)}else a.onNext(e.length<=1?e[0]:e);a.onCompleted()}}function o(a,b,c,d){var e=new y;return d.push(p(e,b,c)),a.apply(b,d),e.asObservable()}function p(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,g=[],h=1;e>h;h++)g[h-1]=arguments[h];if(F(c)){var g=f(c).apply(b,g);if(g===G)return a.onError(g.e);a.onNext(g)}else a.onNext(g.length<=1?g[0]:g);a.onCompleted()}}function q(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function r(a,b,c){var d=new A,e=Object.prototype.toString.call(a);if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(r(a.item(f),b,c));else a&&d.add(new q(a,b,c));return d}function s(a,b){return function(){var c=arguments[0];return F(b)&&(c=f(b).apply(null,arguments),c===G)?a.onError(c.e):void a.onNext(c)}}var t,u=c.Observable,v=(u.prototype,u.fromPromise),w=u.throwError,x=c.AnonymousObservable,y=c.AsyncSubject,z=c.Disposable.create,A=c.CompositeDisposable,B=c.Scheduler.immediate,C=c.Scheduler["default"],D=c.Scheduler.isScheduler,E=c.helpers.isPromise,F=c.helpers.isFunction,G={e:{}};u.wrap=function(a){function b(){return u.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var H=u.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new x(function(d){function e(b){var c=f(a.next).call(a,b);return c===G?d.onError(c.e):void i(c)}function h(b){var c=f(a.next).call(a,b);return c===G?d.onError(c.e):void i(c)}function i(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=g.call(b,a.value);u.isObservable(c)?j.add(c.subscribe(e,h)):h(new TypeError("type not supported"))}var j=new A;return F(a)&&(a=a.apply(b,c)),a&&F(a.next)?(e(),j):(d.onNext(a),d.onCompleted())})};u.start=function(a,b,c){return I(a,b,c)()};var I=u.toAsync=function(a,b,c){return D(c)||(c=C),function(){var d=arguments,e=new y;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};u.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return m(a,b,c,e)}},u.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return o(a,b,c,e)}},q.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},c.config.useNativeEvents=!1,u.fromEvent=function(a,b,d){return a.addListener?J(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new x(function(c){return r(a,b,s(c,d))}).publish().refCount():J(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var J=u.fromEventPattern=function(a,b,c,d){return D(d)||(d=B),new x(function(d){function e(){var a=arguments[0];return F(c)&&(a=f(c).apply(null,arguments),a===G)?d.onError(a.e):void d.onNext(a)}var g=a(e);return z(function(){F(b)&&b(e,g)})}).publish().refCount()};return u.startAsync=function(a){var b;try{b=a()}catch(c){return w(c)}return v(b)},c});
|
3
3
|
//# sourceMappingURL=rx.async.map
|
@@ -1,35 +1,31 @@
|
|
1
1
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
2
2
|
|
3
3
|
;(function (factory) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
'number': false,
|
9
|
-
'string': false,
|
10
|
-
'undefined': false
|
11
|
-
};
|
4
|
+
var objectTypes = {
|
5
|
+
'function': true,
|
6
|
+
'object': true
|
7
|
+
};
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
var
|
10
|
+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
|
11
|
+
freeSelf = objectTypes[typeof self] && self.Object && self,
|
12
|
+
freeWindow = objectTypes[typeof window] && window && window.Object && window,
|
13
|
+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
|
14
|
+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
|
15
|
+
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
|
18
16
|
|
19
|
-
|
20
|
-
root = freeGlobal;
|
21
|
-
}
|
17
|
+
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
// Because of build optimizers
|
20
|
+
if (typeof define === 'function' && define.amd) {
|
21
|
+
define(['./rx'], function (Rx, exports) {
|
22
|
+
return factory(root, exports, Rx);
|
23
|
+
});
|
24
|
+
} else if (typeof module === 'object' && module && module.exports === freeExports) {
|
25
|
+
module.exports = factory(root, module.exports, require('./rx'));
|
26
|
+
} else {
|
27
|
+
root.Rx = factory(root, {}, root.Rx);
|
28
|
+
}
|
33
29
|
}.call(this, function (root, exp, Rx, undefined) {
|
34
30
|
|
35
31
|
// References
|
@@ -49,8 +45,28 @@
|
|
49
45
|
currentThreadScheduler = Rx.Scheduler.currentThread,
|
50
46
|
identity = Rx.helpers.identity,
|
51
47
|
isScheduler = Rx.Scheduler.isScheduler,
|
48
|
+
isFunction = Rx.helpers.isFunction,
|
52
49
|
checkDisposed = Rx.Disposable.checkDisposed;
|
53
50
|
|
51
|
+
var errorObj = {e: {}};
|
52
|
+
var tryCatchTarget;
|
53
|
+
function tryCatcher() {
|
54
|
+
try {
|
55
|
+
return tryCatchTarget.apply(this, arguments);
|
56
|
+
} catch (e) {
|
57
|
+
errorObj.e = e;
|
58
|
+
return errorObj;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
function tryCatch(fn) {
|
62
|
+
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
|
63
|
+
tryCatchTarget = fn;
|
64
|
+
return tryCatcher;
|
65
|
+
}
|
66
|
+
function thrower(e) {
|
67
|
+
throw e;
|
68
|
+
}
|
69
|
+
|
54
70
|
/**
|
55
71
|
* Used to pause and resume streams.
|
56
72
|
*/
|
@@ -141,26 +157,15 @@
|
|
141
157
|
err;
|
142
158
|
|
143
159
|
function next(x, i) {
|
144
|
-
values[i] = x
|
145
|
-
var res;
|
160
|
+
values[i] = x;
|
146
161
|
hasValue[i] = true;
|
147
162
|
if (hasValueAll || (hasValueAll = hasValue.every(identity))) {
|
148
|
-
if (err) {
|
149
|
-
|
150
|
-
|
151
|
-
}
|
152
|
-
|
153
|
-
try {
|
154
|
-
res = resultSelector.apply(null, values);
|
155
|
-
} catch (ex) {
|
156
|
-
o.onError(ex);
|
157
|
-
return;
|
158
|
-
}
|
163
|
+
if (err) { return o.onError(err); }
|
164
|
+
var res = tryCatch(resultSelector).apply(null, values);
|
165
|
+
if (res === errorObj) { return o.onError(res.e); }
|
159
166
|
o.onNext(res);
|
160
167
|
}
|
161
|
-
|
162
|
-
o.onCompleted();
|
163
|
-
}
|
168
|
+
isDone && values[1] && o.onCompleted();
|
164
169
|
}
|
165
170
|
|
166
171
|
return new CompositeDisposable(
|
@@ -199,10 +204,12 @@
|
|
199
204
|
function subscribe(o) {
|
200
205
|
var q = [], previousShouldFire;
|
201
206
|
|
207
|
+
function drainQueue() { while (q.length > 0) { o.onNext(q.shift()); } }
|
208
|
+
|
202
209
|
var subscription =
|
203
210
|
combineLatestSource(
|
204
211
|
this.source,
|
205
|
-
this.pauser.
|
212
|
+
this.pauser.startWith(false).distinctUntilChanged(),
|
206
213
|
function (data, shouldFire) {
|
207
214
|
return { data: data, shouldFire: shouldFire };
|
208
215
|
})
|
@@ -211,11 +218,7 @@
|
|
211
218
|
if (previousShouldFire !== undefined && results.shouldFire != previousShouldFire) {
|
212
219
|
previousShouldFire = results.shouldFire;
|
213
220
|
// change in shouldFire
|
214
|
-
if (results.shouldFire) {
|
215
|
-
while (q.length > 0) {
|
216
|
-
o.onNext(q.shift());
|
217
|
-
}
|
218
|
-
}
|
221
|
+
if (results.shouldFire) { drainQueue(); }
|
219
222
|
} else {
|
220
223
|
previousShouldFire = results.shouldFire;
|
221
224
|
// new data
|
@@ -227,17 +230,11 @@
|
|
227
230
|
}
|
228
231
|
},
|
229
232
|
function (err) {
|
230
|
-
|
231
|
-
while (q.length > 0) {
|
232
|
-
o.onNext(q.shift());
|
233
|
-
}
|
233
|
+
drainQueue();
|
234
234
|
o.onError(err);
|
235
235
|
},
|
236
236
|
function () {
|
237
|
-
|
238
|
-
while (q.length > 0) {
|
239
|
-
o.onNext(q.shift());
|
240
|
-
}
|
237
|
+
drainQueue();
|
241
238
|
o.onCompleted();
|
242
239
|
}
|
243
240
|
);
|
@@ -282,144 +279,147 @@
|
|
282
279
|
return new PausableBufferedObservable(this, subject);
|
283
280
|
};
|
284
281
|
|
285
|
-
|
282
|
+
var ControlledObservable = (function (__super__) {
|
286
283
|
|
287
|
-
|
284
|
+
inherits(ControlledObservable, __super__);
|
288
285
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
function ControlledObservable (source, enableQueue, scheduler) {
|
294
|
-
__super__.call(this, subscribe, source);
|
295
|
-
this.subject = new ControlledSubject(enableQueue, scheduler);
|
296
|
-
this.source = source.multicast(this.subject).refCount();
|
297
|
-
}
|
286
|
+
function subscribe (observer) {
|
287
|
+
return this.source.subscribe(observer);
|
288
|
+
}
|
298
289
|
|
299
|
-
|
300
|
-
|
301
|
-
|
290
|
+
function ControlledObservable (source, enableQueue, scheduler) {
|
291
|
+
__super__.call(this, subscribe, source);
|
292
|
+
this.subject = new ControlledSubject(enableQueue, scheduler);
|
293
|
+
this.source = source.multicast(this.subject).refCount();
|
294
|
+
}
|
302
295
|
|
303
|
-
|
296
|
+
ControlledObservable.prototype.request = function (numberOfItems) {
|
297
|
+
return this.subject.request(numberOfItems == null ? -1 : numberOfItems);
|
298
|
+
};
|
304
299
|
|
305
|
-
|
300
|
+
return ControlledObservable;
|
306
301
|
|
307
|
-
|
302
|
+
}(Observable));
|
308
303
|
|
309
|
-
|
310
|
-
return this.subject.subscribe(observer);
|
311
|
-
}
|
304
|
+
var ControlledSubject = (function (__super__) {
|
312
305
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
enableQueue == null && (enableQueue = true);
|
317
|
-
|
318
|
-
__super__.call(this, subscribe);
|
319
|
-
this.subject = new Subject();
|
320
|
-
this.enableQueue = enableQueue;
|
321
|
-
this.queue = enableQueue ? [] : null;
|
322
|
-
this.requestedCount = 0;
|
323
|
-
this.requestedDisposable = disposableEmpty;
|
324
|
-
this.error = null;
|
325
|
-
this.hasFailed = false;
|
326
|
-
this.hasCompleted = false;
|
327
|
-
this.scheduler = scheduler || currentThreadScheduler;
|
328
|
-
}
|
306
|
+
function subscribe (observer) {
|
307
|
+
return this.subject.subscribe(observer);
|
308
|
+
}
|
329
309
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
}
|
347
|
-
},
|
348
|
-
onNext: function (value) {
|
349
|
-
var hasRequested = false;
|
310
|
+
inherits(ControlledSubject, __super__);
|
311
|
+
|
312
|
+
function ControlledSubject(enableQueue, scheduler) {
|
313
|
+
enableQueue == null && (enableQueue = true);
|
314
|
+
|
315
|
+
__super__.call(this, subscribe);
|
316
|
+
this.subject = new Subject();
|
317
|
+
this.enableQueue = enableQueue;
|
318
|
+
this.queue = enableQueue ? [] : null;
|
319
|
+
this.requestedCount = 0;
|
320
|
+
this.requestedDisposable = null;
|
321
|
+
this.error = null;
|
322
|
+
this.hasFailed = false;
|
323
|
+
this.hasCompleted = false;
|
324
|
+
this.scheduler = scheduler || currentThreadScheduler;
|
325
|
+
}
|
350
326
|
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
327
|
+
addProperties(ControlledSubject.prototype, Observer, {
|
328
|
+
onCompleted: function () {
|
329
|
+
this.hasCompleted = true;
|
330
|
+
if (!this.enableQueue || this.queue.length === 0) {
|
331
|
+
this.subject.onCompleted();
|
332
|
+
this.disposeCurrentRequest()
|
333
|
+
} else {
|
334
|
+
this.queue.push(Notification.createOnCompleted());
|
335
|
+
}
|
336
|
+
},
|
337
|
+
onError: function (error) {
|
338
|
+
this.hasFailed = true;
|
339
|
+
this.error = error;
|
340
|
+
if (!this.enableQueue || this.queue.length === 0) {
|
341
|
+
this.subject.onError(error);
|
342
|
+
this.disposeCurrentRequest()
|
343
|
+
} else {
|
344
|
+
this.queue.push(Notification.createOnError(error));
|
345
|
+
}
|
346
|
+
},
|
347
|
+
onNext: function (value) {
|
348
|
+
if (this.requestedCount <= 0) {
|
349
|
+
this.enableQueue && this.queue.push(Notification.createOnNext(value));
|
350
|
+
} else {
|
351
|
+
(this.requestedCount-- === 0) && this.disposeCurrentRequest();
|
352
|
+
this.subject.onNext(value);
|
353
|
+
}
|
354
|
+
},
|
355
|
+
_processRequest: function (numberOfItems) {
|
356
|
+
if (this.enableQueue) {
|
357
|
+
while (this.queue.length > 0 && (numberOfItems > 0 || this.queue[0].kind !== 'N')) {
|
358
|
+
var first = this.queue.shift();
|
359
|
+
first.accept(this.subject);
|
360
|
+
if (first.kind === 'N') {
|
361
|
+
numberOfItems--;
|
362
|
+
} else {
|
363
|
+
this.disposeCurrentRequest();
|
364
|
+
this.queue = [];
|
371
365
|
}
|
372
|
-
|
373
|
-
return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0};
|
374
366
|
}
|
367
|
+
}
|
375
368
|
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
369
|
+
return numberOfItems;
|
370
|
+
},
|
371
|
+
request: function (number) {
|
372
|
+
this.disposeCurrentRequest();
|
373
|
+
var self = this;
|
381
374
|
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
self.requestedCount = 0;
|
389
|
-
});
|
390
|
-
}
|
391
|
-
});
|
375
|
+
this.requestedDisposable = this.scheduler.scheduleWithState(number,
|
376
|
+
function(s, i) {
|
377
|
+
var remaining = self._processRequest(i);
|
378
|
+
var stopped = self.hasCompleted || self.hasFailed
|
379
|
+
if (!stopped && remaining > 0) {
|
380
|
+
self.requestedCount = remaining;
|
392
381
|
|
393
|
-
|
394
|
-
|
395
|
-
|
382
|
+
return disposableCreate(function () {
|
383
|
+
self.requestedCount = 0;
|
384
|
+
});
|
385
|
+
// Scheduled item is still in progress. Return a new
|
386
|
+
// disposable to allow the request to be interrupted
|
387
|
+
// via dispose.
|
388
|
+
}
|
389
|
+
});
|
390
|
+
|
391
|
+
return this.requestedDisposable;
|
392
|
+
},
|
393
|
+
disposeCurrentRequest: function () {
|
394
|
+
if (this.requestedDisposable) {
|
396
395
|
this.requestedDisposable.dispose();
|
397
|
-
this.requestedDisposable =
|
396
|
+
this.requestedDisposable = null;
|
398
397
|
}
|
399
|
-
});
|
400
|
-
|
401
|
-
return ControlledSubject;
|
402
|
-
}(Observable));
|
403
|
-
|
404
|
-
/**
|
405
|
-
* Attaches a controller to the observable sequence with the ability to queue.
|
406
|
-
* @example
|
407
|
-
* var source = Rx.Observable.interval(100).controlled();
|
408
|
-
* source.request(3); // Reads 3 values
|
409
|
-
* @param {bool} enableQueue truthy value to determine if values should be queued pending the next request
|
410
|
-
* @param {Scheduler} scheduler determines how the requests will be scheduled
|
411
|
-
* @returns {Observable} The observable sequence which is paused based upon the pauser.
|
412
|
-
*/
|
413
|
-
observableProto.controlled = function (enableQueue, scheduler) {
|
414
|
-
|
415
|
-
if (enableQueue && isScheduler(enableQueue)) {
|
416
|
-
scheduler = enableQueue;
|
417
|
-
enableQueue = true;
|
418
398
|
}
|
399
|
+
});
|
400
|
+
|
401
|
+
return ControlledSubject;
|
402
|
+
}(Observable));
|
403
|
+
|
404
|
+
/**
|
405
|
+
* Attaches a controller to the observable sequence with the ability to queue.
|
406
|
+
* @example
|
407
|
+
* var source = Rx.Observable.interval(100).controlled();
|
408
|
+
* source.request(3); // Reads 3 values
|
409
|
+
* @param {bool} enableQueue truthy value to determine if values should be queued pending the next request
|
410
|
+
* @param {Scheduler} scheduler determines how the requests will be scheduled
|
411
|
+
* @returns {Observable} The observable sequence which only propagates values on request.
|
412
|
+
*/
|
413
|
+
observableProto.controlled = function (enableQueue, scheduler) {
|
414
|
+
|
415
|
+
if (enableQueue && isScheduler(enableQueue)) {
|
416
|
+
scheduler = enableQueue;
|
417
|
+
enableQueue = true;
|
418
|
+
}
|
419
419
|
|
420
|
-
|
421
|
-
|
422
|
-
|
420
|
+
if (enableQueue == null) { enableQueue = true; }
|
421
|
+
return new ControlledObservable(this, enableQueue, scheduler);
|
422
|
+
};
|
423
423
|
|
424
424
|
var StopAndWaitObservable = (function (__super__) {
|
425
425
|
|
@@ -575,5 +575,37 @@
|
|
575
575
|
return new WindowedObservable(this, windowSize);
|
576
576
|
};
|
577
577
|
|
578
|
-
|
578
|
+
/**
|
579
|
+
* Pipes the existing Observable sequence into a Node.js Stream.
|
580
|
+
* @param {Stream} dest The destination Node.js stream.
|
581
|
+
* @returns {Stream} The destination stream.
|
582
|
+
*/
|
583
|
+
observableProto.pipe = function (dest) {
|
584
|
+
var source = this.pausableBuffered();
|
585
|
+
|
586
|
+
function onDrain() {
|
587
|
+
source.resume();
|
588
|
+
}
|
589
|
+
|
590
|
+
dest.addListener('drain', onDrain);
|
591
|
+
|
592
|
+
source.subscribe(
|
593
|
+
function (x) {
|
594
|
+
!dest.write(String(x)) && source.pause();
|
595
|
+
},
|
596
|
+
function (err) {
|
597
|
+
dest.emit('error', err);
|
598
|
+
},
|
599
|
+
function () {
|
600
|
+
// Hack check because STDIO is not closable
|
601
|
+
!dest._isStdio && dest.end();
|
602
|
+
dest.removeListener('drain', onDrain);
|
603
|
+
});
|
604
|
+
|
605
|
+
source.resume();
|
606
|
+
|
607
|
+
return dest;
|
608
|
+
};
|
609
|
+
|
610
|
+
return Rx;
|
579
611
|
}));
|