ember-source 2.2.1 → 2.3.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +507 -239
- data/dist/ember-template-compiler.js +240 -157
- data/dist/ember-testing.js +21 -66
- data/dist/ember.debug.js +1354 -864
- data/dist/ember.js +1354 -864
- data/dist/ember.min.js +15 -14
- data/dist/ember.prod.js +1235 -782
- metadata +4 -4
data/dist/ember.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
7
7
|
* @license Licensed under MIT license
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
9
|
-
* @version 2.
|
9
|
+
* @version 2.3.0-beta.1
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, require, requirejs, Ember;
|
@@ -43,6 +43,15 @@ var mainContext = this;
|
|
43
43
|
requirejs = require = requireModule = function(name) {
|
44
44
|
return internalRequire(name, null);
|
45
45
|
}
|
46
|
+
require['default'] = require;
|
47
|
+
|
48
|
+
function missingModule(name, referrerName) {
|
49
|
+
if (referrerName) {
|
50
|
+
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
51
|
+
} else {
|
52
|
+
throw new Error('Could not find module ' + name);
|
53
|
+
}
|
54
|
+
}
|
46
55
|
|
47
56
|
function internalRequire(name, referrerName) {
|
48
57
|
var exports = seen[name];
|
@@ -54,24 +63,22 @@ var mainContext = this;
|
|
54
63
|
exports = seen[name] = {};
|
55
64
|
|
56
65
|
if (!registry[name]) {
|
57
|
-
|
58
|
-
throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
|
59
|
-
} else {
|
60
|
-
throw new Error('Could not find module ' + name);
|
61
|
-
}
|
66
|
+
missingModule(name, referrerName);
|
62
67
|
}
|
63
68
|
|
64
69
|
var mod = registry[name];
|
65
70
|
var deps = mod.deps;
|
66
71
|
var callback = mod.callback;
|
67
|
-
var reified = [];
|
68
72
|
var length = deps.length;
|
73
|
+
var reified = new Array(length);;
|
69
74
|
|
70
75
|
for (var i = 0; i < length; i++) {
|
71
76
|
if (deps[i] === 'exports') {
|
72
|
-
reified
|
77
|
+
reified[i] = exports;
|
78
|
+
} else if (deps[i] === 'require') {
|
79
|
+
reified[i] = require;
|
73
80
|
} else {
|
74
|
-
reified
|
81
|
+
reified[i] = internalRequire(deps[i], name);
|
75
82
|
}
|
76
83
|
}
|
77
84
|
|
@@ -1182,7 +1189,7 @@ enifed('backburner', ['exports', 'backburner/utils', 'backburner/platform', 'bac
|
|
1182
1189
|
clearTimeout(item[2]);
|
1183
1190
|
}
|
1184
1191
|
});
|
1185
|
-
enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/features'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalDictionary, _emberMetalFeatures) {
|
1192
|
+
enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/features', 'container/owner', 'ember-runtime/mixins/container_proxy'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalDictionary, _emberMetalFeatures, _containerOwner, _emberRuntimeMixinsContainer_proxy) {
|
1186
1193
|
'use strict';
|
1187
1194
|
|
1188
1195
|
/**
|
@@ -1200,12 +1207,22 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1200
1207
|
*/
|
1201
1208
|
function Container(registry, options) {
|
1202
1209
|
this.registry = registry;
|
1210
|
+
this.owner = options && options.owner ? options.owner : null;
|
1203
1211
|
this.cache = _emberMetalDictionary.default(options && options.cache ? options.cache : null);
|
1204
1212
|
this.factoryCache = _emberMetalDictionary.default(options && options.factoryCache ? options.factoryCache : null);
|
1205
1213
|
this.validationCache = _emberMetalDictionary.default(options && options.validationCache ? options.validationCache : null);
|
1214
|
+
|
1215
|
+
this._fakeContainerToInject = _emberRuntimeMixinsContainer_proxy.buildFakeContainerWithDeprecations(this);
|
1206
1216
|
}
|
1207
1217
|
|
1208
1218
|
Container.prototype = {
|
1219
|
+
/**
|
1220
|
+
@private
|
1221
|
+
@property owner
|
1222
|
+
@type Object
|
1223
|
+
*/
|
1224
|
+
owner: null,
|
1225
|
+
|
1209
1226
|
/**
|
1210
1227
|
@private
|
1211
1228
|
@property registry
|
@@ -1346,17 +1363,17 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1346
1363
|
return !!injections._dynamic;
|
1347
1364
|
}
|
1348
1365
|
|
1349
|
-
function buildInjections(
|
1366
|
+
function buildInjections() /* container, ...injections */{
|
1350
1367
|
var hash = {};
|
1351
1368
|
|
1352
1369
|
if (arguments.length > 1) {
|
1353
|
-
var
|
1370
|
+
var container = arguments[0];
|
1354
1371
|
var injections = [];
|
1355
1372
|
var injection;
|
1356
1373
|
|
1357
|
-
for (var i =
|
1358
|
-
if (
|
1359
|
-
injections = injections.concat(
|
1374
|
+
for (var i = 1, l = arguments.length; i < l; i++) {
|
1375
|
+
if (arguments[i]) {
|
1376
|
+
injections = injections.concat(arguments[i]);
|
1360
1377
|
}
|
1361
1378
|
}
|
1362
1379
|
|
@@ -1403,6 +1420,11 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1403
1420
|
factoryInjections._toString = registry.makeToString(factory, fullName);
|
1404
1421
|
|
1405
1422
|
var injectedFactory = factory.extend(injections);
|
1423
|
+
|
1424
|
+
// TODO - remove all `container` injections when Ember reaches v3.0.0
|
1425
|
+
|
1426
|
+
injectDeprecatedContainer(injectedFactory.prototype, container);
|
1427
|
+
|
1406
1428
|
injectedFactory.reopenClass(factoryInjections);
|
1407
1429
|
|
1408
1430
|
if (factory && typeof factory._onLookup === 'function') {
|
@@ -1424,7 +1446,8 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1424
1446
|
|
1425
1447
|
var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
|
1426
1448
|
injections._debugContainerKey = fullName;
|
1427
|
-
|
1449
|
+
|
1450
|
+
_containerOwner.setOwner(injections, container.owner);
|
1428
1451
|
|
1429
1452
|
return injections;
|
1430
1453
|
}
|
@@ -1465,18 +1488,47 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1465
1488
|
|
1466
1489
|
validationCache[fullName] = true;
|
1467
1490
|
|
1491
|
+
var obj = undefined;
|
1492
|
+
|
1468
1493
|
if (typeof factory.extend === 'function') {
|
1469
1494
|
// assume the factory was extendable and is already injected
|
1470
|
-
|
1495
|
+
obj = factory.create();
|
1471
1496
|
} else {
|
1472
1497
|
// assume the factory was extendable
|
1473
1498
|
// to create time injections
|
1474
1499
|
// TODO: support new'ing for instantiation and merge injections for pure JS Functions
|
1475
|
-
|
1500
|
+
var injections = injectionsFor(container, fullName);
|
1501
|
+
|
1502
|
+
// Ensure that a container is available to an object during instantiation.
|
1503
|
+
// TODO - remove when Ember reaches v3.0.0
|
1504
|
+
|
1505
|
+
// This "fake" container will be replaced after instantiation with a
|
1506
|
+
// property that raises deprecations every time it is accessed.
|
1507
|
+
injections.container = container._fakeContainerToInject;
|
1508
|
+
|
1509
|
+
obj = factory.create(injections);
|
1510
|
+
|
1511
|
+
// TODO - remove when Ember reaches v3.0.0
|
1512
|
+
|
1513
|
+
injectDeprecatedContainer(obj, container);
|
1476
1514
|
}
|
1515
|
+
|
1516
|
+
return obj;
|
1477
1517
|
}
|
1478
1518
|
}
|
1479
1519
|
|
1520
|
+
// TODO - remove when Ember reaches v3.0.0
|
1521
|
+
function injectDeprecatedContainer(object, container) {
|
1522
|
+
Object.defineProperty(object, 'container', {
|
1523
|
+
configurable: true,
|
1524
|
+
enumerable: false,
|
1525
|
+
get: function () {
|
1526
|
+
_emberMetalDebug.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
|
1527
|
+
return container;
|
1528
|
+
}
|
1529
|
+
});
|
1530
|
+
}
|
1531
|
+
|
1480
1532
|
function eachDestroyable(container, callback) {
|
1481
1533
|
var cache = container.cache;
|
1482
1534
|
var keys = Object.keys(cache);
|
@@ -1516,10 +1568,80 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1516
1568
|
}
|
1517
1569
|
}
|
1518
1570
|
|
1519
|
-
// Once registry / container reform is enabled, we no longer need to expose
|
1520
|
-
// Container#_registry, since Container itself will be fully private.
|
1521
1571
|
exports.default = Container;
|
1522
1572
|
});
|
1573
|
+
enifed('container/owner', ['exports', 'ember-metal/symbol'], function (exports, _emberMetalSymbol) {
|
1574
|
+
/**
|
1575
|
+
@module ember
|
1576
|
+
@submodule ember-runtime
|
1577
|
+
*/
|
1578
|
+
|
1579
|
+
'use strict';
|
1580
|
+
|
1581
|
+
exports.getOwner = getOwner;
|
1582
|
+
exports.setOwner = setOwner;
|
1583
|
+
var OWNER = _emberMetalSymbol.default('OWNER');
|
1584
|
+
|
1585
|
+
exports.OWNER = OWNER;
|
1586
|
+
/**
|
1587
|
+
Framework objects in an Ember application (components, services, routes, etc.)
|
1588
|
+
are created via a factory and dependency injection system. Each of these
|
1589
|
+
objects is the responsibility of an "owner", which handled its
|
1590
|
+
instantiation and manages its lifetime.
|
1591
|
+
|
1592
|
+
`getOwner` fetches the owner object responsible for an instance. This can
|
1593
|
+
be used to lookup or resolve other class instances, or register new factories
|
1594
|
+
into the owner.
|
1595
|
+
|
1596
|
+
For example, this component dynamically looks up a service based on the
|
1597
|
+
`audioType` passed as an attribute:
|
1598
|
+
|
1599
|
+
```
|
1600
|
+
// app/components/play-audio.js
|
1601
|
+
import Ember from 'ember';
|
1602
|
+
|
1603
|
+
// Usage:
|
1604
|
+
//
|
1605
|
+
// {{play-audio audioType=model.audioType audioFile=model.file}}
|
1606
|
+
//
|
1607
|
+
export default Ember.Component.extend({
|
1608
|
+
audioService: Ember.computed('audioType', function() {
|
1609
|
+
let owner = Ember.getOwner(this);
|
1610
|
+
return owner.lookup(`service:${this.get('audioType')}`);
|
1611
|
+
}),
|
1612
|
+
click() {
|
1613
|
+
let player = this.get('audioService');
|
1614
|
+
player.play(this.get('audioFile'));
|
1615
|
+
}
|
1616
|
+
});
|
1617
|
+
```
|
1618
|
+
|
1619
|
+
@method getOwner
|
1620
|
+
@param {Object} object A object with an owner.
|
1621
|
+
@return {Object} an owner object.
|
1622
|
+
@for Ember
|
1623
|
+
@public
|
1624
|
+
*/
|
1625
|
+
|
1626
|
+
function getOwner(object) {
|
1627
|
+
return object[OWNER];
|
1628
|
+
}
|
1629
|
+
|
1630
|
+
/**
|
1631
|
+
`setOwner` forces a new owner on a given object instance. This is primarily
|
1632
|
+
useful in some testing cases.
|
1633
|
+
|
1634
|
+
@method setOwner
|
1635
|
+
@param {Object} object A object with an owner.
|
1636
|
+
@return {Object} an owner object.
|
1637
|
+
@for Ember
|
1638
|
+
@public
|
1639
|
+
*/
|
1640
|
+
|
1641
|
+
function setOwner(object, owner) {
|
1642
|
+
object[OWNER] = owner;
|
1643
|
+
}
|
1644
|
+
});
|
1523
1645
|
enifed('container/registry', ['exports', 'ember-metal/debug', 'ember-metal/dictionary', 'ember-metal/assign', 'container/container'], function (exports, _emberMetalDebug, _emberMetalDictionary, _emberMetalAssign, _containerContainer) {
|
1524
1646
|
'use strict';
|
1525
1647
|
|
@@ -2182,7 +2304,7 @@ enifed('container/registry', ['exports', 'ember-metal/debug', 'ember-metal/dicti
|
|
2182
2304
|
|
2183
2305
|
exports.default = Registry;
|
2184
2306
|
});
|
2185
|
-
enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'container/container'], function (exports, _emberMetalCore, _containerRegistry, _containerContainer) {
|
2307
|
+
enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'container/container', 'container/owner'], function (exports, _emberMetalCore, _containerRegistry, _containerContainer, _containerOwner) {
|
2186
2308
|
'use strict';
|
2187
2309
|
|
2188
2310
|
/*
|
@@ -2205,6 +2327,8 @@ enifed('container', ['exports', 'ember-metal/core', 'container/registry', 'conta
|
|
2205
2327
|
|
2206
2328
|
exports.Registry = _containerRegistry.default;
|
2207
2329
|
exports.Container = _containerContainer.default;
|
2330
|
+
exports.getOwner = _containerOwner.getOwner;
|
2331
|
+
exports.setOwner = _containerOwner.setOwner;
|
2208
2332
|
});
|
2209
2333
|
enifed('dag-map/platform', ['exports'], function (exports) {
|
2210
2334
|
'use strict';
|
@@ -3474,8 +3598,6 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3474
3598
|
|
3475
3599
|
var application = _emberMetalProperty_get.get(this, 'application');
|
3476
3600
|
|
3477
|
-
_emberMetalProperty_set.set(this, 'rootElement', _emberMetalProperty_get.get(application, 'rootElement'));
|
3478
|
-
|
3479
3601
|
// Create a per-instance registry that will use the application's registry
|
3480
3602
|
// as a fallback for resolving registrations.
|
3481
3603
|
var applicationRegistry = _emberMetalProperty_get.get(application, '__registry__');
|
@@ -3486,7 +3608,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3486
3608
|
registry.makeToString = applicationRegistry.makeToString;
|
3487
3609
|
|
3488
3610
|
// Create a per-instance container from the instance's registry
|
3489
|
-
this.__container__ = registry.container();
|
3611
|
+
this.__container__ = registry.container({ owner: this });
|
3490
3612
|
|
3491
3613
|
// Register this instance in the per-instance registry.
|
3492
3614
|
//
|
@@ -3542,9 +3664,34 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3542
3664
|
return this;
|
3543
3665
|
}
|
3544
3666
|
|
3667
|
+
options = new BootOptions(options);
|
3668
|
+
|
3669
|
+
var registry = this.__registry__;
|
3670
|
+
|
3671
|
+
registry.register('-environment:main', options.toEnvironment(), { instantiate: false });
|
3672
|
+
registry.injection('view', '_environment', '-environment:main');
|
3673
|
+
registry.injection('route', '_environment', '-environment:main');
|
3674
|
+
|
3675
|
+
registry.register('renderer:-dom', {
|
3676
|
+
create: function () {
|
3677
|
+
return new _emberMetalViewsRenderer.default(new _emberHtmlbarsSystemDomHelper.default(options.document), options.isInteractive);
|
3678
|
+
}
|
3679
|
+
});
|
3680
|
+
|
3681
|
+
if (options.rootElement) {
|
3682
|
+
this.rootElement = options.rootElement;
|
3683
|
+
} else {
|
3684
|
+
this.rootElement = this.application.rootElement;
|
3685
|
+
}
|
3686
|
+
|
3687
|
+
if (options.location) {
|
3688
|
+
var router = _emberMetalProperty_get.get(this, 'router');
|
3689
|
+
_emberMetalProperty_set.set(router, 'location', options.location);
|
3690
|
+
}
|
3691
|
+
|
3545
3692
|
this.application.runInstanceInitializers(this);
|
3546
3693
|
|
3547
|
-
if (
|
3694
|
+
if (options.isInteractive) {
|
3548
3695
|
this.setupEventDispatcher();
|
3549
3696
|
}
|
3550
3697
|
|
@@ -3636,6 +3783,235 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3636
3783
|
}
|
3637
3784
|
});
|
3638
3785
|
|
3786
|
+
ApplicationInstance.reopen({
|
3787
|
+
/**
|
3788
|
+
Returns the current URL of the app instance. This is useful when your
|
3789
|
+
app does not update the browsers URL bar (i.e. it uses the `'none'`
|
3790
|
+
location adapter).
|
3791
|
+
@public
|
3792
|
+
@return {String} the current URL
|
3793
|
+
*/
|
3794
|
+
getURL: function () {
|
3795
|
+
var router = _emberMetalProperty_get.get(this, 'router');
|
3796
|
+
return _emberMetalProperty_get.get(router, 'url');
|
3797
|
+
},
|
3798
|
+
|
3799
|
+
// `instance.visit(url)` should eventually replace `instance.handleURL()`;
|
3800
|
+
// the test helpers can probably be switched to use this implementation too
|
3801
|
+
|
3802
|
+
/**
|
3803
|
+
Navigate the instance to a particular URL. This is useful in tests, for
|
3804
|
+
example, or to tell the app to start at a particular URL. This method
|
3805
|
+
returns a promise that resolves with the app instance when the transition
|
3806
|
+
is complete, or rejects if the transion was aborted due to an error.
|
3807
|
+
@public
|
3808
|
+
@param url {String} the destination URL
|
3809
|
+
@return {Promise}
|
3810
|
+
*/
|
3811
|
+
visit: function (url) {
|
3812
|
+
var _this2 = this;
|
3813
|
+
|
3814
|
+
this.setupRouter();
|
3815
|
+
|
3816
|
+
var router = _emberMetalProperty_get.get(this, 'router');
|
3817
|
+
|
3818
|
+
var handleResolve = function () {
|
3819
|
+
// Resolve only after rendering is complete
|
3820
|
+
return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
|
3821
|
+
// TODO: why is this necessary? Shouldn't 'actions' queue be enough?
|
3822
|
+
// Also, aren't proimses supposed to be async anyway?
|
3823
|
+
_emberMetalRun_loop.default.next(null, resolve, _this2);
|
3824
|
+
});
|
3825
|
+
};
|
3826
|
+
|
3827
|
+
var handleReject = function (error) {
|
3828
|
+
if (error.error) {
|
3829
|
+
throw error.error;
|
3830
|
+
} else if (error.name === 'TransitionAborted' && router.router.activeTransition) {
|
3831
|
+
return router.router.activeTransition.then(handleResolve, handleReject);
|
3832
|
+
} else if (error.name === 'TransitionAborted') {
|
3833
|
+
throw new Error(error.message);
|
3834
|
+
} else {
|
3835
|
+
throw error;
|
3836
|
+
}
|
3837
|
+
};
|
3838
|
+
|
3839
|
+
// Keeps the location adapter's internal URL in-sync
|
3840
|
+
_emberMetalProperty_get.get(router, 'location').setURL(url);
|
3841
|
+
|
3842
|
+
return router.handleURL(url).then(handleResolve, handleReject);
|
3843
|
+
}
|
3844
|
+
});
|
3845
|
+
|
3846
|
+
/**
|
3847
|
+
A list of boot-time configuration options for customizing the behavior of
|
3848
|
+
an `Ember.ApplicationInstance`.
|
3849
|
+
This is an interface class that exists purely to document the available
|
3850
|
+
options; you do not need to construct it manually. Simply pass a regular
|
3851
|
+
JavaScript object containing the desired options into methods that require
|
3852
|
+
one of these options object:
|
3853
|
+
```javascript
|
3854
|
+
MyApp.visit("/", { location: "none", rootElement: "#container" });
|
3855
|
+
```
|
3856
|
+
Not all combinations of the supported options are valid. See the documentation
|
3857
|
+
on `Ember.Application#visit` for the supported configurations.
|
3858
|
+
Internal, experimental or otherwise unstable flags are marked as private.
|
3859
|
+
@class BootOptions
|
3860
|
+
@namespace @Ember.ApplicationInstance
|
3861
|
+
@public
|
3862
|
+
*/
|
3863
|
+
BootOptions = function BootOptions() {
|
3864
|
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
3865
|
+
|
3866
|
+
/**
|
3867
|
+
Provide a specific instance of jQuery. This is useful in conjunction with
|
3868
|
+
the `document` option, as it allows you to use a copy of `jQuery` that is
|
3869
|
+
appropriately bound to the foreign `document` (e.g. a jsdom).
|
3870
|
+
This is highly experimental and support very incomplete at the moment.
|
3871
|
+
@property jQuery
|
3872
|
+
@type Object
|
3873
|
+
@default auto-detected
|
3874
|
+
@private
|
3875
|
+
*/
|
3876
|
+
this.jQuery = _emberViewsSystemJquery.default; // This default is overridable below
|
3877
|
+
|
3878
|
+
/**
|
3879
|
+
Interactive mode: whether we need to set up event delegation and invoke
|
3880
|
+
lifecycle callbacks on Components.
|
3881
|
+
@property isInteractive
|
3882
|
+
@type boolean
|
3883
|
+
@default auto-detected
|
3884
|
+
@private
|
3885
|
+
*/
|
3886
|
+
this.isInteractive = _emberMetalEnvironment.default.hasDOM; // This default is overridable below
|
3887
|
+
|
3888
|
+
/**
|
3889
|
+
Run in a full browser environment.
|
3890
|
+
When this flag is set to `false`, it will disable most browser-specific
|
3891
|
+
and interactive features. Specifically:
|
3892
|
+
* It does not use `jQuery` to append the root view; the `rootElement`
|
3893
|
+
(either specified as a subsequent option or on the application itself)
|
3894
|
+
must already be an `Element` in the given `document` (as opposed to a
|
3895
|
+
string selector).
|
3896
|
+
* It does not set up an `EventDispatcher`.
|
3897
|
+
* It does not run any `Component` lifecycle hooks (such as `didInsertElement`).
|
3898
|
+
* It sets the `location` option to `"none"`. (If you would like to use
|
3899
|
+
the location adapter specified in the app's router instead, you can also
|
3900
|
+
specify `{ location: null }` to specifically opt-out.)
|
3901
|
+
@property isBrowser
|
3902
|
+
@type boolean
|
3903
|
+
@default auto-detected
|
3904
|
+
@public
|
3905
|
+
*/
|
3906
|
+
if (options.isBrowser !== undefined) {
|
3907
|
+
this.isBrowser = !!options.isBrowser;
|
3908
|
+
} else {
|
3909
|
+
this.isBrowser = _emberMetalEnvironment.default.hasDOM;
|
3910
|
+
}
|
3911
|
+
|
3912
|
+
if (!this.isBrowser) {
|
3913
|
+
this.jQuery = null;
|
3914
|
+
this.isInteractive = false;
|
3915
|
+
this.location = 'none';
|
3916
|
+
}
|
3917
|
+
|
3918
|
+
/**
|
3919
|
+
Disable rendering completely.
|
3920
|
+
When this flag is set to `true`, it will disable the entire rendering
|
3921
|
+
pipeline. Essentially, this puts the app into "routing-only" mode. No
|
3922
|
+
templates will be rendered, and no Components will be created.
|
3923
|
+
@property shouldRender
|
3924
|
+
@type boolean
|
3925
|
+
@default true
|
3926
|
+
@public
|
3927
|
+
*/
|
3928
|
+
if (options.shouldRender !== undefined) {
|
3929
|
+
this.shouldRender = !!options.shouldRender;
|
3930
|
+
} else {
|
3931
|
+
this.shouldRender = true;
|
3932
|
+
}
|
3933
|
+
|
3934
|
+
if (!this.shouldRender) {
|
3935
|
+
this.jQuery = null;
|
3936
|
+
this.isInteractive = false;
|
3937
|
+
}
|
3938
|
+
|
3939
|
+
/**
|
3940
|
+
If present, render into the given `Document` object instead of the
|
3941
|
+
global `window.document` object.
|
3942
|
+
In practice, this is only useful in non-browser environment or in
|
3943
|
+
non-interactive mode, because Ember's `jQuery` dependency is
|
3944
|
+
implicitly bound to the current document, causing event delegation
|
3945
|
+
to not work properly when the app is rendered into a foreign
|
3946
|
+
document object (such as an iframe's `contentDocument`).
|
3947
|
+
In non-browser mode, this could be a "`Document`-like" object as
|
3948
|
+
Ember only interact with a small subset of the DOM API in non-
|
3949
|
+
interactive mode. While the exact requirements have not yet been
|
3950
|
+
formalized, the `SimpleDOM` library's implementation is known to
|
3951
|
+
work.
|
3952
|
+
@property document
|
3953
|
+
@type Document
|
3954
|
+
@default the global `document` object
|
3955
|
+
@public
|
3956
|
+
*/
|
3957
|
+
if (options.document) {
|
3958
|
+
this.document = options.document;
|
3959
|
+
} else {
|
3960
|
+
this.document = typeof document !== 'undefined' ? document : null;
|
3961
|
+
}
|
3962
|
+
|
3963
|
+
/**
|
3964
|
+
If present, overrides the application's `rootElement` property on
|
3965
|
+
the instance. This is useful for testing environment, where you
|
3966
|
+
might want to append the root view to a fixture area.
|
3967
|
+
In non-browser mode, because Ember does not have access to jQuery,
|
3968
|
+
this options must be specified as a DOM `Element` object instead of
|
3969
|
+
a selector string.
|
3970
|
+
See the documentation on `Ember.Applications`'s `rootElement` for
|
3971
|
+
details.
|
3972
|
+
@property rootElement
|
3973
|
+
@type String|Element
|
3974
|
+
@default null
|
3975
|
+
@public
|
3976
|
+
*/
|
3977
|
+
if (options.rootElement) {
|
3978
|
+
this.rootElement = options.rootElement;
|
3979
|
+
}
|
3980
|
+
|
3981
|
+
// Set these options last to give the user a chance to override the
|
3982
|
+
// defaults from the "combo" options like `isBrowser` (although in
|
3983
|
+
// practice, the resulting combination is probably invalid)
|
3984
|
+
|
3985
|
+
/**
|
3986
|
+
If present, overrides the router's `location` property with this
|
3987
|
+
value. This is useful for environments where trying to modify the
|
3988
|
+
URL would be inappropriate.
|
3989
|
+
@property location
|
3990
|
+
@type string
|
3991
|
+
@default null
|
3992
|
+
@public
|
3993
|
+
*/
|
3994
|
+
if (options.location !== undefined) {
|
3995
|
+
this.location = options.location;
|
3996
|
+
}
|
3997
|
+
|
3998
|
+
if (options.jQuery !== undefined) {
|
3999
|
+
this.jQuery = options.jQuery;
|
4000
|
+
}
|
4001
|
+
|
4002
|
+
if (options.isInteractive !== undefined) {
|
4003
|
+
this.isInteractive = !!options.isInteractive;
|
4004
|
+
}
|
4005
|
+
};
|
4006
|
+
|
4007
|
+
BootOptions.prototype.toEnvironment = function () {
|
4008
|
+
var env = _emberMetalAssign.default({}, _emberMetalEnvironment.default);
|
4009
|
+
// For compatibility with existing code
|
4010
|
+
env.hasDOM = this.isBrowser;
|
4011
|
+
env.options = this;
|
4012
|
+
return env;
|
4013
|
+
};
|
4014
|
+
|
3639
4015
|
function isResolverModuleBased(applicationInstance) {
|
3640
4016
|
return !!applicationInstance.application.__registry__.resolver.moduleBasedResolver;
|
3641
4017
|
}
|
@@ -3665,156 +4041,9 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3665
4041
|
return _emberRuntimeMixinsRegistry_proxy.buildFakeRegistryWithDeprecations(this, 'ApplicationInstance');
|
3666
4042
|
}
|
3667
4043
|
});
|
4044
|
+
|
3668
4045
|
exports.default = ApplicationInstance;
|
3669
4046
|
});
|
3670
|
-
|
3671
|
-
/**
|
3672
|
-
Returns the current URL of the app instance. This is useful when your
|
3673
|
-
app does not update the browsers URL bar (i.e. it uses the `'none'`
|
3674
|
-
location adapter).
|
3675
|
-
@public
|
3676
|
-
@return {String} the current URL
|
3677
|
-
*/
|
3678
|
-
|
3679
|
-
// `instance.visit(url)` should eventually replace `instance.handleURL()`;
|
3680
|
-
// the test helpers can probably be switched to use this implementation too
|
3681
|
-
|
3682
|
-
/**
|
3683
|
-
Navigate the instance to a particular URL. This is useful in tests, for
|
3684
|
-
example, or to tell the app to start at a particular URL. This method
|
3685
|
-
returns a promise that resolves with the app instance when the transition
|
3686
|
-
is complete, or rejects if the transion was aborted due to an error.
|
3687
|
-
@public
|
3688
|
-
@param url {String} the destination URL
|
3689
|
-
@return {Promise}
|
3690
|
-
*/
|
3691
|
-
|
3692
|
-
// Resolve only after rendering is complete
|
3693
|
-
|
3694
|
-
// TODO: why is this necessary? Shouldn't 'actions' queue be enough?
|
3695
|
-
// Also, aren't proimses supposed to be async anyway?
|
3696
|
-
|
3697
|
-
// Keeps the location adapter's internal URL in-sync
|
3698
|
-
|
3699
|
-
/**
|
3700
|
-
A list of boot-time configuration options for customizing the behavior of
|
3701
|
-
an `Ember.ApplicationInstance`.
|
3702
|
-
This is an interface class that exists purely to document the available
|
3703
|
-
options; you do not need to construct it manually. Simply pass a regular
|
3704
|
-
JavaScript object containing the desired options into methods that require
|
3705
|
-
one of these options object:
|
3706
|
-
```javascript
|
3707
|
-
MyApp.visit("/", { location: "none", rootElement: "#container" });
|
3708
|
-
```
|
3709
|
-
Not all combinations of the supported options are valid. See the documentation
|
3710
|
-
on `Ember.Application#visit` for the supported configurations.
|
3711
|
-
Internal, experimental or otherwise unstable flags are marked as private.
|
3712
|
-
@class BootOptions
|
3713
|
-
@namespace @Ember.ApplicationInstance
|
3714
|
-
@public
|
3715
|
-
*/
|
3716
|
-
|
3717
|
-
/**
|
3718
|
-
Provide a specific instance of jQuery. This is useful in conjunction with
|
3719
|
-
the `document` option, as it allows you to use a copy of `jQuery` that is
|
3720
|
-
appropriately bound to the foreign `document` (e.g. a jsdom).
|
3721
|
-
This is highly experimental and support very incomplete at the moment.
|
3722
|
-
@property jQuery
|
3723
|
-
@type Object
|
3724
|
-
@default auto-detected
|
3725
|
-
@private
|
3726
|
-
*/
|
3727
|
-
// This default is overridable below
|
3728
|
-
|
3729
|
-
/**
|
3730
|
-
Interactive mode: whether we need to set up event delegation and invoke
|
3731
|
-
lifecycle callbacks on Components.
|
3732
|
-
@property isInteractive
|
3733
|
-
@type boolean
|
3734
|
-
@default auto-detected
|
3735
|
-
@private
|
3736
|
-
*/
|
3737
|
-
// This default is overridable below
|
3738
|
-
|
3739
|
-
/**
|
3740
|
-
Run in a full browser environment.
|
3741
|
-
When this flag is set to `false`, it will disable most browser-specific
|
3742
|
-
and interactive features. Specifically:
|
3743
|
-
* It does not use `jQuery` to append the root view; the `rootElement`
|
3744
|
-
(either specified as a subsequent option or on the application itself)
|
3745
|
-
must already be an `Element` in the given `document` (as opposed to a
|
3746
|
-
string selector).
|
3747
|
-
* It does not set up an `EventDispatcher`.
|
3748
|
-
* It does not run any `Component` lifecycle hooks (such as `didInsertElement`).
|
3749
|
-
* It sets the `location` option to `"none"`. (If you would like to use
|
3750
|
-
the location adapter specified in the app's router instead, you can also
|
3751
|
-
specify `{ location: null }` to specifically opt-out.)
|
3752
|
-
@property isBrowser
|
3753
|
-
@type boolean
|
3754
|
-
@default auto-detected
|
3755
|
-
@public
|
3756
|
-
*/
|
3757
|
-
|
3758
|
-
/**
|
3759
|
-
Disable rendering completely.
|
3760
|
-
When this flag is set to `true`, it will disable the entire rendering
|
3761
|
-
pipeline. Essentially, this puts the app into "routing-only" mode. No
|
3762
|
-
templates will be rendered, and no Components will be created.
|
3763
|
-
@property shouldRender
|
3764
|
-
@type boolean
|
3765
|
-
@default true
|
3766
|
-
@public
|
3767
|
-
*/
|
3768
|
-
|
3769
|
-
/**
|
3770
|
-
If present, render into the given `Document` object instead of the
|
3771
|
-
global `window.document` object.
|
3772
|
-
In practice, this is only useful in non-browser environment or in
|
3773
|
-
non-interactive mode, because Ember's `jQuery` dependency is
|
3774
|
-
implicitly bound to the current document, causing event delegation
|
3775
|
-
to not work properly when the app is rendered into a foreign
|
3776
|
-
document object (such as an iframe's `contentDocument`).
|
3777
|
-
In non-browser mode, this could be a "`Document`-like" object as
|
3778
|
-
Ember only interact with a small subset of the DOM API in non-
|
3779
|
-
interactive mode. While the exact requirements have not yet been
|
3780
|
-
formalized, the `SimpleDOM` library's implementation is known to
|
3781
|
-
work.
|
3782
|
-
@property document
|
3783
|
-
@type Document
|
3784
|
-
@default the global `document` object
|
3785
|
-
@public
|
3786
|
-
*/
|
3787
|
-
|
3788
|
-
/**
|
3789
|
-
If present, overrides the application's `rootElement` property on
|
3790
|
-
the instance. This is useful for testing environment, where you
|
3791
|
-
might want to append the root view to a fixture area.
|
3792
|
-
In non-browser mode, because Ember does not have access to jQuery,
|
3793
|
-
this options must be specified as a DOM `Element` object instead of
|
3794
|
-
a selector string.
|
3795
|
-
See the documentation on `Ember.Applications`'s `rootElement` for
|
3796
|
-
details.
|
3797
|
-
@property rootElement
|
3798
|
-
@type String|Element
|
3799
|
-
@default null
|
3800
|
-
@public
|
3801
|
-
*/
|
3802
|
-
|
3803
|
-
// Set these options last to give the user a chance to override the
|
3804
|
-
// defaults from the "combo" options like `isBrowser` (although in
|
3805
|
-
// practice, the resulting combination is probably invalid)
|
3806
|
-
|
3807
|
-
/**
|
3808
|
-
If present, overrides the router's `location` property with this
|
3809
|
-
value. This is useful for environments where trying to modify the
|
3810
|
-
URL would be inappropriate.
|
3811
|
-
@property location
|
3812
|
-
@type string
|
3813
|
-
@default null
|
3814
|
-
@public
|
3815
|
-
*/
|
3816
|
-
|
3817
|
-
// For compatibility with existing code
|
3818
4047
|
enifed('ember-application/system/application', ['exports', 'dag-map', 'container/registry', 'ember-metal', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/empty_object', 'ember-runtime/system/lazy_load', 'ember-runtime/system/namespace', 'ember-application/system/resolver', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/controllers/controller', 'ember-metal-views/renderer', 'ember-htmlbars/system/dom-helper', 'ember-views/views/select', 'ember-routing-views/views/outlet', 'ember-views/views/view', 'ember-views/system/event_dispatcher', 'ember-views/system/jquery', 'ember-routing/system/route', 'ember-routing/system/router', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/location/none_location', 'ember-routing/system/cache', 'ember-application/system/application-instance', 'ember-views/views/text_field', 'ember-views/views/text_area', 'ember-views/views/checkbox', 'ember-views/views/legacy_each_view', 'ember-routing-views/components/link-to', 'ember-routing/services/routing', 'ember-extension-support/container_debug_adapter', 'ember-runtime/mixins/registry_proxy', 'ember-metal/environment', 'ember-runtime/ext/rsvp'], function (exports, _dagMap, _containerRegistry, _emberMetal, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalEmpty_object, _emberRuntimeSystemLazy_load, _emberRuntimeSystemNamespace, _emberApplicationSystemResolver, _emberMetalRun_loop, _emberMetalUtils, _emberRuntimeControllersController, _emberMetalViewsRenderer, _emberHtmlbarsSystemDomHelper, _emberViewsViewsSelect, _emberRoutingViewsViewsOutlet, _emberViewsViewsView, _emberViewsSystemEvent_dispatcher, _emberViewsSystemJquery, _emberRoutingSystemRoute, _emberRoutingSystemRouter, _emberRoutingLocationHash_location, _emberRoutingLocationHistory_location, _emberRoutingLocationAuto_location, _emberRoutingLocationNone_location, _emberRoutingSystemCache, _emberApplicationSystemApplicationInstance, _emberViewsViewsText_field, _emberViewsViewsText_area, _emberViewsViewsCheckbox, _emberViewsViewsLegacy_each_view, _emberRoutingViewsComponentsLinkTo, _emberRoutingServicesRouting, _emberExtensionSupportContainer_debug_adapter, _emberRuntimeMixinsRegistry_proxy, _emberMetalEnvironment, _emberRuntimeExtRsvp) {
|
3819
4048
|
/**
|
3820
4049
|
@module ember
|
@@ -4127,12 +4356,15 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4127
4356
|
this._readinessDeferrals = 1;
|
4128
4357
|
this._booted = false;
|
4129
4358
|
|
4130
|
-
|
4131
|
-
|
4132
|
-
|
4359
|
+
this.autoboot = this._globalsMode = !!this.autoboot;
|
4360
|
+
|
4361
|
+
if (this._globalsMode) {
|
4362
|
+
this._prepareForGlobalsMode();
|
4363
|
+
}
|
4133
4364
|
|
4134
|
-
this.
|
4135
|
-
|
4365
|
+
if (this.autoboot) {
|
4366
|
+
this.waitForDOMReady();
|
4367
|
+
}
|
4136
4368
|
},
|
4137
4369
|
|
4138
4370
|
/**
|
@@ -4512,11 +4744,29 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4512
4744
|
_emberMetal.default.BOOTED = true;
|
4513
4745
|
}
|
4514
4746
|
|
4515
|
-
|
4747
|
+
// See documentation on `_autoboot()` for details
|
4748
|
+
if (this.autoboot) {
|
4749
|
+
var instance = undefined;
|
4516
4750
|
|
4517
|
-
|
4518
|
-
|
4519
|
-
|
4751
|
+
if (this._globalsMode) {
|
4752
|
+
// If we already have the __deprecatedInstance__ lying around, boot it to
|
4753
|
+
// avoid unnecessary work
|
4754
|
+
instance = this.__deprecatedInstance__;
|
4755
|
+
} else {
|
4756
|
+
// Otherwise, build an instance and boot it. This is currently unreachable,
|
4757
|
+
// because we forced _globalsMode to === autoboot; but having this branch
|
4758
|
+
// allows us to locally toggle that flag for weeding out legacy globals mode
|
4759
|
+
// dependencies independently
|
4760
|
+
instance = this.buildInstance();
|
4761
|
+
}
|
4762
|
+
|
4763
|
+
instance._bootSync();
|
4764
|
+
|
4765
|
+
// TODO: App.ready() is not called when autoboot is disabled, is this correct?
|
4766
|
+
this.ready();
|
4767
|
+
|
4768
|
+
instance.startRouting();
|
4769
|
+
}
|
4520
4770
|
|
4521
4771
|
// For the asynchronous boot path
|
4522
4772
|
this._bootResolver.resolve(this);
|
@@ -4644,6 +4894,170 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4644
4894
|
instanceInitializer: buildInitializerMethod('instanceInitializers', 'instance initializer')
|
4645
4895
|
});
|
4646
4896
|
|
4897
|
+
Application.reopen({
|
4898
|
+
/**
|
4899
|
+
Boot a new instance of `Ember.ApplicationInstance` for the current
|
4900
|
+
application and navigate it to the given `url`. Returns a `Promise` that
|
4901
|
+
resolves with the instance when the initial routing and rendering is
|
4902
|
+
complete, or rejects with any error that occured during the boot process.
|
4903
|
+
When `autoboot` is disabled, calling `visit` would first cause the
|
4904
|
+
application to boot, which runs the application initializers.
|
4905
|
+
This method also takes a hash of boot-time configuration options for
|
4906
|
+
customizing the instance's behavior. See the documentation on
|
4907
|
+
`Ember.ApplicationInstance.BootOptions` for details.
|
4908
|
+
`Ember.ApplicationInstance.BootOptions` is an interface class that exists
|
4909
|
+
purely to document the available options; you do not need to construct it
|
4910
|
+
manually. Simply pass a regular JavaScript object containing of the
|
4911
|
+
desired options:
|
4912
|
+
```javascript
|
4913
|
+
MyApp.visit("/", { location: "none", rootElement: "#container" });
|
4914
|
+
```
|
4915
|
+
### Supported Scenarios
|
4916
|
+
While the `BootOptions` class exposes a large number of knobs, not all
|
4917
|
+
combinations of them are valid; certain incompatible combinations might
|
4918
|
+
result in unexpected behavior.
|
4919
|
+
For example, booting the instance in the full browser environment
|
4920
|
+
while specifying a foriegn `document` object (e.g. `{ isBrowser: true,
|
4921
|
+
document: iframe.contentDocument }`) does not work correctly today,
|
4922
|
+
largely due to Ember's jQuery dependency.
|
4923
|
+
Currently, there are three officially supported scenarios/configurations.
|
4924
|
+
Usages outside of these scenarios are not guaranteed to work, but please
|
4925
|
+
feel free to file bug reports documenting your experience and any issues
|
4926
|
+
you encountered to help expand support.
|
4927
|
+
#### Browser Applications (Manual Boot)
|
4928
|
+
The setup is largely similar to how Ember works out-of-the-box. Normally,
|
4929
|
+
Ember will boot a default instance for your Application on "DOM ready".
|
4930
|
+
However, you can customize this behavior by disabling `autoboot`.
|
4931
|
+
For example, this allows you to render a miniture demo of your application
|
4932
|
+
into a specific area on your marketing website:
|
4933
|
+
```javascript
|
4934
|
+
import MyApp from 'my-app';
|
4935
|
+
$(function() {
|
4936
|
+
let App = MyApp.create({ autoboot: false });
|
4937
|
+
let options = {
|
4938
|
+
// Override the router's location adapter to prevent it from updating
|
4939
|
+
// the URL in the address bar
|
4940
|
+
location: 'none',
|
4941
|
+
// Override the default `rootElement` on the app to render into a
|
4942
|
+
// specific `div` on the page
|
4943
|
+
rootElement: '#demo'
|
4944
|
+
};
|
4945
|
+
// Start the app at the special demo URL
|
4946
|
+
App.visit('/demo', options);
|
4947
|
+
});
|
4948
|
+
````
|
4949
|
+
Or perhaps you might want to boot two instances of your app on the same
|
4950
|
+
page for a split-screen multiplayer experience:
|
4951
|
+
```javascript
|
4952
|
+
import MyApp from 'my-app';
|
4953
|
+
$(function() {
|
4954
|
+
let App = MyApp.create({ autoboot: false });
|
4955
|
+
let sessionId = MyApp.generateSessionID();
|
4956
|
+
let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });
|
4957
|
+
let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });
|
4958
|
+
Promise.all([player1, player2]).then(() => {
|
4959
|
+
// Both apps have completed the initial render
|
4960
|
+
$('#loading').fadeOut();
|
4961
|
+
});
|
4962
|
+
});
|
4963
|
+
```
|
4964
|
+
Do note that each app instance maintains their own registry/container, so
|
4965
|
+
they will run in complete isolation by default.
|
4966
|
+
#### Server-Side Rendering (also known as FastBoot)
|
4967
|
+
This setup allows you to run your Ember app in a server environment using
|
4968
|
+
Node.js and render its content into static HTML for SEO purposes.
|
4969
|
+
```javascript
|
4970
|
+
const HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);
|
4971
|
+
function renderURL(url) {
|
4972
|
+
let dom = new SimpleDOM.Document();
|
4973
|
+
let rootElement = dom.body;
|
4974
|
+
let options = { isBrowser: false, document: dom, rootElement: rootElement };
|
4975
|
+
return MyApp.visit(options).then(instance => {
|
4976
|
+
try {
|
4977
|
+
return HTMLSerializer.serialize(rootElement.firstChild);
|
4978
|
+
} finally {
|
4979
|
+
instance.destroy();
|
4980
|
+
}
|
4981
|
+
});
|
4982
|
+
}
|
4983
|
+
```
|
4984
|
+
In this scenario, because Ember does not have access to a global `document`
|
4985
|
+
object in the Node.js environment, you must provide one explicitly. In practice,
|
4986
|
+
in the non-browser environment, the stand-in `document` object only need to
|
4987
|
+
implement a limited subset of the full DOM API. The `SimpleDOM` library is known
|
4988
|
+
to work.
|
4989
|
+
Since there is no access to jQuery in the non-browser environment, you must also
|
4990
|
+
specify a DOM `Element` object in the same `document` for the `rootElement` option
|
4991
|
+
(as opposed to a selector string like `"body"`).
|
4992
|
+
See the documentation on the `isBrowser`, `document` and `rootElement` properties
|
4993
|
+
on `Ember.ApplicationInstance.BootOptions` for details.
|
4994
|
+
#### Server-Side Resource Discovery
|
4995
|
+
This setup allows you to run the routing layer of your Ember app in a server
|
4996
|
+
environment using Node.js and completely disable rendering. This allows you
|
4997
|
+
to simulate and discover the resources (i.e. AJAX requests) needed to fufill
|
4998
|
+
a given request and eagerly "push" these resources to the client.
|
4999
|
+
```app/initializers/network-service.js
|
5000
|
+
import BrowserNetworkService from 'app/services/network/browser';
|
5001
|
+
import NodeNetworkService from 'app/services/network/node';
|
5002
|
+
// Inject a (hypothetical) service for abstracting all AJAX calls and use
|
5003
|
+
// the appropiate implementaion on the client/server. This also allows the
|
5004
|
+
// server to log all the AJAX calls made during a particular request and use
|
5005
|
+
// that for resource-discovery purpose.
|
5006
|
+
export function initialize(application) {
|
5007
|
+
if (window) { // browser
|
5008
|
+
application.register('service:network', BrowserNetworkService);
|
5009
|
+
} else { // node
|
5010
|
+
application.register('service:network', NodeNetworkService);
|
5011
|
+
}
|
5012
|
+
application.inject('route', 'network', 'service:network');
|
5013
|
+
};
|
5014
|
+
export default {
|
5015
|
+
name: 'network-service',
|
5016
|
+
initialize: initialize
|
5017
|
+
};
|
5018
|
+
```
|
5019
|
+
```app/routes/post.js
|
5020
|
+
import Ember from 'ember';
|
5021
|
+
// An example of how the (hypothetical) service is used in routes.
|
5022
|
+
export default Ember.Route.extend({
|
5023
|
+
model(params) {
|
5024
|
+
return this.network.fetch(`/api/posts/${params.post_id}.json`);
|
5025
|
+
},
|
5026
|
+
afterModel(post) {
|
5027
|
+
if (post.isExternalContent) {
|
5028
|
+
return this.network.fetch(`/api/external/?url=${post.externalURL}`);
|
5029
|
+
} else {
|
5030
|
+
return post;
|
5031
|
+
}
|
5032
|
+
}
|
5033
|
+
});
|
5034
|
+
```
|
5035
|
+
```javascript
|
5036
|
+
// Finally, put all the pieces together
|
5037
|
+
function discoverResourcesFor(url) {
|
5038
|
+
return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {
|
5039
|
+
let networkService = instance.lookup('service:network');
|
5040
|
+
return networkService.requests; // => { "/api/posts/123.json": "..." }
|
5041
|
+
});
|
5042
|
+
}
|
5043
|
+
```
|
5044
|
+
@method visit
|
5045
|
+
@param url {String} The initial URL to navigate to
|
5046
|
+
@param options {Ember.ApplicationInstance.BootOptions}
|
5047
|
+
@return {Promise<Ember.ApplicationInstance, Error>}
|
5048
|
+
@private
|
5049
|
+
*/
|
5050
|
+
visit: function (url, options) {
|
5051
|
+
var _this = this;
|
5052
|
+
|
5053
|
+
return this.boot().then(function () {
|
5054
|
+
return _this.buildInstance().boot(options).then(function (instance) {
|
5055
|
+
return instance.visit(url);
|
5056
|
+
});
|
5057
|
+
});
|
5058
|
+
}
|
5059
|
+
});
|
5060
|
+
|
4647
5061
|
Application.reopenClass({
|
4648
5062
|
initializers: new _emberMetalEmpty_object.default(),
|
4649
5063
|
instanceInitializers: new _emberMetalEmpty_object.default(),
|
@@ -4953,171 +5367,9 @@ enifed('ember-application/system/application', ['exports', 'dag-map', 'container
|
|
4953
5367
|
});
|
4954
5368
|
// Ember.libraries, LOG_VERSION, Namespace, BOOTED
|
4955
5369
|
|
4956
|
-
//
|
4957
|
-
|
4958
|
-
|
4959
|
-
// avoid unnecessary work
|
4960
|
-
|
4961
|
-
// Otherwise, build an instance and boot it. This is currently unreachable,
|
4962
|
-
// because we forced _globalsMode to === autoboot; but having this branch
|
4963
|
-
// allows us to locally toggle that flag for weeding out legacy globals mode
|
4964
|
-
// dependencies independently
|
4965
|
-
|
4966
|
-
// TODO: App.ready() is not called when autoboot is disabled, is this correct?
|
4967
|
-
|
4968
|
-
/**
|
4969
|
-
Boot a new instance of `Ember.ApplicationInstance` for the current
|
4970
|
-
application and navigate it to the given `url`. Returns a `Promise` that
|
4971
|
-
resolves with the instance when the initial routing and rendering is
|
4972
|
-
complete, or rejects with any error that occured during the boot process.
|
4973
|
-
When `autoboot` is disabled, calling `visit` would first cause the
|
4974
|
-
application to boot, which runs the application initializers.
|
4975
|
-
This method also takes a hash of boot-time configuration options for
|
4976
|
-
customizing the instance's behavior. See the documentation on
|
4977
|
-
`Ember.ApplicationInstance.BootOptions` for details.
|
4978
|
-
`Ember.ApplicationInstance.BootOptions` is an interface class that exists
|
4979
|
-
purely to document the available options; you do not need to construct it
|
4980
|
-
manually. Simply pass a regular JavaScript object containing of the
|
4981
|
-
desired options:
|
4982
|
-
```javascript
|
4983
|
-
MyApp.visit("/", { location: "none", rootElement: "#container" });
|
4984
|
-
```
|
4985
|
-
### Supported Scenarios
|
4986
|
-
While the `BootOptions` class exposes a large number of knobs, not all
|
4987
|
-
combinations of them are valid; certain incompatible combinations might
|
4988
|
-
result in unexpected behavior.
|
4989
|
-
For example, booting the instance in the full browser environment
|
4990
|
-
while specifying a foriegn `document` object (e.g. `{ isBrowser: true,
|
4991
|
-
document: iframe.contentDocument }`) does not work correctly today,
|
4992
|
-
largely due to Ember's jQuery dependency.
|
4993
|
-
Currently, there are three officially supported scenarios/configurations.
|
4994
|
-
Usages outside of these scenarios are not guaranteed to work, but please
|
4995
|
-
feel free to file bug reports documenting your experience and any issues
|
4996
|
-
you encountered to help expand support.
|
4997
|
-
#### Browser Applications (Manual Boot)
|
4998
|
-
The setup is largely similar to how Ember works out-of-the-box. Normally,
|
4999
|
-
Ember will boot a default instance for your Application on "DOM ready".
|
5000
|
-
However, you can customize this behavior by disabling `autoboot`.
|
5001
|
-
For example, this allows you to render a miniture demo of your application
|
5002
|
-
into a specific area on your marketing website:
|
5003
|
-
```javascript
|
5004
|
-
import MyApp from 'my-app';
|
5005
|
-
$(function() {
|
5006
|
-
let App = MyApp.create({ autoboot: false });
|
5007
|
-
let options = {
|
5008
|
-
// Override the router's location adapter to prevent it from updating
|
5009
|
-
// the URL in the address bar
|
5010
|
-
location: 'none',
|
5011
|
-
// Override the default `rootElement` on the app to render into a
|
5012
|
-
// specific `div` on the page
|
5013
|
-
rootElement: '#demo'
|
5014
|
-
};
|
5015
|
-
// Start the app at the special demo URL
|
5016
|
-
App.visit('/demo', options);
|
5017
|
-
});
|
5018
|
-
````
|
5019
|
-
Or perhaps you might want to boot two instances of your app on the same
|
5020
|
-
page for a split-screen multiplayer experience:
|
5021
|
-
```javascript
|
5022
|
-
import MyApp from 'my-app';
|
5023
|
-
$(function() {
|
5024
|
-
let App = MyApp.create({ autoboot: false });
|
5025
|
-
let sessionId = MyApp.generateSessionID();
|
5026
|
-
let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });
|
5027
|
-
let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });
|
5028
|
-
Promise.all([player1, player2]).then(() => {
|
5029
|
-
// Both apps have completed the initial render
|
5030
|
-
$('#loading').fadeOut();
|
5031
|
-
});
|
5032
|
-
});
|
5033
|
-
```
|
5034
|
-
Do note that each app instance maintains their own registry/container, so
|
5035
|
-
they will run in complete isolation by default.
|
5036
|
-
#### Server-Side Rendering (also known as FastBoot)
|
5037
|
-
This setup allows you to run your Ember app in a server environment using
|
5038
|
-
Node.js and render its content into static HTML for SEO purposes.
|
5039
|
-
```javascript
|
5040
|
-
const HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);
|
5041
|
-
function renderURL(url) {
|
5042
|
-
let dom = new SimpleDOM.Document();
|
5043
|
-
let rootElement = dom.body;
|
5044
|
-
let options = { isBrowser: false, document: dom, rootElement: rootElement };
|
5045
|
-
return MyApp.visit(options).then(instance => {
|
5046
|
-
try {
|
5047
|
-
return HTMLSerializer.serialize(rootElement.firstChild);
|
5048
|
-
} finally {
|
5049
|
-
instance.destroy();
|
5050
|
-
}
|
5051
|
-
});
|
5052
|
-
}
|
5053
|
-
```
|
5054
|
-
In this scenario, because Ember does not have access to a global `document`
|
5055
|
-
object in the Node.js environment, you must provide one explicitly. In practice,
|
5056
|
-
in the non-browser environment, the stand-in `document` object only need to
|
5057
|
-
implement a limited subset of the full DOM API. The `SimpleDOM` library is known
|
5058
|
-
to work.
|
5059
|
-
Since there is no access to jQuery in the non-browser environment, you must also
|
5060
|
-
specify a DOM `Element` object in the same `document` for the `rootElement` option
|
5061
|
-
(as opposed to a selector string like `"body"`).
|
5062
|
-
See the documentation on the `isBrowser`, `document` and `rootElement` properties
|
5063
|
-
on `Ember.ApplicationInstance.BootOptions` for details.
|
5064
|
-
#### Server-Side Resource Discovery
|
5065
|
-
This setup allows you to run the routing layer of your Ember app in a server
|
5066
|
-
environment using Node.js and completely disable rendering. This allows you
|
5067
|
-
to simulate and discover the resources (i.e. AJAX requests) needed to fufill
|
5068
|
-
a given request and eagerly "push" these resources to the client.
|
5069
|
-
```app/initializers/network-service.js
|
5070
|
-
import BrowserNetworkService from 'app/services/network/browser';
|
5071
|
-
import NodeNetworkService from 'app/services/network/node';
|
5072
|
-
// Inject a (hypothetical) service for abstracting all AJAX calls and use
|
5073
|
-
// the appropiate implementaion on the client/server. This also allows the
|
5074
|
-
// server to log all the AJAX calls made during a particular request and use
|
5075
|
-
// that for resource-discovery purpose.
|
5076
|
-
export function initialize(application) {
|
5077
|
-
if (window) { // browser
|
5078
|
-
application.register('service:network', BrowserNetworkService);
|
5079
|
-
} else { // node
|
5080
|
-
application.register('service:network', NodeNetworkService);
|
5081
|
-
}
|
5082
|
-
application.inject('route', 'network', 'service:network');
|
5083
|
-
};
|
5084
|
-
export default {
|
5085
|
-
name: 'network-service',
|
5086
|
-
initialize: initialize
|
5087
|
-
};
|
5088
|
-
```
|
5089
|
-
```app/routes/post.js
|
5090
|
-
import Ember from 'ember';
|
5091
|
-
// An example of how the (hypothetical) service is used in routes.
|
5092
|
-
export default Ember.Route.extend({
|
5093
|
-
model(params) {
|
5094
|
-
return this.network.fetch(`/api/posts/${params.post_id}.json`);
|
5095
|
-
},
|
5096
|
-
afterModel(post) {
|
5097
|
-
if (post.isExternalContent) {
|
5098
|
-
return this.network.fetch(`/api/external/?url=${post.externalURL}`);
|
5099
|
-
} else {
|
5100
|
-
return post;
|
5101
|
-
}
|
5102
|
-
}
|
5103
|
-
});
|
5104
|
-
```
|
5105
|
-
```javascript
|
5106
|
-
// Finally, put all the pieces together
|
5107
|
-
function discoverResourcesFor(url) {
|
5108
|
-
return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {
|
5109
|
-
let networkService = instance.lookup('service:network');
|
5110
|
-
return networkService.requests; // => { "/api/posts/123.json": "..." }
|
5111
|
-
});
|
5112
|
-
}
|
5113
|
-
```
|
5114
|
-
@method visit
|
5115
|
-
@param url {String} The initial URL to navigate to
|
5116
|
-
@param options {Ember.ApplicationInstance.BootOptions}
|
5117
|
-
@return {Promise<Ember.ApplicationInstance, Error>}
|
5118
|
-
@private
|
5119
|
-
*/
|
5120
|
-
enifed('ember-application/system/resolver', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/property_get', 'ember-runtime/system/string', 'ember-runtime/system/object', 'ember-runtime/system/namespace', 'ember-htmlbars/helpers', 'ember-application/utils/validate-type', 'ember-metal/dictionary'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalProperty_get, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeSystemNamespace, _emberHtmlbarsHelpers, _emberApplicationUtilsValidateType, _emberMetalDictionary) {
|
5370
|
+
// Force-assign these flags to their default values when the feature is
|
5371
|
+
// disabled, this ensures we can rely on their values in other paths.
|
5372
|
+
enifed('ember-application/system/resolver', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-runtime/system/string', 'ember-runtime/system/object', 'ember-runtime/system/namespace', 'ember-htmlbars/helpers', 'ember-application/utils/validate-type', 'ember-metal/dictionary', 'ember-htmlbars/template_registry'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeSystemNamespace, _emberHtmlbarsHelpers, _emberApplicationUtilsValidateType, _emberMetalDictionary, _emberHtmlbarsTemplate_registry) {
|
5121
5373
|
/**
|
5122
5374
|
@module ember
|
5123
5375
|
@submodule ember-application
|
@@ -5398,14 +5650,7 @@ enifed('ember-application/system/resolver', ['exports', 'ember-metal/core', 'emb
|
|
5398
5650
|
resolveTemplate: function (parsedName) {
|
5399
5651
|
var templateName = parsedName.fullNameWithoutType.replace(/\./g, '/');
|
5400
5652
|
|
5401
|
-
|
5402
|
-
return _emberMetalCore.default.TEMPLATES[templateName];
|
5403
|
-
}
|
5404
|
-
|
5405
|
-
templateName = _emberRuntimeSystemString.decamelize(templateName);
|
5406
|
-
if (_emberMetalCore.default.TEMPLATES.hasOwnProperty(templateName)) {
|
5407
|
-
return _emberMetalCore.default.TEMPLATES[templateName];
|
5408
|
-
}
|
5653
|
+
return _emberHtmlbarsTemplate_registry.get(templateName) || _emberHtmlbarsTemplate_registry.get(_emberRuntimeSystemString.decamelize(templateName));
|
5409
5654
|
},
|
5410
5655
|
|
5411
5656
|
/**
|
@@ -6065,6 +6310,10 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/debug', 'embe
|
|
6065
6310
|
_emberMetalFeatures.FEATURES['features-stripped-test'] = true;
|
6066
6311
|
var featuresWereStripped = true;
|
6067
6312
|
|
6313
|
+
if (_emberMetalFeatures.default('features-stripped-test')) {
|
6314
|
+
exports.featuresWereStripped = featuresWereStripped = false;
|
6315
|
+
}
|
6316
|
+
|
6068
6317
|
delete _emberMetalFeatures.FEATURES['features-stripped-test'];
|
6069
6318
|
_warnIfUsingStrippedFeatureFlags(_emberMetalCore.default.ENV.FEATURES, featuresWereStripped);
|
6070
6319
|
|
@@ -6210,16 +6459,6 @@ enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-met
|
|
6210
6459
|
@public
|
6211
6460
|
*/
|
6212
6461
|
exports.default = _emberRuntimeSystemObject.default.extend({
|
6213
|
-
/**
|
6214
|
-
The container of the application being debugged.
|
6215
|
-
This property will be injected
|
6216
|
-
on creation.
|
6217
|
-
@property container
|
6218
|
-
@default null
|
6219
|
-
@public
|
6220
|
-
*/
|
6221
|
-
container: null,
|
6222
|
-
|
6223
6462
|
/**
|
6224
6463
|
The resolver instance of the application
|
6225
6464
|
being debugged. This property will be injected
|
@@ -6277,7 +6516,7 @@ enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-met
|
|
6277
6516
|
}
|
6278
6517
|
});
|
6279
6518
|
});
|
6280
|
-
enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property_get', 'ember-metal/run_loop', 'ember-runtime/system/string', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-application/system/application'], function (exports, _emberMetalProperty_get, _emberMetalRun_loop, _emberRuntimeSystemString, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemNative_array, _emberApplicationSystemApplication) {
|
6519
|
+
enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property_get', 'ember-metal/run_loop', 'ember-runtime/system/string', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-application/system/application', 'container/owner'], function (exports, _emberMetalProperty_get, _emberMetalRun_loop, _emberRuntimeSystemString, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemNative_array, _emberApplicationSystemApplication, _containerOwner) {
|
6281
6520
|
'use strict';
|
6282
6521
|
|
6283
6522
|
/**
|
@@ -6333,17 +6572,6 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
6333
6572
|
this.releaseMethods = _emberRuntimeSystemNative_array.A();
|
6334
6573
|
},
|
6335
6574
|
|
6336
|
-
/**
|
6337
|
-
The container of the application being debugged.
|
6338
|
-
This property will be injected
|
6339
|
-
on creation.
|
6340
|
-
@property container
|
6341
|
-
@default null
|
6342
|
-
@since 1.3.0
|
6343
|
-
@public
|
6344
|
-
*/
|
6345
|
-
container: null,
|
6346
|
-
|
6347
6575
|
/**
|
6348
6576
|
The container-debug-adapter which is used
|
6349
6577
|
to list all models.
|
@@ -6437,7 +6665,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
6437
6665
|
|
6438
6666
|
_nameToClass: function (type) {
|
6439
6667
|
if (typeof type === 'string') {
|
6440
|
-
type = this.
|
6668
|
+
type = _containerOwner.getOwner(this)._lookupFactory('model:' + type);
|
6441
6669
|
}
|
6442
6670
|
return type;
|
6443
6671
|
},
|
@@ -7844,7 +8072,7 @@ enifed("ember-htmlbars/hooks/cleanup-render-node", ["exports"], function (export
|
|
7844
8072
|
}
|
7845
8073
|
}
|
7846
8074
|
});
|
7847
|
-
enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember-htmlbars/node-managers/component-node-manager', 'ember-views/system/build-component-template', 'ember-htmlbars/utils/lookup-component', 'ember-metal/cache'], function (exports, _emberMetalDebug, _emberHtmlbarsNodeManagersComponentNodeManager, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsUtilsLookupComponent, _emberMetalCache) {
|
8075
|
+
enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember-htmlbars/node-managers/component-node-manager', 'ember-views/system/build-component-template', 'ember-htmlbars/utils/lookup-component', 'ember-metal/cache', 'ember-htmlbars/system/lookup-helper', 'ember-htmlbars/keywords/closure-component'], function (exports, _emberMetalDebug, _emberHtmlbarsNodeManagersComponentNodeManager, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsUtilsLookupComponent, _emberMetalCache, _emberHtmlbarsSystemLookupHelper, _emberHtmlbarsKeywordsClosureComponent) {
|
7848
8076
|
'use strict';
|
7849
8077
|
|
7850
8078
|
exports.default = componentHook;
|
@@ -7853,10 +8081,6 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember
|
|
7853
8081
|
return key.match(/^(@?)<(.*)>$/);
|
7854
8082
|
});
|
7855
8083
|
|
7856
|
-
var CONTAINS_DASH = new _emberMetalCache.default(1000, function (key) {
|
7857
|
-
return key.indexOf('-') !== -1;
|
7858
|
-
});
|
7859
|
-
|
7860
8084
|
function componentHook(renderNode, env, scope, _tagName, params, attrs, templates, visitor) {
|
7861
8085
|
var state = renderNode.getState();
|
7862
8086
|
|
@@ -7867,6 +8091,15 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember
|
|
7867
8091
|
}
|
7868
8092
|
|
7869
8093
|
var tagName = _tagName;
|
8094
|
+
if (_emberHtmlbarsSystemLookupHelper.CONTAINS_DOT_CACHE.get(tagName)) {
|
8095
|
+
var stream = env.hooks.get(env, scope, tagName);
|
8096
|
+
var componentCell = stream.value();
|
8097
|
+
if (_emberHtmlbarsKeywordsClosureComponent.isComponentCell(componentCell)) {
|
8098
|
+
tagName = componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_PATH];
|
8099
|
+
attrs = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(componentCell[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], attrs);
|
8100
|
+
}
|
8101
|
+
}
|
8102
|
+
|
7870
8103
|
var isAngleBracket = false;
|
7871
8104
|
var isTopLevel = false;
|
7872
8105
|
var isDasherized = false;
|
@@ -7879,7 +8112,7 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember
|
|
7879
8112
|
isTopLevel = !!angles[1];
|
7880
8113
|
}
|
7881
8114
|
|
7882
|
-
if (
|
8115
|
+
if (_emberHtmlbarsSystemLookupHelper.CONTAINS_DASH_CACHE.get(tagName)) {
|
7883
8116
|
isDasherized = true;
|
7884
8117
|
}
|
7885
8118
|
|
@@ -7912,7 +8145,7 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/debug', 'ember
|
|
7912
8145
|
var component = undefined,
|
7913
8146
|
layout = undefined;
|
7914
8147
|
if (isDasherized || !isAngleBracket) {
|
7915
|
-
var result = _emberHtmlbarsUtilsLookupComponent.default(env.
|
8148
|
+
var result = _emberHtmlbarsUtilsLookupComponent.default(env.owner, tagName);
|
7916
8149
|
component = result.component;
|
7917
8150
|
layout = result.layout;
|
7918
8151
|
|
@@ -8401,10 +8634,10 @@ enifed('ember-htmlbars/hooks/has-helper', ['exports', 'ember-htmlbars/system/loo
|
|
8401
8634
|
return true;
|
8402
8635
|
}
|
8403
8636
|
|
8404
|
-
var
|
8405
|
-
if (_emberHtmlbarsSystemLookupHelper.validateLazyHelperName(helperName,
|
8406
|
-
var
|
8407
|
-
if (
|
8637
|
+
var owner = env.owner;
|
8638
|
+
if (_emberHtmlbarsSystemLookupHelper.validateLazyHelperName(helperName, owner, env.hooks.keywords)) {
|
8639
|
+
var registrationName = 'helper:' + helperName;
|
8640
|
+
if (owner.hasRegistration(registrationName)) {
|
8408
8641
|
return true;
|
8409
8642
|
}
|
8410
8643
|
}
|
@@ -8686,7 +8919,7 @@ enifed("ember-htmlbars/hooks/will-cleanup-tree", ["exports"], function (exports)
|
|
8686
8919
|
view.ownerView._destroyingSubtreeForView = view;
|
8687
8920
|
}
|
8688
8921
|
});
|
8689
|
-
enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/
|
8922
|
+
enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/debug', 'ember-metal/is_none', 'ember-metal/symbol', 'ember-metal/streams/stream', 'ember-metal/streams/utils', 'ember-htmlbars/hooks/subexpr', 'ember-metal/assign', 'ember-htmlbars/utils/extract-positional-params', 'ember-htmlbars/utils/lookup-component'], function (exports, _emberMetalDebug, _emberMetalIs_none, _emberMetalSymbol, _emberMetalStreamsStream, _emberMetalStreamsUtils, _emberHtmlbarsHooksSubexpr, _emberMetalAssign, _emberHtmlbarsUtilsExtractPositionalParams, _emberHtmlbarsUtilsLookupComponent) {
|
8690
8923
|
/**
|
8691
8924
|
@module ember
|
8692
8925
|
@submodule ember-templates
|
@@ -8696,16 +8929,16 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/uti
|
|
8696
8929
|
|
8697
8930
|
exports.default = closureComponent;
|
8698
8931
|
exports.isComponentCell = isComponentCell;
|
8699
|
-
exports.
|
8700
|
-
var COMPONENT_REFERENCE =
|
8932
|
+
exports.mergeInNewHash = mergeInNewHash;
|
8933
|
+
var COMPONENT_REFERENCE = _emberMetalSymbol.default('COMPONENT_REFERENCE');
|
8701
8934
|
exports.COMPONENT_REFERENCE = COMPONENT_REFERENCE;
|
8702
|
-
var COMPONENT_CELL =
|
8935
|
+
var COMPONENT_CELL = _emberMetalSymbol.default('COMPONENT_CELL');
|
8703
8936
|
exports.COMPONENT_CELL = COMPONENT_CELL;
|
8704
|
-
var COMPONENT_PATH =
|
8937
|
+
var COMPONENT_PATH = _emberMetalSymbol.default('COMPONENT_PATH');
|
8705
8938
|
exports.COMPONENT_PATH = COMPONENT_PATH;
|
8706
|
-
var COMPONENT_POSITIONAL_PARAMS =
|
8939
|
+
var COMPONENT_POSITIONAL_PARAMS = _emberMetalSymbol.default('COMPONENT_POSITIONAL_PARAMS');
|
8707
8940
|
exports.COMPONENT_POSITIONAL_PARAMS = COMPONENT_POSITIONAL_PARAMS;
|
8708
|
-
var COMPONENT_HASH =
|
8941
|
+
var COMPONENT_HASH = _emberMetalSymbol.default('COMPONENT_HASH');
|
8709
8942
|
|
8710
8943
|
exports.COMPONENT_HASH = COMPONENT_HASH;
|
8711
8944
|
var ClosureComponentStream = _emberMetalStreamsStream.default.extend({
|
@@ -8718,7 +8951,7 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/uti
|
|
8718
8951
|
this[COMPONENT_REFERENCE] = true;
|
8719
8952
|
},
|
8720
8953
|
compute: function () {
|
8721
|
-
return createClosureComponentCell(this._env, this._path, this._params, this._hash);
|
8954
|
+
return createClosureComponentCell(this._env, this._path, this._params, this._hash, this.label);
|
8722
8955
|
}
|
8723
8956
|
});
|
8724
8957
|
|
@@ -8745,16 +8978,25 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/uti
|
|
8745
8978
|
return s;
|
8746
8979
|
}
|
8747
8980
|
|
8748
|
-
function createClosureComponentCell(env, originalComponentPath, params, hash) {
|
8981
|
+
function createClosureComponentCell(env, originalComponentPath, params, hash, label) {
|
8749
8982
|
var componentPath = _emberMetalStreamsUtils.read(originalComponentPath);
|
8750
8983
|
|
8984
|
+
_emberMetalDebug.assert('Component path cannot be null in ' + label, !_emberMetalIs_none.default(componentPath));
|
8985
|
+
|
8751
8986
|
if (isComponentCell(componentPath)) {
|
8752
8987
|
return createNestedClosureComponentCell(componentPath, params, hash);
|
8753
8988
|
} else {
|
8989
|
+
_emberMetalDebug.assert('The component helper cannot be used without a valid component name. You used "' + componentPath + '" via ' + label, isValidComponentPath(env, componentPath));
|
8754
8990
|
return createNewClosureComponentCell(env, componentPath, params, hash);
|
8755
8991
|
}
|
8756
8992
|
}
|
8757
8993
|
|
8994
|
+
function isValidComponentPath(env, path) {
|
8995
|
+
var result = _emberHtmlbarsUtilsLookupComponent.default(env.owner, path);
|
8996
|
+
|
8997
|
+
return !!(result.component || result.layout);
|
8998
|
+
}
|
8999
|
+
|
8758
9000
|
function isComponentCell(component) {
|
8759
9001
|
return component && component[COMPONENT_CELL];
|
8760
9002
|
}
|
@@ -8767,13 +9009,13 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/uti
|
|
8767
9009
|
// This needs to be done in each nesting level to avoid raising assertions
|
8768
9010
|
_emberHtmlbarsUtilsExtractPositionalParams.processPositionalParams(null, positionalParams, params, hash);
|
8769
9011
|
|
8770
|
-
return _ref = {}, _ref[COMPONENT_PATH] = componentCell[COMPONENT_PATH], _ref[COMPONENT_HASH] =
|
9012
|
+
return _ref = {}, _ref[COMPONENT_PATH] = componentCell[COMPONENT_PATH], _ref[COMPONENT_HASH] = mergeInNewHash(componentCell[COMPONENT_HASH], hash), _ref[COMPONENT_POSITIONAL_PARAMS] = positionalParams, _ref[COMPONENT_CELL] = true, _ref;
|
8771
9013
|
}
|
8772
9014
|
|
8773
9015
|
function createNewClosureComponentCell(env, componentPath, params, hash) {
|
8774
9016
|
var _ref2;
|
8775
9017
|
|
8776
|
-
var positionalParams = getPositionalParams(env.
|
9018
|
+
var positionalParams = getPositionalParams(env.owner, componentPath);
|
8777
9019
|
|
8778
9020
|
// This needs to be done in each nesting level to avoid raising assertions
|
8779
9021
|
_emberHtmlbarsUtilsExtractPositionalParams.processPositionalParams(null, positionalParams, params, hash);
|
@@ -8799,8 +9041,8 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/uti
|
|
8799
9041
|
}
|
8800
9042
|
}
|
8801
9043
|
|
8802
|
-
function
|
8803
|
-
return _emberMetalAssign.default(original, updates);
|
9044
|
+
function mergeInNewHash(original, updates) {
|
9045
|
+
return _emberMetalAssign.default({}, original, updates);
|
8804
9046
|
}
|
8805
9047
|
});
|
8806
9048
|
enifed('ember-htmlbars/keywords/collection', ['exports', 'ember-views/streams/utils', 'ember-views/views/collection_view', 'ember-htmlbars/node-managers/view-node-manager', 'ember-metal/assign'], function (exports, _emberViewsStreamsUtils, _emberViewsViewsCollection_view, _emberHtmlbarsNodeManagersViewNodeManager, _emberMetalAssign) {
|
@@ -8941,7 +9183,7 @@ enifed('ember-htmlbars/keywords/collection', ['exports', 'ember-views/streams/ut
|
|
8941
9183
|
|
8942
9184
|
return _emberMetalAssign.default({}, state, {
|
8943
9185
|
parentView: env.view,
|
8944
|
-
viewClassOrInstance: getView(read(params[0]), env.
|
9186
|
+
viewClassOrInstance: getView(read(params[0]), env.owner)
|
8945
9187
|
});
|
8946
9188
|
},
|
8947
9189
|
|
@@ -9043,6 +9285,29 @@ enifed('ember-htmlbars/keywords/component', ['exports', 'htmlbars-runtime/hooks'
|
|
9043
9285
|
{{live-updating-chart}}
|
9044
9286
|
```
|
9045
9287
|
|
9288
|
+
## Nested Usage
|
9289
|
+
|
9290
|
+
The `component` helper can be used to package a component path with initial attrs.
|
9291
|
+
The included attrs can then be merged during the final invocation.
|
9292
|
+
|
9293
|
+
For example, given a `person-form` component with the following template:
|
9294
|
+
|
9295
|
+
```handlebars
|
9296
|
+
{{yield (hash
|
9297
|
+
nameInput=(component "input" value=model.name placeholder="First Name"))}}
|
9298
|
+
```
|
9299
|
+
|
9300
|
+
The following snippet:
|
9301
|
+
|
9302
|
+
```
|
9303
|
+
{{#person-form as |form|}}
|
9304
|
+
{{component form.nameInput placeholder="Username"}}
|
9305
|
+
{{/person-form}}
|
9306
|
+
```
|
9307
|
+
|
9308
|
+
would output an input whose value is already bound to `model.name` and `placeholder`
|
9309
|
+
is "Username".
|
9310
|
+
|
9046
9311
|
@method component
|
9047
9312
|
@since 1.11.0
|
9048
9313
|
@for Ember.Templates.helpers
|
@@ -9050,8 +9315,11 @@ enifed('ember-htmlbars/keywords/component', ['exports', 'htmlbars-runtime/hooks'
|
|
9050
9315
|
*/
|
9051
9316
|
|
9052
9317
|
exports.default = function (morph, env, scope, params, hash, template, inverse, visitor) {
|
9053
|
-
|
9054
|
-
|
9318
|
+
if (morph) {
|
9319
|
+
_htmlbarsRuntimeHooks.keyword('@element_component', morph, env, scope, params, hash, template, inverse, visitor);
|
9320
|
+
return true;
|
9321
|
+
}
|
9322
|
+
return _emberHtmlbarsKeywordsClosureComponent.default(env, params, hash);
|
9055
9323
|
};
|
9056
9324
|
});
|
9057
9325
|
enifed('ember-htmlbars/keywords/debugger', ['exports', 'ember-metal/debug'], function (exports, _emberMetalDebug) {
|
@@ -9222,7 +9490,7 @@ enifed('ember-htmlbars/keywords/element-component', ['exports', 'ember-metal/ass
|
|
9222
9490
|
// This needs to be done in each nesting level to avoid raising assertions
|
9223
9491
|
_emberHtmlbarsUtilsExtractPositionalParams.processPositionalParams(null, positionalParams, params, hash);
|
9224
9492
|
params = [];
|
9225
|
-
hash = _emberHtmlbarsKeywordsClosureComponent.
|
9493
|
+
hash = _emberHtmlbarsKeywordsClosureComponent.mergeInNewHash(closureComponent[_emberHtmlbarsKeywordsClosureComponent.COMPONENT_HASH], hash);
|
9226
9494
|
}
|
9227
9495
|
|
9228
9496
|
var templates = { default: template, inverse: inverse };
|
@@ -9598,7 +9866,7 @@ enifed('ember-htmlbars/keywords/legacy-yield', ['exports', 'ember-metal/streams/
|
|
9598
9866
|
return true;
|
9599
9867
|
}
|
9600
9868
|
});
|
9601
|
-
enifed('ember-htmlbars/keywords/mut', ['exports', 'ember-metal/debug', 'ember-metal/
|
9869
|
+
enifed('ember-htmlbars/keywords/mut', ['exports', 'ember-metal/debug', 'ember-metal/symbol', 'ember-metal/streams/proxy-stream', 'ember-metal/streams/stream', 'ember-metal/streams/utils', 'ember-views/compat/attrs-proxy', 'ember-routing-htmlbars/keywords/closure-action'], function (exports, _emberMetalDebug, _emberMetalSymbol, _emberMetalStreamsProxyStream, _emberMetalStreamsStream, _emberMetalStreamsUtils, _emberViewsCompatAttrsProxy, _emberRoutingHtmlbarsKeywordsClosureAction) {
|
9602
9870
|
/**
|
9603
9871
|
@module ember
|
9604
9872
|
@submodule ember-templates
|
@@ -9610,7 +9878,7 @@ enifed('ember-htmlbars/keywords/mut', ['exports', 'ember-metal/debug', 'ember-me
|
|
9610
9878
|
|
9611
9879
|
exports.default = mut;
|
9612
9880
|
exports.privateMut = privateMut;
|
9613
|
-
var MUTABLE_REFERENCE =
|
9881
|
+
var MUTABLE_REFERENCE = _emberMetalSymbol.default('MUTABLE_REFERENCE');
|
9614
9882
|
|
9615
9883
|
exports.MUTABLE_REFERENCE = MUTABLE_REFERENCE;
|
9616
9884
|
var MutStream = _emberMetalStreamsProxyStream.default.extend((_ProxyStream$extend = {
|
@@ -9738,7 +10006,7 @@ enifed('ember-htmlbars/keywords/outlet', ['exports', 'ember-metal/debug', 'ember
|
|
9738
10006
|
|
9739
10007
|
'use strict';
|
9740
10008
|
|
9741
|
-
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.
|
10009
|
+
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.3.0-beta.1';
|
9742
10010
|
|
9743
10011
|
/**
|
9744
10012
|
The `{{outlet}}` helper lets you specify where a child routes will render in
|
@@ -9836,17 +10104,21 @@ enifed('ember-htmlbars/keywords/outlet', ['exports', 'ember-metal/debug', 'ember
|
|
9836
10104
|
var parentView = env.view;
|
9837
10105
|
var outletState = state.outletState;
|
9838
10106
|
var toRender = outletState.render;
|
9839
|
-
var namespace = env.
|
10107
|
+
var namespace = env.owner.lookup('application:main');
|
9840
10108
|
var LOG_VIEW_LOOKUPS = _emberMetalProperty_get.get(namespace, 'LOG_VIEW_LOOKUPS');
|
9841
10109
|
|
9842
10110
|
var ViewClass = outletState.render.ViewClass;
|
9843
10111
|
|
9844
10112
|
if (!state.hasParentOutlet && !ViewClass) {
|
9845
|
-
ViewClass = env.
|
10113
|
+
ViewClass = env.owner._lookupFactory('view:toplevel');
|
9846
10114
|
}
|
9847
10115
|
|
9848
10116
|
var Component;
|
9849
10117
|
|
10118
|
+
if (_emberMetalFeatures.default('ember-routing-routable-components')) {
|
10119
|
+
Component = outletState.render.Component;
|
10120
|
+
}
|
10121
|
+
|
9850
10122
|
var options;
|
9851
10123
|
var attrs = {};
|
9852
10124
|
if (Component) {
|
@@ -10465,7 +10737,7 @@ enifed('ember-htmlbars/keywords/view', ['exports', 'ember-views/streams/utils',
|
|
10465
10737
|
var targetObject = read(scope.getSelf());
|
10466
10738
|
var viewClassOrInstance = state.viewClassOrInstance;
|
10467
10739
|
if (!viewClassOrInstance) {
|
10468
|
-
viewClassOrInstance = getView(read(params[0]), env.
|
10740
|
+
viewClassOrInstance = getView(read(params[0]), env.owner);
|
10469
10741
|
}
|
10470
10742
|
|
10471
10743
|
// if parentView exists, use its controller (the default
|
@@ -10532,17 +10804,17 @@ enifed('ember-htmlbars/keywords/view', ['exports', 'ember-views/streams/utils',
|
|
10532
10804
|
}
|
10533
10805
|
};
|
10534
10806
|
|
10535
|
-
function getView(viewPath,
|
10807
|
+
function getView(viewPath, owner) {
|
10536
10808
|
var viewClassOrInstance;
|
10537
10809
|
|
10538
10810
|
if (!viewPath) {
|
10539
|
-
if (
|
10540
|
-
viewClassOrInstance =
|
10811
|
+
if (owner) {
|
10812
|
+
viewClassOrInstance = owner._lookupFactory('view:toplevel');
|
10541
10813
|
} else {
|
10542
10814
|
viewClassOrInstance = _emberViewsViewsView.default;
|
10543
10815
|
}
|
10544
10816
|
} else {
|
10545
|
-
viewClassOrInstance = _emberViewsStreamsUtils.readViewFactory(viewPath,
|
10817
|
+
viewClassOrInstance = _emberViewsStreamsUtils.readViewFactory(viewPath, owner);
|
10546
10818
|
}
|
10547
10819
|
|
10548
10820
|
return viewClassOrInstance;
|
@@ -10743,14 +11015,14 @@ enifed('ember-htmlbars/morphs/morph', ['exports', 'dom-helper', 'ember-metal/deb
|
|
10743
11015
|
|
10744
11016
|
exports.default = EmberMorph;
|
10745
11017
|
});
|
10746
|
-
enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember-metal/debug', 'ember-views/system/build-component-template', 'ember-htmlbars/hooks/get-cell-or-value', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-views/compat/attrs-proxy', 'ember-htmlbars/system/instrumentation-support', 'ember-views/components/component', 'ember-htmlbars/glimmer-component', 'ember-htmlbars/utils/extract-positional-params', 'ember-metal/
|
11018
|
+
enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember-metal/debug', 'ember-views/system/build-component-template', 'ember-htmlbars/hooks/get-cell-or-value', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-views/compat/attrs-proxy', 'ember-htmlbars/system/instrumentation-support', 'ember-views/components/component', 'ember-htmlbars/glimmer-component', 'ember-htmlbars/utils/extract-positional-params', 'ember-metal/symbol', 'container/owner', 'ember-htmlbars/hooks/get-value'], function (exports, _emberMetalDebug, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsHooksGetCellOrValue, _emberMetalProperty_get, _emberMetalProperty_set, _emberViewsCompatAttrsProxy, _emberHtmlbarsSystemInstrumentationSupport, _emberViewsComponentsComponent, _emberHtmlbarsGlimmerComponent, _emberHtmlbarsUtilsExtractPositionalParams, _emberMetalSymbol, _containerOwner, _emberHtmlbarsHooksGetValue) {
|
10747
11019
|
'use strict';
|
10748
11020
|
|
10749
11021
|
exports.createComponent = createComponent;
|
10750
11022
|
exports.takeLegacySnapshot = takeLegacySnapshot;
|
10751
11023
|
|
10752
11024
|
// These symbols will be used to limit link-to's public API surface area.
|
10753
|
-
var HAS_BLOCK =
|
11025
|
+
var HAS_BLOCK = _emberMetalSymbol.default('HAS_BLOCK');
|
10754
11026
|
|
10755
11027
|
exports.HAS_BLOCK = HAS_BLOCK;
|
10756
11028
|
// In theory this should come through the env, but it should
|
@@ -10983,14 +11255,12 @@ enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember
|
|
10983
11255
|
props._isAngleBracket = true;
|
10984
11256
|
}
|
10985
11257
|
|
10986
|
-
|
10987
|
-
props.
|
11258
|
+
_containerOwner.setOwner(props, env.owner);
|
11259
|
+
props.renderer = props.parentView ? props.parentView.renderer : env.owner.lookup('renderer:-dom');
|
11260
|
+
props._viewRegistry = props.parentView ? props.parentView._viewRegistry : env.owner.lookup('-view-registry:main');
|
10988
11261
|
|
10989
11262
|
var component = _component.create(props);
|
10990
11263
|
|
10991
|
-
// for the fallback case
|
10992
|
-
component.container = component.container || env.container;
|
10993
|
-
|
10994
11264
|
if (props.parentView) {
|
10995
11265
|
props.parentView.appendChild(component);
|
10996
11266
|
|
@@ -11055,7 +11325,7 @@ enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember
|
|
11055
11325
|
return env.childWithView(this.emberView);
|
11056
11326
|
}
|
11057
11327
|
});
|
11058
|
-
enifed('ember-htmlbars/node-managers/view-node-manager', ['exports', 'ember-metal/assign', 'ember-metal/debug', 'ember-views/system/build-component-template', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-views/views/view', 'ember-views/compat/attrs-proxy', 'ember-htmlbars/hooks/get-cell-or-value', 'ember-htmlbars/system/instrumentation-support', 'ember-htmlbars/node-managers/component-node-manager', 'ember-htmlbars/hooks/get-value'], function (exports, _emberMetalAssign, _emberMetalDebug, _emberViewsSystemBuildComponentTemplate, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberViewsViewsView, _emberViewsCompatAttrsProxy, _emberHtmlbarsHooksGetCellOrValue, _emberHtmlbarsSystemInstrumentationSupport, _emberHtmlbarsNodeManagersComponentNodeManager, _emberHtmlbarsHooksGetValue) {
|
11328
|
+
enifed('ember-htmlbars/node-managers/view-node-manager', ['exports', 'ember-metal/assign', 'ember-metal/debug', 'ember-views/system/build-component-template', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-views/views/view', 'ember-views/compat/attrs-proxy', 'ember-htmlbars/hooks/get-cell-or-value', 'ember-htmlbars/system/instrumentation-support', 'ember-htmlbars/node-managers/component-node-manager', 'container/owner', 'ember-htmlbars/hooks/get-value'], function (exports, _emberMetalAssign, _emberMetalDebug, _emberViewsSystemBuildComponentTemplate, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberViewsViewsView, _emberViewsCompatAttrsProxy, _emberHtmlbarsHooksGetCellOrValue, _emberHtmlbarsSystemInstrumentationSupport, _emberHtmlbarsNodeManagersComponentNodeManager, _containerOwner, _emberHtmlbarsHooksGetValue) {
|
11059
11329
|
'use strict';
|
11060
11330
|
|
11061
11331
|
exports.createOrUpdateComponent = createOrUpdateComponent;
|
@@ -11234,9 +11504,12 @@ enifed('ember-htmlbars/node-managers/view-node-manager', ['exports', 'ember-meta
|
|
11234
11504
|
}
|
11235
11505
|
|
11236
11506
|
mergeBindings(props, snapshot);
|
11237
|
-
|
11238
|
-
|
11239
|
-
|
11507
|
+
|
11508
|
+
var owner = options.parentView ? _containerOwner.getOwner(options.parentView) : env.owner;
|
11509
|
+
|
11510
|
+
_containerOwner.setOwner(props, owner);
|
11511
|
+
props.renderer = options.parentView ? options.parentView.renderer : owner && owner.lookup('renderer:-dom');
|
11512
|
+
props._viewRegistry = options.parentView ? options.parentView._viewRegistry : owner && owner.lookup('-view-registry:main');
|
11240
11513
|
|
11241
11514
|
if (proto.controller !== defaultController || hasSuppliedController) {
|
11242
11515
|
delete props._context;
|
@@ -11444,7 +11717,7 @@ enifed('ember-htmlbars/system/append-templated-view', ['exports', 'ember-metal/d
|
|
11444
11717
|
return parentView.appendChild(viewClassOrInstance, props);
|
11445
11718
|
}
|
11446
11719
|
});
|
11447
|
-
enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-
|
11720
|
+
enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-views/component_lookup', 'ember-views/system/jquery', 'ember-metal/error', 'ember-runtime/system/lazy_load', 'ember-template-compiler/system/compile', 'ember-metal/environment', 'ember-htmlbars/template_registry'], function (exports, _emberViewsComponent_lookup, _emberViewsSystemJquery, _emberMetalError, _emberRuntimeSystemLazy_load, _emberTemplateCompilerSystemCompile, _emberMetalEnvironment, _emberHtmlbarsTemplate_registry) {
|
11448
11721
|
/*globals Handlebars */
|
11449
11722
|
|
11450
11723
|
/**
|
@@ -11498,12 +11771,12 @@ enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-metal/core', 'ember
|
|
11498
11771
|
}
|
11499
11772
|
|
11500
11773
|
// Check if template of same name already exists
|
11501
|
-
if (
|
11774
|
+
if (_emberHtmlbarsTemplate_registry.has(templateName)) {
|
11502
11775
|
throw new _emberMetalError.default('Template named "' + templateName + '" already exists.');
|
11503
11776
|
}
|
11504
11777
|
|
11505
11778
|
// For templates which have a name, we save them and then remove them from the DOM
|
11506
|
-
|
11779
|
+
_emberHtmlbarsTemplate_registry.set(templateName, template);
|
11507
11780
|
|
11508
11781
|
// Remove script tag from DOM
|
11509
11782
|
script.remove();
|
@@ -11634,6 +11907,11 @@ enifed('ember-htmlbars/system/lookup-helper', ['exports', 'ember-metal/debug', '
|
|
11634
11907
|
});
|
11635
11908
|
|
11636
11909
|
exports.CONTAINS_DASH_CACHE = CONTAINS_DASH_CACHE;
|
11910
|
+
var CONTAINS_DOT_CACHE = new _emberMetalCache.default(1000, function (key) {
|
11911
|
+
return key.indexOf('.') !== -1;
|
11912
|
+
});
|
11913
|
+
|
11914
|
+
exports.CONTAINS_DOT_CACHE = CONTAINS_DOT_CACHE;
|
11637
11915
|
|
11638
11916
|
function validateLazyHelperName(helperName, container, keywords) {
|
11639
11917
|
return container && !(helperName in keywords);
|
@@ -11658,11 +11936,11 @@ enifed('ember-htmlbars/system/lookup-helper', ['exports', 'ember-metal/debug', '
|
|
11658
11936
|
var helper = env.helpers[name];
|
11659
11937
|
|
11660
11938
|
if (!helper) {
|
11661
|
-
var
|
11662
|
-
if (validateLazyHelperName(name,
|
11939
|
+
var owner = env.owner;
|
11940
|
+
if (validateLazyHelperName(name, owner, env.hooks.keywords)) {
|
11663
11941
|
var helperName = 'helper:' + name;
|
11664
|
-
if (
|
11665
|
-
helper =
|
11942
|
+
if (owner.hasRegistration(helperName)) {
|
11943
|
+
helper = owner._lookupFactory(helperName);
|
11666
11944
|
_emberMetalDebug.assert('Expected to find an Ember.Helper with the name ' + helperName + ', but found an object of type ' + typeof helper + ' instead.', helper.isHelperFactory || helper.isHelperInstance);
|
11667
11945
|
}
|
11668
11946
|
}
|
@@ -11737,7 +12015,7 @@ enifed('ember-htmlbars/system/make_bound_helper', ['exports', 'ember-metal/debug
|
|
11737
12015
|
return _emberHtmlbarsHelper.helper(fn);
|
11738
12016
|
}
|
11739
12017
|
});
|
11740
|
-
enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'ember-metal-views/renderer'], function (exports, _emberHtmlbarsEnv, _emberMetalViewsRenderer) {
|
12018
|
+
enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'ember-metal-views/renderer', 'container/owner'], function (exports, _emberHtmlbarsEnv, _emberMetalViewsRenderer, _containerOwner) {
|
11741
12019
|
'use strict';
|
11742
12020
|
|
11743
12021
|
exports.default = RenderEnv;
|
@@ -11750,7 +12028,7 @@ enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'em
|
|
11750
12028
|
|
11751
12029
|
this.view = options.view;
|
11752
12030
|
this.outletState = options.outletState;
|
11753
|
-
this.
|
12031
|
+
this.owner = options.owner;
|
11754
12032
|
this.renderer = options.renderer;
|
11755
12033
|
this.dom = options.dom;
|
11756
12034
|
|
@@ -11764,7 +12042,7 @@ enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'em
|
|
11764
12042
|
return new RenderEnv({
|
11765
12043
|
view: view,
|
11766
12044
|
outletState: view.outletState,
|
11767
|
-
|
12045
|
+
owner: _containerOwner.getOwner(view),
|
11768
12046
|
renderer: view.renderer,
|
11769
12047
|
dom: view.renderer._dom
|
11770
12048
|
});
|
@@ -11774,7 +12052,7 @@ enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'em
|
|
11774
12052
|
return new RenderEnv({
|
11775
12053
|
view: view,
|
11776
12054
|
outletState: this.outletState,
|
11777
|
-
|
12055
|
+
owner: this.owner,
|
11778
12056
|
renderer: this.renderer,
|
11779
12057
|
dom: this.dom,
|
11780
12058
|
lifecycleHooks: this.lifecycleHooks,
|
@@ -11790,7 +12068,7 @@ enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'em
|
|
11790
12068
|
return new RenderEnv({
|
11791
12069
|
view: this.view,
|
11792
12070
|
outletState: outletState,
|
11793
|
-
|
12071
|
+
owner: this.owner,
|
11794
12072
|
renderer: this.renderer,
|
11795
12073
|
dom: this.dom,
|
11796
12074
|
lifecycleHooks: this.lifecycleHooks,
|
@@ -11818,6 +12096,41 @@ enifed('ember-htmlbars/system/render-view', ['exports', 'ember-htmlbars/node-man
|
|
11818
12096
|
nodeManager.render(env, {});
|
11819
12097
|
}
|
11820
12098
|
});
|
12099
|
+
enifed("ember-htmlbars/template_registry", ["exports"], function (exports) {
|
12100
|
+
// STATE within a module is frowned apon, this exists
|
12101
|
+
// to support Ember.TEMPLATES but shield ember internals from this legacy
|
12102
|
+
// global API
|
12103
|
+
"use strict";
|
12104
|
+
|
12105
|
+
exports.setTemplates = setTemplates;
|
12106
|
+
exports.getTemplates = getTemplates;
|
12107
|
+
exports.get = get;
|
12108
|
+
exports.has = has;
|
12109
|
+
exports.set = set;
|
12110
|
+
var TEMPLATES = {};
|
12111
|
+
|
12112
|
+
function setTemplates(templates) {
|
12113
|
+
TEMPLATES = templates;
|
12114
|
+
}
|
12115
|
+
|
12116
|
+
function getTemplates() {
|
12117
|
+
return TEMPLATES;
|
12118
|
+
}
|
12119
|
+
|
12120
|
+
function get(name) {
|
12121
|
+
if (TEMPLATES.hasOwnProperty(name)) {
|
12122
|
+
return TEMPLATES[name];
|
12123
|
+
}
|
12124
|
+
}
|
12125
|
+
|
12126
|
+
function has(name) {
|
12127
|
+
return TEMPLATES.hasOwnProperty(name);
|
12128
|
+
}
|
12129
|
+
|
12130
|
+
function set(name, template) {
|
12131
|
+
return TEMPLATES[name] = template;
|
12132
|
+
}
|
12133
|
+
});
|
11821
12134
|
enifed("ember-htmlbars/templates/component", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) {
|
11822
12135
|
"use strict";
|
11823
12136
|
|
@@ -12730,7 +13043,7 @@ enifed('ember-htmlbars/utils/extract-positional-params', ['exports', 'ember-meta
|
|
12730
13043
|
}
|
12731
13044
|
}
|
12732
13045
|
});
|
12733
|
-
enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-htmlbars/system/lookup-helper'], function (exports, _emberHtmlbarsSystemLookupHelper) {
|
13046
|
+
enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-htmlbars/system/lookup-helper', 'ember-htmlbars/keywords/closure-component', 'ember-metal/streams/utils'], function (exports, _emberHtmlbarsSystemLookupHelper, _emberHtmlbarsKeywordsClosureComponent, _emberMetalStreamsUtils) {
|
12734
13047
|
/**
|
12735
13048
|
@module ember
|
12736
13049
|
@submodule ember-htmlbars
|
@@ -12746,14 +13059,25 @@ enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-htmlbars/system/l
|
|
12746
13059
|
*/
|
12747
13060
|
|
12748
13061
|
function isComponent(env, scope, path) {
|
12749
|
-
var
|
12750
|
-
if (!
|
13062
|
+
var owner = env.owner;
|
13063
|
+
if (!owner) {
|
12751
13064
|
return false;
|
12752
13065
|
}
|
12753
|
-
if (
|
12754
|
-
|
13066
|
+
if (typeof path === 'string') {
|
13067
|
+
if (_emberHtmlbarsSystemLookupHelper.CONTAINS_DOT_CACHE.get(path)) {
|
13068
|
+
var stream = env.hooks.get(env, scope, path);
|
13069
|
+
if (_emberMetalStreamsUtils.isStream(stream)) {
|
13070
|
+
var cell = stream.value();
|
13071
|
+
if (_emberHtmlbarsKeywordsClosureComponent.isComponentCell(cell)) {
|
13072
|
+
return true;
|
13073
|
+
}
|
13074
|
+
}
|
13075
|
+
}
|
13076
|
+
if (!_emberHtmlbarsSystemLookupHelper.CONTAINS_DASH_CACHE.get(path)) {
|
13077
|
+
return false;
|
13078
|
+
}
|
13079
|
+
return owner.hasRegistration('component:' + path) || owner.hasRegistration('template:components/' + path);
|
12755
13080
|
}
|
12756
|
-
return container.registry.has('component:' + path) || container.registry.has('template:components/' + path);
|
12757
13081
|
}
|
12758
13082
|
});
|
12759
13083
|
enifed('ember-htmlbars/utils/lookup-component', ['exports'], function (exports) {
|
@@ -12890,7 +13214,7 @@ enifed('ember-htmlbars/utils/update-scope', ['exports', 'ember-metal/streams/pro
|
|
12890
13214
|
}
|
12891
13215
|
}
|
12892
13216
|
});
|
12893
|
-
enifed('ember-htmlbars', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-template-compiler', 'ember-htmlbars/system/make_bound_helper', 'ember-htmlbars/helpers', 'ember-htmlbars/helpers/if_unless', 'ember-htmlbars/helpers/with', 'ember-htmlbars/helpers/loc', 'ember-htmlbars/helpers/log', 'ember-htmlbars/helpers/each', 'ember-htmlbars/helpers/each-in', 'ember-htmlbars/helpers/-normalize-class', 'ember-htmlbars/helpers/-concat', 'ember-htmlbars/helpers/-join-classes', 'ember-htmlbars/helpers/-legacy-each-with-controller', 'ember-htmlbars/helpers/-legacy-each-with-keyword', 'ember-htmlbars/helpers/-html-safe', 'ember-htmlbars/helpers/hash', 'ember-htmlbars/system/dom-helper', 'ember-htmlbars/helper', 'ember-htmlbars/glimmer-component', 'ember-htmlbars/system/bootstrap', 'ember-htmlbars/compat'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberTemplateCompiler, _emberHtmlbarsSystemMake_bound_helper, _emberHtmlbarsHelpers, _emberHtmlbarsHelpersIf_unless, _emberHtmlbarsHelpersWith, _emberHtmlbarsHelpersLoc, _emberHtmlbarsHelpersLog, _emberHtmlbarsHelpersEach, _emberHtmlbarsHelpersEachIn, _emberHtmlbarsHelpersNormalizeClass, _emberHtmlbarsHelpersConcat, _emberHtmlbarsHelpersJoinClasses, _emberHtmlbarsHelpersLegacyEachWithController, _emberHtmlbarsHelpersLegacyEachWithKeyword, _emberHtmlbarsHelpersHtmlSafe, _emberHtmlbarsHelpersHash, _emberHtmlbarsSystemDomHelper, _emberHtmlbarsHelper, _emberHtmlbarsGlimmerComponent, _emberHtmlbarsSystemBootstrap, _emberHtmlbarsCompat) {
|
13217
|
+
enifed('ember-htmlbars', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-template-compiler', 'ember-htmlbars/system/make_bound_helper', 'ember-htmlbars/helpers', 'ember-htmlbars/helpers/if_unless', 'ember-htmlbars/helpers/with', 'ember-htmlbars/helpers/loc', 'ember-htmlbars/helpers/log', 'ember-htmlbars/helpers/each', 'ember-htmlbars/helpers/each-in', 'ember-htmlbars/helpers/-normalize-class', 'ember-htmlbars/helpers/-concat', 'ember-htmlbars/helpers/-join-classes', 'ember-htmlbars/helpers/-legacy-each-with-controller', 'ember-htmlbars/helpers/-legacy-each-with-keyword', 'ember-htmlbars/helpers/-html-safe', 'ember-htmlbars/helpers/hash', 'ember-htmlbars/system/dom-helper', 'ember-htmlbars/helper', 'ember-htmlbars/glimmer-component', 'ember-htmlbars/template_registry', 'ember-htmlbars/system/bootstrap', 'ember-htmlbars/compat'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberTemplateCompiler, _emberHtmlbarsSystemMake_bound_helper, _emberHtmlbarsHelpers, _emberHtmlbarsHelpersIf_unless, _emberHtmlbarsHelpersWith, _emberHtmlbarsHelpersLoc, _emberHtmlbarsHelpersLog, _emberHtmlbarsHelpersEach, _emberHtmlbarsHelpersEachIn, _emberHtmlbarsHelpersNormalizeClass, _emberHtmlbarsHelpersConcat, _emberHtmlbarsHelpersJoinClasses, _emberHtmlbarsHelpersLegacyEachWithController, _emberHtmlbarsHelpersLegacyEachWithKeyword, _emberHtmlbarsHelpersHtmlSafe, _emberHtmlbarsHelpersHash, _emberHtmlbarsSystemDomHelper, _emberHtmlbarsHelper, _emberHtmlbarsGlimmerComponent, _emberHtmlbarsTemplate_registry, _emberHtmlbarsSystemBootstrap, _emberHtmlbarsCompat) {
|
12894
13218
|
/**
|
12895
13219
|
Ember templates are executed by [HTMLBars](https://github.com/tildeio/htmlbars),
|
12896
13220
|
an HTML-friendly version of [Handlebars](http://handlebarsjs.com/). Any valid Handlebars syntax is valid in an Ember template.
|
@@ -13001,6 +13325,8 @@ enifed('ember-htmlbars', ['exports', 'ember-metal/core', 'ember-metal/features',
|
|
13001
13325
|
_emberHtmlbarsHelpers.registerHelper('-join-classes', _emberHtmlbarsHelpersJoinClasses.default);
|
13002
13326
|
_emberHtmlbarsHelpers.registerHelper('-html-safe', _emberHtmlbarsHelpersHtmlSafe.default);
|
13003
13327
|
|
13328
|
+
_emberHtmlbarsHelpers.registerHelper('hash', _emberHtmlbarsHelpersHash.default);
|
13329
|
+
|
13004
13330
|
if (_emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
13005
13331
|
_emberHtmlbarsHelpers.registerHelper('-legacy-each-with-controller', _emberHtmlbarsHelpersLegacyEachWithController.default);
|
13006
13332
|
_emberHtmlbarsHelpers.registerHelper('-legacy-each-with-keyword', _emberHtmlbarsHelpersLegacyEachWithKeyword.default);
|
@@ -13015,8 +13341,28 @@ enifed('ember-htmlbars', ['exports', 'ember-metal/core', 'ember-metal/features',
|
|
13015
13341
|
DOMHelper: _emberHtmlbarsSystemDomHelper.default
|
13016
13342
|
};
|
13017
13343
|
|
13344
|
+
if (_emberMetalFeatures.default('ember-htmlbars-component-generation')) {
|
13345
|
+
_emberMetalCore.default.GlimmerComponent = _emberHtmlbarsGlimmerComponent.default;
|
13346
|
+
}
|
13347
|
+
|
13018
13348
|
_emberHtmlbarsHelper.default.helper = _emberHtmlbarsHelper.helper;
|
13019
13349
|
_emberMetalCore.default.Helper = _emberHtmlbarsHelper.default;
|
13350
|
+
|
13351
|
+
/**
|
13352
|
+
Global hash of shared templates. This will automatically be populated
|
13353
|
+
by the build tools so that you can store your Handlebars templates in
|
13354
|
+
separate files that get loaded into JavaScript at buildtime.
|
13355
|
+
|
13356
|
+
@property TEMPLATES
|
13357
|
+
@for Ember
|
13358
|
+
@type Object
|
13359
|
+
@private
|
13360
|
+
*/
|
13361
|
+
Object.defineProperty(_emberMetalCore.default, 'TEMPLATES', {
|
13362
|
+
configurable: false,
|
13363
|
+
get: _emberHtmlbarsTemplate_registry.getTemplates,
|
13364
|
+
set: _emberHtmlbarsTemplate_registry.setTemplates
|
13365
|
+
});
|
13020
13366
|
});
|
13021
13367
|
|
13022
13368
|
// importing adds template bootstrapping
|
@@ -13798,7 +14144,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
13798
14144
|
return;
|
13799
14145
|
}
|
13800
14146
|
|
13801
|
-
var m = obj
|
14147
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
13802
14148
|
|
13803
14149
|
if (!m || !m.readableChainWatchers()) {
|
13804
14150
|
return;
|
@@ -13846,7 +14192,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
13846
14192
|
return;
|
13847
14193
|
}
|
13848
14194
|
|
13849
|
-
var meta = obj
|
14195
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
13850
14196
|
|
13851
14197
|
// check if object meant only to be a prototype
|
13852
14198
|
if (meta && meta.proto === obj) {
|
@@ -14052,7 +14398,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14052
14398
|
|
14053
14399
|
function finishChains(obj) {
|
14054
14400
|
// We only create meta if we really have to
|
14055
|
-
var m = obj
|
14401
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
14056
14402
|
if (m) {
|
14057
14403
|
m = _emberMetalMeta.meta(obj);
|
14058
14404
|
|
@@ -14368,7 +14714,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14368
14714
|
}
|
14369
14715
|
|
14370
14716
|
// don't create objects just to invalidate
|
14371
|
-
var meta = obj
|
14717
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
14372
14718
|
if (!meta || meta.source !== obj) {
|
14373
14719
|
return;
|
14374
14720
|
}
|
@@ -14592,22 +14938,20 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14592
14938
|
computed property function. You can use this helper to define properties
|
14593
14939
|
with mixins or via `Ember.defineProperty()`.
|
14594
14940
|
|
14595
|
-
If you pass function as argument
|
14596
|
-
|
14597
|
-
|
14598
|
-
The `get` function should accept two parameters, `key` and `value`. If `value` is not
|
14599
|
-
undefined you should set the `value` first. In either case return the
|
14600
|
-
current value of the property.
|
14601
|
-
|
14602
|
-
A computed property defined in this way might look like this:
|
14941
|
+
If you pass a function as an argument, it will be used as a getter. A computed
|
14942
|
+
property defined in this way might look like this:
|
14603
14943
|
|
14604
14944
|
```js
|
14605
14945
|
let Person = Ember.Object.extend({
|
14606
|
-
|
14607
|
-
|
14946
|
+
init() {
|
14947
|
+
this._super(...arguments);
|
14948
|
+
|
14949
|
+
this.firstName = 'Betty';
|
14950
|
+
this.lastName = 'Jones';
|
14951
|
+
},
|
14608
14952
|
|
14609
14953
|
fullName: Ember.computed('firstName', 'lastName', function() {
|
14610
|
-
return this.get('firstName')
|
14954
|
+
return `${this.get('firstName')} ${this.get('lastName')}`;
|
14611
14955
|
})
|
14612
14956
|
});
|
14613
14957
|
|
@@ -14619,14 +14963,45 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14619
14963
|
client.get('fullName'); // 'Betty Fuller'
|
14620
14964
|
```
|
14621
14965
|
|
14966
|
+
You can pass a hash with two functions, `get` and `set`, as an
|
14967
|
+
argument to provide both a getter and setter:
|
14968
|
+
|
14969
|
+
```js
|
14970
|
+
let Person = Ember.Object.extend({
|
14971
|
+
init() {
|
14972
|
+
this._super(...arguments);
|
14973
|
+
|
14974
|
+
this.firstName = 'Betty';
|
14975
|
+
this.lastName = 'Jones';
|
14976
|
+
},
|
14977
|
+
|
14978
|
+
fullName: Ember.computed({
|
14979
|
+
get(key) {
|
14980
|
+
return `${this.get('firstName')} ${this.get('lastName')}`;
|
14981
|
+
},
|
14982
|
+
set(key, value) {
|
14983
|
+
let [firstName, lastName] = value.split(/\s+/);
|
14984
|
+
this.setProperties({ firstName, lastName });
|
14985
|
+
return value;
|
14986
|
+
}
|
14987
|
+
});
|
14988
|
+
})
|
14989
|
+
|
14990
|
+
let client = Person.create();
|
14991
|
+
client.get('firstName'); // 'Betty'
|
14992
|
+
|
14993
|
+
client.set('fullName', 'Carroll Fuller');
|
14994
|
+
client.get('firstName'); // 'Carroll'
|
14995
|
+
```
|
14996
|
+
|
14997
|
+
The `set` function should accept two parameters, `key` and `value`. The value
|
14998
|
+
returned from `set` will be the new value of the property.
|
14999
|
+
|
14622
15000
|
_Note: This is the preferred way to define computed properties when writing third-party
|
14623
15001
|
libraries that depend on or use Ember, since there is no guarantee that the user
|
14624
|
-
will have prototype extensions enabled._
|
15002
|
+
will have [prototype Extensions](http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/) enabled._
|
14625
15003
|
|
14626
|
-
|
14627
|
-
[Prototype Extensions](http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/).
|
14628
|
-
The alternative syntax might look like this
|
14629
|
-
(if prototype extensions are enabled, which is the default behavior):
|
15004
|
+
The alternative syntax, with prototype extensions, might look like:
|
14630
15005
|
|
14631
15006
|
```js
|
14632
15007
|
fullName() {
|
@@ -14676,7 +15051,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14676
15051
|
@public
|
14677
15052
|
*/
|
14678
15053
|
function cacheFor(obj, key) {
|
14679
|
-
var meta = obj
|
15054
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
14680
15055
|
var cache = meta && meta.source === obj && meta.readableCache();
|
14681
15056
|
var ret = cache && cache[key];
|
14682
15057
|
|
@@ -14710,7 +15085,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14710
15085
|
exports.computed = computed;
|
14711
15086
|
exports.cacheFor = cacheFor;
|
14712
15087
|
});
|
14713
|
-
enifed('ember-metal/computed_macros', ['exports', 'ember-metal/
|
15088
|
+
enifed('ember-metal/computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/computed', 'ember-metal/is_empty', 'ember-metal/is_none', 'ember-metal/alias'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalIs_empty, _emberMetalIs_none, _emberMetalAlias) {
|
14714
15089
|
'use strict';
|
14715
15090
|
|
14716
15091
|
exports.empty = empty;
|
@@ -15216,47 +15591,6 @@ enifed('ember-metal/computed_macros', ['exports', 'ember-metal/core', 'ember-met
|
|
15216
15591
|
});
|
15217
15592
|
|
15218
15593
|
exports.or = or;
|
15219
|
-
/**
|
15220
|
-
A computed property that returns the array of values
|
15221
|
-
for the provided dependent properties.
|
15222
|
-
|
15223
|
-
Example
|
15224
|
-
|
15225
|
-
```javascript
|
15226
|
-
var Hamster = Ember.Object.extend({
|
15227
|
-
clothes: Ember.computed.collect('hat', 'shirt')
|
15228
|
-
});
|
15229
|
-
|
15230
|
-
var hamster = Hamster.create();
|
15231
|
-
|
15232
|
-
hamster.get('clothes'); // [null, null]
|
15233
|
-
hamster.set('hat', 'Camp Hat');
|
15234
|
-
hamster.set('shirt', 'Camp Shirt');
|
15235
|
-
hamster.get('clothes'); // ['Camp Hat', 'Camp Shirt']
|
15236
|
-
```
|
15237
|
-
|
15238
|
-
@method collect
|
15239
|
-
@for Ember.computed
|
15240
|
-
@param {String} dependentKey*
|
15241
|
-
@return {Ember.ComputedProperty} computed property which maps
|
15242
|
-
values of all passed in properties to an array.
|
15243
|
-
@public
|
15244
|
-
*/
|
15245
|
-
var collect = generateComputedWithProperties(function (properties) {
|
15246
|
-
var res = _emberMetalCore.default.A();
|
15247
|
-
for (var key in properties) {
|
15248
|
-
if (properties.hasOwnProperty(key)) {
|
15249
|
-
if (_emberMetalIs_none.default(properties[key])) {
|
15250
|
-
res.push(null);
|
15251
|
-
} else {
|
15252
|
-
res.push(properties[key]);
|
15253
|
-
}
|
15254
|
-
}
|
15255
|
-
}
|
15256
|
-
return res;
|
15257
|
-
});
|
15258
|
-
|
15259
|
-
exports.collect = collect;
|
15260
15594
|
/**
|
15261
15595
|
Creates a new property that is an alias for another property
|
15262
15596
|
on an object. Calls to `get` or `set` this property behave as
|
@@ -15427,7 +15761,7 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
15427
15761
|
|
15428
15762
|
@class Ember
|
15429
15763
|
@static
|
15430
|
-
@version 2.
|
15764
|
+
@version 2.3.0-beta.1
|
15431
15765
|
@public
|
15432
15766
|
*/
|
15433
15767
|
|
@@ -15471,11 +15805,11 @@ enifed('ember-metal/core', ['exports'], function (exports) {
|
|
15471
15805
|
|
15472
15806
|
@property VERSION
|
15473
15807
|
@type String
|
15474
|
-
@default '2.
|
15808
|
+
@default '2.3.0-beta.1'
|
15475
15809
|
@static
|
15476
15810
|
@public
|
15477
15811
|
*/
|
15478
|
-
Ember.VERSION = '2.
|
15812
|
+
Ember.VERSION = '2.3.0-beta.1';
|
15479
15813
|
|
15480
15814
|
/**
|
15481
15815
|
The hash of environment variables used to control various configuration
|
@@ -15930,7 +16264,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
15930
16264
|
}
|
15931
16265
|
|
15932
16266
|
function accumulateListeners(obj, eventName, otherActions) {
|
15933
|
-
var meta = obj
|
16267
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
15934
16268
|
if (!meta) {
|
15935
16269
|
return;
|
15936
16270
|
}
|
@@ -16090,7 +16424,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
16090
16424
|
|
16091
16425
|
function sendEvent(obj, eventName, params, actions) {
|
16092
16426
|
if (!actions) {
|
16093
|
-
var meta = obj
|
16427
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
16094
16428
|
actions = meta && meta.matchingListeners(eventName);
|
16095
16429
|
}
|
16096
16430
|
|
@@ -16142,7 +16476,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
16142
16476
|
*/
|
16143
16477
|
|
16144
16478
|
function hasListeners(obj, eventName) {
|
16145
|
-
var meta = obj
|
16479
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
16146
16480
|
if (!meta) {
|
16147
16481
|
return false;
|
16148
16482
|
}
|
@@ -16159,7 +16493,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
16159
16493
|
|
16160
16494
|
function listenersFor(obj, eventName) {
|
16161
16495
|
var ret = [];
|
16162
|
-
var meta = obj
|
16496
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
16163
16497
|
var actions = meta && meta.matchingListeners(eventName);
|
16164
16498
|
|
16165
16499
|
if (!actions) {
|
@@ -16385,7 +16719,7 @@ enifed('ember-metal/get_properties', ['exports', 'ember-metal/property_get'], fu
|
|
16385
16719
|
return ret;
|
16386
16720
|
}
|
16387
16721
|
});
|
16388
|
-
enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/properties'], function (exports, _emberMetalDebug, _emberMetalComputed, _emberMetalAlias, _emberMetalProperties) {
|
16722
|
+
enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/properties', 'container/owner'], function (exports, _emberMetalDebug, _emberMetalComputed, _emberMetalAlias, _emberMetalProperties, _containerOwner) {
|
16389
16723
|
'use strict';
|
16390
16724
|
|
16391
16725
|
/**
|
@@ -16409,11 +16743,12 @@ enifed('ember-metal/injected_property', ['exports', 'ember-metal/debug', 'ember-
|
|
16409
16743
|
|
16410
16744
|
function injectedPropertyGet(keyName) {
|
16411
16745
|
var desc = this[keyName];
|
16746
|
+
var owner = _containerOwner.getOwner(this);
|
16412
16747
|
|
16413
16748
|
_emberMetalDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
|
16414
|
-
_emberMetalDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.',
|
16749
|
+
_emberMetalDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
|
16415
16750
|
|
16416
|
-
return
|
16751
|
+
return owner.lookup(desc.type + ':' + (desc.name || keyName));
|
16417
16752
|
}
|
16418
16753
|
|
16419
16754
|
InjectedProperty.prototype = Object.create(_emberMetalProperties.Descriptor.prototype);
|
@@ -16736,6 +17071,8 @@ enifed('ember-metal/is_empty', ['exports', 'ember-metal/property_get', 'ember-me
|
|
16736
17071
|
Ember.isEmpty({}); // false
|
16737
17072
|
Ember.isEmpty('Adam Hawkins'); // false
|
16738
17073
|
Ember.isEmpty([0,1,2]); // false
|
17074
|
+
Ember.isEmpty('\n\t'); // false
|
17075
|
+
Ember.isEmpty(' '); // false
|
16739
17076
|
```
|
16740
17077
|
|
16741
17078
|
@method isEmpty
|
@@ -16902,6 +17239,12 @@ enifed('ember-metal/libraries', ['exports', 'ember-metal/debug', 'ember-metal/fe
|
|
16902
17239
|
}
|
16903
17240
|
};
|
16904
17241
|
|
17242
|
+
if (_emberMetalFeatures.default('ember-libraries-isregistered')) {
|
17243
|
+
Libraries.prototype.isRegistered = function (name) {
|
17244
|
+
return !!this._getLibraryByName(name);
|
17245
|
+
};
|
17246
|
+
}
|
17247
|
+
|
16905
17248
|
exports.default = Libraries;
|
16906
17249
|
});
|
16907
17250
|
enifed('ember-metal/logger', ['exports', 'ember-metal/core', 'ember-metal/error'], function (exports, _emberMetalCore, _emberMetalError) {
|
@@ -17573,6 +17916,9 @@ enifed('ember-metal/merge', ['exports', 'ember-metal/debug', 'ember-metal/featur
|
|
17573
17916
|
*/
|
17574
17917
|
|
17575
17918
|
function merge(original, updates) {
|
17919
|
+
if (_emberMetalFeatures.default('ember-metal-ember-assign')) {
|
17920
|
+
_emberMetalDebug.deprecate('Usage of `Ember.merge` is deprecated, use `Ember.assign` instead.', false, { id: 'ember-metal.merge', until: '3.0.0' });
|
17921
|
+
}
|
17576
17922
|
|
17577
17923
|
if (!updates || typeof updates !== 'object') {
|
17578
17924
|
return original;
|
@@ -17596,6 +17942,8 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
17596
17942
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
17597
17943
|
|
17598
17944
|
exports.meta = meta;
|
17945
|
+
exports.peekMeta = peekMeta;
|
17946
|
+
exports.deleteMeta = deleteMeta;
|
17599
17947
|
|
17600
17948
|
/**
|
17601
17949
|
@module ember-metal
|
@@ -17634,6 +17982,7 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
17634
17982
|
};
|
17635
17983
|
|
17636
17984
|
var memberNames = Object.keys(members);
|
17985
|
+
var META_FIELD = '__ember_meta__';
|
17637
17986
|
|
17638
17987
|
function Meta(obj, parentMeta) {
|
17639
17988
|
this._cache = undefined;
|
@@ -17892,14 +18241,25 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
17892
18241
|
|
17893
18242
|
exports.META_DESC = META_DESC;
|
17894
18243
|
var EMBER_META_PROPERTY = {
|
17895
|
-
name:
|
18244
|
+
name: META_FIELD,
|
17896
18245
|
descriptor: META_DESC
|
17897
18246
|
};
|
17898
18247
|
|
17899
|
-
//
|
17900
|
-
var
|
18248
|
+
// choose the one appropriate for given platform
|
18249
|
+
var setMeta = function (obj, meta) {
|
18250
|
+
// if `null` already, just set it to the new value
|
18251
|
+
// otherwise define property first
|
18252
|
+
if (obj[META_FIELD] !== null) {
|
18253
|
+
if (obj.__defineNonEnumerable) {
|
18254
|
+
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
|
18255
|
+
} else {
|
18256
|
+
Object.defineProperty(obj, META_FIELD, META_DESC);
|
18257
|
+
}
|
18258
|
+
}
|
18259
|
+
|
18260
|
+
obj[META_FIELD] = meta;
|
18261
|
+
};
|
17901
18262
|
|
17902
|
-
exports.EMPTY_META = EMPTY_META;
|
17903
18263
|
/**
|
17904
18264
|
Retrieves the meta hash for an object. If `writable` is true ensures the
|
17905
18265
|
hash is writable for this object as well.
|
@@ -17919,34 +18279,32 @@ enifed('ember-metal/meta', ['exports', 'ember-metal/meta_listeners', 'ember-meta
|
|
17919
18279
|
@return {Object} the meta hash for an object
|
17920
18280
|
*/
|
17921
18281
|
|
17922
|
-
function meta(obj
|
17923
|
-
var
|
17924
|
-
|
17925
|
-
return ret || EMPTY_META;
|
17926
|
-
}
|
18282
|
+
function meta(obj) {
|
18283
|
+
var maybeMeta = peekMeta(obj);
|
18284
|
+
var parent = undefined;
|
17927
18285
|
|
17928
|
-
|
17929
|
-
|
18286
|
+
// remove this code, in-favor of explicit parent
|
18287
|
+
if (maybeMeta) {
|
18288
|
+
if (maybeMeta.source === obj) {
|
18289
|
+
return maybeMeta;
|
18290
|
+
}
|
18291
|
+
parent = maybeMeta;
|
17930
18292
|
}
|
17931
18293
|
|
17932
|
-
|
17933
|
-
|
17934
|
-
|
17935
|
-
|
17936
|
-
}
|
18294
|
+
var newMeta = new Meta(obj, parent);
|
18295
|
+
setMeta(obj, newMeta);
|
18296
|
+
return newMeta;
|
18297
|
+
}
|
17937
18298
|
|
17938
|
-
|
17939
|
-
|
17940
|
-
|
17941
|
-
if (obj.__defineNonEnumerable) {
|
17942
|
-
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
|
17943
|
-
} else {
|
17944
|
-
Object.defineProperty(obj, '__ember_meta__', META_DESC);
|
17945
|
-
}
|
17946
|
-
}
|
17947
|
-
obj.__ember_meta__ = ret;
|
18299
|
+
function peekMeta(obj) {
|
18300
|
+
return obj[META_FIELD];
|
18301
|
+
}
|
17948
18302
|
|
17949
|
-
|
18303
|
+
function deleteMeta(obj) {
|
18304
|
+
if (typeof obj[META_FIELD] !== 'object') {
|
18305
|
+
return;
|
18306
|
+
}
|
18307
|
+
obj[META_FIELD] = null;
|
17950
18308
|
}
|
17951
18309
|
});
|
17952
18310
|
enifed('ember-metal/meta_listeners', ['exports'], function (exports) {
|
@@ -18131,7 +18489,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
18131
18489
|
@module ember
|
18132
18490
|
@submodule ember-metal
|
18133
18491
|
*/
|
18134
|
-
|
18135
18492
|
exports.mixin = mixin;
|
18136
18493
|
exports.default = Mixin;
|
18137
18494
|
exports.required = required;
|
@@ -18621,6 +18978,10 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
18621
18978
|
this.mixins = undefined;
|
18622
18979
|
}
|
18623
18980
|
this.ownerConstructor = undefined;
|
18981
|
+
this._without = undefined;
|
18982
|
+
this[_emberMetalUtils.GUID_KEY] = null;
|
18983
|
+
this[_emberMetalUtils.GUID_KEY + '_name'] = null;
|
18984
|
+
_emberMetalDebug.debugSeal(this);
|
18624
18985
|
}
|
18625
18986
|
|
18626
18987
|
Mixin._apply = applyMixin;
|
@@ -18737,7 +19098,7 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
18737
19098
|
if (obj instanceof Mixin) {
|
18738
19099
|
return _detect(obj, this, {});
|
18739
19100
|
}
|
18740
|
-
var m = obj
|
19101
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
18741
19102
|
if (!m) {
|
18742
19103
|
return false;
|
18743
19104
|
}
|
@@ -18788,10 +19149,12 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
18788
19149
|
return ret;
|
18789
19150
|
};
|
18790
19151
|
|
19152
|
+
_emberMetalDebug.debugSeal(MixinPrototype);
|
19153
|
+
|
18791
19154
|
// returns the mixins currently applied to the specified object
|
18792
19155
|
// TODO: Make Ember.mixin
|
18793
19156
|
Mixin.mixins = function (obj) {
|
18794
|
-
var m = obj
|
19157
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
18795
19158
|
var ret = [];
|
18796
19159
|
if (!m) {
|
18797
19160
|
return ret;
|
@@ -18882,7 +19245,7 @@ enifed('ember-metal/mixin', ['exports', 'ember-metal/core', 'ember-metal/error',
|
|
18882
19245
|
@param {String} propertyNames*
|
18883
19246
|
@param {Function} func
|
18884
19247
|
@return func
|
18885
|
-
@
|
19248
|
+
@public
|
18886
19249
|
*/
|
18887
19250
|
|
18888
19251
|
function observer() {
|
@@ -19391,10 +19754,10 @@ enifed('ember-metal/properties', ['exports', 'ember-metal/debug', 'ember-metal/f
|
|
19391
19754
|
return this;
|
19392
19755
|
}
|
19393
19756
|
});
|
19394
|
-
enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-metal/events', 'ember-metal/observer_set'], function (exports, _emberMetalUtils, _emberMetalEvents, _emberMetalObserver_set) {
|
19757
|
+
enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/symbol'], function (exports, _emberMetalUtils, _emberMetalMeta, _emberMetalEvents, _emberMetalObserver_set, _emberMetalSymbol) {
|
19395
19758
|
'use strict';
|
19396
19759
|
|
19397
|
-
var PROPERTY_DID_CHANGE =
|
19760
|
+
var PROPERTY_DID_CHANGE = _emberMetalSymbol.default('PROPERTY_DID_CHANGE');
|
19398
19761
|
|
19399
19762
|
exports.PROPERTY_DID_CHANGE = PROPERTY_DID_CHANGE;
|
19400
19763
|
var beforeObserverSet = new _emberMetalObserver_set.default();
|
@@ -19422,7 +19785,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
19422
19785
|
@private
|
19423
19786
|
*/
|
19424
19787
|
function propertyWillChange(obj, keyName) {
|
19425
|
-
var m = obj
|
19788
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
19426
19789
|
var watching = m && m.peekWatching(keyName) > 0 || keyName === 'length';
|
19427
19790
|
var proto = m && m.proto;
|
19428
19791
|
var possibleDesc = obj[keyName];
|
@@ -19462,7 +19825,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
19462
19825
|
@private
|
19463
19826
|
*/
|
19464
19827
|
function propertyDidChange(obj, keyName) {
|
19465
|
-
var m = obj
|
19828
|
+
var m = _emberMetalMeta.peekMeta(obj);
|
19466
19829
|
var watching = m && m.peekWatching(keyName) > 0 || keyName === 'length';
|
19467
19830
|
var proto = m && m.proto;
|
19468
19831
|
var possibleDesc = obj[keyName];
|
@@ -19674,7 +20037,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
19674
20037
|
exports.endPropertyChanges = endPropertyChanges;
|
19675
20038
|
exports.changeProperties = changeProperties;
|
19676
20039
|
});
|
19677
|
-
enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/path_cache'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalPath_cache) {
|
20040
|
+
enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalPath_cache, _emberMetalMeta) {
|
19678
20041
|
/**
|
19679
20042
|
@module ember-metal
|
19680
20043
|
*/
|
@@ -19732,9 +20095,9 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
19732
20095
|
return obj;
|
19733
20096
|
}
|
19734
20097
|
|
19735
|
-
var meta = obj
|
19736
|
-
var
|
19737
|
-
var desc =
|
20098
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
20099
|
+
var value = obj[keyName];
|
20100
|
+
var desc = value !== null && typeof value === 'object' && value.isDescriptor ? value : undefined;
|
19738
20101
|
var ret;
|
19739
20102
|
|
19740
20103
|
if (desc === undefined && _emberMetalPath_cache.isPath(keyName)) {
|
@@ -19747,7 +20110,7 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
19747
20110
|
if (meta && meta.peekWatching(keyName) > 0) {
|
19748
20111
|
ret = meta.peekValues(keyName);
|
19749
20112
|
} else {
|
19750
|
-
ret =
|
20113
|
+
ret = value;
|
19751
20114
|
}
|
19752
20115
|
|
19753
20116
|
if (ret === undefined && 'object' === typeof obj && !(keyName in obj) && 'function' === typeof obj.unknownProperty) {
|
@@ -19831,6 +20194,23 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
19831
20194
|
return root;
|
19832
20195
|
}
|
19833
20196
|
|
20197
|
+
/**
|
20198
|
+
Retrieves the value of a property from an Object, or a default value in the
|
20199
|
+
case that the property returns `undefined`.
|
20200
|
+
|
20201
|
+
```javascript
|
20202
|
+
Ember.getWithDefault(person, 'lastName', 'Doe');
|
20203
|
+
```
|
20204
|
+
|
20205
|
+
@method getWithDefault
|
20206
|
+
@for Ember
|
20207
|
+
@param {Object} obj The object to retrieve from.
|
20208
|
+
@param {String} keyName The name of the property to retrieve
|
20209
|
+
@param {Object} defaultValue The value to return if the property value is undefined
|
20210
|
+
@return {Object} The property value or the defaultValue.
|
20211
|
+
@public
|
20212
|
+
*/
|
20213
|
+
|
19834
20214
|
function getWithDefault(root, key, defaultValue) {
|
19835
20215
|
var value = get(root, key);
|
19836
20216
|
|
@@ -19842,7 +20222,7 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
19842
20222
|
|
19843
20223
|
exports.default = get;
|
19844
20224
|
});
|
19845
|
-
enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/error', 'ember-metal/path_cache'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache) {
|
20225
|
+
enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/error', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache, _emberMetalMeta) {
|
19846
20226
|
'use strict';
|
19847
20227
|
|
19848
20228
|
exports.set = set;
|
@@ -19871,7 +20251,7 @@ enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal
|
|
19871
20251
|
|
19872
20252
|
var meta, possibleDesc, desc;
|
19873
20253
|
if (obj) {
|
19874
|
-
meta = obj
|
20254
|
+
meta = _emberMetalMeta.peekMeta(obj);
|
19875
20255
|
possibleDesc = obj[keyName];
|
19876
20256
|
desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
|
19877
20257
|
}
|
@@ -20839,7 +21219,11 @@ enifed('ember-metal/streams/dependency', ['exports', 'ember-metal/debug', 'ember
|
|
20839
21219
|
enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/observer', 'ember-metal/streams/stream', 'ember-metal/streams/utils'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalObserver, _emberMetalStreamsStream, _emberMetalStreamsUtils) {
|
20840
21220
|
'use strict';
|
20841
21221
|
|
20842
|
-
|
21222
|
+
function labelFor(source, key) {
|
21223
|
+
return source.label ? source.label + '.' + key : key;
|
21224
|
+
}
|
21225
|
+
|
21226
|
+
exports.default = _emberMetalStreamsStream.default.extend({
|
20843
21227
|
init: function (source, key) {
|
20844
21228
|
_emberMetalDebug.assert('KeyStream error: source must be a stream', _emberMetalStreamsUtils.isStream(source)); // TODO: This isn't necessary.
|
20845
21229
|
_emberMetalDebug.assert('KeyStream error: key must be a non-empty string', typeof key === 'string' && key.length > 0);
|
@@ -20856,9 +21240,17 @@ enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember
|
|
20856
21240
|
|
20857
21241
|
compute: function () {
|
20858
21242
|
var object = this.sourceDep.getValue();
|
20859
|
-
|
21243
|
+
var type = typeof object;
|
21244
|
+
|
21245
|
+
if (!object || type === 'boolean') {
|
21246
|
+
return;
|
21247
|
+
}
|
21248
|
+
|
21249
|
+
if (type === 'object') {
|
20860
21250
|
return _emberMetalProperty_get.get(object, this.key);
|
20861
21251
|
}
|
21252
|
+
|
21253
|
+
return object[this.key];
|
20862
21254
|
},
|
20863
21255
|
|
20864
21256
|
setValue: function (value) {
|
@@ -20903,12 +21295,6 @@ enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/debug', 'ember
|
|
20903
21295
|
this._clearObservedObject();
|
20904
21296
|
}
|
20905
21297
|
});
|
20906
|
-
|
20907
|
-
function labelFor(source, key) {
|
20908
|
-
return source.label ? source.label + '.' + key : key;
|
20909
|
-
}
|
20910
|
-
|
20911
|
-
exports.default = KeyStream;
|
20912
21298
|
});
|
20913
21299
|
enifed('ember-metal/streams/proxy-stream', ['exports', 'ember-runtime/system/object', 'ember-metal/streams/stream'], function (exports, _emberRuntimeSystemObject, _emberMetalStreamsStream) {
|
20914
21300
|
'use strict';
|
@@ -20942,7 +21328,7 @@ enifed('ember-metal/streams/proxy-stream', ['exports', 'ember-runtime/system/obj
|
|
20942
21328
|
|
20943
21329
|
exports.default = ProxyStream;
|
20944
21330
|
});
|
20945
|
-
enifed('ember-metal/streams/stream', ['exports', 'ember-metal/
|
21331
|
+
enifed('ember-metal/streams/stream', ['exports', 'ember-metal/assign', 'ember-metal/debug', 'ember-metal/path_cache', 'ember-metal/observer', 'ember-metal/streams/utils', 'ember-metal/empty_object', 'ember-metal/streams/subscriber', 'ember-metal/streams/dependency', 'ember-metal/utils', 'require'], function (exports, _emberMetalAssign, _emberMetalDebug, _emberMetalPath_cache, _emberMetalObserver, _emberMetalStreamsUtils, _emberMetalEmpty_object, _emberMetalStreamsSubscriber, _emberMetalStreamsDependency, _emberMetalUtils, _require) {
|
20946
21332
|
'use strict';
|
20947
21333
|
|
20948
21334
|
exports.wrap = wrap;
|
@@ -20984,7 +21370,7 @@ enifed('ember-metal/streams/stream', ['exports', 'ember-metal/core', 'ember-meta
|
|
20984
21370
|
},
|
20985
21371
|
|
20986
21372
|
_makeChildStream: function (key) {
|
20987
|
-
KeyStream = KeyStream ||
|
21373
|
+
KeyStream = KeyStream || _require.default('ember-metal/streams/key-stream').default;
|
20988
21374
|
return new KeyStream(this, key);
|
20989
21375
|
},
|
20990
21376
|
|
@@ -21124,7 +21510,7 @@ enifed('ember-metal/streams/stream', ['exports', 'ember-metal/core', 'ember-meta
|
|
21124
21510
|
if (value !== this.observedProxy) {
|
21125
21511
|
this._clearObservedProxy();
|
21126
21512
|
|
21127
|
-
ProxyMixin = ProxyMixin ||
|
21513
|
+
ProxyMixin = ProxyMixin || _require.default('ember-runtime/mixins/-proxy').default;
|
21128
21514
|
|
21129
21515
|
if (ProxyMixin.detect(value)) {
|
21130
21516
|
_emberMetalObserver.addObserver(value, 'content', this, this.notify);
|
@@ -21719,8 +22105,18 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
21719
22105
|
}
|
21720
22106
|
}
|
21721
22107
|
});
|
21722
|
-
enifed(
|
21723
|
-
|
22108
|
+
enifed('ember-metal/symbol', ['exports', 'ember-metal/utils'], function (exports, _emberMetalUtils) {
|
22109
|
+
'use strict';
|
22110
|
+
|
22111
|
+
exports.default = symbol;
|
22112
|
+
|
22113
|
+
function symbol(debugName) {
|
22114
|
+
// TODO: Investigate using platform symbols, but we do not
|
22115
|
+
// want to require non-enumerability for this API, which
|
22116
|
+
// would introduce a large cost.
|
22117
|
+
|
22118
|
+
return _emberMetalUtils.intern(debugName + ' [id=' + _emberMetalUtils.GUID_KEY + Math.floor(Math.random() * new Date()) + ']');
|
22119
|
+
}
|
21724
22120
|
});
|
21725
22121
|
enifed('ember-metal/utils', ['exports'], function (exports) {
|
21726
22122
|
'no use strict';
|
@@ -21739,7 +22135,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
21739
22135
|
@return {Number} the uuid
|
21740
22136
|
*/
|
21741
22137
|
exports.uuid = uuid;
|
21742
|
-
exports.
|
22138
|
+
exports.intern = intern;
|
21743
22139
|
exports.generateGuid = generateGuid;
|
21744
22140
|
exports.guidFor = guidFor;
|
21745
22141
|
exports.wrap = wrap;
|
@@ -21816,6 +22212,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
21816
22212
|
@private
|
21817
22213
|
@return {String} interned version of the provided string
|
21818
22214
|
*/
|
22215
|
+
|
21819
22216
|
function intern(str) {
|
21820
22217
|
var obj = {};
|
21821
22218
|
obj[str] = 1;
|
@@ -21827,14 +22224,6 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
21827
22224
|
return str;
|
21828
22225
|
}
|
21829
22226
|
|
21830
|
-
function symbol(debugName) {
|
21831
|
-
// TODO: Investigate using platform symbols, but we do not
|
21832
|
-
// want to require non-enumerability for this API, which
|
21833
|
-
// would introduce a large cost.
|
21834
|
-
|
21835
|
-
return intern(debugName + ' [id=' + GUID_KEY + Math.floor(Math.random() * new Date()) + ']');
|
21836
|
-
}
|
21837
|
-
|
21838
22227
|
/**
|
21839
22228
|
A unique key used to assign guids and other private metadata to objects.
|
21840
22229
|
If you inspect an object in your browser debugger you will often see these.
|
@@ -22297,6 +22686,9 @@ enifed('ember-metal/watch_key', ['exports', 'ember-metal/features', 'ember-metal
|
|
22297
22686
|
exports.watchKey = watchKey;
|
22298
22687
|
exports.unwatchKey = unwatchKey;
|
22299
22688
|
|
22689
|
+
var handleMandatorySetter = undefined,
|
22690
|
+
lookupDescriptor = undefined;
|
22691
|
+
|
22300
22692
|
function watchKey(obj, keyName, meta) {
|
22301
22693
|
// can't watch length on Array - it is special...
|
22302
22694
|
if (keyName === 'length' && Array.isArray(obj)) {
|
@@ -22325,8 +22717,23 @@ enifed('ember-metal/watch_key', ['exports', 'ember-metal/features', 'ember-metal
|
|
22325
22717
|
}
|
22326
22718
|
}
|
22327
22719
|
|
22328
|
-
|
22329
|
-
var
|
22720
|
+
lookupDescriptor = function lookupDescriptor(obj, keyName) {
|
22721
|
+
var current = obj;
|
22722
|
+
while (current) {
|
22723
|
+
var descriptor = Object.getOwnPropertyDescriptor(current, keyName);
|
22724
|
+
|
22725
|
+
if (descriptor) {
|
22726
|
+
return descriptor;
|
22727
|
+
}
|
22728
|
+
|
22729
|
+
current = Object.getPrototypeOf(current);
|
22730
|
+
}
|
22731
|
+
|
22732
|
+
return null;
|
22733
|
+
};
|
22734
|
+
|
22735
|
+
handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) {
|
22736
|
+
var descriptor = lookupDescriptor(obj, keyName);
|
22330
22737
|
var configurable = descriptor ? descriptor.configurable : true;
|
22331
22738
|
var isWritable = descriptor ? descriptor.writable : true;
|
22332
22739
|
var hasValue = descriptor ? 'value' in descriptor : true;
|
@@ -22433,7 +22840,7 @@ enifed('ember-metal/watch_path', ['exports', 'ember-metal/meta', 'ember-metal/ch
|
|
22433
22840
|
}
|
22434
22841
|
}
|
22435
22842
|
});
|
22436
|
-
enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/watch_key', 'ember-metal/watch_path', 'ember-metal/path_cache'], function (exports, _emberMetalChains, _emberMetalWatch_key, _emberMetalWatch_path, _emberMetalPath_cache) {
|
22843
|
+
enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/watch_key', 'ember-metal/watch_path', 'ember-metal/path_cache', 'ember-metal/meta'], function (exports, _emberMetalChains, _emberMetalWatch_key, _emberMetalWatch_path, _emberMetalPath_cache, _emberMetalMeta) {
|
22437
22844
|
/**
|
22438
22845
|
@module ember-metal
|
22439
22846
|
*/
|
@@ -22473,7 +22880,7 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
22473
22880
|
exports.watch = watch;
|
22474
22881
|
|
22475
22882
|
function isWatching(obj, key) {
|
22476
|
-
var meta = obj
|
22883
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
22477
22884
|
return (meta && meta.peekWatching(key)) > 0;
|
22478
22885
|
}
|
22479
22886
|
|
@@ -22506,11 +22913,11 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
22506
22913
|
*/
|
22507
22914
|
|
22508
22915
|
function destroy(obj) {
|
22509
|
-
var meta = obj
|
22916
|
+
var meta = _emberMetalMeta.peekMeta(obj);
|
22510
22917
|
var node, nodes, key, nodeObject;
|
22511
22918
|
|
22512
22919
|
if (meta) {
|
22513
|
-
obj
|
22920
|
+
_emberMetalMeta.deleteMeta(obj);
|
22514
22921
|
// remove chainWatchers to remove circular references that would prevent GC
|
22515
22922
|
node = meta.readableChains();
|
22516
22923
|
if (node) {
|
@@ -22879,9 +23286,9 @@ enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/debug', 'embe
|
|
22879
23286
|
_emberMetalCore.default.Error = _emberMetalError.default;
|
22880
23287
|
_emberMetalCore.default.guidFor = _emberMetalUtils.guidFor;
|
22881
23288
|
_emberMetalCore.default.META_DESC = _emberMetalMeta.META_DESC;
|
22882
|
-
_emberMetalCore.default.EMPTY_META = _emberMetalMeta.EMPTY_META;
|
22883
23289
|
_emberMetalCore.default.meta = _emberMetalMeta.meta;
|
22884
23290
|
_emberMetalCore.default.inspect = _emberMetalUtils.inspect;
|
23291
|
+
|
22885
23292
|
_emberMetalCore.default.tryCatchFinally = _emberMetalUtils.deprecatedTryCatchFinally;
|
22886
23293
|
_emberMetalCore.default.makeArray = _emberMetalUtils.makeArray;
|
22887
23294
|
_emberMetalCore.default.canInvoke = _emberMetalUtils.canInvoke;
|
@@ -22991,7 +23398,12 @@ enifed('ember-metal', ['exports', 'ember-metal/core', 'ember-metal/debug', 'embe
|
|
22991
23398
|
_emberMetalCore.default.isBlank = _emberMetalIs_blank.default;
|
22992
23399
|
_emberMetalCore.default.isPresent = _emberMetalIs_present.default;
|
22993
23400
|
|
22994
|
-
|
23401
|
+
if (_emberMetalFeatures.default('ember-metal-ember-assign')) {
|
23402
|
+
_emberMetalCore.default.assign = Object.assign || _emberMetalAssign.default;
|
23403
|
+
_emberMetalCore.default.merge = _emberMetalMerge.default;
|
23404
|
+
} else {
|
23405
|
+
_emberMetalCore.default.merge = _emberMetalMerge.default;
|
23406
|
+
}
|
22995
23407
|
|
22996
23408
|
_emberMetalCore.default.FEATURES = _emberMetalFeatures.FEATURES;
|
22997
23409
|
_emberMetalCore.default.FEATURES.isEnabled = _emberMetalFeatures.default;
|
@@ -23378,7 +23790,7 @@ enifed('ember-routing/location/api', ['exports', 'ember-metal/debug', 'ember-met
|
|
23378
23790
|
}
|
23379
23791
|
};
|
23380
23792
|
});
|
23381
|
-
enifed('ember-routing/location/auto_location', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/utils', 'ember-runtime/system/object', 'ember-metal/environment', 'ember-routing/location/util'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberRuntimeSystemObject, _emberMetalEnvironment, _emberRoutingLocationUtil) {
|
23793
|
+
enifed('ember-routing/location/auto_location', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/utils', 'container/owner', 'ember-runtime/system/object', 'ember-metal/environment', 'ember-routing/location/util'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _containerOwner, _emberRuntimeSystemObject, _emberMetalEnvironment, _emberRoutingLocationUtil) {
|
23382
23794
|
'use strict';
|
23383
23795
|
|
23384
23796
|
exports.getHistoryPath = getHistoryPath;
|
@@ -23487,7 +23899,7 @@ enifed('ember-routing/location/auto_location', ['exports', 'ember-metal/debug',
|
|
23487
23899
|
implementation = 'none';
|
23488
23900
|
}
|
23489
23901
|
|
23490
|
-
var concrete = this.
|
23902
|
+
var concrete = _containerOwner.getOwner(this).lookup('location:' + implementation);
|
23491
23903
|
_emberMetalProperty_set.set(concrete, 'rootURL', rootURL);
|
23492
23904
|
|
23493
23905
|
_emberMetalDebug.assert('Could not find location \'' + implementation + '\'.', !!concrete);
|
@@ -24532,10 +24944,10 @@ enifed('ember-routing/system/generate_controller', ['exports', 'ember-metal/debu
|
|
24532
24944
|
@private
|
24533
24945
|
*/
|
24534
24946
|
|
24535
|
-
function generateControllerFactory(
|
24947
|
+
function generateControllerFactory(owner, controllerName, context) {
|
24536
24948
|
var Factory, fullName;
|
24537
24949
|
|
24538
|
-
Factory =
|
24950
|
+
Factory = owner._lookupFactory('controller:basic').extend({
|
24539
24951
|
isGenerated: true,
|
24540
24952
|
toString: function () {
|
24541
24953
|
return '(generated ' + controllerName + ' controller)';
|
@@ -24544,7 +24956,7 @@ enifed('ember-routing/system/generate_controller', ['exports', 'ember-metal/debu
|
|
24544
24956
|
|
24545
24957
|
fullName = 'controller:' + controllerName;
|
24546
24958
|
|
24547
|
-
|
24959
|
+
owner.register(fullName, Factory);
|
24548
24960
|
|
24549
24961
|
return Factory;
|
24550
24962
|
}
|
@@ -24563,11 +24975,11 @@ enifed('ember-routing/system/generate_controller', ['exports', 'ember-metal/debu
|
|
24563
24975
|
@since 1.3.0
|
24564
24976
|
*/
|
24565
24977
|
|
24566
|
-
function generateController(
|
24567
|
-
generateControllerFactory(
|
24978
|
+
function generateController(owner, controllerName, context) {
|
24979
|
+
generateControllerFactory(owner, controllerName, context);
|
24568
24980
|
|
24569
24981
|
var fullName = 'controller:' + controllerName;
|
24570
|
-
var instance =
|
24982
|
+
var instance = owner.lookup(fullName);
|
24571
24983
|
|
24572
24984
|
if (_emberMetalProperty_get.get(instance, 'namespace.LOG_ACTIVE_GENERATION')) {
|
24573
24985
|
_emberMetalDebug.info('generated -> ' + fullName, { fullName: fullName });
|
@@ -24584,7 +24996,7 @@ enifed('ember-routing/system/query_params', ['exports', 'ember-runtime/system/ob
|
|
24584
24996
|
values: null
|
24585
24997
|
});
|
24586
24998
|
});
|
24587
|
-
enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/get_properties', 'ember-metal/is_none', 'ember-metal/computed', 'ember-metal/assign', 'ember-runtime/utils', 'ember-metal/run_loop', 'ember-runtime/copy', 'ember-runtime/system/string', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/action_handler', 'ember-routing/system/generate_controller', 'ember-routing/utils'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalGet_properties, _emberMetalIs_none, _emberMetalComputed, _emberMetalAssign, _emberRuntimeUtils, _emberMetalRun_loop, _emberRuntimeCopy, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeSystemNative_array, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberRoutingSystemGenerate_controller, _emberRoutingUtils) {
|
24999
|
+
enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/get_properties', 'ember-metal/is_none', 'ember-metal/computed', 'ember-metal/assign', 'ember-runtime/utils', 'ember-metal/run_loop', 'ember-runtime/copy', 'ember-runtime/system/string', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/action_handler', 'ember-routing/system/generate_controller', 'ember-routing/utils', 'container/owner', 'ember-metal/is_empty'], function (exports, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalGet_properties, _emberMetalIs_none, _emberMetalComputed, _emberMetalAssign, _emberRuntimeUtils, _emberMetalRun_loop, _emberRuntimeCopy, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeSystemNative_array, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberRoutingSystemGenerate_controller, _emberRoutingUtils, _containerOwner, _emberMetalIs_empty) {
|
24588
25000
|
'use strict';
|
24589
25001
|
|
24590
25002
|
var slice = Array.prototype.slice;
|
@@ -24671,7 +25083,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
24671
25083
|
var controllerProto, combinedQueryParameterConfiguration;
|
24672
25084
|
|
24673
25085
|
var controllerName = this.controllerName || this.routeName;
|
24674
|
-
var definedControllerClass = this.
|
25086
|
+
var definedControllerClass = _containerOwner.getOwner(this)._lookupFactory('controller:' + controllerName);
|
24675
25087
|
var queryParameterConfiguraton = _emberMetalProperty_get.get(this, 'queryParams');
|
24676
25088
|
var hasRouterDefinedQueryParams = !!Object.keys(queryParameterConfiguraton).length;
|
24677
25089
|
|
@@ -24685,10 +25097,16 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
24685
25097
|
var controllerDefinedQueryParameterConfiguration = _emberMetalProperty_get.get(controllerProto, 'queryParams');
|
24686
25098
|
var normalizedControllerQueryParameterConfiguration = _emberRoutingUtils.normalizeControllerQueryParams(controllerDefinedQueryParameterConfiguration);
|
24687
25099
|
combinedQueryParameterConfiguration = mergeEachQueryParams(normalizedControllerQueryParameterConfiguration, queryParameterConfiguraton);
|
25100
|
+
|
25101
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
25102
|
+
if (controllerDefinedQueryParameterConfiguration.length) {
|
25103
|
+
_emberMetalDebug.deprecate('Configuring query parameters on a controller is deprecated. Migrate the query parameters configuration from the \'' + controllerName + '\' controller to the \'' + this.routeName + '\' route: ' + combinedQueryParameterConfiguration, false, { id: 'ember-routing.controller-configured-query-params', until: '3.0.0' });
|
25104
|
+
}
|
25105
|
+
}
|
24688
25106
|
} else if (hasRouterDefinedQueryParams) {
|
24689
25107
|
// the developer has not defined a controller but *has* supplied route query params.
|
24690
25108
|
// Generate a class for them so we can later insert default values
|
24691
|
-
var generatedControllerClass = _emberRoutingSystemGenerate_controller.generateControllerFactory(this
|
25109
|
+
var generatedControllerClass = _emberRoutingSystemGenerate_controller.generateControllerFactory(_containerOwner.getOwner(this), controllerName);
|
24692
25110
|
controllerProto = generatedControllerClass.proto();
|
24693
25111
|
combinedQueryParameterConfiguration = queryParameterConfiguraton;
|
24694
25112
|
}
|
@@ -24711,6 +25129,19 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
24711
25129
|
|
24712
25130
|
var desc = combinedQueryParameterConfiguration[propName];
|
24713
25131
|
|
25132
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
25133
|
+
// apply default values to controllers
|
25134
|
+
// detect that default value defined on router config
|
25135
|
+
if (desc.hasOwnProperty('defaultValue')) {
|
25136
|
+
// detect that property was not defined on controller
|
25137
|
+
if (controllerProto[propName] === undefined) {
|
25138
|
+
controllerProto[propName] = desc.defaultValue;
|
25139
|
+
} else {
|
25140
|
+
deprecateQueryParamDefaultValuesSetOnController(controllerName, this.routeName, propName);
|
25141
|
+
}
|
25142
|
+
}
|
25143
|
+
}
|
25144
|
+
|
24714
25145
|
var scope = desc.scope || 'model';
|
24715
25146
|
var parts;
|
24716
25147
|
|
@@ -24856,7 +25287,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
24856
25287
|
@public
|
24857
25288
|
*/
|
24858
25289
|
paramsFor: function (name) {
|
24859
|
-
var route = this.
|
25290
|
+
var route = _containerOwner.getOwner(this).lookup('route:' + name);
|
24860
25291
|
|
24861
25292
|
if (!route) {
|
24862
25293
|
return {};
|
@@ -25665,7 +26096,9 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
25665
26096
|
|
25666
26097
|
this.setupController(controller, context, transition);
|
25667
26098
|
|
25668
|
-
this.
|
26099
|
+
if (!this._environment || this._environment.options.shouldRender) {
|
26100
|
+
this.renderTemplate(controller, context);
|
26101
|
+
}
|
25669
26102
|
},
|
25670
26103
|
|
25671
26104
|
/*
|
@@ -25940,13 +26373,13 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
25940
26373
|
@private
|
25941
26374
|
*/
|
25942
26375
|
store: _emberMetalComputed.computed(function () {
|
25943
|
-
var
|
26376
|
+
var owner = _containerOwner.getOwner(this);
|
25944
26377
|
var routeName = this.routeName;
|
25945
26378
|
var namespace = _emberMetalProperty_get.get(this, 'router.namespace');
|
25946
26379
|
|
25947
26380
|
return {
|
25948
26381
|
find: function (name, value) {
|
25949
|
-
var modelClass =
|
26382
|
+
var modelClass = owner._lookupFactory('model:' + name);
|
25950
26383
|
|
25951
26384
|
_emberMetalDebug.assert('You used the dynamic segment ' + name + '_id in your route ' + routeName + ', but ' + namespace + '.' + _emberRuntimeSystemString.classify(name) + ' did not exist and you did not override your route\'s `model` hook.', !!modelClass);
|
25952
26385
|
|
@@ -26088,15 +26521,15 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26088
26521
|
@public
|
26089
26522
|
*/
|
26090
26523
|
controllerFor: function (name, _skipAssert) {
|
26091
|
-
var
|
26092
|
-
var route =
|
26524
|
+
var owner = _containerOwner.getOwner(this);
|
26525
|
+
var route = owner.lookup('route:' + name);
|
26093
26526
|
var controller;
|
26094
26527
|
|
26095
26528
|
if (route && route.controllerName) {
|
26096
26529
|
name = route.controllerName;
|
26097
26530
|
}
|
26098
26531
|
|
26099
|
-
controller =
|
26532
|
+
controller = owner.lookup('controller:' + name);
|
26100
26533
|
|
26101
26534
|
// NOTE: We're specifically checking that skipAssert is true, because according
|
26102
26535
|
// to the old API the second parameter was model. We do not want people who
|
@@ -26123,11 +26556,11 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26123
26556
|
@private
|
26124
26557
|
*/
|
26125
26558
|
generateController: function (name, model) {
|
26126
|
-
var
|
26559
|
+
var owner = _containerOwner.getOwner(this);
|
26127
26560
|
|
26128
26561
|
model = model || this.modelFor(name);
|
26129
26562
|
|
26130
|
-
return _emberRoutingSystemGenerate_controller.default(
|
26563
|
+
return _emberRoutingSystemGenerate_controller.default(owner, name, model);
|
26131
26564
|
},
|
26132
26565
|
|
26133
26566
|
/**
|
@@ -26158,7 +26591,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26158
26591
|
@public
|
26159
26592
|
*/
|
26160
26593
|
modelFor: function (name) {
|
26161
|
-
var route = this.
|
26594
|
+
var route = _containerOwner.getOwner(this).lookup('route:' + name);
|
26162
26595
|
var transition = this.router ? this.router.router.activeTransition : null;
|
26163
26596
|
|
26164
26597
|
// If we are mid-transition, we want to try and look up
|
@@ -26307,7 +26740,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26307
26740
|
_emberMetalDebug.assert('The name in the given arguments is undefined', arguments.length > 0 ? !_emberMetalIs_none.default(arguments[0]) : true);
|
26308
26741
|
|
26309
26742
|
var namePassed = typeof _name === 'string' && !!_name;
|
26310
|
-
var isDefaultRender = arguments.length === 0 ||
|
26743
|
+
var isDefaultRender = arguments.length === 0 || _emberMetalIs_empty.default(arguments[0]);
|
26311
26744
|
var name;
|
26312
26745
|
|
26313
26746
|
if (typeof _name === 'object' && !options) {
|
@@ -26469,15 +26902,15 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26469
26902
|
|
26470
26903
|
if (!controller) {
|
26471
26904
|
if (namePassed) {
|
26472
|
-
controller = route.
|
26905
|
+
controller = _containerOwner.getOwner(route).lookup('controller:' + name) || route.controllerName || route.routeName;
|
26473
26906
|
} else {
|
26474
|
-
controller = route.controllerName || route.
|
26907
|
+
controller = route.controllerName || _containerOwner.getOwner(route).lookup('controller:' + name);
|
26475
26908
|
}
|
26476
26909
|
}
|
26477
26910
|
|
26478
26911
|
if (typeof controller === 'string') {
|
26479
26912
|
var controllerName = controller;
|
26480
|
-
controller = route.
|
26913
|
+
controller = _containerOwner.getOwner(route).lookup('controller:' + controllerName);
|
26481
26914
|
if (!controller) {
|
26482
26915
|
throw new _emberMetalError.default('You passed `controller: \'' + controllerName + '\'` into the `render` method, but no such controller could be found.');
|
26483
26916
|
}
|
@@ -26491,9 +26924,10 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26491
26924
|
controller.set('model', options.model);
|
26492
26925
|
}
|
26493
26926
|
|
26927
|
+
var owner = _containerOwner.getOwner(route);
|
26494
26928
|
viewName = options && options.view || namePassed && name || route.viewName || name;
|
26495
|
-
ViewClass =
|
26496
|
-
template =
|
26929
|
+
ViewClass = owner._lookupFactory('view:' + viewName);
|
26930
|
+
template = owner.lookup('template:' + templateName);
|
26497
26931
|
|
26498
26932
|
var parent;
|
26499
26933
|
if (into && (parent = parentRoute(route)) && into === parentRoute(route).routeName) {
|
@@ -26510,6 +26944,17 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26510
26944
|
};
|
26511
26945
|
|
26512
26946
|
var Component = undefined;
|
26947
|
+
if (_emberMetalFeatures.default('ember-routing-routable-components')) {
|
26948
|
+
var componentName = options && options.component || namePassed && name || route.componentName || name;
|
26949
|
+
var componentLookup = owner.lookup('component-lookup:main');
|
26950
|
+
Component = componentLookup.lookupFactory(componentName);
|
26951
|
+
var isGlimmerComponent = Component && Component.proto().isGlimmerComponent;
|
26952
|
+
if (!template && !ViewClass && Component && isGlimmerComponent) {
|
26953
|
+
renderOptions.Component = Component;
|
26954
|
+
renderOptions.ViewClass = undefined;
|
26955
|
+
renderOptions.attrs = { model: _emberMetalProperty_get.get(controller, 'model') };
|
26956
|
+
}
|
26957
|
+
}
|
26513
26958
|
|
26514
26959
|
if (!ViewClass && !template && !Component) {
|
26515
26960
|
_emberMetalDebug.assert('Could not find "' + name + '" template, view, or component.', isDefaultRender);
|
@@ -26577,12 +27022,16 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26577
27022
|
var keysAlreadyMergedOrSkippable;
|
26578
27023
|
var qps = {};
|
26579
27024
|
|
26580
|
-
|
26581
|
-
|
26582
|
-
|
26583
|
-
|
26584
|
-
|
26585
|
-
|
27025
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
27026
|
+
keysAlreadyMergedOrSkippable = {};
|
27027
|
+
} else {
|
27028
|
+
keysAlreadyMergedOrSkippable = {
|
27029
|
+
defaultValue: true,
|
27030
|
+
type: true,
|
27031
|
+
scope: true,
|
27032
|
+
as: true
|
27033
|
+
};
|
27034
|
+
}
|
26586
27035
|
|
26587
27036
|
// first loop over all controller qps, merging them with any matching route qps
|
26588
27037
|
// into a new empty object to avoid mutating.
|
@@ -26629,12 +27078,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
26629
27078
|
exports.default = Route;
|
26630
27079
|
});
|
26631
27080
|
// FEATURES, A, deprecate, assert, Logger
|
26632
|
-
|
26633
|
-
// apply default values to controllers
|
26634
|
-
// detect that default value defined on router config
|
26635
|
-
|
26636
|
-
// detect that property was not defined on controller
|
26637
|
-
enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-metal/debug', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/properties', 'ember-metal/empty_object', 'ember-metal/computed', 'ember-metal/assign', 'ember-metal/run_loop', 'ember-runtime/system/object', 'ember-runtime/mixins/evented', 'ember-routing/system/dsl', 'ember-routing/location/api', 'ember-routing/utils', 'ember-routing/system/router_state', 'router', 'router/transition'], function (exports, _emberMetalLogger, _emberMetalDebug, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalProperties, _emberMetalEmpty_object, _emberMetalComputed, _emberMetalAssign, _emberMetalRun_loop, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRoutingSystemDsl, _emberRoutingLocationApi, _emberRoutingUtils, _emberRoutingSystemRouter_state, _router4, _routerTransition) {
|
27081
|
+
enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-metal/debug', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/properties', 'ember-metal/empty_object', 'ember-metal/computed', 'ember-metal/assign', 'ember-metal/run_loop', 'ember-runtime/system/object', 'ember-runtime/mixins/evented', 'ember-routing/system/dsl', 'ember-routing/location/api', 'ember-routing/utils', 'ember-routing/system/router_state', 'container/owner', 'router', 'router/transition'], function (exports, _emberMetalLogger, _emberMetalDebug, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalProperties, _emberMetalEmpty_object, _emberMetalComputed, _emberMetalAssign, _emberMetalRun_loop, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRoutingSystemDsl, _emberRoutingLocationApi, _emberRoutingUtils, _emberRoutingSystemRouter_state, _containerOwner, _router4, _routerTransition) {
|
26638
27082
|
'use strict';
|
26639
27083
|
|
26640
27084
|
function K() {
|
@@ -26845,9 +27289,10 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
26845
27289
|
defaultParentState = ownState;
|
26846
27290
|
}
|
26847
27291
|
if (!this._toplevelView) {
|
26848
|
-
var
|
27292
|
+
var owner = _containerOwner.getOwner(this);
|
27293
|
+
var OutletView = owner._lookupFactory('view:-outlet');
|
26849
27294
|
this._toplevelView = OutletView.create();
|
26850
|
-
var instance =
|
27295
|
+
var instance = owner.lookup('-application-instance:main');
|
26851
27296
|
instance.didCreateRootView(this._toplevelView);
|
26852
27297
|
}
|
26853
27298
|
this._toplevelView.setOutletState(liveRoutes);
|
@@ -27047,9 +27492,10 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27047
27492
|
_setupLocation: function () {
|
27048
27493
|
var location = _emberMetalProperty_get.get(this, 'location');
|
27049
27494
|
var rootURL = _emberMetalProperty_get.get(this, 'rootURL');
|
27495
|
+
var owner = _containerOwner.getOwner(this);
|
27050
27496
|
|
27051
|
-
if ('string' === typeof location &&
|
27052
|
-
var resolvedLocation =
|
27497
|
+
if ('string' === typeof location && owner) {
|
27498
|
+
var resolvedLocation = owner.lookup('location:' + location);
|
27053
27499
|
|
27054
27500
|
if ('undefined' !== typeof resolvedLocation) {
|
27055
27501
|
location = _emberMetalProperty_set.set(this, 'location', resolvedLocation);
|
@@ -27087,12 +27533,12 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27087
27533
|
var _this2 = this;
|
27088
27534
|
|
27089
27535
|
var seen = new _emberMetalEmpty_object.default();
|
27090
|
-
var
|
27091
|
-
var DefaultRoute =
|
27536
|
+
var owner = _containerOwner.getOwner(this);
|
27537
|
+
var DefaultRoute = owner._lookupFactory('route:basic');
|
27092
27538
|
|
27093
27539
|
return function (name) {
|
27094
27540
|
var routeName = 'route:' + name;
|
27095
|
-
var handler =
|
27541
|
+
var handler = owner.lookup(routeName);
|
27096
27542
|
|
27097
27543
|
if (seen[name]) {
|
27098
27544
|
return handler;
|
@@ -27101,8 +27547,8 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27101
27547
|
seen[name] = true;
|
27102
27548
|
|
27103
27549
|
if (!handler) {
|
27104
|
-
|
27105
|
-
handler =
|
27550
|
+
owner.register(routeName, DefaultRoute.extend());
|
27551
|
+
handler = owner.lookup(routeName);
|
27106
27552
|
|
27107
27553
|
if (_emberMetalProperty_get.get(_this2, 'namespace.LOG_ACTIVE_GENERATION')) {
|
27108
27554
|
_emberMetalDebug.info('generated -> ' + routeName, { fullName: routeName });
|
@@ -27451,8 +27897,8 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27451
27897
|
}
|
27452
27898
|
|
27453
27899
|
function routeHasBeenDefined(router, name) {
|
27454
|
-
var
|
27455
|
-
return router.hasRoute(name) && (
|
27900
|
+
var owner = _containerOwner.getOwner(router);
|
27901
|
+
return router.hasRoute(name) && (owner.hasRegistration('template:' + name) || owner.hasRegistration('route:' + name));
|
27456
27902
|
}
|
27457
27903
|
|
27458
27904
|
function triggerEvent(handlerInfos, ignoreFailure, args) {
|
@@ -27515,7 +27961,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27515
27961
|
_emberMetalProperty_set.set(router, 'currentPath', path);
|
27516
27962
|
_emberMetalProperty_set.set(router, 'currentRouteName', currentRouteName);
|
27517
27963
|
|
27518
|
-
var appController = router.
|
27964
|
+
var appController = _containerOwner.getOwner(router).lookup('controller:application');
|
27519
27965
|
|
27520
27966
|
if (!appController) {
|
27521
27967
|
// appController might not exist when top-level loading/error
|
@@ -28259,13 +28705,13 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
28259
28705
|
return _emberRoutingHtmlbarsKeywordsClosureAction.default(morph, env, scope, params, hash, template, inverse, visitor);
|
28260
28706
|
};
|
28261
28707
|
});
|
28262
|
-
enifed('ember-routing-htmlbars/keywords/closure-action', ['exports', 'ember-metal/streams/stream', 'ember-metal/streams/utils', 'ember-metal/
|
28708
|
+
enifed('ember-routing-htmlbars/keywords/closure-action', ['exports', 'ember-metal/streams/stream', 'ember-metal/streams/utils', 'ember-metal/symbol', 'ember-metal/property_get', 'ember-htmlbars/hooks/subexpr', 'ember-metal/error', 'ember-metal/run_loop'], function (exports, _emberMetalStreamsStream, _emberMetalStreamsUtils, _emberMetalSymbol, _emberMetalProperty_get, _emberHtmlbarsHooksSubexpr, _emberMetalError, _emberMetalRun_loop) {
|
28263
28709
|
'use strict';
|
28264
28710
|
|
28265
28711
|
exports.default = closureAction;
|
28266
|
-
var INVOKE =
|
28712
|
+
var INVOKE = _emberMetalSymbol.default('INVOKE');
|
28267
28713
|
exports.INVOKE = INVOKE;
|
28268
|
-
var ACTION =
|
28714
|
+
var ACTION = _emberMetalSymbol.default('ACTION');
|
28269
28715
|
|
28270
28716
|
exports.ACTION = ACTION;
|
28271
28717
|
|
@@ -28623,14 +29069,14 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
28623
29069
|
var name = params[0];
|
28624
29070
|
var context = params[1];
|
28625
29071
|
|
28626
|
-
var
|
29072
|
+
var owner = env.owner;
|
28627
29073
|
|
28628
29074
|
// The render keyword presumes it can work without a router. This is really
|
28629
29075
|
// only to satisfy the test:
|
28630
29076
|
//
|
28631
29077
|
// {{view}} should not override class bindings defined on a child view"
|
28632
29078
|
//
|
28633
|
-
var router =
|
29079
|
+
var router = owner.lookup('router:main');
|
28634
29080
|
|
28635
29081
|
_emberMetalDebug.assert('The second argument of {{render}} must be a path, e.g. {{render "post" post}}.', params.length < 2 || _emberMetalStreamsUtils.isStream(params[1]));
|
28636
29082
|
|
@@ -28642,15 +29088,15 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
28642
29088
|
}
|
28643
29089
|
|
28644
29090
|
var templateName = 'template:' + name;
|
28645
|
-
_emberMetalDebug.assert('You used `{{render \'' + name + '\'}}`, but \'' + name + '\' can not be ' + 'found as either a template or a view.',
|
29091
|
+
_emberMetalDebug.assert('You used `{{render \'' + name + '\'}}`, but \'' + name + '\' can not be ' + 'found as either a template or a view.', owner.hasRegistration('view:' + name) || owner.hasRegistration(templateName) || !!template);
|
28646
29092
|
|
28647
|
-
var view =
|
29093
|
+
var view = owner.lookup('view:' + name);
|
28648
29094
|
if (!view) {
|
28649
|
-
view =
|
29095
|
+
view = owner.lookup('view:default');
|
28650
29096
|
}
|
28651
29097
|
var viewHasTemplateSpecified = view && !!_emberMetalProperty_get.get(view, 'template');
|
28652
29098
|
if (!template && !viewHasTemplateSpecified) {
|
28653
|
-
template =
|
29099
|
+
template = owner.lookup(templateName);
|
28654
29100
|
}
|
28655
29101
|
|
28656
29102
|
if (view) {
|
@@ -28666,7 +29112,7 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
28666
29112
|
controllerFullName = 'controller:' + controllerName;
|
28667
29113
|
delete hash.controller;
|
28668
29114
|
|
28669
|
-
_emberMetalDebug.assert('The controller name you supplied \'' + controllerName + '\' ' + 'did not resolve to a controller.',
|
29115
|
+
_emberMetalDebug.assert('The controller name you supplied \'' + controllerName + '\' ' + 'did not resolve to a controller.', owner.hasRegistration(controllerFullName));
|
28670
29116
|
} else {
|
28671
29117
|
controllerName = name;
|
28672
29118
|
controllerFullName = 'controller:' + controllerName;
|
@@ -28677,7 +29123,7 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
28677
29123
|
|
28678
29124
|
// choose name
|
28679
29125
|
if (params.length > 1) {
|
28680
|
-
var factory =
|
29126
|
+
var factory = owner._lookupFactory(controllerFullName) || _emberRoutingSystemGenerate_controller.generateControllerFactory(owner, controllerName);
|
28681
29127
|
|
28682
29128
|
controller = factory.create({
|
28683
29129
|
model: _emberMetalStreamsUtils.read(context),
|
@@ -28687,7 +29133,7 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
28687
29133
|
|
28688
29134
|
node.addDestruction(controller);
|
28689
29135
|
} else {
|
28690
|
-
controller =
|
29136
|
+
controller = owner.lookup(controllerFullName) || _emberRoutingSystemGenerate_controller.default(owner, controllerName);
|
28691
29137
|
|
28692
29138
|
controller.setProperties({
|
28693
29139
|
target: parentController,
|
@@ -29125,7 +29571,7 @@ enifed('ember-routing-views/components/link-to', ['exports', 'ember-metal/logger
|
|
29125
29571
|
|
29126
29572
|
'use strict';
|
29127
29573
|
|
29128
|
-
_emberHtmlbarsTemplatesLinkTo.default.meta.revision = 'Ember@2.
|
29574
|
+
_emberHtmlbarsTemplatesLinkTo.default.meta.revision = 'Ember@2.3.0-beta.1';
|
29129
29575
|
|
29130
29576
|
/**
|
29131
29577
|
`Ember.LinkComponent` renders an element whose `click` event triggers a
|
@@ -29615,7 +30061,7 @@ enifed('ember-routing-views/views/outlet', ['exports', 'ember-views/views/view',
|
|
29615
30061
|
|
29616
30062
|
'use strict';
|
29617
30063
|
|
29618
|
-
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.
|
30064
|
+
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.3.0-beta.1';
|
29619
30065
|
|
29620
30066
|
var CoreOutletView = _emberViewsViewsView.default.extend({
|
29621
30067
|
defaultTemplate: _emberHtmlbarsTemplatesTopLevelView.default,
|
@@ -29805,7 +30251,7 @@ enifed('ember-runtime/compare', ['exports', 'ember-runtime/utils', 'ember-runtim
|
|
29805
30251
|
}
|
29806
30252
|
}
|
29807
30253
|
});
|
29808
|
-
enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/compare', 'ember-runtime/utils', 'ember-runtime/system/native_array'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalError, _emberMetalComputed, _emberMetalObserver, _emberRuntimeCompare, _emberRuntimeUtils, _emberRuntimeSystemNative_array) {
|
30254
|
+
enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/compare', 'ember-runtime/utils', 'ember-runtime/system/native_array', 'ember-metal/is_none', 'ember-metal/get_properties'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalError, _emberMetalComputed, _emberMetalObserver, _emberRuntimeCompare, _emberRuntimeUtils, _emberRuntimeSystemNative_array, _emberMetalIs_none, _emberMetalGet_properties) {
|
29809
30255
|
/**
|
29810
30256
|
@module ember
|
29811
30257
|
@submodule ember-runtime
|
@@ -29823,6 +30269,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal
|
|
29823
30269
|
exports.uniq = uniq;
|
29824
30270
|
exports.intersect = intersect;
|
29825
30271
|
exports.setDiff = setDiff;
|
30272
|
+
exports.collect = collect;
|
29826
30273
|
exports.sort = sort;
|
29827
30274
|
|
29828
30275
|
function reduceMacro(dependentKey, callback, initialValue) {
|
@@ -30327,6 +30774,54 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal
|
|
30327
30774
|
}).readOnly();
|
30328
30775
|
}
|
30329
30776
|
|
30777
|
+
/**
|
30778
|
+
A computed property that returns the array of values
|
30779
|
+
for the provided dependent properties.
|
30780
|
+
|
30781
|
+
Example
|
30782
|
+
|
30783
|
+
```javascript
|
30784
|
+
var Hamster = Ember.Object.extend({
|
30785
|
+
clothes: Ember.computed.collect('hat', 'shirt')
|
30786
|
+
});
|
30787
|
+
|
30788
|
+
var hamster = Hamster.create();
|
30789
|
+
|
30790
|
+
hamster.get('clothes'); // [null, null]
|
30791
|
+
hamster.set('hat', 'Camp Hat');
|
30792
|
+
hamster.set('shirt', 'Camp Shirt');
|
30793
|
+
hamster.get('clothes'); // ['Camp Hat', 'Camp Shirt']
|
30794
|
+
```
|
30795
|
+
|
30796
|
+
@method collect
|
30797
|
+
@for Ember.computed
|
30798
|
+
@param {String} dependentKey*
|
30799
|
+
@return {Ember.ComputedProperty} computed property which maps
|
30800
|
+
values of all passed in properties to an array.
|
30801
|
+
@public
|
30802
|
+
*/
|
30803
|
+
|
30804
|
+
function collect() {
|
30805
|
+
for (var _len3 = arguments.length, dependentKeys = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
30806
|
+
dependentKeys[_key3] = arguments[_key3];
|
30807
|
+
}
|
30808
|
+
|
30809
|
+
return multiArrayMacro(dependentKeys, function () {
|
30810
|
+
var properties = _emberMetalGet_properties.default(this, dependentKeys);
|
30811
|
+
var res = _emberRuntimeSystemNative_array.A();
|
30812
|
+
for (var key in properties) {
|
30813
|
+
if (properties.hasOwnProperty(key)) {
|
30814
|
+
if (_emberMetalIs_none.default(properties[key])) {
|
30815
|
+
res.push(null);
|
30816
|
+
} else {
|
30817
|
+
res.push(properties[key]);
|
30818
|
+
}
|
30819
|
+
}
|
30820
|
+
}
|
30821
|
+
return res;
|
30822
|
+
});
|
30823
|
+
}
|
30824
|
+
|
30330
30825
|
/**
|
30331
30826
|
A computed property which returns a new array with all the
|
30332
30827
|
properties from the first dependent array sorted based on a property
|
@@ -31931,13 +32426,15 @@ enifed('ember-runtime/mixins/comparable', ['exports', 'ember-metal/mixin'], func
|
|
31931
32426
|
compare: null
|
31932
32427
|
});
|
31933
32428
|
});
|
31934
|
-
enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop', 'ember-metal/mixin'], function (exports, _emberMetalRun_loop, _emberMetalMixin) {
|
32429
|
+
enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop', 'ember-metal/debug', 'ember-metal/mixin'], function (exports, _emberMetalRun_loop, _emberMetalDebug, _emberMetalMixin) {
|
31935
32430
|
/**
|
31936
32431
|
@module ember
|
31937
32432
|
@submodule ember-runtime
|
31938
32433
|
*/
|
31939
32434
|
'use strict';
|
31940
32435
|
|
32436
|
+
exports.buildFakeContainerWithDeprecations = buildFakeContainerWithDeprecations;
|
32437
|
+
|
31941
32438
|
/**
|
31942
32439
|
ContainerProxyMixin is used to provide public access to specific
|
31943
32440
|
container functionality.
|
@@ -32014,6 +32511,31 @@ enifed('ember-runtime/mixins/container_proxy', ['exports', 'ember-metal/run_loop
|
|
32014
32511
|
return (_container__ = this.__container__)[name].apply(_container__, arguments);
|
32015
32512
|
};
|
32016
32513
|
}
|
32514
|
+
|
32515
|
+
function buildFakeContainerWithDeprecations(container) {
|
32516
|
+
var fakeContainer = {};
|
32517
|
+
var propertyMappings = {
|
32518
|
+
lookup: 'lookup',
|
32519
|
+
lookupFactory: '_lookupFactory'
|
32520
|
+
};
|
32521
|
+
|
32522
|
+
for (var containerProperty in propertyMappings) {
|
32523
|
+
fakeContainer[containerProperty] = buildFakeContainerFunction(container, containerProperty, propertyMappings[containerProperty]);
|
32524
|
+
}
|
32525
|
+
|
32526
|
+
return fakeContainer;
|
32527
|
+
}
|
32528
|
+
|
32529
|
+
function buildFakeContainerFunction(container, containerProperty, ownerProperty) {
|
32530
|
+
return function () {
|
32531
|
+
_emberMetalDebug.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper to access the owner of this object and then call `' + ownerProperty + '` instead.', false, {
|
32532
|
+
id: 'ember-application.injected-container',
|
32533
|
+
until: '3.0.0',
|
32534
|
+
url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access'
|
32535
|
+
});
|
32536
|
+
return container[containerProperty].apply(container, arguments);
|
32537
|
+
};
|
32538
|
+
}
|
32017
32539
|
});
|
32018
32540
|
enifed('ember-runtime/mixins/controller', ['exports', 'ember-metal/mixin', 'ember-metal/alias', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/controller_content_model_alias_deprecation'], function (exports, _emberMetalMixin, _emberMetalAlias, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsController_content_model_alias_deprecation) {
|
32019
32541
|
'use strict';
|
@@ -32046,8 +32568,6 @@ enifed('ember-runtime/mixins/controller', ['exports', 'ember-metal/mixin', 'embe
|
|
32046
32568
|
*/
|
32047
32569
|
target: null,
|
32048
32570
|
|
32049
|
-
container: null,
|
32050
|
-
|
32051
32571
|
parentController: null,
|
32052
32572
|
|
32053
32573
|
store: null,
|
@@ -32169,7 +32689,7 @@ enifed('ember-runtime/mixins/copyable', ['exports', 'ember-metal/debug', 'ember-
|
|
32169
32689
|
}
|
32170
32690
|
});
|
32171
32691
|
});
|
32172
|
-
enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/
|
32692
|
+
enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-metal/computed', 'ember-metal/property_events', 'ember-metal/events', 'ember-runtime/compare', 'require'], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMixin, _emberMetalComputed, _emberMetalProperty_events, _emberMetalEvents, _emberRuntimeCompare, _require) {
|
32173
32693
|
/**
|
32174
32694
|
@module ember
|
32175
32695
|
@submodule ember-runtime
|
@@ -32181,6 +32701,12 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32181
32701
|
|
32182
32702
|
'use strict';
|
32183
32703
|
|
32704
|
+
var _emberA = undefined;
|
32705
|
+
|
32706
|
+
function emberA() {
|
32707
|
+
return (_emberA || (_emberA = _require.default('ember-runtime/system/native_array').A))();
|
32708
|
+
}
|
32709
|
+
|
32184
32710
|
var contexts = [];
|
32185
32711
|
|
32186
32712
|
function popCtx() {
|
@@ -32458,7 +32984,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32458
32984
|
@public
|
32459
32985
|
*/
|
32460
32986
|
map: function (callback, target) {
|
32461
|
-
var ret =
|
32987
|
+
var ret = emberA();
|
32462
32988
|
|
32463
32989
|
this.forEach(function (x, idx, i) {
|
32464
32990
|
ret[idx] = callback.call(target, x, idx, i);
|
@@ -32505,7 +33031,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32505
33031
|
@public
|
32506
33032
|
*/
|
32507
33033
|
filter: function (callback, target) {
|
32508
|
-
var ret =
|
33034
|
+
var ret = emberA();
|
32509
33035
|
|
32510
33036
|
this.forEach(function (x, idx, i) {
|
32511
33037
|
if (callback.call(target, x, idx, i)) {
|
@@ -32816,7 +33342,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32816
33342
|
args[_key - 1] = arguments[_key];
|
32817
33343
|
}
|
32818
33344
|
|
32819
|
-
var ret =
|
33345
|
+
var ret = emberA();
|
32820
33346
|
|
32821
33347
|
this.forEach(function (x, idx) {
|
32822
33348
|
var method = x && x[methodName];
|
@@ -32837,7 +33363,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32837
33363
|
@public
|
32838
33364
|
*/
|
32839
33365
|
toArray: function () {
|
32840
|
-
var ret =
|
33366
|
+
var ret = emberA();
|
32841
33367
|
|
32842
33368
|
this.forEach(function (o, idx) {
|
32843
33369
|
ret[idx] = o;
|
@@ -32880,7 +33406,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32880
33406
|
return this; // nothing to do
|
32881
33407
|
}
|
32882
33408
|
|
32883
|
-
var ret =
|
33409
|
+
var ret = emberA();
|
32884
33410
|
|
32885
33411
|
this.forEach(function (k) {
|
32886
33412
|
if (k !== value) {
|
@@ -32904,7 +33430,7 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember
|
|
32904
33430
|
@public
|
32905
33431
|
*/
|
32906
33432
|
uniq: function () {
|
32907
|
-
var ret =
|
33433
|
+
var ret = emberA();
|
32908
33434
|
|
32909
33435
|
this.forEach(function (k) {
|
32910
33436
|
if (ret.indexOf(k) < 0) {
|
@@ -34887,6 +35413,29 @@ enifed('ember-runtime/mixins/target_action_support', ['exports', 'ember-metal/co
|
|
34887
35413
|
exports.default = TargetActionSupport;
|
34888
35414
|
});
|
34889
35415
|
// Ember.lookup
|
35416
|
+
enifed("ember-runtime/string_registry", ["exports"], function (exports) {
|
35417
|
+
// STATE within a module is frowned apon, this exists
|
35418
|
+
// to support Ember.STRINGS but shield ember internals from this legacy global
|
35419
|
+
// API.
|
35420
|
+
"use strict";
|
35421
|
+
|
35422
|
+
exports.setStrings = setStrings;
|
35423
|
+
exports.getStrings = getStrings;
|
35424
|
+
exports.get = get;
|
35425
|
+
var STRINGS = {};
|
35426
|
+
|
35427
|
+
function setStrings(strings) {
|
35428
|
+
STRINGS = strings;
|
35429
|
+
}
|
35430
|
+
|
35431
|
+
function getStrings() {
|
35432
|
+
return STRINGS;
|
35433
|
+
}
|
35434
|
+
|
35435
|
+
function get(name) {
|
35436
|
+
return STRINGS[name];
|
35437
|
+
}
|
35438
|
+
});
|
34890
35439
|
enifed('ember-runtime/system/application', ['exports', 'ember-runtime/system/namespace'], function (exports, _emberRuntimeSystemNamespace) {
|
34891
35440
|
'use strict';
|
34892
35441
|
|
@@ -35253,7 +35802,7 @@ enifed('ember-runtime/system/array_proxy', ['exports', 'ember-metal/debug', 'emb
|
|
35253
35802
|
|
35254
35803
|
exports.default = ArrayProxy;
|
35255
35804
|
});
|
35256
|
-
enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set', 'container/registry', 'container/container'], function (exports, _emberMetalProperty_set, _containerRegistry, _containerContainer) {
|
35805
|
+
enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set', 'container/registry', 'container/container', 'container/owner'], function (exports, _emberMetalProperty_set, _containerRegistry, _containerContainer, _containerOwner) {
|
35257
35806
|
'use strict';
|
35258
35807
|
|
35259
35808
|
_containerRegistry.default.set = _emberMetalProperty_set.set;
|
@@ -35261,8 +35810,10 @@ enifed('ember-runtime/system/container', ['exports', 'ember-metal/property_set',
|
|
35261
35810
|
|
35262
35811
|
exports.Registry = _containerRegistry.default;
|
35263
35812
|
exports.Container = _containerContainer.default;
|
35813
|
+
exports.getOwner = _containerOwner.getOwner;
|
35814
|
+
exports.setOwner = _containerOwner.setOwner;
|
35264
35815
|
});
|
35265
|
-
enifed('ember-runtime/system/core_object', ['exports', 'ember-metal
|
35816
|
+
enifed('ember-runtime/system/core_object', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/assign', 'ember-metal/property_get', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/chains', 'ember-metal/events', 'ember-metal/mixin', 'ember-metal/error', 'ember-runtime/mixins/action_handler', 'ember-metal/properties', 'ember-metal/binding', 'ember-metal/computed', 'ember-metal/injected_property', 'ember-metal/run_loop', 'ember-metal/watching', 'ember-metal/core', 'ember-runtime/inject', 'ember-metal/symbol'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalAssign, _emberMetalProperty_get, _emberMetalUtils, _emberMetalMeta, _emberMetalChains, _emberMetalEvents, _emberMetalMixin, _emberMetalError, _emberRuntimeMixinsAction_handler, _emberMetalProperties, _emberMetalBinding, _emberMetalComputed, _emberMetalInjected_property, _emberMetalRun_loop, _emberMetalWatching, _emberMetalCore, _emberRuntimeInject, _emberMetalSymbol) {
|
35266
35817
|
'no use strict';
|
35267
35818
|
// Remove "use strict"; from transpiled module until
|
35268
35819
|
// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
|
@@ -35277,7 +35828,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-metal', 'ember-met
|
|
35277
35828
|
|
35278
35829
|
var _Mixin$create;
|
35279
35830
|
|
35280
|
-
var POST_INIT =
|
35831
|
+
var POST_INIT = _emberMetalSymbol.default('POST_INIT');
|
35281
35832
|
exports.POST_INIT = POST_INIT;
|
35282
35833
|
var schedule = _emberMetalRun_loop.default.schedule;
|
35283
35834
|
var applyMixin = _emberMetalMixin.Mixin._apply;
|
@@ -35883,8 +36434,8 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-metal', 'ember-met
|
|
35883
36434
|
if (hasCachedComputedProperties === false) {
|
35884
36435
|
return;
|
35885
36436
|
}
|
35886
|
-
if (value instanceof
|
35887
|
-
var cache =
|
36437
|
+
if (value instanceof _emberMetalComputed.ComputedProperty) {
|
36438
|
+
var cache = _emberMetalMeta.meta(this.constructor).readableCache();
|
35888
36439
|
|
35889
36440
|
if (cache && cache._computedProperties !== undefined) {
|
35890
36441
|
cache._computedProperties = undefined;
|
@@ -36385,10 +36936,9 @@ enifed('ember-runtime/system/namespace', ['exports', 'ember-metal/core', 'ember-
|
|
36385
36936
|
paths[idx] = key;
|
36386
36937
|
|
36387
36938
|
// If we have found an unprocessed class
|
36388
|
-
if (obj && obj.toString === classToString) {
|
36939
|
+
if (obj && obj.toString === classToString && !obj[NAME_KEY]) {
|
36389
36940
|
// Replace the class' `toString` with the dot-separated path
|
36390
36941
|
// and set its `NAME_KEY`
|
36391
|
-
obj.toString = makeToString(paths.join('.'));
|
36392
36942
|
obj[NAME_KEY] = paths.join('.');
|
36393
36943
|
|
36394
36944
|
// Support nested namespaces
|
@@ -36647,44 +37197,21 @@ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal/core', 'emb
|
|
36647
37197
|
@return {Ember.NativeArray}
|
36648
37198
|
@public
|
36649
37199
|
*/
|
36650
|
-
var A
|
36651
|
-
if (arr === undefined) {
|
36652
|
-
arr = [];
|
36653
|
-
}
|
36654
|
-
return _emberRuntimeMixinsArray.default.detect(arr) ? arr : NativeArray.apply(arr);
|
36655
|
-
};
|
37200
|
+
var A;
|
36656
37201
|
|
36657
|
-
|
36658
|
-
Activates the mixin on the Array.prototype if not already applied. Calling
|
36659
|
-
this method more than once is safe. This will be called when ember is loaded
|
36660
|
-
unless you have `Ember.EXTEND_PROTOTYPES` or `Ember.EXTEND_PROTOTYPES.Array`
|
36661
|
-
set to `false`.
|
36662
|
-
|
36663
|
-
Example
|
36664
|
-
|
36665
|
-
```js
|
36666
|
-
if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) {
|
36667
|
-
Ember.NativeArray.activate();
|
36668
|
-
}
|
36669
|
-
```
|
36670
|
-
|
36671
|
-
@method activate
|
36672
|
-
@for Ember.NativeArray
|
36673
|
-
@static
|
36674
|
-
@return {void}
|
36675
|
-
@private
|
36676
|
-
*/
|
36677
|
-
NativeArray.activate = function () {
|
37202
|
+
if (_emberMetalCore.default.EXTEND_PROTOTYPES === true || _emberMetalCore.default.EXTEND_PROTOTYPES.Array) {
|
36678
37203
|
NativeArray.apply(Array.prototype);
|
36679
|
-
|
36680
37204
|
exports. // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles
|
36681
37205
|
A = A = function (arr) {
|
36682
37206
|
return arr || [];
|
36683
37207
|
};
|
36684
|
-
}
|
36685
|
-
|
36686
|
-
|
36687
|
-
|
37208
|
+
} else {
|
37209
|
+
exports.A = A = function (arr) {
|
37210
|
+
if (arr === undefined) {
|
37211
|
+
arr = [];
|
37212
|
+
}
|
37213
|
+
return _emberRuntimeMixinsArray.default.detect(arr) ? arr : NativeArray.apply(arr);
|
37214
|
+
};
|
36688
37215
|
}
|
36689
37216
|
|
36690
37217
|
_emberMetalCore.default.A = A;exports.A = A;
|
@@ -36841,7 +37368,7 @@ enifed('ember-runtime/system/service', ['exports', 'ember-runtime/system/object'
|
|
36841
37368
|
|
36842
37369
|
exports.default = Service;
|
36843
37370
|
});
|
36844
|
-
enifed('ember-runtime/system/string', ['exports', 'ember-metal/
|
37371
|
+
enifed('ember-runtime/system/string', ['exports', 'ember-metal/debug', 'ember-metal/utils', 'ember-runtime/utils', 'ember-runtime/string_registry', 'ember-metal/cache'], function (exports, _emberMetalDebug, _emberMetalUtils, _emberRuntimeUtils, _emberRuntimeString_registry, _emberMetalCache) {
|
36845
37372
|
/**
|
36846
37373
|
@module ember
|
36847
37374
|
@submodule ember-runtime
|
@@ -36936,7 +37463,7 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
36936
37463
|
formats = Array.prototype.slice.call(arguments, 1);
|
36937
37464
|
}
|
36938
37465
|
|
36939
|
-
str =
|
37466
|
+
str = _emberRuntimeString_registry.get(str) || str;
|
36940
37467
|
return _fmt(str, formats);
|
36941
37468
|
}
|
36942
37469
|
|
@@ -36968,18 +37495,6 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
36968
37495
|
return CAPITALIZE_CACHE.get(str);
|
36969
37496
|
}
|
36970
37497
|
|
36971
|
-
/**
|
36972
|
-
Defines the hash of localized strings for the current language. Used by
|
36973
|
-
the `Ember.String.loc()` helper. To localize, add string values to this
|
36974
|
-
hash.
|
36975
|
-
|
36976
|
-
@property STRINGS
|
36977
|
-
@for Ember
|
36978
|
-
@type Object
|
36979
|
-
@private
|
36980
|
-
*/
|
36981
|
-
_emberMetalCore.default.STRINGS = {};
|
36982
|
-
|
36983
37498
|
/**
|
36984
37499
|
Defines string helper methods including string formatting and localization.
|
36985
37500
|
Unless `Ember.EXTEND_PROTOTYPES.String` is `false` these methods will also be
|
@@ -37161,7 +37676,6 @@ enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-met
|
|
37161
37676
|
exports.underscore = underscore;
|
37162
37677
|
exports.capitalize = capitalize;
|
37163
37678
|
});
|
37164
|
-
// Ember.STRINGS
|
37165
37679
|
enifed('ember-runtime/utils', ['exports', 'ember-runtime/mixins/array', 'ember-runtime/system/object'], function (exports, _emberRuntimeMixinsArray, _emberRuntimeSystemObject) {
|
37166
37680
|
'use strict';
|
37167
37681
|
|
@@ -37310,7 +37824,7 @@ enifed('ember-runtime/utils', ['exports', 'ember-runtime/mixins/array', 'ember-r
|
|
37310
37824
|
return ret;
|
37311
37825
|
}
|
37312
37826
|
});
|
37313
|
-
enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'ember-runtime/compare', 'ember-runtime/copy', 'ember-runtime/inject', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/system/array_proxy', 'ember-runtime/system/object_proxy', 'ember-runtime/system/core_object', 'ember-runtime/system/native_array', 'ember-runtime/system/string', 'ember-runtime/system/lazy_load', 'ember-runtime/mixins/array', 'ember-runtime/mixins/comparable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/enumerable', 'ember-runtime/mixins/freezable', 'ember-runtime/mixins/-proxy', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/mutable_enumerable', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/target_action_support', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/promise_proxy', 'ember-runtime/computed/reduce_computed_macros', 'ember-runtime/controllers/controller', 'ember-runtime/mixins/controller', 'ember-runtime/system/service', 'ember-runtime/ext/rsvp', 'ember-runtime/ext/string', 'ember-runtime/ext/function', 'ember-runtime/utils'], function (exports, _emberMetal, _emberRuntimeIsEqual, _emberRuntimeCompare, _emberRuntimeCopy, _emberRuntimeInject, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemContainer, _emberRuntimeSystemArray_proxy, _emberRuntimeSystemObject_proxy, _emberRuntimeSystemCore_object, _emberRuntimeSystemNative_array, _emberRuntimeSystemString, _emberRuntimeSystemLazy_load, _emberRuntimeMixinsArray, _emberRuntimeMixinsComparable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsFreezable, _emberRuntimeMixinsProxy, _emberRuntimeMixinsObservable, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsTarget_action_support, _emberRuntimeMixinsEvented, _emberRuntimeMixinsPromise_proxy, _emberRuntimeComputedReduce_computed_macros, _emberRuntimeControllersController, _emberRuntimeMixinsController, _emberRuntimeSystemService, _emberRuntimeExtRsvp, _emberRuntimeExtString, _emberRuntimeExtFunction, _emberRuntimeUtils) {
|
37827
|
+
enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'ember-runtime/compare', 'ember-runtime/copy', 'ember-runtime/inject', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/system/array_proxy', 'ember-runtime/system/object_proxy', 'ember-runtime/system/core_object', 'ember-runtime/system/native_array', 'ember-runtime/system/string', 'ember-runtime/system/lazy_load', 'ember-runtime/mixins/array', 'ember-runtime/mixins/comparable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/enumerable', 'ember-runtime/mixins/freezable', 'ember-runtime/mixins/-proxy', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/mutable_enumerable', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/target_action_support', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/promise_proxy', 'ember-runtime/computed/reduce_computed_macros', 'ember-runtime/controllers/controller', 'ember-runtime/mixins/controller', 'ember-runtime/system/service', 'ember-runtime/ext/rsvp', 'ember-runtime/ext/string', 'ember-runtime/ext/function', 'ember-runtime/utils', 'ember-metal/features', 'ember-runtime/mixins/registry_proxy', 'ember-runtime/mixins/container_proxy', 'ember-runtime/string_registry'], function (exports, _emberMetal, _emberRuntimeIsEqual, _emberRuntimeCompare, _emberRuntimeCopy, _emberRuntimeInject, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemContainer, _emberRuntimeSystemArray_proxy, _emberRuntimeSystemObject_proxy, _emberRuntimeSystemCore_object, _emberRuntimeSystemNative_array, _emberRuntimeSystemString, _emberRuntimeSystemLazy_load, _emberRuntimeMixinsArray, _emberRuntimeMixinsComparable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsFreezable, _emberRuntimeMixinsProxy, _emberRuntimeMixinsObservable, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsTarget_action_support, _emberRuntimeMixinsEvented, _emberRuntimeMixinsPromise_proxy, _emberRuntimeComputedReduce_computed_macros, _emberRuntimeControllersController, _emberRuntimeMixinsController, _emberRuntimeSystemService, _emberRuntimeExtRsvp, _emberRuntimeExtString, _emberRuntimeExtFunction, _emberRuntimeUtils, _emberMetalFeatures, _emberRuntimeMixinsRegistry_proxy, _emberRuntimeMixinsContainer_proxy, _emberRuntimeString_registry) {
|
37314
37828
|
/**
|
37315
37829
|
@module ember
|
37316
37830
|
@submodule ember-runtime
|
@@ -37369,6 +37883,13 @@ enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'em
|
|
37369
37883
|
_emberMetal.default.Object = _emberRuntimeSystemObject.default;
|
37370
37884
|
_emberMetal.default.Container = _emberRuntimeSystemContainer.Container;
|
37371
37885
|
_emberMetal.default.Registry = _emberRuntimeSystemContainer.Registry;
|
37886
|
+
|
37887
|
+
_emberMetal.default.getOwner = _emberRuntimeSystemContainer.getOwner;
|
37888
|
+
_emberMetal.default.setOwner = _emberRuntimeSystemContainer.setOwner;
|
37889
|
+
|
37890
|
+
_emberMetal.default._RegistryProxyMixin = _emberRuntimeMixinsRegistry_proxy.default;
|
37891
|
+
_emberMetal.default._ContainerProxyMixin = _emberRuntimeMixinsContainer_proxy.default;
|
37892
|
+
|
37372
37893
|
_emberMetal.default.Namespace = _emberRuntimeSystemNamespace.default;
|
37373
37894
|
_emberMetal.default.Enumerable = _emberRuntimeMixinsEnumerable.default;
|
37374
37895
|
_emberMetal.default.ArrayProxy = _emberRuntimeSystemArray_proxy.default;
|
@@ -37391,6 +37912,22 @@ enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/is-equal', 'em
|
|
37391
37912
|
_emberMetal.default.RSVP = _emberRuntimeExtRsvp.default;
|
37392
37913
|
// END EXPORTS
|
37393
37914
|
|
37915
|
+
/**
|
37916
|
+
Defines the hash of localized strings for the current language. Used by
|
37917
|
+
the `Ember.String.loc()` helper. To localize, add string values to this
|
37918
|
+
hash.
|
37919
|
+
|
37920
|
+
@property STRINGS
|
37921
|
+
@for Ember
|
37922
|
+
@type Object
|
37923
|
+
@private
|
37924
|
+
*/
|
37925
|
+
Object.defineProperty(_emberMetal.default, 'STRINGS', {
|
37926
|
+
configurable: false,
|
37927
|
+
get: _emberRuntimeString_registry.getStrings,
|
37928
|
+
set: _emberRuntimeString_registry.setStrings
|
37929
|
+
});
|
37930
|
+
|
37394
37931
|
exports.default = _emberMetal.default;
|
37395
37932
|
});
|
37396
37933
|
// just for side effect of extending Ember.RSVP
|
@@ -38273,6 +38810,9 @@ enifed('ember-template-compiler/plugins/transform-top-level-components', ['expor
|
|
38273
38810
|
|
38274
38811
|
if (lastComponentNode.type === 'ComponentNode') {
|
38275
38812
|
componentCallback(lastComponentNode);
|
38813
|
+
} else if (_emberMetalFeatures.default('ember-htmlbars-component-generation')) {
|
38814
|
+
var component = elementCallback(lastComponentNode);
|
38815
|
+
body.splice(lastIndex, 1, component);
|
38276
38816
|
}
|
38277
38817
|
}
|
38278
38818
|
|
@@ -38425,6 +38965,9 @@ enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-meta
|
|
38425
38965
|
|
38426
38966
|
exports.default = function (_options) {
|
38427
38967
|
var disableComponentGeneration = true;
|
38968
|
+
if (_emberMetalFeatures.default('ember-htmlbars-component-generation')) {
|
38969
|
+
disableComponentGeneration = false;
|
38970
|
+
}
|
38428
38971
|
|
38429
38972
|
var options = undefined;
|
38430
38973
|
// When calling `Ember.Handlebars.compile()` a second argument of `true`
|
@@ -38450,7 +38993,7 @@ enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-meta
|
|
38450
38993
|
options.buildMeta = function buildMeta(program) {
|
38451
38994
|
return {
|
38452
38995
|
fragmentReason: fragmentReason(program),
|
38453
|
-
revision: 'Ember@2.
|
38996
|
+
revision: 'Ember@2.3.0-beta.1',
|
38454
38997
|
loc: program.loc,
|
38455
38998
|
moduleName: options.moduleName
|
38456
38999
|
};
|
@@ -38686,7 +39229,7 @@ enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapt
|
|
38686
39229
|
}
|
38687
39230
|
});
|
38688
39231
|
});
|
38689
|
-
enifed('ember-testing/helpers', ['exports', 'ember-metal/
|
39232
|
+
enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test', 'ember-runtime/ext/rsvp'], function (exports, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp) {
|
38690
39233
|
'use strict';
|
38691
39234
|
|
38692
39235
|
/**
|
@@ -38773,32 +39316,6 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/debug', 'ember-metal/fe
|
|
38773
39316
|
return app.testHelpers.wait();
|
38774
39317
|
}
|
38775
39318
|
|
38776
|
-
function check(app, selector, context) {
|
38777
|
-
var $el = app.testHelpers.findWithAssert(selector, context);
|
38778
|
-
var type = $el.prop('type');
|
38779
|
-
|
38780
|
-
_emberMetalDebug.assert('To check \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
|
38781
|
-
|
38782
|
-
if (!$el.prop('checked')) {
|
38783
|
-
app.testHelpers.click(selector, context);
|
38784
|
-
}
|
38785
|
-
|
38786
|
-
return app.testHelpers.wait();
|
38787
|
-
}
|
38788
|
-
|
38789
|
-
function uncheck(app, selector, context) {
|
38790
|
-
var $el = app.testHelpers.findWithAssert(selector, context);
|
38791
|
-
var type = $el.prop('type');
|
38792
|
-
|
38793
|
-
_emberMetalDebug.assert('To uncheck \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
|
38794
|
-
|
38795
|
-
if ($el.prop('checked')) {
|
38796
|
-
app.testHelpers.click(selector, context);
|
38797
|
-
}
|
38798
|
-
|
38799
|
-
return app.testHelpers.wait();
|
38800
|
-
}
|
38801
|
-
|
38802
39319
|
function triggerEvent(app, selector, contextOrType, typeOrOptions, possibleOptions) {
|
38803
39320
|
var arity = arguments.length;
|
38804
39321
|
var context, type, options;
|
@@ -39177,36 +39694,6 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/debug', 'ember-metal/fe
|
|
39177
39694
|
*/
|
39178
39695
|
asyncHelper('triggerEvent', triggerEvent);
|
39179
39696
|
});
|
39180
|
-
|
39181
|
-
/**
|
39182
|
-
Checks a checkbox. Ensures the presence of the `checked` attribute
|
39183
|
-
Example:
|
39184
|
-
```javascript
|
39185
|
-
check('#remember-me').then(function() {
|
39186
|
-
// assert something
|
39187
|
-
});
|
39188
|
-
```
|
39189
|
-
@method check
|
39190
|
-
@param {String} selector jQuery selector finding an `input[type="checkbox"]`
|
39191
|
-
element on the DOM to check
|
39192
|
-
@return {RSVP.Promise}
|
39193
|
-
@private
|
39194
|
-
*/
|
39195
|
-
|
39196
|
-
/**
|
39197
|
-
Unchecks a checkbox. Ensures the absence of the `checked` attribute
|
39198
|
-
Example:
|
39199
|
-
```javascript
|
39200
|
-
uncheck('#remember-me').then(function() {
|
39201
|
-
// assert something
|
39202
|
-
});
|
39203
|
-
```
|
39204
|
-
@method check
|
39205
|
-
@param {String} selector jQuery selector finding an `input[type="checkbox"]`
|
39206
|
-
element on the DOM to uncheck
|
39207
|
-
@return {RSVP.Promise}
|
39208
|
-
@private
|
39209
|
-
*/
|
39210
39697
|
enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load'], function (exports, _emberRuntimeSystemLazy_load) {
|
39211
39698
|
'use strict';
|
39212
39699
|
|
@@ -39843,7 +40330,7 @@ enifed('ember-testing', ['exports', 'ember-metal/core', 'ember-testing/initializ
|
|
39843
40330
|
});
|
39844
40331
|
// to setup initializer
|
39845
40332
|
// to handle various edge cases
|
39846
|
-
enifed('ember-views/compat/attrs-proxy', ['exports', 'ember-metal/mixin', 'ember-metal/
|
40333
|
+
enifed('ember-views/compat/attrs-proxy', ['exports', 'ember-metal/mixin', 'ember-metal/symbol', 'ember-metal/property_events'], function (exports, _emberMetalMixin, _emberMetalSymbol, _emberMetalProperty_events) {
|
39847
40334
|
'use strict';
|
39848
40335
|
|
39849
40336
|
exports.deprecation = deprecation;
|
@@ -39852,7 +40339,7 @@ enifed('ember-views/compat/attrs-proxy', ['exports', 'ember-metal/mixin', 'ember
|
|
39852
40339
|
return 'You tried to look up an attribute directly on the component. This is deprecated. Use attrs.' + key + ' instead.';
|
39853
40340
|
}
|
39854
40341
|
|
39855
|
-
var MUTABLE_CELL =
|
40342
|
+
var MUTABLE_CELL = _emberMetalSymbol.default('MUTABLE_CELL');
|
39856
40343
|
|
39857
40344
|
exports.MUTABLE_CELL = MUTABLE_CELL;
|
39858
40345
|
function isCell(val) {
|
@@ -39950,7 +40437,7 @@ enifed('ember-views/compat/metamorph_view', ['exports', 'ember-metal/debug', 'em
|
|
39950
40437
|
__metamorphType: 'Ember._MetamorphView'
|
39951
40438
|
});
|
39952
40439
|
});
|
39953
|
-
enifed('ember-views/component_lookup', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-runtime/system/object', 'ember-htmlbars/system/lookup-helper'], function (exports, _emberMetalCore, _emberMetalDebug, _emberRuntimeSystemObject, _emberHtmlbarsSystemLookupHelper) {
|
40440
|
+
enifed('ember-views/component_lookup', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-runtime/system/object', 'ember-htmlbars/system/lookup-helper', 'container/owner'], function (exports, _emberMetalCore, _emberMetalDebug, _emberRuntimeSystemObject, _emberHtmlbarsSystemLookupHelper, _containerOwner) {
|
39954
40441
|
'use strict';
|
39955
40442
|
|
39956
40443
|
exports.default = _emberRuntimeSystemObject.default.extend({
|
@@ -39961,50 +40448,50 @@ enifed('ember-views/component_lookup', ['exports', 'ember-metal/core', 'ember-me
|
|
39961
40448
|
}
|
39962
40449
|
},
|
39963
40450
|
|
39964
|
-
lookupFactory: function (name,
|
39965
|
-
|
40451
|
+
lookupFactory: function (name, owner) {
|
40452
|
+
owner = owner || _containerOwner.getOwner(this);
|
39966
40453
|
|
39967
40454
|
var fullName = 'component:' + name;
|
39968
40455
|
var templateFullName = 'template:components/' + name;
|
39969
|
-
var templateRegistered =
|
40456
|
+
var templateRegistered = owner && owner.hasRegistration(templateFullName);
|
39970
40457
|
|
39971
40458
|
if (templateRegistered) {
|
39972
|
-
|
40459
|
+
owner.inject(fullName, 'layout', templateFullName);
|
39973
40460
|
}
|
39974
40461
|
|
39975
|
-
var Component =
|
40462
|
+
var Component = owner._lookupFactory(fullName);
|
39976
40463
|
|
39977
40464
|
// Only treat as a component if either the component
|
39978
40465
|
// or a template has been registered.
|
39979
40466
|
if (templateRegistered || Component) {
|
39980
40467
|
if (!Component) {
|
39981
|
-
|
39982
|
-
Component =
|
40468
|
+
owner.register(fullName, _emberMetalCore.default.Component);
|
40469
|
+
Component = owner._lookupFactory(fullName);
|
39983
40470
|
}
|
39984
40471
|
return Component;
|
39985
40472
|
}
|
39986
40473
|
},
|
39987
40474
|
|
39988
|
-
componentFor: function (name,
|
40475
|
+
componentFor: function (name, owner) {
|
39989
40476
|
if (this.invalidName(name)) {
|
39990
40477
|
return;
|
39991
40478
|
}
|
39992
40479
|
|
39993
40480
|
var fullName = 'component:' + name;
|
39994
|
-
return
|
40481
|
+
return owner._lookupFactory(fullName);
|
39995
40482
|
},
|
39996
40483
|
|
39997
|
-
layoutFor: function (name,
|
40484
|
+
layoutFor: function (name, owner) {
|
39998
40485
|
if (this.invalidName(name)) {
|
39999
40486
|
return;
|
40000
40487
|
}
|
40001
40488
|
|
40002
40489
|
var templateFullName = 'template:components/' + name;
|
40003
|
-
return
|
40490
|
+
return owner.lookup(templateFullName);
|
40004
40491
|
}
|
40005
40492
|
});
|
40006
40493
|
});
|
40007
|
-
enifed('ember-views/components/component', ['exports', 'ember-metal/
|
40494
|
+
enifed('ember-views/components/component', ['exports', 'ember-metal/debug', 'ember-runtime/mixins/target_action_support', 'ember-views/views/view', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/is_none', 'ember-metal/utils', 'ember-metal/computed', 'ember-views/compat/attrs-proxy', 'container/owner'], function (exports, _emberMetalDebug, _emberRuntimeMixinsTarget_action_support, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalIs_none, _emberMetalUtils, _emberMetalComputed, _emberViewsCompatAttrsProxy, _containerOwner) {
|
40008
40495
|
'use strict';
|
40009
40496
|
|
40010
40497
|
function validateAction(component, actionName) {
|
@@ -40129,7 +40616,7 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/core', 'embe
|
|
40129
40616
|
_emberMetalProperty_set.set(this, 'controller', this);
|
40130
40617
|
_emberMetalProperty_set.set(this, 'context', this);
|
40131
40618
|
|
40132
|
-
if (!this.layout && this.layoutName && this
|
40619
|
+
if (!this.layout && this.layoutName && _containerOwner.getOwner(this)) {
|
40133
40620
|
var layoutName = _emberMetalProperty_get.get(this, 'layoutName');
|
40134
40621
|
|
40135
40622
|
this.layout = this.templateForName(layoutName);
|
@@ -40139,14 +40626,18 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/core', 'embe
|
|
40139
40626
|
// `layout` is no longer a CP, so this just ensures that the `defaultLayout`
|
40140
40627
|
// logic is supported with a deprecation
|
40141
40628
|
if (this.defaultLayout && !this.layout) {
|
40142
|
-
_emberMetalDebug.deprecate('Specifying `defaultLayout` to ' + this + ' is deprecated. Please use `layout` instead.', false, {
|
40629
|
+
_emberMetalDebug.deprecate('Specifying `defaultLayout` to ' + this + ' is deprecated. Please use `layout` instead.', false, {
|
40630
|
+
id: 'ember-views.component.defaultLayout',
|
40631
|
+
until: '3.0.0',
|
40632
|
+
url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-component-defaultlayout'
|
40633
|
+
});
|
40143
40634
|
|
40144
40635
|
this.layout = this.defaultLayout;
|
40145
40636
|
}
|
40146
40637
|
|
40147
40638
|
// If in a tagless component, assert that no event handlers are defined
|
40148
40639
|
_emberMetalDebug.assert('You can not define a function that handles DOM events in the `' + this + '` tagless component since it doesn\'t have any DOM element.', this.tagName !== '' || !(function () {
|
40149
|
-
var eventDispatcher = _this.
|
40640
|
+
var eventDispatcher = _containerOwner.getOwner(_this).lookup('event_dispatcher:main');
|
40150
40641
|
var events = eventDispatcher && eventDispatcher._finalEvents || {};
|
40151
40642
|
|
40152
40643
|
for (var key in events) {
|
@@ -40271,7 +40762,7 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/core', 'embe
|
|
40271
40762
|
}
|
40272
40763
|
|
40273
40764
|
if (typeof actionName === 'function') {
|
40274
|
-
actionName.apply(
|
40765
|
+
actionName.apply(undefined, contexts);
|
40275
40766
|
} else {
|
40276
40767
|
this.triggerAction({
|
40277
40768
|
action: actionName,
|
@@ -40286,10 +40777,10 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/core', 'embe
|
|
40286
40777
|
}
|
40287
40778
|
|
40288
40779
|
var target;
|
40289
|
-
var
|
40780
|
+
var action = this.actions && this.actions[actionName];
|
40290
40781
|
|
40291
|
-
if (
|
40292
|
-
var shouldBubble =
|
40782
|
+
if (action) {
|
40783
|
+
var shouldBubble = action.apply(this, args) === true;
|
40293
40784
|
if (!shouldBubble) {
|
40294
40785
|
return;
|
40295
40786
|
}
|
@@ -40301,8 +40792,8 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/core', 'embe
|
|
40301
40792
|
_emberMetalDebug.assert('The `target` for ' + this + ' (' + target + ') does not have a `send` method', typeof target.send === 'function');
|
40302
40793
|
(_target = target).send.apply(_target, arguments);
|
40303
40794
|
} else {
|
40304
|
-
if (!
|
40305
|
-
throw new Error(
|
40795
|
+
if (!action) {
|
40796
|
+
throw new Error(_emberMetalUtils.inspect(this) + ' had no action handler for: ' + actionName);
|
40306
40797
|
}
|
40307
40798
|
}
|
40308
40799
|
}
|
@@ -40636,12 +41127,12 @@ enifed('ember-views/mixins/instrumentation_support', ['exports', 'ember-metal/mi
|
|
40636
41127
|
|
40637
41128
|
exports.default = InstrumentationSupport;
|
40638
41129
|
});
|
40639
|
-
enifed('ember-views/mixins/legacy_child_views_support', ['exports', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/property_set'], function (exports, _emberMetalMixin, _emberMetalProperty_get, _emberMetalProperty_set) {
|
41130
|
+
enifed('ember-views/mixins/legacy_child_views_support', ['exports', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/property_set', 'container/owner'], function (exports, _emberMetalMixin, _emberMetalProperty_get, _emberMetalProperty_set, _containerOwner) {
|
40640
41131
|
'use strict';
|
40641
41132
|
|
40642
41133
|
exports.default = _emberMetalMixin.Mixin.create({
|
40643
41134
|
linkChild: function (instance) {
|
40644
|
-
instance.
|
41135
|
+
_containerOwner.setOwner(instance, _containerOwner.getOwner(this));
|
40645
41136
|
if (_emberMetalProperty_get.get(instance, 'parentView') !== this) {
|
40646
41137
|
// linkChild should be idempotent
|
40647
41138
|
_emberMetalProperty_set.set(instance, 'parentView', this);
|
@@ -40809,6 +41300,11 @@ enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get'
|
|
40809
41300
|
|
40810
41301
|
'use strict';
|
40811
41302
|
|
41303
|
+
var KEY_EVENTS = {
|
41304
|
+
13: 'insertNewline',
|
41305
|
+
27: 'cancel'
|
41306
|
+
};
|
41307
|
+
|
40812
41308
|
/**
|
40813
41309
|
`TextSupport` is a shared mixin used by both `Ember.TextField` and
|
40814
41310
|
`Ember.TextArea`. `TextSupport` adds a number of methods that allow you to
|
@@ -40962,7 +41458,7 @@ enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get'
|
|
40962
41458
|
bubbles: false,
|
40963
41459
|
|
40964
41460
|
interpretKeyEvents: function (event) {
|
40965
|
-
var map =
|
41461
|
+
var map = KEY_EVENTS;
|
40966
41462
|
var method = map[event.keyCode];
|
40967
41463
|
|
40968
41464
|
this._elementValueDidChange();
|
@@ -41092,11 +41588,6 @@ enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get'
|
|
41092
41588
|
}
|
41093
41589
|
});
|
41094
41590
|
|
41095
|
-
TextSupport.KEY_EVENTS = {
|
41096
|
-
13: 'insertNewline',
|
41097
|
-
27: 'cancel'
|
41098
|
-
};
|
41099
|
-
|
41100
41591
|
// In principle, this shouldn't be necessary, but the legacy
|
41101
41592
|
// sendAction semantics for TextField are different from
|
41102
41593
|
// the component semantics so this method normalizes them.
|
@@ -41123,7 +41614,7 @@ enifed('ember-views/mixins/text_support', ['exports', 'ember-metal/property_get'
|
|
41123
41614
|
|
41124
41615
|
exports.default = TextSupport;
|
41125
41616
|
});
|
41126
|
-
enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/debug', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-runtime/system/native_array'], function (exports, _emberMetalDebug, _emberMetalMixin, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberRuntimeSystemNative_array) {
|
41617
|
+
enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/debug', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/set_properties', 'ember-runtime/system/native_array', 'container/owner'], function (exports, _emberMetalDebug, _emberMetalMixin, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberRuntimeSystemNative_array, _containerOwner) {
|
41127
41618
|
/**
|
41128
41619
|
@module ember
|
41129
41620
|
@submodule ember-views
|
@@ -41207,7 +41698,9 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
41207
41698
|
throw new TypeError('createChildViews first argument must exist');
|
41208
41699
|
}
|
41209
41700
|
|
41210
|
-
|
41701
|
+
var owner = _containerOwner.getOwner(this);
|
41702
|
+
|
41703
|
+
if (maybeViewClass.isView && maybeViewClass.parentView === this && _containerOwner.getOwner(maybeViewClass) === owner) {
|
41211
41704
|
return maybeViewClass;
|
41212
41705
|
}
|
41213
41706
|
|
@@ -41219,7 +41712,7 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
41219
41712
|
attrs._viewRegistry = this._viewRegistry;
|
41220
41713
|
|
41221
41714
|
if (maybeViewClass.isViewFactory) {
|
41222
|
-
attrs
|
41715
|
+
_containerOwner.setOwner(attrs, owner);
|
41223
41716
|
|
41224
41717
|
view = maybeViewClass.create(attrs);
|
41225
41718
|
|
@@ -41228,7 +41721,7 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
41228
41721
|
}
|
41229
41722
|
} else if ('string' === typeof maybeViewClass) {
|
41230
41723
|
var fullName = 'view:' + maybeViewClass;
|
41231
|
-
var ViewKlass =
|
41724
|
+
var ViewKlass = owner._lookupFactory(fullName);
|
41232
41725
|
|
41233
41726
|
_emberMetalDebug.assert('Could not find view: \'' + fullName + '\'', !!ViewKlass);
|
41234
41727
|
|
@@ -41237,7 +41730,7 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
41237
41730
|
view = maybeViewClass;
|
41238
41731
|
_emberMetalDebug.assert('You must pass instance or subclass of View', view.isView);
|
41239
41732
|
|
41240
|
-
attrs
|
41733
|
+
_containerOwner.setOwner(attrs, owner);
|
41241
41734
|
_emberMetalSet_properties.default(view, attrs);
|
41242
41735
|
}
|
41243
41736
|
|
@@ -41247,7 +41740,7 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
41247
41740
|
},
|
41248
41741
|
|
41249
41742
|
linkChild: function (instance) {
|
41250
|
-
instance.
|
41743
|
+
_containerOwner.setOwner(instance, _containerOwner.getOwner(this));
|
41251
41744
|
instance.parentView = this;
|
41252
41745
|
instance.ownerView = this.ownerView;
|
41253
41746
|
},
|
@@ -41379,12 +41872,12 @@ enifed('ember-views/mixins/view_state_support', ['exports', 'ember-metal/debug',
|
|
41379
41872
|
|
41380
41873
|
exports.default = ViewStateSupport;
|
41381
41874
|
});
|
41382
|
-
enifed('ember-views/mixins/view_support', ['exports', 'ember-metal/debug', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/run_loop', 'ember-metal/observer', 'ember-metal/utils', 'ember-metal/computed', 'ember-metal/mixin', 'ember-runtime/system/core_object', 'ember-metal/features', 'ember-views/system/jquery'], function (exports, _emberMetalDebug, _emberMetalError, _emberMetalProperty_get, _emberMetalRun_loop, _emberMetalObserver, _emberMetalUtils, _emberMetalComputed, _emberMetalMixin, _emberRuntimeSystemCore_object, _emberMetalFeatures, _emberViewsSystemJquery) {
|
41875
|
+
enifed('ember-views/mixins/view_support', ['exports', 'ember-metal/debug', 'ember-metal/error', 'ember-metal/property_get', 'ember-metal/run_loop', 'ember-metal/observer', 'ember-metal/utils', 'ember-metal/computed', 'ember-metal/mixin', 'ember-runtime/system/core_object', 'ember-metal/features', 'ember-metal/symbol', 'container/owner', 'ember-views/system/jquery'], function (exports, _emberMetalDebug, _emberMetalError, _emberMetalProperty_get, _emberMetalRun_loop, _emberMetalObserver, _emberMetalUtils, _emberMetalComputed, _emberMetalMixin, _emberRuntimeSystemCore_object, _emberMetalFeatures, _emberMetalSymbol, _containerOwner, _emberViewsSystemJquery) {
|
41383
41876
|
'use strict';
|
41384
41877
|
|
41385
41878
|
var _Mixin$create;
|
41386
41879
|
|
41387
|
-
var INIT_WAS_CALLED =
|
41880
|
+
var INIT_WAS_CALLED = _emberMetalSymbol.default('INIT_WAS_CALLED');
|
41388
41881
|
|
41389
41882
|
function K() {
|
41390
41883
|
return this;
|
@@ -41487,11 +41980,13 @@ enifed('ember-views/mixins/view_support', ['exports', 'ember-metal/debug', 'embe
|
|
41487
41980
|
}
|
41488
41981
|
_emberMetalDebug.assert('templateNames are not allowed to contain periods: ' + name, name.indexOf('.') === -1);
|
41489
41982
|
|
41490
|
-
|
41983
|
+
var owner = _containerOwner.getOwner(this);
|
41984
|
+
|
41985
|
+
if (!owner) {
|
41491
41986
|
throw new _emberMetalError.default('Container was not found when looking up a views template. ' + 'This is most likely due to manually instantiating an Ember.View. ' + 'See: http://git.io/EKPpnA');
|
41492
41987
|
}
|
41493
41988
|
|
41494
|
-
return
|
41989
|
+
return owner.lookup('template:' + name);
|
41495
41990
|
},
|
41496
41991
|
|
41497
41992
|
/**
|
@@ -41619,12 +42114,23 @@ enifed('ember-views/mixins/view_support', ['exports', 'ember-metal/debug', 'embe
|
|
41619
42114
|
@private
|
41620
42115
|
*/
|
41621
42116
|
appendTo: function (selector) {
|
41622
|
-
var
|
42117
|
+
var $ = this._environment ? this._environment.options.jQuery : _emberViewsSystemJquery.default;
|
42118
|
+
|
42119
|
+
if ($) {
|
42120
|
+
var target = $(selector);
|
42121
|
+
|
42122
|
+
_emberMetalDebug.assert('You tried to append to (' + selector + ') but that isn\'t in the DOM', target.length > 0);
|
42123
|
+
_emberMetalDebug.assert('You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.', !target.is('.ember-view') && !target.parents().is('.ember-view'));
|
42124
|
+
|
42125
|
+
this.renderer.appendTo(this, target[0]);
|
42126
|
+
} else {
|
42127
|
+
var target = selector;
|
41623
42128
|
|
41624
|
-
|
41625
|
-
|
42129
|
+
_emberMetalDebug.assert('You tried to append to a selector string (' + selector + ') in an environment without jQuery', typeof target !== 'string');
|
42130
|
+
_emberMetalDebug.assert('You tried to append to a non-Element (' + selector + ') in an environment without jQuery', typeof selector.appendChild === 'function');
|
41626
42131
|
|
41627
|
-
|
42132
|
+
this.renderer.appendTo(this, target);
|
42133
|
+
}
|
41628
42134
|
|
41629
42135
|
return this;
|
41630
42136
|
},
|
@@ -41961,9 +42467,9 @@ enifed('ember-views/mixins/view_support', ['exports', 'ember-metal/debug', 'embe
|
|
41961
42467
|
}, _Mixin$create.scheduleRevalidate = function (node, label, manualRerender) {
|
41962
42468
|
if (node && !this._dispatching && this.env.renderedNodes.has(node)) {
|
41963
42469
|
if (manualRerender) {
|
41964
|
-
_emberMetalDebug.deprecate('You manually rerendered ' + label + ' (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember
|
42470
|
+
_emberMetalDebug.deprecate('You manually rerendered ' + label + ' (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember 3.0', false, { id: 'ember-views.manual-parent-rerender', until: '3.0.0' });
|
41965
42471
|
} else {
|
41966
|
-
_emberMetalDebug.deprecate('You modified ' + label + ' twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember
|
42472
|
+
_emberMetalDebug.deprecate('You modified ' + label + ' twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 3.0', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
|
41967
42473
|
}
|
41968
42474
|
_emberMetalRun_loop.default.scheduleOnce('render', this, this.revalidate);
|
41969
42475
|
return;
|
@@ -42473,13 +42979,13 @@ enifed('ember-views/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
42473
42979
|
exports.readComponentFactory = readComponentFactory;
|
42474
42980
|
exports.readUnwrappedModel = readUnwrappedModel;
|
42475
42981
|
|
42476
|
-
function readViewFactory(object,
|
42982
|
+
function readViewFactory(object, owner) {
|
42477
42983
|
var value = _emberMetalStreamsUtils.read(object);
|
42478
42984
|
var viewClass;
|
42479
42985
|
|
42480
42986
|
if (typeof value === 'string') {
|
42481
|
-
_emberMetalDebug.assert('View requires
|
42482
|
-
viewClass =
|
42987
|
+
_emberMetalDebug.assert('View requires an owner to resolve views not passed in through the context', !!owner);
|
42988
|
+
viewClass = owner._lookupFactory('view:' + value);
|
42483
42989
|
} else {
|
42484
42990
|
viewClass = value;
|
42485
42991
|
}
|
@@ -42491,12 +42997,12 @@ enifed('ember-views/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
42491
42997
|
return viewClass;
|
42492
42998
|
}
|
42493
42999
|
|
42494
|
-
function readComponentFactory(nameOrStream,
|
43000
|
+
function readComponentFactory(nameOrStream, owner) {
|
42495
43001
|
var name = _emberMetalStreamsUtils.read(nameOrStream);
|
42496
|
-
var componentLookup =
|
43002
|
+
var componentLookup = owner.lookup('component-lookup:main');
|
42497
43003
|
_emberMetalDebug.assert('Could not find \'component-lookup:main\' on the provided container, ' + 'which is necessary for performing component lookups', componentLookup);
|
42498
43004
|
|
42499
|
-
return componentLookup.lookupFactory(name,
|
43005
|
+
return componentLookup.lookupFactory(name, owner);
|
42500
43006
|
}
|
42501
43007
|
|
42502
43008
|
function readUnwrappedModel(object) {
|
@@ -42845,7 +43351,7 @@ enifed('ember-views/system/build-component-template', ['exports', 'ember-metal/d
|
|
42845
43351
|
})());
|
42846
43352
|
}
|
42847
43353
|
});
|
42848
|
-
enifed('ember-views/system/event_dispatcher', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/is_none', 'ember-metal/run_loop', 'ember-runtime/system/object', 'ember-views/system/jquery', 'ember-views/system/action_manager', 'ember-views/views/view', 'ember-metal/assign'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalIs_none, _emberMetalRun_loop, _emberRuntimeSystemObject, _emberViewsSystemJquery, _emberViewsSystemAction_manager, _emberViewsViewsView, _emberMetalAssign) {
|
43354
|
+
enifed('ember-views/system/event_dispatcher', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/is_none', 'ember-metal/run_loop', 'ember-runtime/system/object', 'ember-views/system/jquery', 'ember-views/system/action_manager', 'ember-views/views/view', 'ember-metal/assign', 'container/owner'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalIs_none, _emberMetalRun_loop, _emberRuntimeSystemObject, _emberViewsSystemJquery, _emberViewsSystemAction_manager, _emberViewsViewsView, _emberMetalAssign, _containerOwner) {
|
42849
43355
|
/**
|
42850
43356
|
@module ember
|
42851
43357
|
@submodule ember-views
|
@@ -43013,7 +43519,9 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-metal/debug', '
|
|
43013
43519
|
*/
|
43014
43520
|
setupHandler: function (rootElement, event, eventName) {
|
43015
43521
|
var self = this;
|
43016
|
-
|
43522
|
+
|
43523
|
+
var owner = _containerOwner.getOwner(this);
|
43524
|
+
var viewRegistry = owner && owner.lookup('-view-registry:main') || _emberViewsViewsView.default.views;
|
43017
43525
|
|
43018
43526
|
if (eventName === null) {
|
43019
43527
|
return;
|
@@ -43175,11 +43683,11 @@ enifed('ember-views/system/lookup_partial', ['exports', 'ember-metal/debug', 'em
|
|
43175
43683
|
}
|
43176
43684
|
_emberMetalDebug.assert('templateNames are not allowed to contain periods: ' + name, name.indexOf('.') === -1);
|
43177
43685
|
|
43178
|
-
if (!env.
|
43686
|
+
if (!env.owner) {
|
43179
43687
|
throw new _emberMetalError.default('Container was not found when looking up a views template. ' + 'This is most likely due to manually instantiating an Ember.View. ' + 'See: http://git.io/EKPpnA');
|
43180
43688
|
}
|
43181
43689
|
|
43182
|
-
return env.
|
43690
|
+
return env.owner.lookup('template:' + underscored) || env.owner.lookup('template:' + name);
|
43183
43691
|
}
|
43184
43692
|
});
|
43185
43693
|
enifed('ember-views/system/platform', ['exports', 'ember-metal/environment'], function (exports, _emberMetalEnvironment) {
|
@@ -43311,22 +43819,17 @@ enifed('ember-views/views/checkbox', ['exports', 'ember-metal/property_get', 'em
|
|
43311
43819
|
disabled: false,
|
43312
43820
|
indeterminate: false,
|
43313
43821
|
|
43314
|
-
init: function () {
|
43315
|
-
this._super.apply(this, arguments);
|
43316
|
-
this.on('change', this, this._updateElementValue);
|
43317
|
-
},
|
43318
|
-
|
43319
43822
|
didInsertElement: function () {
|
43320
43823
|
this._super.apply(this, arguments);
|
43321
43824
|
_emberMetalProperty_get.get(this, 'element').indeterminate = !!_emberMetalProperty_get.get(this, 'indeterminate');
|
43322
43825
|
},
|
43323
43826
|
|
43324
|
-
|
43827
|
+
change: function () {
|
43325
43828
|
_emberMetalProperty_set.set(this, 'checked', this.$().prop('checked'));
|
43326
43829
|
}
|
43327
43830
|
});
|
43328
43831
|
});
|
43329
|
-
enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-views/views/container_view', 'ember-views/views/view', 'ember-runtime/mixins/array', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/computed', 'ember-metal/mixin', 'ember-views/streams/utils', 'ember-views/mixins/empty_view_support'], function (exports, _emberMetalCore, _emberMetalDebug, _emberViewsViewsContainer_view, _emberViewsViewsView, _emberRuntimeMixinsArray, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalMixin, _emberViewsStreamsUtils, _emberViewsMixinsEmpty_view_support) {
|
43832
|
+
enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-views/views/container_view', 'ember-views/views/view', 'ember-runtime/mixins/array', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/computed', 'ember-metal/mixin', 'ember-views/streams/utils', 'ember-views/mixins/empty_view_support', 'container/owner'], function (exports, _emberMetalCore, _emberMetalDebug, _emberViewsViewsContainer_view, _emberViewsViewsView, _emberRuntimeMixinsArray, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalMixin, _emberViewsStreamsUtils, _emberViewsMixinsEmpty_view_support, _containerOwner) {
|
43330
43833
|
/**
|
43331
43834
|
@module ember
|
43332
43835
|
@submodule ember-views
|
@@ -43625,7 +44128,7 @@ enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'emb
|
|
43625
44128
|
itemViewProps = this._itemViewProps || {};
|
43626
44129
|
itemViewClass = this.getAttr('itemViewClass') || _emberMetalProperty_get.get(this, 'itemViewClass');
|
43627
44130
|
|
43628
|
-
itemViewClass = _emberViewsStreamsUtils.readViewFactory(itemViewClass, this
|
44131
|
+
itemViewClass = _emberViewsStreamsUtils.readViewFactory(itemViewClass, _containerOwner.getOwner(this));
|
43629
44132
|
|
43630
44133
|
for (idx = start; idx < start + added; idx++) {
|
43631
44134
|
item = content.objectAt(idx);
|
@@ -43780,7 +44283,7 @@ enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'emb
|
|
43780
44283
|
enifed('ember-views/views/container_view', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-runtime/mixins/mutable_array', 'ember-runtime/system/native_array', 'ember-views/views/view', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-metal/events', 'ember-htmlbars/templates/container-view'], function (exports, _emberMetalCore, _emberMetalDebug, _emberRuntimeMixinsMutable_array, _emberRuntimeSystemNative_array, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMixin, _emberMetalEvents, _emberHtmlbarsTemplatesContainerView) {
|
43781
44284
|
'use strict';
|
43782
44285
|
|
43783
|
-
_emberHtmlbarsTemplatesContainerView.default.meta.revision = 'Ember@2.
|
44286
|
+
_emberHtmlbarsTemplatesContainerView.default.meta.revision = 'Ember@2.3.0-beta.1';
|
43784
44287
|
|
43785
44288
|
/**
|
43786
44289
|
@module ember
|
@@ -44105,7 +44608,7 @@ enifed('ember-views/views/container_view', ['exports', 'ember-metal/core', 'embe
|
|
44105
44608
|
|
44106
44609
|
exports.default = ContainerView;
|
44107
44610
|
});
|
44108
|
-
enifed('ember-views/views/core_view', ['exports', 'ember-metal/
|
44611
|
+
enifed('ember-views/views/core_view', ['exports', 'ember-metal/debug', 'ember-metal/property_get', 'ember-runtime/system/object', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/action_handler', 'ember-runtime/utils', 'ember-metal-views/renderer', 'ember-views/views/states', 'htmlbars-runtime', 'require'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberRuntimeUtils, _emberMetalViewsRenderer, _emberViewsViewsStates, _htmlbarsRuntime, _require) {
|
44109
44612
|
'use strict';
|
44110
44613
|
|
44111
44614
|
function K() {
|
@@ -44245,7 +44748,7 @@ enifed('ember-views/views/core_view', ['exports', 'ember-metal/core', 'ember-met
|
|
44245
44748
|
exports.DeprecatedCoreView = DeprecatedCoreView;
|
44246
44749
|
var _domHelper;
|
44247
44750
|
function domHelper() {
|
44248
|
-
return _domHelper = _domHelper ||
|
44751
|
+
return _domHelper = _domHelper || _require.default('ember-htmlbars/system/dom-helper').default;
|
44249
44752
|
}
|
44250
44753
|
|
44251
44754
|
exports.default = CoreView;
|
@@ -45352,19 +45855,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/de
|
|
45352
45855
|
id: 'ember-views.view-preserves-context-flag',
|
45353
45856
|
until: '2.0.0'
|
45354
45857
|
});
|
45355
|
-
|
45356
|
-
/**
|
45357
|
-
Global hash of shared templates. This will automatically be populated
|
45358
|
-
by the build tools so that you can store your Handlebars templates in
|
45359
|
-
separate files that get loaded into JavaScript at buildtime.
|
45360
|
-
|
45361
|
-
@property TEMPLATES
|
45362
|
-
@for Ember
|
45363
|
-
@type Object
|
45364
|
-
@private
|
45365
|
-
*/
|
45366
|
-
_emberMetalCore.default.TEMPLATES = {};
|
45367
|
-
|
45368
45858
|
/**
|
45369
45859
|
`Ember.View` is the class in Ember responsible for encapsulating templates of
|
45370
45860
|
HTML content, combining templates with data to render as sections of a page's
|
@@ -49119,8 +49609,8 @@ enifed('morph-range', ['exports', 'morph-range/utils'], function (exports, _morp
|
|
49119
49609
|
return this.setNode(content);
|
49120
49610
|
}
|
49121
49611
|
/* Handlebars.SafeString */
|
49122
|
-
if (typeof content.
|
49123
|
-
return this.setHTML(content.
|
49612
|
+
if (typeof content.string === 'string') {
|
49613
|
+
return this.setHTML(content.string);
|
49124
49614
|
}
|
49125
49615
|
if (this.parseTextAsHTML) {
|
49126
49616
|
return this.setHTML(content.toString());
|