ember-source 2.0.0.beta.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
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-template-compiler.js +151 -128
- data/dist/ember-testing.js +1 -1
- data/dist/ember.debug.js +938 -177
- data/dist/ember.js +938 -177
- data/dist/ember.min.js +13 -13
- data/dist/ember.prod.js +928 -164
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86a3455e34f5406a537f434ae5eb905a965067c1
|
4
|
+
data.tar.gz: da0fc33f176bf0caa31cdcd93c3e4575e22fb5bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebbd0a6cf64068ac827217c5417004b65e964ac9d63bc9484e1e2ff7bfb198d8adac13e261a5309035b53f42637bbb38185331b0aadb81f0b0fa0189da9e287d
|
7
|
+
data.tar.gz: c365c89dd36aed0a4e46bec34a5e10465eac163d2961246258734d1b9798affe44aab77f2c87a29dc91531aabe8461a882a038dd5945a001bba49d7cd8a90923
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0
|
1
|
+
2.0.0
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 2.0.0
|
8
|
+
* @version 2.0.0
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -2323,7 +2323,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/core', 'ember-metal/proper
|
|
2323
2323
|
}
|
2324
2324
|
|
2325
2325
|
function isVolatile(obj) {
|
2326
|
-
return !(isObject(obj) && obj.isDescriptor && obj.
|
2326
|
+
return !(isObject(obj) && obj.isDescriptor && !obj._volatile);
|
2327
2327
|
}
|
2328
2328
|
|
2329
2329
|
function Chains() {}
|
@@ -2842,7 +2842,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
2842
2842
|
this._dependentKeys = undefined;
|
2843
2843
|
this._suspended = undefined;
|
2844
2844
|
this._meta = undefined;
|
2845
|
-
this.
|
2845
|
+
this._volatile = false;
|
2846
2846
|
this._dependentKeys = opts && opts.dependentKeys;
|
2847
2847
|
this._readOnly = false;
|
2848
2848
|
}
|
@@ -2855,6 +2855,12 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
2855
2855
|
Call on a computed property to set it into non-cached mode. When in this
|
2856
2856
|
mode the computed property will not automatically cache the return value.
|
2857
2857
|
|
2858
|
+
It also does not automatically fire any change events. You must manually notify
|
2859
|
+
any changes if you want to observe this property.
|
2860
|
+
|
2861
|
+
Dependency keys have no effect on volatile properties as they are for cache
|
2862
|
+
invalidation and notification when cached value is invalidated.
|
2863
|
+
|
2858
2864
|
```javascript
|
2859
2865
|
var outsideService = Ember.Object.extend({
|
2860
2866
|
value: function() {
|
@@ -2869,7 +2875,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
2869
2875
|
@public
|
2870
2876
|
*/
|
2871
2877
|
ComputedPropertyPrototype.volatile = function () {
|
2872
|
-
this.
|
2878
|
+
this._volatile = true;
|
2873
2879
|
return this;
|
2874
2880
|
};
|
2875
2881
|
|
@@ -2980,16 +2986,24 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
2980
2986
|
}
|
2981
2987
|
};
|
2982
2988
|
|
2983
|
-
|
2989
|
+
// invalidate cache when CP key changes
|
2984
2990
|
ComputedPropertyPrototype.didChange = function (obj, keyName) {
|
2985
2991
|
// _suspended is set via a CP.set to ensure we don't clear
|
2986
2992
|
// the cached value set by the setter
|
2987
|
-
if (this.
|
2988
|
-
|
2989
|
-
|
2990
|
-
|
2991
|
-
|
2992
|
-
|
2993
|
+
if (this._volatile || this._suspended === obj) {
|
2994
|
+
return;
|
2995
|
+
}
|
2996
|
+
|
2997
|
+
// don't create objects just to invalidate
|
2998
|
+
var meta = obj.__ember_meta__;
|
2999
|
+
if (!meta || meta.source !== obj) {
|
3000
|
+
return;
|
3001
|
+
}
|
3002
|
+
|
3003
|
+
var cache = meta.cache;
|
3004
|
+
if (cache && cache[keyName] !== undefined) {
|
3005
|
+
cache[keyName] = undefined;
|
3006
|
+
_emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, meta);
|
2993
3007
|
}
|
2994
3008
|
};
|
2995
3009
|
|
@@ -3021,37 +3035,36 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
3021
3035
|
@public
|
3022
3036
|
*/
|
3023
3037
|
ComputedPropertyPrototype.get = function (obj, keyName) {
|
3024
|
-
|
3025
|
-
|
3026
|
-
|
3027
|
-
cache = meta.cache;
|
3028
|
-
|
3029
|
-
var result = cache && cache[keyName];
|
3038
|
+
if (this._volatile) {
|
3039
|
+
return this._getter.call(obj, keyName);
|
3040
|
+
}
|
3030
3041
|
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
3034
|
-
|
3035
|
-
|
3042
|
+
var meta = metaFor(obj);
|
3043
|
+
var cache = meta.cache;
|
3044
|
+
if (!cache) {
|
3045
|
+
cache = meta.cache = {};
|
3046
|
+
}
|
3036
3047
|
|
3037
|
-
|
3038
|
-
|
3039
|
-
|
3040
|
-
|
3041
|
-
|
3042
|
-
|
3043
|
-
cache[keyName] = UNDEFINED;
|
3044
|
-
} else {
|
3045
|
-
cache[keyName] = ret;
|
3046
|
-
}
|
3048
|
+
var result = cache[keyName];
|
3049
|
+
if (result === UNDEFINED) {
|
3050
|
+
return undefined;
|
3051
|
+
} else if (result !== undefined) {
|
3052
|
+
return result;
|
3053
|
+
}
|
3047
3054
|
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3051
|
-
_emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
|
3055
|
+
var ret = this._getter.call(obj, keyName);
|
3056
|
+
if (ret === undefined) {
|
3057
|
+
cache[keyName] = UNDEFINED;
|
3052
3058
|
} else {
|
3053
|
-
|
3059
|
+
cache[keyName] = ret;
|
3054
3060
|
}
|
3061
|
+
|
3062
|
+
var chainWatchers = meta.chainWatchers;
|
3063
|
+
if (chainWatchers) {
|
3064
|
+
chainWatchers.revalidate(keyName);
|
3065
|
+
}
|
3066
|
+
_emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
|
3067
|
+
|
3055
3068
|
return ret;
|
3056
3069
|
};
|
3057
3070
|
|
@@ -3104,51 +3117,72 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
3104
3117
|
@return {Object} The return value of the function backing the CP.
|
3105
3118
|
@public
|
3106
3119
|
*/
|
3107
|
-
ComputedPropertyPrototype.set = function
|
3108
|
-
|
3120
|
+
ComputedPropertyPrototype.set = function computedPropertySetEntry(obj, keyName, value) {
|
3121
|
+
if (this._readOnly) {
|
3122
|
+
this._throwReadOnlyError(obj, keyName);
|
3123
|
+
}
|
3109
3124
|
|
3110
|
-
this.
|
3125
|
+
if (!this._setter) {
|
3126
|
+
return this.clobberSet(obj, keyName, value);
|
3127
|
+
}
|
3128
|
+
|
3129
|
+
if (this._volatile) {
|
3130
|
+
return this.volatileSet(obj, keyName, value);
|
3131
|
+
}
|
3132
|
+
|
3133
|
+
return this.setWithSuspend(obj, keyName, value);
|
3134
|
+
};
|
3135
|
+
|
3136
|
+
ComputedPropertyPrototype._throwReadOnlyError = function computedPropertyThrowReadOnlyError(obj, keyName) {
|
3137
|
+
throw new _emberMetalError.default('Cannot set read-only property "' + keyName + '" on object: ' + _emberMetalUtils.inspect(obj));
|
3138
|
+
};
|
3139
|
+
|
3140
|
+
ComputedPropertyPrototype.clobberSet = function computedPropertyClobberSet(obj, keyName, value) {
|
3141
|
+
var cachedValue = cacheFor(obj, keyName);
|
3142
|
+
_emberMetalProperties.defineProperty(obj, keyName, null, cachedValue);
|
3143
|
+
_emberMetalProperty_set.set(obj, keyName, value);
|
3144
|
+
return value;
|
3145
|
+
};
|
3146
|
+
|
3147
|
+
ComputedPropertyPrototype.volatileSet = function computedPropertyVolatileSet(obj, keyName, value) {
|
3148
|
+
return this._setter.call(obj, keyName, value);
|
3149
|
+
};
|
3111
3150
|
|
3151
|
+
ComputedPropertyPrototype.setWithSuspend = function computedPropertySetWithSuspend(obj, keyName, value) {
|
3152
|
+
var oldSuspended = this._suspended;
|
3153
|
+
this._suspended = obj;
|
3112
3154
|
try {
|
3113
|
-
this._set(obj, keyName, value);
|
3155
|
+
return this._set(obj, keyName, value);
|
3114
3156
|
} finally {
|
3115
3157
|
this._suspended = oldSuspended;
|
3116
3158
|
}
|
3117
3159
|
};
|
3118
3160
|
|
3119
3161
|
ComputedPropertyPrototype._set = function computedPropertySet(obj, keyName, value) {
|
3120
|
-
|
3121
|
-
var
|
3122
|
-
|
3162
|
+
// cache requires own meta
|
3163
|
+
var meta = metaFor(obj);
|
3164
|
+
// either there is a writable cache or we need one to update
|
3123
3165
|
var cache = meta.cache;
|
3124
|
-
|
3125
|
-
|
3126
|
-
var cachedValue, ret;
|
3127
|
-
|
3128
|
-
if (this._readOnly) {
|
3129
|
-
throw new _emberMetalError.default('Cannot set read-only property "' + keyName + '" on object: ' + _emberMetalUtils.inspect(obj));
|
3166
|
+
if (!cache) {
|
3167
|
+
cache = meta.cache = {};
|
3130
3168
|
}
|
3131
|
-
|
3132
|
-
|
3169
|
+
var hadCachedValue = false;
|
3170
|
+
var cachedValue = undefined;
|
3171
|
+
if (cache[keyName] !== undefined) {
|
3133
3172
|
if (cache[keyName] !== UNDEFINED) {
|
3134
3173
|
cachedValue = cache[keyName];
|
3135
3174
|
}
|
3136
|
-
|
3137
3175
|
hadCachedValue = true;
|
3138
3176
|
}
|
3139
3177
|
|
3140
|
-
|
3141
|
-
_emberMetalProperties.defineProperty(obj, keyName, null, cachedValue);
|
3142
|
-
return _emberMetalProperty_set.set(obj, keyName, value);
|
3143
|
-
} else {
|
3144
|
-
ret = setter.call(obj, keyName, value, cachedValue);
|
3145
|
-
}
|
3178
|
+
var ret = this._setter.call(obj, keyName, value, cachedValue);
|
3146
3179
|
|
3180
|
+
// allows setter to return the same value that is cached already
|
3147
3181
|
if (hadCachedValue && cachedValue === ret) {
|
3148
|
-
return;
|
3182
|
+
return ret;
|
3149
3183
|
}
|
3150
3184
|
|
3151
|
-
var watched = meta.watching[keyName];
|
3185
|
+
var watched = meta.watching && meta.watching[keyName];
|
3152
3186
|
if (watched) {
|
3153
3187
|
_emberMetalProperty_events.propertyWillChange(obj, keyName);
|
3154
3188
|
}
|
@@ -3157,18 +3191,14 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
3157
3191
|
cache[keyName] = undefined;
|
3158
3192
|
}
|
3159
3193
|
|
3160
|
-
if (
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
cache[keyName] = UNDEFINED;
|
3169
|
-
} else {
|
3170
|
-
cache[keyName] = ret;
|
3171
|
-
}
|
3194
|
+
if (!hadCachedValue) {
|
3195
|
+
_emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
|
3196
|
+
}
|
3197
|
+
|
3198
|
+
if (ret === undefined) {
|
3199
|
+
cache[keyName] = UNDEFINED;
|
3200
|
+
} else {
|
3201
|
+
cache[keyName] = ret;
|
3172
3202
|
}
|
3173
3203
|
|
3174
3204
|
if (watched) {
|
@@ -3180,19 +3210,15 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
3180
3210
|
|
3181
3211
|
/* called before property is overridden */
|
3182
3212
|
ComputedPropertyPrototype.teardown = function (obj, keyName) {
|
3213
|
+
if (this._volatile) {
|
3214
|
+
return;
|
3215
|
+
}
|
3183
3216
|
var meta = metaFor(obj);
|
3184
|
-
|
3185
|
-
if (
|
3186
|
-
|
3187
|
-
|
3188
|
-
}
|
3189
|
-
|
3190
|
-
if (this._cacheable) {
|
3191
|
-
delete meta.cache[keyName];
|
3192
|
-
}
|
3217
|
+
var cache = meta.cache;
|
3218
|
+
if (cache && cache[keyName] !== undefined) {
|
3219
|
+
_emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, meta);
|
3220
|
+
cache[keyName] = undefined;
|
3193
3221
|
}
|
3194
|
-
|
3195
|
-
return null; // no value to restore
|
3196
3222
|
};
|
3197
3223
|
|
3198
3224
|
/**
|
@@ -3282,8 +3308,8 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/core', 'ember-metal/prop
|
|
3282
3308
|
@public
|
3283
3309
|
*/
|
3284
3310
|
function cacheFor(obj, key) {
|
3285
|
-
var meta = obj
|
3286
|
-
var cache = meta && meta.cache;
|
3311
|
+
var meta = obj.__ember_meta__;
|
3312
|
+
var cache = meta && meta.source === obj && meta.cache;
|
3287
3313
|
var ret = cache && cache[key];
|
3288
3314
|
|
3289
3315
|
if (ret === UNDEFINED) {
|
@@ -4033,7 +4059,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
4033
4059
|
|
4034
4060
|
@class Ember
|
4035
4061
|
@static
|
4036
|
-
@version 2.0.0
|
4062
|
+
@version 2.0.0
|
4037
4063
|
@public
|
4038
4064
|
*/
|
4039
4065
|
|
@@ -4067,11 +4093,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
4067
4093
|
|
4068
4094
|
@property VERSION
|
4069
4095
|
@type String
|
4070
|
-
@default '2.0.0
|
4096
|
+
@default '2.0.0'
|
4071
4097
|
@static
|
4072
4098
|
@public
|
4073
4099
|
*/
|
4074
|
-
Ember.VERSION = '2.0.0
|
4100
|
+
Ember.VERSION = '2.0.0';
|
4075
4101
|
|
4076
4102
|
/**
|
4077
4103
|
The hash of environment variables used to control various configuration
|
@@ -10359,6 +10385,9 @@ enifed('ember-metal/utils', ['exports', 'ember-metal/features'], function (expor
|
|
10359
10385
|
*/
|
10360
10386
|
|
10361
10387
|
function guidFor(obj) {
|
10388
|
+
if (obj && obj[GUID_KEY]) {
|
10389
|
+
return obj[GUID_KEY];
|
10390
|
+
}
|
10362
10391
|
|
10363
10392
|
// special cases where we don't want to add a key to object
|
10364
10393
|
if (obj === undefined) {
|
@@ -10396,10 +10425,6 @@ enifed('ember-metal/utils', ['exports', 'ember-metal/features'], function (expor
|
|
10396
10425
|
return obj ? '(true)' : '(false)';
|
10397
10426
|
|
10398
10427
|
default:
|
10399
|
-
if (obj[GUID_KEY]) {
|
10400
|
-
return obj[GUID_KEY];
|
10401
|
-
}
|
10402
|
-
|
10403
10428
|
if (obj === Object) {
|
10404
10429
|
return '(Object)';
|
10405
10430
|
}
|
@@ -11021,7 +11046,7 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
11021
11046
|
}
|
11022
11047
|
}
|
11023
11048
|
});
|
11024
|
-
enifed('ember-template-compiler', ['exports', 'ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-template-compiler/plugins', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-item-class', 'ember-template-compiler/plugins/transform-component-attrs-into-mut', 'ember-template-compiler/plugins/transform-component-curly-to-readonly', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-input-on-to-onEvent', 'ember-template-compiler/plugins/transform-each-into-collection', 'ember-template-compiler/plugins/
|
11049
|
+
enifed('ember-template-compiler', ['exports', 'ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-template-compiler/plugins', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-item-class', 'ember-template-compiler/plugins/transform-component-attrs-into-mut', 'ember-template-compiler/plugins/transform-component-curly-to-readonly', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-input-on-to-onEvent', 'ember-template-compiler/plugins/transform-each-into-collection', 'ember-template-compiler/plugins/assert-no-view-and-controller-paths', 'ember-template-compiler/plugins/assert-no-view-helper', 'ember-template-compiler/compat'], function (exports, _emberMetal, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths, _emberTemplateCompilerPluginsAssertNoViewHelper, _emberTemplateCompilerCompat) {
|
11025
11050
|
'use strict';
|
11026
11051
|
|
11027
11052
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax.default);
|
@@ -11034,8 +11059,9 @@ enifed('ember-template-compiler', ['exports', 'ember-metal', 'ember-template-com
|
|
11034
11059
|
|
11035
11060
|
if (_emberMetal.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
11036
11061
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachIntoCollection.default);
|
11037
|
-
|
11038
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast',
|
11062
|
+
} else {
|
11063
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths.default);
|
11064
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoViewHelper.default);
|
11039
11065
|
}
|
11040
11066
|
|
11041
11067
|
exports._Ember = _emberMetal.default;
|
@@ -11116,10 +11142,10 @@ enifed('ember-template-compiler/plugins', ['exports'], function (exports) {
|
|
11116
11142
|
|
11117
11143
|
exports.default = plugins;
|
11118
11144
|
});
|
11119
|
-
enifed('ember-template-compiler/plugins/
|
11145
|
+
enifed('ember-template-compiler/plugins/assert-no-view-and-controller-paths', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
11120
11146
|
'use strict';
|
11121
11147
|
|
11122
|
-
function
|
11148
|
+
function AssertNoViewAndControllerPaths(options) {
|
11123
11149
|
// set later within HTMLBars to the syntax package
|
11124
11150
|
this.syntax = null;
|
11125
11151
|
this.options = options || {};
|
@@ -11130,7 +11156,7 @@ enifed('ember-template-compiler/plugins/deprecate-view-and-controller-paths', ['
|
|
11130
11156
|
@method transform
|
11131
11157
|
@param {AST} ast The AST to be transformed.
|
11132
11158
|
*/
|
11133
|
-
|
11159
|
+
AssertNoViewAndControllerPaths.prototype.transform = function AssertNoViewAndControllerPaths_transform(ast) {
|
11134
11160
|
var walker = new this.syntax.Walker();
|
11135
11161
|
var moduleName = this.options && this.options.moduleName;
|
11136
11162
|
|
@@ -11139,15 +11165,15 @@ enifed('ember-template-compiler/plugins/deprecate-view-and-controller-paths', ['
|
|
11139
11165
|
return;
|
11140
11166
|
}
|
11141
11167
|
|
11142
|
-
|
11143
|
-
|
11144
|
-
|
11168
|
+
assertPath(moduleName, node, node.path);
|
11169
|
+
assertPaths(moduleName, node, node.params);
|
11170
|
+
assertHash(moduleName, node, node.hash);
|
11145
11171
|
});
|
11146
11172
|
|
11147
11173
|
return ast;
|
11148
11174
|
};
|
11149
11175
|
|
11150
|
-
function
|
11176
|
+
function assertHash(moduleName, node, hash) {
|
11151
11177
|
if (!hash || !hash.pairs) {
|
11152
11178
|
return;
|
11153
11179
|
}
|
@@ -11155,46 +11181,49 @@ enifed('ember-template-compiler/plugins/deprecate-view-and-controller-paths', ['
|
|
11155
11181
|
for (i = 0, l = hash.pairs.length; i < l; i++) {
|
11156
11182
|
pair = hash.pairs[i];
|
11157
11183
|
paths = pair.value.params;
|
11158
|
-
|
11184
|
+
assertPaths(moduleName, pair, paths);
|
11159
11185
|
}
|
11160
11186
|
}
|
11161
11187
|
|
11162
|
-
function
|
11188
|
+
function assertPaths(moduleName, node, paths) {
|
11163
11189
|
if (!paths) {
|
11164
11190
|
return;
|
11165
11191
|
}
|
11166
11192
|
var i, l, path;
|
11167
11193
|
for (i = 0, l = paths.length; i < l; i++) {
|
11168
11194
|
path = paths[i];
|
11169
|
-
|
11195
|
+
assertPath(moduleName, node, path);
|
11170
11196
|
}
|
11171
11197
|
}
|
11172
11198
|
|
11173
|
-
function
|
11174
|
-
_emberMetalCore.default.
|
11175
|
-
var
|
11199
|
+
function assertPath(moduleName, node, path) {
|
11200
|
+
_emberMetalCore.default.assert('Using `{{' + (path && path.type === 'PathExpression' && path.parts[0]) + '}}` or any path based on it ' + _emberTemplateCompilerSystemCalculateLocationDisplay.default(moduleName, node.loc) + 'has been removed in Ember 2.0', function assertPath_test() {
|
11201
|
+
var noAssertion = true;
|
11176
11202
|
|
11177
11203
|
var viewKeyword = path && path.type === 'PathExpression' && path.parts && path.parts[0];
|
11178
11204
|
if (viewKeyword === 'view') {
|
11179
|
-
|
11205
|
+
noAssertion = _emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT;
|
11180
11206
|
} else if (viewKeyword === 'controller') {
|
11181
|
-
|
11207
|
+
noAssertion = _emberMetalCore.default.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT;
|
11182
11208
|
}
|
11183
11209
|
|
11184
|
-
return
|
11185
|
-
}, {
|
11210
|
+
return noAssertion;
|
11211
|
+
}, {
|
11212
|
+
id: path.parts && path.parts[0] === 'view' ? 'view.keyword.view' : 'view.keyword.controller',
|
11213
|
+
until: '2.0.0'
|
11214
|
+
});
|
11186
11215
|
}
|
11187
11216
|
|
11188
11217
|
function validate(node) {
|
11189
11218
|
return node.type === 'MustacheStatement' || node.type === 'BlockStatement';
|
11190
11219
|
}
|
11191
11220
|
|
11192
|
-
exports.default =
|
11221
|
+
exports.default = AssertNoViewAndControllerPaths;
|
11193
11222
|
});
|
11194
|
-
enifed('ember-template-compiler/plugins/
|
11223
|
+
enifed('ember-template-compiler/plugins/assert-no-view-helper', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
11195
11224
|
'use strict';
|
11196
11225
|
|
11197
|
-
function
|
11226
|
+
function AssertNoViewHelper(options) {
|
11198
11227
|
// set later within HTMLBars to the syntax package
|
11199
11228
|
this.syntax = null;
|
11200
11229
|
this.options = options || {};
|
@@ -11205,7 +11234,7 @@ enifed('ember-template-compiler/plugins/deprecate-view-helper', ['exports', 'emb
|
|
11205
11234
|
@method transform
|
11206
11235
|
@param {AST} ast The AST to be transformed.
|
11207
11236
|
*/
|
11208
|
-
|
11237
|
+
AssertNoViewHelper.prototype.transform = function AssertNoViewHelper_transform(ast) {
|
11209
11238
|
if (!!_emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
11210
11239
|
return ast;
|
11211
11240
|
}
|
@@ -11217,33 +11246,27 @@ enifed('ember-template-compiler/plugins/deprecate-view-helper', ['exports', 'emb
|
|
11217
11246
|
return;
|
11218
11247
|
}
|
11219
11248
|
|
11220
|
-
|
11249
|
+
assertHelper(moduleName, node);
|
11221
11250
|
});
|
11222
11251
|
|
11223
11252
|
return ast;
|
11224
11253
|
};
|
11225
11254
|
|
11226
|
-
function
|
11255
|
+
function assertHelper(moduleName, node) {
|
11227
11256
|
var paramValue = node.params.length && node.params[0].value;
|
11228
11257
|
|
11229
11258
|
if (!paramValue) {
|
11230
11259
|
return;
|
11231
|
-
} else if (paramValue === 'select') {
|
11232
|
-
deprecateSelect(moduleName, node);
|
11233
11260
|
} else {
|
11234
|
-
_emberMetalCore.default.
|
11261
|
+
_emberMetalCore.default.assert('Using the `{{view "string"}}` helper is removed in 2.0. ' + _emberTemplateCompilerSystemCalculateLocationDisplay.default(moduleName, node.loc), _emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT, { id: 'view.helper', until: '2.0.0' });
|
11235
11262
|
}
|
11236
11263
|
}
|
11237
11264
|
|
11238
|
-
function deprecateSelect(moduleName, node) {
|
11239
|
-
_emberMetalCore.default.deprecate('Using `{{view "select"}}` is deprecated. ' + _emberTemplateCompilerSystemCalculateLocationDisplay.default(moduleName, node.loc), false, { url: 'http://emberjs.com/deprecations/v1.x#toc_ember-select', id: 'view.helper.select' });
|
11240
|
-
}
|
11241
|
-
|
11242
11265
|
function validate(node) {
|
11243
11266
|
return (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && node.path.parts[0] === 'view';
|
11244
11267
|
}
|
11245
11268
|
|
11246
|
-
exports.default =
|
11269
|
+
exports.default = AssertNoViewHelper;
|
11247
11270
|
});
|
11248
11271
|
enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['exports'], function (exports) {
|
11249
11272
|
'use strict';
|
@@ -11992,7 +12015,7 @@ enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-meta
|
|
11992
12015
|
|
11993
12016
|
options.buildMeta = function buildMeta(program) {
|
11994
12017
|
return {
|
11995
|
-
revision: 'Ember@2.0.0
|
12018
|
+
revision: 'Ember@2.0.0',
|
11996
12019
|
loc: program.loc,
|
11997
12020
|
moduleName: options.moduleName
|
11998
12021
|
};
|