ember-source 1.2.2 → 1.3.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ember-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-data-deps.js +332 -193
- data/dist/ember-data-deps.min.js +5 -5
- data/dist/ember-data-deps.prod.js +331 -192
- data/dist/ember-debug.js +1 -1
- data/dist/ember-runtime.js +332 -193
- data/dist/ember-runtime.min.js +5 -5
- data/dist/ember-runtime.prod.js +331 -192
- data/dist/ember-spade.js +2 -2
- data/dist/ember-template-compiler.js +2 -2
- data/dist/ember-template-compiler.min.js +1 -1
- data/dist/ember-template-compiler.prod.js +2 -2
- data/dist/ember-tests.js +2 -2
- data/dist/ember.js +539 -551
- data/dist/ember.min.js +9 -9
- data/dist/ember.prod.js +450 -538
- metadata +10 -11
data/dist/ember-debug.js
CHANGED
data/dist/ember-runtime.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
// ==========================================================================
|
9
9
|
|
10
10
|
|
11
|
-
// Version: 1.
|
11
|
+
// Version: 1.3.0-beta.1
|
12
12
|
|
13
13
|
(function() {
|
14
14
|
/*global __fail__*/
|
@@ -194,7 +194,7 @@ if (!Ember.testing) {
|
|
194
194
|
// ==========================================================================
|
195
195
|
|
196
196
|
|
197
|
-
// Version: 1.
|
197
|
+
// Version: 1.3.0-beta.1
|
198
198
|
|
199
199
|
(function() {
|
200
200
|
var define, requireModule;
|
@@ -259,7 +259,7 @@ var define, requireModule;
|
|
259
259
|
|
260
260
|
@class Ember
|
261
261
|
@static
|
262
|
-
@version 1.
|
262
|
+
@version 1.3.0-beta.1
|
263
263
|
*/
|
264
264
|
|
265
265
|
if ('undefined' === typeof Ember) {
|
@@ -286,10 +286,10 @@ Ember.toString = function() { return "Ember"; };
|
|
286
286
|
/**
|
287
287
|
@property VERSION
|
288
288
|
@type String
|
289
|
-
@default '1.
|
289
|
+
@default '1.3.0-beta.1'
|
290
290
|
@final
|
291
291
|
*/
|
292
|
-
Ember.VERSION = '1.
|
292
|
+
Ember.VERSION = '1.3.0-beta.1';
|
293
293
|
|
294
294
|
/**
|
295
295
|
Standard environmental variables. You can define these in a global `ENV`
|
@@ -3975,10 +3975,6 @@ Ember.finishChains = function(obj) {
|
|
3975
3975
|
|
3976
3976
|
|
3977
3977
|
(function() {
|
3978
|
-
/**
|
3979
|
-
@module ember-metal
|
3980
|
-
*/
|
3981
|
-
|
3982
3978
|
|
3983
3979
|
})();
|
3984
3980
|
|
@@ -4047,7 +4043,6 @@ var metaFor = Ember.meta, // utils.js
|
|
4047
4043
|
generateGuid = Ember.generateGuid,
|
4048
4044
|
IS_PATH = /[\.\*]/;
|
4049
4045
|
|
4050
|
-
|
4051
4046
|
// returns true if the passed path is just a keyName
|
4052
4047
|
function isKeyName(path) {
|
4053
4048
|
return path==='*' || !IS_PATH.test(path);
|
@@ -4071,13 +4066,11 @@ Ember.watch = function(obj, _keyPath) {
|
|
4071
4066
|
// can't watch length on Array - it is special...
|
4072
4067
|
if (_keyPath === 'length' && typeOf(obj) === 'array') { return; }
|
4073
4068
|
|
4074
|
-
|
4075
|
-
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
}
|
4080
|
-
|
4069
|
+
if (isKeyName(_keyPath)) {
|
4070
|
+
watchKey(obj, _keyPath);
|
4071
|
+
} else {
|
4072
|
+
watchPath(obj, _keyPath);
|
4073
|
+
}
|
4081
4074
|
};
|
4082
4075
|
|
4083
4076
|
Ember.isWatching = function isWatching(obj, key) {
|
@@ -4091,13 +4084,11 @@ Ember.unwatch = function(obj, _keyPath) {
|
|
4091
4084
|
// can't watch length on Array - it is special...
|
4092
4085
|
if (_keyPath === 'length' && typeOf(obj) === 'array') { return; }
|
4093
4086
|
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4097
|
-
|
4098
|
-
|
4099
|
-
}
|
4100
|
-
|
4087
|
+
if (isKeyName(_keyPath)) {
|
4088
|
+
unwatchKey(obj, _keyPath);
|
4089
|
+
} else {
|
4090
|
+
unwatchPath(obj, _keyPath);
|
4091
|
+
}
|
4101
4092
|
};
|
4102
4093
|
|
4103
4094
|
/**
|
@@ -4443,15 +4434,12 @@ ComputedPropertyPrototype.readOnly = function(readOnly) {
|
|
4443
4434
|
@chainable
|
4444
4435
|
*/
|
4445
4436
|
ComputedPropertyPrototype.property = function() {
|
4446
|
-
var
|
4437
|
+
var args;
|
4447
4438
|
|
4448
4439
|
|
4449
|
-
|
4450
|
-
|
4451
|
-
|
4452
|
-
args.push(arguments[i]);
|
4453
|
-
|
4454
|
-
}
|
4440
|
+
args = a_slice.call(arguments);
|
4441
|
+
|
4442
|
+
|
4455
4443
|
this._dependentKeys = args;
|
4456
4444
|
return this;
|
4457
4445
|
};
|
@@ -5304,7 +5292,6 @@ Ember.computed.defaultTo = function(defaultPath) {
|
|
5304
5292
|
var AFTER_OBSERVERS = ':change',
|
5305
5293
|
BEFORE_OBSERVERS = ':before';
|
5306
5294
|
|
5307
|
-
|
5308
5295
|
function changeEvent(keyName) {
|
5309
5296
|
return keyName+AFTER_OBSERVERS;
|
5310
5297
|
}
|
@@ -5321,10 +5308,8 @@ function beforeEvent(keyName) {
|
|
5321
5308
|
@param {Function|String} [method]
|
5322
5309
|
*/
|
5323
5310
|
Ember.addObserver = function(obj, _path, target, method) {
|
5324
|
-
|
5325
|
-
|
5326
|
-
Ember.watch(obj, _path);
|
5327
|
-
|
5311
|
+
Ember.addListener(obj, changeEvent(_path), target, method);
|
5312
|
+
Ember.watch(obj, _path);
|
5328
5313
|
|
5329
5314
|
return this;
|
5330
5315
|
};
|
@@ -5341,10 +5326,9 @@ Ember.observersFor = function(obj, path) {
|
|
5341
5326
|
@param {Function|String} [method]
|
5342
5327
|
*/
|
5343
5328
|
Ember.removeObserver = function(obj, _path, target, method) {
|
5344
|
-
|
5345
|
-
|
5346
|
-
|
5347
|
-
|
5329
|
+
Ember.unwatch(obj, _path);
|
5330
|
+
Ember.removeListener(obj, changeEvent(_path), target, method);
|
5331
|
+
|
5348
5332
|
return this;
|
5349
5333
|
};
|
5350
5334
|
|
@@ -5356,10 +5340,9 @@ Ember.removeObserver = function(obj, _path, target, method) {
|
|
5356
5340
|
@param {Function|String} [method]
|
5357
5341
|
*/
|
5358
5342
|
Ember.addBeforeObserver = function(obj, _path, target, method) {
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5343
|
+
Ember.addListener(obj, beforeEvent(_path), target, method);
|
5344
|
+
Ember.watch(obj, _path);
|
5345
|
+
|
5363
5346
|
return this;
|
5364
5347
|
};
|
5365
5348
|
|
@@ -5399,10 +5382,9 @@ Ember.beforeObserversFor = function(obj, path) {
|
|
5399
5382
|
@param {Function|String} [method]
|
5400
5383
|
*/
|
5401
5384
|
Ember.removeBeforeObserver = function(obj, _path, target, method) {
|
5402
|
-
|
5403
|
-
|
5404
|
-
|
5405
|
-
|
5385
|
+
Ember.unwatch(obj, _path);
|
5386
|
+
Ember.removeListener(obj, beforeEvent(_path), target, method);
|
5387
|
+
|
5406
5388
|
return this;
|
5407
5389
|
};
|
5408
5390
|
|
@@ -6086,7 +6068,6 @@ Ember.run = function(target, method) {
|
|
6086
6068
|
};
|
6087
6069
|
|
6088
6070
|
/**
|
6089
|
-
|
6090
6071
|
If no run-loop is present, it creates a new one. If a run loop is
|
6091
6072
|
present it will queue itself to run on the existing run-loops action
|
6092
6073
|
queue.
|
@@ -7032,6 +7013,7 @@ var Mixin, REQUIRED, Alias,
|
|
7032
7013
|
defineProperty = Ember.defineProperty,
|
7033
7014
|
guidFor = Ember.guidFor;
|
7034
7015
|
|
7016
|
+
|
7035
7017
|
function mixinsMeta(obj) {
|
7036
7018
|
var m = Ember.meta(obj, true), ret = m.mixins;
|
7037
7019
|
if (!ret) {
|
@@ -7685,14 +7667,18 @@ Ember.aliasMethod = function(methodName) {
|
|
7685
7667
|
*/
|
7686
7668
|
Ember.observer = function() {
|
7687
7669
|
var func = a_slice.call(arguments, -1)[0];
|
7688
|
-
var paths
|
7670
|
+
var paths;
|
7689
7671
|
|
7690
|
-
|
7691
|
-
|
7672
|
+
|
7673
|
+
paths = a_slice.call(arguments, 0, -1);
|
7692
7674
|
|
7693
|
-
func
|
7694
|
-
|
7695
|
-
|
7675
|
+
if (typeof func !== "function") {
|
7676
|
+
// revert to old, soft-deprecated argument ordering
|
7677
|
+
|
7678
|
+
func = arguments[0];
|
7679
|
+
paths = a_slice.call(arguments, 1);
|
7680
|
+
}
|
7681
|
+
|
7696
7682
|
|
7697
7683
|
if (typeof func !== "function") {
|
7698
7684
|
throw new Ember.Error("Ember.observer called without a function");
|
@@ -7779,14 +7765,18 @@ Ember.immediateObserver = function() {
|
|
7779
7765
|
*/
|
7780
7766
|
Ember.beforeObserver = function() {
|
7781
7767
|
var func = a_slice.call(arguments, -1)[0];
|
7782
|
-
var paths
|
7768
|
+
var paths;
|
7783
7769
|
|
7784
|
-
|
7785
|
-
|
7770
|
+
|
7771
|
+
paths = a_slice.call(arguments, 0, -1);
|
7786
7772
|
|
7787
|
-
func
|
7788
|
-
|
7789
|
-
|
7773
|
+
if (typeof func !== "function") {
|
7774
|
+
// revert to old, soft-deprecated argument ordering
|
7775
|
+
|
7776
|
+
func = arguments[0];
|
7777
|
+
paths = a_slice.call(arguments, 1);
|
7778
|
+
}
|
7779
|
+
|
7790
7780
|
|
7791
7781
|
if (typeof func !== "function") {
|
7792
7782
|
throw new Ember.Error("Ember.beforeObserver called without a function");
|
@@ -7910,46 +7900,24 @@ define("rsvp/all",
|
|
7910
7900
|
__exports__.all = all;
|
7911
7901
|
});
|
7912
7902
|
define("rsvp/async",
|
7913
|
-
["exports"],
|
7914
|
-
function(__exports__) {
|
7903
|
+
["rsvp/config","exports"],
|
7904
|
+
function(__dependency1__, __exports__) {
|
7915
7905
|
"use strict";
|
7906
|
+
var config = __dependency1__.config;
|
7907
|
+
|
7916
7908
|
var browserGlobal = (typeof window !== 'undefined') ? window : {};
|
7917
7909
|
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
7918
|
-
var async;
|
7919
7910
|
var local = (typeof global !== 'undefined') ? global : this;
|
7920
7911
|
|
7921
|
-
//
|
7912
|
+
// node
|
7922
7913
|
function useNextTick() {
|
7923
|
-
return function(
|
7924
|
-
process.nextTick(
|
7925
|
-
callback(arg);
|
7926
|
-
});
|
7927
|
-
};
|
7928
|
-
}
|
7929
|
-
|
7930
|
-
// node >= 0.10.x
|
7931
|
-
function useSetImmediate() {
|
7932
|
-
return function(callback, arg) {
|
7933
|
-
/* global setImmediate */
|
7934
|
-
setImmediate(function(){
|
7935
|
-
callback(arg);
|
7936
|
-
});
|
7914
|
+
return function() {
|
7915
|
+
process.nextTick(flush);
|
7937
7916
|
};
|
7938
7917
|
}
|
7939
7918
|
|
7940
7919
|
function useMutationObserver() {
|
7941
|
-
var
|
7942
|
-
|
7943
|
-
var observer = new BrowserMutationObserver(function() {
|
7944
|
-
var toProcess = queue.slice();
|
7945
|
-
queue = [];
|
7946
|
-
|
7947
|
-
toProcess.forEach(function(tuple) {
|
7948
|
-
var callback = tuple[0], arg= tuple[1];
|
7949
|
-
callback(arg);
|
7950
|
-
});
|
7951
|
-
});
|
7952
|
-
|
7920
|
+
var observer = new BrowserMutationObserver(flush);
|
7953
7921
|
var element = document.createElement('div');
|
7954
7922
|
observer.observe(element, { attributes: true });
|
7955
7923
|
|
@@ -7959,44 +7927,118 @@ define("rsvp/async",
|
|
7959
7927
|
observer = null;
|
7960
7928
|
}, false);
|
7961
7929
|
|
7962
|
-
return function(
|
7963
|
-
queue.push([callback, arg]);
|
7930
|
+
return function() {
|
7964
7931
|
element.setAttribute('drainQueue', 'drainQueue');
|
7965
7932
|
};
|
7966
7933
|
}
|
7967
7934
|
|
7968
7935
|
function useSetTimeout() {
|
7969
|
-
return function(
|
7970
|
-
local.setTimeout(
|
7971
|
-
callback(arg);
|
7972
|
-
}, 1);
|
7936
|
+
return function() {
|
7937
|
+
local.setTimeout(flush, 1);
|
7973
7938
|
};
|
7974
7939
|
}
|
7975
7940
|
|
7976
|
-
|
7977
|
-
|
7978
|
-
|
7979
|
-
|
7941
|
+
var queue = [];
|
7942
|
+
function flush() {
|
7943
|
+
for (var i = 0; i < queue.length; i++) {
|
7944
|
+
var tuple = queue[i];
|
7945
|
+
var callback = tuple[0], arg = tuple[1];
|
7946
|
+
callback(arg);
|
7947
|
+
}
|
7948
|
+
queue = [];
|
7949
|
+
}
|
7950
|
+
|
7951
|
+
var scheduleFlush;
|
7952
|
+
|
7953
|
+
// Decide what async method to use to triggering processing of queued callbacks:
|
7954
|
+
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
|
7955
|
+
scheduleFlush = useNextTick();
|
7980
7956
|
} else if (BrowserMutationObserver) {
|
7981
|
-
|
7957
|
+
scheduleFlush = useMutationObserver();
|
7982
7958
|
} else {
|
7983
|
-
|
7959
|
+
scheduleFlush = useSetTimeout();
|
7960
|
+
}
|
7961
|
+
|
7962
|
+
function asyncDefault(callback, arg) {
|
7963
|
+
var length = queue.push([callback, arg]);
|
7964
|
+
if (length === 1) {
|
7965
|
+
// If length is 1, that means that we need to schedule an async flush.
|
7966
|
+
// If additional callbacks are queued before the queue is flushed, they
|
7967
|
+
// will be processed by this flush that we are scheduling.
|
7968
|
+
scheduleFlush();
|
7969
|
+
}
|
7970
|
+
}
|
7971
|
+
|
7972
|
+
config.async = asyncDefault;
|
7973
|
+
|
7974
|
+
function async(callback, arg) {
|
7975
|
+
config.async(callback, arg);
|
7984
7976
|
}
|
7985
7977
|
|
7986
7978
|
|
7987
7979
|
__exports__.async = async;
|
7980
|
+
__exports__.asyncDefault = asyncDefault;
|
7981
|
+
});
|
7982
|
+
define("rsvp/cast",
|
7983
|
+
["exports"],
|
7984
|
+
function(__exports__) {
|
7985
|
+
"use strict";
|
7986
|
+
function cast(object) {
|
7987
|
+
/*jshint validthis:true */
|
7988
|
+
if (object && typeof object === 'object' && object.constructor === this) {
|
7989
|
+
return object;
|
7990
|
+
}
|
7991
|
+
|
7992
|
+
var Promise = this;
|
7993
|
+
|
7994
|
+
return new Promise(function(resolve) {
|
7995
|
+
resolve(object);
|
7996
|
+
});
|
7997
|
+
}
|
7998
|
+
|
7999
|
+
|
8000
|
+
__exports__.cast = cast;
|
7988
8001
|
});
|
7989
8002
|
define("rsvp/config",
|
7990
|
-
["rsvp/
|
8003
|
+
["rsvp/events","exports"],
|
7991
8004
|
function(__dependency1__, __exports__) {
|
7992
8005
|
"use strict";
|
7993
|
-
var
|
8006
|
+
var EventTarget = __dependency1__.EventTarget;
|
7994
8007
|
|
7995
8008
|
var config = {};
|
7996
|
-
config
|
8009
|
+
EventTarget.mixin(config);
|
8010
|
+
|
8011
|
+
function configure(name, value) {
|
8012
|
+
if (name === 'onerror') {
|
8013
|
+
// handle for legacy users that expect the actual
|
8014
|
+
// error to be passed to their function added via
|
8015
|
+
// `RSVP.configure('onerror', someFunctionHere);`
|
8016
|
+
config.on('error', function(event){
|
8017
|
+
value(event.detail);
|
8018
|
+
});
|
8019
|
+
} else {
|
8020
|
+
config[name] = value;
|
8021
|
+
}
|
8022
|
+
}
|
8023
|
+
|
8024
|
+
function on(){
|
8025
|
+
return config.on.apply(config, arguments);
|
8026
|
+
}
|
8027
|
+
|
8028
|
+
function off(){
|
8029
|
+
return config.off.apply(config, arguments);
|
8030
|
+
}
|
8031
|
+
|
8032
|
+
function trigger(){
|
8033
|
+
return config.trigger.apply(config, arguments);
|
8034
|
+
}
|
7997
8035
|
|
7998
8036
|
|
7999
8037
|
__exports__.config = config;
|
8038
|
+
__exports__.configure = configure;
|
8039
|
+
__exports__.on = on;
|
8040
|
+
__exports__.off = off;
|
8041
|
+
__exports__.trigger = trigger;
|
8000
8042
|
});
|
8001
8043
|
define("rsvp/defer",
|
8002
8044
|
["rsvp/promise","exports"],
|
@@ -8225,11 +8267,12 @@ define("rsvp/node",
|
|
8225
8267
|
__exports__.denodeify = denodeify;
|
8226
8268
|
});
|
8227
8269
|
define("rsvp/promise",
|
8228
|
-
["rsvp/config","rsvp/events","exports"],
|
8229
|
-
function(__dependency1__, __dependency2__, __exports__) {
|
8270
|
+
["rsvp/config","rsvp/events","rsvp/cast","exports"],
|
8271
|
+
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
8230
8272
|
"use strict";
|
8231
8273
|
var config = __dependency1__.config;
|
8232
8274
|
var EventTarget = __dependency2__.EventTarget;
|
8275
|
+
var cast = __dependency3__.cast;
|
8233
8276
|
|
8234
8277
|
function objectOrFunction(x) {
|
8235
8278
|
return isFunction(x) || (typeof x === "object" && x !== null);
|
@@ -8239,7 +8282,7 @@ define("rsvp/promise",
|
|
8239
8282
|
return typeof x === "function";
|
8240
8283
|
}
|
8241
8284
|
|
8242
|
-
|
8285
|
+
function Promise(resolver) {
|
8243
8286
|
var promise = this,
|
8244
8287
|
resolved = false;
|
8245
8288
|
|
@@ -8263,27 +8306,11 @@ define("rsvp/promise",
|
|
8263
8306
|
reject(promise, value);
|
8264
8307
|
};
|
8265
8308
|
|
8266
|
-
this.on('promise:resolved', function(event) {
|
8267
|
-
this.trigger('success', { detail: event.detail });
|
8268
|
-
}, this);
|
8269
|
-
|
8270
|
-
this.on('promise:failed', function(event) {
|
8271
|
-
this.trigger('error', { detail: event.detail });
|
8272
|
-
}, this);
|
8273
|
-
|
8274
|
-
this.on('error', onerror);
|
8275
|
-
|
8276
8309
|
try {
|
8277
8310
|
resolver(resolvePromise, rejectPromise);
|
8278
8311
|
} catch(e) {
|
8279
8312
|
rejectPromise(e);
|
8280
8313
|
}
|
8281
|
-
};
|
8282
|
-
|
8283
|
-
function onerror(event) {
|
8284
|
-
if (config.onerror) {
|
8285
|
-
config.onerror(event.detail);
|
8286
|
-
}
|
8287
8314
|
}
|
8288
8315
|
|
8289
8316
|
var invokeCallback = function(type, promise, callback, event) {
|
@@ -8318,14 +8345,19 @@ define("rsvp/promise",
|
|
8318
8345
|
|
8319
8346
|
Promise.prototype = {
|
8320
8347
|
constructor: Promise,
|
8321
|
-
|
8322
8348
|
isRejected: undefined,
|
8323
8349
|
isFulfilled: undefined,
|
8324
8350
|
rejectedReason: undefined,
|
8325
8351
|
fulfillmentValue: undefined,
|
8326
8352
|
|
8353
|
+
_onerror: function (reason) {
|
8354
|
+
config.trigger('error', {
|
8355
|
+
detail: reason
|
8356
|
+
});
|
8357
|
+
},
|
8358
|
+
|
8327
8359
|
then: function(done, fail) {
|
8328
|
-
this.
|
8360
|
+
this._onerror = null;
|
8329
8361
|
|
8330
8362
|
var thenPromise = new this.constructor(function() {});
|
8331
8363
|
|
@@ -8352,11 +8384,27 @@ define("rsvp/promise",
|
|
8352
8384
|
return thenPromise;
|
8353
8385
|
},
|
8354
8386
|
|
8355
|
-
fail: function(
|
8356
|
-
return this.then(null,
|
8387
|
+
fail: function(onRejection) {
|
8388
|
+
return this.then(null, onRejection);
|
8389
|
+
},
|
8390
|
+
'finally': function(callback) {
|
8391
|
+
var constructor = this.constructor;
|
8392
|
+
|
8393
|
+
return this.then(function(value) {
|
8394
|
+
return constructor.cast(callback()).then(function(){
|
8395
|
+
return value;
|
8396
|
+
});
|
8397
|
+
}, function(reason) {
|
8398
|
+
return constructor.cast(callback()).then(function(){
|
8399
|
+
throw reason;
|
8400
|
+
});
|
8401
|
+
});
|
8357
8402
|
}
|
8358
8403
|
};
|
8359
8404
|
|
8405
|
+
Promise.prototype['catch'] = Promise.prototype.fail;
|
8406
|
+
Promise.cast = cast;
|
8407
|
+
|
8360
8408
|
EventTarget.mixin(Promise.prototype);
|
8361
8409
|
|
8362
8410
|
function resolve(promise, value) {
|
@@ -8417,6 +8465,7 @@ define("rsvp/promise",
|
|
8417
8465
|
|
8418
8466
|
function reject(promise, value) {
|
8419
8467
|
config.async(function() {
|
8468
|
+
if (promise._onerror) { promise._onerror(value); }
|
8420
8469
|
promise.trigger('promise:failed', { detail: value });
|
8421
8470
|
promise.isRejected = true;
|
8422
8471
|
promise.rejectedReason = value;
|
@@ -8473,8 +8522,8 @@ define("rsvp/rethrow",
|
|
8473
8522
|
__exports__.rethrow = rethrow;
|
8474
8523
|
});
|
8475
8524
|
define("rsvp",
|
8476
|
-
["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/rethrow","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","exports"],
|
8477
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __exports__) {
|
8525
|
+
["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/rethrow","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","rsvp/async","exports"],
|
8526
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __exports__) {
|
8478
8527
|
"use strict";
|
8479
8528
|
var EventTarget = __dependency1__.EventTarget;
|
8480
8529
|
var Promise = __dependency2__.Promise;
|
@@ -8484,12 +8533,14 @@ define("rsvp",
|
|
8484
8533
|
var rethrow = __dependency6__.rethrow;
|
8485
8534
|
var defer = __dependency7__.defer;
|
8486
8535
|
var config = __dependency8__.config;
|
8536
|
+
var configure = __dependency8__.configure;
|
8537
|
+
var on = __dependency8__.on;
|
8538
|
+
var off = __dependency8__.off;
|
8539
|
+
var trigger = __dependency8__.trigger;
|
8487
8540
|
var resolve = __dependency9__.resolve;
|
8488
8541
|
var reject = __dependency10__.reject;
|
8489
|
-
|
8490
|
-
|
8491
|
-
config[name] = value;
|
8492
|
-
}
|
8542
|
+
var async = __dependency11__.async;
|
8543
|
+
var asyncDefault = __dependency11__.asyncDefault;
|
8493
8544
|
|
8494
8545
|
|
8495
8546
|
__exports__.Promise = Promise;
|
@@ -8500,9 +8551,15 @@ define("rsvp",
|
|
8500
8551
|
__exports__.defer = defer;
|
8501
8552
|
__exports__.denodeify = denodeify;
|
8502
8553
|
__exports__.configure = configure;
|
8554
|
+
__exports__.trigger = trigger;
|
8555
|
+
__exports__.on = on;
|
8556
|
+
__exports__.off = off;
|
8503
8557
|
__exports__.resolve = resolve;
|
8504
8558
|
__exports__.reject = reject;
|
8559
|
+
__exports__.async = async;
|
8560
|
+
__exports__.asyncDefault = asyncDefault;
|
8505
8561
|
});
|
8562
|
+
|
8506
8563
|
})();
|
8507
8564
|
|
8508
8565
|
(function() {
|
@@ -9119,7 +9176,6 @@ define("container",
|
|
9119
9176
|
```javascript
|
9120
9177
|
var container = new Container();
|
9121
9178
|
|
9122
|
-
container.registerFactory('model:user', User);
|
9123
9179
|
container.register('store:main', SomeStore);
|
9124
9180
|
|
9125
9181
|
container.factoryTypeInjection('model', 'store', 'store:main');
|
@@ -9207,7 +9263,6 @@ define("container",
|
|
9207
9263
|
@method destroy
|
9208
9264
|
*/
|
9209
9265
|
destroy: function() {
|
9210
|
-
this.isDestroyed = true;
|
9211
9266
|
|
9212
9267
|
for (var i=0, l=this.children.length; i<l; i++) {
|
9213
9268
|
this.children[i].destroy();
|
@@ -10647,12 +10702,14 @@ function makeCtor() {
|
|
10647
10702
|
|
10648
10703
|
Ember.assert("Ember.Object.create no longer supports mixing in other definitions, use createWithMixins instead.", !(properties instanceof Ember.Mixin));
|
10649
10704
|
|
10650
|
-
if (properties
|
10651
|
-
Ember.
|
10652
|
-
continue;
|
10705
|
+
if (typeof properties !== 'object' && properties !== undefined) {
|
10706
|
+
throw new Ember.Error("Ember.Object.create only accepts objects.");
|
10653
10707
|
}
|
10654
10708
|
|
10709
|
+
if (!properties) { continue; }
|
10710
|
+
|
10655
10711
|
var keyNames = Ember.keys(properties);
|
10712
|
+
|
10656
10713
|
for (var j = 0, ll = keyNames.length; j < ll; j++) {
|
10657
10714
|
var keyName = keyNames[j];
|
10658
10715
|
if (!properties.hasOwnProperty(keyName)) { continue; }
|
@@ -11763,7 +11820,7 @@ function iter(key, value) {
|
|
11763
11820
|
with an `Ember.Object` subclass, you should be sure to change the length
|
11764
11821
|
property using `set().`
|
11765
11822
|
|
11766
|
-
2.
|
11823
|
+
2. You must implement `nextObject().` See documentation.
|
11767
11824
|
|
11768
11825
|
Once you have these two methods implement, apply the `Ember.Enumerable` mixin
|
11769
11826
|
to your class and you will be able to enumerate the contents of your object
|
@@ -12263,29 +12320,35 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
12263
12320
|
},
|
12264
12321
|
|
12265
12322
|
/**
|
12266
|
-
Returns `true` if the passed property resolves to `true` for all items in
|
12267
|
-
the enumerable. This method is often simpler/faster than using a callback.
|
12268
|
-
|
12269
12323
|
@method everyBy
|
12270
12324
|
@param {String} key the property to test
|
12271
12325
|
@param {String} [value] optional value to test against.
|
12326
|
+
@deprecated Use `isEvery` instead
|
12272
12327
|
@return {Boolean}
|
12273
12328
|
*/
|
12274
|
-
everyBy:
|
12275
|
-
|
12276
|
-
|
12329
|
+
everyBy: Ember.aliasMethod('isEvery'),
|
12330
|
+
|
12331
|
+
/**
|
12332
|
+
@method everyProperty
|
12333
|
+
@param {String} key the property to test
|
12334
|
+
@param {String} [value] optional value to test against.
|
12335
|
+
@deprecated Use `isEvery` instead
|
12336
|
+
@return {Boolean}
|
12337
|
+
*/
|
12338
|
+
everyProperty: Ember.aliasMethod('isEvery'),
|
12277
12339
|
|
12278
12340
|
/**
|
12279
12341
|
Returns `true` if the passed property resolves to `true` for all items in
|
12280
12342
|
the enumerable. This method is often simpler/faster than using a callback.
|
12281
12343
|
|
12282
|
-
@method
|
12344
|
+
@method isEvery
|
12283
12345
|
@param {String} key the property to test
|
12284
12346
|
@param {String} [value] optional value to test against.
|
12285
12347
|
@return {Boolean}
|
12286
|
-
@deprecated Use `everyBy` instead
|
12287
12348
|
*/
|
12288
|
-
|
12349
|
+
isEvery: function(key, value) {
|
12350
|
+
return this.every(iter.apply(this, arguments));
|
12351
|
+
},
|
12289
12352
|
|
12290
12353
|
/**
|
12291
12354
|
Returns `true` if the passed function returns true for any item in the
|
@@ -12373,21 +12436,27 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
12373
12436
|
@param {String} [value] optional value to test against.
|
12374
12437
|
@return {Boolean} `true` if the passed function returns `true` for any item
|
12375
12438
|
*/
|
12376
|
-
|
12439
|
+
isAny: function(key, value) {
|
12377
12440
|
return this.any(iter.apply(this, arguments));
|
12378
12441
|
},
|
12379
12442
|
|
12380
12443
|
/**
|
12381
|
-
|
12382
|
-
|
12444
|
+
@method someProperty
|
12445
|
+
@param {String} key the property to test
|
12446
|
+
@param {String} [value] optional value to test against.
|
12447
|
+
@return {Boolean} `true` if the passed function returns `true` for any item
|
12448
|
+
@deprecated Use `isAny` instead
|
12449
|
+
*/
|
12450
|
+
anyBy: Ember.aliasMethod('isAny'),
|
12383
12451
|
|
12452
|
+
/**
|
12384
12453
|
@method someProperty
|
12385
12454
|
@param {String} key the property to test
|
12386
12455
|
@param {String} [value] optional value to test against.
|
12387
12456
|
@return {Boolean} `true` if the passed function returns `true` for any item
|
12388
|
-
@deprecated Use `
|
12457
|
+
@deprecated Use `isAny` instead
|
12389
12458
|
*/
|
12390
|
-
someProperty: Ember.aliasMethod('
|
12459
|
+
someProperty: Ember.aliasMethod('isAny'),
|
12391
12460
|
|
12392
12461
|
/**
|
12393
12462
|
This will combine the values of the enumerator into a single value. It
|
@@ -12675,38 +12744,33 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
12675
12744
|
Ember.propertyDidChange(this, '[]');
|
12676
12745
|
|
12677
12746
|
return this ;
|
12678
|
-
}
|
12679
|
-
|
12680
|
-
});
|
12681
|
-
|
12747
|
+
},
|
12682
12748
|
|
12683
|
-
|
12684
|
-
|
12685
|
-
|
12686
|
-
specified in the argument.
|
12749
|
+
/**
|
12750
|
+
Converts the enumerable into an array and sorts by the keys
|
12751
|
+
specified in the argument.
|
12687
12752
|
|
12688
|
-
|
12753
|
+
You may provide multiple arguments to sort by multiple properties.
|
12689
12754
|
|
12690
|
-
|
12691
|
-
|
12692
|
-
|
12755
|
+
@method sortBy
|
12756
|
+
@param {String} property name(s) to sort on
|
12757
|
+
@return {Array} The sorted array.
|
12693
12758
|
*/
|
12694
|
-
|
12695
|
-
|
12696
|
-
|
12697
|
-
|
12698
|
-
|
12699
|
-
|
12700
|
-
|
12701
|
-
|
12702
|
-
|
12703
|
-
|
12704
|
-
|
12705
|
-
|
12706
|
-
|
12707
|
-
|
12708
|
-
|
12709
|
-
|
12759
|
+
sortBy: function() {
|
12760
|
+
var sortKeys = arguments;
|
12761
|
+
return this.toArray().sort(function(a, b){
|
12762
|
+
for(var i = 0; i < sortKeys.length; i++) {
|
12763
|
+
var key = sortKeys[i],
|
12764
|
+
propA = get(a, key),
|
12765
|
+
propB = get(b, key);
|
12766
|
+
// return 1 or -1 else continue to the next sortKey
|
12767
|
+
var compareValue = Ember.compare(propA, propB);
|
12768
|
+
if (compareValue) { return compareValue; }
|
12769
|
+
}
|
12770
|
+
return 0;
|
12771
|
+
});
|
12772
|
+
}
|
12773
|
+
});
|
12710
12774
|
|
12711
12775
|
})();
|
12712
12776
|
|
@@ -13159,14 +13223,14 @@ var e_get = Ember.get,
|
|
13159
13223
|
// Here we explicitly don't allow `@each.foo`; it would require some special
|
13160
13224
|
// testing, but there's no particular reason why it should be disallowed.
|
13161
13225
|
eachPropertyPattern = /^(.*)\.@each\.(.*)/,
|
13162
|
-
doubleEachPropertyPattern = /(.*\.@each){2,}
|
13226
|
+
doubleEachPropertyPattern = /(.*\.@each){2,}/,
|
13227
|
+
arrayBracketPattern = /\.\[\]$/;
|
13228
|
+
|
13163
13229
|
|
13164
13230
|
function get(obj, key) {
|
13165
|
-
|
13166
|
-
|
13167
|
-
|
13168
|
-
}
|
13169
|
-
|
13231
|
+
if (key === '@this') {
|
13232
|
+
return obj;
|
13233
|
+
}
|
13170
13234
|
|
13171
13235
|
return e_get(obj, key);
|
13172
13236
|
}
|
@@ -13530,6 +13594,15 @@ function reset(cp, propertyName) {
|
|
13530
13594
|
}
|
13531
13595
|
}
|
13532
13596
|
|
13597
|
+
function partiallyRecomputeFor(obj, dependentKey) {
|
13598
|
+
if (arrayBracketPattern.test(dependentKey)) {
|
13599
|
+
return false;
|
13600
|
+
}
|
13601
|
+
|
13602
|
+
var value = get(obj, dependentKey);
|
13603
|
+
return Ember.Array.detect(value);
|
13604
|
+
}
|
13605
|
+
|
13533
13606
|
function ReduceComputedPropertyInstanceMeta(context, propertyName, initialValue) {
|
13534
13607
|
this.context = context;
|
13535
13608
|
this.propertyName = propertyName;
|
@@ -13610,6 +13683,10 @@ function ReduceComputedProperty(options) {
|
|
13610
13683
|
|
13611
13684
|
meta.dependentArraysObserver.suspendArrayObservers(function () {
|
13612
13685
|
forEach(cp._dependentKeys, function (dependentKey) {
|
13686
|
+
|
13687
|
+
if (!partiallyRecomputeFor(this, dependentKey)) { return; }
|
13688
|
+
|
13689
|
+
|
13613
13690
|
var dependentArray = get(this, dependentKey),
|
13614
13691
|
previousDependentArray = meta.dependentArrays[dependentKey];
|
13615
13692
|
|
@@ -13637,6 +13714,10 @@ function ReduceComputedProperty(options) {
|
|
13637
13714
|
}, this);
|
13638
13715
|
|
13639
13716
|
forEach(cp._dependentKeys, function(dependentKey) {
|
13717
|
+
|
13718
|
+
if (!partiallyRecomputeFor(this, dependentKey)) { return; }
|
13719
|
+
|
13720
|
+
|
13640
13721
|
var dependentArray = get(this, dependentKey);
|
13641
13722
|
if (dependentArray) {
|
13642
13723
|
addItems.call(this, dependentArray, callbacks, cp, propertyName, meta);
|
@@ -13729,8 +13810,11 @@ ReduceComputedProperty.prototype.property = function () {
|
|
13729
13810
|
throw new Ember.Error("Nested @each properties not supported: " + dependentKey);
|
13730
13811
|
} else if (match = eachPropertyPattern.exec(dependentKey)) {
|
13731
13812
|
dependentArrayKey = match[1];
|
13732
|
-
|
13733
|
-
|
13813
|
+
|
13814
|
+
|
13815
|
+
itemPropertyKey = match[2];
|
13816
|
+
cp.itemPropertyKey(dependentArrayKey, itemPropertyKey);
|
13817
|
+
|
13734
13818
|
propertyArgs.add(dependentArrayKey);
|
13735
13819
|
} else {
|
13736
13820
|
propertyArgs.add(dependentKey);
|
@@ -13738,6 +13822,7 @@ ReduceComputedProperty.prototype.property = function () {
|
|
13738
13822
|
});
|
13739
13823
|
|
13740
13824
|
return ComputedProperty.prototype.property.apply(this, propertyArgs.toArray());
|
13825
|
+
|
13741
13826
|
};
|
13742
13827
|
|
13743
13828
|
/**
|
@@ -13887,6 +13972,34 @@ ReduceComputedProperty.prototype.property = function () {
|
|
13887
13972
|
})
|
13888
13973
|
```
|
13889
13974
|
|
13975
|
+
Dependent keys whose values are not arrays are treated as regular
|
13976
|
+
dependencies: when they change, the computed property is completely
|
13977
|
+
recalculated. It is sometimes useful to have dependent arrays with similar
|
13978
|
+
semantics. Dependent keys which end in `.[]` do not use "one at a time"
|
13979
|
+
semantics. When an item is added or removed from such a dependency, the
|
13980
|
+
computed property is completely recomputed.
|
13981
|
+
|
13982
|
+
Example
|
13983
|
+
|
13984
|
+
```javascript
|
13985
|
+
Ember.Object.extend({
|
13986
|
+
// When `string` is changed, `computed` is completely recomputed.
|
13987
|
+
string: 'a string',
|
13988
|
+
|
13989
|
+
// When an item is added to `array`, `addedItem` is called.
|
13990
|
+
array: [],
|
13991
|
+
|
13992
|
+
// When an item is added to `anotherArray`, `computed` is completely
|
13993
|
+
// recomputed.
|
13994
|
+
anotherArray: [],
|
13995
|
+
|
13996
|
+
computed: Ember.reduceComputed('string', 'array', 'anotherArray.[]', {
|
13997
|
+
addedItem: addedItemCallback,
|
13998
|
+
removedItem: removedItemCallback
|
13999
|
+
})
|
14000
|
+
});
|
14001
|
+
```
|
14002
|
+
|
13890
14003
|
@method reduceComputed
|
13891
14004
|
@for Ember
|
13892
14005
|
@param {String} [dependentKeys*]
|
@@ -14821,6 +14934,22 @@ Ember.computed.sort = function (itemsKey, sortDefinition) {
|
|
14821
14934
|
*/
|
14822
14935
|
Ember.RSVP = requireModule('rsvp');
|
14823
14936
|
|
14937
|
+
Ember.RSVP.onerrorDefault = function(event) {
|
14938
|
+
var error = event.detail;
|
14939
|
+
|
14940
|
+
if (error instanceof Error) {
|
14941
|
+
Ember.Logger.error(error.stack);
|
14942
|
+
|
14943
|
+
if (Ember.testing) {
|
14944
|
+
throw error;
|
14945
|
+
} else {
|
14946
|
+
Ember.assert(error, false);
|
14947
|
+
}
|
14948
|
+
}
|
14949
|
+
};
|
14950
|
+
|
14951
|
+
Ember.RSVP.on('error', Ember.RSVP.onerrorDefault);
|
14952
|
+
|
14824
14953
|
})();
|
14825
14954
|
|
14826
14955
|
|
@@ -14833,6 +14962,7 @@ Ember.RSVP = requireModule('rsvp');
|
|
14833
14962
|
|
14834
14963
|
var a_slice = Array.prototype.slice;
|
14835
14964
|
|
14965
|
+
|
14836
14966
|
if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
|
14837
14967
|
|
14838
14968
|
/**
|
@@ -14897,6 +15027,8 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
|
|
14897
15027
|
*/
|
14898
15028
|
Function.prototype.property = function() {
|
14899
15029
|
var ret = Ember.computed(this);
|
15030
|
+
// ComputedProperty.prototype.property expands properties; no need for us to
|
15031
|
+
// do so here.
|
14900
15032
|
return ret.property.apply(ret, arguments);
|
14901
15033
|
};
|
14902
15034
|
|
@@ -14926,7 +15058,10 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
|
|
14926
15058
|
@for Function
|
14927
15059
|
*/
|
14928
15060
|
Function.prototype.observes = function() {
|
14929
|
-
|
15061
|
+
|
15062
|
+
this.__ember_observes__ = a_slice.call(arguments);
|
15063
|
+
|
15064
|
+
|
14930
15065
|
return this;
|
14931
15066
|
};
|
14932
15067
|
|
@@ -14961,6 +15096,7 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
|
|
14961
15096
|
Ember.assert("Immediate observers must observe internal properties only, not properties on other objects.", arg.indexOf('.') === -1);
|
14962
15097
|
}
|
14963
15098
|
|
15099
|
+
// observes handles property expansion
|
14964
15100
|
return this.observes.apply(this, arguments);
|
14965
15101
|
};
|
14966
15102
|
|
@@ -14987,7 +15123,10 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
|
|
14987
15123
|
@for Function
|
14988
15124
|
*/
|
14989
15125
|
Function.prototype.observesBefore = function() {
|
14990
|
-
|
15126
|
+
|
15127
|
+
this.__ember_observesBefore__ = a_slice.call(arguments);
|
15128
|
+
|
15129
|
+
|
14991
15130
|
return this;
|
14992
15131
|
};
|
14993
15132
|
|