ember-source 2.14.0.beta.2 → 2.14.0.beta.3
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +85 -101
- data/dist/ember-template-compiler.js +298 -314
- data/dist/ember-testing.js +452 -454
- data/dist/ember-tests.js +128 -32
- data/dist/ember-tests.prod.js +112 -28
- data/dist/ember.debug.js +771 -728
- data/dist/ember.min.js +194 -215
- data/dist/ember.prod.js +322 -821
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c528163801044f08c894c3e12454131d6d5a191
|
4
|
+
data.tar.gz: b7460495a2ef06aa13a1fa3c7c4a77f2a6e6e191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b775e038c8285dec5c7405abcd21121d9f2e16b47a345bc45195d144c6490795a6561c58eb81543ce82530554bbddb75737bfed32bfb6e94d3e19f4be9bd79b0
|
7
|
+
data.tar.gz: 0291be65bfb6d3f3e9a44f439e0a3b891ee5f5cf9246951fcba41ee7e35649caf820648331c10b0a6f100bb9bc51b010c8ed2eda8add884f505a98faeb787d57
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.14.0.beta.
|
1
|
+
2.14.0.beta.3
|
data/dist/ember-runtime.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
7
7
|
* @license Licensed under MIT license
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
9
|
-
* @version 2.14.0-beta.
|
9
|
+
* @version 2.14.0-beta.3
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -148,12 +148,12 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
148
148
|
|
149
149
|
Container.prototype = {
|
150
150
|
lookup: function (fullName, options) {
|
151
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName)));
|
151
|
+
(true && !(this.registry.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName)));
|
152
152
|
|
153
153
|
return lookup(this, this.registry.normalize(fullName), options);
|
154
154
|
},
|
155
155
|
lookupFactory: function (fullName, options) {
|
156
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName)));
|
156
|
+
(true && !(this.registry.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName)));
|
157
157
|
(true && !(false) && (0, _emberDebug.deprecate)('Using "_lookupFactory" is deprecated. Please use container.factoryFor instead.', false, { id: 'container-lookupFactory', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x/#toc_migrating-from-_lookupfactory-to-factoryfor' }));
|
158
158
|
|
159
159
|
|
@@ -180,7 +180,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
180
180
|
|
181
181
|
var normalizedName = this.registry.normalize(fullName);
|
182
182
|
|
183
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(normalizedName)));
|
183
|
+
(true && !(this.registry.validateFullName(normalizedName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(normalizedName)));
|
184
184
|
|
185
185
|
|
186
186
|
if (options.source) {
|
@@ -748,7 +748,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
748
748
|
},
|
749
749
|
register: function (fullName, factory) {
|
750
750
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
751
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
751
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
752
752
|
|
753
753
|
|
754
754
|
if (factory === undefined) {
|
@@ -766,7 +766,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
766
766
|
this._options[normalizedName] = options;
|
767
767
|
},
|
768
768
|
unregister: function (fullName) {
|
769
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
769
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
770
770
|
|
771
771
|
|
772
772
|
var normalizedName = this.normalize(fullName);
|
@@ -779,7 +779,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
779
779
|
delete this._options[normalizedName];
|
780
780
|
},
|
781
781
|
resolve: function (fullName, options) {
|
782
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
782
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
783
783
|
|
784
784
|
var factory = resolve(this, this.normalize(fullName), options);
|
785
785
|
if (factory === undefined && this.fallback) {
|
@@ -870,7 +870,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
870
870
|
}
|
871
871
|
},
|
872
872
|
typeInjection: function (type, property, fullName) {
|
873
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
873
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
874
874
|
|
875
875
|
|
876
876
|
var fullNameType = fullName.split(':')[0];
|
@@ -893,7 +893,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
893
893
|
return this.typeInjection(fullName, property, normalizedInjectionName);
|
894
894
|
}
|
895
895
|
|
896
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
896
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
897
897
|
|
898
898
|
var normalizedName = this.normalize(fullName);
|
899
899
|
|
@@ -974,7 +974,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
974
974
|
for (var i = 0; i < injections.length; i++) {
|
975
975
|
fullName = injections[i].fullName;
|
976
976
|
|
977
|
-
(true && (0, _emberDebug.assert)('Attempting to inject an unknown injection: \'' + fullName + '\'', this.has(fullName)));
|
977
|
+
(true && !(this.has(fullName)) && (0, _emberDebug.assert)('Attempting to inject an unknown injection: \'' + fullName + '\'', this.has(fullName)));
|
978
978
|
}
|
979
979
|
},
|
980
980
|
normalizeInjectionsHash: function (hash) {
|
@@ -982,7 +982,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
982
982
|
|
983
983
|
for (var key in hash) {
|
984
984
|
if (hash.hasOwnProperty(key)) {
|
985
|
-
(true && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
|
985
|
+
(true && !(this.validateFullName(hash[key])) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
|
986
986
|
|
987
987
|
|
988
988
|
injections.push({
|
@@ -1052,9 +1052,9 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
|
|
1052
1052
|
*/
|
1053
1053
|
Registry.prototype.expandLocalLookup = function Registry_expandLocalLookup(fullName, options) {
|
1054
1054
|
if (this.resolver && this.resolver.expandLocalLookup) {
|
1055
|
-
(true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
1056
|
-
(true && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
|
1057
|
-
(true && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
|
1055
|
+
(true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
|
1056
|
+
(true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
|
1057
|
+
(true && !(this.validateFullName(options.source)) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
|
1058
1058
|
|
1059
1059
|
|
1060
1060
|
var normalizedFullName = this.normalize(fullName);
|
@@ -1480,9 +1480,6 @@ enifed('ember-environment', ['exports'], function (exports) {
|
|
1480
1480
|
*/
|
1481
1481
|
ENV.LOG_VERSION = defaultTrue(ENV.LOG_VERSION);
|
1482
1482
|
|
1483
|
-
// default false
|
1484
|
-
ENV.MODEL_FACTORY_INJECTIONS = defaultFalse(ENV.MODEL_FACTORY_INJECTIONS);
|
1485
|
-
|
1486
1483
|
/**
|
1487
1484
|
Debug parameter you can turn on. This will log all bindings that fire to
|
1488
1485
|
the console. This should be disabled in production code. Note that you
|
@@ -1809,7 +1806,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
1809
1806
|
@public
|
1810
1807
|
*/
|
1811
1808
|
function addListener(obj, eventName, target, method, once) {
|
1812
|
-
true && emberDebug.assert('You must pass at least an object and event name to Ember.addListener', !!obj && !!eventName);
|
1809
|
+
true && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to Ember.addListener', !!obj && !!eventName);
|
1813
1810
|
true && !(eventName !== 'didInitAttrs') && emberDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', {
|
1814
1811
|
id: 'ember-views.did-init-attrs',
|
1815
1812
|
until: '3.0.0',
|
@@ -1847,7 +1844,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
1847
1844
|
@public
|
1848
1845
|
*/
|
1849
1846
|
function removeListener(obj, eventName, target, method) {
|
1850
|
-
true && emberDebug.assert('You must pass at least an object and event name to Ember.removeListener', !!obj && !!eventName);
|
1847
|
+
true && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to Ember.removeListener', !!obj && !!eventName);
|
1851
1848
|
|
1852
1849
|
if (!method && 'function' === typeof target) {
|
1853
1850
|
method = target;
|
@@ -2286,7 +2283,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
2286
2283
|
if (ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
|
2287
2284
|
true && !false && emberDebug.deprecate(message + ' will be removed in Ember 3.0.', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
|
2288
2285
|
} else {
|
2289
|
-
true && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
|
2286
|
+
true && !false && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
|
2290
2287
|
}
|
2291
2288
|
}
|
2292
2289
|
|
@@ -2622,7 +2619,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
2622
2619
|
if (!m.isInitialized(this)) {
|
2623
2620
|
m.writeValues(name, value);
|
2624
2621
|
} else {
|
2625
|
-
true && emberDebug.assert('You must use Ember.set() to set the `' + name + '` property (of ' + this + ') to `' + value + '`.', false);
|
2622
|
+
true && !false && emberDebug.assert('You must use Ember.set() to set the `' + name + '` property (of ' + this + ') to `' + value + '`.', false);
|
2626
2623
|
}
|
2627
2624
|
}
|
2628
2625
|
|
@@ -3599,7 +3596,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
3599
3596
|
|
3600
3597
|
|
3601
3598
|
Meta.prototype.writeDeps = function writeDeps(subkey, itemkey, value) {
|
3602
|
-
true && emberDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
|
3599
|
+
true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
|
3603
3600
|
|
3604
3601
|
var outerMap = this._getOrCreateOwnMap('_deps');
|
3605
3602
|
var innerMap = outerMap[subkey];
|
@@ -3746,7 +3743,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
3746
3743
|
var capitalized = capitalize(name);
|
3747
3744
|
|
3748
3745
|
Meta.prototype['write' + capitalized] = function (subkey, value) {
|
3749
|
-
true && emberDebug.assert('Cannot call write' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3746
|
+
true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call write' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3750
3747
|
|
3751
3748
|
var map = this._getOrCreateOwnMap(key);
|
3752
3749
|
map[subkey] = value;
|
@@ -3775,7 +3772,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
3775
3772
|
};
|
3776
3773
|
|
3777
3774
|
Meta.prototype['clear' + capitalized] = function () {
|
3778
|
-
true && emberDebug.assert('Cannot call clear' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3775
|
+
true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call clear' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3779
3776
|
|
3780
3777
|
this[key] = undefined;
|
3781
3778
|
};
|
@@ -3797,7 +3794,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
3797
3794
|
var key = memberProperty(name);
|
3798
3795
|
var capitalized = capitalize(name);
|
3799
3796
|
Meta.prototype['writable' + capitalized] = function (create) {
|
3800
|
-
true && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3797
|
+
true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3801
3798
|
|
3802
3799
|
var ret = this[key];
|
3803
3800
|
if (ret === undefined) {
|
@@ -3817,7 +3814,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
3817
3814
|
var key = memberProperty(name);
|
3818
3815
|
var capitalized = capitalize(name);
|
3819
3816
|
Meta.prototype['writable' + capitalized] = function (create) {
|
3820
|
-
true && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3817
|
+
true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
|
3821
3818
|
|
3822
3819
|
var ret = this[key];
|
3823
3820
|
if (ret === undefined) {
|
@@ -4185,11 +4182,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4185
4182
|
@public
|
4186
4183
|
*/
|
4187
4184
|
function get(obj, keyName) {
|
4188
|
-
true && emberDebug.assert('Get must be called with two arguments; an object and a property key', arguments.length === 2);
|
4189
|
-
true && emberDebug.assert('Cannot call get with \'' + keyName + '\' on an undefined object.', obj !== undefined && obj !== null);
|
4190
|
-
true && emberDebug.assert('The key provided to get must be a string, you passed ' + keyName, typeof keyName === 'string');
|
4191
|
-
true && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
|
4192
|
-
true && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');
|
4185
|
+
true && !(arguments.length === 2) && emberDebug.assert('Get must be called with two arguments; an object and a property key', arguments.length === 2);
|
4186
|
+
true && !(obj !== undefined && obj !== null) && emberDebug.assert('Cannot call get with \'' + keyName + '\' on an undefined object.', obj !== undefined && obj !== null);
|
4187
|
+
true && !(typeof keyName === 'string') && emberDebug.assert('The key provided to get must be a string, you passed ' + keyName, typeof keyName === 'string');
|
4188
|
+
true && !!hasThis(keyName) && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
|
4189
|
+
true && !(keyName !== '') && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');
|
4193
4190
|
|
4194
4191
|
var value = obj[keyName];
|
4195
4192
|
var desc = value !== null && typeof value === 'object' && value.isDescriptor ? value : undefined;
|
@@ -4283,11 +4280,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4283
4280
|
@public
|
4284
4281
|
*/
|
4285
4282
|
function set(obj, keyName, value, tolerant) {
|
4286
|
-
true && emberDebug.assert('Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false', arguments.length === 3 || arguments.length === 4);
|
4287
|
-
true && emberDebug.assert('Cannot call set with \'' + keyName + '\' on an undefined object.', obj && typeof obj === 'object' || typeof obj === 'function');
|
4288
|
-
true && emberDebug.assert('The key provided to set must be a string, you passed ' + keyName, typeof keyName === 'string');
|
4289
|
-
true && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
|
4290
|
-
true && emberDebug.assert('calling set on destroyed object: ' + emberUtils.toString(obj) + '.' + keyName + ' = ' + emberUtils.toString(value), !obj.isDestroyed);
|
4283
|
+
true && !(arguments.length === 3 || arguments.length === 4) && emberDebug.assert('Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false', arguments.length === 3 || arguments.length === 4);
|
4284
|
+
true && !(obj && typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call set with \'' + keyName + '\' on an undefined object.', obj && typeof obj === 'object' || typeof obj === 'function');
|
4285
|
+
true && !(typeof keyName === 'string') && emberDebug.assert('The key provided to set must be a string, you passed ' + keyName, typeof keyName === 'string');
|
4286
|
+
true && !!hasThis(keyName) && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
|
4287
|
+
true && !!obj.isDestroyed && emberDebug.assert('calling set on destroyed object: ' + emberUtils.toString(obj) + '.' + keyName + ' = ' + emberUtils.toString(value), !obj.isDestroyed);
|
4291
4288
|
|
4292
4289
|
if (isPath(keyName)) {
|
4293
4290
|
return setPath(obj, keyName, value, tolerant);
|
@@ -4309,7 +4306,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4309
4306
|
desc.set(obj, keyName, value);
|
4310
4307
|
} else if (obj.setUnknownProperty && currentValue === undefined && !(keyName in obj)) {
|
4311
4308
|
/* unknown property */
|
4312
|
-
true && emberDebug.assert('setUnknownProperty must be a function', typeof obj.setUnknownProperty === 'function');
|
4309
|
+
true && !(typeof obj.setUnknownProperty === 'function') && emberDebug.assert('setUnknownProperty must be a function', typeof obj.setUnknownProperty === 'function');
|
4313
4310
|
|
4314
4311
|
obj.setUnknownProperty(keyName, value);
|
4315
4312
|
} else if (currentValue === value) {
|
@@ -4431,56 +4428,37 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4431
4428
|
expansion, and is passed the expansion.
|
4432
4429
|
*/
|
4433
4430
|
function expandProperties(pattern, callback) {
|
4434
|
-
true && emberDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
|
4435
|
-
true && emberDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
|
4436
|
-
|
4437
|
-
|
4438
|
-
|
4439
|
-
|
4440
|
-
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4444
|
-
|
4445
|
-
|
4446
|
-
switch (current) {
|
4447
|
-
// Closing curly brace will be the first character of the brace expansion we encounter.
|
4448
|
-
// Bookmark its index so long as we're not already inside a brace expansion.
|
4449
|
-
case '}':
|
4450
|
-
if (!inside) {
|
4451
|
-
bookmark = i - 1;
|
4452
|
-
inside = true;
|
4453
|
-
} else {
|
4454
|
-
true && emberDebug.assert(unbalancedNestedError, false);
|
4455
|
-
}
|
4456
|
-
break;
|
4457
|
-
// Opening curly brace will be the last character of the brace expansion we encounter.
|
4458
|
-
// Apply the brace expansion so long as we've already seen a closing curly brace.
|
4459
|
-
case '{':
|
4460
|
-
if (inside) {
|
4461
|
-
var expansion = pattern.slice(i, bookmark).split(',');
|
4462
|
-
// Iterating backward allows us to push new properties w/out affecting our "cursor".
|
4463
|
-
for (var j = properties.length; j > 0; --j) {
|
4464
|
-
// Extract the unexpanded property from the array.
|
4465
|
-
var property = properties.splice(j - 1, 1)[0];
|
4466
|
-
// Iterate over the expansion, pushing the newly formed properties onto the array.
|
4467
|
-
for (var k = 0; k < expansion.length; ++k) {
|
4468
|
-
properties.push(property.slice(0, i - 1) + expansion[k] + property.slice(bookmark + 1));
|
4469
|
-
}
|
4470
|
-
}
|
4471
|
-
inside = false;
|
4472
|
-
} else {
|
4473
|
-
true && emberDebug.assert(unbalancedNestedError, false);
|
4474
|
-
}
|
4475
|
-
break;
|
4476
|
-
}
|
4477
|
-
}
|
4478
|
-
if (inside) {
|
4479
|
-
true && emberDebug.assert(unbalancedNestedError, false);
|
4431
|
+
true && !(typeof pattern === 'string') && emberDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
|
4432
|
+
true && !(pattern.indexOf(' ') === -1) && emberDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
|
4433
|
+
// regex to look for double open, double close, or unclosed braces
|
4434
|
+
|
4435
|
+
true && !(pattern.match(/\{[^}{]*\{|\}[^}{]*\}|\{[^}]*$/g) === null) && emberDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, pattern.match(/\{[^}{]*\{|\}[^}{]*\}|\{[^}]*$/g) === null);
|
4436
|
+
|
4437
|
+
var start = pattern.indexOf('{');
|
4438
|
+
if (start < 0) {
|
4439
|
+
callback(pattern.replace(END_WITH_EACH_REGEX, '.[]'));
|
4440
|
+
} else {
|
4441
|
+
dive('', pattern, start, callback);
|
4480
4442
|
}
|
4443
|
+
}
|
4444
|
+
|
4445
|
+
function dive(prefix, pattern, start, callback) {
|
4446
|
+
var end = pattern.indexOf('}'),
|
4447
|
+
i = 0,
|
4448
|
+
newStart = void 0,
|
4449
|
+
arrayLength = void 0;
|
4450
|
+
var tempArr = pattern.substring(start + 1, end).split(',');
|
4451
|
+
var after = pattern.substring(end + 1);
|
4452
|
+
prefix = prefix + pattern.substring(0, start);
|
4481
4453
|
|
4482
|
-
|
4483
|
-
|
4454
|
+
arrayLength = tempArr.length;
|
4455
|
+
while (i < arrayLength) {
|
4456
|
+
newStart = after.indexOf('{');
|
4457
|
+
if (newStart < 0) {
|
4458
|
+
callback((prefix + tempArr[i++] + after).replace(END_WITH_EACH_REGEX, '.[]'));
|
4459
|
+
} else {
|
4460
|
+
dive(prefix + tempArr[i++], after, newStart, callback);
|
4461
|
+
}
|
4484
4462
|
}
|
4485
4463
|
}
|
4486
4464
|
|
@@ -4705,8 +4683,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4705
4683
|
if (typeof config === 'function') {
|
4706
4684
|
this._getter = config;
|
4707
4685
|
} else {
|
4708
|
-
true && emberDebug.assert('Ember.computed expects a function or an object as last argument.', typeof config === 'object' && !Array.isArray(config));
|
4709
|
-
true &&
|
4686
|
+
true && !(typeof config === 'object' && !Array.isArray(config)) && emberDebug.assert('Ember.computed expects a function or an object as last argument.', typeof config === 'object' && !Array.isArray(config));
|
4687
|
+
true && !function () {
|
4710
4688
|
var keys = Object.keys(config);
|
4711
4689
|
for (var i = 0; i < keys.length; i++) {
|
4712
4690
|
if (keys[i] !== 'get' && keys[i] !== 'set') {
|
@@ -4714,12 +4692,18 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4714
4692
|
}
|
4715
4693
|
}
|
4716
4694
|
return true;
|
4695
|
+
}() && emberDebug.assert('Config object passed to an Ember.computed can only contain `get` or `set` keys.', function () {
|
4696
|
+
var keys = Object.keys(config);for (var i = 0; i < keys.length; i++) {
|
4697
|
+
if (keys[i] !== 'get' && keys[i] !== 'set') {
|
4698
|
+
return false;
|
4699
|
+
}
|
4700
|
+
}return true;
|
4717
4701
|
}());
|
4718
4702
|
|
4719
4703
|
this._getter = config.get;
|
4720
4704
|
this._setter = config.set;
|
4721
4705
|
}
|
4722
|
-
true && emberDebug.assert('Computed properties must receive a getter or a setter, you passed none.', !!this._getter || !!this._setter);
|
4706
|
+
true && !(!!this._getter || !!this._setter) && emberDebug.assert('Computed properties must receive a getter or a setter, you passed none.', !!this._getter || !!this._setter);
|
4723
4707
|
|
4724
4708
|
this._dependentKeys = undefined;
|
4725
4709
|
this._suspended = undefined;
|
@@ -4785,7 +4769,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
4785
4769
|
*/
|
4786
4770
|
ComputedPropertyPrototype.readOnly = function () {
|
4787
4771
|
this._readOnly = true;
|
4788
|
-
true && emberDebug.assert('Computed properties that define a setter using the new syntax cannot be read-only', !(this._readOnly && this._setter && this._setter !== this._getter));
|
4772
|
+
true && !!(this._readOnly && this._setter && this._setter !== this._getter) && emberDebug.assert('Computed properties that define a setter using the new syntax cannot be read-only', !(this._readOnly && this._setter && this._setter !== this._getter));
|
4789
4773
|
|
4790
4774
|
return this;
|
4791
4775
|
};
|
@@ -5185,7 +5169,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
5185
5169
|
}
|
5186
5170
|
|
5187
5171
|
AliasedProperty.prototype.setup = function setup(obj, keyName) {
|
5188
|
-
true && emberDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
|
5172
|
+
true && !(this.altKey !== keyName) && emberDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
|
5189
5173
|
|
5190
5174
|
var meta$$1 = meta(obj);
|
5191
5175
|
if (meta$$1.peekWatching(keyName)) {
|
@@ -6166,7 +6150,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
6166
6150
|
@public
|
6167
6151
|
*/
|
6168
6152
|
run$1.schedule = function () /* queue, target, method */{
|
6169
|
-
true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6153
|
+
true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6170
6154
|
|
6171
6155
|
return backburner.schedule.apply(backburner, arguments);
|
6172
6156
|
};
|
@@ -6248,7 +6232,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
6248
6232
|
@public
|
6249
6233
|
*/
|
6250
6234
|
run$1.once = function () {
|
6251
|
-
true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6235
|
+
true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6252
6236
|
|
6253
6237
|
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
6254
6238
|
args[_key3] = arguments[_key3];
|
@@ -6311,7 +6295,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
6311
6295
|
@public
|
6312
6296
|
*/
|
6313
6297
|
run$1.scheduleOnce = function () /*queue, target, method*/{
|
6314
|
-
true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6298
|
+
true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
|
6315
6299
|
|
6316
6300
|
return backburner.scheduleOnce.apply(backburner, arguments);
|
6317
6301
|
};
|
@@ -7434,7 +7418,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
7434
7418
|
*/
|
7435
7419
|
|
7436
7420
|
Binding.prototype.connect = function connect(obj) {
|
7437
|
-
true && emberDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
|
7421
|
+
true && !!!obj && emberDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
|
7438
7422
|
|
7439
7423
|
var fromObj = void 0,
|
7440
7424
|
fromPath = void 0,
|
@@ -7488,7 +7472,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
7488
7472
|
*/
|
7489
7473
|
|
7490
7474
|
Binding.prototype.disconnect = function disconnect() {
|
7491
|
-
true && emberDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
|
7475
|
+
true && !!!this._toObj && emberDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
|
7492
7476
|
|
7493
7477
|
// Remove an observer on the object so we're no longer notified of
|
7494
7478
|
// changes that should update bindings.
|
@@ -7919,7 +7903,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
7919
7903
|
{
|
7920
7904
|
if (isArray(value)) {
|
7921
7905
|
// use conditional to avoid stringifying every time
|
7922
|
-
true && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
|
7906
|
+
true && !false && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
|
7923
7907
|
}
|
7924
7908
|
}
|
7925
7909
|
|
@@ -7994,7 +7978,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
7994
7978
|
|
7995
7979
|
for (var i = 0; i < mixins.length; i++) {
|
7996
7980
|
currentMixin = mixins[i];
|
7997
|
-
true && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
|
7981
|
+
true && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
|
7998
7982
|
|
7999
7983
|
props = mixinProperties(meta$$1, currentMixin);
|
8000
7984
|
if (props === CONTINUE) {
|
@@ -8364,7 +8348,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
8364
8348
|
|
8365
8349
|
for (idx = 0; idx < arguments.length; idx++) {
|
8366
8350
|
currentMixin = arguments[idx];
|
8367
|
-
true && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
|
8351
|
+
true && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
|
8368
8352
|
|
8369
8353
|
if (currentMixin instanceof Mixin) {
|
8370
8354
|
mixins.push(currentMixin);
|
@@ -8615,7 +8599,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
8615
8599
|
|
8616
8600
|
for (var i = 0; i < arguments.length; i++) {
|
8617
8601
|
var arg = arguments[i];
|
8618
|
-
true && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);
|
8602
|
+
true && !(typeof arg !== 'string' || arg.indexOf('.') === -1) && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);
|
8619
8603
|
}
|
8620
8604
|
|
8621
8605
|
return observer.apply(this, arguments);
|
@@ -8695,8 +8679,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
|
|
8695
8679
|
var desc = this[keyName];
|
8696
8680
|
var owner = emberUtils.getOwner(this) || this.container; // fallback to `container` for backwards compat
|
8697
8681
|
|
8698
|
-
true && emberDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
|
8699
|
-
true && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
|
8682
|
+
true && !(desc && desc.isDescriptor && desc.type) && emberDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
|
8683
|
+
true && !owner && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
|
8700
8684
|
|
8701
8685
|
return owner.lookup(desc.type + ':' + (desc.name || keyName));
|
8702
8686
|
}
|