ember-source 1.10.0.beta.3 → 1.10.0.beta.4
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-runtime.js +185 -62
- data/dist/ember-template-compiler.js +105 -27
- data/dist/ember-testing.js +11 -2
- data/dist/ember-tests.js +341 -173
- data/dist/ember-tests.prod.js +341 -173
- data/dist/ember.debug.js +465 -351
- data/dist/ember.js +465 -351
- data/dist/ember.min.js +14 -14
- data/dist/ember.prod.js +435 -336
- 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: fad2c197b0678e6e8faf6ab8765f10c341c2a3d9
|
4
|
+
data.tar.gz: ea5c65c55f105962b9a485bc02e3b3071f73f50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d65c44e6bedf7a4b9a9375e5087bf141abfb3b3bcef6c57d847d3742845466d16cef638f9d755ccb1c3e7aec3da0095ee5c8896df0517d542f86f7b5c16f21f9
|
7
|
+
data.tar.gz: b6cbae5fcf4fa3000191387c02a3a4d7465e492a0d737018cc7028e059581dcfc7bd0a8171e3939915841700ebdaf97563ca0bd24ef9edf2d0d8b361a9b6af1a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.10.0-beta.
|
1
|
+
1.10.0-beta.4
|
data/dist/ember-runtime.js
CHANGED
@@ -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 1.10.0-beta.
|
8
|
+
* @version 1.10.0-beta.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -4852,7 +4852,7 @@ define("ember-metal/core",
|
|
4852
4852
|
|
4853
4853
|
@class Ember
|
4854
4854
|
@static
|
4855
|
-
@version 1.10.0-beta.
|
4855
|
+
@version 1.10.0-beta.4
|
4856
4856
|
*/
|
4857
4857
|
|
4858
4858
|
if ('undefined' === typeof Ember) {
|
@@ -4879,10 +4879,10 @@ define("ember-metal/core",
|
|
4879
4879
|
/**
|
4880
4880
|
@property VERSION
|
4881
4881
|
@type String
|
4882
|
-
@default '1.10.0-beta.
|
4882
|
+
@default '1.10.0-beta.4'
|
4883
4883
|
@static
|
4884
4884
|
*/
|
4885
|
-
Ember.VERSION = '1.10.0-beta.
|
4885
|
+
Ember.VERSION = '1.10.0-beta.4';
|
4886
4886
|
|
4887
4887
|
/**
|
4888
4888
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -6013,9 +6013,10 @@ define("ember-metal/get_properties",
|
|
6013
6013
|
```
|
6014
6014
|
|
6015
6015
|
@method getProperties
|
6016
|
-
@
|
6016
|
+
@for Ember
|
6017
|
+
@param {Object} obj
|
6017
6018
|
@param {String...|Array} list of keys to get
|
6018
|
-
@return {
|
6019
|
+
@return {Object}
|
6019
6020
|
*/
|
6020
6021
|
__exports__["default"] = function getProperties(obj) {
|
6021
6022
|
var ret = {};
|
@@ -10554,23 +10555,61 @@ define("ember-metal/streams/utils",
|
|
10554
10555
|
"use strict";
|
10555
10556
|
var Stream = __dependency1__["default"];
|
10556
10557
|
|
10558
|
+
/**
|
10559
|
+
Check whether an object is a stream or not
|
10560
|
+
|
10561
|
+
@private
|
10562
|
+
@function isStream
|
10563
|
+
@param {Object|Stream} object object to check whether it is a stream
|
10564
|
+
@return {Boolean} `true` if the object is a stream, `false` otherwise
|
10565
|
+
*/
|
10557
10566
|
function isStream(object) {
|
10558
10567
|
return object && object.isStream;
|
10559
10568
|
}
|
10560
10569
|
|
10561
|
-
__exports__.isStream = isStream
|
10570
|
+
__exports__.isStream = isStream;/**
|
10571
|
+
A method of subscribing to a stream which is safe for use with a non-stream
|
10572
|
+
object. If a non-stream object is passed, the function does nothing.
|
10573
|
+
|
10574
|
+
@private
|
10575
|
+
@function subscribe
|
10576
|
+
@param {Object|Stream} object object or stream to potentially subscribe to
|
10577
|
+
@param {Function} callback function to run when stream value changes
|
10578
|
+
@param {Object} [context] the callback will be executed with this context if it
|
10579
|
+
is provided
|
10580
|
+
*/
|
10581
|
+
function subscribe(object, callback, context) {
|
10562
10582
|
if (object && object.isStream) {
|
10563
10583
|
object.subscribe(callback, context);
|
10564
10584
|
}
|
10565
10585
|
}
|
10566
10586
|
|
10567
|
-
__exports__.subscribe = subscribe
|
10587
|
+
__exports__.subscribe = subscribe;/**
|
10588
|
+
A method of unsubscribing from a stream which is safe for use with a non-stream
|
10589
|
+
object. If a non-stream object is passed, the function does nothing.
|
10590
|
+
|
10591
|
+
@private
|
10592
|
+
@function unsubscribe
|
10593
|
+
@param {Object|Stream} object object or stream to potentially unsubscribe from
|
10594
|
+
@param {Function} callback function originally passed to `subscribe()`
|
10595
|
+
@param {Object} [context] object originally passed to `subscribe()`
|
10596
|
+
*/
|
10597
|
+
function unsubscribe(object, callback, context) {
|
10568
10598
|
if (object && object.isStream) {
|
10569
10599
|
object.unsubscribe(callback, context);
|
10570
10600
|
}
|
10571
10601
|
}
|
10572
10602
|
|
10573
|
-
__exports__.unsubscribe = unsubscribe
|
10603
|
+
__exports__.unsubscribe = unsubscribe;/**
|
10604
|
+
Retrieve the value of a stream, or in the case a non-stream object is passed,
|
10605
|
+
return the object itself.
|
10606
|
+
|
10607
|
+
@private
|
10608
|
+
@function read
|
10609
|
+
@param {Object|Stream} object object to return the value of
|
10610
|
+
@return the stream's current value, or the non-stream object itself
|
10611
|
+
*/
|
10612
|
+
function read(object) {
|
10574
10613
|
if (object && object.isStream) {
|
10575
10614
|
return object.value();
|
10576
10615
|
} else {
|
@@ -10578,7 +10617,18 @@ define("ember-metal/streams/utils",
|
|
10578
10617
|
}
|
10579
10618
|
}
|
10580
10619
|
|
10581
|
-
__exports__.read = read
|
10620
|
+
__exports__.read = read;/**
|
10621
|
+
Map an array, replacing any streams with their values.
|
10622
|
+
|
10623
|
+
@private
|
10624
|
+
@function readArray
|
10625
|
+
@param {Array} array The array to read values from
|
10626
|
+
@return {Array} a new array of the same length with the values of non-stream
|
10627
|
+
objects mapped from their original positions untouched, and
|
10628
|
+
the values of stream objects retaining their original position
|
10629
|
+
and replaced with the stream's current value.
|
10630
|
+
*/
|
10631
|
+
function readArray(array) {
|
10582
10632
|
var length = array.length;
|
10583
10633
|
var ret = new Array(length);
|
10584
10634
|
for (var i = 0; i < length; i++) {
|
@@ -10587,7 +10637,19 @@ define("ember-metal/streams/utils",
|
|
10587
10637
|
return ret;
|
10588
10638
|
}
|
10589
10639
|
|
10590
|
-
__exports__.readArray = readArray
|
10640
|
+
__exports__.readArray = readArray;/**
|
10641
|
+
Map a hash, replacing any stream property values with the current value of that
|
10642
|
+
stream.
|
10643
|
+
|
10644
|
+
@private
|
10645
|
+
@function readHash
|
10646
|
+
@param {Object} object The hash to read keys and values from
|
10647
|
+
@return {Object} a new object with the same keys as the passed object. The
|
10648
|
+
property values in the new object are the original values in
|
10649
|
+
the case of non-stream objects, and the streams' current
|
10650
|
+
values in the case of stream objects.
|
10651
|
+
*/
|
10652
|
+
function readHash(object) {
|
10591
10653
|
var ret = {};
|
10592
10654
|
for (var key in object) {
|
10593
10655
|
ret[key] = read(object[key]);
|
@@ -10596,9 +10658,13 @@ define("ember-metal/streams/utils",
|
|
10596
10658
|
}
|
10597
10659
|
|
10598
10660
|
__exports__.readHash = readHash;/**
|
10599
|
-
|
10600
|
-
|
10601
|
-
|
10661
|
+
Check whether an array contains any stream values
|
10662
|
+
|
10663
|
+
@private
|
10664
|
+
@function scanArray
|
10665
|
+
@param {Array} array array given to a handlebars helper
|
10666
|
+
@return {Boolean} `true` if the array contains a stream/bound value, `false`
|
10667
|
+
otherwise
|
10602
10668
|
*/
|
10603
10669
|
function scanArray(array) {
|
10604
10670
|
var length = array.length;
|
@@ -10615,10 +10681,14 @@ define("ember-metal/streams/utils",
|
|
10615
10681
|
}
|
10616
10682
|
|
10617
10683
|
__exports__.scanArray = scanArray;/**
|
10618
|
-
|
10619
|
-
|
10620
|
-
|
10621
|
-
|
10684
|
+
Check whether a hash has any stream property values
|
10685
|
+
|
10686
|
+
@private
|
10687
|
+
@function scanHash
|
10688
|
+
@param {Object} hash "hash" argument given to a handlebars helper
|
10689
|
+
@return {Boolean} `true` if the object contains a stream/bound value, `false`
|
10690
|
+
otherwise
|
10691
|
+
*/
|
10622
10692
|
function scanHash(hash) {
|
10623
10693
|
var containsStream = false;
|
10624
10694
|
|
@@ -10632,14 +10702,26 @@ define("ember-metal/streams/utils",
|
|
10632
10702
|
return containsStream;
|
10633
10703
|
}
|
10634
10704
|
|
10635
|
-
__exports__.scanHash = scanHash
|
10636
|
-
|
10637
|
-
|
10705
|
+
__exports__.scanHash = scanHash;/**
|
10706
|
+
Join an array, with any streams replaced by their current values
|
10707
|
+
|
10708
|
+
@private
|
10709
|
+
@function concat
|
10710
|
+
@param {Array} array An array containing zero or more stream objects and
|
10711
|
+
zero or more non-stream objects
|
10712
|
+
@param {String} separator string to be used to join array elements
|
10713
|
+
@return {String} String with array elements concatenated and joined by the
|
10714
|
+
provided separator, and any stream array members having been
|
10715
|
+
replaced by the current value of the stream
|
10716
|
+
*/
|
10717
|
+
function concat(array, separator) {
|
10718
|
+
// TODO: Create subclass ConcatStream < Stream. Defer
|
10719
|
+
// subscribing to streams until the value() is called.
|
10638
10720
|
var hasStream = scanArray(array);
|
10639
10721
|
if (hasStream) {
|
10640
10722
|
var i, l;
|
10641
10723
|
var stream = new Stream(function() {
|
10642
|
-
return readArray(array).join(
|
10724
|
+
return readArray(array).join(separator);
|
10643
10725
|
});
|
10644
10726
|
|
10645
10727
|
for (i = 0, l=array.length; i < l; i++) {
|
@@ -10648,11 +10730,42 @@ define("ember-metal/streams/utils",
|
|
10648
10730
|
|
10649
10731
|
return stream;
|
10650
10732
|
} else {
|
10651
|
-
return array.join(
|
10733
|
+
return array.join(separator);
|
10652
10734
|
}
|
10653
10735
|
}
|
10654
10736
|
|
10655
|
-
__exports__.concat = concat
|
10737
|
+
__exports__.concat = concat;/**
|
10738
|
+
Generate a new stream by providing a source stream and a function that can
|
10739
|
+
be used to transform the stream's value. In the case of a non-stream object,
|
10740
|
+
returns the result of the function.
|
10741
|
+
|
10742
|
+
The value to transform would typically be available to the function you pass
|
10743
|
+
to `chain()` via scope. For example:
|
10744
|
+
|
10745
|
+
```javascript
|
10746
|
+
var source = ...; // stream returning a number
|
10747
|
+
// or a numeric (non-stream) object
|
10748
|
+
var result = chain(source, function(){
|
10749
|
+
var currentValue = read(source);
|
10750
|
+
return currentValue + 1;
|
10751
|
+
});
|
10752
|
+
```
|
10753
|
+
|
10754
|
+
In the example, result is a stream if source is a stream, or a number of
|
10755
|
+
source was numeric.
|
10756
|
+
|
10757
|
+
@private
|
10758
|
+
@function chain
|
10759
|
+
@param {Object|Stream} value A stream or non-stream object
|
10760
|
+
@param {Function} fn function to be run when the stream value changes, or to
|
10761
|
+
be run once in the case of a non-stream object
|
10762
|
+
@return {Object|Stream} In the case of a stream `value` parameter, a new
|
10763
|
+
stream that will be updated with the return value of
|
10764
|
+
the provided function `fn`. In the case of a
|
10765
|
+
non-stream object, the return value of the provided
|
10766
|
+
function `fn`.
|
10767
|
+
*/
|
10768
|
+
function chain(value, fn) {
|
10656
10769
|
if (isStream(value)) {
|
10657
10770
|
var stream = new Stream(fn);
|
10658
10771
|
subscribe(value, stream.notify, stream);
|
@@ -10662,7 +10775,7 @@ define("ember-metal/streams/utils",
|
|
10662
10775
|
}
|
10663
10776
|
}
|
10664
10777
|
|
10665
|
-
__exports__.
|
10778
|
+
__exports__.chain = chain;
|
10666
10779
|
});
|
10667
10780
|
define("ember-metal/utils",
|
10668
10781
|
["ember-metal/core","ember-metal/platform","ember-metal/array","exports"],
|
@@ -16173,7 +16286,7 @@ define("ember-runtime/mixins/deferred",
|
|
16173
16286
|
},
|
16174
16287
|
|
16175
16288
|
_deferred: computed(function() {
|
16176
|
-
Ember.deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation);
|
16289
|
+
Ember.deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' });
|
16177
16290
|
|
16178
16291
|
return RSVP.defer('Ember: DeferredMixin - ' + this);
|
16179
16292
|
})
|
@@ -16941,7 +17054,7 @@ define("ember-runtime/mixins/enumerable",
|
|
16941
17054
|
@method isAny
|
16942
17055
|
@param {String} key the property to test
|
16943
17056
|
@param {String} [value] optional value to test against.
|
16944
|
-
@return {Boolean}
|
17057
|
+
@return {Boolean}
|
16945
17058
|
@since 1.3.0
|
16946
17059
|
*/
|
16947
17060
|
isAny: function(key, value) {
|
@@ -16952,7 +17065,7 @@ define("ember-runtime/mixins/enumerable",
|
|
16952
17065
|
@method anyBy
|
16953
17066
|
@param {String} key the property to test
|
16954
17067
|
@param {String} [value] optional value to test against.
|
16955
|
-
@return {Boolean}
|
17068
|
+
@return {Boolean}
|
16956
17069
|
@deprecated Use `isAny` instead
|
16957
17070
|
*/
|
16958
17071
|
anyBy: aliasMethod('isAny'),
|
@@ -16961,7 +17074,7 @@ define("ember-runtime/mixins/enumerable",
|
|
16961
17074
|
@method someProperty
|
16962
17075
|
@param {String} key the property to test
|
16963
17076
|
@param {String} [value] optional value to test against.
|
16964
|
-
@return {Boolean}
|
17077
|
+
@return {Boolean}
|
16965
17078
|
@deprecated Use `isAny` instead
|
16966
17079
|
*/
|
16967
17080
|
someProperty: aliasMethod('isAny'),
|
@@ -18419,7 +18532,7 @@ define("ember-runtime/mixins/observable",
|
|
18419
18532
|
},
|
18420
18533
|
|
18421
18534
|
addBeforeObserver: function(key, target, method) {
|
18422
|
-
Ember.deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.
|
18535
|
+
Ember.deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers' });
|
18423
18536
|
addBeforeObserver(this, key, target, method);
|
18424
18537
|
},
|
18425
18538
|
|
@@ -19662,8 +19775,8 @@ define("ember-runtime/system/container",
|
|
19662
19775
|
__exports__["default"] = Container;
|
19663
19776
|
});
|
19664
19777
|
define("ember-runtime/system/core_object",
|
19665
|
-
["ember-metal/core","ember-metal/property_get","ember-metal/utils","ember-metal/platform","ember-metal/chains","ember-metal/events","ember-metal/mixin","ember-metal/enumerable_utils","ember-metal/error","ember-metal/keys","ember-runtime/mixins/action_handler","ember-metal/properties","ember-metal/binding","ember-metal/computed","ember-metal/injected_property","ember-metal/run_loop","ember-metal/watching","ember-runtime/inject","exports"],
|
19666
|
-
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __exports__) {
|
19778
|
+
["ember-metal/core","ember-metal/merge","ember-metal/property_get","ember-metal/utils","ember-metal/platform","ember-metal/chains","ember-metal/events","ember-metal/mixin","ember-metal/enumerable_utils","ember-metal/error","ember-metal/keys","ember-runtime/mixins/action_handler","ember-metal/properties","ember-metal/binding","ember-metal/computed","ember-metal/injected_property","ember-metal/run_loop","ember-metal/watching","ember-runtime/inject","exports"],
|
19779
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __dependency16__, __dependency17__, __dependency18__, __dependency19__, __exports__) {
|
19667
19780
|
// Remove "use strict"; from transpiled module until
|
19668
19781
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
19669
19782
|
//
|
@@ -19675,38 +19788,39 @@ define("ember-runtime/system/core_object",
|
|
19675
19788
|
*/
|
19676
19789
|
|
19677
19790
|
var Ember = __dependency1__["default"];
|
19791
|
+
var merge = __dependency2__["default"];
|
19678
19792
|
// Ember.assert, Ember.config
|
19679
19793
|
|
19680
19794
|
// NOTE: this object should never be included directly. Instead use `Ember.Object`.
|
19681
19795
|
// We only define this separately so that `Ember.Set` can depend on it.
|
19682
|
-
var get =
|
19683
|
-
var guidFor =
|
19684
|
-
var apply =
|
19685
|
-
var o_create =
|
19686
|
-
var generateGuid =
|
19687
|
-
var GUID_KEY =
|
19688
|
-
var meta =
|
19689
|
-
var makeArray =
|
19690
|
-
var finishChains =
|
19691
|
-
var sendEvent =
|
19692
|
-
var IS_BINDING =
|
19693
|
-
var Mixin =
|
19694
|
-
var required =
|
19695
|
-
var indexOf =
|
19696
|
-
var EmberError =
|
19697
|
-
var o_defineProperty =
|
19698
|
-
var keys =
|
19699
|
-
var ActionHandler =
|
19700
|
-
var defineProperty =
|
19701
|
-
var Binding =
|
19702
|
-
var ComputedProperty =
|
19703
|
-
var computed =
|
19704
|
-
var InjectedProperty =
|
19705
|
-
var run =
|
19706
|
-
var destroy =
|
19796
|
+
var get = __dependency3__.get;
|
19797
|
+
var guidFor = __dependency4__.guidFor;
|
19798
|
+
var apply = __dependency4__.apply;
|
19799
|
+
var o_create = __dependency5__.create;
|
19800
|
+
var generateGuid = __dependency4__.generateGuid;
|
19801
|
+
var GUID_KEY = __dependency4__.GUID_KEY;
|
19802
|
+
var meta = __dependency4__.meta;
|
19803
|
+
var makeArray = __dependency4__.makeArray;
|
19804
|
+
var finishChains = __dependency6__.finishChains;
|
19805
|
+
var sendEvent = __dependency7__.sendEvent;
|
19806
|
+
var IS_BINDING = __dependency8__.IS_BINDING;
|
19807
|
+
var Mixin = __dependency8__.Mixin;
|
19808
|
+
var required = __dependency8__.required;
|
19809
|
+
var indexOf = __dependency9__.indexOf;
|
19810
|
+
var EmberError = __dependency10__["default"];
|
19811
|
+
var o_defineProperty = __dependency5__.defineProperty;
|
19812
|
+
var keys = __dependency11__["default"];
|
19813
|
+
var ActionHandler = __dependency12__["default"];
|
19814
|
+
var defineProperty = __dependency13__.defineProperty;
|
19815
|
+
var Binding = __dependency14__.Binding;
|
19816
|
+
var ComputedProperty = __dependency15__.ComputedProperty;
|
19817
|
+
var computed = __dependency15__.computed;
|
19818
|
+
var InjectedProperty = __dependency16__["default"];
|
19819
|
+
var run = __dependency17__["default"];
|
19820
|
+
var destroy = __dependency18__.destroy;
|
19707
19821
|
var K = __dependency1__.K;
|
19708
|
-
var hasPropertyAccessors =
|
19709
|
-
var validatePropertyInjections =
|
19822
|
+
var hasPropertyAccessors = __dependency5__.hasPropertyAccessors;
|
19823
|
+
var validatePropertyInjections = __dependency19__.validatePropertyInjections;
|
19710
19824
|
|
19711
19825
|
var schedule = run.schedule;
|
19712
19826
|
var applyMixin = Mixin._apply;
|
@@ -19758,6 +19872,7 @@ define("ember-runtime/system/core_object",
|
|
19758
19872
|
initProperties = null;
|
19759
19873
|
|
19760
19874
|
var concatenatedProperties = this.concatenatedProperties;
|
19875
|
+
var mergedProperties = this.mergedProperties;
|
19761
19876
|
|
19762
19877
|
for (var i = 0, l = props.length; i < l; i++) {
|
19763
19878
|
var properties = props[i];
|
@@ -19810,6 +19925,14 @@ define("ember-runtime/system/core_object",
|
|
19810
19925
|
}
|
19811
19926
|
}
|
19812
19927
|
|
19928
|
+
if (mergedProperties &&
|
19929
|
+
mergedProperties.length &&
|
19930
|
+
indexOf(mergedProperties, keyName) >= 0) {
|
19931
|
+
var originalValue = this[keyName];
|
19932
|
+
|
19933
|
+
value = merge(originalValue, value);
|
19934
|
+
}
|
19935
|
+
|
19813
19936
|
if (desc) {
|
19814
19937
|
desc.set(this, keyName, value);
|
19815
19938
|
} else {
|
@@ -19975,8 +20098,8 @@ define("ember-runtime/system/core_object",
|
|
19975
20098
|
view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
|
19976
20099
|
```
|
19977
20100
|
|
19978
|
-
Using the `concatenatedProperties` property, we can tell
|
19979
|
-
|
20101
|
+
Using the `concatenatedProperties` property, we can tell Ember to mix the
|
20102
|
+
content of the properties.
|
19980
20103
|
|
19981
20104
|
In `Ember.View` the `classNameBindings` and `attributeBindings` properties
|
19982
20105
|
are also concatenated, in addition to `classNames`.
|
@@ -20580,7 +20703,7 @@ define("ember-runtime/system/deferred",
|
|
20580
20703
|
|
20581
20704
|
var Deferred = EmberObject.extend(DeferredMixin, {
|
20582
20705
|
init: function() {
|
20583
|
-
Ember.deprecate('Usage of Ember.Deferred is deprecated.');
|
20706
|
+
Ember.deprecate('Usage of Ember.Deferred is deprecated.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' });
|
20584
20707
|
this._super();
|
20585
20708
|
}
|
20586
20709
|
});
|
@@ -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 1.10.0-beta.
|
8
|
+
* @version 1.10.0-beta.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -114,7 +114,7 @@ define("ember-metal/core",
|
|
114
114
|
|
115
115
|
@class Ember
|
116
116
|
@static
|
117
|
-
@version 1.10.0-beta.
|
117
|
+
@version 1.10.0-beta.4
|
118
118
|
*/
|
119
119
|
|
120
120
|
if ('undefined' === typeof Ember) {
|
@@ -141,10 +141,10 @@ define("ember-metal/core",
|
|
141
141
|
/**
|
142
142
|
@property VERSION
|
143
143
|
@type String
|
144
|
-
@default '1.10.0-beta.
|
144
|
+
@default '1.10.0-beta.4'
|
145
145
|
@static
|
146
146
|
*/
|
147
|
-
Ember.VERSION = '1.10.0-beta.
|
147
|
+
Ember.VERSION = '1.10.0-beta.4';
|
148
148
|
|
149
149
|
/**
|
150
150
|
Standard environmental variables. You can define these in a global `EmberENV`
|
@@ -401,6 +401,11 @@ define("ember-template-compiler/plugins/transform-each-in-to-hash",
|
|
401
401
|
|
402
402
|
walker.visit(ast, function(node) {
|
403
403
|
if (pluginContext.validate(node)) {
|
404
|
+
|
405
|
+
if (node.program && node.program.blockParams.length) {
|
406
|
+
throw new Error('You cannot use keyword (`{{each foo in bar}}`) and block params (`{{each bar as |foo|}}`) at the same time.');
|
407
|
+
}
|
408
|
+
|
404
409
|
var removedParams = node.sexpr.params.splice(0, 2);
|
405
410
|
var keyword = removedParams[0].original;
|
406
411
|
|
@@ -472,6 +477,11 @@ define("ember-template-compiler/plugins/transform-with-as-to-hash",
|
|
472
477
|
|
473
478
|
walker.visit(ast, function(node) {
|
474
479
|
if (pluginContext.validate(node)) {
|
480
|
+
|
481
|
+
if (node.program && node.program.blockParams.length) {
|
482
|
+
throw new Error('You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time.');
|
483
|
+
}
|
484
|
+
|
475
485
|
var removedParams = node.sexpr.params.splice(1, 2);
|
476
486
|
var keyword = removedParams[1].original;
|
477
487
|
node.program.blockParams = [ keyword ];
|
@@ -739,9 +749,13 @@ define("htmlbars-compiler/fragment-javascript-compiler",
|
|
739
749
|
this.source.push(this.indent+' return '+el+';\n');
|
740
750
|
};
|
741
751
|
|
742
|
-
FragmentJavaScriptCompiler.prototype.setAttribute = function(name, value) {
|
752
|
+
FragmentJavaScriptCompiler.prototype.setAttribute = function(name, value, namespace) {
|
743
753
|
var el = 'el'+this.depth;
|
744
|
-
|
754
|
+
if (namespace) {
|
755
|
+
this.source.push(this.indent+' dom.setAttributeNS('+el+','+string(namespace)+','+string(name)+','+string(value)+');\n');
|
756
|
+
} else {
|
757
|
+
this.source.push(this.indent+' dom.setAttribute('+el+','+string(name)+','+string(value)+');\n');
|
758
|
+
}
|
745
759
|
};
|
746
760
|
|
747
761
|
FragmentJavaScriptCompiler.prototype.appendChild = function() {
|
@@ -779,6 +793,7 @@ define("htmlbars-compiler/fragment-opcode-compiler",
|
|
779
793
|
"use strict";
|
780
794
|
var TemplateVisitor = __dependency1__["default"];
|
781
795
|
var processOpcodes = __dependency2__.processOpcodes;
|
796
|
+
var getNamespace = __dependency2__.getNamespace;
|
782
797
|
var forEach = __dependency3__.forEach;
|
783
798
|
|
784
799
|
function FragmentOpcodeCompiler() {
|
@@ -838,7 +853,10 @@ define("htmlbars-compiler/fragment-opcode-compiler",
|
|
838
853
|
|
839
854
|
FragmentOpcodeCompiler.prototype.attribute = function(attr) {
|
840
855
|
if (attr.value.type === 'TextNode') {
|
841
|
-
|
856
|
+
|
857
|
+
var namespace = getNamespace(attr.name) || null;
|
858
|
+
|
859
|
+
this.opcode('setAttribute', [attr.name, attr.value.chars, namespace]);
|
842
860
|
}
|
843
861
|
};
|
844
862
|
|
@@ -1058,18 +1076,18 @@ define("htmlbars-compiler/hydration-javascript-compiler",
|
|
1058
1076
|
this.morphs.push(['morph' + morphNum, morph]);
|
1059
1077
|
};
|
1060
1078
|
|
1061
|
-
prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped) {
|
1079
|
+
prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped, namespace) {
|
1062
1080
|
var morphMethod = escaped ? 'createAttrMorph' : 'createUnsafeAttrMorph';
|
1063
|
-
var morph = "dom."+morphMethod+"(element"+elementNum+", '"+name+"')";
|
1081
|
+
var morph = "dom."+morphMethod+"(element"+elementNum+", '"+name+(namespace ? "', '"+namespace : '')+"')";
|
1064
1082
|
this.morphs.push(['attrMorph' + attrMorphNum, morph]);
|
1065
1083
|
};
|
1066
1084
|
|
1067
1085
|
prototype.repairClonedNode = function(blankChildTextNodes, isElementChecked) {
|
1068
1086
|
var parent = this.getParent(),
|
1069
|
-
processing = 'dom.repairClonedNode('+parent+','+
|
1087
|
+
processing = 'if (this.cachedFragment) { dom.repairClonedNode('+parent+','+
|
1070
1088
|
array(blankChildTextNodes)+
|
1071
1089
|
( isElementChecked ? ',true' : '' )+
|
1072
|
-
');';
|
1090
|
+
'); }';
|
1073
1091
|
this.fragmentProcessing.push(
|
1074
1092
|
processing
|
1075
1093
|
);
|
@@ -1113,6 +1131,7 @@ define("htmlbars-compiler/hydration-opcode-compiler",
|
|
1113
1131
|
"use strict";
|
1114
1132
|
var TemplateVisitor = __dependency1__["default"];
|
1115
1133
|
var processOpcodes = __dependency2__.processOpcodes;
|
1134
|
+
var getNamespace = __dependency2__.getNamespace;
|
1116
1135
|
var forEach = __dependency3__.forEach;
|
1117
1136
|
var isHelper = __dependency4__.isHelper;
|
1118
1137
|
|
@@ -1286,6 +1305,7 @@ define("htmlbars-compiler/hydration-opcode-compiler",
|
|
1286
1305
|
HydrationOpcodeCompiler.prototype.attribute = function(attr) {
|
1287
1306
|
var value = attr.value;
|
1288
1307
|
var escaped = true;
|
1308
|
+
var namespace = getNamespace(attr.name) || null;
|
1289
1309
|
|
1290
1310
|
// TODO: Introduce context specific AST nodes to avoid switching here.
|
1291
1311
|
if (value.type === 'TextNode') {
|
@@ -1306,7 +1326,7 @@ define("htmlbars-compiler/hydration-opcode-compiler",
|
|
1306
1326
|
}
|
1307
1327
|
|
1308
1328
|
var attrMorphNum = this.attrMorphNum++;
|
1309
|
-
this.opcode('createAttrMorph', attrMorphNum, this.elementNum, attr.name, escaped);
|
1329
|
+
this.opcode('createAttrMorph', attrMorphNum, this.elementNum, attr.name, escaped, namespace);
|
1310
1330
|
this.opcode('printAttributeHook', attrMorphNum, this.elementNum);
|
1311
1331
|
};
|
1312
1332
|
|
@@ -1842,7 +1862,23 @@ define("htmlbars-compiler/utils",
|
|
1842
1862
|
}
|
1843
1863
|
}
|
1844
1864
|
|
1845
|
-
__exports__.processOpcodes = processOpcodes
|
1865
|
+
__exports__.processOpcodes = processOpcodes;// ref http://dev.w3.org/html5/spec-LC/namespaces.html
|
1866
|
+
var defaultNamespaces = {
|
1867
|
+
html: 'http://www.w3.org/1999/xhtml',
|
1868
|
+
mathml: 'http://www.w3.org/1998/Math/MathML',
|
1869
|
+
svg: 'http://www.w3.org/2000/svg',
|
1870
|
+
xlink: 'http://www.w3.org/1999/xlink',
|
1871
|
+
xml: 'http://www.w3.org/XML/1998/namespace'
|
1872
|
+
};
|
1873
|
+
|
1874
|
+
function getNamespace(attrName) {
|
1875
|
+
var parts = attrName.split(':');
|
1876
|
+
if (parts.length > 1) {
|
1877
|
+
return defaultNamespaces[parts[0]];
|
1878
|
+
}
|
1879
|
+
}
|
1880
|
+
|
1881
|
+
__exports__.getNamespace = getNamespace;
|
1846
1882
|
});
|
1847
1883
|
define("htmlbars-syntax",
|
1848
1884
|
["./htmlbars-syntax/walker","./htmlbars-syntax/builders","./htmlbars-syntax/parser","exports"],
|
@@ -3670,14 +3706,18 @@ define("htmlbars-syntax/token-handlers",
|
|
3670
3706
|
__exports__["default"] = tokenHandlers;
|
3671
3707
|
});
|
3672
3708
|
define("htmlbars-syntax/tokenizer",
|
3673
|
-
["../simple-html-tokenizer","./utils","./builders","exports"],
|
3674
|
-
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
3709
|
+
["../simple-html-tokenizer","./utils","../htmlbars-util/array-utils","./builders","exports"],
|
3710
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
|
3675
3711
|
"use strict";
|
3676
3712
|
var Tokenizer = __dependency1__.Tokenizer;
|
3677
3713
|
var isHelper = __dependency2__.isHelper;
|
3678
|
-
var
|
3714
|
+
var map = __dependency3__.map;
|
3715
|
+
var builders = __dependency4__["default"];
|
3679
3716
|
|
3680
3717
|
Tokenizer.prototype.createAttribute = function(char) {
|
3718
|
+
if (this.token.type === 'EndTag') {
|
3719
|
+
throw new Error('Invalid end tag: closing tag must not have attributes, in ' + formatTokenInfo(this) + '.');
|
3720
|
+
}
|
3681
3721
|
this.currentAttribute = builders.attr(char.toLowerCase(), [], null);
|
3682
3722
|
this.token.attributes.push(this.currentAttribute);
|
3683
3723
|
this.state = 'attributeName';
|
@@ -3694,12 +3734,13 @@ define("htmlbars-syntax/tokenizer",
|
|
3694
3734
|
Tokenizer.prototype.addToAttributeValue = function(char) {
|
3695
3735
|
var value = this.currentAttribute.value;
|
3696
3736
|
|
3737
|
+
if (!this.currentAttribute.quoted && char === '/') {
|
3738
|
+
throw new Error("A space is required between an unquoted attribute value and `/`, in " + formatTokenInfo(this) +
|
3739
|
+
'.');
|
3740
|
+
}
|
3697
3741
|
if (!this.currentAttribute.quoted && value.length > 0 &&
|
3698
3742
|
(char.type === 'MustacheStatement' || value[0].type === 'MustacheStatement')) {
|
3699
|
-
|
3700
|
-
var mustache = char.type === 'MustacheStatement' ? char : value[0],
|
3701
|
-
line = mustache.loc.start.line;
|
3702
|
-
throw new Error("Unquoted attribute value must be a single string or mustache (line " + line + ")");
|
3743
|
+
throw new Error("Unquoted attribute value must be a single string or mustache (on line " + this.line + ")");
|
3703
3744
|
}
|
3704
3745
|
|
3705
3746
|
if (typeof char === 'object') {
|
@@ -3732,14 +3773,16 @@ define("htmlbars-syntax/tokenizer",
|
|
3732
3773
|
|
3733
3774
|
function prepareAttributeValue(attr) {
|
3734
3775
|
var parts = attr.value;
|
3735
|
-
|
3776
|
+
var length = parts.length;
|
3777
|
+
|
3778
|
+
if (length === 0) {
|
3736
3779
|
return builders.text('');
|
3737
|
-
} else if (
|
3780
|
+
} else if (length === 1 && parts[0].type === "TextNode") {
|
3738
3781
|
return parts[0];
|
3739
3782
|
} else if (!attr.quoted) {
|
3740
3783
|
return parts[0];
|
3741
3784
|
} else {
|
3742
|
-
return builders.concat(
|
3785
|
+
return builders.concat(map(parts, prepareConcatPart));
|
3743
3786
|
}
|
3744
3787
|
}
|
3745
3788
|
|
@@ -3752,6 +3795,10 @@ define("htmlbars-syntax/tokenizer",
|
|
3752
3795
|
}
|
3753
3796
|
}
|
3754
3797
|
|
3798
|
+
function formatTokenInfo(tokenizer) {
|
3799
|
+
return '`' + tokenizer.token.tagName + '` (on line ' + tokenizer.line + ')';
|
3800
|
+
}
|
3801
|
+
|
3755
3802
|
function unwrapMustache(mustache) {
|
3756
3803
|
if (isHelper(mustache.sexpr)) {
|
3757
3804
|
return mustache.sexpr;
|
@@ -3957,6 +4004,16 @@ define("htmlbars-test-helpers",
|
|
3957
4004
|
var ie8InnerHTMLTestElement = document.createElement('div');
|
3958
4005
|
ie8InnerHTMLTestElement.setAttribute('id', 'womp');
|
3959
4006
|
var ie8InnerHTML = (ie8InnerHTMLTestElement.outerHTML.indexOf('id=womp') > -1);
|
4007
|
+
|
4008
|
+
// detect side-effects of cloning svg elements in IE9-11
|
4009
|
+
var ieSVGInnerHTML = (function () {
|
4010
|
+
var div = document.createElement('div');
|
4011
|
+
var node = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
4012
|
+
div.appendChild(node);
|
4013
|
+
var clone = div.cloneNode(true);
|
4014
|
+
return clone.innerHTML === '<svg xmlns="http://www.w3.org/2000/svg" />';
|
4015
|
+
})();
|
4016
|
+
|
3960
4017
|
function normalizeInnerHTML(actualHTML) {
|
3961
4018
|
if (ie8InnerHTML) {
|
3962
4019
|
// drop newlines in IE8
|
@@ -3970,6 +4027,16 @@ define("htmlbars-test-helpers",
|
|
3970
4027
|
return 'id="'+id+'"';
|
3971
4028
|
});
|
3972
4029
|
}
|
4030
|
+
if (ieSVGInnerHTML) {
|
4031
|
+
// Replace `<svg xmlns="http://www.w3.org/2000/svg" height="50%" />` with `<svg height="50%"></svg>`, etc.
|
4032
|
+
// drop namespace attribute
|
4033
|
+
actualHTML = actualHTML.replace(/ xmlns="[^"]+"/, '');
|
4034
|
+
// replace self-closing elements
|
4035
|
+
actualHTML = actualHTML.replace(/<([A-Z]+) [^\/>]*\/>/gi, function(tag, tagName) {
|
4036
|
+
return tag.slice(0, tag.length - 3) + '></' + tagName + '>';
|
4037
|
+
});
|
4038
|
+
}
|
4039
|
+
|
3973
4040
|
return actualHTML;
|
3974
4041
|
}
|
3975
4042
|
|
@@ -3998,19 +4065,30 @@ define("htmlbars-util/array-utils",
|
|
3998
4065
|
function(__exports__) {
|
3999
4066
|
"use strict";
|
4000
4067
|
function forEach(array, callback, binding) {
|
4001
|
-
var i;
|
4068
|
+
var i, l;
|
4002
4069
|
if (binding === undefined) {
|
4003
|
-
for (i = 0
|
4070
|
+
for (i = 0, l = array.length; i < l; i++) {
|
4004
4071
|
callback(array[i], i, array);
|
4005
4072
|
}
|
4006
4073
|
} else {
|
4007
|
-
for (i = 0
|
4074
|
+
for (i = 0, l = array.length; i < l; i++) {
|
4008
4075
|
callback.call(binding, array[i], i, array);
|
4009
4076
|
}
|
4010
4077
|
}
|
4011
4078
|
}
|
4012
4079
|
|
4013
|
-
__exports__.forEach = forEach;
|
4080
|
+
__exports__.forEach = forEach;function map(array, callback) {
|
4081
|
+
var output = [];
|
4082
|
+
var i, l;
|
4083
|
+
|
4084
|
+
for (i = 0, l = array.length; i < l; i++) {
|
4085
|
+
output.push(callback(array[i], i, array));
|
4086
|
+
}
|
4087
|
+
|
4088
|
+
return output;
|
4089
|
+
}
|
4090
|
+
|
4091
|
+
__exports__.map = map;
|
4014
4092
|
});
|
4015
4093
|
define("htmlbars-util/handlebars/safe-string",
|
4016
4094
|
["exports"],
|