ember-source 1.13.3 → 1.13.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-template-compiler.js +70 -36
- data/dist/ember-testing.js +41 -10
- data/dist/ember.debug.js +677 -330
- data/dist/ember.js +677 -330
- data/dist/ember.min.js +15 -14
- data/dist/ember.prod.js +622 -306
- 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: abc06520427060a7dd7576299d411542db723d1b
|
4
|
+
data.tar.gz: ed5908b5c66158dbd7939c3587f8a465d7b63ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87aed79f366178000d086af299d852765d92e9b942c0eadbc605f3101788b225b96712a2ceabc1a6c464597f2f5ceaea4d61cc236d4783b541a27e51d7ebffa5
|
7
|
+
data.tar.gz: 0afe989067a8fe6ecc99d94d94bc02d44048d778ca84c8c0395a335073404dd66128950e0536a354d39eb02323468fa401671b89a90b74c2ae1d6c8793272336
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.13.
|
1
|
+
1.13.4
|
@@ -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.13.
|
8
|
+
* @version 1.13.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -297,15 +297,46 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
297
297
|
|
298
298
|
@method deprecateFunc
|
299
299
|
@param {String} message A description of the deprecation.
|
300
|
+
@param {Object} [options] The options object for Ember.deprecate.
|
300
301
|
@param {Function} func The new function called to replace its deprecated counterpart.
|
301
302
|
@return {Function} a new function that wrapped the original function with a deprecation warning
|
302
303
|
@private
|
303
304
|
*/
|
304
|
-
_emberMetalCore["default"].deprecateFunc = function (
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
305
|
+
_emberMetalCore["default"].deprecateFunc = function () {
|
306
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
307
|
+
args[_key] = arguments[_key];
|
308
|
+
}
|
309
|
+
|
310
|
+
if (args.length === 3) {
|
311
|
+
var _ret = (function () {
|
312
|
+
var message = args[0];
|
313
|
+
var options = args[1];
|
314
|
+
var func = args[2];
|
315
|
+
|
316
|
+
return {
|
317
|
+
v: function () {
|
318
|
+
_emberMetalCore["default"].deprecate(message, false, options);
|
319
|
+
return func.apply(this, arguments);
|
320
|
+
}
|
321
|
+
};
|
322
|
+
})();
|
323
|
+
|
324
|
+
if (typeof _ret === "object") return _ret.v;
|
325
|
+
} else {
|
326
|
+
var _ret2 = (function () {
|
327
|
+
var message = args[0];
|
328
|
+
var func = args[1];
|
329
|
+
|
330
|
+
return {
|
331
|
+
v: function () {
|
332
|
+
_emberMetalCore["default"].deprecate(message);
|
333
|
+
return func.apply(this, arguments);
|
334
|
+
}
|
335
|
+
};
|
336
|
+
})();
|
337
|
+
|
338
|
+
if (typeof _ret2 === "object") return _ret2.v;
|
339
|
+
}
|
309
340
|
};
|
310
341
|
|
311
342
|
/**
|
@@ -313,10 +344,10 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
313
344
|
`Ember.runInDebug()` when doing a production build.
|
314
345
|
|
315
346
|
```javascript
|
316
|
-
Ember.runInDebug(
|
317
|
-
Ember.
|
318
|
-
didInsertElement
|
319
|
-
console.log(
|
347
|
+
Ember.runInDebug(() => {
|
348
|
+
Ember.Component.reopen({
|
349
|
+
didInsertElement() {
|
350
|
+
console.log("I'm happy");
|
320
351
|
}
|
321
352
|
});
|
322
353
|
});
|
@@ -574,20 +605,20 @@ enifed("ember-metal", ["exports", "ember-metal/core", "ember-metal/merge", "embe
|
|
574
605
|
_emberMetalCore["default"].addObserver = _emberMetalObserver.addObserver;
|
575
606
|
_emberMetalCore["default"].observersFor = _emberMetalObserver.observersFor;
|
576
607
|
_emberMetalCore["default"].removeObserver = _emberMetalObserver.removeObserver;
|
577
|
-
_emberMetalCore["default"].addBeforeObserver = _emberMetalObserver.
|
608
|
+
_emberMetalCore["default"].addBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.addBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._addBeforeObserver);
|
578
609
|
_emberMetalCore["default"]._suspendBeforeObserver = _emberMetalObserver._suspendBeforeObserver;
|
579
610
|
_emberMetalCore["default"]._suspendBeforeObservers = _emberMetalObserver._suspendBeforeObservers;
|
580
611
|
_emberMetalCore["default"]._suspendObserver = _emberMetalObserver._suspendObserver;
|
581
612
|
_emberMetalCore["default"]._suspendObservers = _emberMetalObserver._suspendObservers;
|
582
|
-
_emberMetalCore["default"].beforeObserversFor = _emberMetalObserver.
|
583
|
-
_emberMetalCore["default"].removeBeforeObserver = _emberMetalObserver.
|
613
|
+
_emberMetalCore["default"].beforeObserversFor = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserversFor is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._beforeObserversFor);
|
614
|
+
_emberMetalCore["default"].removeBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.removeBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._removeBeforeObserver);
|
584
615
|
|
585
616
|
_emberMetalCore["default"].IS_BINDING = _emberMetalMixin.IS_BINDING;
|
586
617
|
_emberMetalCore["default"].required = _emberMetalMixin.required;
|
587
618
|
_emberMetalCore["default"].aliasMethod = _emberMetalMixin.aliasMethod;
|
588
619
|
_emberMetalCore["default"].observer = _emberMetalMixin.observer;
|
589
|
-
_emberMetalCore["default"].immediateObserver = _emberMetalMixin.
|
590
|
-
_emberMetalCore["default"].beforeObserver = _emberMetalMixin.
|
620
|
+
_emberMetalCore["default"].immediateObserver = _emberMetalMixin._immediateObserver;
|
621
|
+
_emberMetalCore["default"].beforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalMixin._beforeObserver);
|
591
622
|
_emberMetalCore["default"].mixin = _emberMetalMixin.mixin;
|
592
623
|
_emberMetalCore["default"].Mixin = _emberMetalMixin.Mixin;
|
593
624
|
|
@@ -3263,7 +3294,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
3263
3294
|
|
3264
3295
|
@class Ember
|
3265
3296
|
@static
|
3266
|
-
@version 1.13.
|
3297
|
+
@version 1.13.4
|
3267
3298
|
@public
|
3268
3299
|
*/
|
3269
3300
|
|
@@ -3295,11 +3326,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
3295
3326
|
|
3296
3327
|
@property VERSION
|
3297
3328
|
@type String
|
3298
|
-
@default '1.13.
|
3329
|
+
@default '1.13.4'
|
3299
3330
|
@static
|
3300
3331
|
@public
|
3301
3332
|
*/
|
3302
|
-
Ember.VERSION = '1.13.
|
3333
|
+
Ember.VERSION = '1.13.4';
|
3303
3334
|
|
3304
3335
|
/**
|
3305
3336
|
The hash of environment variables used to control various configuration
|
@@ -5896,8 +5927,8 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
5896
5927
|
exports.required = required;
|
5897
5928
|
exports.aliasMethod = aliasMethod;
|
5898
5929
|
exports.observer = observer;
|
5899
|
-
exports.
|
5900
|
-
exports.
|
5930
|
+
exports._immediateObserver = _immediateObserver;
|
5931
|
+
exports._beforeObserver = _beforeObserver;
|
5901
5932
|
// Remove "use strict"; from transpiled module until
|
5902
5933
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
5903
5934
|
//
|
@@ -6289,13 +6320,13 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
6289
6320
|
var prev = obj[key];
|
6290
6321
|
|
6291
6322
|
if ("function" === typeof prev) {
|
6292
|
-
updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", _emberMetalObserver.
|
6323
|
+
updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", _emberMetalObserver._removeBeforeObserver);
|
6293
6324
|
updateObserversAndListeners(obj, key, prev, "__ember_observes__", _emberMetalObserver.removeObserver);
|
6294
6325
|
updateObserversAndListeners(obj, key, prev, "__ember_listens__", _emberMetalEvents.removeListener);
|
6295
6326
|
}
|
6296
6327
|
|
6297
6328
|
if ("function" === typeof observerOrListener) {
|
6298
|
-
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", _emberMetalObserver.
|
6329
|
+
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", _emberMetalObserver._addBeforeObserver);
|
6299
6330
|
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observes__", _emberMetalObserver.addObserver);
|
6300
6331
|
updateObserversAndListeners(obj, key, observerOrListener, "__ember_listens__", _emberMetalEvents.addListener);
|
6301
6332
|
}
|
@@ -6772,7 +6803,7 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
6772
6803
|
Also available as `Function.prototype.observesImmediately` if prototype extensions are
|
6773
6804
|
enabled.
|
6774
6805
|
|
6775
|
-
@method
|
6806
|
+
@method _immediateObserver
|
6776
6807
|
@for Ember
|
6777
6808
|
@param {String} propertyNames*
|
6778
6809
|
@param {Function} func
|
@@ -6781,7 +6812,7 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
6781
6812
|
@private
|
6782
6813
|
*/
|
6783
6814
|
|
6784
|
-
function
|
6815
|
+
function _immediateObserver() {
|
6785
6816
|
_emberMetalCore["default"].deprecate("Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead.");
|
6786
6817
|
|
6787
6818
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
@@ -6798,9 +6829,9 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
6798
6829
|
Note, `@each.property` observer is called per each add or replace of an element
|
6799
6830
|
and it's not called with a specific enumeration item.
|
6800
6831
|
|
6801
|
-
A `
|
6832
|
+
A `_beforeObserver` fires before a property changes.
|
6802
6833
|
|
6803
|
-
A `
|
6834
|
+
A `_beforeObserver` is an alternative form of `.observesBefore()`.
|
6804
6835
|
|
6805
6836
|
```javascript
|
6806
6837
|
App.PersonView = Ember.View.extend({
|
@@ -6833,10 +6864,11 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
6833
6864
|
@param {String} propertyNames*
|
6834
6865
|
@param {Function} func
|
6835
6866
|
@return func
|
6867
|
+
@deprecated
|
6836
6868
|
@private
|
6837
6869
|
*/
|
6838
6870
|
|
6839
|
-
function
|
6871
|
+
function _beforeObserver() {
|
6840
6872
|
for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
6841
6873
|
args[_key5] = arguments[_key5];
|
6842
6874
|
}
|
@@ -6886,13 +6918,13 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
6886
6918
|
exports.addObserver = addObserver;
|
6887
6919
|
exports.observersFor = observersFor;
|
6888
6920
|
exports.removeObserver = removeObserver;
|
6889
|
-
exports.
|
6921
|
+
exports._addBeforeObserver = _addBeforeObserver;
|
6890
6922
|
exports._suspendBeforeObserver = _suspendBeforeObserver;
|
6891
6923
|
exports._suspendObserver = _suspendObserver;
|
6892
6924
|
exports._suspendBeforeObservers = _suspendBeforeObservers;
|
6893
6925
|
exports._suspendObservers = _suspendObservers;
|
6894
|
-
exports.
|
6895
|
-
exports.
|
6926
|
+
exports._beforeObserversFor = _beforeObserversFor;
|
6927
|
+
exports._removeBeforeObserver = _removeBeforeObserver;
|
6896
6928
|
|
6897
6929
|
/**
|
6898
6930
|
@module ember-metal
|
@@ -6948,16 +6980,17 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
6948
6980
|
}
|
6949
6981
|
|
6950
6982
|
/**
|
6951
|
-
@method
|
6983
|
+
@method _addBeforeObserver
|
6952
6984
|
@for Ember
|
6953
6985
|
@param obj
|
6954
6986
|
@param {String} path
|
6955
6987
|
@param {Object|Function} target
|
6956
6988
|
@param {Function|String} [method]
|
6989
|
+
@deprecated
|
6957
6990
|
@private
|
6958
6991
|
*/
|
6959
6992
|
|
6960
|
-
function
|
6993
|
+
function _addBeforeObserver(obj, path, target, method) {
|
6961
6994
|
_emberMetalEvents.addListener(obj, beforeEvent(path), target, method);
|
6962
6995
|
_emberMetalWatching.watch(obj, path);
|
6963
6996
|
|
@@ -6987,7 +7020,7 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
6987
7020
|
return _emberMetalEvents.suspendListeners(obj, events, target, method, callback);
|
6988
7021
|
}
|
6989
7022
|
|
6990
|
-
function
|
7023
|
+
function _beforeObserversFor(obj, path) {
|
6991
7024
|
return _emberMetalEvents.listenersFor(obj, beforeEvent(path));
|
6992
7025
|
}
|
6993
7026
|
|
@@ -6998,10 +7031,11 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
6998
7031
|
@param {String} path
|
6999
7032
|
@param {Object|Function} target
|
7000
7033
|
@param {Function|String} [method]
|
7034
|
+
@deprecated
|
7001
7035
|
@private
|
7002
7036
|
*/
|
7003
7037
|
|
7004
|
-
function
|
7038
|
+
function _removeBeforeObserver(obj, path, target, method) {
|
7005
7039
|
_emberMetalWatching.unwatch(obj, path);
|
7006
7040
|
_emberMetalEvents.removeListener(obj, beforeEvent(path), target, method);
|
7007
7041
|
|
@@ -12408,7 +12442,7 @@ enifed("ember-template-compiler/system/compile_options", ["exports", "ember-meta
|
|
12408
12442
|
|
12409
12443
|
options.buildMeta = function buildMeta(program) {
|
12410
12444
|
return {
|
12411
|
-
revision: "Ember@1.13.
|
12445
|
+
revision: "Ember@1.13.4",
|
12412
12446
|
loc: program.loc,
|
12413
12447
|
moduleName: options.moduleName
|
12414
12448
|
};
|
@@ -14602,7 +14636,7 @@ enifed("htmlbars-runtime/hooks", ["exports", "./render", "../morph-range/morph-l
|
|
14602
14636
|
*/
|
14603
14637
|
|
14604
14638
|
function bindBlock(env, scope, block) {
|
14605
|
-
var name = arguments[3] === undefined ? "default" : arguments[3];
|
14639
|
+
var name = arguments.length <= 3 || arguments[3] === undefined ? "default" : arguments[3];
|
14606
14640
|
|
14607
14641
|
scope.blocks[name] = block;
|
14608
14642
|
}
|
data/dist/ember-testing.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.13.
|
8
|
+
* @version 1.13.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -297,15 +297,46 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
297
297
|
|
298
298
|
@method deprecateFunc
|
299
299
|
@param {String} message A description of the deprecation.
|
300
|
+
@param {Object} [options] The options object for Ember.deprecate.
|
300
301
|
@param {Function} func The new function called to replace its deprecated counterpart.
|
301
302
|
@return {Function} a new function that wrapped the original function with a deprecation warning
|
302
303
|
@private
|
303
304
|
*/
|
304
|
-
_emberMetalCore["default"].deprecateFunc = function (
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
305
|
+
_emberMetalCore["default"].deprecateFunc = function () {
|
306
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
307
|
+
args[_key] = arguments[_key];
|
308
|
+
}
|
309
|
+
|
310
|
+
if (args.length === 3) {
|
311
|
+
var _ret = (function () {
|
312
|
+
var message = args[0];
|
313
|
+
var options = args[1];
|
314
|
+
var func = args[2];
|
315
|
+
|
316
|
+
return {
|
317
|
+
v: function () {
|
318
|
+
_emberMetalCore["default"].deprecate(message, false, options);
|
319
|
+
return func.apply(this, arguments);
|
320
|
+
}
|
321
|
+
};
|
322
|
+
})();
|
323
|
+
|
324
|
+
if (typeof _ret === "object") return _ret.v;
|
325
|
+
} else {
|
326
|
+
var _ret2 = (function () {
|
327
|
+
var message = args[0];
|
328
|
+
var func = args[1];
|
329
|
+
|
330
|
+
return {
|
331
|
+
v: function () {
|
332
|
+
_emberMetalCore["default"].deprecate(message);
|
333
|
+
return func.apply(this, arguments);
|
334
|
+
}
|
335
|
+
};
|
336
|
+
})();
|
337
|
+
|
338
|
+
if (typeof _ret2 === "object") return _ret2.v;
|
339
|
+
}
|
309
340
|
};
|
310
341
|
|
311
342
|
/**
|
@@ -313,10 +344,10 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
313
344
|
`Ember.runInDebug()` when doing a production build.
|
314
345
|
|
315
346
|
```javascript
|
316
|
-
Ember.runInDebug(
|
317
|
-
Ember.
|
318
|
-
didInsertElement
|
319
|
-
console.log(
|
347
|
+
Ember.runInDebug(() => {
|
348
|
+
Ember.Component.reopen({
|
349
|
+
didInsertElement() {
|
350
|
+
console.log("I'm happy");
|
320
351
|
}
|
321
352
|
});
|
322
353
|
});
|
data/dist/ember.debug.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.13.
|
8
|
+
* @version 1.13.4
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -5473,15 +5473,46 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
5473
5473
|
|
5474
5474
|
@method deprecateFunc
|
5475
5475
|
@param {String} message A description of the deprecation.
|
5476
|
+
@param {Object} [options] The options object for Ember.deprecate.
|
5476
5477
|
@param {Function} func The new function called to replace its deprecated counterpart.
|
5477
5478
|
@return {Function} a new function that wrapped the original function with a deprecation warning
|
5478
5479
|
@private
|
5479
5480
|
*/
|
5480
|
-
_emberMetalCore["default"].deprecateFunc = function (
|
5481
|
-
|
5482
|
-
|
5483
|
-
|
5484
|
-
|
5481
|
+
_emberMetalCore["default"].deprecateFunc = function () {
|
5482
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
5483
|
+
args[_key] = arguments[_key];
|
5484
|
+
}
|
5485
|
+
|
5486
|
+
if (args.length === 3) {
|
5487
|
+
var _ret = (function () {
|
5488
|
+
var message = args[0];
|
5489
|
+
var options = args[1];
|
5490
|
+
var func = args[2];
|
5491
|
+
|
5492
|
+
return {
|
5493
|
+
v: function () {
|
5494
|
+
_emberMetalCore["default"].deprecate(message, false, options);
|
5495
|
+
return func.apply(this, arguments);
|
5496
|
+
}
|
5497
|
+
};
|
5498
|
+
})();
|
5499
|
+
|
5500
|
+
if (typeof _ret === "object") return _ret.v;
|
5501
|
+
} else {
|
5502
|
+
var _ret2 = (function () {
|
5503
|
+
var message = args[0];
|
5504
|
+
var func = args[1];
|
5505
|
+
|
5506
|
+
return {
|
5507
|
+
v: function () {
|
5508
|
+
_emberMetalCore["default"].deprecate(message);
|
5509
|
+
return func.apply(this, arguments);
|
5510
|
+
}
|
5511
|
+
};
|
5512
|
+
})();
|
5513
|
+
|
5514
|
+
if (typeof _ret2 === "object") return _ret2.v;
|
5515
|
+
}
|
5485
5516
|
};
|
5486
5517
|
|
5487
5518
|
/**
|
@@ -5489,10 +5520,10 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
5489
5520
|
`Ember.runInDebug()` when doing a production build.
|
5490
5521
|
|
5491
5522
|
```javascript
|
5492
|
-
Ember.runInDebug(
|
5493
|
-
Ember.
|
5494
|
-
didInsertElement
|
5495
|
-
console.log(
|
5523
|
+
Ember.runInDebug(() => {
|
5524
|
+
Ember.Component.reopen({
|
5525
|
+
didInsertElement() {
|
5526
|
+
console.log("I'm happy");
|
5496
5527
|
}
|
5497
5528
|
});
|
5498
5529
|
});
|
@@ -6254,6 +6285,30 @@ enifed("ember-htmlbars", ["exports", "ember-metal/core", "ember-template-compile
|
|
6254
6285
|
_emberMetalCore["default"].Helper = _emberHtmlbarsHelper["default"];
|
6255
6286
|
}
|
6256
6287
|
});
|
6288
|
+
/**
|
6289
|
+
|
6290
|
+
|
6291
|
+
|
6292
|
+
@module ember
|
6293
|
+
@submodule ember-templates
|
6294
|
+
@main ember-templates
|
6295
|
+
@public
|
6296
|
+
*/
|
6297
|
+
|
6298
|
+
/**
|
6299
|
+
|
6300
|
+
[HTMLBars](https://github.com/tildeio/htmlbars) is a [Handlebars](http://handlebarsjs.com/)
|
6301
|
+
compatible templating engine used by Ember.js. The classes and namespaces
|
6302
|
+
covered by this documentation attempt to focus on APIs for interacting
|
6303
|
+
with HTMLBars itself. For more general guidance on Ember.js templates and
|
6304
|
+
helpers, please see the [ember-templates](/api/modules/ember-templates.html)
|
6305
|
+
package.
|
6306
|
+
|
6307
|
+
@module ember
|
6308
|
+
@submodule ember-htmlbars
|
6309
|
+
@main ember-htmlbars
|
6310
|
+
@public
|
6311
|
+
*/
|
6257
6312
|
|
6258
6313
|
// importing adds template bootstrapping
|
6259
6314
|
// initializer to enable embedded templates
|
@@ -6468,8 +6523,6 @@ enifed("ember-htmlbars/compat/make-bound-helper", ["exports", "ember-metal/strea
|
|
6468
6523
|
@submodule ember-htmlbars
|
6469
6524
|
*/
|
6470
6525
|
|
6471
|
-
//import Helper from "ember-htmlbars/system/helper";
|
6472
|
-
|
6473
6526
|
/**
|
6474
6527
|
A helper function used by `registerBoundHelper`. Takes the
|
6475
6528
|
provided Handlebars helper function fn and returns it in wrapped
|
@@ -6719,22 +6772,107 @@ enifed("ember-htmlbars/env", ["exports", "ember-metal/environment", "htmlbars-ru
|
|
6719
6772
|
|
6720
6773
|
exports.domHelper = domHelper;
|
6721
6774
|
});
|
6722
|
-
enifed(
|
6775
|
+
enifed('ember-htmlbars/helper', ['exports', 'ember-runtime/system/object'], function (exports, _emberRuntimeSystemObject) {
|
6723
6776
|
exports.helper = helper;
|
6724
6777
|
|
6725
|
-
|
6778
|
+
/**
|
6779
|
+
Ember Helpers are functions that can compute values, and are used in templates.
|
6780
|
+
For example, this code calls a helper named `format-currency`:
|
6781
|
+
|
6782
|
+
```handlebars
|
6783
|
+
<div>{{format-currency cents currency="$"}}</div>
|
6784
|
+
```
|
6785
|
+
|
6786
|
+
Additionally a helper can be called as a nested helper (sometimes called a
|
6787
|
+
subexpression). In this example, the computed value of a helper is passed
|
6788
|
+
to a component named `show-money`:
|
6789
|
+
|
6790
|
+
```handlebars
|
6791
|
+
{{show-money amount=(format-currency cents currency="$")}}
|
6792
|
+
```
|
6793
|
+
|
6794
|
+
Helpers defined using a class must provide a `compute` function. For example:
|
6795
|
+
|
6796
|
+
```js
|
6797
|
+
export default Ember.Helper.extend({
|
6798
|
+
compute(params, hash) {
|
6799
|
+
let cents = params[0];
|
6800
|
+
let currency = hash.currency;
|
6801
|
+
return `${currency}${cents * 0.01}`;
|
6802
|
+
}
|
6803
|
+
});
|
6804
|
+
```
|
6805
|
+
|
6806
|
+
Each time the input to a helper changes, the `compute` function will be
|
6807
|
+
called again.
|
6808
|
+
|
6809
|
+
As instances, these helpers also have access to the container an will accept
|
6810
|
+
injected dependencies.
|
6811
|
+
|
6812
|
+
Additionally, class helpers can call `recompute` to force a new computation.
|
6813
|
+
|
6814
|
+
@class Ember.Helper
|
6815
|
+
@public
|
6816
|
+
*/
|
6726
6817
|
var Helper = _emberRuntimeSystemObject["default"].extend({
|
6727
6818
|
isHelper: true,
|
6819
|
+
|
6820
|
+
/**
|
6821
|
+
On a class-based helper, it may be useful to force a recomputation of that
|
6822
|
+
helpers value. This is akin to `rerender` on a component.
|
6823
|
+
For example, this component will rerender when the `currentUser` on a
|
6824
|
+
session service changes:
|
6825
|
+
```js
|
6826
|
+
// app/helpers/current-user-email.js
|
6827
|
+
export default Ember.Helper.extend({
|
6828
|
+
session: Ember.inject.service(),
|
6829
|
+
onNewUser: Ember.observer('session.currentUser', function() {
|
6830
|
+
this.recompute();
|
6831
|
+
}),
|
6832
|
+
compute() {
|
6833
|
+
return this.get('session.currentUser.email');
|
6834
|
+
}
|
6835
|
+
});
|
6836
|
+
```
|
6837
|
+
@method recompute
|
6838
|
+
@public
|
6839
|
+
*/
|
6728
6840
|
recompute: function () {
|
6729
6841
|
this._stream.notify();
|
6730
6842
|
}
|
6843
|
+
|
6844
|
+
/**
|
6845
|
+
Override this function when writing a class-based helper.
|
6846
|
+
@method compute
|
6847
|
+
@param {Array} params The positional arguments to the helper
|
6848
|
+
@param {Object} hash The named arguments to the helper
|
6849
|
+
@public
|
6850
|
+
*/
|
6731
6851
|
});
|
6732
6852
|
|
6733
6853
|
Helper.reopenClass({
|
6734
6854
|
isHelperFactory: true
|
6735
6855
|
});
|
6736
6856
|
|
6737
|
-
|
6857
|
+
/**
|
6858
|
+
In many cases, the ceremony of a full `Ember.Helper` class is not required.
|
6859
|
+
The `helper` method create pure-function helpers without instances. For
|
6860
|
+
example:
|
6861
|
+
|
6862
|
+
```js
|
6863
|
+
// app/helpers/format-currency.js
|
6864
|
+
export default Ember.Helper.helper(function(params, hash) {
|
6865
|
+
let cents = params[0];
|
6866
|
+
let currency = hash.currency;
|
6867
|
+
return `${currency}${cents * 0.01}`;
|
6868
|
+
});
|
6869
|
+
```
|
6870
|
+
|
6871
|
+
@static
|
6872
|
+
@param {Function} helper The helper function
|
6873
|
+
@method helper
|
6874
|
+
@public
|
6875
|
+
*/
|
6738
6876
|
|
6739
6877
|
function helper(helperFn) {
|
6740
6878
|
return {
|
@@ -6745,6 +6883,10 @@ enifed("ember-htmlbars/helper", ["exports", "ember-runtime/system/object"], func
|
|
6745
6883
|
|
6746
6884
|
exports["default"] = Helper;
|
6747
6885
|
});
|
6886
|
+
/**
|
6887
|
+
@module ember
|
6888
|
+
@submodule ember-templates
|
6889
|
+
*/
|
6748
6890
|
enifed("ember-htmlbars/helpers", ["exports", "ember-metal/platform/create"], function (exports, _emberMetalPlatformCreate) {
|
6749
6891
|
exports.registerHelper = registerHelper;
|
6750
6892
|
|
@@ -7194,7 +7336,7 @@ enifed('ember-htmlbars/helpers/each', ['exports', 'ember-metal/core', 'ember-met
|
|
7194
7336
|
```
|
7195
7337
|
|
7196
7338
|
@method each
|
7197
|
-
@for Ember.
|
7339
|
+
@for Ember.Templates.helpers
|
7198
7340
|
@public
|
7199
7341
|
*/
|
7200
7342
|
|
@@ -7287,7 +7429,7 @@ enifed("ember-htmlbars/helpers/if_unless", ["exports", "ember-metal/core", "embe
|
|
7287
7429
|
```
|
7288
7430
|
|
7289
7431
|
@method if
|
7290
|
-
@for Ember.
|
7432
|
+
@for Ember.Templates.helpers
|
7291
7433
|
@public
|
7292
7434
|
*/
|
7293
7435
|
function ifHelper(params, hash, options) {
|
@@ -7300,7 +7442,7 @@ enifed("ember-htmlbars/helpers/if_unless", ["exports", "ember-metal/core", "embe
|
|
7300
7442
|
helper can also be used with `unless`.
|
7301
7443
|
|
7302
7444
|
@method unless
|
7303
|
-
@for Ember.
|
7445
|
+
@for Ember.Templates.helpers
|
7304
7446
|
@public
|
7305
7447
|
*/
|
7306
7448
|
function unlessHelper(params, hash, options) {
|
@@ -7332,7 +7474,7 @@ enifed("ember-htmlbars/helpers/if_unless", ["exports", "ember-metal/core", "embe
|
|
7332
7474
|
});
|
7333
7475
|
/**
|
7334
7476
|
@module ember
|
7335
|
-
@submodule ember-
|
7477
|
+
@submodule ember-templates
|
7336
7478
|
*/
|
7337
7479
|
|
7338
7480
|
// Ember.assert
|
@@ -7341,32 +7483,37 @@ enifed('ember-htmlbars/helpers/loc', ['exports', 'ember-runtime/system/string'],
|
|
7341
7483
|
|
7342
7484
|
/**
|
7343
7485
|
@module ember
|
7344
|
-
@submodule ember-
|
7486
|
+
@submodule ember-templates
|
7345
7487
|
*/
|
7346
7488
|
|
7347
7489
|
/**
|
7348
7490
|
Calls [Ember.String.loc](/api/classes/Ember.String.html#method_loc) with the
|
7349
|
-
provided string.
|
7350
|
-
|
7491
|
+
provided string. This is a convenient way to localize text within a template.
|
7492
|
+
For example:
|
7493
|
+
|
7351
7494
|
```javascript
|
7352
7495
|
Ember.STRINGS = {
|
7353
7496
|
'_welcome_': 'Bonjour'
|
7354
7497
|
};
|
7355
7498
|
```
|
7499
|
+
|
7356
7500
|
```handlebars
|
7357
7501
|
<div class='message'>
|
7358
7502
|
{{loc '_welcome_'}}
|
7359
7503
|
</div>
|
7360
7504
|
```
|
7505
|
+
|
7361
7506
|
```html
|
7362
7507
|
<div class='message'>
|
7363
7508
|
Bonjour
|
7364
7509
|
</div>
|
7365
7510
|
```
|
7511
|
+
|
7366
7512
|
See [Ember.String.loc](/api/classes/Ember.String.html#method_loc) for how to
|
7367
7513
|
set up localized string references.
|
7514
|
+
|
7368
7515
|
@method loc
|
7369
|
-
@for Ember.
|
7516
|
+
@for Ember.Templates.helpers
|
7370
7517
|
@param {String} str The string to format
|
7371
7518
|
@see {Ember.String#loc}
|
7372
7519
|
@public
|
@@ -7382,11 +7529,13 @@ enifed("ember-htmlbars/helpers/log", ["exports", "ember-metal/logger"], function
|
|
7382
7529
|
/**
|
7383
7530
|
`log` allows you to output the value of variables in the current rendering
|
7384
7531
|
context. `log` also accepts primitive types such as strings or numbers.
|
7532
|
+
|
7385
7533
|
```handlebars
|
7386
7534
|
{{log "myVariable:" myVariable }}
|
7387
7535
|
```
|
7536
|
+
|
7388
7537
|
@method log
|
7389
|
-
@for Ember.
|
7538
|
+
@for Ember.Templates.helpers
|
7390
7539
|
@param {*} values
|
7391
7540
|
@public
|
7392
7541
|
*/
|
@@ -7397,7 +7546,7 @@ enifed("ember-htmlbars/helpers/log", ["exports", "ember-metal/logger"], function
|
|
7397
7546
|
});
|
7398
7547
|
/**
|
7399
7548
|
@module ember
|
7400
|
-
@submodule ember-
|
7549
|
+
@submodule ember-templates
|
7401
7550
|
*/
|
7402
7551
|
enifed("ember-htmlbars/helpers/with", ["exports", "ember-htmlbars/utils/normalize-self", "ember-views/streams/should_display"], function (exports, _emberHtmlbarsUtilsNormalizeSelf, _emberViewsStreamsShould_display) {
|
7403
7552
|
exports["default"] = withHelper;
|
@@ -7429,7 +7578,7 @@ enifed("ember-htmlbars/helpers/with", ["exports", "ember-htmlbars/utils/normaliz
|
|
7429
7578
|
the first part of the property path, `foo`. Instead, use `{{#with foo.bar as |baz|}}`.
|
7430
7579
|
|
7431
7580
|
@method with
|
7432
|
-
@for Ember.
|
7581
|
+
@for Ember.Templates.helpers
|
7433
7582
|
@param {Object} options
|
7434
7583
|
@return {String} HTML string
|
7435
7584
|
@public
|
@@ -7464,7 +7613,7 @@ enifed("ember-htmlbars/helpers/with", ["exports", "ember-htmlbars/utils/normaliz
|
|
7464
7613
|
});
|
7465
7614
|
/**
|
7466
7615
|
@module ember
|
7467
|
-
@submodule ember-
|
7616
|
+
@submodule ember-templates
|
7468
7617
|
*/
|
7469
7618
|
enifed("ember-htmlbars/hooks/bind-local", ["exports", "ember-metal/streams/stream", "ember-metal/streams/proxy-stream"], function (exports, _emberMetalStreamsStream, _emberMetalStreamsProxyStream) {
|
7470
7619
|
exports["default"] = bindLocal;
|
@@ -7507,7 +7656,6 @@ enifed("ember-htmlbars/hooks/bind-self", ["exports", "ember-metal/streams/proxy-
|
|
7507
7656
|
}
|
7508
7657
|
|
7509
7658
|
if (self && self.isView) {
|
7510
|
-
scope.view = self;
|
7511
7659
|
newStream(scope.locals, "view", self, null);
|
7512
7660
|
newStream(scope.locals, "controller", scope.locals.view.getKey("controller"));
|
7513
7661
|
newStream(scope, "self", scope.locals.view.getKey("context"), null, true);
|
@@ -7664,13 +7812,59 @@ enifed("ember-htmlbars/hooks/concat", ["exports", "ember-metal/streams/utils"],
|
|
7664
7812
|
*/
|
7665
7813
|
enifed("ember-htmlbars/hooks/create-fresh-scope", ["exports"], function (exports) {
|
7666
7814
|
exports["default"] = createFreshScope;
|
7815
|
+
/*
|
7816
|
+
Ember's implementation of HTMLBars creates an enriched scope.
|
7817
|
+
|
7818
|
+
* self: same as HTMLBars, this field represents the dynamic lookup
|
7819
|
+
of root keys that are not special keywords or block arguments.
|
7820
|
+
* blocks: same as HTMLBars, a bundle of named blocks the layout
|
7821
|
+
can yield to.
|
7822
|
+
* component: indicates that the scope is the layout of a component,
|
7823
|
+
which is used to trigger lifecycle hooks for the component when
|
7824
|
+
one of the streams in its layout fires.
|
7825
|
+
* attrs: a map of key-value attributes sent in by the invoker of
|
7826
|
+
a template, and available in the component's layout.
|
7827
|
+
* locals: a map of locals, produced by block params (`as |a b|`)
|
7828
|
+
* localPresent: a map of available locals to avoid expensive
|
7829
|
+
`hasOwnProperty` checks.
|
7830
|
+
|
7831
|
+
The `self` field has two special meanings:
|
7832
|
+
|
7833
|
+
* If `self` is a view (`isView`), the actual HTMLBars `self` becomes
|
7834
|
+
the view's `context`. This is legacy semantics; components always
|
7835
|
+
use the component itself as the `this`.
|
7836
|
+
* If `self` is a view, two special locals are created: `view` and
|
7837
|
+
`controller`. These locals are legacy semantics.
|
7838
|
+
* If self has a `hasBoundController` property, it is coming from
|
7839
|
+
a legacy form of #with or #each
|
7840
|
+
(`{{#with something controller=someController}}`). This has
|
7841
|
+
the special effect of giving the child scope the supplied
|
7842
|
+
`controller` keyword, with an unrelated `self`. This is
|
7843
|
+
legacy functionality, as both the `view` and `controller`
|
7844
|
+
keywords have been deprecated.
|
7845
|
+
|
7846
|
+
**IMPORTANT**: There are two places in Ember where the ambient
|
7847
|
+
controller is looked up. Both of those places use the presence
|
7848
|
+
of `scope.locals.view` to indicate that the controller lookup
|
7849
|
+
should be dynamic off of the ambient view. If `scope.locals.view`
|
7850
|
+
does not exist, the code assumes that it is inside of a top-level
|
7851
|
+
template (without a view) and uses the `self` itself as the
|
7852
|
+
controller. This means that if you remove `scope.locals.view`
|
7853
|
+
(perhaps because we are finally ready to shed the view keyword),
|
7854
|
+
there may be unexpected consequences on controller semantics.
|
7855
|
+
If this happens to you, I hope you find this comment. - YK & TD
|
7856
|
+
|
7857
|
+
In practice, this means that with the exceptions of top-level
|
7858
|
+
view-less templates and the legacy `controller=foo` semantics,
|
7859
|
+
the controller hierarchy is managed dynamically by looking at
|
7860
|
+
the current view's `controller`.
|
7861
|
+
*/
|
7667
7862
|
|
7668
7863
|
function createFreshScope() {
|
7669
7864
|
return {
|
7670
7865
|
self: null,
|
7671
7866
|
blocks: {},
|
7672
7867
|
component: null,
|
7673
|
-
view: null,
|
7674
7868
|
attrs: null,
|
7675
7869
|
locals: {},
|
7676
7870
|
localPresent: {}
|
@@ -7701,10 +7895,9 @@ enifed("ember-htmlbars/hooks/did-cleanup-tree", ["exports"], function (exports)
|
|
7701
7895
|
exports["default"] = didCleanupTree;
|
7702
7896
|
|
7703
7897
|
function didCleanupTree(env) {
|
7704
|
-
|
7705
|
-
|
7706
|
-
|
7707
|
-
}
|
7898
|
+
// Once we have finsihed cleaning up the render node and sub-nodes, reset
|
7899
|
+
// state tracking which view those render nodes belonged to.
|
7900
|
+
env.view.ownerView._destroyingSubtreeForView = null;
|
7708
7901
|
}
|
7709
7902
|
});
|
7710
7903
|
enifed("ember-htmlbars/hooks/did-render-node", ["exports"], function (exports) {
|
@@ -7941,7 +8134,7 @@ enifed("ember-htmlbars/hooks/link-render-node", ["exports", "ember-htmlbars/util
|
|
7941
8134
|
case "each":
|
7942
8135
|
params[0] = eachParam(params[0]);break;
|
7943
8136
|
default:
|
7944
|
-
helper = _emberHtmlbarsSystemLookupHelper.findHelper(path,
|
8137
|
+
helper = _emberHtmlbarsSystemLookupHelper.findHelper(path, env.view, env);
|
7945
8138
|
|
7946
8139
|
if (helper && helper.isHandlebarsCompat && params[0]) {
|
7947
8140
|
params[0] = processHandlebarsCompatDepKeys(params[0], helper._dependentKeys);
|
@@ -8124,7 +8317,6 @@ enifed("ember-htmlbars/hooks/update-self", ["exports", "ember-metal/property_get
|
|
8124
8317
|
Ember.assert("BUG: scope.attrs and self.isView should not both be true", !(scope.attrs && self.isView));
|
8125
8318
|
|
8126
8319
|
if (self && self.isView) {
|
8127
|
-
scope.view = self;
|
8128
8320
|
_emberHtmlbarsUtilsUpdateScope["default"](scope.locals, "view", self, null);
|
8129
8321
|
_emberHtmlbarsUtilsUpdateScope["default"](scope, "self", _emberMetalProperty_get.get(self, "context"), null, true);
|
8130
8322
|
return;
|
@@ -8140,15 +8332,37 @@ enifed("ember-htmlbars/hooks/update-self", ["exports", "ember-metal/property_get
|
|
8140
8332
|
enifed("ember-htmlbars/hooks/will-cleanup-tree", ["exports"], function (exports) {
|
8141
8333
|
exports["default"] = willCleanupTree;
|
8142
8334
|
|
8143
|
-
function willCleanupTree(env
|
8144
|
-
var view =
|
8145
|
-
if (destroySelf && view && view.parentView) {
|
8146
|
-
view.parentView.removeChild(view);
|
8147
|
-
}
|
8335
|
+
function willCleanupTree(env) {
|
8336
|
+
var view = env.view;
|
8148
8337
|
|
8149
|
-
|
8150
|
-
|
8151
|
-
|
8338
|
+
// When we go to clean up the render node and all of its children, we may
|
8339
|
+
// encounter views/components associated with those nodes along the way. In
|
8340
|
+
// those cases, we need to make sure we need to sever the link between the
|
8341
|
+
// existing view hierarchy and those views.
|
8342
|
+
//
|
8343
|
+
// However, we do *not* need to remove the child views of child views, since
|
8344
|
+
// severing the connection to their parent effectively severs them from the
|
8345
|
+
// view graph.
|
8346
|
+
//
|
8347
|
+
// For example, imagine the following view graph:
|
8348
|
+
//
|
8349
|
+
// A
|
8350
|
+
// / \
|
8351
|
+
// B C
|
8352
|
+
// / \
|
8353
|
+
// D E
|
8354
|
+
//
|
8355
|
+
// If we are cleaning up the node for view C, we need to remove that view
|
8356
|
+
// from A's child views. However, we do not need to remove D and E from C's
|
8357
|
+
// child views, since removing C transitively removes D and E as well.
|
8358
|
+
//
|
8359
|
+
// To accomplish this, we track the nearest view to this render node on the
|
8360
|
+
// owner view, the root-most view in the graph (A in the example above). If
|
8361
|
+
// we detect a view that is a direct child of that view, we remove it from
|
8362
|
+
// the `childViews` array. Other parent/child view relationships are
|
8363
|
+
// untouched. This view is then cleared once cleanup is complete in
|
8364
|
+
// `didCleanupTree`.
|
8365
|
+
view.ownerView._destroyingSubtreeForView = view;
|
8152
8366
|
}
|
8153
8367
|
});
|
8154
8368
|
enifed("ember-htmlbars/keywords", ["exports", "htmlbars-runtime", "ember-metal/platform/create"], function (exports, _htmlbarsRuntime, _emberMetalPlatformCreate) {
|
@@ -8189,7 +8403,7 @@ enifed("ember-htmlbars/keywords/collection", ["exports", "ember-views/streams/ut
|
|
8189
8403
|
var read = env.hooks.getValue;
|
8190
8404
|
|
8191
8405
|
return _emberMetalMerge.assign({}, state, {
|
8192
|
-
parentView:
|
8406
|
+
parentView: env.view,
|
8193
8407
|
viewClassOrInstance: getView(read(params[0]), env.container)
|
8194
8408
|
});
|
8195
8409
|
},
|
@@ -8246,7 +8460,55 @@ enifed("ember-htmlbars/keywords/collection", ["exports", "ember-views/streams/ut
|
|
8246
8460
|
@module ember
|
8247
8461
|
@submodule ember-htmlbars
|
8248
8462
|
*/
|
8249
|
-
enifed(
|
8463
|
+
enifed('ember-htmlbars/keywords/component', ['exports', 'ember-metal/merge'], function (exports, _emberMetalMerge) {
|
8464
|
+
|
8465
|
+
/**
|
8466
|
+
The `{{component}}` helper lets you add instances of `Ember.Component` to a
|
8467
|
+
template. See [Ember.Component](/api/classes/Ember.Component.html) for
|
8468
|
+
additional information on how a `Component` functions.
|
8469
|
+
`{{component}}`'s primary use is for cases where you want to dynamically
|
8470
|
+
change which type of component is rendered as the state of your application
|
8471
|
+
changes. The provided block will be applied as the template for the component.
|
8472
|
+
Given an empty `<body>` the following template:
|
8473
|
+
|
8474
|
+
```handlebars
|
8475
|
+
{{! application.hbs }}
|
8476
|
+
{{component infographicComponentName}}
|
8477
|
+
```
|
8478
|
+
|
8479
|
+
And the following application code:
|
8480
|
+
|
8481
|
+
```javascript
|
8482
|
+
export default Ember.Controller.extend({
|
8483
|
+
infographicComponentName: computed('isMarketOpen', {
|
8484
|
+
get() {
|
8485
|
+
if (this.get('isMarketOpen')) {
|
8486
|
+
return 'live-updating-chart';
|
8487
|
+
} else {
|
8488
|
+
return 'market-close-summary';
|
8489
|
+
}
|
8490
|
+
}
|
8491
|
+
})
|
8492
|
+
});
|
8493
|
+
```
|
8494
|
+
|
8495
|
+
The `live-updating-chart` component will be appended when `isMarketOpen` is
|
8496
|
+
`true`, and the `market-close-summary` component will be appended when
|
8497
|
+
`isMarketOpen` is `false`. If the value changes while the app is running,
|
8498
|
+
the component will be automatically swapped out accordingly.
|
8499
|
+
Note: You should not use this helper when you are consistently rendering the same
|
8500
|
+
component. In that case, use standard component syntax, for example:
|
8501
|
+
|
8502
|
+
```handlebars
|
8503
|
+
{{! application.hbs }}
|
8504
|
+
{{live-updating-chart}}
|
8505
|
+
```
|
8506
|
+
|
8507
|
+
@method component
|
8508
|
+
@since 1.11.0
|
8509
|
+
@for Ember.Templates.helpers
|
8510
|
+
@public
|
8511
|
+
*/
|
8250
8512
|
exports["default"] = {
|
8251
8513
|
setupState: function (lastState, env, scope, params, hash) {
|
8252
8514
|
var componentPath = env.hooks.getValue(params[0]);
|
@@ -8285,6 +8547,11 @@ enifed("ember-htmlbars/keywords/component", ["exports", "ember-metal/merge"], fu
|
|
8285
8547
|
env.hooks.component(morph, env, scope, componentPath, params, hash, { "default": template, inverse: inverse }, visitor);
|
8286
8548
|
}
|
8287
8549
|
});
|
8550
|
+
/**
|
8551
|
+
@module ember
|
8552
|
+
@submodule ember-templates
|
8553
|
+
@public
|
8554
|
+
*/
|
8288
8555
|
enifed("ember-htmlbars/keywords/customized_outlet", ["exports", "ember-htmlbars/node-managers/view-node-manager", "ember-views/streams/utils", "ember-metal/streams/utils"], function (exports, _emberHtmlbarsNodeManagersViewNodeManager, _emberViewsStreamsUtils, _emberMetalStreamsUtils) {
|
8289
8556
|
exports["default"] = {
|
8290
8557
|
setupState: function (state, env, scope, params, hash) {
|
@@ -8352,7 +8619,7 @@ enifed("ember-htmlbars/keywords/debugger", ["exports", "ember-metal/logger"], fu
|
|
8352
8619
|
```
|
8353
8620
|
|
8354
8621
|
@method debugger
|
8355
|
-
@for Ember.
|
8622
|
+
@for Ember.Templates.helpers
|
8356
8623
|
@public
|
8357
8624
|
*/
|
8358
8625
|
|
@@ -8607,7 +8874,7 @@ enifed("ember-htmlbars/keywords/readonly", ["exports", "ember-htmlbars/keywords/
|
|
8607
8874
|
}
|
8608
8875
|
});
|
8609
8876
|
enifed("ember-htmlbars/keywords/real_outlet", ["exports", "ember-metal/property_get", "ember-htmlbars/node-managers/view-node-manager", "ember-htmlbars/templates/top-level-view"], function (exports, _emberMetalProperty_get, _emberHtmlbarsNodeManagersViewNodeManager, _emberHtmlbarsTemplatesTopLevelView) {
|
8610
|
-
_emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.
|
8877
|
+
_emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.4";
|
8611
8878
|
|
8612
8879
|
exports["default"] = {
|
8613
8880
|
willRender: function (renderNode, env) {
|
@@ -8806,11 +9073,11 @@ enifed("ember-htmlbars/keywords/view", ["exports", "ember-views/streams/utils",
|
|
8806
9073
|
|
8807
9074
|
// if parentView exists, use its controller (the default
|
8808
9075
|
// behavior), otherwise use `scope.self` as the controller
|
8809
|
-
var controller = scope.view ? null : read(scope.self);
|
9076
|
+
var controller = scope.locals.view ? null : read(scope.self);
|
8810
9077
|
|
8811
9078
|
return {
|
8812
9079
|
manager: state.manager,
|
8813
|
-
parentView:
|
9080
|
+
parentView: env.view,
|
8814
9081
|
controller: controller,
|
8815
9082
|
targetObject: targetObject,
|
8816
9083
|
viewClassOrInstance: viewClassOrInstance
|
@@ -8902,7 +9169,7 @@ enifed("ember-htmlbars/keywords/view", ["exports", "ember-views/streams/utils",
|
|
8902
9169
|
@module ember
|
8903
9170
|
@submodule ember-htmlbars
|
8904
9171
|
*/
|
8905
|
-
enifed(
|
9172
|
+
enifed('ember-htmlbars/keywords/with', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'htmlbars-runtime', 'ember-metal/streams/utils'], function (exports, _emberMetalCore, _emberMetalProperty_get, _htmlbarsRuntime, _emberMetalStreamsUtils) {
|
8906
9173
|
exports["default"] = {
|
8907
9174
|
setupState: function (state, env, scope, params, hash) {
|
8908
9175
|
var controller = hash.controller;
|
@@ -8910,8 +9177,14 @@ enifed("ember-htmlbars/keywords/with", ["exports", "htmlbars-runtime", "ember-me
|
|
8910
9177
|
if (controller) {
|
8911
9178
|
if (!state.controller) {
|
8912
9179
|
var context = params[0];
|
8913
|
-
var controllerFactory = env.container.lookupFactory(
|
8914
|
-
var parentController =
|
9180
|
+
var controllerFactory = env.container.lookupFactory('controller:' + controller);
|
9181
|
+
var parentController = null;
|
9182
|
+
|
9183
|
+
if (scope.locals.controller) {
|
9184
|
+
parentController = _emberMetalStreamsUtils.read(scope.locals.controller);
|
9185
|
+
} else if (scope.locals.view) {
|
9186
|
+
parentController = _emberMetalProperty_get.get(_emberMetalStreamsUtils.read(scope.locals.view), 'context');
|
9187
|
+
}
|
8915
9188
|
|
8916
9189
|
var controllerInstance = controllerFactory.create({
|
8917
9190
|
model: env.hooks.getValue(context),
|
@@ -8943,19 +9216,19 @@ enifed("ember-htmlbars/keywords/with", ["exports", "htmlbars-runtime", "ember-me
|
|
8943
9216
|
hash.controller = morph.state.controller;
|
8944
9217
|
}
|
8945
9218
|
|
8946
|
-
|
9219
|
+
_emberMetalCore["default"].assert('{{#with foo}} must be called with a single argument or the use the ' + '{{#with foo as bar}} syntax', params.length === 1);
|
8947
9220
|
|
8948
|
-
|
9221
|
+
_emberMetalCore["default"].assert('The {{#with}} helper must be called with a block', !!template);
|
8949
9222
|
|
8950
9223
|
if (template && template.arity === 0) {
|
8951
|
-
|
9224
|
+
_emberMetalCore["default"].deprecate('Using the context switching form of `{{with}}` is deprecated. ' + 'Please use the block param form (`{{#with bar as |foo|}}`) instead.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' });
|
8952
9225
|
}
|
8953
9226
|
|
8954
|
-
_htmlbarsRuntime.internal.continueBlock(morph, env, scope,
|
9227
|
+
_htmlbarsRuntime.internal.continueBlock(morph, env, scope, 'with', params, hash, template, inverse, visitor);
|
8955
9228
|
},
|
8956
9229
|
|
8957
9230
|
rerender: function (morph, env, scope, params, hash, template, inverse, visitor) {
|
8958
|
-
_htmlbarsRuntime.internal.continueBlock(morph, env, scope,
|
9231
|
+
_htmlbarsRuntime.internal.continueBlock(morph, env, scope, 'with', params, hash, template, inverse, visitor);
|
8959
9232
|
}
|
8960
9233
|
};
|
8961
9234
|
});
|
@@ -9030,14 +9303,13 @@ enifed("ember-htmlbars/morphs/morph", ["exports", "dom-helper", "ember-metal/pla
|
|
9030
9303
|
};
|
9031
9304
|
|
9032
9305
|
proto.cleanup = function () {
|
9033
|
-
var view;
|
9306
|
+
var view = this.emberView;
|
9034
9307
|
|
9035
|
-
if (view
|
9036
|
-
|
9037
|
-
|
9038
|
-
|
9039
|
-
|
9040
|
-
}
|
9308
|
+
if (view) {
|
9309
|
+
var parentView = view.parentView;
|
9310
|
+
|
9311
|
+
if (parentView && view.ownerView._destroyingSubtreeForView === parentView) {
|
9312
|
+
parentView.removeChild(view);
|
9041
9313
|
}
|
9042
9314
|
}
|
9043
9315
|
|
@@ -9332,7 +9604,7 @@ enifed("ember-htmlbars/node-managers/component-node-manager", ["exports", "ember
|
|
9332
9604
|
};
|
9333
9605
|
|
9334
9606
|
function createComponent(_component, isAngleBracket, _props, renderNode, env) {
|
9335
|
-
var attrs = arguments[5] === undefined ? {} : arguments[5];
|
9607
|
+
var attrs = arguments.length <= 5 || arguments[5] === undefined ? {} : arguments[5];
|
9336
9608
|
|
9337
9609
|
var props = _emberMetalMerge.assign({}, _props);
|
9338
9610
|
|
@@ -9367,6 +9639,7 @@ enifed("ember-htmlbars/node-managers/component-node-manager", ["exports", "ember
|
|
9367
9639
|
|
9368
9640
|
component._renderNode = renderNode;
|
9369
9641
|
renderNode.emberView = component;
|
9642
|
+
renderNode.buildChildEnv = buildChildEnv;
|
9370
9643
|
return component;
|
9371
9644
|
}
|
9372
9645
|
|
@@ -9421,6 +9694,10 @@ enifed("ember-htmlbars/node-managers/component-node-manager", ["exports", "ember
|
|
9421
9694
|
|
9422
9695
|
return target;
|
9423
9696
|
}
|
9697
|
+
|
9698
|
+
function buildChildEnv(state, env) {
|
9699
|
+
return env.childWithView(this.emberView);
|
9700
|
+
}
|
9424
9701
|
});
|
9425
9702
|
|
9426
9703
|
// In theory this should come through the env, but it should
|
@@ -9582,13 +9859,17 @@ enifed("ember-htmlbars/node-managers/view-node-manager", ["exports", "ember-meta
|
|
9582
9859
|
}
|
9583
9860
|
|
9584
9861
|
function createOrUpdateComponent(component, options, createOptions, renderNode, env) {
|
9585
|
-
var attrs = arguments[5] === undefined ? {} : arguments[5];
|
9862
|
+
var attrs = arguments.length <= 5 || arguments[5] === undefined ? {} : arguments[5];
|
9586
9863
|
|
9587
9864
|
var snapshot = takeSnapshot(attrs);
|
9588
9865
|
var props = _emberMetalMerge["default"]({}, options);
|
9589
9866
|
var defaultController = _emberViewsViewsView["default"].proto().controller;
|
9590
9867
|
var hasSuppliedController = "controller" in attrs || "controller" in props;
|
9591
9868
|
|
9869
|
+
if (!props.ownerView && options.parentView) {
|
9870
|
+
props.ownerView = options.parentView.ownerView;
|
9871
|
+
}
|
9872
|
+
|
9592
9873
|
props.attrs = snapshot;
|
9593
9874
|
if (component.create) {
|
9594
9875
|
var proto = component.proto();
|
@@ -9841,7 +10122,7 @@ enifed("ember-htmlbars/system/bootstrap", ["exports", "ember-metal/core", "ember
|
|
9841
10122
|
|
9842
10123
|
/**
|
9843
10124
|
@module ember
|
9844
|
-
@submodule ember-
|
10125
|
+
@submodule ember-htmlbars
|
9845
10126
|
*/
|
9846
10127
|
|
9847
10128
|
/**
|
@@ -9850,13 +10131,13 @@ enifed("ember-htmlbars/system/bootstrap", ["exports", "ember-metal/core", "ember
|
|
9850
10131
|
as as jQuery DOM-ready callback.
|
9851
10132
|
|
9852
10133
|
Script tags with `text/x-handlebars` will be compiled
|
9853
|
-
with Ember's
|
10134
|
+
with Ember's template compiler and are suitable for use as a view's template.
|
9854
10135
|
Those with type `text/x-raw-handlebars` will be compiled with regular
|
9855
10136
|
Handlebars and are suitable for use in views' computed properties.
|
9856
10137
|
|
9857
10138
|
@private
|
9858
10139
|
@method bootstrap
|
9859
|
-
@for Ember.
|
10140
|
+
@for Ember.HTMLBars
|
9860
10141
|
@static
|
9861
10142
|
@param ctx
|
9862
10143
|
*/
|
@@ -9975,14 +10256,9 @@ enifed("ember-htmlbars/system/dom-helper", ["exports", "dom-helper", "ember-html
|
|
9975
10256
|
enifed("ember-htmlbars/system/helper", ["exports"], function (exports) {
|
9976
10257
|
/**
|
9977
10258
|
@module ember
|
9978
|
-
@submodule ember-
|
10259
|
+
@submodule ember-templates
|
9979
10260
|
*/
|
9980
10261
|
|
9981
|
-
/**
|
9982
|
-
@class Helper
|
9983
|
-
@namespace Ember.HTMLBars
|
9984
|
-
@private
|
9985
|
-
*/
|
9986
10262
|
function Helper(helper) {
|
9987
10263
|
this.helperFunction = helper;
|
9988
10264
|
|
@@ -10086,7 +10362,7 @@ enifed("ember-htmlbars/system/lookup-helper", ["exports", "ember-metal/core", "e
|
|
10086
10362
|
@private
|
10087
10363
|
@method resolveHelper
|
10088
10364
|
@param {String} name the name of the helper to lookup
|
10089
|
-
@return {
|
10365
|
+
@return {Helper}
|
10090
10366
|
*/
|
10091
10367
|
|
10092
10368
|
function findHelper(name, view, env) {
|
@@ -10250,7 +10526,7 @@ enifed("ember-htmlbars/system/render-env", ["exports", "ember-htmlbars/env", "em
|
|
10250
10526
|
};
|
10251
10527
|
|
10252
10528
|
RenderEnv.prototype.childWithOutletState = function (outletState) {
|
10253
|
-
var hasParentOutlet = arguments[1] === undefined ? this.hasParentOutlet : arguments[1];
|
10529
|
+
var hasParentOutlet = arguments.length <= 1 || arguments[1] === undefined ? this.hasParentOutlet : arguments[1];
|
10254
10530
|
|
10255
10531
|
return new RenderEnv({
|
10256
10532
|
view: this.view,
|
@@ -11243,9 +11519,9 @@ enifed("ember-htmlbars/utils/normalize-self", ["exports"], function (exports) {
|
|
11243
11519
|
enifed("ember-htmlbars/utils/string", ["exports", "htmlbars-util", "ember-runtime/system/string"], function (exports, _htmlbarsUtil, _emberRuntimeSystemString) {
|
11244
11520
|
|
11245
11521
|
/**
|
11246
|
-
Mark a string as safe for unescaped output with
|
11247
|
-
return HTML from a
|
11248
|
-
ensure
|
11522
|
+
Mark a string as safe for unescaped output with Ember templates. If you
|
11523
|
+
return HTML from a helper, use this function to
|
11524
|
+
ensure Ember's rendering layer does not escape the HTML.
|
11249
11525
|
|
11250
11526
|
```javascript
|
11251
11527
|
Ember.String.htmlSafe('<div>someString</div>')
|
@@ -11270,18 +11546,6 @@ enifed("ember-htmlbars/utils/string", ["exports", "htmlbars-util", "ember-runtim
|
|
11270
11546
|
|
11271
11547
|
_emberRuntimeSystemString["default"].htmlSafe = htmlSafe;
|
11272
11548
|
if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.String) {
|
11273
|
-
|
11274
|
-
/**
|
11275
|
-
Mark a string as being safe for unescaped output with Handlebars.
|
11276
|
-
```javascript
|
11277
|
-
'<div>someString</div>'.htmlSafe()
|
11278
|
-
```
|
11279
|
-
See [Ember.String.htmlSafe](/api/classes/Ember.String.html#method_htmlSafe).
|
11280
|
-
@method htmlSafe
|
11281
|
-
@for String
|
11282
|
-
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
11283
|
-
@public
|
11284
|
-
*/
|
11285
11549
|
String.prototype.htmlSafe = function () {
|
11286
11550
|
return htmlSafe(this);
|
11287
11551
|
};
|
@@ -11735,20 +11999,20 @@ enifed("ember-metal", ["exports", "ember-metal/core", "ember-metal/merge", "embe
|
|
11735
11999
|
_emberMetalCore["default"].addObserver = _emberMetalObserver.addObserver;
|
11736
12000
|
_emberMetalCore["default"].observersFor = _emberMetalObserver.observersFor;
|
11737
12001
|
_emberMetalCore["default"].removeObserver = _emberMetalObserver.removeObserver;
|
11738
|
-
_emberMetalCore["default"].addBeforeObserver = _emberMetalObserver.
|
12002
|
+
_emberMetalCore["default"].addBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.addBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._addBeforeObserver);
|
11739
12003
|
_emberMetalCore["default"]._suspendBeforeObserver = _emberMetalObserver._suspendBeforeObserver;
|
11740
12004
|
_emberMetalCore["default"]._suspendBeforeObservers = _emberMetalObserver._suspendBeforeObservers;
|
11741
12005
|
_emberMetalCore["default"]._suspendObserver = _emberMetalObserver._suspendObserver;
|
11742
12006
|
_emberMetalCore["default"]._suspendObservers = _emberMetalObserver._suspendObservers;
|
11743
|
-
_emberMetalCore["default"].beforeObserversFor = _emberMetalObserver.
|
11744
|
-
_emberMetalCore["default"].removeBeforeObserver = _emberMetalObserver.
|
12007
|
+
_emberMetalCore["default"].beforeObserversFor = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserversFor is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._beforeObserversFor);
|
12008
|
+
_emberMetalCore["default"].removeBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.removeBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._removeBeforeObserver);
|
11745
12009
|
|
11746
12010
|
_emberMetalCore["default"].IS_BINDING = _emberMetalMixin.IS_BINDING;
|
11747
12011
|
_emberMetalCore["default"].required = _emberMetalMixin.required;
|
11748
12012
|
_emberMetalCore["default"].aliasMethod = _emberMetalMixin.aliasMethod;
|
11749
12013
|
_emberMetalCore["default"].observer = _emberMetalMixin.observer;
|
11750
|
-
_emberMetalCore["default"].immediateObserver = _emberMetalMixin.
|
11751
|
-
_emberMetalCore["default"].beforeObserver = _emberMetalMixin.
|
12014
|
+
_emberMetalCore["default"].immediateObserver = _emberMetalMixin._immediateObserver;
|
12015
|
+
_emberMetalCore["default"].beforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalMixin._beforeObserver);
|
11752
12016
|
_emberMetalCore["default"].mixin = _emberMetalMixin.mixin;
|
11753
12017
|
_emberMetalCore["default"].Mixin = _emberMetalMixin.Mixin;
|
11754
12018
|
|
@@ -14424,7 +14688,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
14424
14688
|
|
14425
14689
|
@class Ember
|
14426
14690
|
@static
|
14427
|
-
@version 1.13.
|
14691
|
+
@version 1.13.4
|
14428
14692
|
@public
|
14429
14693
|
*/
|
14430
14694
|
|
@@ -14456,11 +14720,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
14456
14720
|
|
14457
14721
|
@property VERSION
|
14458
14722
|
@type String
|
14459
|
-
@default '1.13.
|
14723
|
+
@default '1.13.4'
|
14460
14724
|
@static
|
14461
14725
|
@public
|
14462
14726
|
*/
|
14463
|
-
Ember.VERSION = '1.13.
|
14727
|
+
Ember.VERSION = '1.13.4';
|
14464
14728
|
|
14465
14729
|
/**
|
14466
14730
|
The hash of environment variables used to control various configuration
|
@@ -17057,8 +17321,8 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17057
17321
|
exports.required = required;
|
17058
17322
|
exports.aliasMethod = aliasMethod;
|
17059
17323
|
exports.observer = observer;
|
17060
|
-
exports.
|
17061
|
-
exports.
|
17324
|
+
exports._immediateObserver = _immediateObserver;
|
17325
|
+
exports._beforeObserver = _beforeObserver;
|
17062
17326
|
// Remove "use strict"; from transpiled module until
|
17063
17327
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
17064
17328
|
//
|
@@ -17450,13 +17714,13 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17450
17714
|
var prev = obj[key];
|
17451
17715
|
|
17452
17716
|
if ("function" === typeof prev) {
|
17453
|
-
updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", _emberMetalObserver.
|
17717
|
+
updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", _emberMetalObserver._removeBeforeObserver);
|
17454
17718
|
updateObserversAndListeners(obj, key, prev, "__ember_observes__", _emberMetalObserver.removeObserver);
|
17455
17719
|
updateObserversAndListeners(obj, key, prev, "__ember_listens__", _emberMetalEvents.removeListener);
|
17456
17720
|
}
|
17457
17721
|
|
17458
17722
|
if ("function" === typeof observerOrListener) {
|
17459
|
-
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", _emberMetalObserver.
|
17723
|
+
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", _emberMetalObserver._addBeforeObserver);
|
17460
17724
|
updateObserversAndListeners(obj, key, observerOrListener, "__ember_observes__", _emberMetalObserver.addObserver);
|
17461
17725
|
updateObserversAndListeners(obj, key, observerOrListener, "__ember_listens__", _emberMetalEvents.addListener);
|
17462
17726
|
}
|
@@ -17933,7 +18197,7 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17933
18197
|
Also available as `Function.prototype.observesImmediately` if prototype extensions are
|
17934
18198
|
enabled.
|
17935
18199
|
|
17936
|
-
@method
|
18200
|
+
@method _immediateObserver
|
17937
18201
|
@for Ember
|
17938
18202
|
@param {String} propertyNames*
|
17939
18203
|
@param {Function} func
|
@@ -17942,7 +18206,7 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17942
18206
|
@private
|
17943
18207
|
*/
|
17944
18208
|
|
17945
|
-
function
|
18209
|
+
function _immediateObserver() {
|
17946
18210
|
_emberMetalCore["default"].deprecate("Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead.");
|
17947
18211
|
|
17948
18212
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
@@ -17959,9 +18223,9 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17959
18223
|
Note, `@each.property` observer is called per each add or replace of an element
|
17960
18224
|
and it's not called with a specific enumeration item.
|
17961
18225
|
|
17962
|
-
A `
|
18226
|
+
A `_beforeObserver` fires before a property changes.
|
17963
18227
|
|
17964
|
-
A `
|
18228
|
+
A `_beforeObserver` is an alternative form of `.observesBefore()`.
|
17965
18229
|
|
17966
18230
|
```javascript
|
17967
18231
|
App.PersonView = Ember.View.extend({
|
@@ -17994,10 +18258,11 @@ enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge",
|
|
17994
18258
|
@param {String} propertyNames*
|
17995
18259
|
@param {Function} func
|
17996
18260
|
@return func
|
18261
|
+
@deprecated
|
17997
18262
|
@private
|
17998
18263
|
*/
|
17999
18264
|
|
18000
|
-
function
|
18265
|
+
function _beforeObserver() {
|
18001
18266
|
for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
18002
18267
|
args[_key5] = arguments[_key5];
|
18003
18268
|
}
|
@@ -18047,13 +18312,13 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
18047
18312
|
exports.addObserver = addObserver;
|
18048
18313
|
exports.observersFor = observersFor;
|
18049
18314
|
exports.removeObserver = removeObserver;
|
18050
|
-
exports.
|
18315
|
+
exports._addBeforeObserver = _addBeforeObserver;
|
18051
18316
|
exports._suspendBeforeObserver = _suspendBeforeObserver;
|
18052
18317
|
exports._suspendObserver = _suspendObserver;
|
18053
18318
|
exports._suspendBeforeObservers = _suspendBeforeObservers;
|
18054
18319
|
exports._suspendObservers = _suspendObservers;
|
18055
|
-
exports.
|
18056
|
-
exports.
|
18320
|
+
exports._beforeObserversFor = _beforeObserversFor;
|
18321
|
+
exports._removeBeforeObserver = _removeBeforeObserver;
|
18057
18322
|
|
18058
18323
|
/**
|
18059
18324
|
@module ember-metal
|
@@ -18109,16 +18374,17 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
18109
18374
|
}
|
18110
18375
|
|
18111
18376
|
/**
|
18112
|
-
@method
|
18377
|
+
@method _addBeforeObserver
|
18113
18378
|
@for Ember
|
18114
18379
|
@param obj
|
18115
18380
|
@param {String} path
|
18116
18381
|
@param {Object|Function} target
|
18117
18382
|
@param {Function|String} [method]
|
18383
|
+
@deprecated
|
18118
18384
|
@private
|
18119
18385
|
*/
|
18120
18386
|
|
18121
|
-
function
|
18387
|
+
function _addBeforeObserver(obj, path, target, method) {
|
18122
18388
|
_emberMetalEvents.addListener(obj, beforeEvent(path), target, method);
|
18123
18389
|
_emberMetalWatching.watch(obj, path);
|
18124
18390
|
|
@@ -18148,7 +18414,7 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
18148
18414
|
return _emberMetalEvents.suspendListeners(obj, events, target, method, callback);
|
18149
18415
|
}
|
18150
18416
|
|
18151
|
-
function
|
18417
|
+
function _beforeObserversFor(obj, path) {
|
18152
18418
|
return _emberMetalEvents.listenersFor(obj, beforeEvent(path));
|
18153
18419
|
}
|
18154
18420
|
|
@@ -18159,10 +18425,11 @@ enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/
|
|
18159
18425
|
@param {String} path
|
18160
18426
|
@param {Object|Function} target
|
18161
18427
|
@param {Function|String} [method]
|
18428
|
+
@deprecated
|
18162
18429
|
@private
|
18163
18430
|
*/
|
18164
18431
|
|
18165
|
-
function
|
18432
|
+
function _removeBeforeObserver(obj, path, target, method) {
|
18166
18433
|
_emberMetalWatching.unwatch(obj, path);
|
18167
18434
|
_emberMetalEvents.removeListener(obj, beforeEvent(path), target, method);
|
18168
18435
|
|
@@ -22309,17 +22576,19 @@ enifed("ember-routing-htmlbars/helpers/query-params", ["exports", "ember-metal/c
|
|
22309
22576
|
exports.queryParamsHelper = queryParamsHelper;
|
22310
22577
|
|
22311
22578
|
/**
|
22312
|
-
This is a
|
22579
|
+
This is a helper to be used in conjunction with the link-to helper.
|
22313
22580
|
It will supply url query parameters to the target route.
|
22314
22581
|
|
22315
22582
|
Example
|
22316
22583
|
|
22584
|
+
```handlebars
|
22317
22585
|
{{#link-to 'posts' (query-params direction="asc")}}Sort{{/link-to}}
|
22586
|
+
```
|
22318
22587
|
|
22319
22588
|
@method query-params
|
22320
|
-
@for Ember.
|
22589
|
+
@for Ember.Templates.helpers
|
22321
22590
|
@param {Object} hash takes a hash of query parameters
|
22322
|
-
@return {
|
22591
|
+
@return {Object} A `QueryParams` object for `{{link-to}}`
|
22323
22592
|
@public
|
22324
22593
|
*/
|
22325
22594
|
|
@@ -22340,60 +22609,151 @@ enifed("ember-routing-htmlbars/helpers/query-params", ["exports", "ember-metal/c
|
|
22340
22609
|
enifed("ember-routing-htmlbars/keywords/action", ["exports", "htmlbars-runtime/hooks", "ember-routing-htmlbars/keywords/closure-action"], function (exports, _htmlbarsRuntimeHooks, _emberRoutingHtmlbarsKeywordsClosureAction) {
|
22341
22610
|
|
22342
22611
|
/**
|
22343
|
-
The `{{action}}` helper provides a
|
22344
|
-
|
22345
|
-
|
22612
|
+
The `{{action}}` helper provides a way to pass triggers for behavior (usually
|
22613
|
+
just a function) between components, and into components from controllers.
|
22614
|
+
|
22615
|
+
### Passing functions with the action helper
|
22346
22616
|
|
22347
|
-
|
22348
|
-
to
|
22617
|
+
There are three contexts an action helper can be used in. The first two
|
22618
|
+
contexts to discuss are attribute context, and Handlebars value context.
|
22349
22619
|
|
22350
|
-
|
22620
|
+
```handlebars
|
22621
|
+
{{! An example of attribute context }}
|
22622
|
+
<div onclick={{action "save"}}></div>
|
22623
|
+
{{! Examples of Handlebars value context }}
|
22624
|
+
{{input on-input=(action "save")}}
|
22625
|
+
{{yield (action "refreshData") andAnotherParam}}
|
22626
|
+
```
|
22351
22627
|
|
22628
|
+
In these contexts,
|
22629
|
+
the helper is called a "closure action" helper. It's behavior is simple:
|
22630
|
+
If passed a function name, read that function off the `actions` property
|
22631
|
+
of the current context. Once that function is read (or if a function was
|
22632
|
+
passed), create a closure over that function and any arguments.
|
22352
22633
|
|
22353
|
-
|
22354
|
-
|
22634
|
+
The resulting value of an action helper used this way is simply a function.
|
22635
|
+
For example with this attribute context example:
|
22355
22636
|
|
22356
22637
|
```handlebars
|
22357
|
-
|
22358
|
-
|
22359
|
-
</div>
|
22638
|
+
{{! An example of attribute context }}
|
22639
|
+
<div onclick={{action "save"}}></div>
|
22360
22640
|
```
|
22361
22641
|
|
22362
|
-
|
22642
|
+
The resulting template render logic would be:
|
22363
22643
|
|
22364
|
-
```
|
22365
|
-
|
22644
|
+
```js
|
22645
|
+
var div = document.createElement('div');
|
22646
|
+
var actionFunction = (function(context){
|
22647
|
+
return function() {
|
22648
|
+
return context.actions.save.apply(context, arguments);
|
22649
|
+
};
|
22650
|
+
})(context);
|
22651
|
+
div.onclick = actionFunction;
|
22652
|
+
```
|
22653
|
+
|
22654
|
+
Thus when the div is clicked, the action on that context is called.
|
22655
|
+
Because the `actionFunction` is just a function, closure actions can be
|
22656
|
+
passed between components the still execute in the correct context.
|
22657
|
+
|
22658
|
+
Here is an example action handler on a component:
|
22659
|
+
|
22660
|
+
```js
|
22661
|
+
export default Ember.Component.extend({
|
22366
22662
|
actions: {
|
22367
|
-
|
22663
|
+
save(/* event *\/) {
|
22664
|
+
this.get('model').save();
|
22368
22665
|
}
|
22369
22666
|
}
|
22370
22667
|
});
|
22371
22668
|
```
|
22372
22669
|
|
22373
|
-
|
22670
|
+
Actions are always looked up on the `actions` property of the current context.
|
22671
|
+
This avoids collisions in the naming of common actions, such as `destroy`.
|
22374
22672
|
|
22375
|
-
|
22376
|
-
|
22377
|
-
|
22378
|
-
|
22379
|
-
|
22380
|
-
|
22673
|
+
Two options can be passed to the `action` helper when it is used in this way.
|
22674
|
+
|
22675
|
+
* `target=someProperty` will look to `someProperty` instead of the current
|
22676
|
+
context for the `actions` hash. This can be useful when targetting a
|
22677
|
+
service for actions.
|
22678
|
+
* `value="target.value"` will read the path `target.value` off the first
|
22679
|
+
argument to the action when it is called and rewrite the first argument
|
22680
|
+
to be that value. This is useful when attaching actions to event listeners.
|
22681
|
+
|
22682
|
+
### Invoking an action
|
22683
|
+
|
22684
|
+
Closure actions curry both their scope and any arguments. When invoked, any
|
22685
|
+
additional arguments are added to the already curried list.
|
22686
|
+
|
22687
|
+
Actions should be invoked using the [sendAction](/api/classes/Ember.Component.html#method_sendAction)
|
22688
|
+
method. The first argument to `sendAction` is the action to be called, and
|
22689
|
+
additional arguments are passed to the action function. This has interesting
|
22690
|
+
properties combined with currying of arguments. For example:
|
22691
|
+
|
22692
|
+
```js
|
22693
|
+
export default Ember.Component.extend({
|
22694
|
+
actions: {
|
22695
|
+
// Usage {{input on-input=(action (action 'setName' model) value="target.value")}}
|
22696
|
+
setName(model, name) {
|
22697
|
+
model.set('name', name);
|
22698
|
+
}
|
22699
|
+
}
|
22700
|
+
});
|
22701
|
+
```
|
22702
|
+
|
22703
|
+
The first argument (`model`) was curried over, and the run-time argument (`event`)
|
22704
|
+
becomes a second argument. Action calls be nested this way because each simply
|
22705
|
+
returns a function. Any function can be passed to the `{{action` helper, including
|
22706
|
+
other actions.
|
22707
|
+
|
22708
|
+
Actions invoked with `sendAction` have the same currying behavior as demonstrated
|
22709
|
+
with `on-input` above. For example:
|
22710
|
+
|
22711
|
+
```js
|
22712
|
+
export default Ember.Component.extend({
|
22713
|
+
actions: {
|
22714
|
+
setName(model, name) {
|
22715
|
+
model.set('name', name);
|
22716
|
+
}
|
22717
|
+
}
|
22718
|
+
});
|
22719
|
+
```
|
22720
|
+
|
22721
|
+
```handlebars
|
22722
|
+
{{my-input submit=(action 'setName' model)}}
|
22723
|
+
```
|
22724
|
+
|
22725
|
+
```js
|
22726
|
+
// app/components/my-component.js
|
22727
|
+
export default Ember.Component.extend({
|
22728
|
+
click() {
|
22729
|
+
// Note that model is not passed, it was curried in the template
|
22730
|
+
this.sendAction('submit', 'bob');
|
22731
|
+
}
|
22732
|
+
});
|
22381
22733
|
```
|
22382
22734
|
|
22383
|
-
|
22384
|
-
`App.ApplicationController`. In this case, no additional parameters will be passed.
|
22735
|
+
### Attaching actions to DOM
|
22385
22736
|
|
22386
|
-
|
22737
|
+
The third context the `{{action` helper can be used in we call "element space".
|
22738
|
+
For example:
|
22387
22739
|
|
22388
22740
|
```handlebars
|
22389
|
-
|
22741
|
+
{{! An example of element space }}
|
22742
|
+
<div {{action "save"}}></div>
|
22390
22743
|
```
|
22391
22744
|
|
22392
|
-
|
22393
|
-
|
22745
|
+
Used this way, the `{{action}}` helper provides a useful shortcut for
|
22746
|
+
registering an HTML element within a template for a single DOM event and
|
22747
|
+
forwarding that interaction to the template's context (controller or component).
|
22748
|
+
|
22749
|
+
If the context of a template is a controller, actions used this way will
|
22750
|
+
bubble to routes when the controller does not implement the specified action.
|
22751
|
+
Once an action hits a route, it will bubble through the route hierarchy.
|
22394
22752
|
|
22395
22753
|
### Event Propagation
|
22396
22754
|
|
22755
|
+
`{{action` helpers called in element space can control event bubbling.
|
22756
|
+
|
22397
22757
|
Events triggered through the action helper will automatically have
|
22398
22758
|
`.preventDefault()` called on them. You do not need to do so in your event
|
22399
22759
|
handlers. If you need to allow event propagation (to handle file inputs for
|
@@ -22418,20 +22778,24 @@ enifed("ember-routing-htmlbars/keywords/action", ["exports", "htmlbars-runtime/h
|
|
22418
22778
|
|
22419
22779
|
### Specifying DOM event type
|
22420
22780
|
|
22781
|
+
`{{action` helpers called in element space can specify an event type.
|
22782
|
+
|
22421
22783
|
By default the `{{action}}` helper registers for DOM `click` events. You can
|
22422
22784
|
supply an `on` option to the helper to specify a different DOM event name:
|
22423
22785
|
|
22424
22786
|
```handlebars
|
22425
|
-
<div {{action "anActionName" on="
|
22787
|
+
<div {{action "anActionName" on="double-click"}}>
|
22426
22788
|
click me
|
22427
22789
|
</div>
|
22428
22790
|
```
|
22429
22791
|
|
22430
|
-
See
|
22792
|
+
See [Event Names](/api/classes/Ember.View.html#toc_event-names) for a list of
|
22431
22793
|
acceptable DOM event names.
|
22432
22794
|
|
22433
22795
|
### Specifying whitelisted modifier keys
|
22434
22796
|
|
22797
|
+
`{{action` helpers called in element space can specify modifier keys.
|
22798
|
+
|
22435
22799
|
By default the `{{action}}` helper will ignore click event with pressed modifier
|
22436
22800
|
keys. You can supply an `allowedKeys` option to specify which keys should not be ignored.
|
22437
22801
|
|
@@ -22453,51 +22817,26 @@ enifed("ember-routing-htmlbars/keywords/action", ["exports", "htmlbars-runtime/h
|
|
22453
22817
|
|
22454
22818
|
### Specifying a Target
|
22455
22819
|
|
22456
|
-
|
22457
|
-
|
22458
|
-
In a typical Ember application, where templates are managed through use of the
|
22459
|
-
`{{outlet}}` helper, actions will bubble to the current controller, then
|
22460
|
-
to the current route, and then up the route hierarchy.
|
22461
|
-
|
22462
|
-
Alternatively, a `target` option can be provided to the helper to change
|
22820
|
+
A `target` option can be provided to the helper to change
|
22463
22821
|
which object will receive the method call. This option must be a path
|
22464
22822
|
to an object, accessible in the current context:
|
22465
22823
|
|
22466
22824
|
```handlebars
|
22467
|
-
{{!
|
22468
|
-
<div {{action "anActionName" target=
|
22825
|
+
{{! app/templates/application.hbs }}
|
22826
|
+
<div {{action "anActionName" target=someService}}>
|
22469
22827
|
click me
|
22470
22828
|
</div>
|
22471
22829
|
```
|
22472
22830
|
|
22473
22831
|
```javascript
|
22474
|
-
|
22475
|
-
|
22476
|
-
|
22477
|
-
}
|
22832
|
+
// app/controllers/application.js
|
22833
|
+
export default Ember.Controller.extend({
|
22834
|
+
someService: Ember.inject.service()
|
22478
22835
|
});
|
22479
|
-
|
22480
22836
|
```
|
22481
22837
|
|
22482
|
-
### Additional Parameters
|
22483
|
-
|
22484
|
-
You may specify additional parameters to the `{{action}}` helper. These
|
22485
|
-
parameters are passed along as the arguments to the JavaScript function
|
22486
|
-
implementing the action.
|
22487
|
-
|
22488
|
-
```handlebars
|
22489
|
-
{{#each people as |person|}}
|
22490
|
-
<div {{action "edit" person}}>
|
22491
|
-
click me
|
22492
|
-
</div>
|
22493
|
-
{{/each}}
|
22494
|
-
```
|
22495
|
-
|
22496
|
-
Clicking "click me" will trigger the `edit` method on the current controller
|
22497
|
-
with the value of `person` as a parameter.
|
22498
|
-
|
22499
22838
|
@method action
|
22500
|
-
@for Ember.
|
22839
|
+
@for Ember.Templates.helpers
|
22501
22840
|
@public
|
22502
22841
|
*/
|
22503
22842
|
|
@@ -22513,7 +22852,7 @@ enifed("ember-routing-htmlbars/keywords/action", ["exports", "htmlbars-runtime/h
|
|
22513
22852
|
});
|
22514
22853
|
/**
|
22515
22854
|
@module ember
|
22516
|
-
@submodule ember-
|
22855
|
+
@submodule ember-templates
|
22517
22856
|
*/
|
22518
22857
|
enifed("ember-routing-htmlbars/keywords/closure-action", ["exports", "ember-metal/streams/stream", "ember-metal/array", "ember-metal/streams/utils", "ember-metal/keys", "ember-metal/utils", "ember-metal/property_get", "ember-metal/error"], function (exports, _emberMetalStreamsStream, _emberMetalArray, _emberMetalStreamsUtils, _emberMetalKeys, _emberMetalUtils, _emberMetalProperty_get, _emberMetalError) {
|
22519
22858
|
exports["default"] = closureAction;
|
@@ -23030,7 +23369,7 @@ enifed("ember-routing-htmlbars/keywords/link-to", ["exports", "ember-metal/strea
|
|
23030
23369
|
```
|
23031
23370
|
|
23032
23371
|
@method link-to
|
23033
|
-
@for Ember.
|
23372
|
+
@for Ember.Templates.helpers
|
23034
23373
|
@param {String} routeName
|
23035
23374
|
@param {Object} [context]*
|
23036
23375
|
@param [options] {Object} Handlebars key/value pairs of options, you can override any property of Ember.LinkComponent
|
@@ -23097,7 +23436,7 @@ enifed("ember-routing-htmlbars/keywords/render", ["exports", "ember-metal/core",
|
|
23097
23436
|
_emberMetalCore["default"].assert("The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === "string");
|
23098
23437
|
|
23099
23438
|
return {
|
23100
|
-
parentView:
|
23439
|
+
parentView: env.view,
|
23101
23440
|
manager: prevState.manager,
|
23102
23441
|
controller: prevState.controller,
|
23103
23442
|
childOutletState: childOutletState(name, env)
|
@@ -23313,7 +23652,7 @@ enifed("ember-routing-views", ["exports", "ember-metal/core", "ember-routing-vie
|
|
23313
23652
|
@submodule ember-routing-views
|
23314
23653
|
*/
|
23315
23654
|
enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-views/system/utils", "ember-views/views/component", "ember-runtime/inject", "ember-runtime/mixins/controller", "ember-htmlbars/templates/link-to"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberViewsSystemUtils, _emberViewsViewsComponent, _emberRuntimeInject, _emberRuntimeMixinsController, _emberHtmlbarsTemplatesLinkTo) {
|
23316
|
-
_emberHtmlbarsTemplatesLinkTo["default"].meta.revision = "Ember@1.13.
|
23655
|
+
_emberHtmlbarsTemplatesLinkTo["default"].meta.revision = "Ember@1.13.4";
|
23317
23656
|
|
23318
23657
|
var linkComponentClassNameBindings = ["active", "loading", "disabled"];
|
23319
23658
|
if (_emberMetalCore["default"].FEATURES.isEnabled("ember-routing-transitioning-classes")) {
|
@@ -23657,7 +23996,7 @@ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-
|
|
23657
23996
|
if (lastParam && lastParam.isQueryParams) {
|
23658
23997
|
params.pop();
|
23659
23998
|
}
|
23660
|
-
var onlyQueryParamsSupplied = params.length === 0;
|
23999
|
+
var onlyQueryParamsSupplied = this.attrs.hasBlock ? params.length === 0 : params.length === 1;
|
23661
24000
|
if (onlyQueryParamsSupplied) {
|
23662
24001
|
var appController = this.container.lookup("controller:application");
|
23663
24002
|
if (appController) {
|
@@ -23844,7 +24183,7 @@ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-
|
|
23844
24183
|
|
23845
24184
|
// FEATURES, Logger, assert
|
23846
24185
|
enifed("ember-routing-views/views/outlet", ["exports", "ember-views/views/view", "ember-htmlbars/templates/top-level-view"], function (exports, _emberViewsViewsView, _emberHtmlbarsTemplatesTopLevelView) {
|
23847
|
-
_emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.
|
24186
|
+
_emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.4";
|
23848
24187
|
|
23849
24188
|
var CoreOutletView = _emberViewsViewsView["default"].extend({
|
23850
24189
|
defaultTemplate: _emberHtmlbarsTemplatesTopLevelView["default"],
|
@@ -26670,7 +27009,7 @@ enifed("ember-routing/system/route", ["exports", "ember-metal/core", "ember-meta
|
|
26670
27009
|
args[_key] = arguments[_key];
|
26671
27010
|
}
|
26672
27011
|
|
26673
|
-
if (this.router || !_emberMetalCore["default"].testing) {
|
27012
|
+
if (this.router && this.router.router || !_emberMetalCore["default"].testing) {
|
26674
27013
|
var _router;
|
26675
27014
|
|
26676
27015
|
(_router = this.router).send.apply(_router, args);
|
@@ -26892,6 +27231,10 @@ enifed("ember-routing/system/route", ["exports", "ember-metal/core", "ember-meta
|
|
26892
27231
|
this.transitionTo('post', thePost);
|
26893
27232
|
// integer passed in, model hook is called
|
26894
27233
|
this.transitionTo('post', 1);
|
27234
|
+
// model id passed in, model hook is called
|
27235
|
+
// useful for forcing the hook to execute
|
27236
|
+
thePost = store.find('post', 1);
|
27237
|
+
this.transitionTo('post', thePost.id);
|
26895
27238
|
```
|
26896
27239
|
This hook follows the asynchronous/promise semantics
|
26897
27240
|
described in the documentation for `beforeModel`. In particular,
|
@@ -29305,7 +29648,7 @@ enifed('ember-runtime/computed/reduce_computed', ['exports', 'ember-metal/core',
|
|
29305
29648
|
observerContexts[index] = observerContext;
|
29306
29649
|
|
29307
29650
|
_emberMetalEnumerable_utils.forEach(itemPropertyKeys, function (propertyKey) {
|
29308
|
-
_emberMetalObserver.
|
29651
|
+
_emberMetalObserver._addBeforeObserver(item, propertyKey, this, observerContext.beforeObserver);
|
29309
29652
|
_emberMetalObserver.addObserver(item, propertyKey, this, observerContext.observer);
|
29310
29653
|
}, this);
|
29311
29654
|
}, this);
|
@@ -29332,7 +29675,7 @@ enifed('ember-runtime/computed/reduce_computed', ['exports', 'ember-metal/core',
|
|
29332
29675
|
item = observerContext.item;
|
29333
29676
|
|
29334
29677
|
_emberMetalEnumerable_utils.forEach(itemPropertyKeys, function (propertyKey) {
|
29335
|
-
_emberMetalObserver.
|
29678
|
+
_emberMetalObserver._removeBeforeObserver(item, propertyKey, dependentArrayObserver, beforeObserver);
|
29336
29679
|
_emberMetalObserver.removeObserver(item, propertyKey, dependentArrayObserver, observer);
|
29337
29680
|
});
|
29338
29681
|
});
|
@@ -29422,7 +29765,7 @@ enifed('ember-runtime/computed/reduce_computed', ['exports', 'ember-metal/core',
|
|
29422
29765
|
|
29423
29766
|
function removeObservers(propertyKey) {
|
29424
29767
|
observerContexts[sliceIndex].destroyed = true;
|
29425
|
-
_emberMetalObserver.
|
29768
|
+
_emberMetalObserver._removeBeforeObserver(item, propertyKey, this, observerContexts[sliceIndex].beforeObserver);
|
29426
29769
|
_emberMetalObserver.removeObserver(item, propertyKey, this, observerContexts[sliceIndex].observer);
|
29427
29770
|
}
|
29428
29771
|
|
@@ -29463,7 +29806,7 @@ enifed('ember-runtime/computed/reduce_computed', ['exports', 'ember-metal/core',
|
|
29463
29806
|
observerContexts[sliceIndex] = observerContext;
|
29464
29807
|
|
29465
29808
|
_emberMetalEnumerable_utils.forEach(itemPropertyKeys, function (propertyKey) {
|
29466
|
-
_emberMetalObserver.
|
29809
|
+
_emberMetalObserver._addBeforeObserver(item, propertyKey, this, observerContext.beforeObserver);
|
29467
29810
|
_emberMetalObserver.addObserver(item, propertyKey, this, observerContext.observer);
|
29468
29811
|
}, this);
|
29469
29812
|
}
|
@@ -31116,7 +31459,8 @@ enifed('ember-runtime/controllers/array_controller', ['exports', 'ember-metal/co
|
|
31116
31459
|
},
|
31117
31460
|
|
31118
31461
|
init: function () {
|
31119
|
-
_emberMetalCore["default"].deprecate(arrayControllerDeprecation);
|
31462
|
+
_emberMetalCore["default"].deprecate(arrayControllerDeprecation, this.isGenerated);
|
31463
|
+
|
31120
31464
|
this._super.apply(this, arguments);
|
31121
31465
|
this._subControllers = [];
|
31122
31466
|
},
|
@@ -31497,8 +31841,7 @@ enifed('ember-runtime/ext/function', ['exports', 'ember-metal/core', 'ember-meta
|
|
31497
31841
|
}.observes('value')
|
31498
31842
|
});
|
31499
31843
|
```
|
31500
|
-
In the future this method may become asynchronous.
|
31501
|
-
synchronous behavior, use `observesImmediately`.
|
31844
|
+
In the future this method may become asynchronous.
|
31502
31845
|
See `Ember.observer`.
|
31503
31846
|
@method observes
|
31504
31847
|
@for Function
|
@@ -31513,6 +31856,19 @@ enifed('ember-runtime/ext/function', ['exports', 'ember-metal/core', 'ember-meta
|
|
31513
31856
|
return _emberMetalMixin.observer.apply(this, args);
|
31514
31857
|
};
|
31515
31858
|
|
31859
|
+
FunctionPrototype._observesImmediately = function () {
|
31860
|
+
_emberMetalCore["default"].assert('Immediate observers must observe internal properties only, ' + 'not properties on other objects.', function checkIsInternalProperty() {
|
31861
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
31862
|
+
if (arguments[i].indexOf('.') !== -1) {
|
31863
|
+
return false;
|
31864
|
+
}
|
31865
|
+
}
|
31866
|
+
return true;
|
31867
|
+
});
|
31868
|
+
|
31869
|
+
// observes handles property expansion
|
31870
|
+
return this.observes.apply(this, arguments);
|
31871
|
+
};
|
31516
31872
|
/**
|
31517
31873
|
The `observesImmediately` extension of Javascript's Function prototype is
|
31518
31874
|
available when `Ember.EXTEND_PROTOTYPES` or
|
@@ -31532,21 +31888,10 @@ enifed('ember-runtime/ext/function', ['exports', 'ember-metal/core', 'ember-meta
|
|
31532
31888
|
See `Ember.immediateObserver`.
|
31533
31889
|
@method observesImmediately
|
31534
31890
|
@for Function
|
31891
|
+
@deprecated
|
31535
31892
|
@private
|
31536
31893
|
*/
|
31537
|
-
FunctionPrototype.observesImmediately =
|
31538
|
-
_emberMetalCore["default"].assert('Immediate observers must observe internal properties only, ' + 'not properties on other objects.', function checkIsInternalProperty() {
|
31539
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
31540
|
-
if (arguments[i].indexOf('.') !== -1) {
|
31541
|
-
return false;
|
31542
|
-
}
|
31543
|
-
}
|
31544
|
-
return true;
|
31545
|
-
});
|
31546
|
-
|
31547
|
-
// observes handles property expansion
|
31548
|
-
return this.observes.apply(this, arguments);
|
31549
|
-
};
|
31894
|
+
FunctionPrototype.observesImmediately = _emberMetalCore["default"].deprecateFunc('Function#observesImmediately is deprecated. Use Function#observes instead', FunctionPrototype._observesImmediately);
|
31550
31895
|
|
31551
31896
|
/**
|
31552
31897
|
The `observesBefore` extension of Javascript's Function prototype is
|
@@ -31919,13 +32264,13 @@ enifed("ember-runtime/mixins/-proxy", ["exports", "ember-metal/core", "ember-met
|
|
31919
32264
|
|
31920
32265
|
willWatchProperty: function (key) {
|
31921
32266
|
var contentKey = "content." + key;
|
31922
|
-
_emberMetalObserver.
|
32267
|
+
_emberMetalObserver._addBeforeObserver(this, contentKey, null, contentPropertyWillChange);
|
31923
32268
|
_emberMetalObserver.addObserver(this, contentKey, null, contentPropertyDidChange);
|
31924
32269
|
},
|
31925
32270
|
|
31926
32271
|
didUnwatchProperty: function (key) {
|
31927
32272
|
var contentKey = "content." + key;
|
31928
|
-
_emberMetalObserver.
|
32273
|
+
_emberMetalObserver._removeBeforeObserver(this, contentKey, null, contentPropertyWillChange);
|
31929
32274
|
_emberMetalObserver.removeObserver(this, contentKey, null, contentPropertyDidChange);
|
31930
32275
|
},
|
31931
32276
|
|
@@ -33027,7 +33372,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33027
33372
|
```
|
33028
33373
|
@property firstObject
|
33029
33374
|
@return {Object} the object or undefined
|
33030
|
-
@
|
33375
|
+
@public
|
33031
33376
|
*/
|
33032
33377
|
firstObject: _emberMetalComputed.computed('[]', function () {
|
33033
33378
|
if (_emberMetalProperty_get.get(this, 'length') === 0) {
|
@@ -33055,7 +33400,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33055
33400
|
```
|
33056
33401
|
@property lastObject
|
33057
33402
|
@return {Object} the last object or undefined
|
33058
|
-
@
|
33403
|
+
@public
|
33059
33404
|
*/
|
33060
33405
|
lastObject: _emberMetalComputed.computed('[]', function () {
|
33061
33406
|
var len = _emberMetalProperty_get.get(this, 'length');
|
@@ -33091,7 +33436,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33091
33436
|
@method contains
|
33092
33437
|
@param {Object} obj The object to search for.
|
33093
33438
|
@return {Boolean} `true` if object is found in enumerable.
|
33094
|
-
@
|
33439
|
+
@public
|
33095
33440
|
*/
|
33096
33441
|
contains: function (obj) {
|
33097
33442
|
var found = this.find(function (item) {
|
@@ -33152,7 +33497,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33152
33497
|
@method getEach
|
33153
33498
|
@param {String} key name of the property
|
33154
33499
|
@return {Array} The mapped array.
|
33155
|
-
@
|
33500
|
+
@public
|
33156
33501
|
*/
|
33157
33502
|
getEach: _emberMetalMixin.aliasMethod('mapBy'),
|
33158
33503
|
|
@@ -33165,7 +33510,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33165
33510
|
@param {String} key The key to set
|
33166
33511
|
@param {Object} value The object to set
|
33167
33512
|
@return {Object} receiver
|
33168
|
-
@
|
33513
|
+
@public
|
33169
33514
|
*/
|
33170
33515
|
setEach: function (key, value) {
|
33171
33516
|
return this.forEach(function (item) {
|
@@ -33192,7 +33537,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33192
33537
|
@param {Function} callback The callback to execute
|
33193
33538
|
@param {Object} [target] The target object to use
|
33194
33539
|
@return {Array} The mapped array.
|
33195
|
-
@
|
33540
|
+
@public
|
33196
33541
|
*/
|
33197
33542
|
map: function (callback, target) {
|
33198
33543
|
var ret = _emberMetalCore["default"].A();
|
@@ -33210,7 +33555,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33210
33555
|
@method mapBy
|
33211
33556
|
@param {String} key name of the property
|
33212
33557
|
@return {Array} The mapped array.
|
33213
|
-
@
|
33558
|
+
@public
|
33214
33559
|
*/
|
33215
33560
|
mapBy: function (key) {
|
33216
33561
|
return this.map(function (next) {
|
@@ -33251,7 +33596,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33251
33596
|
@param {Function} callback The callback to execute
|
33252
33597
|
@param {Object} [target] The target object to use
|
33253
33598
|
@return {Array} A filtered array.
|
33254
|
-
@
|
33599
|
+
@public
|
33255
33600
|
*/
|
33256
33601
|
filter: function (callback, target) {
|
33257
33602
|
var ret = _emberMetalCore["default"].A();
|
@@ -33284,7 +33629,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33284
33629
|
@param {Function} callback The callback to execute
|
33285
33630
|
@param {Object} [target] The target object to use
|
33286
33631
|
@return {Array} A rejected array.
|
33287
|
-
|
33632
|
+
@public
|
33288
33633
|
*/
|
33289
33634
|
reject: function (callback, target) {
|
33290
33635
|
return this.filter(function () {
|
@@ -33300,7 +33645,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33300
33645
|
@param {String} key the property to test
|
33301
33646
|
@param {*} [value] optional value to test against.
|
33302
33647
|
@return {Array} filtered array
|
33303
|
-
@
|
33648
|
+
@public
|
33304
33649
|
*/
|
33305
33650
|
filterBy: function (key, value) {
|
33306
33651
|
return this.filter(iter.apply(this, arguments));
|
@@ -33327,7 +33672,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33327
33672
|
@param {String} key the property to test
|
33328
33673
|
@param {String} [value] optional value to test against.
|
33329
33674
|
@return {Array} rejected array
|
33330
|
-
@
|
33675
|
+
@public
|
33331
33676
|
*/
|
33332
33677
|
rejectBy: function (key, value) {
|
33333
33678
|
var exactValue = function (item) {
|
@@ -33377,7 +33722,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33377
33722
|
@param {Function} callback The callback to execute
|
33378
33723
|
@param {Object} [target] The target object to use
|
33379
33724
|
@return {Object} Found item or `undefined`.
|
33380
|
-
@
|
33725
|
+
@public
|
33381
33726
|
*/
|
33382
33727
|
find: function (callback, target) {
|
33383
33728
|
var len = _emberMetalProperty_get.get(this, 'length');
|
@@ -33416,7 +33761,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33416
33761
|
@param {String} key the property to test
|
33417
33762
|
@param {String} [value] optional value to test against.
|
33418
33763
|
@return {Object} found item or `undefined`
|
33419
|
-
@
|
33764
|
+
@public
|
33420
33765
|
*/
|
33421
33766
|
findBy: function (key, value) {
|
33422
33767
|
return this.find(iter.apply(this, arguments));
|
@@ -33475,7 +33820,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33475
33820
|
@param {String} [value] optional value to test against.
|
33476
33821
|
@deprecated Use `isEvery` instead
|
33477
33822
|
@return {Boolean}
|
33478
|
-
@
|
33823
|
+
@public
|
33479
33824
|
*/
|
33480
33825
|
everyBy: _emberMetalMixin.aliasMethod('isEvery'),
|
33481
33826
|
|
@@ -33490,11 +33835,12 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33490
33835
|
everyProperty: _emberMetalMixin.aliasMethod('isEvery'),
|
33491
33836
|
|
33492
33837
|
/**
|
33493
|
-
Returns `true` if the passed property resolves to
|
33494
|
-
the enumerable. This method is often simpler/faster
|
33838
|
+
Returns `true` if the passed property resolves to the value of the second
|
33839
|
+
argument for all items in the enumerable. This method is often simpler/faster
|
33840
|
+
than using a callback.
|
33495
33841
|
@method isEvery
|
33496
33842
|
@param {String} key the property to test
|
33497
|
-
@param {String} [value] optional value to test against.
|
33843
|
+
@param {String} [value] optional value to test against. Defaults to `true`
|
33498
33844
|
@return {Boolean}
|
33499
33845
|
@since 1.3.0
|
33500
33846
|
@public
|
@@ -33585,11 +33931,12 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
33585
33931
|
some: _emberMetalMixin.aliasMethod('any'),
|
33586
33932
|
|
33587
33933
|
/**
|
33588
|
-
Returns `true` if the passed property resolves to
|
33589
|
-
the enumerable. This method is often simpler/faster
|
33934
|
+
Returns `true` if the passed property resolves to the value of the second
|
33935
|
+
argument for any item in the enumerable. This method is often simpler/faster
|
33936
|
+
than using a callback.
|
33590
33937
|
@method isAny
|
33591
33938
|
@param {String} key the property to test
|
33592
|
-
@param {String} [value] optional value to test against.
|
33939
|
+
@param {String} [value] optional value to test against. Defaults to `true`
|
33593
33940
|
@return {Boolean}
|
33594
33941
|
@since 1.3.0
|
33595
33942
|
@private
|
@@ -34982,9 +35329,9 @@ enifed("ember-runtime/mixins/observable", ["exports", "ember-metal/core", "ember
|
|
34982
35329
|
return this;
|
34983
35330
|
},
|
34984
35331
|
|
34985
|
-
|
35332
|
+
_addBeforeObserver: function (key, target, method) {
|
34986
35333
|
_emberMetalCore["default"].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" });
|
34987
|
-
_emberMetalObserver.
|
35334
|
+
_emberMetalObserver._addBeforeObserver(this, key, target, method);
|
34988
35335
|
},
|
34989
35336
|
|
34990
35337
|
/**
|
@@ -35522,7 +35869,7 @@ enifed("ember-runtime/mixins/sortable", ["exports", "ember-metal/core", "ember-m
|
|
35522
35869
|
}
|
35523
35870
|
}),
|
35524
35871
|
|
35525
|
-
_contentWillChange: _emberMetalMixin.
|
35872
|
+
_contentWillChange: _emberMetalMixin._beforeObserver("content", function () {
|
35526
35873
|
var content = _emberMetalProperty_get.get(this, "content");
|
35527
35874
|
var sortProperties = _emberMetalProperty_get.get(this, "sortProperties");
|
35528
35875
|
|
@@ -35537,7 +35884,7 @@ enifed("ember-runtime/mixins/sortable", ["exports", "ember-metal/core", "ember-m
|
|
35537
35884
|
this._super.apply(this, arguments);
|
35538
35885
|
}),
|
35539
35886
|
|
35540
|
-
sortPropertiesWillChange: _emberMetalMixin.
|
35887
|
+
sortPropertiesWillChange: _emberMetalMixin._beforeObserver("sortProperties", function () {
|
35541
35888
|
this._lastSortAscending = undefined;
|
35542
35889
|
}),
|
35543
35890
|
|
@@ -35545,7 +35892,7 @@ enifed("ember-runtime/mixins/sortable", ["exports", "ember-metal/core", "ember-m
|
|
35545
35892
|
this._lastSortAscending = undefined;
|
35546
35893
|
}),
|
35547
35894
|
|
35548
|
-
sortAscendingWillChange: _emberMetalMixin.
|
35895
|
+
sortAscendingWillChange: _emberMetalMixin._beforeObserver("sortAscending", function () {
|
35549
35896
|
this._lastSortAscending = _emberMetalProperty_get.get(this, "sortAscending");
|
35550
35897
|
}),
|
35551
35898
|
|
@@ -35909,7 +36256,7 @@ enifed("ember-runtime/system/array_proxy", ["exports", "ember-metal/core", "embe
|
|
35909
36256
|
@private
|
35910
36257
|
@method _contentWillChange
|
35911
36258
|
*/
|
35912
|
-
_contentWillChange: _emberMetalMixin.
|
36259
|
+
_contentWillChange: _emberMetalMixin._beforeObserver("content", function () {
|
35913
36260
|
this._teardownContent();
|
35914
36261
|
}),
|
35915
36262
|
|
@@ -35972,7 +36319,7 @@ enifed("ember-runtime/system/array_proxy", ["exports", "ember-metal/core", "embe
|
|
35972
36319
|
}
|
35973
36320
|
},
|
35974
36321
|
|
35975
|
-
_arrangedContentWillChange: _emberMetalMixin.
|
36322
|
+
_arrangedContentWillChange: _emberMetalMixin._beforeObserver("arrangedContent", function () {
|
35976
36323
|
var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent");
|
35977
36324
|
var len = arrangedContent ? _emberMetalProperty_get.get(arrangedContent, "length") : 0;
|
35978
36325
|
|
@@ -37035,7 +37382,7 @@ enifed("ember-runtime/system/each_proxy", ["exports", "ember-metal/core", "ember
|
|
37035
37382
|
var item = content.objectAt(loc);
|
37036
37383
|
if (item) {
|
37037
37384
|
_emberMetalCore["default"].assert("When using @each to observe the array " + content + ", the array must return an object", _emberRuntimeUtils.typeOf(item) === "instance" || _emberRuntimeUtils.typeOf(item) === "object");
|
37038
|
-
_emberMetalObserver.
|
37385
|
+
_emberMetalObserver._addBeforeObserver(item, keyName, proxy, "contentKeyWillChange");
|
37039
37386
|
_emberMetalObserver.addObserver(item, keyName, proxy, "contentKeyDidChange");
|
37040
37387
|
|
37041
37388
|
// keep track of the index each item was found at so we can map
|
@@ -37061,7 +37408,7 @@ enifed("ember-runtime/system/each_proxy", ["exports", "ember-metal/core", "ember
|
|
37061
37408
|
while (--loc >= idx) {
|
37062
37409
|
var item = content.objectAt(loc);
|
37063
37410
|
if (item) {
|
37064
|
-
_emberMetalObserver.
|
37411
|
+
_emberMetalObserver._removeBeforeObserver(item, keyName, proxy, "contentKeyWillChange");
|
37065
37412
|
_emberMetalObserver.removeObserver(item, keyName, proxy, "contentKeyDidChange");
|
37066
37413
|
|
37067
37414
|
guid = _emberMetalUtils.guidFor(item);
|
@@ -37237,14 +37584,14 @@ enifed("ember-runtime/system/lazy_load", ["exports", "ember-metal/core", "ember-
|
|
37237
37584
|
var loaded = {};
|
37238
37585
|
|
37239
37586
|
/**
|
37240
|
-
Detects when a specific package of Ember (e.g. 'Ember.
|
37587
|
+
Detects when a specific package of Ember (e.g. 'Ember.Application')
|
37241
37588
|
has fully loaded and is available for extension.
|
37242
37589
|
|
37243
37590
|
The provided `callback` will be called with the `name` passed
|
37244
37591
|
resolved from a string into the object:
|
37245
37592
|
|
37246
37593
|
``` javascript
|
37247
|
-
Ember.onLoad('Ember.
|
37594
|
+
Ember.onLoad('Ember.Application' function(hbars) {
|
37248
37595
|
hbars.registerHelper(...);
|
37249
37596
|
});
|
37250
37597
|
```
|
@@ -37268,7 +37615,7 @@ enifed("ember-runtime/system/lazy_load", ["exports", "ember-metal/core", "ember-
|
|
37268
37615
|
}
|
37269
37616
|
|
37270
37617
|
/**
|
37271
|
-
Called when an Ember.js package (e.g Ember.
|
37618
|
+
Called when an Ember.js package (e.g Ember.Application) has finished
|
37272
37619
|
loading. Triggers any callbacks registered for this event.
|
37273
37620
|
|
37274
37621
|
@method runLoadHooks
|
@@ -40569,7 +40916,7 @@ enifed("ember-template-compiler/system/compile_options", ["exports", "ember-meta
|
|
40569
40916
|
|
40570
40917
|
options.buildMeta = function buildMeta(program) {
|
40571
40918
|
return {
|
40572
|
-
revision: "Ember@1.13.
|
40919
|
+
revision: "Ember@1.13.4",
|
40573
40920
|
loc: program.loc,
|
40574
40921
|
moduleName: options.moduleName
|
40575
40922
|
};
|
@@ -41998,7 +42345,7 @@ enifed("ember-views/compat/attrs-proxy", ["exports", "ember-metal/property_get",
|
|
41998
42345
|
}
|
41999
42346
|
|
42000
42347
|
var attrsKey = "attrs." + key;
|
42001
|
-
_emberMetalObserver.
|
42348
|
+
_emberMetalObserver._addBeforeObserver(this, attrsKey, null, attrsWillChange);
|
42002
42349
|
_emberMetalObserver.addObserver(this, attrsKey, null, attrsDidChange);
|
42003
42350
|
},
|
42004
42351
|
|
@@ -42008,7 +42355,7 @@ enifed("ember-views/compat/attrs-proxy", ["exports", "ember-metal/property_get",
|
|
42008
42355
|
}
|
42009
42356
|
|
42010
42357
|
var attrsKey = "attrs." + key;
|
42011
|
-
_emberMetalObserver.
|
42358
|
+
_emberMetalObserver._removeBeforeObserver(this, attrsKey, null, attrsWillChange);
|
42012
42359
|
_emberMetalObserver.removeObserver(this, attrsKey, null, attrsDidChange);
|
42013
42360
|
},
|
42014
42361
|
|
@@ -43526,7 +43873,7 @@ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/c
|
|
43526
43873
|
|
43527
43874
|
var EMPTY_ARRAY = [];
|
43528
43875
|
|
43529
|
-
|
43876
|
+
exports["default"] = _emberMetalMixin.Mixin.create({
|
43530
43877
|
/**
|
43531
43878
|
Array of child views. You should never edit this array directly.
|
43532
43879
|
Instead, use `appendChild` and `removeFromParent`.
|
@@ -43543,7 +43890,7 @@ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/c
|
|
43543
43890
|
// setup child views. be sure to clone the child views array first
|
43544
43891
|
// 2.0TODO: Remove Ember.A() here
|
43545
43892
|
this.childViews = _emberMetalCore["default"].A(this.childViews.slice());
|
43546
|
-
this.ownerView = this;
|
43893
|
+
this.ownerView = this.ownerView || this;
|
43547
43894
|
},
|
43548
43895
|
|
43549
43896
|
appendChild: function (view) {
|
@@ -43604,6 +43951,8 @@ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/c
|
|
43604
43951
|
|
43605
43952
|
var attrs = _attrs || {};
|
43606
43953
|
var view;
|
43954
|
+
|
43955
|
+
attrs.parentView = this;
|
43607
43956
|
attrs.renderer = this.renderer;
|
43608
43957
|
attrs._viewRegistry = this._viewRegistry;
|
43609
43958
|
|
@@ -43637,8 +43986,11 @@ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/c
|
|
43637
43986
|
|
43638
43987
|
linkChild: function (instance) {
|
43639
43988
|
instance.container = this.container;
|
43640
|
-
|
43641
|
-
|
43989
|
+
if (_emberMetalProperty_get.get(instance, "parentView") !== this) {
|
43990
|
+
// linkChild should be idempotentj
|
43991
|
+
_emberMetalProperty_set.set(instance, "parentView", this);
|
43992
|
+
instance.trigger("parentViewDidChange");
|
43993
|
+
}
|
43642
43994
|
instance.ownerView = this.ownerView;
|
43643
43995
|
},
|
43644
43996
|
|
@@ -43647,8 +43999,6 @@ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/c
|
|
43647
43999
|
instance.trigger("parentViewDidChange");
|
43648
44000
|
}
|
43649
44001
|
});
|
43650
|
-
|
43651
|
-
exports["default"] = ViewChildViewsSupport;
|
43652
44002
|
});
|
43653
44003
|
/**
|
43654
44004
|
@module ember
|
@@ -44877,7 +45227,7 @@ enifed("ember-views/views/checkbox", ["exports", "ember-metal/property_get", "em
|
|
44877
45227
|
The internal class used to create text inputs when the `{{input}}`
|
44878
45228
|
helper is used with `type` of `checkbox`.
|
44879
45229
|
|
44880
|
-
See [
|
45230
|
+
See [Ember.Templates.helpers.input](/api/classes/Ember.Templates.helpers.html#method_input) for usage details.
|
44881
45231
|
|
44882
45232
|
## Direct manipulation of `checked`
|
44883
45233
|
|
@@ -44965,7 +45315,7 @@ enifed("ember-views/views/collection_view", ["exports", "ember-metal/core", "emb
|
|
44965
45315
|
classNames: ['a-collection'],
|
44966
45316
|
content: ['A','B','C'],
|
44967
45317
|
itemViewClass: Ember.View.extend({
|
44968
|
-
template: Ember.
|
45318
|
+
template: Ember.HTMLBars.compile("the letter: {{view.content}}")
|
44969
45319
|
})
|
44970
45320
|
});
|
44971
45321
|
```
|
@@ -45000,7 +45350,7 @@ enifed("ember-views/views/collection_view", ["exports", "ember-metal/core", "emb
|
|
45000
45350
|
tagName: 'ul',
|
45001
45351
|
content: ['A','B','C'],
|
45002
45352
|
itemViewClass: Ember.View.extend({
|
45003
|
-
template: Ember.
|
45353
|
+
template: Ember.HTMLBars.compile("the letter: {{view.content}}")
|
45004
45354
|
})
|
45005
45355
|
});
|
45006
45356
|
```
|
@@ -45060,7 +45410,7 @@ enifed("ember-views/views/collection_view", ["exports", "ember-metal/core", "emb
|
|
45060
45410
|
classNames: ['nothing'],
|
45061
45411
|
content: null,
|
45062
45412
|
emptyView: Ember.View.extend({
|
45063
|
-
template: Ember.
|
45413
|
+
template: Ember.HTMLBars.compile("The collection is empty")
|
45064
45414
|
})
|
45065
45415
|
});
|
45066
45416
|
```
|
@@ -45131,7 +45481,7 @@ enifed("ember-views/views/collection_view", ["exports", "ember-metal/core", "emb
|
|
45131
45481
|
@private
|
45132
45482
|
@method _contentWillChange
|
45133
45483
|
*/
|
45134
|
-
_contentWillChange: _emberMetalMixin.
|
45484
|
+
_contentWillChange: _emberMetalMixin._beforeObserver("content", function () {
|
45135
45485
|
var content = this.get("content");
|
45136
45486
|
|
45137
45487
|
if (content) {
|
@@ -45559,14 +45909,14 @@ enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-vie
|
|
45559
45909
|
}),
|
45560
45910
|
|
45561
45911
|
/**
|
45562
|
-
|
45563
|
-
this controller has registered for notifications of the action.
|
45912
|
+
Calls a action passed to a component.
|
45564
45913
|
For example a component for playing or pausing music may translate click events
|
45565
45914
|
into action notifications of "play" or "stop" depending on some internal state
|
45566
45915
|
of the component:
|
45567
|
-
|
45568
|
-
|
45569
|
-
|
45916
|
+
```javascript
|
45917
|
+
// app/components/play-button.js
|
45918
|
+
export default Ember.Component.extend({
|
45919
|
+
click() {
|
45570
45920
|
if (this.get('isPlaying')) {
|
45571
45921
|
this.sendAction('play');
|
45572
45922
|
} else {
|
@@ -45575,55 +45925,56 @@ enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-vie
|
|
45575
45925
|
}
|
45576
45926
|
});
|
45577
45927
|
```
|
45578
|
-
|
45579
|
-
trigger actions in the outer application context:
|
45928
|
+
The actions "play" and "stop" must be passed to this `play-button` component:
|
45580
45929
|
```handlebars
|
45581
|
-
{{! application.hbs }}
|
45582
|
-
{{play-button play="musicStarted" stop="musicStopped"}}
|
45930
|
+
{{! app/templates/application.hbs }}
|
45931
|
+
{{play-button play=(action "musicStarted") stop=(action "musicStopped")}}
|
45583
45932
|
```
|
45584
45933
|
When the component receives a browser `click` event it translate this
|
45585
45934
|
interaction into application-specific semantics ("play" or "stop") and
|
45586
|
-
|
45587
|
-
|
45588
|
-
|
45589
|
-
|
45935
|
+
calls the specified action.
|
45936
|
+
```javascript
|
45937
|
+
// app/controller/application.js
|
45938
|
+
export default Ember.Controller.extend({
|
45590
45939
|
actions: {
|
45591
|
-
musicStarted
|
45940
|
+
musicStarted() {
|
45592
45941
|
// called when the play button is clicked
|
45593
45942
|
// and the music started playing
|
45594
45943
|
},
|
45595
|
-
musicStopped
|
45944
|
+
musicStopped() {
|
45596
45945
|
// called when the play button is clicked
|
45597
45946
|
// and the music stopped playing
|
45598
45947
|
}
|
45599
45948
|
}
|
45600
45949
|
});
|
45601
45950
|
```
|
45602
|
-
If no action
|
45951
|
+
If no action is passed to `sendAction` a default name of "action"
|
45603
45952
|
is assumed.
|
45604
45953
|
```javascript
|
45605
|
-
|
45606
|
-
|
45954
|
+
// app/components/next-button.js
|
45955
|
+
export default Ember.Component.extend({
|
45956
|
+
click() {
|
45607
45957
|
this.sendAction();
|
45608
45958
|
}
|
45609
45959
|
});
|
45610
45960
|
```
|
45611
45961
|
```handlebars
|
45612
|
-
{{! application.hbs }}
|
45613
|
-
{{next-button action="playNextSongInAlbum"}}
|
45962
|
+
{{! app/templates/application.hbs }}
|
45963
|
+
{{next-button action=(action "playNextSongInAlbum")}}
|
45614
45964
|
```
|
45615
45965
|
```javascript
|
45966
|
+
// app/controllers/application.js
|
45616
45967
|
App.ApplicationController = Ember.Controller.extend({
|
45617
45968
|
actions: {
|
45618
|
-
playNextSongInAlbum
|
45969
|
+
playNextSongInAlbum() {
|
45619
45970
|
...
|
45620
45971
|
}
|
45621
45972
|
}
|
45622
45973
|
});
|
45623
45974
|
```
|
45624
45975
|
@method sendAction
|
45625
|
-
@param [action] {String} the action to
|
45626
|
-
@param [
|
45976
|
+
@param [action] {String} the action to call
|
45977
|
+
@param [params] {*} arguments for the action
|
45627
45978
|
@public
|
45628
45979
|
*/
|
45629
45980
|
sendAction: function (action) {
|
@@ -45749,7 +46100,7 @@ enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-vie
|
|
45749
46100
|
});
|
45750
46101
|
// Ember.assert, Ember.Handlebars
|
45751
46102
|
enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "ember-runtime/mixins/mutable_array", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/enumerable_utils", "ember-metal/mixin", "ember-metal/events", "ember-htmlbars/templates/container-view"], function (exports, _emberMetalCore, _emberRuntimeMixinsMutable_array, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalEvents, _emberHtmlbarsTemplatesContainerView) {
|
45752
|
-
_emberHtmlbarsTemplatesContainerView["default"].meta.revision = "Ember@1.13.
|
46103
|
+
_emberHtmlbarsTemplatesContainerView["default"].meta.revision = "Ember@1.13.4";
|
45753
46104
|
|
45754
46105
|
/**
|
45755
46106
|
@module ember
|
@@ -45809,10 +46160,10 @@ enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "embe
|
|
45809
46160
|
classNames: ['the-container'],
|
45810
46161
|
childViews: ['aView', 'bView'],
|
45811
46162
|
aView: Ember.View.create({
|
45812
|
-
template: Ember.
|
46163
|
+
template: Ember.HTMLBars.compile("A")
|
45813
46164
|
}),
|
45814
46165
|
bView: Ember.View.create({
|
45815
|
-
template: Ember.
|
46166
|
+
template: Ember.HTMLBars.compile("B")
|
45816
46167
|
})
|
45817
46168
|
});
|
45818
46169
|
|
@@ -45854,10 +46205,10 @@ enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "embe
|
|
45854
46205
|
classNames: ['the-container'],
|
45855
46206
|
childViews: ['aView', 'bView'],
|
45856
46207
|
aView: Ember.View.create({
|
45857
|
-
template: Ember.
|
46208
|
+
template: Ember.HTMLBars.compile("A")
|
45858
46209
|
}),
|
45859
46210
|
bView: Ember.View.create({
|
45860
|
-
template: Ember.
|
46211
|
+
template: Ember.HTMLBars.compile("B")
|
45861
46212
|
})
|
45862
46213
|
});
|
45863
46214
|
|
@@ -45877,7 +46228,7 @@ enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "embe
|
|
45877
46228
|
|
45878
46229
|
```javascript
|
45879
46230
|
AnotherViewClass = Ember.View.extend({
|
45880
|
-
template: Ember.
|
46231
|
+
template: Ember.HTMLBars.compile("Another view")
|
45881
46232
|
});
|
45882
46233
|
|
45883
46234
|
aContainer.toArray(); // [aContainer.aView, aContainer.bView]
|
@@ -45961,7 +46312,7 @@ enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "embe
|
|
45961
46312
|
}
|
45962
46313
|
},
|
45963
46314
|
|
45964
|
-
_currentViewWillChange: _emberMetalMixin.
|
46315
|
+
_currentViewWillChange: _emberMetalMixin._beforeObserver("currentView", function () {
|
45965
46316
|
var currentView = _emberMetalProperty_get.get(this, "currentView");
|
45966
46317
|
if (currentView) {
|
45967
46318
|
currentView.destroy();
|
@@ -45981,7 +46332,7 @@ enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "embe
|
|
45981
46332
|
replace: function (idx, removedCount) {
|
45982
46333
|
var _this = this;
|
45983
46334
|
|
45984
|
-
var addedViews = arguments[2] === undefined ? [] : arguments[2];
|
46335
|
+
var addedViews = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
|
45985
46336
|
|
45986
46337
|
var addedCount = _emberMetalProperty_get.get(addedViews, "length");
|
45987
46338
|
var childViews = _emberMetalProperty_get.get(this, "childViews");
|
@@ -46099,7 +46450,7 @@ enifed("ember-views/views/core_view", ["exports", "ember-metal-views/renderer",
|
|
46099
46450
|
this.renderer = renderer;
|
46100
46451
|
}
|
46101
46452
|
|
46102
|
-
this.
|
46453
|
+
this._destroyingSubtreeForView = null;
|
46103
46454
|
this._dispatching = null;
|
46104
46455
|
},
|
46105
46456
|
|
@@ -46149,24 +46500,21 @@ enifed("ember-views/views/core_view", ["exports", "ember-metal-views/renderer",
|
|
46149
46500
|
},
|
46150
46501
|
|
46151
46502
|
destroy: function () {
|
46152
|
-
var parent = this.parentView;
|
46153
|
-
|
46154
46503
|
if (!this._super.apply(this, arguments)) {
|
46155
46504
|
return;
|
46156
46505
|
}
|
46157
46506
|
|
46158
46507
|
this.currentState.cleanup(this);
|
46159
46508
|
|
46160
|
-
|
46161
|
-
|
46162
|
-
|
46163
|
-
|
46164
|
-
|
46165
|
-
|
46166
|
-
|
46167
|
-
|
46168
|
-
|
46169
|
-
this.ownerView.isDestroyingSubtree = false;
|
46509
|
+
// If the destroyingSubtreeForView property is not set but we have an
|
46510
|
+
// associated render node, it means this view is being destroyed from user
|
46511
|
+
// code and not via a change in the templating layer (like an {{if}}
|
46512
|
+
// becoming falsy, for example). In this case, it is our responsibility to
|
46513
|
+
// make sure that any render nodes created as part of the rendering process
|
46514
|
+
// are cleaned up.
|
46515
|
+
if (!this.ownerView._destroyingSubtreeForView && this._renderNode) {
|
46516
|
+
Ember.assert("BUG: Render node exists without concomitant env.", this.ownerView.env);
|
46517
|
+
_htmlbarsRuntime.internal.clearMorph(this._renderNode, this.ownerView.env, true);
|
46170
46518
|
}
|
46171
46519
|
|
46172
46520
|
return this;
|
@@ -46775,7 +47123,7 @@ enifed("ember-views/views/select", ["exports", "ember-metal/enumerable_utils", "
|
|
46775
47123
|
},
|
46776
47124
|
|
46777
47125
|
_selectedIndex: function (value) {
|
46778
|
-
var defaultIndex = arguments[1] === undefined ? 0 : arguments[1];
|
47126
|
+
var defaultIndex = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
|
46779
47127
|
|
46780
47128
|
var content = _emberMetalProperty_get.get(this, "contentValues");
|
46781
47129
|
|
@@ -47097,7 +47445,7 @@ enifed("ember-views/views/states/has_element", ["exports", "ember-views/views/st
|
|
47097
47445
|
@module ember
|
47098
47446
|
@submodule ember-views
|
47099
47447
|
*/
|
47100
|
-
enifed(
|
47448
|
+
enifed('ember-views/views/states/in_dom', ['exports', 'ember-metal/core', 'ember-metal/platform/create', 'ember-metal/merge', 'ember-metal/error', 'ember-metal/observer', 'ember-views/views/states/has_element'], function (exports, _emberMetalCore, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalError, _emberMetalObserver, _emberViewsViewsStatesHas_element) {
|
47101
47449
|
/**
|
47102
47450
|
@module ember
|
47103
47451
|
@submodule ember-views
|
@@ -47109,13 +47457,13 @@ enifed("ember-views/views/states/in_dom", ["exports", "ember-metal/platform/crea
|
|
47109
47457
|
enter: function (view) {
|
47110
47458
|
// Register the view for event handling. This hash is used by
|
47111
47459
|
// Ember.EventDispatcher to dispatch incoming events.
|
47112
|
-
if (view.tagName !==
|
47460
|
+
if (view.tagName !== '') {
|
47113
47461
|
view._register();
|
47114
47462
|
}
|
47115
47463
|
|
47116
|
-
|
47117
|
-
_emberMetalObserver.
|
47118
|
-
throw new _emberMetalError["default"](
|
47464
|
+
_emberMetalCore["default"].runInDebug(function () {
|
47465
|
+
_emberMetalObserver._addBeforeObserver(view, 'elementId', function () {
|
47466
|
+
throw new _emberMetalError["default"]('Changing a view\'s elementId after creation is not allowed');
|
47119
47467
|
});
|
47120
47468
|
});
|
47121
47469
|
},
|
@@ -47135,7 +47483,7 @@ enifed("ember-views/views/states/in_dom", ["exports", "ember-metal/platform/crea
|
|
47135
47483
|
attrNode.parentView = view;
|
47136
47484
|
view.renderer.appendAttrTo(attrNode, view.element, attrNode.attrName);
|
47137
47485
|
|
47138
|
-
view.propertyDidChange(
|
47486
|
+
view.propertyDidChange('childViews');
|
47139
47487
|
|
47140
47488
|
return attrNode;
|
47141
47489
|
}
|
@@ -47167,7 +47515,7 @@ enifed("ember-views/views/text_area", ["exports", "ember-views/views/component",
|
|
47167
47515
|
The internal class used to create textarea element when the `{{textarea}}`
|
47168
47516
|
helper is used.
|
47169
47517
|
|
47170
|
-
See [
|
47518
|
+
See [Ember.Templates.helpers.textarea](/api/classes/Ember.Templates.helpers.html#method_textarea) for usage details.
|
47171
47519
|
|
47172
47520
|
## Layout and LayoutName properties
|
47173
47521
|
|
@@ -47229,7 +47577,7 @@ enifed("ember-views/views/text_field", ["exports", "ember-metal/computed", "embe
|
|
47229
47577
|
The internal class used to create text inputs when the `{{input}}`
|
47230
47578
|
helper is used with `type` of `text`.
|
47231
47579
|
|
47232
|
-
See [
|
47580
|
+
See [Ember.Templates.helpers.input](/api/classes/Ember.Templates.helpers.html#method_input) for usage details.
|
47233
47581
|
|
47234
47582
|
## Layout and LayoutName properties
|
47235
47583
|
|
@@ -47639,11 +47987,11 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47639
47987
|
template. Templates can be any function that accepts an optional context
|
47640
47988
|
parameter and returns a string of HTML that will be inserted within the
|
47641
47989
|
view's tag. Most typically in Ember this function will be a compiled
|
47642
|
-
|
47990
|
+
template.
|
47643
47991
|
|
47644
47992
|
```javascript
|
47645
47993
|
AView = Ember.View.extend({
|
47646
|
-
template: Ember.
|
47994
|
+
template: Ember.HTMLBars.compile('I am the template')
|
47647
47995
|
});
|
47648
47996
|
```
|
47649
47997
|
|
@@ -47686,18 +48034,18 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47686
48034
|
});
|
47687
48035
|
```
|
47688
48036
|
|
47689
|
-
Using a value for `templateName` that does not have a
|
48037
|
+
Using a value for `templateName` that does not have a template
|
47690
48038
|
with a matching `data-template-name` attribute will throw an error.
|
47691
48039
|
|
47692
48040
|
For views classes that may have a template later defined (e.g. as the block
|
47693
|
-
portion of a `{{view}}`
|
48041
|
+
portion of a `{{view}}` helper call in another template or in
|
47694
48042
|
a subclass), you can provide a `defaultTemplate` property set to compiled
|
47695
48043
|
template function. If a template is not later provided for the view instance
|
47696
48044
|
the `defaultTemplate` value will be used:
|
47697
48045
|
|
47698
48046
|
```javascript
|
47699
48047
|
AView = Ember.View.extend({
|
47700
|
-
defaultTemplate: Ember.
|
48048
|
+
defaultTemplate: Ember.HTMLBars.compile('I was the default'),
|
47701
48049
|
template: null,
|
47702
48050
|
templateName: null
|
47703
48051
|
});
|
@@ -47714,11 +48062,11 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47714
48062
|
|
47715
48063
|
```javascript
|
47716
48064
|
AView = Ember.View.extend({
|
47717
|
-
defaultTemplate: Ember.
|
48065
|
+
defaultTemplate: Ember.HTMLBars.compile('I was the default')
|
47718
48066
|
});
|
47719
48067
|
|
47720
48068
|
aView = AView.create({
|
47721
|
-
template: Ember.
|
48069
|
+
template: Ember.HTMLBars.compile('I was the template, not default')
|
47722
48070
|
});
|
47723
48071
|
```
|
47724
48072
|
|
@@ -47734,7 +48082,7 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47734
48082
|
|
47735
48083
|
```javascript
|
47736
48084
|
AView = Ember.View.extend({
|
47737
|
-
template: Ember.
|
48085
|
+
template: Ember.HTMLBars.compile('Hello {{excitedGreeting}}')
|
47738
48086
|
});
|
47739
48087
|
|
47740
48088
|
aController = Ember.Object.create({
|
@@ -47767,20 +48115,19 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47767
48115
|
view's tag. Views whose HTML element is self closing (e.g. `<input />`)
|
47768
48116
|
cannot have a layout and this property will be ignored.
|
47769
48117
|
|
47770
|
-
Most typically in Ember a layout will be a compiled
|
47771
|
-
template.
|
48118
|
+
Most typically in Ember a layout will be a compiled template.
|
47772
48119
|
|
47773
48120
|
A view's layout can be set directly with the `layout` property or reference
|
47774
|
-
an existing
|
48121
|
+
an existing template by name with the `layoutName` property.
|
47775
48122
|
|
47776
|
-
A template used as a layout must contain a single use of the
|
48123
|
+
A template used as a layout must contain a single use of the
|
47777
48124
|
`{{yield}}` helper. The HTML contents of a view's rendered `template` will be
|
47778
48125
|
inserted at this location:
|
47779
48126
|
|
47780
48127
|
```javascript
|
47781
48128
|
AViewWithLayout = Ember.View.extend({
|
47782
|
-
layout: Ember.
|
47783
|
-
template: Ember.
|
48129
|
+
layout: Ember.HTMLBars.compile("<div class='my-decorative-class'>{{yield}}</div>"),
|
48130
|
+
template: Ember.HTMLBars.compile("I got wrapped")
|
47784
48131
|
});
|
47785
48132
|
```
|
47786
48133
|
|
@@ -47794,7 +48141,7 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47794
48141
|
</div>
|
47795
48142
|
```
|
47796
48143
|
|
47797
|
-
See [Ember.
|
48144
|
+
See [Ember.Templates.helpers.yield](/api/classes/Ember.Templates.helpers.html#method_yield)
|
47798
48145
|
for more information.
|
47799
48146
|
|
47800
48147
|
## Responding to Browser Events
|
@@ -47868,7 +48215,7 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47868
48215
|
```javascript
|
47869
48216
|
var App = Ember.Application.create();
|
47870
48217
|
App.OuterView = Ember.View.extend({
|
47871
|
-
template: Ember.
|
48218
|
+
template: Ember.HTMLBars.compile("outer {{#view 'inner'}}inner{{/view}} outer"),
|
47872
48219
|
eventManager: Ember.Object.create({
|
47873
48220
|
mouseEnter: function(event, view) {
|
47874
48221
|
// view might be instance of either
|
@@ -47891,9 +48238,9 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47891
48238
|
});
|
47892
48239
|
```
|
47893
48240
|
|
47894
|
-
###
|
48241
|
+
### `{{action}}` Helper
|
47895
48242
|
|
47896
|
-
See [
|
48243
|
+
See [Ember.Templates.helpers.action](/api/classes/Ember.Templates.helpers.html#method_action).
|
47897
48244
|
|
47898
48245
|
### Event Names
|
47899
48246
|
|
@@ -47946,10 +48293,10 @@ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/
|
|
47946
48293
|
* `dragEnd`
|
47947
48294
|
* `drop`
|
47948
48295
|
|
47949
|
-
##
|
48296
|
+
## `{{view}}` Helper
|
47950
48297
|
|
47951
48298
|
Other `Ember.View` instances can be included as part of a view's template by
|
47952
|
-
using the `{{view}}`
|
48299
|
+
using the `{{view}}` helper. See [Ember.Templates.helpers.view](/api/classes/Ember.Templates.helpers.html#method_view)
|
47953
48300
|
for additional information.
|
47954
48301
|
|
47955
48302
|
@class View
|
@@ -49650,7 +49997,7 @@ enifed("htmlbars-runtime/hooks", ["exports", "./render", "../morph-range/morph-l
|
|
49650
49997
|
*/
|
49651
49998
|
|
49652
49999
|
function bindBlock(env, scope, block) {
|
49653
|
-
var name = arguments[3] === undefined ? "default" : arguments[3];
|
50000
|
+
var name = arguments.length <= 3 || arguments[3] === undefined ? "default" : arguments[3];
|
49654
50001
|
|
49655
50002
|
scope.blocks[name] = block;
|
49656
50003
|
}
|