rxjs-rails 2.2.19 → 2.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/lib/rxjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/rx.aggregates.js +126 -121
- data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.compat.js +2 -1
- data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.js +2 -1
- data/vendor/assets/javascripts/rx.async.min.js +1 -1
- data/vendor/assets/javascripts/rx.compat.js +470 -464
- data/vendor/assets/javascripts/rx.compat.min.js +2 -2
- data/vendor/assets/javascripts/rx.experimental.js +202 -191
- data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
- data/vendor/assets/javascripts/rx.js +470 -464
- data/vendor/assets/javascripts/rx.lite.compat.js +352 -348
- data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
- data/vendor/assets/javascripts/rx.lite.js +352 -348
- data/vendor/assets/javascripts/rx.lite.min.js +2 -2
- data/vendor/assets/javascripts/rx.min.js +2 -2
- data/vendor/assets/javascripts/rx.node.js +113 -115
- data/version.rb.m4 +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f8d85b2bb56fd175d2af4adeeb56d6fa53d5091
|
4
|
+
data.tar.gz: 0ecbe84af1353feb456f624ee8b7a21cea3ee354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda8783d1f7e832b56fc5e665317ad252fdc51966094b36542ef34a2971c07c1d693cf337cc9dc9287ebc3a2830976ddef9872bfc26ebd6b1f01005a94c2400e
|
7
|
+
data.tar.gz: 101bc97daf0e0558c9fbd026534fde7214a3ddf1422e0cc080566c5538a57e2a429ccb7d4ff58d655fa83c6a993b3ad4bdeb3ca3db3830b53b79d1061c337a21
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ task :sync_rxjs_repo do
|
|
6
6
|
`cd tmp/RxJS && git pull`
|
7
7
|
end
|
8
8
|
|
9
|
-
desc 'update asset files to RxJS version'
|
9
|
+
desc 'update asset files to RxJS version (vX.X.X)'
|
10
10
|
task(:update, [:version] => :sync_rxjs_repo) do |t,args|
|
11
11
|
|
12
12
|
`cd tmp/RxJS && git co -b #{args[:version]}`
|
@@ -14,6 +14,6 @@ task(:update, [:version] => :sync_rxjs_repo) do |t,args|
|
|
14
14
|
`cd tmp/RxJS && grunt`
|
15
15
|
`rm -f vendor/assets/javascipts/*.js`
|
16
16
|
`cp tmp/RxJS/rx*js vendor/assets/javascripts/`
|
17
|
-
|
17
|
+
`m4 -D version=#{args[:version].gsub(/^v/i, '')} version.rb.m4 > lib/rxjs/rails/version.rb`
|
18
18
|
end
|
19
19
|
|
data/lib/rxjs/rails/version.rb
CHANGED
@@ -33,20 +33,23 @@
|
|
33
33
|
}
|
34
34
|
}.call(this, function (root, exp, Rx, undefined) {
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
// References
|
37
|
+
var Observable = Rx.Observable,
|
38
|
+
observableProto = Observable.prototype,
|
39
|
+
CompositeDisposable = Rx.CompositeDisposable,
|
40
|
+
AnonymousObservable = Rx.AnonymousObservable,
|
41
|
+
isEqual = Rx.internals.isEqual,
|
42
|
+
helpers = Rx.helpers,
|
43
|
+
defaultComparer = helpers.defaultComparer,
|
44
|
+
identity = helpers.identity,
|
45
|
+
subComparer = helpers.defaultSubComparer,
|
46
|
+
isPromise = helpers.isPromise,
|
47
|
+
observableFromPromise = Observable.fromPromise;
|
45
48
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
49
|
+
// Defaults
|
50
|
+
var argumentOutOfRange = 'Argument out of range',
|
51
|
+
sequenceContainsNoElements = "Sequence contains no elements.";
|
52
|
+
|
50
53
|
function extremaBy(source, keySelector, comparer) {
|
51
54
|
return new AnonymousObservable(function (observer) {
|
52
55
|
var hasValue = false, lastKey = null, list = [];
|
@@ -318,117 +321,119 @@
|
|
318
321
|
});
|
319
322
|
};
|
320
323
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
});
|
324
|
+
function sequenceEqualArray(first, second, comparer) {
|
325
|
+
return new AnonymousObservable(function (observer) {
|
326
|
+
var count = 0, len = second.length;
|
327
|
+
return first.subscribe(function (value) {
|
328
|
+
var equal = false;
|
329
|
+
try {
|
330
|
+
if (count < len) {
|
331
|
+
equal = comparer(value, second[count++]);
|
332
|
+
}
|
333
|
+
} catch (e) {
|
334
|
+
observer.onError(e);
|
335
|
+
return;
|
336
|
+
}
|
337
|
+
if (!equal) {
|
338
|
+
observer.onNext(false);
|
339
|
+
observer.onCompleted();
|
340
|
+
}
|
341
|
+
}, observer.onError.bind(observer), function () {
|
342
|
+
observer.onNext(count === len);
|
343
|
+
observer.onCompleted();
|
342
344
|
});
|
345
|
+
});
|
346
|
+
}
|
347
|
+
|
348
|
+
/**
|
349
|
+
* Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
|
350
|
+
*
|
351
|
+
* @example
|
352
|
+
* var res = res = source.sequenceEqual([1,2,3]);
|
353
|
+
* var res = res = source.sequenceEqual([{ value: 42 }], function (x, y) { return x.value === y.value; });
|
354
|
+
* 3 - res = source.sequenceEqual(Rx.Observable.returnValue(42));
|
355
|
+
* 4 - res = source.sequenceEqual(Rx.Observable.returnValue({ value: 42 }), function (x, y) { return x.value === y.value; });
|
356
|
+
* @param {Observable} second Second observable sequence or array to compare.
|
357
|
+
* @param {Function} [comparer] Comparer used to compare elements of both sequences.
|
358
|
+
* @returns {Observable} An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer.
|
359
|
+
*/
|
360
|
+
observableProto.sequenceEqual = function (second, comparer) {
|
361
|
+
var first = this;
|
362
|
+
comparer || (comparer = defaultComparer);
|
363
|
+
if (Array.isArray(second)) {
|
364
|
+
return sequenceEqualArray(first, second, comparer);
|
343
365
|
}
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
if (
|
361
|
-
|
366
|
+
return new AnonymousObservable(function (observer) {
|
367
|
+
var donel = false, doner = false, ql = [], qr = [];
|
368
|
+
var subscription1 = first.subscribe(function (x) {
|
369
|
+
var equal, v;
|
370
|
+
if (qr.length > 0) {
|
371
|
+
v = qr.shift();
|
372
|
+
try {
|
373
|
+
equal = comparer(v, x);
|
374
|
+
} catch (e) {
|
375
|
+
observer.onError(e);
|
376
|
+
return;
|
377
|
+
}
|
378
|
+
if (!equal) {
|
379
|
+
observer.onNext(false);
|
380
|
+
observer.onCompleted();
|
381
|
+
}
|
382
|
+
} else if (doner) {
|
383
|
+
observer.onNext(false);
|
384
|
+
observer.onCompleted();
|
385
|
+
} else {
|
386
|
+
ql.push(x);
|
362
387
|
}
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
observer.onNext(false);
|
413
|
-
observer.onCompleted();
|
414
|
-
} else {
|
415
|
-
qr.push(x);
|
416
|
-
}
|
417
|
-
}, observer.onError.bind(observer), function () {
|
418
|
-
doner = true;
|
419
|
-
if (qr.length === 0) {
|
420
|
-
if (ql.length > 0) {
|
421
|
-
observer.onNext(false);
|
422
|
-
observer.onCompleted();
|
423
|
-
} else if (donel) {
|
424
|
-
observer.onNext(true);
|
425
|
-
observer.onCompleted();
|
426
|
-
}
|
427
|
-
}
|
428
|
-
});
|
429
|
-
return new CompositeDisposable(subscription1, subscription2);
|
430
|
-
});
|
431
|
-
};
|
388
|
+
}, observer.onError.bind(observer), function () {
|
389
|
+
donel = true;
|
390
|
+
if (ql.length === 0) {
|
391
|
+
if (qr.length > 0) {
|
392
|
+
observer.onNext(false);
|
393
|
+
observer.onCompleted();
|
394
|
+
} else if (doner) {
|
395
|
+
observer.onNext(true);
|
396
|
+
observer.onCompleted();
|
397
|
+
}
|
398
|
+
}
|
399
|
+
});
|
400
|
+
|
401
|
+
isPromise(second) && (second = observableFromPromise(second));
|
402
|
+
var subscription2 = second.subscribe(function (x) {
|
403
|
+
var equal, v;
|
404
|
+
if (ql.length > 0) {
|
405
|
+
v = ql.shift();
|
406
|
+
try {
|
407
|
+
equal = comparer(v, x);
|
408
|
+
} catch (exception) {
|
409
|
+
observer.onError(exception);
|
410
|
+
return;
|
411
|
+
}
|
412
|
+
if (!equal) {
|
413
|
+
observer.onNext(false);
|
414
|
+
observer.onCompleted();
|
415
|
+
}
|
416
|
+
} else if (donel) {
|
417
|
+
observer.onNext(false);
|
418
|
+
observer.onCompleted();
|
419
|
+
} else {
|
420
|
+
qr.push(x);
|
421
|
+
}
|
422
|
+
}, observer.onError.bind(observer), function () {
|
423
|
+
doner = true;
|
424
|
+
if (qr.length === 0) {
|
425
|
+
if (ql.length > 0) {
|
426
|
+
observer.onNext(false);
|
427
|
+
observer.onCompleted();
|
428
|
+
} else if (donel) {
|
429
|
+
observer.onNext(true);
|
430
|
+
observer.onCompleted();
|
431
|
+
}
|
432
|
+
}
|
433
|
+
});
|
434
|
+
return new CompositeDisposable(subscription1, subscription2);
|
435
|
+
});
|
436
|
+
};
|
432
437
|
|
433
438
|
function elementAtOrDefault(source, index, hasDefault, defaultValue) {
|
434
439
|
if (index < 0) {
|
@@ -1 +1 @@
|
|
1
|
-
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b,c){return new p(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function f(a){if(0===a.length)throw new Error(
|
1
|
+
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b,c){return new p(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},d.onError.bind(d),function(){d.onNext(g),d.onCompleted()})})}function f(a){if(0===a.length)throw new Error(x);return a[0]}function g(a,b,c){return new p(function(d){var e=0,f=b.length;return a.subscribe(function(a){var g=!1;try{f>e&&(g=c(a,b[e++]))}catch(h){return void d.onError(h)}g||(d.onNext(!1),d.onCompleted())},d.onError.bind(d),function(){d.onNext(e===f),d.onCompleted()})})}function h(a,b,c,d){if(0>b)throw new Error(w);return new p(function(e){var f=b;return a.subscribe(function(a){0===f&&(e.onNext(a),e.onCompleted()),f--},e.onError.bind(e),function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(w))})})}function i(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(x))})})}function j(a,b,c){return new p(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},d.onError.bind(d),function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(x))})})}function k(a,b,c){return new p(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},d.onError.bind(d),function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(x))})})}function l(a,b,c,e){return new p(function(f){var g=0;return a.subscribe(function(d){var h;try{h=b.call(c,d,g,a)}catch(i){return void f.onError(i)}h?(f.onNext(e?g:d),f.onCompleted()):g++},f.onError.bind(f),function(){f.onNext(e?-1:d),f.onCompleted()})})}var m=c.Observable,n=m.prototype,o=c.CompositeDisposable,p=c.AnonymousObservable,q=(c.internals.isEqual,c.helpers),r=q.defaultComparer,s=q.identity,t=q.defaultSubComparer,u=q.isPromise,v=m.fromPromise,w="Argument out of range",x="Sequence contains no elements.";return n.aggregate=function(){var a,b,c;return 2===arguments.length?(a=arguments[0],b=!0,c=arguments[1]):c=arguments[0],b?this.scan(a,c).startWith(a).finalValue():this.scan(c).finalValue()},n.reduce=function(a){var b,c;return 2===arguments.length&&(c=!0,b=arguments[1]),c?this.scan(b,a).startWith(b).finalValue():this.scan(a).finalValue()},n.some=n.any=function(a,b){var c=this;return a?c.where(a,b).any():new p(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},a.onError.bind(a),function(){a.onNext(!1),a.onCompleted()})})},n.isEmpty=function(){return this.any().select(function(a){return!a})},n.every=n.all=function(a,b){return this.where(function(b){return!a(b)},b).any().select(function(a){return!a})},n.contains=function(a,b){return b||(b=r),this.where(function(c){return b(c,a)}).any()},n.count=function(a,b){return a?this.where(a,b).count():this.aggregate(0,function(a){return a+1})},n.sum=function(a,b){return a?this.select(a,b).sum():this.aggregate(0,function(a,b){return a+b})},n.minBy=function(a,b){return b||(b=t),e(this,a,function(a,c){return-1*b(a,c)})},n.min=function(a){return this.minBy(s,a).select(function(a){return f(a)})},n.maxBy=function(a,b){return b||(b=t),e(this,a,b)},n.max=function(a){return this.maxBy(s,a).select(function(a){return f(a)})},n.average=function(a,b){return a?this.select(a,b).average():this.scan({sum:0,count:0},function(a,b){return{sum:a.sum+b,count:a.count+1}}).finalValue().select(function(a){if(0===a.count)throw new Error("The input sequence was empty");return a.sum/a.count})},n.sequenceEqual=function(a,b){var c=this;return b||(b=r),Array.isArray(a)?g(c,a,b):new p(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},d.onError.bind(d),function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});u(a)&&(a=v(a));var j=a.subscribe(function(a){var c,f;if(g.length>0){f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},d.onError.bind(d),function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new o(i,j)})},n.elementAt=function(a){return h(this,a,!1)},n.elementAtOrDefault=function(a,b){return h(this,a,!0,b)},n.single=function(a,b){return a?this.where(a,b).single():i(this,!1)},n.singleOrDefault=function(a,b,c){return a?this.where(a,c).singleOrDefault(null,b):i(this,!0,b)},n.first=function(a,b){return a?this.where(a,b).first():j(this,!1)},n.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):j(this,!0,b)},n.last=function(a,b){return a?this.where(a,b).last():k(this,!1)},n.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):k(this,!0,b)},n.find=function(a,b){return l(this,a,b,!1)},n.findIndex=function(a,b){return l(this,a,b,!0)},c});
|
@@ -43,6 +43,7 @@
|
|
43
43
|
disposableCreate = Rx.Disposable.create,
|
44
44
|
CompositeDisposable= Rx.CompositeDisposable,
|
45
45
|
immediateScheduler = Rx.Scheduler.immediate,
|
46
|
+
timeoutScheduler = Rx.Scheduler.timeout,
|
46
47
|
slice = Array.prototype.slice;
|
47
48
|
|
48
49
|
/**
|
@@ -319,7 +320,7 @@
|
|
319
320
|
selector);
|
320
321
|
}
|
321
322
|
if (jq) {
|
322
|
-
var $elem = jq(
|
323
|
+
var $elem = jq(element);
|
323
324
|
return fromEventPattern(
|
324
325
|
function (h) { $elem.on(eventName, h); },
|
325
326
|
function (h) { $elem.off(eventName, h); },
|
@@ -1 +1 @@
|
|
1
|
-
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a.item(g),b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=c.Scheduler.immediate,o=Array.prototype.slice;g.start=function(a,b,c){return
|
1
|
+
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a.item(g),b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=c.Scheduler.immediate,o=c.Scheduler.timeout,p=Array.prototype.slice;g.start=function(a,b,c){return q(a,b,c)()};var q=g.toAsync=function(a,b,c){return b||(b=o),function(){var d=arguments,e=new k;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};g.fromCallback=function(a,b,c,d){return b||(b=n),function(){var e=p.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},g.fromNodeCallback=function(a,b,c,d){return b||(b=n),function(){var e=p.call(arguments,0);return new j(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=p.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var r=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,s=!!a.Ember&&"function"==typeof a.Ember.addListener;g.fromEvent=function(a,b,c){if(s)return t(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(r){var d=r(a);return t(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new j(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var t=g.fromEventPattern=function(a,b,c){return new j(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return l(function(){b&&b(e,f)})}).publish().refCount()};return g.startAsync=function(a){var b;try{b=a()}catch(c){return i(c)}return h(b)},c});
|
@@ -43,6 +43,7 @@
|
|
43
43
|
disposableCreate = Rx.Disposable.create,
|
44
44
|
CompositeDisposable= Rx.CompositeDisposable,
|
45
45
|
immediateScheduler = Rx.Scheduler.immediate,
|
46
|
+
timeoutScheduler = Rx.Scheduler.timeout,
|
46
47
|
slice = Array.prototype.slice;
|
47
48
|
|
48
49
|
/**
|
@@ -251,7 +252,7 @@
|
|
251
252
|
selector);
|
252
253
|
}
|
253
254
|
if (jq) {
|
254
|
-
var $elem = jq(
|
255
|
+
var $elem = jq(element);
|
255
256
|
return fromEventPattern(
|
256
257
|
function (h) { $elem.on(eventName, h); },
|
257
258
|
function (h) { $elem.off(eventName, h); },
|
@@ -1 +1 @@
|
|
1
|
-
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b,c){if(a.addListener)return a.addListener(b,c),k(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function e(a,b,c){var f=new l;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a.item(g),b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=(f.prototype,f.fromPromise),h=f.throwException,i=c.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=Array.prototype.slice;f.start=function(a,b,c){return
|
1
|
+
(function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(a,b,c){if(a.addListener)return a.addListener(b,c),k(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),k(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function e(a,b,c){var f=new l;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)f.add(e(a.item(g),b,c));else a&&f.add(d(a,b,c));return f}var f=c.Observable,g=(f.prototype,f.fromPromise),h=f.throwException,i=c.AnonymousObservable,j=c.AsyncSubject,k=c.Disposable.create,l=c.CompositeDisposable,m=c.Scheduler.immediate,n=c.Scheduler.timeout,o=Array.prototype.slice;f.start=function(a,b,c){return p(a,b,c)()};var p=f.toAsync=function(a,b,c){return b||(b=n),function(){var d=arguments,e=new j;return b.schedule(function(){var b;try{b=a.apply(c,d)}catch(f){return void e.onError(f)}e.onNext(b),e.onCompleted()}),e.asObservable()}};f.fromCallback=function(a,b,c,d){return b||(b=m),function(){var e=o.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){var b=a;if(d)try{b=d(arguments)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}},f.fromNodeCallback=function(a,b,c,d){return b||(b=m),function(){var e=o.call(arguments,0);return new i(function(f){return b.schedule(function(){function b(a){if(a)return void f.onError(a);var b=o.call(arguments,1);if(d)try{b=d(b)}catch(c){return void f.onError(c)}else 1===b.length&&(b=b[0]);f.onNext(b),f.onCompleted()}e.push(b),a.apply(c,e)})})}};var q=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,r=!!a.Ember&&"function"==typeof a.Ember.addListener;f.fromEvent=function(a,b,c){if(r)return s(function(){Ember.addListener(a,b)},function(){Ember.removeListener(a,b)},c);if(q){var d=q(a);return s(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new i(function(d){return e(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var s=f.fromEventPattern=function(a,b,c){return new i(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return k(function(){b&&b(e,f)})}).publish().refCount()};return f.startAsync=function(a){var b;try{b=a()}catch(c){return h(c)}return g(b)},c});
|