ember-source 2.4.6 → 2.5.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 +313 -329
- data/dist/ember-template-compiler.js +368 -532
- data/dist/ember-testing.js +150 -81
- data/dist/ember.debug.js +914 -1056
- data/dist/ember.js +914 -1056
- data/dist/ember.min.js +15 -15
- data/dist/ember.prod.js +746 -963
- metadata +6 -8
- data/dist/ember-tests.js +0 -61579
- data/dist/ember-tests.prod.js +0 -61003
- data/dist/ember.debug.cjs.js +0 -56324
data/dist/ember-testing.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.5.0-beta.1
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, require, requirejs, Ember;
|
@@ -204,10 +204,8 @@ enifed('ember-debug/deprecate', ['exports', 'ember-metal/core', 'ember-metal/err
|
|
204
204
|
|
205
205
|
/**
|
206
206
|
Display a deprecation warning with the provided message and a stack trace
|
207
|
-
(Chrome and Firefox only).
|
208
|
-
|
209
|
-
* In a production build, this method is defined as an empty function (NOP).
|
210
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
207
|
+
(Chrome and Firefox only). Ember build tools will remove any calls to
|
208
|
+
`Ember.deprecate()` when doing a production build.
|
211
209
|
|
212
210
|
@method deprecate
|
213
211
|
@param {String} message A description of the deprecation.
|
@@ -261,7 +259,7 @@ enifed('ember-debug/handlers', ['exports', 'ember-debug/is-plain-function', 'emb
|
|
261
259
|
exports.HANDLERS = HANDLERS;
|
262
260
|
|
263
261
|
function generateTestAsFunctionDeprecation(source) {
|
264
|
-
return 'Calling `' + source + '` with a function argument is deprecated. Please ' + 'use `!!Constructor` for constructors, or an `IIFE` to compute the test for deprecation. ' + 'In a future version functions will be treated as truthy values instead of being executed.';
|
262
|
+
return 'Calling `' + source + '` with a function argument is deprecated. Please ' + 'use `!!Constructor` for constructors, or an `IIFE` to compute the test for deprecation. ' + 'In a future version, functions will be treated as truthy values instead of being executed.';
|
265
263
|
}
|
266
264
|
|
267
265
|
function normalizeTest(test, source) {
|
@@ -314,10 +312,9 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
314
312
|
*/
|
315
313
|
|
316
314
|
/**
|
317
|
-
Define an assertion that will throw an exception if the condition is not
|
318
|
-
|
319
|
-
|
320
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
315
|
+
Define an assertion that will throw an exception if the condition is not
|
316
|
+
met. Ember build tools will remove any calls to `Ember.assert()` when
|
317
|
+
doing a production build. Example:
|
321
318
|
|
322
319
|
```javascript
|
323
320
|
// Test for truthiness
|
@@ -351,10 +348,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
351
348
|
});
|
352
349
|
|
353
350
|
/**
|
354
|
-
Display a debug notice.
|
355
|
-
|
356
|
-
* In a production build, this method is defined as an empty function (NOP).
|
357
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
351
|
+
Display a debug notice. Ember build tools will remove any calls to
|
352
|
+
`Ember.debug()` when doing a production build.
|
358
353
|
|
359
354
|
```javascript
|
360
355
|
Ember.debug('I\'m a debug notice!');
|
@@ -371,9 +366,6 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
371
366
|
/**
|
372
367
|
Display an info notice.
|
373
368
|
|
374
|
-
* In a production build, this method is defined as an empty function (NOP).
|
375
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
376
|
-
|
377
369
|
@method info
|
378
370
|
@private
|
379
371
|
*/
|
@@ -387,7 +379,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
387
379
|
Display a deprecation warning with the provided message and a stack trace
|
388
380
|
(Chrome and Firefox only) when the assigned method is called.
|
389
381
|
|
390
|
-
|
382
|
+
Ember build tools will not remove calls to `Ember.deprecateFunc()`, though
|
383
|
+
no warnings will be shown in production.
|
391
384
|
|
392
385
|
```javascript
|
393
386
|
Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);
|
@@ -397,7 +390,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
397
390
|
@param {String} message A description of the deprecation.
|
398
391
|
@param {Object} [options] The options object for Ember.deprecate.
|
399
392
|
@param {Function} func The new function called to replace its deprecated counterpart.
|
400
|
-
@return {Function}
|
393
|
+
@return {Function} A new function that wraps the original function with a deprecation warning
|
401
394
|
@private
|
402
395
|
*/
|
403
396
|
_emberMetalDebug.setDebugFunction('deprecateFunc', function deprecateFunc() {
|
@@ -438,10 +431,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
438
431
|
});
|
439
432
|
|
440
433
|
/**
|
441
|
-
Run a function meant for debugging.
|
442
|
-
|
443
|
-
* In a production build, this method is defined as an empty function (NOP).
|
444
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
434
|
+
Run a function meant for debugging. Ember build tools will remove any calls to
|
435
|
+
`Ember.runInDebug()` when doing a production build.
|
445
436
|
|
446
437
|
```javascript
|
447
438
|
Ember.runInDebug(() => {
|
@@ -481,18 +472,14 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
481
472
|
@return {void}
|
482
473
|
*/
|
483
474
|
|
484
|
-
function _warnIfUsingStrippedFeatureFlags(FEATURES,
|
475
|
+
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
|
485
476
|
if (featuresWereStripped) {
|
486
477
|
_emberMetalDebug.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
|
487
478
|
|
488
|
-
var
|
489
|
-
|
490
|
-
|
491
|
-
if (key === 'isEnabled' || !(key in knownFeatures)) {
|
492
|
-
continue;
|
479
|
+
for (var key in FEATURES) {
|
480
|
+
if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') {
|
481
|
+
_emberMetalDebug.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
|
493
482
|
}
|
494
|
-
|
495
|
-
_emberMetalDebug.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
|
496
483
|
}
|
497
484
|
}
|
498
485
|
}
|
@@ -502,8 +489,12 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
502
489
|
_emberMetalFeatures.FEATURES['features-stripped-test'] = true;
|
503
490
|
var featuresWereStripped = true;
|
504
491
|
|
492
|
+
if (_emberMetalFeatures.default('features-stripped-test')) {
|
493
|
+
exports.featuresWereStripped = featuresWereStripped = false;
|
494
|
+
}
|
495
|
+
|
505
496
|
delete _emberMetalFeatures.FEATURES['features-stripped-test'];
|
506
|
-
_warnIfUsingStrippedFeatureFlags(_emberMetalCore.default.ENV.FEATURES,
|
497
|
+
_warnIfUsingStrippedFeatureFlags(_emberMetalCore.default.ENV.FEATURES, featuresWereStripped);
|
507
498
|
|
508
499
|
// Inform the developer about the Ember Inspector if not installed.
|
509
500
|
var isFirefox = _emberMetalEnvironment.default.isFirefox;
|
@@ -548,18 +539,18 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
548
539
|
```
|
549
540
|
The handler function takes the following arguments:
|
550
541
|
<ul>
|
551
|
-
<li> <code>message</code> - The message received from the deprecation call
|
542
|
+
<li> <code>message</code> - The message received from the deprecation call.</li>
|
552
543
|
<li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li>
|
553
544
|
<ul>
|
554
|
-
<li> <code>id</code> -
|
555
|
-
<li> <code>until</code> -
|
545
|
+
<li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li>
|
546
|
+
<li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li>
|
556
547
|
</ul>
|
557
|
-
<li> <code>next</code> -
|
548
|
+
<li> <code>next</code> - A function that calls into the previously registered handler.</li>
|
558
549
|
</ul>
|
559
550
|
@public
|
560
551
|
@static
|
561
552
|
@method registerDeprecationHandler
|
562
|
-
@param handler {Function}
|
553
|
+
@param handler {Function} A function to handle deprecation calls.
|
563
554
|
@since 2.1.0
|
564
555
|
*/
|
565
556
|
_emberMetalCore.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
|
@@ -577,14 +568,14 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
577
568
|
<li> <code>message</code> - The message received from the warn call. </li>
|
578
569
|
<li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>
|
579
570
|
<ul>
|
580
|
-
<li> <code>id</code> -
|
571
|
+
<li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>
|
581
572
|
</ul>
|
582
|
-
<li> <code>next</code> -
|
573
|
+
<li> <code>next</code> - A function that calls into the previously registered handler.</li>
|
583
574
|
</ul>
|
584
575
|
@public
|
585
576
|
@static
|
586
577
|
@method registerWarnHandler
|
587
|
-
@param handler {Function}
|
578
|
+
@param handler {Function} A function to handle warnings.
|
588
579
|
@since 2.1.0
|
589
580
|
*/
|
590
581
|
_emberMetalCore.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
|
@@ -641,16 +632,14 @@ enifed('ember-debug/warn', ['exports', 'ember-metal/logger', 'ember-metal/debug'
|
|
641
632
|
*/
|
642
633
|
|
643
634
|
/**
|
644
|
-
Display a warning with the provided message.
|
645
|
-
|
646
|
-
* In a production build, this method is defined as an empty function (NOP).
|
647
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
635
|
+
Display a warning with the provided message. Ember build tools will
|
636
|
+
remove any calls to `Ember.warn()` when doing a production build.
|
648
637
|
|
649
638
|
@method warn
|
650
639
|
@param {String} message A warning to display.
|
651
640
|
@param {Boolean} test An optional boolean. If falsy, the warning
|
652
641
|
will be displayed.
|
653
|
-
@param {Object} options An
|
642
|
+
@param {Object} options An object that can be used to pass a unique
|
654
643
|
`id` for this warning. The `id` can be used by Ember debugging tools
|
655
644
|
to change the behavior (raise, log, or silence) for that specific warning.
|
656
645
|
The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
|
@@ -760,7 +749,7 @@ enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapt
|
|
760
749
|
}
|
761
750
|
});
|
762
751
|
});
|
763
|
-
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) {
|
752
|
+
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', 'ember-metal/features'], function (exports, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp, _emberMetalFeatures) {
|
764
753
|
'use strict';
|
765
754
|
|
766
755
|
/**
|
@@ -771,45 +760,119 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
771
760
|
var helper = _emberTestingTest.default.registerHelper;
|
772
761
|
var asyncHelper = _emberTestingTest.default.registerAsyncHelper;
|
773
762
|
|
774
|
-
|
775
|
-
var appController = app.__container__.lookup('controller:application');
|
763
|
+
var keyboardEventTypes, mouseEventTypes, buildKeyboardEvent, buildMouseEvent, buildBasicEvent, fireEvent, focus;
|
776
764
|
|
777
|
-
|
778
|
-
|
765
|
+
var defaultEventOptions = { canBubble: true, cancelable: true };
|
766
|
+
keyboardEventTypes = ['keydown', 'keypress', 'keyup'];
|
767
|
+
mouseEventTypes = ['click', 'mousedown', 'mouseup', 'dblclick', 'mousenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'];
|
779
768
|
|
780
|
-
function
|
781
|
-
var
|
769
|
+
buildKeyboardEvent = function buildKeyboardEvent(type) {
|
770
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
782
771
|
|
783
|
-
|
784
|
-
|
772
|
+
var event = undefined;
|
773
|
+
try {
|
774
|
+
event = document.createEvent('KeyEvents');
|
775
|
+
var eventOpts = _emberViewsSystemJquery.default.extend({}, defaultEventOptions, options);
|
776
|
+
event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);
|
777
|
+
} catch (e) {
|
778
|
+
event = buildBasicEvent(type, options);
|
779
|
+
}
|
780
|
+
return event;
|
781
|
+
};
|
785
782
|
|
786
|
-
function
|
787
|
-
var
|
783
|
+
buildMouseEvent = function buildMouseEvent(type) {
|
784
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
788
785
|
|
789
|
-
|
790
|
-
|
786
|
+
var event = undefined;
|
787
|
+
try {
|
788
|
+
event = document.createEvent('MouseEvents');
|
789
|
+
var eventOpts = _emberViewsSystemJquery.default.extend({}, defaultEventOptions, options);
|
790
|
+
event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);
|
791
|
+
} catch (e) {
|
792
|
+
event = buildBasicEvent(type, options);
|
793
|
+
}
|
794
|
+
return event;
|
795
|
+
};
|
791
796
|
|
792
|
-
function
|
793
|
-
|
794
|
-
|
795
|
-
|
797
|
+
buildBasicEvent = function buildBasicEvent(type) {
|
798
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
799
|
+
|
800
|
+
var event = document.createEvent('Events');
|
801
|
+
event.initEvent(type, true, true);
|
802
|
+
_emberViewsSystemJquery.default.extend(event, options);
|
803
|
+
return event;
|
804
|
+
};
|
805
|
+
|
806
|
+
fireEvent = function fireEvent(element, type) {
|
807
|
+
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
808
|
+
|
809
|
+
if (!element) {
|
810
|
+
return;
|
811
|
+
}
|
812
|
+
var event = undefined;
|
813
|
+
if (keyboardEventTypes.indexOf(type) > -1) {
|
814
|
+
event = buildKeyboardEvent(type, options);
|
815
|
+
} else if (mouseEventTypes.indexOf(type) > -1) {
|
816
|
+
var rect = element.getBoundingClientRect();
|
817
|
+
var x = rect.left + 1;
|
818
|
+
var y = rect.top + 1;
|
819
|
+
var simulatedCoordinates = {
|
820
|
+
screenX: x + 5,
|
821
|
+
screenY: y + 95,
|
822
|
+
clientX: x,
|
823
|
+
clientY: y
|
824
|
+
};
|
825
|
+
event = buildMouseEvent(type, _emberViewsSystemJquery.default.extend(simulatedCoordinates, options));
|
826
|
+
} else {
|
827
|
+
event = buildBasicEvent(type, options);
|
828
|
+
}
|
829
|
+
element.dispatchEvent(event);
|
830
|
+
};
|
796
831
|
|
797
|
-
function focus(el) {
|
798
|
-
if (el
|
799
|
-
|
832
|
+
focus = function focus(el) {
|
833
|
+
if (!el) {
|
834
|
+
return;
|
835
|
+
}
|
836
|
+
var $el = _emberViewsSystemJquery.default(el);
|
837
|
+
if ($el.is(':input, [contenteditable=true]')) {
|
838
|
+
var type = $el.prop('type');
|
800
839
|
if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {
|
801
|
-
_emberMetalRun_loop.default(
|
840
|
+
_emberMetalRun_loop.default(null, function () {
|
802
841
|
// Firefox does not trigger the `focusin` event if the window
|
803
842
|
// does not have focus. If the document doesn't have focus just
|
804
843
|
// use trigger('focusin') instead.
|
844
|
+
|
805
845
|
if (!document.hasFocus || document.hasFocus()) {
|
806
|
-
|
846
|
+
el.focus();
|
807
847
|
} else {
|
808
|
-
|
848
|
+
$el.trigger('focusin');
|
809
849
|
}
|
810
850
|
});
|
811
851
|
}
|
812
852
|
}
|
853
|
+
};
|
854
|
+
|
855
|
+
function currentRouteName(app) {
|
856
|
+
var routingService = app.__container__.lookup('service:-routing');
|
857
|
+
|
858
|
+
return _emberMetalProperty_get.get(routingService, 'currentRouteName');
|
859
|
+
}
|
860
|
+
|
861
|
+
function currentPath(app) {
|
862
|
+
var routingService = app.__container__.lookup('service:-routing');
|
863
|
+
|
864
|
+
return _emberMetalProperty_get.get(routingService, 'currentPath');
|
865
|
+
}
|
866
|
+
|
867
|
+
function currentURL(app) {
|
868
|
+
var router = app.__container__.lookup('router:main');
|
869
|
+
|
870
|
+
return _emberMetalProperty_get.get(router, 'location').getURL();
|
871
|
+
}
|
872
|
+
|
873
|
+
function pauseTest() {
|
874
|
+
_emberTestingTest.default.adapter.asyncStart();
|
875
|
+
return new _emberRuntimeExtRsvp.default.Promise(function () {}, 'TestAdapter paused promise');
|
813
876
|
}
|
814
877
|
|
815
878
|
function visit(app, url) {
|
@@ -837,12 +900,14 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
837
900
|
|
838
901
|
function click(app, selector, context) {
|
839
902
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
840
|
-
|
903
|
+
var el = $el[0];
|
841
904
|
|
842
|
-
|
905
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'mousedown');
|
843
906
|
|
844
|
-
|
845
|
-
|
907
|
+
focus(el);
|
908
|
+
|
909
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'mouseup');
|
910
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'click');
|
846
911
|
|
847
912
|
return app.testHelpers.wait();
|
848
913
|
}
|
@@ -879,10 +944,9 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
879
944
|
}
|
880
945
|
|
881
946
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
947
|
+
var el = $el[0];
|
882
948
|
|
883
|
-
|
884
|
-
|
885
|
-
_emberMetalRun_loop.default($el, 'trigger', event);
|
949
|
+
_emberMetalRun_loop.default(null, fireEvent, el, type, options);
|
886
950
|
|
887
951
|
return app.testHelpers.wait();
|
888
952
|
}
|
@@ -903,18 +967,19 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
903
967
|
}
|
904
968
|
|
905
969
|
function fillIn(app, selector, contextOrText, text) {
|
906
|
-
var $el, context;
|
970
|
+
var $el, el, context;
|
907
971
|
if (typeof text === 'undefined') {
|
908
972
|
text = contextOrText;
|
909
973
|
} else {
|
910
974
|
context = contextOrText;
|
911
975
|
}
|
912
976
|
$el = app.testHelpers.findWithAssert(selector, context);
|
913
|
-
|
977
|
+
el = $el[0];
|
978
|
+
focus(el);
|
914
979
|
_emberMetalRun_loop.default(function () {
|
915
980
|
$el.val(text);
|
916
|
-
|
917
|
-
|
981
|
+
fireEvent(el, 'input');
|
982
|
+
fireEvent(el, 'change');
|
918
983
|
});
|
919
984
|
return app.testHelpers.wait();
|
920
985
|
}
|
@@ -941,10 +1006,10 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
941
1006
|
|
942
1007
|
function wait(app, value) {
|
943
1008
|
return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
|
1009
|
+
var router = app.__container__.lookup('router:main');
|
1010
|
+
|
944
1011
|
// Every 10ms, poll for the async thing to have finished
|
945
1012
|
var watcher = setInterval(function () {
|
946
|
-
var router = app.__container__.lookup('router:main');
|
947
|
-
|
948
1013
|
// 1. If the router is loading, keep polling
|
949
1014
|
var routerIsLoading = router.router && !!router.router.activeTransition;
|
950
1015
|
if (routerIsLoading) {
|
@@ -1225,6 +1290,10 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
1225
1290
|
*/
|
1226
1291
|
asyncHelper('triggerEvent', triggerEvent);
|
1227
1292
|
});
|
1293
|
+
|
1294
|
+
// Firefox does not trigger the `focusin` event if the window
|
1295
|
+
// does not have focus. If the document doesn't have focus just
|
1296
|
+
// use trigger('focusin') instead.
|
1228
1297
|
enifed('ember-testing/index', ['exports', 'ember-metal/core', 'ember-testing/initializers', 'ember-testing/support', 'ember-testing/setup_for_testing', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-testing/helpers'], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) {
|
1229
1298
|
'use strict';
|
1230
1299
|
|
data/dist/ember.debug.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.5.0-beta.1
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, require, requirejs, Ember;
|
@@ -1236,7 +1236,7 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1236
1236
|
twitter2 instanceof Twitter; // => true
|
1237
1237
|
twitter === twitter2; //=> true
|
1238
1238
|
```
|
1239
|
-
If singletons are not wanted an optional flag can be provided at lookup.
|
1239
|
+
If singletons are not wanted, an optional flag can be provided at lookup.
|
1240
1240
|
```javascript
|
1241
1241
|
var registry = new Registry();
|
1242
1242
|
var container = registry.container();
|
@@ -1258,7 +1258,7 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1258
1258
|
},
|
1259
1259
|
|
1260
1260
|
/**
|
1261
|
-
Given a fullName return the corresponding factory.
|
1261
|
+
Given a fullName, return the corresponding factory.
|
1262
1262
|
@private
|
1263
1263
|
@method lookupFactory
|
1264
1264
|
@param {String} fullName
|
@@ -1319,9 +1319,19 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1319
1319
|
return container.registry.getOption(fullName, 'singleton') !== false;
|
1320
1320
|
}
|
1321
1321
|
|
1322
|
-
function lookup(container,
|
1323
|
-
var options =
|
1324
|
-
|
1322
|
+
function lookup(container, fullName) {
|
1323
|
+
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
1324
|
+
|
1325
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
1326
|
+
if (options.source) {
|
1327
|
+
fullName = container.registry.expandLocalLookup(fullName, options);
|
1328
|
+
|
1329
|
+
// if expandLocalLookup returns falsey, we do not support local lookup
|
1330
|
+
if (!fullName) {
|
1331
|
+
return;
|
1332
|
+
}
|
1333
|
+
}
|
1334
|
+
}
|
1325
1335
|
|
1326
1336
|
if (container.cache[fullName] !== undefined && options.singleton !== false) {
|
1327
1337
|
return container.cache[fullName];
|
@@ -1376,10 +1386,21 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1376
1386
|
return hash;
|
1377
1387
|
}
|
1378
1388
|
|
1379
|
-
function factoryFor(container,
|
1380
|
-
var options =
|
1389
|
+
function factoryFor(container, fullName) {
|
1390
|
+
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
1391
|
+
|
1381
1392
|
var registry = container.registry;
|
1382
|
-
|
1393
|
+
|
1394
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
1395
|
+
if (options.source) {
|
1396
|
+
fullName = registry.expandLocalLookup(fullName, options);
|
1397
|
+
|
1398
|
+
// if expandLocalLookup returns falsey, we do not support local lookup
|
1399
|
+
if (!fullName) {
|
1400
|
+
return;
|
1401
|
+
}
|
1402
|
+
}
|
1403
|
+
}
|
1383
1404
|
|
1384
1405
|
var cache = container.factoryCache;
|
1385
1406
|
if (cache[fullName]) {
|
@@ -1568,22 +1589,18 @@ enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/debug
|
|
1568
1589
|
|
1569
1590
|
exports.default = Container;
|
1570
1591
|
});
|
1571
|
-
|
1572
|
-
// if expandLocalLookup returns falsey, we do not support local lookup
|
1573
|
-
|
1574
|
-
// if expandLocalLookup returns falsey, we do not support local lookup
|
1575
1592
|
enifed('container/index', ['exports', 'ember-metal/core', 'container/registry', 'container/container', 'container/owner'], function (exports, _emberMetalCore, _containerRegistry, _containerContainer, _containerOwner) {
|
1576
1593
|
'use strict';
|
1577
1594
|
|
1578
1595
|
/*
|
1579
|
-
Public
|
1580
|
-
The public
|
1596
|
+
Public API for the container is still in flux.
|
1597
|
+
The public API, specified on the application namespace should be considered the stable API.
|
1581
1598
|
// @module container
|
1582
1599
|
@private
|
1583
1600
|
*/
|
1584
1601
|
|
1585
1602
|
/*
|
1586
|
-
Flag to enable/disable model factory injections (disabled by default)
|
1603
|
+
Flag to enable/disable model factory injections (disabled by default).
|
1587
1604
|
If model factory injections are enabled, models should not be
|
1588
1605
|
accessed globally (only through `container.lookupFactory('model:modelName'))`);
|
1589
1606
|
*/
|
@@ -1645,8 +1662,8 @@ enifed('container/owner', ['exports', 'ember-metal/symbol'], function (exports,
|
|
1645
1662
|
```
|
1646
1663
|
|
1647
1664
|
@method getOwner
|
1648
|
-
@param {Object} object
|
1649
|
-
@return {Object}
|
1665
|
+
@param {Object} object An object with an owner.
|
1666
|
+
@return {Object} An owner object.
|
1650
1667
|
@for Ember
|
1651
1668
|
@public
|
1652
1669
|
*/
|
@@ -1660,8 +1677,8 @@ enifed('container/owner', ['exports', 'ember-metal/symbol'], function (exports,
|
|
1660
1677
|
useful in some testing cases.
|
1661
1678
|
|
1662
1679
|
@method setOwner
|
1663
|
-
@param {Object} object
|
1664
|
-
@return {Object}
|
1680
|
+
@param {Object} object An object with an owner.
|
1681
|
+
@return {Object} An owner object.
|
1665
1682
|
@for Ember
|
1666
1683
|
@public
|
1667
1684
|
*/
|
@@ -1821,7 +1838,9 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
1821
1838
|
@param {Function} factory
|
1822
1839
|
@param {Object} options
|
1823
1840
|
*/
|
1824
|
-
register: function (fullName, factory
|
1841
|
+
register: function (fullName, factory) {
|
1842
|
+
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
1843
|
+
|
1825
1844
|
_emberMetalDebug.assert('fullName must be a proper full name', this.validateFullName(fullName));
|
1826
1845
|
|
1827
1846
|
if (factory === undefined) {
|
@@ -1836,7 +1855,7 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
1836
1855
|
|
1837
1856
|
delete this._failCache[normalizedName];
|
1838
1857
|
this.registrations[normalizedName] = factory;
|
1839
|
-
this._options[normalizedName] = options
|
1858
|
+
this._options[normalizedName] = options;
|
1840
1859
|
},
|
1841
1860
|
|
1842
1861
|
/**
|
@@ -1984,6 +2003,9 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
1984
2003
|
_emberMetalDebug.assert('fullName must be a proper full name', this.validateFullName(fullName));
|
1985
2004
|
|
1986
2005
|
var source = undefined;
|
2006
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
2007
|
+
source = options && options.source && this.normalize(options.source);
|
2008
|
+
}
|
1987
2009
|
|
1988
2010
|
return has(this, this.normalize(fullName), source);
|
1989
2011
|
},
|
@@ -2027,8 +2049,9 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
2027
2049
|
@param {String} fullName
|
2028
2050
|
@param {Object} options
|
2029
2051
|
*/
|
2030
|
-
options: function (fullName
|
2031
|
-
var options =
|
2052
|
+
options: function (fullName) {
|
2053
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
2054
|
+
|
2032
2055
|
var normalizedName = this.normalize(fullName);
|
2033
2056
|
this._options[normalizedName] = options;
|
2034
2057
|
},
|
@@ -2350,6 +2373,40 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
2350
2373
|
};
|
2351
2374
|
}
|
2352
2375
|
|
2376
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
2377
|
+
/**
|
2378
|
+
Given a fullName and a source fullName returns the fully resolved
|
2379
|
+
fullName. Used to allow for local lookup.
|
2380
|
+
```javascript
|
2381
|
+
var registry = new Registry();
|
2382
|
+
// the twitter factory is added to the module system
|
2383
|
+
registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
|
2384
|
+
```
|
2385
|
+
@private
|
2386
|
+
@method expandLocalLookup
|
2387
|
+
@param {String} fullName
|
2388
|
+
@param {Object} [options]
|
2389
|
+
@param {String} [options.source] the fullname of the request source (used for local lookups)
|
2390
|
+
@return {String} fullName
|
2391
|
+
*/
|
2392
|
+
Registry.prototype.expandLocalLookup = function Registry_expandLocalLookup(fullName, options) {
|
2393
|
+
if (this.resolver && this.resolver.expandLocalLookup) {
|
2394
|
+
_emberMetalDebug.assert('fullName must be a proper full name', this.validateFullName(fullName));
|
2395
|
+
_emberMetalDebug.assert('options.source must be provided to expandLocalLookup', options && options.source);
|
2396
|
+
_emberMetalDebug.assert('options.source must be a proper full name', this.validateFullName(options.source));
|
2397
|
+
|
2398
|
+
var normalizedFullName = this.normalize(fullName);
|
2399
|
+
var normalizedSource = this.normalize(options.source);
|
2400
|
+
|
2401
|
+
return expandLocalLookup(this, normalizedFullName, normalizedSource);
|
2402
|
+
} else if (this.fallback) {
|
2403
|
+
return this.fallback.expandLocalLookup(fullName, options);
|
2404
|
+
} else {
|
2405
|
+
return null;
|
2406
|
+
}
|
2407
|
+
};
|
2408
|
+
}
|
2409
|
+
|
2353
2410
|
function expandLocalLookup(registry, normalizedName, normalizedSource) {
|
2354
2411
|
var cache = registry._localLookupCache;
|
2355
2412
|
var normalizedNameCache = cache[normalizedName];
|
@@ -2370,6 +2427,18 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
2370
2427
|
}
|
2371
2428
|
|
2372
2429
|
function resolve(registry, normalizedName, options) {
|
2430
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
2431
|
+
if (options && options.source) {
|
2432
|
+
// when `source` is provided expand normalizedName
|
2433
|
+
// and source into the full normalizedName
|
2434
|
+
normalizedName = registry.expandLocalLookup(normalizedName, options);
|
2435
|
+
|
2436
|
+
// if expandLocalLookup returns falsey, we do not support local lookup
|
2437
|
+
if (!normalizedName) {
|
2438
|
+
return;
|
2439
|
+
}
|
2440
|
+
}
|
2441
|
+
}
|
2373
2442
|
|
2374
2443
|
var cached = registry._resolveCache[normalizedName];
|
2375
2444
|
if (cached !== undefined) {
|
@@ -2404,27 +2473,6 @@ enifed('container/registry', ['exports', 'ember-metal/features', 'ember-metal/de
|
|
2404
2473
|
|
2405
2474
|
exports.default = Registry;
|
2406
2475
|
});
|
2407
|
-
|
2408
|
-
/**
|
2409
|
-
Given a fullName and a source fullName returns the fully resolved
|
2410
|
-
fullName. Used to allow for local lookup.
|
2411
|
-
```javascript
|
2412
|
-
var registry = new Registry();
|
2413
|
-
// the twitter factory is added to the module system
|
2414
|
-
registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
|
2415
|
-
```
|
2416
|
-
@private
|
2417
|
-
@method expandLocalLookup
|
2418
|
-
@param {String} fullName
|
2419
|
-
@param {Object} [options]
|
2420
|
-
@param {String} [options.source] the fullname of the request source (used for local lookups)
|
2421
|
-
@return {String} fullName
|
2422
|
-
*/
|
2423
|
-
|
2424
|
-
// when `source` is provided expand normalizedName
|
2425
|
-
// and source into the full normalizedName
|
2426
|
-
|
2427
|
-
// if expandLocalLookup returns falsey, we do not support local lookup
|
2428
2476
|
enifed('dag-map/platform', ['exports'], function (exports) {
|
2429
2477
|
'use strict';
|
2430
2478
|
|
@@ -3695,6 +3743,15 @@ enifed('ember-application/index', ['exports', 'ember-metal/core', 'ember-metal/f
|
|
3695
3743
|
_emberMetalCore.default.Resolver = _emberApplicationSystemResolver.Resolver;
|
3696
3744
|
_emberMetalCore.default.DefaultResolver = _emberApplicationSystemResolver.default;
|
3697
3745
|
|
3746
|
+
if (_emberMetalFeatures.default('ember-application-engines')) {
|
3747
|
+
_emberMetalCore.default.Engine = _emberApplicationSystemEngine.default;
|
3748
|
+
|
3749
|
+
// Expose `EngineInstance` and `ApplicationInstance` for easy overriding.
|
3750
|
+
// Reanalyze whether to continue exposing these after feature flag is removed.
|
3751
|
+
_emberMetalCore.default.EngineInstance = _emberApplicationSystemEngineInstance.default;
|
3752
|
+
_emberMetalCore.default.ApplicationInstance = _emberApplicationSystemApplicationInstance.default;
|
3753
|
+
}
|
3754
|
+
|
3698
3755
|
_emberRuntimeSystemLazy_load.runLoadHooks('Ember.Application', _emberApplicationSystemApplication.default);
|
3699
3756
|
});
|
3700
3757
|
|
@@ -3702,10 +3759,7 @@ enifed('ember-application/index', ['exports', 'ember-metal/core', 'ember-metal/f
|
|
3702
3759
|
@module ember
|
3703
3760
|
@submodule ember-application
|
3704
3761
|
*/
|
3705
|
-
|
3706
|
-
// Expose `EngineInstance` and `ApplicationInstance` for easy overriding.
|
3707
|
-
// Reanalyze whether to continue exposing these after feature flag is removed.
|
3708
|
-
enifed('ember-application/system/application-instance', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-metal/computed', 'ember-htmlbars/system/dom-helper', 'ember-runtime/mixins/registry_proxy', 'ember-metal-views/renderer', 'ember-metal/assign', 'ember-metal/environment', 'ember-runtime/ext/rsvp', 'ember-views/system/jquery', 'ember-application/system/engine-instance'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalRun_loop, _emberMetalComputed, _emberHtmlbarsSystemDomHelper, _emberRuntimeMixinsRegistry_proxy, _emberMetalViewsRenderer, _emberMetalAssign, _emberMetalEnvironment, _emberRuntimeExtRsvp, _emberViewsSystemJquery, _emberApplicationSystemEngineInstance) {
|
3762
|
+
enifed('ember-application/system/application-instance', ['exports', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-metal/computed', 'ember-htmlbars/system/dom-helper', 'ember-runtime/mixins/registry_proxy', 'ember-metal-views', 'ember-metal/assign', 'ember-metal/environment', 'ember-runtime/ext/rsvp', 'ember-views/system/jquery', 'ember-application/system/engine-instance'], function (exports, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalRun_loop, _emberMetalComputed, _emberHtmlbarsSystemDomHelper, _emberRuntimeMixinsRegistry_proxy, _emberMetalViews, _emberMetalAssign, _emberMetalEnvironment, _emberRuntimeExtRsvp, _emberViewsSystemJquery, _emberApplicationSystemEngineInstance) {
|
3709
3763
|
/**
|
3710
3764
|
@module ember
|
3711
3765
|
@submodule ember-application
|
@@ -3837,7 +3891,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
3837
3891
|
|
3838
3892
|
registry.register('renderer:-dom', {
|
3839
3893
|
create: function () {
|
3840
|
-
return new
|
3894
|
+
return new _emberMetalViews.Renderer(new _emberHtmlbarsSystemDomHelper.default(options.document), { destinedForDOM: options.isInteractive });
|
3841
3895
|
}
|
3842
3896
|
});
|
3843
3897
|
|
@@ -4195,27 +4249,15 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-metal
|
|
4195
4249
|
|
4196
4250
|
exports.default = ApplicationInstance;
|
4197
4251
|
});
|
4198
|
-
enifed('ember-application/system/application', ['exports', 'ember-metal', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-runtime/system/lazy_load', 'ember-metal/run_loop', 'ember-runtime/controllers/controller', 'ember-metal-views
|
4252
|
+
enifed('ember-application/system/application', ['exports', 'ember-metal', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/property_get', 'ember-runtime/system/lazy_load', 'ember-metal/run_loop', 'ember-runtime/controllers/controller', 'ember-metal-views', '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', 'ember-application/system/engine'], function (exports, _emberMetal, _emberMetalDebug, _emberMetalFeatures, _emberMetalProperty_get, _emberRuntimeSystemLazy_load, _emberMetalRun_loop, _emberRuntimeControllersController, _emberMetalViews, _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, _emberApplicationSystemEngine) {
|
4199
4253
|
/**
|
4200
4254
|
@module ember
|
4201
4255
|
@submodule ember-application
|
4202
4256
|
*/
|
4203
4257
|
'use strict';
|
4204
4258
|
|
4205
|
-
exports._resetLegacyAddonWarnings = _resetLegacyAddonWarnings;
|
4206
|
-
|
4207
4259
|
var librariesRegistered = false;
|
4208
4260
|
|
4209
|
-
var warnedAboutLegacyViewAddon = false;
|
4210
|
-
var warnedAboutLegacyControllerAddon = false;
|
4211
|
-
|
4212
|
-
// For testing
|
4213
|
-
|
4214
|
-
function _resetLegacyAddonWarnings() {
|
4215
|
-
warnedAboutLegacyViewAddon = false;
|
4216
|
-
warnedAboutLegacyControllerAddon = false;
|
4217
|
-
}
|
4218
|
-
|
4219
4261
|
/**
|
4220
4262
|
An instance of `Ember.Application` is the starting point for every Ember
|
4221
4263
|
application. It helps to instantiate, initialize and coordinate the many
|
@@ -4720,18 +4762,6 @@ enifed('ember-application/system/application', ['exports', 'ember-metal', 'ember
|
|
4720
4762
|
return;
|
4721
4763
|
}
|
4722
4764
|
|
4723
|
-
if (_emberMetal.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT && !warnedAboutLegacyViewAddon) {
|
4724
|
-
_emberMetalDebug.deprecate('Support for the `ember-legacy-views` addon will end soon, please remove it from your application.', false, { id: 'ember-legacy-views', until: '2.6.0', url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-view' });
|
4725
|
-
|
4726
|
-
warnedAboutLegacyViewAddon = true;
|
4727
|
-
}
|
4728
|
-
|
4729
|
-
if (_emberMetal.default.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT && !warnedAboutLegacyControllerAddon) {
|
4730
|
-
_emberMetalDebug.deprecate('Support for the `ember-legacy-controllers` addon will end soon, please remove it from your application.', false, { id: 'ember-legacy-controllers', until: '2.6.0', url: 'http://emberjs.com/deprecations/v1.x/#toc_objectcontroller' });
|
4731
|
-
|
4732
|
-
warnedAboutLegacyControllerAddon = true;
|
4733
|
-
}
|
4734
|
-
|
4735
4765
|
// Even though this returns synchronously, we still need to make sure the
|
4736
4766
|
// boot promise exists for book-keeping purposes: if anything went wrong in
|
4737
4767
|
// the boot process, we need to store the error as a rejection on the boot
|
@@ -5112,7 +5142,7 @@ enifed('ember-application/system/application', ['exports', 'ember-metal', 'ember
|
|
5112
5142
|
registry.register('controller:basic', _emberRuntimeControllersController.default, { instantiate: false });
|
5113
5143
|
|
5114
5144
|
registry.register('renderer:-dom', { create: function () {
|
5115
|
-
return new
|
5145
|
+
return new _emberMetalViews.Renderer(new _emberHtmlbarsSystemDomHelper.default());
|
5116
5146
|
} });
|
5117
5147
|
|
5118
5148
|
registry.injection('view', 'renderer', 'renderer:-dom');
|
@@ -5228,7 +5258,6 @@ enifed('ember-application/system/engine-instance', ['exports', 'ember-runtime/sy
|
|
5228
5258
|
@extends Ember.Object
|
5229
5259
|
@uses RegistryProxyMixin
|
5230
5260
|
@uses ContainerProxyMixin
|
5231
|
-
@category ember-application-engines
|
5232
5261
|
*/
|
5233
5262
|
|
5234
5263
|
var EngineInstance = _emberRuntimeSystemObject.default.extend(_emberRuntimeMixinsRegistry_proxy.default, _emberRuntimeMixinsContainer_proxy.default, {
|
@@ -5315,7 +5344,6 @@ enifed('ember-application/system/engine', ['exports', 'ember-runtime/system/name
|
|
5315
5344
|
@namespace Ember
|
5316
5345
|
@extends Ember.Namespace
|
5317
5346
|
@uses RegistryProxy
|
5318
|
-
@category ember-application-engines
|
5319
5347
|
@public
|
5320
5348
|
*/
|
5321
5349
|
var Engine = _emberRuntimeSystemNamespace.default.extend(_emberRuntimeMixinsRegistry_proxy.default, {
|
@@ -6237,10 +6265,8 @@ enifed('ember-debug/deprecate', ['exports', 'ember-metal/core', 'ember-metal/err
|
|
6237
6265
|
|
6238
6266
|
/**
|
6239
6267
|
Display a deprecation warning with the provided message and a stack trace
|
6240
|
-
(Chrome and Firefox only).
|
6241
|
-
|
6242
|
-
* In a production build, this method is defined as an empty function (NOP).
|
6243
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6268
|
+
(Chrome and Firefox only). Ember build tools will remove any calls to
|
6269
|
+
`Ember.deprecate()` when doing a production build.
|
6244
6270
|
|
6245
6271
|
@method deprecate
|
6246
6272
|
@param {String} message A description of the deprecation.
|
@@ -6294,7 +6320,7 @@ enifed('ember-debug/handlers', ['exports', 'ember-debug/is-plain-function', 'emb
|
|
6294
6320
|
exports.HANDLERS = HANDLERS;
|
6295
6321
|
|
6296
6322
|
function generateTestAsFunctionDeprecation(source) {
|
6297
|
-
return 'Calling `' + source + '` with a function argument is deprecated. Please ' + 'use `!!Constructor` for constructors, or an `IIFE` to compute the test for deprecation. ' + 'In a future version functions will be treated as truthy values instead of being executed.';
|
6323
|
+
return 'Calling `' + source + '` with a function argument is deprecated. Please ' + 'use `!!Constructor` for constructors, or an `IIFE` to compute the test for deprecation. ' + 'In a future version, functions will be treated as truthy values instead of being executed.';
|
6298
6324
|
}
|
6299
6325
|
|
6300
6326
|
function normalizeTest(test, source) {
|
@@ -6347,10 +6373,9 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6347
6373
|
*/
|
6348
6374
|
|
6349
6375
|
/**
|
6350
|
-
Define an assertion that will throw an exception if the condition is not
|
6351
|
-
|
6352
|
-
|
6353
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6376
|
+
Define an assertion that will throw an exception if the condition is not
|
6377
|
+
met. Ember build tools will remove any calls to `Ember.assert()` when
|
6378
|
+
doing a production build. Example:
|
6354
6379
|
|
6355
6380
|
```javascript
|
6356
6381
|
// Test for truthiness
|
@@ -6384,10 +6409,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6384
6409
|
});
|
6385
6410
|
|
6386
6411
|
/**
|
6387
|
-
Display a debug notice.
|
6388
|
-
|
6389
|
-
* In a production build, this method is defined as an empty function (NOP).
|
6390
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6412
|
+
Display a debug notice. Ember build tools will remove any calls to
|
6413
|
+
`Ember.debug()` when doing a production build.
|
6391
6414
|
|
6392
6415
|
```javascript
|
6393
6416
|
Ember.debug('I\'m a debug notice!');
|
@@ -6404,9 +6427,6 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6404
6427
|
/**
|
6405
6428
|
Display an info notice.
|
6406
6429
|
|
6407
|
-
* In a production build, this method is defined as an empty function (NOP).
|
6408
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6409
|
-
|
6410
6430
|
@method info
|
6411
6431
|
@private
|
6412
6432
|
*/
|
@@ -6420,7 +6440,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6420
6440
|
Display a deprecation warning with the provided message and a stack trace
|
6421
6441
|
(Chrome and Firefox only) when the assigned method is called.
|
6422
6442
|
|
6423
|
-
|
6443
|
+
Ember build tools will not remove calls to `Ember.deprecateFunc()`, though
|
6444
|
+
no warnings will be shown in production.
|
6424
6445
|
|
6425
6446
|
```javascript
|
6426
6447
|
Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);
|
@@ -6430,7 +6451,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6430
6451
|
@param {String} message A description of the deprecation.
|
6431
6452
|
@param {Object} [options] The options object for Ember.deprecate.
|
6432
6453
|
@param {Function} func The new function called to replace its deprecated counterpart.
|
6433
|
-
@return {Function}
|
6454
|
+
@return {Function} A new function that wraps the original function with a deprecation warning
|
6434
6455
|
@private
|
6435
6456
|
*/
|
6436
6457
|
_emberMetalDebug.setDebugFunction('deprecateFunc', function deprecateFunc() {
|
@@ -6471,10 +6492,8 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6471
6492
|
});
|
6472
6493
|
|
6473
6494
|
/**
|
6474
|
-
Run a function meant for debugging.
|
6475
|
-
|
6476
|
-
* In a production build, this method is defined as an empty function (NOP).
|
6477
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6495
|
+
Run a function meant for debugging. Ember build tools will remove any calls to
|
6496
|
+
`Ember.runInDebug()` when doing a production build.
|
6478
6497
|
|
6479
6498
|
```javascript
|
6480
6499
|
Ember.runInDebug(() => {
|
@@ -6514,18 +6533,14 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6514
6533
|
@return {void}
|
6515
6534
|
*/
|
6516
6535
|
|
6517
|
-
function _warnIfUsingStrippedFeatureFlags(FEATURES,
|
6536
|
+
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
|
6518
6537
|
if (featuresWereStripped) {
|
6519
6538
|
_emberMetalDebug.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
|
6520
6539
|
|
6521
|
-
var
|
6522
|
-
|
6523
|
-
|
6524
|
-
if (key === 'isEnabled' || !(key in knownFeatures)) {
|
6525
|
-
continue;
|
6540
|
+
for (var key in FEATURES) {
|
6541
|
+
if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') {
|
6542
|
+
_emberMetalDebug.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
|
6526
6543
|
}
|
6527
|
-
|
6528
|
-
_emberMetalDebug.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
|
6529
6544
|
}
|
6530
6545
|
}
|
6531
6546
|
}
|
@@ -6535,8 +6550,12 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6535
6550
|
_emberMetalFeatures.FEATURES['features-stripped-test'] = true;
|
6536
6551
|
var featuresWereStripped = true;
|
6537
6552
|
|
6553
|
+
if (_emberMetalFeatures.default('features-stripped-test')) {
|
6554
|
+
exports.featuresWereStripped = featuresWereStripped = false;
|
6555
|
+
}
|
6556
|
+
|
6538
6557
|
delete _emberMetalFeatures.FEATURES['features-stripped-test'];
|
6539
|
-
_warnIfUsingStrippedFeatureFlags(_emberMetalCore.default.ENV.FEATURES,
|
6558
|
+
_warnIfUsingStrippedFeatureFlags(_emberMetalCore.default.ENV.FEATURES, featuresWereStripped);
|
6540
6559
|
|
6541
6560
|
// Inform the developer about the Ember Inspector if not installed.
|
6542
6561
|
var isFirefox = _emberMetalEnvironment.default.isFirefox;
|
@@ -6581,18 +6600,18 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6581
6600
|
```
|
6582
6601
|
The handler function takes the following arguments:
|
6583
6602
|
<ul>
|
6584
|
-
<li> <code>message</code> - The message received from the deprecation call
|
6603
|
+
<li> <code>message</code> - The message received from the deprecation call.</li>
|
6585
6604
|
<li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li>
|
6586
6605
|
<ul>
|
6587
|
-
<li> <code>id</code> -
|
6588
|
-
<li> <code>until</code> -
|
6606
|
+
<li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li>
|
6607
|
+
<li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li>
|
6589
6608
|
</ul>
|
6590
|
-
<li> <code>next</code> -
|
6609
|
+
<li> <code>next</code> - A function that calls into the previously registered handler.</li>
|
6591
6610
|
</ul>
|
6592
6611
|
@public
|
6593
6612
|
@static
|
6594
6613
|
@method registerDeprecationHandler
|
6595
|
-
@param handler {Function}
|
6614
|
+
@param handler {Function} A function to handle deprecation calls.
|
6596
6615
|
@since 2.1.0
|
6597
6616
|
*/
|
6598
6617
|
_emberMetalCore.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
|
@@ -6610,14 +6629,14 @@ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-metal/debug',
|
|
6610
6629
|
<li> <code>message</code> - The message received from the warn call. </li>
|
6611
6630
|
<li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>
|
6612
6631
|
<ul>
|
6613
|
-
<li> <code>id</code> -
|
6632
|
+
<li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>
|
6614
6633
|
</ul>
|
6615
|
-
<li> <code>next</code> -
|
6634
|
+
<li> <code>next</code> - A function that calls into the previously registered handler.</li>
|
6616
6635
|
</ul>
|
6617
6636
|
@public
|
6618
6637
|
@static
|
6619
6638
|
@method registerWarnHandler
|
6620
|
-
@param handler {Function}
|
6639
|
+
@param handler {Function} A function to handle warnings.
|
6621
6640
|
@since 2.1.0
|
6622
6641
|
*/
|
6623
6642
|
_emberMetalCore.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
|
@@ -6674,16 +6693,14 @@ enifed('ember-debug/warn', ['exports', 'ember-metal/logger', 'ember-metal/debug'
|
|
6674
6693
|
*/
|
6675
6694
|
|
6676
6695
|
/**
|
6677
|
-
Display a warning with the provided message.
|
6678
|
-
|
6679
|
-
* In a production build, this method is defined as an empty function (NOP).
|
6680
|
-
Uses of this method in Ember itself are stripped from the ember.prod.js build.
|
6696
|
+
Display a warning with the provided message. Ember build tools will
|
6697
|
+
remove any calls to `Ember.warn()` when doing a production build.
|
6681
6698
|
|
6682
6699
|
@method warn
|
6683
6700
|
@param {String} message A warning to display.
|
6684
6701
|
@param {Boolean} test An optional boolean. If falsy, the warning
|
6685
6702
|
will be displayed.
|
6686
|
-
@param {Object} options An
|
6703
|
+
@param {Object} options An object that can be used to pass a unique
|
6687
6704
|
`id` for this warning. The `id` can be used by Ember debugging tools
|
6688
6705
|
to change the behavior (raise, log, or silence) for that specific warning.
|
6689
6706
|
The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
|
@@ -6734,7 +6751,7 @@ enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-met
|
|
6734
6751
|
* `catalogEntriesByType`
|
6735
6752
|
|
6736
6753
|
The adapter will need to be registered
|
6737
|
-
in the application's container as `container-debug-adapter:main
|
6754
|
+
in the application's container as `container-debug-adapter:main`.
|
6738
6755
|
|
6739
6756
|
Example:
|
6740
6757
|
|
@@ -6769,7 +6786,7 @@ enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-met
|
|
6769
6786
|
Returns true if it is possible to catalog a list of available
|
6770
6787
|
classes in the resolver for a given type.
|
6771
6788
|
@method canCatalogEntriesByType
|
6772
|
-
@param {String} type The type. e.g. "model", "controller", "route"
|
6789
|
+
@param {String} type The type. e.g. "model", "controller", "route".
|
6773
6790
|
@return {boolean} whether a list is available for this type.
|
6774
6791
|
@public
|
6775
6792
|
*/
|
@@ -6784,7 +6801,7 @@ enifed('ember-extension-support/container_debug_adapter', ['exports', 'ember-met
|
|
6784
6801
|
/**
|
6785
6802
|
Returns the available classes a given type.
|
6786
6803
|
@method catalogEntriesByType
|
6787
|
-
@param {String} type The type. e.g. "model", "controller", "route"
|
6804
|
+
@param {String} type The type. e.g. "model", "controller", "route".
|
6788
6805
|
@return {Array} An array of strings.
|
6789
6806
|
@public
|
6790
6807
|
*/
|
@@ -6843,7 +6860,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
6843
6860
|
* `observeRecord`
|
6844
6861
|
|
6845
6862
|
The adapter will need to be registered
|
6846
|
-
in the application's container as `dataAdapter:main
|
6863
|
+
in the application's container as `dataAdapter:main`.
|
6847
6864
|
|
6848
6865
|
Example:
|
6849
6866
|
|
@@ -6879,7 +6896,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
6879
6896
|
containerDebugAdapter: undefined,
|
6880
6897
|
|
6881
6898
|
/**
|
6882
|
-
|
6899
|
+
The number of attributes to send
|
6883
6900
|
as columns. (Enough to make the record
|
6884
6901
|
identifiable).
|
6885
6902
|
@private
|
@@ -6970,19 +6987,19 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
6970
6987
|
Fetch the records of a given type and observe them for changes.
|
6971
6988
|
@public
|
6972
6989
|
@method watchRecords
|
6973
|
-
@param {String} modelName The model name
|
6990
|
+
@param {String} modelName The model name.
|
6974
6991
|
@param {Function} recordsAdded Callback to call to add records.
|
6975
6992
|
Takes an array of objects containing wrapped records.
|
6976
6993
|
The object should have the following properties:
|
6977
|
-
columnValues: {Object} key and value of a table cell
|
6978
|
-
object: {Object}
|
6994
|
+
columnValues: {Object} The key and value of a table cell.
|
6995
|
+
object: {Object} The actual record object.
|
6979
6996
|
@param {Function} recordsUpdated Callback to call when a record has changed.
|
6980
6997
|
Takes an array of objects containing wrapped records.
|
6981
6998
|
@param {Function} recordsRemoved Callback to call when a record has removed.
|
6982
6999
|
Takes the following parameters:
|
6983
|
-
index:
|
6984
|
-
count:
|
6985
|
-
@return {Function} Method to call to remove all observers
|
7000
|
+
index: The array index where the records were removed.
|
7001
|
+
count: The number of records removed.
|
7002
|
+
@return {Function} Method to call to remove all observers.
|
6986
7003
|
*/
|
6987
7004
|
watchRecords: function (modelName, recordsAdded, recordsUpdated, recordsRemoved) {
|
6988
7005
|
var _this2 = this;
|
@@ -7048,11 +7065,11 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7048
7065
|
/**
|
7049
7066
|
Detect whether a class is a model.
|
7050
7067
|
Test that against the model class
|
7051
|
-
of your persistence library
|
7068
|
+
of your persistence library.
|
7052
7069
|
@private
|
7053
7070
|
@method detect
|
7054
|
-
@param {Class} klass The class to test
|
7055
|
-
@return boolean Whether the class is a model class or not
|
7071
|
+
@param {Class} klass The class to test.
|
7072
|
+
@return boolean Whether the class is a model class or not.
|
7056
7073
|
*/
|
7057
7074
|
detect: function (klass) {
|
7058
7075
|
return false;
|
@@ -7062,10 +7079,10 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7062
7079
|
Get the columns for a given model type.
|
7063
7080
|
@private
|
7064
7081
|
@method columnsForType
|
7065
|
-
@param {Class} type The model type
|
7082
|
+
@param {Class} type The model type.
|
7066
7083
|
@return {Array} An array of columns of the following format:
|
7067
|
-
name: {String} name of the column
|
7068
|
-
desc: {String} Humanized description (what would show in a table column name)
|
7084
|
+
name: {String} The name of the column.
|
7085
|
+
desc: {String} Humanized description (what would show in a table column name).
|
7069
7086
|
*/
|
7070
7087
|
columnsForType: function (type) {
|
7071
7088
|
return _emberRuntimeSystemNative_array.A();
|
@@ -7075,9 +7092,9 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7075
7092
|
Adds observers to a model type class.
|
7076
7093
|
@private
|
7077
7094
|
@method observeModelType
|
7078
|
-
@param {String} modelName The model type name
|
7095
|
+
@param {String} modelName The model type name.
|
7079
7096
|
@param {Function} typesUpdated Called when a type is modified.
|
7080
|
-
@return {Function} The function to call to remove observers
|
7097
|
+
@return {Function} The function to call to remove observers.
|
7081
7098
|
*/
|
7082
7099
|
|
7083
7100
|
observeModelType: function (modelName, typesUpdated) {
|
@@ -7111,17 +7128,17 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7111
7128
|
Wraps a given model type and observes changes to it.
|
7112
7129
|
@private
|
7113
7130
|
@method wrapModelType
|
7114
|
-
@param {Class} klass A model class
|
7115
|
-
@param {String} modelName Name of the class
|
7116
|
-
@return {Object}
|
7131
|
+
@param {Class} klass A model class.
|
7132
|
+
@param {String} modelName Name of the class.
|
7133
|
+
@return {Object} Contains the wrapped type and the function to remove observers
|
7117
7134
|
Format:
|
7118
|
-
type: {Object}
|
7135
|
+
type: {Object} The wrapped type.
|
7119
7136
|
The wrapped type has the following format:
|
7120
|
-
name: {String} name of the type
|
7121
|
-
count: {Integer} number of records available
|
7122
|
-
columns: {Columns} array of columns to describe the record
|
7123
|
-
object: {Class}
|
7124
|
-
release: {Function} The function to remove observers
|
7137
|
+
name: {String} The name of the type.
|
7138
|
+
count: {Integer} The number of records available.
|
7139
|
+
columns: {Columns} An array of columns to describe the record.
|
7140
|
+
object: {Class} The actual Model type class.
|
7141
|
+
release: {Function} The function to remove observers.
|
7125
7142
|
*/
|
7126
7143
|
wrapModelType: function (klass, name) {
|
7127
7144
|
var records = this.getRecords(klass, name);
|
@@ -7141,7 +7158,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7141
7158
|
Fetches all models defined in the application.
|
7142
7159
|
@private
|
7143
7160
|
@method getModelTypes
|
7144
|
-
@return {Array} Array of model types
|
7161
|
+
@return {Array} Array of model types.
|
7145
7162
|
*/
|
7146
7163
|
getModelTypes: function () {
|
7147
7164
|
var _this4 = this;
|
@@ -7155,7 +7172,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7155
7172
|
types = this._getObjectsOnNamespaces();
|
7156
7173
|
}
|
7157
7174
|
|
7158
|
-
// New adapters return strings instead of classes
|
7175
|
+
// New adapters return strings instead of classes.
|
7159
7176
|
types = _emberRuntimeSystemNative_array.A(types).map(function (name) {
|
7160
7177
|
return {
|
7161
7178
|
klass: _this4._nameToClass(name),
|
@@ -7171,10 +7188,10 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7171
7188
|
|
7172
7189
|
/**
|
7173
7190
|
Loops over all namespaces and all objects
|
7174
|
-
attached to them
|
7191
|
+
attached to them.
|
7175
7192
|
@private
|
7176
7193
|
@method _getObjectsOnNamespaces
|
7177
|
-
@return {Array} Array of model type strings
|
7194
|
+
@return {Array} Array of model type strings.
|
7178
7195
|
*/
|
7179
7196
|
_getObjectsOnNamespaces: function () {
|
7180
7197
|
var _this5 = this;
|
@@ -7260,8 +7277,8 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7260
7277
|
Returns the values of filters defined by `getFilters`.
|
7261
7278
|
@private
|
7262
7279
|
@method getRecordFilterValues
|
7263
|
-
@param {Object} record The record instance
|
7264
|
-
@return {Object} The filter values
|
7280
|
+
@param {Object} record The record instance.
|
7281
|
+
@return {Object} The filter values.
|
7265
7282
|
*/
|
7266
7283
|
getRecordFilterValues: function (record) {
|
7267
7284
|
return {};
|
@@ -7272,8 +7289,8 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7272
7289
|
@private
|
7273
7290
|
@method getRecordColor
|
7274
7291
|
@param {Object} record The record instance
|
7275
|
-
@return {String} The
|
7276
|
-
Possible options: black, red, blue, green
|
7292
|
+
@return {String} The records color.
|
7293
|
+
Possible options: black, red, blue, green.
|
7277
7294
|
*/
|
7278
7295
|
getRecordColor: function (record) {
|
7279
7296
|
return null;
|
@@ -7284,7 +7301,7 @@ enifed('ember-extension-support/data_adapter', ['exports', 'ember-metal/property
|
|
7284
7301
|
when a change occurs.
|
7285
7302
|
@private
|
7286
7303
|
@method observerRecord
|
7287
|
-
@param {Object} record The record instance
|
7304
|
+
@param {Object} record The record instance.
|
7288
7305
|
@param {Function} recordUpdated The callback to call when a record is updated.
|
7289
7306
|
@return {Function} The function to call to remove all observers.
|
7290
7307
|
*/
|
@@ -7415,7 +7432,7 @@ enifed('ember-htmlbars/helper', ['exports', 'ember-runtime/system/object'], func
|
|
7415
7432
|
<div>{{format-currency cents currency="$"}}</div>
|
7416
7433
|
```
|
7417
7434
|
|
7418
|
-
Additionally a helper can be called as a nested helper (sometimes called a
|
7435
|
+
Additionally, a helper can be called as a nested helper (sometimes called a
|
7419
7436
|
subexpression). In this example, the computed value of a helper is passed
|
7420
7437
|
to a component named `show-money`:
|
7421
7438
|
|
@@ -7438,7 +7455,7 @@ enifed('ember-htmlbars/helper', ['exports', 'ember-runtime/system/object'], func
|
|
7438
7455
|
Each time the input to a helper changes, the `compute` function will be
|
7439
7456
|
called again.
|
7440
7457
|
|
7441
|
-
As instances, these helpers also have access to the container
|
7458
|
+
As instances, these helpers also have access to the container an will accept
|
7442
7459
|
injected dependencies.
|
7443
7460
|
|
7444
7461
|
Additionally, class helpers can call `recompute` to force a new computation.
|
@@ -7519,36 +7536,6 @@ enifed('ember-htmlbars/helper', ['exports', 'ember-runtime/system/object'], func
|
|
7519
7536
|
|
7520
7537
|
exports.default = Helper;
|
7521
7538
|
});
|
7522
|
-
enifed('ember-htmlbars/helpers/-concat', ['exports'], function (exports) {
|
7523
|
-
/**
|
7524
|
-
@module ember
|
7525
|
-
@submodule ember-templates
|
7526
|
-
*/
|
7527
|
-
|
7528
|
-
/**
|
7529
|
-
Concatenates input params together.
|
7530
|
-
|
7531
|
-
Example:
|
7532
|
-
|
7533
|
-
```handlebars
|
7534
|
-
{{some-component name=(concat firstName " " lastName)}}
|
7535
|
-
|
7536
|
-
{{! would pass name="<first name value> <last name value>" to the component}}
|
7537
|
-
```
|
7538
|
-
|
7539
|
-
@public
|
7540
|
-
@method concat
|
7541
|
-
@for Ember.Templates.helpers
|
7542
|
-
@since 1.13.0
|
7543
|
-
*/
|
7544
|
-
'use strict';
|
7545
|
-
|
7546
|
-
exports.default = concat;
|
7547
|
-
|
7548
|
-
function concat(params) {
|
7549
|
-
return params.join('');
|
7550
|
-
}
|
7551
|
-
});
|
7552
7539
|
enifed('ember-htmlbars/helpers/-html-safe', ['exports', 'htmlbars-util/safe-string'], function (exports, _htmlbarsUtilSafeString) {
|
7553
7540
|
'use strict';
|
7554
7541
|
|
@@ -7569,7 +7556,7 @@ enifed('ember-htmlbars/helpers/-html-safe', ['exports', 'htmlbars-util/safe-stri
|
|
7569
7556
|
});
|
7570
7557
|
enifed('ember-htmlbars/helpers/-join-classes', ['exports'], function (exports) {
|
7571
7558
|
/*
|
7572
|
-
|
7559
|
+
This private helper is used to join and compact a list of class names.
|
7573
7560
|
|
7574
7561
|
@private
|
7575
7562
|
*/
|
@@ -7601,7 +7588,7 @@ enifed('ember-htmlbars/helpers/-legacy-each-with-controller', ['exports', 'ember
|
|
7601
7588
|
var list = params[0];
|
7602
7589
|
var keyPath = hash.key;
|
7603
7590
|
|
7604
|
-
// TODO: Correct falsy semantics
|
7591
|
+
// TODO: Correct falsy semantics.
|
7605
7592
|
if (!list || _emberMetalProperty_get.get(list, 'length') === 0) {
|
7606
7593
|
if (blocks.inverse.yield) {
|
7607
7594
|
blocks.inverse.yield();
|
@@ -7692,7 +7679,7 @@ enifed('ember-htmlbars/helpers/-normalize-class', ['exports', 'ember-runtime/sys
|
|
7692
7679
|
var inactiveClass = hash.inactiveClass;
|
7693
7680
|
|
7694
7681
|
// When using the colon syntax, evaluate the truthiness or falsiness
|
7695
|
-
// of the value to determine which className to return
|
7682
|
+
// of the value to determine which className to return.
|
7696
7683
|
if (activeClass || inactiveClass) {
|
7697
7684
|
if (!!value) {
|
7698
7685
|
return activeClass;
|
@@ -7703,7 +7690,7 @@ enifed('ember-htmlbars/helpers/-normalize-class', ['exports', 'ember-runtime/sys
|
|
7703
7690
|
// If value is a Boolean and true, return the dasherized property
|
7704
7691
|
// name.
|
7705
7692
|
} else if (value === true) {
|
7706
|
-
// Only apply to last segment in the path
|
7693
|
+
// Only apply to last segment in the path.
|
7707
7694
|
if (propName && _emberMetalPath_cache.isPath(propName)) {
|
7708
7695
|
var segments = propName.split('.');
|
7709
7696
|
propName = segments[segments.length - 1];
|
@@ -7723,6 +7710,36 @@ enifed('ember-htmlbars/helpers/-normalize-class', ['exports', 'ember-runtime/sys
|
|
7723
7710
|
}
|
7724
7711
|
}
|
7725
7712
|
});
|
7713
|
+
enifed('ember-htmlbars/helpers/concat', ['exports'], function (exports) {
|
7714
|
+
/**
|
7715
|
+
@module ember
|
7716
|
+
@submodule ember-templates
|
7717
|
+
*/
|
7718
|
+
|
7719
|
+
/**
|
7720
|
+
Concatenates the given arguments into a string.
|
7721
|
+
|
7722
|
+
Example:
|
7723
|
+
|
7724
|
+
```handlebars
|
7725
|
+
{{some-component name=(concat firstName " " lastName)}}
|
7726
|
+
|
7727
|
+
{{! would pass name="<first name value> <last name value>" to the component}}
|
7728
|
+
```
|
7729
|
+
|
7730
|
+
@public
|
7731
|
+
@method concat
|
7732
|
+
@for Ember.Templates.helpers
|
7733
|
+
@since 1.13.0
|
7734
|
+
*/
|
7735
|
+
'use strict';
|
7736
|
+
|
7737
|
+
exports.default = concat;
|
7738
|
+
|
7739
|
+
function concat(args) {
|
7740
|
+
return args.join('');
|
7741
|
+
}
|
7742
|
+
});
|
7726
7743
|
enifed('ember-htmlbars/helpers/each-in', ['exports', 'ember-views/streams/should_display'], function (exports, _emberViewsStreamsShould_display) {
|
7727
7744
|
/**
|
7728
7745
|
@module ember
|
@@ -7952,7 +7969,7 @@ enifed('ember-htmlbars/helpers/if_unless', ['exports', 'ember-metal/debug', 'emb
|
|
7952
7969
|
the `else` helper.
|
7953
7970
|
|
7954
7971
|
```handlebars
|
7955
|
-
{{!
|
7972
|
+
{{!Is it raining outside?}}
|
7956
7973
|
{{#if isRaining}}
|
7957
7974
|
Yes, grab an umbrella!
|
7958
7975
|
{{else}}
|
@@ -8070,7 +8087,7 @@ enifed('ember-htmlbars/helpers/loc', ['exports', 'ember-runtime/system/string'],
|
|
8070
8087
|
|
8071
8088
|
@method loc
|
8072
8089
|
@for Ember.Templates.helpers
|
8073
|
-
@param {String} str The string to format
|
8090
|
+
@param {String} str The string to format.
|
8074
8091
|
@see {Ember.String#loc}
|
8075
8092
|
@public
|
8076
8093
|
*/
|
@@ -8184,7 +8201,7 @@ enifed('ember-htmlbars/helpers', ['exports', 'ember-metal/empty_object'], functi
|
|
8184
8201
|
@method _registerHelper
|
8185
8202
|
@for Ember.HTMLBars
|
8186
8203
|
@param {String} name
|
8187
|
-
@param {Object|Function} helperFunc
|
8204
|
+
@param {Object|Function} helperFunc The helper function to add.
|
8188
8205
|
*/
|
8189
8206
|
|
8190
8207
|
function registerHelper(name, helperFunc) {
|
@@ -8416,7 +8433,7 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/features', 'em
|
|
8416
8433
|
}
|
8417
8434
|
}
|
8418
8435
|
|
8419
|
-
// Determine if this is an initial render or a re-render
|
8436
|
+
// Determine if this is an initial render or a re-render.
|
8420
8437
|
if (state.manager) {
|
8421
8438
|
state.manager.rerender(env, attrs, visitor);
|
8422
8439
|
return;
|
@@ -8455,19 +8472,26 @@ enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/features', 'em
|
|
8455
8472
|
var isInvokedWithAngles = currentComponent && currentComponent._isAngleBracket;
|
8456
8473
|
var isInvokedWithCurlies = currentComponent && !currentComponent._isAngleBracket;
|
8457
8474
|
|
8458
|
-
// <div> at the top level of a <foo-bar> invocation
|
8475
|
+
// <div> at the top level of a <foo-bar> invocation.
|
8459
8476
|
var isComponentHTMLElement = isAngleBracket && !isDasherized && isInvokedWithAngles;
|
8460
8477
|
|
8461
|
-
// <foo-bar> at the top level of a <foo-bar> invocation
|
8478
|
+
// <foo-bar> at the top level of a <foo-bar> invocation.
|
8462
8479
|
var isComponentIdentityElement = isAngleBracket && isTopLevel && tagName === env.view.tagName;
|
8463
8480
|
|
8464
|
-
// <div> at the top level of a {{foo-bar}} invocation
|
8481
|
+
// <div> at the top level of a {{foo-bar}} invocation.
|
8465
8482
|
var isNormalHTMLElement = isAngleBracket && !isDasherized && isInvokedWithCurlies;
|
8466
8483
|
|
8467
8484
|
var component = undefined,
|
8468
8485
|
layout = undefined;
|
8469
8486
|
if (isDasherized || !isAngleBracket) {
|
8470
8487
|
var options = {};
|
8488
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
8489
|
+
var moduleName = env.meta && env.meta.moduleName;
|
8490
|
+
|
8491
|
+
if (moduleName) {
|
8492
|
+
options.source = 'template:' + moduleName;
|
8493
|
+
}
|
8494
|
+
}
|
8471
8495
|
|
8472
8496
|
var result = _emberHtmlbarsUtilsLookupComponent.default(env.owner, tagName, options);
|
8473
8497
|
|
@@ -8853,11 +8877,11 @@ enifed('ember-htmlbars/hooks/get-cell-or-value', ['exports', 'ember-metal/stream
|
|
8853
8877
|
|
8854
8878
|
function getCellOrValue(ref) {
|
8855
8879
|
if (ref && ref[_emberHtmlbarsKeywordsMut.MUTABLE_REFERENCE]) {
|
8856
|
-
//
|
8880
|
+
// Reify the mutable reference into a mutable cell.
|
8857
8881
|
return ref.cell();
|
8858
8882
|
}
|
8859
8883
|
|
8860
|
-
//
|
8884
|
+
// Get the value out of the reference.
|
8861
8885
|
return _emberMetalStreamsUtils.read(ref);
|
8862
8886
|
}
|
8863
8887
|
});
|
@@ -8876,7 +8900,7 @@ enifed('ember-htmlbars/hooks/get-child', ['exports', 'ember-metal/streams/utils'
|
|
8876
8900
|
return parent.getKey(key);
|
8877
8901
|
}
|
8878
8902
|
|
8879
|
-
// This should only happen when we are looking at an `attrs` hash
|
8903
|
+
// This should only happen when we are looking at an `attrs` hash.
|
8880
8904
|
// That might change if it is possible to pass object literals
|
8881
8905
|
// through the templating system.
|
8882
8906
|
return parent[key];
|
@@ -8988,10 +9012,10 @@ enifed('ember-htmlbars/hooks/invoke-helper', ['exports', 'ember-htmlbars/system/
|
|
8988
9012
|
function invokeHelper(morph, env, scope, visitor, params, hash, helper, templates, context) {
|
8989
9013
|
var helperStream = _emberHtmlbarsSystemInvokeHelper.buildHelperStream(helper, params, hash, templates, env, scope);
|
8990
9014
|
|
8991
|
-
// Ember.Helper helpers are pure values, thus linkable
|
9015
|
+
// Ember.Helper helpers are pure values, thus linkable.
|
8992
9016
|
if (helperStream.linkable) {
|
8993
9017
|
if (morph) {
|
8994
|
-
// When processing an inline expression the params and hash have already
|
9018
|
+
// When processing an inline expression, the params and hash have already
|
8995
9019
|
// been linked. Thus, HTMLBars will not link the returned helperStream.
|
8996
9020
|
// We subscribe the morph to the helperStream here, and also subscribe
|
8997
9021
|
// the helperStream to any params.
|
@@ -9012,7 +9036,7 @@ enifed('ember-htmlbars/hooks/invoke-helper', ['exports', 'ember-htmlbars/system/
|
|
9012
9036
|
return { link: true, value: helperStream };
|
9013
9037
|
}
|
9014
9038
|
|
9015
|
-
// Built-in helpers are not linkable
|
9039
|
+
// Built-in helpers are not linkable. They must run on every rerender.
|
9016
9040
|
return { value: helperStream.value() };
|
9017
9041
|
}
|
9018
9042
|
});
|
@@ -9048,7 +9072,7 @@ enifed('ember-htmlbars/hooks/link-render-node', ['exports', 'ember-htmlbars/util
|
|
9048
9072
|
}
|
9049
9073
|
}
|
9050
9074
|
|
9051
|
-
// If
|
9075
|
+
// If there is a dot in the path, we need to subscribe to the arguments in the
|
9052
9076
|
// closure component as well.
|
9053
9077
|
|
9054
9078
|
if (_emberHtmlbarsSystemLookupHelper.CONTAINS_DOT_CACHE.get(path)) {
|
@@ -9076,7 +9100,7 @@ enifed('ember-htmlbars/hooks/link-render-node', ['exports', 'ember-htmlbars/util
|
|
9076
9100
|
}
|
9077
9101
|
}
|
9078
9102
|
|
9079
|
-
// The params and hash can be reused
|
9103
|
+
// The params and hash can be reused. They don't need to be
|
9080
9104
|
// recomputed on subsequent re-renders because they are
|
9081
9105
|
// streams.
|
9082
9106
|
return true;
|
@@ -9104,11 +9128,11 @@ enifed('ember-htmlbars/hooks/link-render-node', ['exports', 'ember-htmlbars/util
|
|
9104
9128
|
var isTruthyVal = _emberMetalStreamsUtils.read(isTruthy);
|
9105
9129
|
|
9106
9130
|
if (_emberRuntimeUtils.isArray(predicateVal)) {
|
9107
|
-
return lengthVal > 0 ?
|
9131
|
+
return lengthVal > 0 ? predicateVal : false;
|
9108
9132
|
}
|
9109
9133
|
|
9110
9134
|
if (typeof isTruthyVal === 'boolean') {
|
9111
|
-
return isTruthyVal
|
9135
|
+
return isTruthyVal;
|
9112
9136
|
}
|
9113
9137
|
|
9114
9138
|
return coercer(predicateVal);
|
@@ -9252,7 +9276,7 @@ enifed("ember-htmlbars/hooks/will-cleanup-tree", ["exports"], function (exports)
|
|
9252
9276
|
|
9253
9277
|
// When we go to clean up the render node and all of its children, we may
|
9254
9278
|
// encounter views/components associated with those nodes along the way. In
|
9255
|
-
// those cases, we need to
|
9279
|
+
// those cases, we need to sever the link between the
|
9256
9280
|
// existing view hierarchy and those views.
|
9257
9281
|
//
|
9258
9282
|
// However, we do *not* need to remove the child views of child views, since
|
@@ -9280,7 +9304,7 @@ enifed("ember-htmlbars/hooks/will-cleanup-tree", ["exports"], function (exports)
|
|
9280
9304
|
view.ownerView._destroyingSubtreeForView = view;
|
9281
9305
|
}
|
9282
9306
|
});
|
9283
|
-
enifed('ember-htmlbars/index', ['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
|
9307
|
+
enifed('ember-htmlbars/index', ['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/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, _emberHtmlbarsTemplate_registry, _emberHtmlbarsSystemBootstrap, _emberHtmlbarsCompat) {
|
9284
9308
|
/**
|
9285
9309
|
Ember templates are executed by [HTMLBars](https://github.com/tildeio/htmlbars),
|
9286
9310
|
an HTML-friendly version of [Handlebars](http://handlebarsjs.com/). Any valid Handlebars syntax is valid in an Ember template.
|
@@ -9427,11 +9451,11 @@ enifed('ember-htmlbars/index', ['exports', 'ember-metal/core', 'ember-metal/feat
|
|
9427
9451
|
});
|
9428
9452
|
});
|
9429
9453
|
|
9430
|
-
//
|
9431
|
-
// initializer to enable embedded templates
|
9454
|
+
// Importing adds template bootstrapping
|
9455
|
+
// initializer to enable embedded templates.
|
9432
9456
|
|
9433
|
-
//
|
9434
|
-
// Ember.Handlebars global if htmlbars is enabled
|
9457
|
+
// Importing ember-htmlbars/compat updates the
|
9458
|
+
// Ember.Handlebars global if htmlbars is enabled.
|
9435
9459
|
enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/debug', 'ember-metal/is_none', 'ember-metal/symbol', 'ember-metal/streams/stream', 'ember-metal/empty_object', '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, _emberMetalEmpty_object, _emberMetalStreamsUtils, _emberHtmlbarsHooksSubexpr, _emberMetalAssign, _emberHtmlbarsUtilsExtractPositionalParams, _emberHtmlbarsUtilsLookupComponent) {
|
9436
9460
|
/**
|
9437
9461
|
@module ember
|
@@ -9479,9 +9503,9 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/deb
|
|
9479
9503
|
s.addDependency(path);
|
9480
9504
|
|
9481
9505
|
// FIXME: If the stream invalidates on every params or hash change, then
|
9482
|
-
// the {{component helper will be
|
9506
|
+
// the {{component helper will be forced to re-render the whole component
|
9483
9507
|
// each time. Instead, these dependencies should not be required and the
|
9484
|
-
// element component keyword should add the params and hash as dependencies
|
9508
|
+
// element component keyword should add the params and hash as dependencies.
|
9485
9509
|
params.forEach(function (item) {
|
9486
9510
|
return s.addDependency(item);
|
9487
9511
|
});
|
@@ -9520,7 +9544,7 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/deb
|
|
9520
9544
|
function createNestedClosureComponentCell(componentCell, params, hash) {
|
9521
9545
|
var _ref;
|
9522
9546
|
|
9523
|
-
// This needs to be done in each nesting level to avoid raising assertions
|
9547
|
+
// This needs to be done in each nesting level to avoid raising assertions.
|
9524
9548
|
processPositionalParamsFromCell(componentCell, params, hash);
|
9525
9549
|
|
9526
9550
|
return _ref = {}, _ref[COMPONENT_PATH] = componentCell[COMPONENT_PATH], _ref[COMPONENT_HASH] = mergeInNewHash(componentCell[COMPONENT_HASH], hash), _ref[COMPONENT_POSITIONAL_PARAMS] = componentCell[COMPONENT_POSITIONAL_PARAMS], _ref[COMPONENT_CELL] = true, _ref;
|
@@ -9537,7 +9561,7 @@ enifed('ember-htmlbars/keywords/closure-component', ['exports', 'ember-metal/deb
|
|
9537
9561
|
|
9538
9562
|
var positionalParams = getPositionalParams(env.owner, componentPath);
|
9539
9563
|
|
9540
|
-
// This needs to be done in each nesting level to avoid raising assertions
|
9564
|
+
// This needs to be done in each nesting level to avoid raising assertions.
|
9541
9565
|
_emberHtmlbarsUtilsExtractPositionalParams.processPositionalParams(null, positionalParams, params, hash);
|
9542
9566
|
|
9543
9567
|
return _ref2 = {}, _ref2[COMPONENT_PATH] = componentPath, _ref2[COMPONENT_HASH] = hash, _ref2[COMPONENT_POSITIONAL_PARAMS] = positionalParams, _ref2[COMPONENT_CELL] = true, _ref2;
|
@@ -9600,7 +9624,7 @@ enifed('ember-htmlbars/keywords/collection', ['exports', 'ember-views/streams/ut
|
|
9600
9624
|
```javascript
|
9601
9625
|
App = Ember.Application.create();
|
9602
9626
|
App.ApplicationRoute = Ember.Route.extend({
|
9603
|
-
model
|
9627
|
+
model() {
|
9604
9628
|
return [{name: 'Yehuda'},{name: 'Tom'},{name: 'Peter'}];
|
9605
9629
|
}
|
9606
9630
|
});
|
@@ -9618,8 +9642,8 @@ enifed('ember-htmlbars/keywords/collection', ['exports', 'ember-views/streams/ut
|
|
9618
9642
|
|
9619
9643
|
### Non-block version of collection
|
9620
9644
|
|
9621
|
-
If you provide an `itemViewClass` option that has its own `template
|
9622
|
-
omit the block.
|
9645
|
+
If you provide an `itemViewClass` option that has its own `template`,
|
9646
|
+
then you may omit the block.
|
9623
9647
|
|
9624
9648
|
The following template:
|
9625
9649
|
|
@@ -9633,7 +9657,7 @@ enifed('ember-htmlbars/keywords/collection', ['exports', 'ember-views/streams/ut
|
|
9633
9657
|
```javascript
|
9634
9658
|
App = Ember.Application.create();
|
9635
9659
|
App.ApplicationRoute = Ember.Route.extend({
|
9636
|
-
model
|
9660
|
+
model() {
|
9637
9661
|
return [{name: 'Yehuda'},{name: 'Tom'},{name: 'Peter'}];
|
9638
9662
|
}
|
9639
9663
|
});
|
@@ -10044,7 +10068,7 @@ enifed('ember-htmlbars/keywords/get', ['exports', 'ember-metal/debug', 'ember-me
|
|
10044
10068
|
|
10045
10069
|
var DynamicKeyStream = _emberMetalStreamsStream.default.extend({
|
10046
10070
|
init: function (source, keySource) {
|
10047
|
-
//
|
10071
|
+
// Used to get the original path for debugging purposes.
|
10048
10072
|
var label = labelFor(source, keySource);
|
10049
10073
|
|
10050
10074
|
this.label = label;
|
@@ -10379,7 +10403,7 @@ enifed('ember-htmlbars/keywords/legacy-yield', ['exports', 'ember-metal/streams/
|
|
10379
10403
|
var block = scope.getBlock('default');
|
10380
10404
|
|
10381
10405
|
if (block.arity === 0) {
|
10382
|
-
// Typically, the `controller` local
|
10406
|
+
// Typically, the `controller` local persists through lexical scope.
|
10383
10407
|
// However, in this case, the `{{legacy-yield}}` in the legacy each view
|
10384
10408
|
// needs to override the controller local for the template it is yielding.
|
10385
10409
|
// This megahaxx allows us to override the controller, and most importantly,
|
@@ -10452,7 +10476,7 @@ enifed('ember-htmlbars/keywords/mut', ['exports', 'ember-metal/debug', 'ember-me
|
|
10452
10476
|
To specify that a parameter is mutable, when invoking the child `Component`:
|
10453
10477
|
|
10454
10478
|
```handlebars
|
10455
|
-
|
10479
|
+
<my-child child-click-count={{mut totalClicks}} />
|
10456
10480
|
```
|
10457
10481
|
|
10458
10482
|
The child `Component` can then modify the parent's value as needed:
|
@@ -10461,31 +10485,11 @@ enifed('ember-htmlbars/keywords/mut', ['exports', 'ember-metal/debug', 'ember-me
|
|
10461
10485
|
// my-child.js
|
10462
10486
|
export default Component.extend({
|
10463
10487
|
click() {
|
10464
|
-
this.
|
10465
|
-
}
|
10466
|
-
});
|
10467
|
-
```
|
10468
|
-
|
10469
|
-
Additionally, the `mut` helper can be combined with the `action` helper to
|
10470
|
-
mutate a value. For example:
|
10471
|
-
|
10472
|
-
```handlebars
|
10473
|
-
{{my-child childClickCount=totalClicks click-count-change=(action (mut "totalClicks"))}}
|
10474
|
-
```
|
10475
|
-
|
10476
|
-
The child `Component` would invoke the action with the new click value:
|
10477
|
-
|
10478
|
-
```javascript
|
10479
|
-
// my-child.js
|
10480
|
-
export default Component.extend({
|
10481
|
-
click() {
|
10482
|
-
this.get('clickCountChange')(this.get('childClickCount') + 1);
|
10488
|
+
this.attrs.childClickCount.update(this.attrs.childClickCount.value + 1);
|
10483
10489
|
}
|
10484
10490
|
});
|
10485
10491
|
```
|
10486
10492
|
|
10487
|
-
The `mut` helper changes the `totalClicks` value to what was provided as the action argument.
|
10488
|
-
|
10489
10493
|
See a [2.0 blog post](http://emberjs.com/blog/2015/05/10/run-up-to-two-oh.html#toc_the-code-mut-code-helper) for
|
10490
10494
|
additional information on using `{{mut}}`.
|
10491
10495
|
|
@@ -10557,10 +10561,10 @@ enifed('ember-htmlbars/keywords/outlet', ['exports', 'ember-metal/debug', 'ember
|
|
10557
10561
|
|
10558
10562
|
'use strict';
|
10559
10563
|
|
10560
|
-
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.
|
10564
|
+
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.5.0-beta.1';
|
10561
10565
|
|
10562
10566
|
/**
|
10563
|
-
The `{{outlet}}` helper lets you specify where a child
|
10567
|
+
The `{{outlet}}` helper lets you specify where a child route will render in
|
10564
10568
|
your template. An important use of the `{{outlet}}` helper is in your
|
10565
10569
|
application's `application.hbs` file:
|
10566
10570
|
|
@@ -10670,6 +10674,10 @@ enifed('ember-htmlbars/keywords/outlet', ['exports', 'ember-metal/debug', 'ember
|
|
10670
10674
|
|
10671
10675
|
var Component;
|
10672
10676
|
|
10677
|
+
if (_emberMetalFeatures.default('ember-routing-routable-components')) {
|
10678
|
+
Component = outletState.render.Component;
|
10679
|
+
}
|
10680
|
+
|
10673
10681
|
var options;
|
10674
10682
|
var attrs = {};
|
10675
10683
|
if (Component) {
|
@@ -10720,7 +10728,7 @@ enifed('ember-htmlbars/keywords/outlet', ['exports', 'ember-metal/debug', 'ember
|
|
10720
10728
|
b = b.render;
|
10721
10729
|
for (var key in a) {
|
10722
10730
|
if (a.hasOwnProperty(key)) {
|
10723
|
-
//
|
10731
|
+
// Name is only here for logging & debugging. If two different
|
10724
10732
|
// names result in otherwise identical states, they're still
|
10725
10733
|
// identical.
|
10726
10734
|
if (a[key] !== b[key] && key !== 'name') {
|
@@ -10776,7 +10784,7 @@ enifed('ember-htmlbars/keywords/partial', ['exports', 'ember-views/system/lookup
|
|
10776
10784
|
|
10777
10785
|
@method partial
|
10778
10786
|
@for Ember.Templates.helpers
|
10779
|
-
@param {String} partialName
|
10787
|
+
@param {String} partialName The name of the template to render minus the leading underscore.
|
10780
10788
|
@public
|
10781
10789
|
*/
|
10782
10790
|
|
@@ -11457,7 +11465,7 @@ enifed('ember-htmlbars/keywords', ['exports', 'htmlbars-runtime'], function (exp
|
|
11457
11465
|
@method _registerHelper
|
11458
11466
|
@for Ember.HTMLBars
|
11459
11467
|
@param {String} name
|
11460
|
-
@param {Object|Function} keyword
|
11468
|
+
@param {Object|Function} keyword The keyword to add.
|
11461
11469
|
*/
|
11462
11470
|
|
11463
11471
|
function registerKeyword(name, keyword) {
|
@@ -11598,7 +11606,8 @@ enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember
|
|
11598
11606
|
|
11599
11607
|
var tagName = options.tagName;
|
11600
11608
|
var params = options.params;
|
11601
|
-
var attrs = options.attrs;
|
11609
|
+
var _options$attrs = options.attrs;
|
11610
|
+
var attrs = _options$attrs === undefined ? {} : _options$attrs;
|
11602
11611
|
var parentView = options.parentView;
|
11603
11612
|
var parentScope = options.parentScope;
|
11604
11613
|
var isAngleBracket = options.isAngleBracket;
|
@@ -11606,8 +11615,6 @@ enifed('ember-htmlbars/node-managers/component-node-manager', ['exports', 'ember
|
|
11606
11615
|
var layout = options.layout;
|
11607
11616
|
var templates = options.templates;
|
11608
11617
|
|
11609
|
-
attrs = attrs || {};
|
11610
|
-
|
11611
11618
|
component = component || (isAngleBracket ? _emberHtmlbarsGlimmerComponent.default : _emberViewsComponentsComponent.default);
|
11612
11619
|
|
11613
11620
|
var createOptions = (_createOptions = {
|
@@ -12264,7 +12271,6 @@ enifed('ember-htmlbars/system/append-templated-view', ['exports', 'ember-metal/d
|
|
12264
12271
|
|
12265
12272
|
// We only want to override the `_context` computed property if there is
|
12266
12273
|
// no specified controller. See View#_context for more information.
|
12267
|
-
|
12268
12274
|
var noControllerInProto = !viewProto.controller;
|
12269
12275
|
if (viewProto.controller && viewProto.controller.isDescriptor) {
|
12270
12276
|
noControllerInProto = true;
|
@@ -12313,7 +12319,7 @@ enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-views/component_loo
|
|
12313
12319
|
var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';
|
12314
12320
|
|
12315
12321
|
_emberViewsSystemJquery.default(selectors, ctx).each(function () {
|
12316
|
-
// Get a reference to the script tag
|
12322
|
+
// Get a reference to the script tag.
|
12317
12323
|
var script = _emberViewsSystemJquery.default(this);
|
12318
12324
|
|
12319
12325
|
// Get the name of the script, used by Ember.View's templateName property.
|
@@ -12331,15 +12337,15 @@ enifed('ember-htmlbars/system/bootstrap', ['exports', 'ember-views/component_loo
|
|
12331
12337
|
});
|
12332
12338
|
}
|
12333
12339
|
|
12334
|
-
// Check if template of same name already exists
|
12340
|
+
// Check if template of same name already exists.
|
12335
12341
|
if (_emberHtmlbarsTemplate_registry.has(templateName)) {
|
12336
12342
|
throw new _emberMetalError.default('Template named "' + templateName + '" already exists.');
|
12337
12343
|
}
|
12338
12344
|
|
12339
|
-
// For templates which have a name, we save them and then remove them from the DOM
|
12345
|
+
// For templates which have a name, we save them and then remove them from the DOM.
|
12340
12346
|
_emberHtmlbarsTemplate_registry.set(templateName, template);
|
12341
12347
|
|
12342
|
-
// Remove script tag from DOM
|
12348
|
+
// Remove script tag from DOM.
|
12343
12349
|
script.remove();
|
12344
12350
|
});
|
12345
12351
|
}
|
@@ -12401,10 +12407,10 @@ enifed('ember-htmlbars/system/instrumentation-support', ['exports', 'ember-metal
|
|
12401
12407
|
Wrap your node manager's render and re-render methods
|
12402
12408
|
with this function.
|
12403
12409
|
|
12404
|
-
@param {Object} component Component or View instance (optional)
|
12405
|
-
@param {Function} callback The function to instrument
|
12406
|
-
@param {Object} context The context to call the function with
|
12407
|
-
@return {Object} Return value from the invoked callback
|
12410
|
+
@param {Object} component Component or View instance (optional).
|
12411
|
+
@param {Function} callback The function to instrument.
|
12412
|
+
@param {Object} context The context to call the function with.
|
12413
|
+
@return {Object} Return value from the invoked callback.
|
12408
12414
|
@private
|
12409
12415
|
*/
|
12410
12416
|
|
@@ -12484,13 +12490,13 @@ enifed('ember-htmlbars/system/lookup-helper', ['exports', 'ember-metal/debug', '
|
|
12484
12490
|
|
12485
12491
|
* Look for a registered helper
|
12486
12492
|
* If a dash exists in the name:
|
12487
|
-
* Look for a helper registed in the container
|
12493
|
+
* Look for a helper registed in the container.
|
12488
12494
|
* Use Ember.ComponentLookup to find an Ember.Component that resolves
|
12489
|
-
to the given name
|
12495
|
+
to the given name.
|
12490
12496
|
|
12491
12497
|
@private
|
12492
12498
|
@method resolveHelper
|
12493
|
-
@param {String} name
|
12499
|
+
@param {String} name The name of the helper to lookup.
|
12494
12500
|
@return {Helper}
|
12495
12501
|
*/
|
12496
12502
|
function _findHelper(name, view, env, options) {
|
@@ -12500,10 +12506,7 @@ enifed('ember-htmlbars/system/lookup-helper', ['exports', 'ember-metal/debug', '
|
|
12500
12506
|
var owner = env.owner;
|
12501
12507
|
if (validateLazyHelperName(name, owner, env.hooks.keywords)) {
|
12502
12508
|
var helperName = 'helper:' + name;
|
12503
|
-
|
12504
|
-
// See https://bugs.chromium.org/p/v8/issues/detail?id=4839
|
12505
|
-
var registered = owner.hasRegistration(helperName, options);
|
12506
|
-
if (registered) {
|
12509
|
+
if (owner.hasRegistration(helperName, options)) {
|
12507
12510
|
helper = owner._lookupFactory(helperName, options);
|
12508
12511
|
_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);
|
12509
12512
|
}
|
@@ -12522,12 +12525,12 @@ enifed('ember-htmlbars/system/lookup-helper', ['exports', 'ember-metal/debug', '
|
|
12522
12525
|
|
12523
12526
|
var localHelper = _findHelper(name, view, env, options);
|
12524
12527
|
|
12525
|
-
//
|
12528
|
+
// Local match found, use it.
|
12526
12529
|
if (localHelper) {
|
12527
12530
|
return localHelper;
|
12528
12531
|
}
|
12529
12532
|
|
12530
|
-
//
|
12533
|
+
// Fall back to global.
|
12531
12534
|
return _findHelper(name, view, env);
|
12532
12535
|
}
|
12533
12536
|
|
@@ -12550,7 +12553,7 @@ enifed('ember-htmlbars/system/make_bound_helper', ['exports', 'ember-metal/debug
|
|
12550
12553
|
|
12551
12554
|
/**
|
12552
12555
|
Create a bound helper. Accepts a function that receives the ordered and hash parameters
|
12553
|
-
from the template. If a bound property was provided in the template it will be resolved to its
|
12556
|
+
from the template. If a bound property was provided in the template, it will be resolved to its
|
12554
12557
|
value and any changes to the bound property cause the helper function to be re-run with the updated
|
12555
12558
|
values.
|
12556
12559
|
|
@@ -12593,11 +12596,11 @@ enifed('ember-htmlbars/system/make_bound_helper', ['exports', 'ember-metal/debug
|
|
12593
12596
|
*/
|
12594
12597
|
|
12595
12598
|
function makeBoundHelper(fn) {
|
12596
|
-
_emberMetalDebug.deprecate('Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to
|
12599
|
+
_emberMetalDebug.deprecate('Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to use `Ember.Helper` or `Ember.Helper.helper`.', false, { id: 'ember-htmlbars.make-bound-helper', until: '3.0.0' });
|
12597
12600
|
return _emberHtmlbarsHelper.helper(fn);
|
12598
12601
|
}
|
12599
12602
|
});
|
12600
|
-
enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'ember-metal-views
|
12603
|
+
enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'ember-metal-views', 'container/owner'], function (exports, _emberHtmlbarsEnv, _emberMetalViews, _containerOwner) {
|
12601
12604
|
'use strict';
|
12602
12605
|
|
12603
12606
|
exports.default = RenderEnv;
|
@@ -12605,7 +12608,7 @@ enifed('ember-htmlbars/system/render-env', ['exports', 'ember-htmlbars/env', 'em
|
|
12605
12608
|
function RenderEnv(options) {
|
12606
12609
|
this.lifecycleHooks = options.lifecycleHooks || [];
|
12607
12610
|
this.renderedViews = options.renderedViews || [];
|
12608
|
-
this.renderedNodes = options.renderedNodes || new
|
12611
|
+
this.renderedNodes = options.renderedNodes || new _emberMetalViews.MorphSet();
|
12609
12612
|
this.hasParentOutlet = options.hasParentOutlet || false;
|
12610
12613
|
|
12611
12614
|
this.view = options.view;
|
@@ -12704,7 +12707,7 @@ enifed('ember-htmlbars/system/render-view', ['exports', 'ember-htmlbars/node-man
|
|
12704
12707
|
enifed("ember-htmlbars/template_registry", ["exports"], function (exports) {
|
12705
12708
|
// STATE within a module is frowned apon, this exists
|
12706
12709
|
// to support Ember.TEMPLATES but shield ember internals from this legacy
|
12707
|
-
// global API
|
12710
|
+
// global API.
|
12708
12711
|
"use strict";
|
12709
12712
|
|
12710
12713
|
exports.setTemplates = setTemplates;
|
@@ -13689,29 +13692,52 @@ enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-metal/features',
|
|
13689
13692
|
if (hasComponentOrTemplate(owner, path)) {
|
13690
13693
|
return true; // global component found
|
13691
13694
|
} else {
|
13692
|
-
|
13695
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
13696
|
+
var moduleName = env.meta && env.meta.moduleName;
|
13697
|
+
|
13698
|
+
if (!moduleName) {
|
13699
|
+
// Without a source moduleName, we can not perform local lookups.
|
13700
|
+
return false;
|
13701
|
+
}
|
13702
|
+
|
13703
|
+
var options = { source: 'template:' + moduleName };
|
13704
|
+
|
13705
|
+
return hasComponentOrTemplate(owner, path, options);
|
13706
|
+
} else {
|
13707
|
+
return false;
|
13708
|
+
}
|
13693
13709
|
}
|
13694
13710
|
}
|
13695
13711
|
}
|
13696
13712
|
});
|
13697
|
-
|
13698
|
-
// without a source moduleName we can not perform local lookups
|
13699
13713
|
enifed('ember-htmlbars/utils/lookup-component', ['exports', 'ember-metal/features'], function (exports, _emberMetalFeatures) {
|
13700
13714
|
'use strict';
|
13701
13715
|
|
13702
13716
|
exports.default = lookupComponent;
|
13703
13717
|
|
13704
|
-
function lookupComponentPair(componentLookup, owner,
|
13718
|
+
function lookupComponentPair(componentLookup, owner, name, options) {
|
13705
13719
|
return {
|
13706
|
-
component: componentLookup.componentFor(
|
13707
|
-
layout: componentLookup.layoutFor(
|
13720
|
+
component: componentLookup.componentFor(name, owner, options),
|
13721
|
+
layout: componentLookup.layoutFor(name, owner, options)
|
13708
13722
|
};
|
13709
13723
|
}
|
13710
13724
|
|
13711
|
-
function lookupComponent(owner,
|
13725
|
+
function lookupComponent(owner, name, options) {
|
13712
13726
|
var componentLookup = owner.lookup('component-lookup:main');
|
13713
13727
|
|
13714
|
-
|
13728
|
+
if (_emberMetalFeatures.default('ember-htmlbars-local-lookup')) {
|
13729
|
+
var source = options && options.source;
|
13730
|
+
|
13731
|
+
if (source) {
|
13732
|
+
var localResult = lookupComponentPair(componentLookup, owner, name, options);
|
13733
|
+
|
13734
|
+
if (localResult.component || localResult.layout) {
|
13735
|
+
return localResult;
|
13736
|
+
}
|
13737
|
+
}
|
13738
|
+
}
|
13739
|
+
|
13740
|
+
return lookupComponentPair(componentLookup, owner, name);
|
13715
13741
|
}
|
13716
13742
|
});
|
13717
13743
|
enifed('ember-htmlbars/utils/new-stream', ['exports', 'ember-metal/streams/proxy-stream', 'ember-htmlbars/utils/subscribe'], function (exports, _emberMetalStreamsProxyStream, _emberHtmlbarsUtilsSubscribe) {
|
@@ -13760,7 +13786,7 @@ enifed('ember-htmlbars/utils/string', ['exports', 'ember-metal/core', 'ember-run
|
|
13760
13786
|
@method htmlSafe
|
13761
13787
|
@for Ember.String
|
13762
13788
|
@static
|
13763
|
-
@return {Handlebars.SafeString}
|
13789
|
+
@return {Handlebars.SafeString} A string that will not be HTML escaped by Handlebars.
|
13764
13790
|
@public
|
13765
13791
|
*/
|
13766
13792
|
function htmlSafe(str) {
|
@@ -13902,7 +13928,7 @@ enifed('ember-metal/alias', ['exports', 'ember-metal/debug', 'ember-metal/proper
|
|
13902
13928
|
return _emberMetalProperty_set.set(obj, keyName, value);
|
13903
13929
|
}
|
13904
13930
|
|
13905
|
-
// Backwards compatibility with Ember Data
|
13931
|
+
// Backwards compatibility with Ember Data.
|
13906
13932
|
AliasedProperty.prototype._meta = undefined;
|
13907
13933
|
AliasedProperty.prototype.meta = _emberMetalComputed.ComputedProperty.prototype.meta;
|
13908
13934
|
});
|
@@ -13950,7 +13976,7 @@ enifed("ember-metal/assign", ["exports"], function (exports) {
|
|
13950
13976
|
return original;
|
13951
13977
|
}
|
13952
13978
|
});
|
13953
|
-
enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logger', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/utils', 'ember-metal/
|
13979
|
+
enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logger', 'ember-metal/run_loop', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/utils', 'ember-metal/events', 'ember-metal/observer', 'ember-metal/path_cache'], function (exports, _emberMetalCore, _emberMetalLogger, _emberMetalRun_loop, _emberMetalDebug, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberMetalEvents, _emberMetalObserver, _emberMetalPath_cache) {
|
13954
13980
|
'use strict';
|
13955
13981
|
|
13956
13982
|
exports.bind = bind;
|
@@ -13978,31 +14004,22 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
13978
14004
|
*/
|
13979
14005
|
_emberMetalCore.default.LOG_BINDINGS = false || !!_emberMetalCore.default.ENV.LOG_BINDINGS;
|
13980
14006
|
|
13981
|
-
/**
|
13982
|
-
Returns true if the provided path is global (e.g., `MyApp.fooController.bar`)
|
13983
|
-
instead of local (`foo.bar.baz`).
|
13984
|
-
|
13985
|
-
@method isGlobalPath
|
13986
|
-
@for Ember
|
13987
|
-
@private
|
13988
|
-
@param {String} path
|
13989
|
-
@return Boolean
|
13990
|
-
*/
|
13991
|
-
|
13992
|
-
function getWithGlobals(obj, path) {
|
13993
|
-
return _emberMetalProperty_get.get(_emberMetalPath_cache.isGlobal(path) ? _emberMetalCore.default.lookup : obj, path);
|
13994
|
-
}
|
13995
|
-
|
13996
14007
|
// ..........................................................
|
13997
14008
|
// BINDING
|
13998
14009
|
//
|
13999
14010
|
|
14000
14011
|
function Binding(toPath, fromPath) {
|
14001
|
-
|
14012
|
+
// Configuration
|
14002
14013
|
this._from = fromPath;
|
14003
14014
|
this._to = toPath;
|
14004
|
-
this._readyToSync = undefined;
|
14005
14015
|
this._oneWay = undefined;
|
14016
|
+
|
14017
|
+
// State
|
14018
|
+
this._direction = undefined;
|
14019
|
+
this._readyToSync = undefined;
|
14020
|
+
this._fromObj = undefined;
|
14021
|
+
this._fromPath = undefined;
|
14022
|
+
this._toObj = undefined;
|
14006
14023
|
}
|
14007
14024
|
|
14008
14025
|
/**
|
@@ -14038,7 +14055,7 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14038
14055
|
you pass when you `connect()` the binding. It follows the same rules as
|
14039
14056
|
`get()` - see that method for more information.
|
14040
14057
|
@method from
|
14041
|
-
@param {String} path
|
14058
|
+
@param {String} path The property path to connect to.
|
14042
14059
|
@return {Ember.Binding} `this`
|
14043
14060
|
@public
|
14044
14061
|
*/
|
@@ -14055,7 +14072,7 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14055
14072
|
you pass when you `connect()` the binding. It follows the same rules as
|
14056
14073
|
`get()` - see that method for more information.
|
14057
14074
|
@method to
|
14058
|
-
@param {String|Tuple} path A property path or tuple
|
14075
|
+
@param {String|Tuple} path A property path or tuple.
|
14059
14076
|
@return {Ember.Binding} `this`
|
14060
14077
|
@public
|
14061
14078
|
*/
|
@@ -14104,19 +14121,42 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14104
14121
|
connect: function (obj) {
|
14105
14122
|
_emberMetalDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
|
14106
14123
|
|
14107
|
-
var
|
14108
|
-
|
14109
|
-
_emberMetalProperty_set.trySet(obj, toPath, getWithGlobals(obj, fromPath));
|
14124
|
+
var fromObj = undefined,
|
14125
|
+
fromPath = undefined;
|
14110
14126
|
|
14111
|
-
//
|
14112
|
-
|
14127
|
+
// If the binding's "from" path could be interpreted as a global, verify
|
14128
|
+
// whether the path refers to a global or not by consulting `Ember.lookup`.
|
14129
|
+
if (_emberMetalPath_cache.isGlobalPath(this._from)) {
|
14130
|
+
var _name = _emberMetalPath_cache.getFirstKey(this._from);
|
14131
|
+
var possibleGlobal = _emberMetalCore.default.lookup[_name];
|
14113
14132
|
|
14114
|
-
|
14133
|
+
if (possibleGlobal) {
|
14134
|
+
fromObj = possibleGlobal;
|
14135
|
+
fromPath = _emberMetalPath_cache.getTailPath(this._from);
|
14136
|
+
}
|
14137
|
+
}
|
14138
|
+
|
14139
|
+
if (fromObj === undefined) {
|
14140
|
+
fromObj = obj;
|
14141
|
+
fromPath = this._from;
|
14142
|
+
}
|
14143
|
+
|
14144
|
+
_emberMetalProperty_set.trySet(obj, this._to, _emberMetalProperty_get.get(fromObj, fromPath));
|
14145
|
+
|
14146
|
+
// Add an observer on the object to be notified when the binding should be updated.
|
14147
|
+
_emberMetalObserver.addObserver(fromObj, fromPath, this, 'fromDidChange');
|
14148
|
+
|
14149
|
+
// If the binding is a two-way binding, also set up an observer on the target.
|
14115
14150
|
if (!this._oneWay) {
|
14116
|
-
_emberMetalObserver.addObserver(obj,
|
14151
|
+
_emberMetalObserver.addObserver(obj, this._to, this, 'toDidChange');
|
14117
14152
|
}
|
14118
14153
|
|
14154
|
+
_emberMetalEvents.addListener(obj, 'willDestroy', this, 'disconnect');
|
14155
|
+
|
14119
14156
|
this._readyToSync = true;
|
14157
|
+
this._fromObj = fromObj;
|
14158
|
+
this._fromPath = fromPath;
|
14159
|
+
this._toObj = obj;
|
14120
14160
|
|
14121
14161
|
return this;
|
14122
14162
|
},
|
@@ -14125,25 +14165,22 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14125
14165
|
Disconnects the binding instance. Changes will no longer be relayed. You
|
14126
14166
|
will not usually need to call this method.
|
14127
14167
|
@method disconnect
|
14128
|
-
@param {Object} obj The root object you passed when connecting the binding.
|
14129
14168
|
@return {Ember.Binding} `this`
|
14130
14169
|
@public
|
14131
14170
|
*/
|
14132
|
-
disconnect: function (
|
14133
|
-
_emberMetalDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!
|
14134
|
-
|
14135
|
-
var twoWay = !this._oneWay;
|
14171
|
+
disconnect: function () {
|
14172
|
+
_emberMetalDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
|
14136
14173
|
|
14137
|
-
//
|
14174
|
+
// Remove an observer on the object so we're no longer notified of
|
14138
14175
|
// changes that should update bindings.
|
14139
|
-
_emberMetalObserver.removeObserver(
|
14176
|
+
_emberMetalObserver.removeObserver(this._fromObj, this._fromPath, this, 'fromDidChange');
|
14140
14177
|
|
14141
|
-
//
|
14142
|
-
if (
|
14143
|
-
_emberMetalObserver.removeObserver(
|
14178
|
+
// If the binding is two-way, remove the observer from the target as well.
|
14179
|
+
if (!this._oneWay) {
|
14180
|
+
_emberMetalObserver.removeObserver(this._toObj, this._to, this, 'toDidChange');
|
14144
14181
|
}
|
14145
14182
|
|
14146
|
-
this._readyToSync = false; //
|
14183
|
+
this._readyToSync = false; // Disable scheduled syncs...
|
14147
14184
|
return this;
|
14148
14185
|
},
|
14149
14186
|
|
@@ -14151,22 +14188,22 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14151
14188
|
// PRIVATE
|
14152
14189
|
//
|
14153
14190
|
|
14154
|
-
/*
|
14191
|
+
/* Called when the from side changes. */
|
14155
14192
|
fromDidChange: function (target) {
|
14156
|
-
this._scheduleSync(
|
14193
|
+
this._scheduleSync('fwd');
|
14157
14194
|
},
|
14158
14195
|
|
14159
|
-
/*
|
14196
|
+
/* Called when the to side changes. */
|
14160
14197
|
toDidChange: function (target) {
|
14161
|
-
this._scheduleSync(
|
14198
|
+
this._scheduleSync('back');
|
14162
14199
|
},
|
14163
14200
|
|
14164
|
-
_scheduleSync: function (
|
14201
|
+
_scheduleSync: function (dir) {
|
14165
14202
|
var existingDir = this._direction;
|
14166
14203
|
|
14167
|
-
//
|
14204
|
+
// If we haven't scheduled the binding yet, schedule it.
|
14168
14205
|
if (existingDir === undefined) {
|
14169
|
-
_emberMetalRun_loop.default.schedule('sync', this,
|
14206
|
+
_emberMetalRun_loop.default.schedule('sync', this, '_sync');
|
14170
14207
|
this._direction = dir;
|
14171
14208
|
}
|
14172
14209
|
|
@@ -14177,44 +14214,46 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14177
14214
|
}
|
14178
14215
|
},
|
14179
14216
|
|
14180
|
-
_sync: function (
|
14217
|
+
_sync: function () {
|
14181
14218
|
var log = _emberMetalCore.default.LOG_BINDINGS;
|
14182
14219
|
|
14183
|
-
|
14184
|
-
|
14220
|
+
var toObj = this._toObj;
|
14221
|
+
|
14222
|
+
// Don't synchronize destroyed objects or disconnected bindings.
|
14223
|
+
if (toObj.isDestroyed || !this._readyToSync) {
|
14185
14224
|
return;
|
14186
14225
|
}
|
14187
14226
|
|
14188
|
-
//
|
14189
|
-
// synchronizing from
|
14227
|
+
// Get the direction of the binding for the object we are
|
14228
|
+
// synchronizing from.
|
14190
14229
|
var direction = this._direction;
|
14191
14230
|
|
14192
|
-
var
|
14193
|
-
var
|
14231
|
+
var fromObj = this._fromObj;
|
14232
|
+
var fromPath = this._fromPath;
|
14194
14233
|
|
14195
14234
|
this._direction = undefined;
|
14196
14235
|
|
14197
|
-
//
|
14236
|
+
// If we're synchronizing from the remote object...
|
14198
14237
|
if (direction === 'fwd') {
|
14199
|
-
var fromValue =
|
14238
|
+
var fromValue = _emberMetalProperty_get.get(fromObj, fromPath);
|
14200
14239
|
if (log) {
|
14201
|
-
_emberMetalLogger.default.log(' ', this.toString(), '->', fromValue,
|
14240
|
+
_emberMetalLogger.default.log(' ', this.toString(), '->', fromValue, fromObj);
|
14202
14241
|
}
|
14203
14242
|
if (this._oneWay) {
|
14204
|
-
_emberMetalProperty_set.trySet(
|
14243
|
+
_emberMetalProperty_set.trySet(toObj, this._to, fromValue);
|
14205
14244
|
} else {
|
14206
|
-
_emberMetalObserver._suspendObserver(
|
14207
|
-
_emberMetalProperty_set.trySet(
|
14245
|
+
_emberMetalObserver._suspendObserver(toObj, this._to, this, 'toDidChange', function () {
|
14246
|
+
_emberMetalProperty_set.trySet(toObj, this._to, fromValue);
|
14208
14247
|
});
|
14209
14248
|
}
|
14210
|
-
//
|
14249
|
+
// If we're synchronizing *to* the remote object.
|
14211
14250
|
} else if (direction === 'back') {
|
14212
|
-
var toValue = _emberMetalProperty_get.get(
|
14251
|
+
var toValue = _emberMetalProperty_get.get(toObj, this._to);
|
14213
14252
|
if (log) {
|
14214
|
-
_emberMetalLogger.default.log(' ', this.toString(), '<-', toValue,
|
14253
|
+
_emberMetalLogger.default.log(' ', this.toString(), '<-', toValue, toObj);
|
14215
14254
|
}
|
14216
|
-
_emberMetalObserver._suspendObserver(
|
14217
|
-
_emberMetalProperty_set.trySet(
|
14255
|
+
_emberMetalObserver._suspendObserver(fromObj, fromPath, this, 'fromDidChange', function () {
|
14256
|
+
_emberMetalProperty_set.trySet(fromObj, fromPath, toValue);
|
14218
14257
|
});
|
14219
14258
|
}
|
14220
14259
|
}
|
@@ -14255,7 +14294,7 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14255
14294
|
An `Ember.Binding` connects the properties of two objects so that whenever
|
14256
14295
|
the value of one property changes, the other property will be changed also.
|
14257
14296
|
|
14258
|
-
## Automatic Creation of Bindings with `/^*Binding/`-named Properties
|
14297
|
+
## Automatic Creation of Bindings with `/^*Binding/`-named Properties.
|
14259
14298
|
|
14260
14299
|
You do not usually create Binding objects directly but instead describe
|
14261
14300
|
bindings in your class or object definition using automatic binding
|
@@ -14304,7 +14343,7 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14304
14343
|
All of the examples above show you how to configure a custom binding, but the
|
14305
14344
|
result of these customizations will be a binding template, not a fully active
|
14306
14345
|
Binding instance. The binding will actually become active only when you
|
14307
|
-
instantiate the object the binding belongs to. It is useful however, to
|
14346
|
+
instantiate the object the binding belongs to. It is useful, however, to
|
14308
14347
|
understand what actually happens when the binding is activated.
|
14309
14348
|
|
14310
14349
|
For a binding to function it must have at least a `from` property and a `to`
|
@@ -14403,7 +14442,6 @@ enifed('ember-metal/binding', ['exports', 'ember-metal/core', 'ember-metal/logge
|
|
14403
14442
|
}
|
14404
14443
|
|
14405
14444
|
exports.Binding = Binding;
|
14406
|
-
exports.isGlobalPath = _emberMetalPath_cache.isGlobal;
|
14407
14445
|
});
|
14408
14446
|
// Ember.LOG_BINDINGS
|
14409
14447
|
enifed('ember-metal/cache', ['exports', 'ember-metal/empty_object'], function (exports, _emberMetalEmpty_object) {
|
@@ -14461,10 +14499,9 @@ enifed('ember-metal/cache', ['exports', 'ember-metal/empty_object'], function (e
|
|
14461
14499
|
}
|
14462
14500
|
};
|
14463
14501
|
});
|
14464
|
-
enifed('ember-metal/chains', ['exports', 'ember-metal/
|
14502
|
+
enifed('ember-metal/chains', ['exports', 'ember-metal/property_get', 'ember-metal/meta', 'ember-metal/watch_key', 'ember-metal/empty_object'], function (exports, _emberMetalProperty_get, _emberMetalMeta, _emberMetalWatch_key, _emberMetalEmpty_object) {
|
14465
14503
|
'use strict';
|
14466
14504
|
|
14467
|
-
exports.flushPendingChains = flushPendingChains;
|
14468
14505
|
exports.finishChains = finishChains;
|
14469
14506
|
|
14470
14507
|
var FIRST_KEY = /^([^\.]+)/;
|
@@ -14481,9 +14518,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14481
14518
|
return !(isObject(obj) && obj.isDescriptor && obj._volatile === false);
|
14482
14519
|
}
|
14483
14520
|
|
14484
|
-
function ChainWatchers(
|
14485
|
-
// this obj would be the referencing chain node's parent node's value
|
14486
|
-
this.obj = obj;
|
14521
|
+
function ChainWatchers() {
|
14487
14522
|
// chain nodes that reference a key in this obj by key
|
14488
14523
|
// we only create ChainWatchers when we are going to add them
|
14489
14524
|
// so create this upfront
|
@@ -14568,29 +14603,8 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14568
14603
|
}
|
14569
14604
|
};
|
14570
14605
|
|
14571
|
-
|
14572
|
-
|
14573
|
-
// attempts to add the pendingQueue chains again. If some of them end up
|
14574
|
-
// back in the queue and reschedule is true, schedules a timeout to try
|
14575
|
-
// again.
|
14576
|
-
|
14577
|
-
function flushPendingChains() {
|
14578
|
-
if (pendingQueue.length === 0) {
|
14579
|
-
return;
|
14580
|
-
}
|
14581
|
-
|
14582
|
-
var queue = pendingQueue;
|
14583
|
-
pendingQueue = [];
|
14584
|
-
|
14585
|
-
queue.forEach(function (q) {
|
14586
|
-
return q[0].add(q[1]);
|
14587
|
-
});
|
14588
|
-
|
14589
|
-
_emberMetalDebug.warn('Watching an undefined global, Ember expects watched globals to be ' + 'setup by the time the run loop is flushed, check for typos', pendingQueue.length === 0, { id: 'ember-metal.chains-flush-pending-chains' });
|
14590
|
-
}
|
14591
|
-
|
14592
|
-
function makeChainWatcher(obj) {
|
14593
|
-
return new ChainWatchers(obj);
|
14606
|
+
function makeChainWatcher() {
|
14607
|
+
return new ChainWatchers();
|
14594
14608
|
}
|
14595
14609
|
|
14596
14610
|
function addChainWatcher(obj, keyName, node) {
|
@@ -14713,65 +14727,30 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14713
14727
|
// called on the root node of a chain to setup watchers on the specified
|
14714
14728
|
// path.
|
14715
14729
|
add: function (path) {
|
14716
|
-
var
|
14717
|
-
|
14718
|
-
paths = this._paths;
|
14730
|
+
var paths = this._paths;
|
14719
14731
|
paths[path] = (paths[path] || 0) + 1;
|
14720
14732
|
|
14721
|
-
|
14722
|
-
|
14723
|
-
|
14724
|
-
// the path was a local path
|
14725
|
-
if (tuple[0] && tuple[0] === obj) {
|
14726
|
-
path = tuple[1];
|
14727
|
-
key = firstKey(path);
|
14728
|
-
path = path.slice(key.length + 1);
|
14729
|
-
|
14730
|
-
// global path, but object does not exist yet.
|
14731
|
-
// put into a queue and try to connect later.
|
14732
|
-
} else if (!tuple[0]) {
|
14733
|
-
pendingQueue.push([this, path]);
|
14734
|
-
tuple.length = 0;
|
14735
|
-
return;
|
14733
|
+
var key = firstKey(path);
|
14734
|
+
var tail = path.slice(key.length + 1);
|
14736
14735
|
|
14737
|
-
|
14738
|
-
} else {
|
14739
|
-
src = tuple[0];
|
14740
|
-
key = path.slice(0, 0 - (tuple[1].length + 1));
|
14741
|
-
path = tuple[1];
|
14742
|
-
}
|
14743
|
-
|
14744
|
-
tuple.length = 0;
|
14745
|
-
this.chain(key, path, src);
|
14736
|
+
this.chain(key, tail);
|
14746
14737
|
},
|
14747
14738
|
|
14748
14739
|
// called on the root node of a chain to teardown watcher on the specified
|
14749
14740
|
// path
|
14750
14741
|
remove: function (path) {
|
14751
|
-
var
|
14752
|
-
|
14753
|
-
paths = this._paths;
|
14742
|
+
var paths = this._paths;
|
14754
14743
|
if (paths[path] > 0) {
|
14755
14744
|
paths[path]--;
|
14756
14745
|
}
|
14757
14746
|
|
14758
|
-
|
14759
|
-
|
14760
|
-
if (tuple[0] === obj) {
|
14761
|
-
path = tuple[1];
|
14762
|
-
key = firstKey(path);
|
14763
|
-
path = path.slice(key.length + 1);
|
14764
|
-
} else {
|
14765
|
-
src = tuple[0];
|
14766
|
-
key = path.slice(0, 0 - (tuple[1].length + 1));
|
14767
|
-
path = tuple[1];
|
14768
|
-
}
|
14747
|
+
var key = firstKey(path);
|
14748
|
+
var tail = path.slice(key.length + 1);
|
14769
14749
|
|
14770
|
-
|
14771
|
-
this.unchain(key, path);
|
14750
|
+
this.unchain(key, tail);
|
14772
14751
|
},
|
14773
14752
|
|
14774
|
-
chain: function (key, path
|
14753
|
+
chain: function (key, path) {
|
14775
14754
|
var chains = this._chains;
|
14776
14755
|
var node;
|
14777
14756
|
if (chains === undefined) {
|
@@ -14781,7 +14760,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14781
14760
|
}
|
14782
14761
|
|
14783
14762
|
if (node === undefined) {
|
14784
|
-
node = chains[key] = new ChainNode(this, key,
|
14763
|
+
node = chains[key] = new ChainNode(this, key, undefined);
|
14785
14764
|
}
|
14786
14765
|
|
14787
14766
|
node.count++; // count chains...
|
@@ -14790,7 +14769,7 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14790
14769
|
if (path) {
|
14791
14770
|
key = firstKey(path);
|
14792
14771
|
path = path.slice(key.length + 1);
|
14793
|
-
node.chain(key, path);
|
14772
|
+
node.chain(key, path);
|
14794
14773
|
}
|
14795
14774
|
},
|
14796
14775
|
|
@@ -14837,25 +14816,21 @@ enifed('ember-metal/chains', ['exports', 'ember-metal/debug', 'ember-metal/prope
|
|
14837
14816
|
}
|
14838
14817
|
|
14839
14818
|
if (affected && this._parent) {
|
14840
|
-
this._parent.populateAffected(this
|
14819
|
+
this._parent.populateAffected(this._key, 1, affected);
|
14841
14820
|
}
|
14842
14821
|
},
|
14843
14822
|
|
14844
|
-
populateAffected: function (
|
14823
|
+
populateAffected: function (path, depth, affected) {
|
14845
14824
|
if (this._key) {
|
14846
14825
|
path = this._key + '.' + path;
|
14847
14826
|
}
|
14848
14827
|
|
14849
14828
|
if (this._parent) {
|
14850
|
-
this._parent.populateAffected(
|
14829
|
+
this._parent.populateAffected(path, depth + 1, affected);
|
14851
14830
|
} else {
|
14852
14831
|
if (depth > 1) {
|
14853
14832
|
affected.push(this.value(), path);
|
14854
14833
|
}
|
14855
|
-
path = 'this.' + path;
|
14856
|
-
if (this._paths[path] > 0) {
|
14857
|
-
affected.push(this.value(), path);
|
14858
|
-
}
|
14859
14834
|
}
|
14860
14835
|
}
|
14861
14836
|
};
|
@@ -14896,6 +14871,10 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14896
14871
|
|
14897
14872
|
var DEEP_EACH_REGEX = /\.@each\.[^.]+\./;
|
14898
14873
|
|
14874
|
+
// ..........................................................
|
14875
|
+
// COMPUTED PROPERTY
|
14876
|
+
//
|
14877
|
+
|
14899
14878
|
/**
|
14900
14879
|
A computed property transforms an object literal with object's accessor function(s) into a property.
|
14901
14880
|
|
@@ -14998,6 +14977,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
14998
14977
|
|
14999
14978
|
@class ComputedProperty
|
15000
14979
|
@namespace Ember
|
14980
|
+
@constructor
|
15001
14981
|
@public
|
15002
14982
|
*/
|
15003
14983
|
function ComputedProperty(config, opts) {
|
@@ -15156,6 +15136,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
15156
15136
|
@chainable
|
15157
15137
|
@public
|
15158
15138
|
*/
|
15139
|
+
|
15159
15140
|
ComputedPropertyPrototype.meta = function (meta) {
|
15160
15141
|
if (arguments.length === 0) {
|
15161
15142
|
return this._meta || {};
|
@@ -15186,6 +15167,33 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
15186
15167
|
}
|
15187
15168
|
};
|
15188
15169
|
|
15170
|
+
/**
|
15171
|
+
Access the value of the function backing the computed property.
|
15172
|
+
If this property has already been cached, return the cached result.
|
15173
|
+
Otherwise, call the function passing the property name as an argument.
|
15174
|
+
|
15175
|
+
```javascript
|
15176
|
+
let Person = Ember.Object.extend({
|
15177
|
+
fullName: Ember.computed('firstName', 'lastName', function(keyName) {
|
15178
|
+
// the keyName parameter is 'fullName' in this case.
|
15179
|
+
return this.get('firstName') + ' ' + this.get('lastName');
|
15180
|
+
})
|
15181
|
+
});
|
15182
|
+
|
15183
|
+
|
15184
|
+
let tom = Person.create({
|
15185
|
+
firstName: 'Tom',
|
15186
|
+
lastName: 'Dale'
|
15187
|
+
});
|
15188
|
+
|
15189
|
+
tom.get('fullName') // 'Tom Dale'
|
15190
|
+
```
|
15191
|
+
|
15192
|
+
@method get
|
15193
|
+
@param {String} keyName The key being accessed.
|
15194
|
+
@return {Object} The return value of the function backing the CP.
|
15195
|
+
@public
|
15196
|
+
*/
|
15189
15197
|
ComputedPropertyPrototype.get = function (obj, keyName) {
|
15190
15198
|
if (this._volatile) {
|
15191
15199
|
return this._getter.call(obj, keyName);
|
@@ -15217,6 +15225,54 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
15217
15225
|
return ret;
|
15218
15226
|
};
|
15219
15227
|
|
15228
|
+
/**
|
15229
|
+
Set the value of a computed property. If the function that backs your
|
15230
|
+
computed property does not accept arguments then the default action for
|
15231
|
+
setting would be to define the property on the current object, and set
|
15232
|
+
the value of the property to the value being set.
|
15233
|
+
|
15234
|
+
Generally speaking if you intend for your computed property to be set
|
15235
|
+
you should pass `set(key, value)` function in hash as argument to `Ember.computed()` along with `get(key)` function.
|
15236
|
+
|
15237
|
+
```javascript
|
15238
|
+
let Person = Ember.Object.extend({
|
15239
|
+
// these will be supplied by `create`
|
15240
|
+
firstName: null,
|
15241
|
+
lastName: null,
|
15242
|
+
|
15243
|
+
fullName: Ember.computed('firstName', 'lastName', {
|
15244
|
+
// getter
|
15245
|
+
get() {
|
15246
|
+
let firstName = this.get('firstName');
|
15247
|
+
let lastName = this.get('lastName');
|
15248
|
+
|
15249
|
+
return firstName + ' ' + lastName;
|
15250
|
+
},
|
15251
|
+
// setter
|
15252
|
+
set(key, value) {
|
15253
|
+
let [firstName, lastName] = value.split(' ');
|
15254
|
+
|
15255
|
+
this.set('firstName', firstName);
|
15256
|
+
this.set('lastName', lastName);
|
15257
|
+
|
15258
|
+
return value;
|
15259
|
+
}
|
15260
|
+
})
|
15261
|
+
});
|
15262
|
+
|
15263
|
+
let person = Person.create();
|
15264
|
+
|
15265
|
+
person.set('fullName', 'Peter Wagenet');
|
15266
|
+
person.get('firstName'); // 'Peter'
|
15267
|
+
person.get('lastName'); // 'Wagenet'
|
15268
|
+
```
|
15269
|
+
|
15270
|
+
@method set
|
15271
|
+
@param {String} keyName The key being accessed.
|
15272
|
+
@param {Object} newValue The new value being assigned.
|
15273
|
+
@return {Object} The return value of the function backing the CP.
|
15274
|
+
@public
|
15275
|
+
*/
|
15220
15276
|
ComputedPropertyPrototype.set = function computedPropertySetEntry(obj, keyName, value) {
|
15221
15277
|
if (this._readOnly) {
|
15222
15278
|
this._throwReadOnlyError(obj, keyName);
|
@@ -15360,7 +15416,7 @@ enifed('ember-metal/computed', ['exports', 'ember-metal/debug', 'ember-metal/pro
|
|
15360
15416
|
this.lastName = 'Jones';
|
15361
15417
|
},
|
15362
15418
|
|
15363
|
-
fullName: Ember.computed(
|
15419
|
+
fullName: Ember.computed({
|
15364
15420
|
get(key) {
|
15365
15421
|
return `${this.get('firstName')} ${this.get('lastName')}`;
|
15366
15422
|
},
|
@@ -16138,6 +16194,8 @@ enifed('ember-metal/core', ['exports', 'require'], function (exports, _require)
|
|
16138
16194
|
Ember may overwrite this namespace and therefore, you should avoid adding any
|
16139
16195
|
new properties.
|
16140
16196
|
|
16197
|
+
You can also use the shorthand `Em` instead of `Ember`.
|
16198
|
+
|
16141
16199
|
At the heart of Ember is Ember-Runtime, a set of core functions that provide
|
16142
16200
|
cross-platform compatibility and object property observing. Ember-Runtime is
|
16143
16201
|
small and performance-focused so you can use it alongside other
|
@@ -16146,7 +16204,7 @@ enifed('ember-metal/core', ['exports', 'require'], function (exports, _require)
|
|
16146
16204
|
|
16147
16205
|
@class Ember
|
16148
16206
|
@static
|
16149
|
-
@version 2.
|
16207
|
+
@version 2.5.0-beta.1
|
16150
16208
|
@public
|
16151
16209
|
*/
|
16152
16210
|
|
@@ -16188,11 +16246,11 @@ enifed('ember-metal/core', ['exports', 'require'], function (exports, _require)
|
|
16188
16246
|
|
16189
16247
|
@property VERSION
|
16190
16248
|
@type String
|
16191
|
-
@default '2.
|
16249
|
+
@default '2.5.0-beta.1'
|
16192
16250
|
@static
|
16193
16251
|
@public
|
16194
16252
|
*/
|
16195
|
-
Ember.VERSION = '2.
|
16253
|
+
Ember.VERSION = '2.5.0-beta.1';
|
16196
16254
|
|
16197
16255
|
/**
|
16198
16256
|
The hash of environment variables used to control various configuration
|
@@ -16923,7 +16981,7 @@ enifed('ember-metal/events', ['exports', 'ember-metal/debug', 'ember-metal/utils
|
|
16923
16981
|
return func;
|
16924
16982
|
}
|
16925
16983
|
});
|
16926
|
-
enifed('ember-metal/expand_properties', ['exports', 'ember-metal/
|
16984
|
+
enifed('ember-metal/expand_properties', ['exports', 'ember-metal/debug'], function (exports, _emberMetalDebug) {
|
16927
16985
|
'use strict';
|
16928
16986
|
|
16929
16987
|
exports.default = expandProperties;
|
@@ -16934,7 +16992,6 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/error'], functi
|
|
16934
16992
|
*/
|
16935
16993
|
|
16936
16994
|
var SPLIT_REGEX = /\{|\}/;
|
16937
|
-
|
16938
16995
|
var END_WITH_EACH_REGEX = /\.@each$/;
|
16939
16996
|
|
16940
16997
|
/**
|
@@ -16966,25 +17023,21 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/error'], functi
|
|
16966
17023
|
*/
|
16967
17024
|
|
16968
17025
|
function expandProperties(pattern, callback) {
|
16969
|
-
|
16970
|
-
|
16971
|
-
}
|
17026
|
+
_emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
|
17027
|
+
_emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
|
16972
17028
|
|
16973
|
-
|
16974
|
-
|
16975
|
-
var properties = [parts];
|
17029
|
+
var parts = pattern.split(SPLIT_REGEX);
|
17030
|
+
var properties = [parts];
|
16976
17031
|
|
16977
|
-
|
16978
|
-
|
16979
|
-
|
16980
|
-
|
16981
|
-
}
|
17032
|
+
for (var i = 0; i < parts.length; i++) {
|
17033
|
+
var part = parts[i];
|
17034
|
+
if (part.indexOf(',') >= 0) {
|
17035
|
+
properties = duplicateAndReplace(properties, part.split(','), i);
|
17036
|
+
}
|
17037
|
+
}
|
16982
17038
|
|
16983
|
-
|
16984
|
-
|
16985
|
-
});
|
16986
|
-
} else {
|
16987
|
-
callback(pattern.replace(END_WITH_EACH_REGEX, '.[]'));
|
17039
|
+
for (var i = 0; i < properties.length; i++) {
|
17040
|
+
callback(properties[i].join('').replace(END_WITH_EACH_REGEX, '.[]'));
|
16988
17041
|
}
|
16989
17042
|
}
|
16990
17043
|
|
@@ -17020,11 +17073,9 @@ enifed('ember-metal/features', ['exports', 'ember-metal/core', 'ember-metal/assi
|
|
17020
17073
|
@since 1.1.0
|
17021
17074
|
@public
|
17022
17075
|
*/
|
17023
|
-
var
|
17076
|
+
var FEATURES = _emberMetalAssign.default({}, _emberMetalCore.default.ENV.FEATURES);exports.FEATURES = FEATURES;
|
17024
17077
|
// jshint ignore:line
|
17025
|
-
var FEATURES = _emberMetalAssign.default(KNOWN_FEATURES, _emberMetalCore.default.ENV.FEATURES);
|
17026
17078
|
|
17027
|
-
exports.FEATURES = FEATURES;
|
17028
17079
|
/**
|
17029
17080
|
Determine whether the specified `feature` is enabled. Used by Ember's
|
17030
17081
|
build tools to exclude experimental features from beta/stable builds.
|
@@ -17098,7 +17149,7 @@ enifed('ember-metal/get_properties', ['exports', 'ember-metal/property_get'], fu
|
|
17098
17149
|
return ret;
|
17099
17150
|
}
|
17100
17151
|
});
|
17101
|
-
enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/assign', 'ember-metal/merge', 'ember-metal/instrumentation', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/error', 'ember-metal/cache', 'ember-metal/logger', 'ember-metal/property_get', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/property_set', 'ember-metal/map', 'ember-metal/get_properties', 'ember-metal/set_properties', 'ember-metal/watch_key', 'ember-metal/chains', 'ember-metal/watch_path', 'ember-metal/watching', 'ember-metal/expand_properties', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/computed_macros', 'ember-metal/observer', 'ember-metal/mixin', 'ember-metal/binding', 'ember-metal/run_loop', 'ember-metal/libraries', 'ember-metal/is_none', 'ember-metal/is_empty', 'ember-metal/is_blank', 'ember-metal/is_present', 'backburner'], function (exports, _require, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalAssign, _emberMetalMerge, _emberMetalInstrumentation, _emberMetalUtils, _emberMetalMeta, _emberMetalError, _emberMetalCache, _emberMetalLogger, _emberMetalProperty_get, _emberMetalEvents, _emberMetalObserver_set, _emberMetalProperty_events, _emberMetalProperties, _emberMetalProperty_set, _emberMetalMap, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalWatch_key, _emberMetalChains, _emberMetalWatch_path, _emberMetalWatching, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalAlias, _emberMetalComputed_macros, _emberMetalObserver, _emberMetalMixin, _emberMetalBinding, _emberMetalRun_loop, _emberMetalLibraries, _emberMetalIs_none, _emberMetalIs_empty, _emberMetalIs_blank, _emberMetalIs_present, _backburner) {
|
17152
|
+
enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/assign', 'ember-metal/merge', 'ember-metal/instrumentation', 'ember-metal/utils', 'ember-metal/meta', 'ember-metal/error', 'ember-metal/cache', 'ember-metal/logger', 'ember-metal/property_get', 'ember-metal/events', 'ember-metal/observer_set', 'ember-metal/property_events', 'ember-metal/properties', 'ember-metal/property_set', 'ember-metal/map', 'ember-metal/get_properties', 'ember-metal/set_properties', 'ember-metal/watch_key', 'ember-metal/chains', 'ember-metal/watch_path', 'ember-metal/watching', 'ember-metal/expand_properties', 'ember-metal/computed', 'ember-metal/alias', 'ember-metal/computed_macros', 'ember-metal/observer', 'ember-metal/mixin', 'ember-metal/binding', 'ember-metal/path_cache', 'ember-metal/run_loop', 'ember-metal/libraries', 'ember-metal/is_none', 'ember-metal/is_empty', 'ember-metal/is_blank', 'ember-metal/is_present', 'backburner'], function (exports, _require, _emberMetalCore, _emberMetalDebug, _emberMetalFeatures, _emberMetalAssign, _emberMetalMerge, _emberMetalInstrumentation, _emberMetalUtils, _emberMetalMeta, _emberMetalError, _emberMetalCache, _emberMetalLogger, _emberMetalProperty_get, _emberMetalEvents, _emberMetalObserver_set, _emberMetalProperty_events, _emberMetalProperties, _emberMetalProperty_set, _emberMetalMap, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalWatch_key, _emberMetalChains, _emberMetalWatch_path, _emberMetalWatching, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalAlias, _emberMetalComputed_macros, _emberMetalObserver, _emberMetalMixin, _emberMetalBinding, _emberMetalPath_cache, _emberMetalRun_loop, _emberMetalLibraries, _emberMetalIs_none, _emberMetalIs_empty, _emberMetalIs_blank, _emberMetalIs_present, _backburner) {
|
17102
17153
|
/**
|
17103
17154
|
@module ember
|
17104
17155
|
@submodule ember-metal
|
@@ -17168,7 +17219,6 @@ enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-me
|
|
17168
17219
|
|
17169
17220
|
_emberMetalCore.default.get = _emberMetalProperty_get.get;
|
17170
17221
|
_emberMetalCore.default.getWithDefault = _emberMetalProperty_get.getWithDefault;
|
17171
|
-
_emberMetalCore.default.normalizeTuple = _emberMetalProperty_get.normalizeTuple;
|
17172
17222
|
_emberMetalCore.default._getPath = _emberMetalProperty_get._getPath;
|
17173
17223
|
|
17174
17224
|
_emberMetalCore.default.on = _emberMetalEvents.on;
|
@@ -17206,7 +17256,6 @@ enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-me
|
|
17206
17256
|
_emberMetalCore.default.watchKey = _emberMetalWatch_key.watchKey;
|
17207
17257
|
_emberMetalCore.default.unwatchKey = _emberMetalWatch_key.unwatchKey;
|
17208
17258
|
|
17209
|
-
_emberMetalCore.default.flushPendingChains = _emberMetalChains.flushPendingChains;
|
17210
17259
|
_emberMetalCore.default.removeChainWatcher = _emberMetalChains.removeChainWatcher;
|
17211
17260
|
_emberMetalCore.default._ChainNode = _emberMetalChains.ChainNode;
|
17212
17261
|
_emberMetalCore.default.finishChains = _emberMetalChains.finishChains;
|
@@ -17242,7 +17291,7 @@ enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-me
|
|
17242
17291
|
|
17243
17292
|
_emberMetalCore.default.bind = _emberMetalBinding.bind;
|
17244
17293
|
_emberMetalCore.default.Binding = _emberMetalBinding.Binding;
|
17245
|
-
_emberMetalCore.default.isGlobalPath =
|
17294
|
+
_emberMetalCore.default.isGlobalPath = _emberMetalPath_cache.isGlobalPath;
|
17246
17295
|
|
17247
17296
|
_emberMetalCore.default.run = _emberMetalRun_loop.default;
|
17248
17297
|
|
@@ -17264,6 +17313,7 @@ enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-me
|
|
17264
17313
|
_emberMetalCore.default.isBlank = _emberMetalIs_blank.default;
|
17265
17314
|
_emberMetalCore.default.isPresent = _emberMetalIs_present.default;
|
17266
17315
|
|
17316
|
+
_emberMetalCore.default.assign = Object.assign || _emberMetalAssign.default;
|
17267
17317
|
_emberMetalCore.default.merge = _emberMetalMerge.default;
|
17268
17318
|
|
17269
17319
|
_emberMetalCore.default.FEATURES = _emberMetalFeatures.FEATURES;
|
@@ -17305,6 +17355,10 @@ enifed('ember-metal/index', ['exports', 'require', 'ember-metal/core', 'ember-me
|
|
17305
17355
|
_emberMetalCore.default.Debug.registerWarnHandler = function () {};
|
17306
17356
|
}
|
17307
17357
|
|
17358
|
+
_emberMetalDebug.deprecate('Support for the `ember-legacy-views` addon will end soon, please remove it from your application.', !!_emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT, { id: 'ember-legacy-views', until: '2.6.0', url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-view' });
|
17359
|
+
|
17360
|
+
_emberMetalDebug.deprecate('Support for the `ember-legacy-controllers` addon will end soon, please remove it from your application.', !!_emberMetalCore.default.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT, { id: 'ember-legacy-controllers', until: '2.6.0', url: 'http://emberjs.com/deprecations/v1.x/#toc_objectcontroller' });
|
17361
|
+
|
17308
17362
|
_emberMetalCore.default.create = _emberMetalDebug.deprecateFunc('Ember.create is deprecated in favor of Object.create', { id: 'ember-metal.ember-create', until: '3.0.0' }, Object.create);
|
17309
17363
|
_emberMetalCore.default.keys = _emberMetalDebug.deprecateFunc('Ember.keys is deprecated in favor of Object.keys', { id: 'ember-metal.ember.keys', until: '3.0.0' }, Object.keys);
|
17310
17364
|
|
@@ -17835,6 +17889,12 @@ enifed('ember-metal/libraries', ['exports', 'ember-metal/debug', 'ember-metal/fe
|
|
17835
17889
|
}
|
17836
17890
|
};
|
17837
17891
|
|
17892
|
+
if (_emberMetalFeatures.default('ember-libraries-isregistered')) {
|
17893
|
+
Libraries.prototype.isRegistered = function (name) {
|
17894
|
+
return !!this._getLibraryByName(name);
|
17895
|
+
};
|
17896
|
+
}
|
17897
|
+
|
17838
17898
|
exports.default = Libraries;
|
17839
17899
|
});
|
17840
17900
|
enifed('ember-metal/logger', ['exports', 'ember-metal/core', 'ember-metal/error'], function (exports, _emberMetalCore, _emberMetalError) {
|
@@ -18506,6 +18566,9 @@ enifed('ember-metal/merge', ['exports', 'ember-metal/debug', 'ember-metal/featur
|
|
18506
18566
|
*/
|
18507
18567
|
|
18508
18568
|
function merge(original, updates) {
|
18569
|
+
if (_emberMetalFeatures.default('ember-metal-ember-assign')) {
|
18570
|
+
_emberMetalDebug.deprecate('Usage of `Ember.merge` is deprecated, use `Ember.assign` instead.', false, { id: 'ember-metal.merge', until: '3.0.0' });
|
18571
|
+
}
|
18509
18572
|
|
18510
18573
|
if (!updates || typeof updates !== 'object') {
|
18511
18574
|
return original;
|
@@ -20361,9 +20424,9 @@ enifed('ember-metal/properties', ['exports', 'ember-metal/debug', 'ember-metal/f
|
|
20361
20424
|
Ember.defineProperty(contact, 'lastName', undefined, 'Jolley');
|
20362
20425
|
|
20363
20426
|
// define a computed property
|
20364
|
-
Ember.defineProperty(contact, 'fullName', Ember.computed(
|
20427
|
+
Ember.defineProperty(contact, 'fullName', Ember.computed(function() {
|
20365
20428
|
return this.firstName+' '+this.lastName;
|
20366
|
-
}));
|
20429
|
+
}).property('firstName', 'lastName'));
|
20367
20430
|
```
|
20368
20431
|
|
20369
20432
|
@private
|
@@ -20745,7 +20808,7 @@ enifed('ember-metal/property_events', ['exports', 'ember-metal/utils', 'ember-me
|
|
20745
20808
|
exports.endPropertyChanges = endPropertyChanges;
|
20746
20809
|
exports.changeProperties = changeProperties;
|
20747
20810
|
});
|
20748
|
-
enifed('ember-metal/property_get', ['exports', 'ember-metal/
|
20811
|
+
enifed('ember-metal/property_get', ['exports', 'ember-metal/debug', 'ember-metal/path_cache'], function (exports, _emberMetalDebug, _emberMetalPath_cache) {
|
20749
20812
|
/**
|
20750
20813
|
@module ember-metal
|
20751
20814
|
*/
|
@@ -20753,12 +20816,9 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
20753
20816
|
'use strict';
|
20754
20817
|
|
20755
20818
|
exports.get = get;
|
20756
|
-
exports.normalizeTuple = normalizeTuple;
|
20757
20819
|
exports._getPath = _getPath;
|
20758
20820
|
exports.getWithDefault = getWithDefault;
|
20759
20821
|
|
20760
|
-
var FIRST_KEY = /^([^\.]+)/;
|
20761
|
-
|
20762
20822
|
// ..........................................................
|
20763
20823
|
// GET AND SET
|
20764
20824
|
//
|
@@ -20824,77 +20884,24 @@ enifed('ember-metal/property_get', ['exports', 'ember-metal/core', 'ember-metal/
|
|
20824
20884
|
}
|
20825
20885
|
}
|
20826
20886
|
|
20827
|
-
/**
|
20828
|
-
Normalizes a target/path pair to reflect that actual target/path that should
|
20829
|
-
be observed, etc. This takes into account passing in global property
|
20830
|
-
paths (i.e. a path beginning with a capital letter not defined on the
|
20831
|
-
target).
|
20832
|
-
|
20833
|
-
@private
|
20834
|
-
@method normalizeTuple
|
20835
|
-
@for Ember
|
20836
|
-
@param {Object} target The current target. May be `null`.
|
20837
|
-
@param {String} path A path on the target or a global property path.
|
20838
|
-
@return {Array} a temporary array with the normalized target/path pair.
|
20839
|
-
*/
|
20840
|
-
|
20841
|
-
function normalizeTuple(target, path) {
|
20842
|
-
var hasThis = _emberMetalPath_cache.hasThis(path);
|
20843
|
-
var isGlobal = !hasThis && _emberMetalPath_cache.isGlobal(path);
|
20844
|
-
var key;
|
20845
|
-
|
20846
|
-
if (!target && !isGlobal) {
|
20847
|
-
return [undefined, ''];
|
20848
|
-
}
|
20849
|
-
|
20850
|
-
if (hasThis) {
|
20851
|
-
path = path.slice(5);
|
20852
|
-
}
|
20853
|
-
|
20854
|
-
if (!target || isGlobal) {
|
20855
|
-
target = _emberMetalCore.default.lookup;
|
20856
|
-
}
|
20857
|
-
|
20858
|
-
if (isGlobal && _emberMetalPath_cache.isPath(path)) {
|
20859
|
-
key = path.match(FIRST_KEY)[0];
|
20860
|
-
target = get(target, key);
|
20861
|
-
path = path.slice(key.length + 1);
|
20862
|
-
}
|
20863
|
-
|
20864
|
-
// must return some kind of path to be valid else other things will break.
|
20865
|
-
validateIsPath(path);
|
20866
|
-
|
20867
|
-
return [target, path];
|
20868
|
-
}
|
20869
|
-
|
20870
|
-
function validateIsPath(path) {
|
20871
|
-
if (!path || path.length === 0) {
|
20872
|
-
throw new _emberMetalError.default('Object in path ' + path + ' could not be found or was destroyed.');
|
20873
|
-
}
|
20874
|
-
}
|
20875
|
-
|
20876
20887
|
function _getPath(root, path) {
|
20877
|
-
var
|
20888
|
+
var obj = root;
|
20889
|
+
var parts = path.split('.');
|
20890
|
+
var len = parts.length;
|
20878
20891
|
|
20879
|
-
|
20880
|
-
|
20892
|
+
for (var i = 0; i < len; i++) {
|
20893
|
+
if (obj == null) {
|
20894
|
+
return obj;
|
20895
|
+
}
|
20881
20896
|
|
20882
|
-
|
20883
|
-
tuple = normalizeTuple(root, path);
|
20884
|
-
root = tuple[0];
|
20885
|
-
path = tuple[1];
|
20886
|
-
tuple.length = 0;
|
20887
|
-
}
|
20897
|
+
obj = get(obj, parts[i]);
|
20888
20898
|
|
20889
|
-
|
20890
|
-
len = parts.length;
|
20891
|
-
for (idx = 0; root != null && idx < len; idx++) {
|
20892
|
-
root = get(root, parts[idx]);
|
20893
|
-
if (root && root.isDestroyed) {
|
20899
|
+
if (obj && obj.isDestroyed) {
|
20894
20900
|
return undefined;
|
20895
20901
|
}
|
20896
20902
|
}
|
20897
|
-
|
20903
|
+
|
20904
|
+
return obj;
|
20898
20905
|
}
|
20899
20906
|
|
20900
20907
|
/**
|
@@ -20964,7 +20971,7 @@ enifed('ember-metal/property_set', ['exports', 'ember-metal/debug', 'ember-metal
|
|
20964
20971
|
return setPath(obj, keyName, value, tolerant);
|
20965
20972
|
}
|
20966
20973
|
|
20967
|
-
_emberMetalDebug.assert('calling set on destroyed object', !obj.isDestroyed);
|
20974
|
+
_emberMetalDebug.assert('calling set on destroyed object: ' + _emberMetalUtils.toString(obj) + '.' + keyName + ' = ' + _emberMetalUtils.toString(value), !obj.isDestroyed);
|
20968
20975
|
|
20969
20976
|
if (desc) {
|
20970
20977
|
desc.set(obj, keyName, value);
|
@@ -22458,13 +22465,13 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22458
22465
|
exports.setValue = setValue;
|
22459
22466
|
|
22460
22467
|
/*
|
22461
|
-
Check whether an object is a stream or not
|
22468
|
+
Check whether an object is a stream or not.
|
22462
22469
|
|
22463
22470
|
@private
|
22464
22471
|
@for Ember.stream
|
22465
22472
|
@function isStream
|
22466
|
-
@param {Object|Stream} object
|
22467
|
-
@return {Boolean} `true` if the object is a stream, `false` otherwise
|
22473
|
+
@param {Object|Stream} object Object to check whether it is a stream.
|
22474
|
+
@return {Boolean} `true` if the object is a stream, `false` otherwise.
|
22468
22475
|
*/
|
22469
22476
|
|
22470
22477
|
function isStream(object) {
|
@@ -22478,10 +22485,10 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22478
22485
|
@public
|
22479
22486
|
@for Ember.stream
|
22480
22487
|
@function subscribe
|
22481
|
-
@param {Object|Stream} object
|
22482
|
-
@param {Function} callback
|
22488
|
+
@param {Object|Stream} object Object or stream to potentially subscribe to.
|
22489
|
+
@param {Function} callback Function to run when stream value changes.
|
22483
22490
|
@param {Object} [context] the callback will be executed with this context if it
|
22484
|
-
is provided
|
22491
|
+
is provided.
|
22485
22492
|
*/
|
22486
22493
|
|
22487
22494
|
function subscribe(object, callback, context) {
|
@@ -22497,9 +22504,9 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22497
22504
|
@private
|
22498
22505
|
@for Ember.stream
|
22499
22506
|
@function unsubscribe
|
22500
|
-
@param {Object|Stream} object
|
22501
|
-
@param {Function} callback
|
22502
|
-
@param {Object} [context]
|
22507
|
+
@param {Object|Stream} object Object or stream to potentially unsubscribe from.
|
22508
|
+
@param {Function} callback Function originally passed to `subscribe()`.
|
22509
|
+
@param {Object} [context] Object originally passed to `subscribe()`.
|
22503
22510
|
*/
|
22504
22511
|
|
22505
22512
|
function unsubscribe(object, callback, context) {
|
@@ -22509,14 +22516,14 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22509
22516
|
}
|
22510
22517
|
|
22511
22518
|
/*
|
22512
|
-
Retrieve the value of a stream, or in the case a non-stream object is passed,
|
22519
|
+
Retrieve the value of a stream, or in the case where a non-stream object is passed,
|
22513
22520
|
return the object itself.
|
22514
22521
|
|
22515
22522
|
@private
|
22516
22523
|
@for Ember.stream
|
22517
22524
|
@function read
|
22518
|
-
@param {Object|Stream} object
|
22519
|
-
@return
|
22525
|
+
@param {Object|Stream} object Object to return the value of.
|
22526
|
+
@return The stream's current value, or the non-stream object itself.
|
22520
22527
|
*/
|
22521
22528
|
|
22522
22529
|
function read(object) {
|
@@ -22534,7 +22541,7 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22534
22541
|
@for Ember.stream
|
22535
22542
|
@function readArray
|
22536
22543
|
@param {Array} array The array to read values from
|
22537
|
-
@return {Array}
|
22544
|
+
@return {Array} A new array of the same length with the values of non-stream
|
22538
22545
|
objects mapped from their original positions untouched, and
|
22539
22546
|
the values of stream objects retaining their original position
|
22540
22547
|
and replaced with the stream's current value.
|
@@ -22556,8 +22563,8 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22556
22563
|
@private
|
22557
22564
|
@for Ember.stream
|
22558
22565
|
@function readHash
|
22559
|
-
@param {Object} object The hash to read keys and values from
|
22560
|
-
@return {Object}
|
22566
|
+
@param {Object} object The hash to read keys and values from.
|
22567
|
+
@return {Object} A new object with the same keys as the passed object. The
|
22561
22568
|
property values in the new object are the original values in
|
22562
22569
|
the case of non-stream objects, and the streams' current
|
22563
22570
|
values in the case of stream objects.
|
@@ -22572,14 +22579,14 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22572
22579
|
}
|
22573
22580
|
|
22574
22581
|
/*
|
22575
|
-
Check whether an array contains any stream values
|
22582
|
+
Check whether an array contains any stream values.
|
22576
22583
|
|
22577
22584
|
@private
|
22578
22585
|
@for Ember.stream
|
22579
22586
|
@function scanArray
|
22580
|
-
@param {Array} array
|
22587
|
+
@param {Array} array Array given to a handlebars helper.
|
22581
22588
|
@return {Boolean} `true` if the array contains a stream/bound value, `false`
|
22582
|
-
otherwise
|
22589
|
+
otherwise.
|
22583
22590
|
*/
|
22584
22591
|
|
22585
22592
|
function scanArray(array) {
|
@@ -22597,14 +22604,14 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22597
22604
|
}
|
22598
22605
|
|
22599
22606
|
/*
|
22600
|
-
Check whether a hash has any stream property values
|
22607
|
+
Check whether a hash has any stream property values.
|
22601
22608
|
|
22602
22609
|
@private
|
22603
22610
|
@for Ember.stream
|
22604
22611
|
@function scanHash
|
22605
|
-
@param {Object} hash "hash" argument given to a handlebars helper
|
22612
|
+
@param {Object} hash "hash" argument given to a handlebars helper.
|
22606
22613
|
@return {Boolean} `true` if the object contains a stream/bound value, `false`
|
22607
|
-
otherwise
|
22614
|
+
otherwise.
|
22608
22615
|
*/
|
22609
22616
|
|
22610
22617
|
function scanHash(hash) {
|
@@ -22625,8 +22632,8 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22625
22632
|
this.array = array;
|
22626
22633
|
this.separator = separator;
|
22627
22634
|
|
22628
|
-
//
|
22629
|
-
// as a string literal
|
22635
|
+
// Used by angle bracket components to detect an attribute was provided
|
22636
|
+
// as a string literal.
|
22630
22637
|
this.isConcat = true;
|
22631
22638
|
},
|
22632
22639
|
|
@@ -22641,17 +22648,17 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22641
22648
|
});
|
22642
22649
|
|
22643
22650
|
/*
|
22644
|
-
Join an array, with any streams replaced by their current values
|
22651
|
+
Join an array, with any streams replaced by their current values.
|
22645
22652
|
|
22646
22653
|
@private
|
22647
22654
|
@for Ember.stream
|
22648
22655
|
@function concat
|
22649
22656
|
@param {Array} array An array containing zero or more stream objects and
|
22650
|
-
zero or more non-stream objects
|
22651
|
-
@param {String} separator
|
22657
|
+
zero or more non-stream objects.
|
22658
|
+
@param {String} separator String to be used to join array elements.
|
22652
22659
|
@return {String} String with array elements concatenated and joined by the
|
22653
22660
|
provided separator, and any stream array members having been
|
22654
|
-
replaced by the current value of the stream
|
22661
|
+
replaced by the current value of the stream.
|
22655
22662
|
*/
|
22656
22663
|
|
22657
22664
|
function concat(array, separator) {
|
@@ -22791,9 +22798,9 @@ enifed('ember-metal/streams/utils', ['exports', 'ember-metal/debug', 'ember-meta
|
|
22791
22798
|
@private
|
22792
22799
|
@for Ember.stream
|
22793
22800
|
@function chain
|
22794
|
-
@param {Object|Stream} value A stream or non-stream object
|
22795
|
-
@param {Function} fn
|
22796
|
-
be run once in the case of a non-stream object
|
22801
|
+
@param {Object|Stream} value A stream or non-stream object.
|
22802
|
+
@param {Function} fn Function to be run when the stream value changes, or to
|
22803
|
+
be run once in the case of a non-stream object.
|
22797
22804
|
@return {Object|Stream} In the case of a stream `value` parameter, a new
|
22798
22805
|
stream that will be updated with the return value of
|
22799
22806
|
the provided function `fn`. In the case of a
|
@@ -22860,6 +22867,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
22860
22867
|
exports.apply = apply;
|
22861
22868
|
exports.applyStr = applyStr;
|
22862
22869
|
exports.lookupDescriptor = lookupDescriptor;
|
22870
|
+
exports.toString = toString;
|
22863
22871
|
var _uuid = 0;
|
22864
22872
|
|
22865
22873
|
/**
|
@@ -23244,7 +23252,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
23244
23252
|
// TYPING & ARRAY MESSAGING
|
23245
23253
|
//
|
23246
23254
|
|
23247
|
-
var
|
23255
|
+
var objectToString = Object.prototype.toString;
|
23248
23256
|
|
23249
23257
|
/**
|
23250
23258
|
Forces the passed object to be part of an array. If the object is already
|
@@ -23308,7 +23316,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
23308
23316
|
return '' + obj;
|
23309
23317
|
}
|
23310
23318
|
// overridden toString
|
23311
|
-
if (typeof obj.toString === 'function' && obj.toString !==
|
23319
|
+
if (typeof obj.toString === 'function' && obj.toString !== objectToString) {
|
23312
23320
|
return obj.toString();
|
23313
23321
|
}
|
23314
23322
|
|
@@ -23326,7 +23334,7 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
23326
23334
|
}
|
23327
23335
|
|
23328
23336
|
if (v && typeof v.toString !== 'function') {
|
23329
|
-
ret.push(key + ': ' +
|
23337
|
+
ret.push(key + ': ' + objectToString.call(v));
|
23330
23338
|
} else {
|
23331
23339
|
ret.push(key + ': ' + v);
|
23332
23340
|
}
|
@@ -23408,6 +23416,17 @@ enifed('ember-metal/utils', ['exports'], function (exports) {
|
|
23408
23416
|
return null;
|
23409
23417
|
}
|
23410
23418
|
|
23419
|
+
// A `toString` util function that supports objects without a `toString`
|
23420
|
+
// method, e.g. an object created with `Object.create(null)`.
|
23421
|
+
|
23422
|
+
function toString(obj) {
|
23423
|
+
if (obj && obj.toString) {
|
23424
|
+
return obj.toString();
|
23425
|
+
} else {
|
23426
|
+
return objectToString.call(obj);
|
23427
|
+
}
|
23428
|
+
}
|
23429
|
+
|
23411
23430
|
exports.GUID_KEY = GUID_KEY;
|
23412
23431
|
exports.makeArray = makeArray;
|
23413
23432
|
exports.canInvoke = canInvoke;
|
@@ -23627,8 +23646,6 @@ enifed('ember-metal/watching', ['exports', 'ember-metal/chains', 'ember-metal/wa
|
|
23627
23646
|
return meta && meta.peekWatching(key) || 0;
|
23628
23647
|
}
|
23629
23648
|
|
23630
|
-
watch.flushPending = _emberMetalChains.flushPendingChains;
|
23631
|
-
|
23632
23649
|
function unwatch(obj, _keyPath, m) {
|
23633
23650
|
// can't watch length on Array - it is special...
|
23634
23651
|
if (_keyPath === 'length' && Array.isArray(obj)) {
|
@@ -23784,17 +23801,17 @@ enifed('ember-metal/weak_map', ['exports', 'ember-metal/debug', 'ember-metal/uti
|
|
23784
23801
|
}
|
23785
23802
|
};
|
23786
23803
|
});
|
23787
|
-
enifed('ember-metal-views/
|
23788
|
-
'use strict';
|
23789
|
-
|
23790
|
-
exports.Renderer = _emberMetalViewsRenderer.default;
|
23791
|
-
});
|
23792
|
-
enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/assign', 'ember-metal/set_properties', 'ember-views/system/build-component-template', 'ember-metal/environment'], function (exports, _emberMetalRun_loop, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalAssign, _emberMetalSet_properties, _emberViewsSystemBuildComponentTemplate, _emberMetalEnvironment) {
|
23804
|
+
enifed('ember-metal-views/htmlbars-renderer', ['exports', 'ember-metal/run_loop', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/assign', 'ember-metal/set_properties', 'ember-views/system/build-component-template', 'ember-metal/environment', 'htmlbars-runtime'], function (exports, _emberMetalRun_loop, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalAssign, _emberMetalSet_properties, _emberViewsSystemBuildComponentTemplate, _emberMetalEnvironment, _htmlbarsRuntime) {
|
23793
23805
|
'use strict';
|
23794
23806
|
|
23807
|
+
exports.Renderer = Renderer;
|
23795
23808
|
exports.MorphSet = MorphSet;
|
23796
23809
|
|
23797
|
-
function Renderer(domHelper
|
23810
|
+
function Renderer(domHelper) {
|
23811
|
+
var _ref = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
23812
|
+
|
23813
|
+
var destinedForDOM = _ref.destinedForDOM;
|
23814
|
+
|
23798
23815
|
this._dom = domHelper;
|
23799
23816
|
|
23800
23817
|
// This flag indicates whether the resulting rendered element will be
|
@@ -23829,7 +23846,7 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
23829
23846
|
};
|
23830
23847
|
|
23831
23848
|
Renderer.prototype.renderTopLevelView = function Renderer_renderTopLevelView(view, renderNode) {
|
23832
|
-
// Check to see if insertion has been canceled
|
23849
|
+
// Check to see if insertion has been canceled.
|
23833
23850
|
if (view._willInsert) {
|
23834
23851
|
view._willInsert = false;
|
23835
23852
|
this.prerenderTopLevelView(view, renderNode);
|
@@ -23908,7 +23925,7 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
23908
23925
|
env.renderedViews.length = 0;
|
23909
23926
|
};
|
23910
23927
|
|
23911
|
-
// This entry point is called from top-level `view.appendTo
|
23928
|
+
// This entry point is called from top-level `view.appendTo`.
|
23912
23929
|
Renderer.prototype.appendTo = function Renderer_appendTo(view, target) {
|
23913
23930
|
var morph = this._dom.appendMorph(target);
|
23914
23931
|
morph.ownerNode = morph;
|
@@ -23943,16 +23960,16 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
23943
23960
|
if (view.trigger) {
|
23944
23961
|
view.trigger('willInsertElement');
|
23945
23962
|
}
|
23946
|
-
}; //
|
23963
|
+
}; // Will place into DOM.
|
23947
23964
|
|
23948
23965
|
Renderer.prototype.setAttrs = function (view, attrs) {
|
23949
23966
|
_emberMetalProperty_set.set(view, 'attrs', attrs);
|
23950
|
-
}; //
|
23967
|
+
}; // Set attrs the first time.
|
23951
23968
|
|
23952
23969
|
Renderer.prototype.componentInitAttrs = function (component, attrs) {
|
23953
23970
|
component.trigger('didInitAttrs', { attrs: attrs });
|
23954
23971
|
component.trigger('didReceiveAttrs', { newAttrs: attrs });
|
23955
|
-
}; //
|
23972
|
+
}; // Set attrs the first time.
|
23956
23973
|
|
23957
23974
|
Renderer.prototype.didInsertElement = function (view) {
|
23958
23975
|
if (view._transitionTo) {
|
@@ -23962,7 +23979,7 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
23962
23979
|
if (view.trigger) {
|
23963
23980
|
view.trigger('didInsertElement');
|
23964
23981
|
}
|
23965
|
-
}; // inDOM //
|
23982
|
+
}; // inDOM // Placed into DOM.
|
23966
23983
|
|
23967
23984
|
Renderer.prototype.didUpdate = function (view) {
|
23968
23985
|
if (view.trigger) {
|
@@ -23978,7 +23995,7 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
23978
23995
|
|
23979
23996
|
Renderer.prototype.updateAttrs = function (view, attrs) {
|
23980
23997
|
this.setAttrs(view, attrs);
|
23981
|
-
}; //
|
23998
|
+
}; // Setting new attrs.
|
23982
23999
|
|
23983
24000
|
Renderer.prototype.componentUpdateAttrs = function (component, newAttrs) {
|
23984
24001
|
var oldAttrs = null;
|
@@ -24014,6 +24031,20 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
24014
24031
|
component.trigger('willRender');
|
24015
24032
|
};
|
24016
24033
|
|
24034
|
+
Renderer.prototype.rerender = function (view) {
|
24035
|
+
var renderNode = view._renderNode;
|
24036
|
+
|
24037
|
+
renderNode.isDirty = true;
|
24038
|
+
_htmlbarsRuntime.internal.visitChildren(renderNode.childNodes, function (node) {
|
24039
|
+
if (node.getState().manager) {
|
24040
|
+
node.shouldReceiveAttrs = true;
|
24041
|
+
}
|
24042
|
+
node.isDirty = true;
|
24043
|
+
});
|
24044
|
+
|
24045
|
+
renderNode.ownerNode.emberView.scheduleRevalidate(renderNode, view.toString(), 'rerendering');
|
24046
|
+
};
|
24047
|
+
|
24017
24048
|
Renderer.prototype.remove = function (view, shouldDestroy) {
|
24018
24049
|
this.willDestroyElement(view);
|
24019
24050
|
|
@@ -24065,10 +24096,19 @@ enifed('ember-metal-views/renderer', ['exports', 'ember-metal/run_loop', 'ember-
|
|
24065
24096
|
if (view.trigger) {
|
24066
24097
|
view.trigger('didDestroyElement');
|
24067
24098
|
}
|
24068
|
-
}; //
|
24099
|
+
}; // Element destroyed so view.destroy shouldn't try to remove it removedFromDOM
|
24069
24100
|
|
24070
24101
|
exports.default = Renderer;
|
24071
24102
|
});
|
24103
|
+
enifed('ember-metal-views/index', ['exports', 'ember-metal-views/htmlbars-renderer'], function (exports, _emberMetalViewsHtmlbarsRenderer) {
|
24104
|
+
'use strict';
|
24105
|
+
|
24106
|
+
function _interopExportWildcard(obj, defaults) { var newObj = defaults({}, obj); delete newObj['default']; return newObj; }
|
24107
|
+
|
24108
|
+
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
24109
|
+
|
24110
|
+
_defaults(exports, _interopExportWildcard(_emberMetalViewsHtmlbarsRenderer, _defaults));
|
24111
|
+
});
|
24072
24112
|
enifed('ember-routing/ext/controller', ['exports', 'ember-metal/property_get', 'ember-runtime/mixins/controller'], function (exports, _emberMetalProperty_get, _emberRuntimeMixinsController) {
|
24073
24113
|
'use strict';
|
24074
24114
|
|
@@ -25743,6 +25783,12 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
25743
25783
|
var controllerDefinedQueryParameterConfiguration = _emberMetalProperty_get.get(controllerProto, 'queryParams');
|
25744
25784
|
var normalizedControllerQueryParameterConfiguration = _emberRoutingUtils.normalizeControllerQueryParams(controllerDefinedQueryParameterConfiguration);
|
25745
25785
|
combinedQueryParameterConfiguration = mergeEachQueryParams(normalizedControllerQueryParameterConfiguration, queryParameterConfiguraton);
|
25786
|
+
|
25787
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
25788
|
+
if (controllerDefinedQueryParameterConfiguration.length) {
|
25789
|
+
_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' });
|
25790
|
+
}
|
25791
|
+
}
|
25746
25792
|
} else if (hasRouterDefinedQueryParams) {
|
25747
25793
|
// the developer has not defined a controller but *has* supplied route query params.
|
25748
25794
|
// Generate a class for them so we can later insert default values
|
@@ -25769,6 +25815,19 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
25769
25815
|
|
25770
25816
|
var desc = combinedQueryParameterConfiguration[propName];
|
25771
25817
|
|
25818
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
25819
|
+
// apply default values to controllers
|
25820
|
+
// detect that default value defined on router config
|
25821
|
+
if (desc.hasOwnProperty('defaultValue')) {
|
25822
|
+
// detect that property was not defined on controller
|
25823
|
+
if (controllerProto[propName] === undefined) {
|
25824
|
+
controllerProto[propName] = desc.defaultValue;
|
25825
|
+
} else {
|
25826
|
+
deprecateQueryParamDefaultValuesSetOnController(controllerName, this.routeName, propName);
|
25827
|
+
}
|
25828
|
+
}
|
25829
|
+
}
|
25830
|
+
|
25772
25831
|
var scope = desc.scope || 'model';
|
25773
25832
|
var parts;
|
25774
25833
|
|
@@ -27347,7 +27406,7 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
27347
27406
|
//
|
27348
27407
|
this.render('post', { // the template name associated with 'post' Route
|
27349
27408
|
into: 'application', // the parent route to 'post' Route
|
27350
|
-
outlet: 'main', // {{outlet}} and {{outlet 'main'
|
27409
|
+
outlet: 'main', // {{outlet}} and {{outlet 'main' are synonymous}},
|
27351
27410
|
view: 'post', // the view associated with the 'post' Route
|
27352
27411
|
controller: 'post', // the controller associated with the 'post' Route
|
27353
27412
|
})
|
@@ -27576,6 +27635,17 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
27576
27635
|
};
|
27577
27636
|
|
27578
27637
|
var Component = undefined;
|
27638
|
+
if (_emberMetalFeatures.default('ember-routing-routable-components')) {
|
27639
|
+
var componentName = options && options.component || namePassed && name || route.componentName || name;
|
27640
|
+
var componentLookup = owner.lookup('component-lookup:main');
|
27641
|
+
Component = componentLookup.lookupFactory(componentName);
|
27642
|
+
var isGlimmerComponent = Component && Component.proto().isGlimmerComponent;
|
27643
|
+
if (!template && !ViewClass && Component && isGlimmerComponent) {
|
27644
|
+
renderOptions.Component = Component;
|
27645
|
+
renderOptions.ViewClass = undefined;
|
27646
|
+
renderOptions.attrs = { model: _emberMetalProperty_get.get(controller, 'model') };
|
27647
|
+
}
|
27648
|
+
}
|
27579
27649
|
|
27580
27650
|
if (!ViewClass && !template && !Component) {
|
27581
27651
|
_emberMetalDebug.assert('Could not find "' + name + '" template, view, or component.', isDefaultRender);
|
@@ -27643,12 +27713,16 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
27643
27713
|
var keysAlreadyMergedOrSkippable;
|
27644
27714
|
var qps = {};
|
27645
27715
|
|
27646
|
-
|
27647
|
-
|
27648
|
-
|
27649
|
-
|
27650
|
-
|
27651
|
-
|
27716
|
+
if (_emberMetalFeatures.default('ember-routing-route-configured-query-params')) {
|
27717
|
+
keysAlreadyMergedOrSkippable = {};
|
27718
|
+
} else {
|
27719
|
+
keysAlreadyMergedOrSkippable = {
|
27720
|
+
defaultValue: true,
|
27721
|
+
type: true,
|
27722
|
+
scope: true,
|
27723
|
+
as: true
|
27724
|
+
};
|
27725
|
+
}
|
27652
27726
|
|
27653
27727
|
// first loop over all controller qps, merging them with any matching route qps
|
27654
27728
|
// into a new empty object to avoid mutating.
|
@@ -27695,11 +27769,6 @@ enifed('ember-routing/system/route', ['exports', 'ember-metal/core', 'ember-meta
|
|
27695
27769
|
exports.default = Route;
|
27696
27770
|
});
|
27697
27771
|
// FEATURES, A, deprecate, assert, Logger
|
27698
|
-
|
27699
|
-
// apply default values to controllers
|
27700
|
-
// detect that default value defined on router config
|
27701
|
-
|
27702
|
-
// detect that property was not defined on controller
|
27703
27772
|
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-metal/utils', 'ember-routing/system/router_state', 'container/owner', 'ember-metal/dictionary', 'router', 'router/transition'], function (exports, _emberMetalLogger, _emberMetalDebug, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalProperties, _emberMetalEmpty_object, _emberMetalComputed, _emberMetalAssign, _emberMetalRun_loop, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRoutingSystemDsl, _emberRoutingLocationApi, _emberRoutingUtils, _emberMetalUtils, _emberRoutingSystemRouter_state, _containerOwner, _emberMetalDictionary, _router4, _routerTransition) {
|
27704
27773
|
'use strict';
|
27705
27774
|
|
@@ -27880,9 +27949,9 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27880
27949
|
didTransition: function() {
|
27881
27950
|
this._super(...arguments);
|
27882
27951
|
return ga('send', 'pageview', {
|
27883
|
-
|
27884
|
-
|
27885
|
-
|
27952
|
+
'page': this.get('url'),
|
27953
|
+
'title': this.get('url')
|
27954
|
+
});
|
27886
27955
|
}
|
27887
27956
|
});
|
27888
27957
|
```
|
@@ -27984,7 +28053,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-metal/logger', 'ember-m
|
|
27984
28053
|
containing a mapping of query parameters
|
27985
28054
|
@return {Transition} the transition object associated with this
|
27986
28055
|
attempted transition
|
27987
|
-
@
|
28056
|
+
@public
|
27988
28057
|
*/
|
27989
28058
|
transitionTo: function () {
|
27990
28059
|
var queryParams;
|
@@ -29186,13 +29255,13 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29186
29255
|
```
|
29187
29256
|
|
29188
29257
|
In these contexts,
|
29189
|
-
the helper is called a "closure action" helper.
|
29258
|
+
the helper is called a "closure action" helper. Its behavior is simple:
|
29190
29259
|
If passed a function name, read that function off the `actions` property
|
29191
29260
|
of the current context. Once that function is read (or if a function was
|
29192
29261
|
passed), create a closure over that function and any arguments.
|
29193
29262
|
|
29194
29263
|
The resulting value of an action helper used this way is simply a function.
|
29195
|
-
For example
|
29264
|
+
For example, in the attribute context:
|
29196
29265
|
|
29197
29266
|
```handlebars
|
29198
29267
|
{{! An example of attribute context }}
|
@@ -29213,7 +29282,7 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29213
29282
|
|
29214
29283
|
Thus when the div is clicked, the action on that context is called.
|
29215
29284
|
Because the `actionFunction` is just a function, closure actions can be
|
29216
|
-
passed between components
|
29285
|
+
passed between components and still execute in the correct context.
|
29217
29286
|
|
29218
29287
|
Here is an example action handler on a component:
|
29219
29288
|
|
@@ -29261,8 +29330,8 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29261
29330
|
```
|
29262
29331
|
|
29263
29332
|
The first argument (`model`) was curried over, and the run-time argument (`event`)
|
29264
|
-
becomes a second argument. Action calls be nested this way because each simply
|
29265
|
-
returns a function. Any function can be passed to the `{{action` helper, including
|
29333
|
+
becomes a second argument. Action calls can be nested this way because each simply
|
29334
|
+
returns a function. Any function can be passed to the `{{action}}` helper, including
|
29266
29335
|
other actions.
|
29267
29336
|
|
29268
29337
|
Actions invoked with `sendAction` have the same currying behavior as demonstrated
|
@@ -29292,9 +29361,9 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29292
29361
|
});
|
29293
29362
|
```
|
29294
29363
|
|
29295
|
-
### Attaching actions to DOM
|
29364
|
+
### Attaching actions to DOM elements
|
29296
29365
|
|
29297
|
-
The third context the `{{action` helper can be
|
29366
|
+
The third context of the `{{action}}` helper can be called "element space".
|
29298
29367
|
For example:
|
29299
29368
|
|
29300
29369
|
```handlebars
|
@@ -29303,7 +29372,7 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29303
29372
|
```
|
29304
29373
|
|
29305
29374
|
Used this way, the `{{action}}` helper provides a useful shortcut for
|
29306
|
-
registering an HTML element
|
29375
|
+
registering an HTML element in a template for a single DOM event and
|
29307
29376
|
forwarding that interaction to the template's context (controller or component).
|
29308
29377
|
|
29309
29378
|
If the context of a template is a controller, actions used this way will
|
@@ -29312,8 +29381,7 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29312
29381
|
|
29313
29382
|
### Event Propagation
|
29314
29383
|
|
29315
|
-
`{{action}}` helpers called in element space can control event bubbling.
|
29316
|
-
that the closure style actions cannot.
|
29384
|
+
`{{action}}` helpers called in element space can control event bubbling.
|
29317
29385
|
|
29318
29386
|
Events triggered through the action helper will automatically have
|
29319
29387
|
`.preventDefault()` called on them. You do not need to do so in your event
|
@@ -29333,35 +29401,14 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29333
29401
|
<button {{action 'edit' post bubbles=false}}>Edit</button>
|
29334
29402
|
```
|
29335
29403
|
|
29336
|
-
To disable bubbling with closure style actions you must create your own
|
29337
|
-
wrapper helper that makes use of `event.stopPropagation()`:
|
29338
|
-
|
29339
|
-
```handlebars
|
29340
|
-
<div onclick={{disable-bubbling (action "sayHello")}}>Hello</div>
|
29341
|
-
```
|
29342
|
-
|
29343
|
-
```js
|
29344
|
-
// app/helpers/disable-bubbling.js
|
29345
|
-
import Ember from 'ember';
|
29346
|
-
|
29347
|
-
export function disableBubbling([action]) {
|
29348
|
-
return function(event) {
|
29349
|
-
event.stopPropagation();
|
29350
|
-
|
29351
|
-
return action(event);
|
29352
|
-
};
|
29353
|
-
}
|
29354
|
-
|
29355
|
-
export default Ember.Helper.helper(disableBubbling);
|
29356
|
-
```
|
29357
|
-
|
29358
29404
|
If you need the default handler to trigger you should either register your
|
29359
|
-
own event handler, or use event methods on your view class. See
|
29360
|
-
|
29405
|
+
own event handler, or use event methods on your view class. See
|
29406
|
+
["Responding to Browser Events"](/api/classes/Ember.View.html#toc_responding-to-browser-events)
|
29407
|
+
in the documentation for Ember.View for more information.
|
29361
29408
|
|
29362
29409
|
### Specifying DOM event type
|
29363
29410
|
|
29364
|
-
`{{action` helpers called in element space can specify an event type.
|
29411
|
+
`{{action}}` helpers called in element space can specify an event type.
|
29365
29412
|
|
29366
29413
|
By default the `{{action}}` helper registers for DOM `click` events. You can
|
29367
29414
|
supply an `on` option to the helper to specify a different DOM event name:
|
@@ -29372,14 +29419,14 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29372
29419
|
</div>
|
29373
29420
|
```
|
29374
29421
|
|
29375
|
-
See [Event Names](/api/classes/Ember.View.html#toc_event-names) for a list of
|
29422
|
+
See ["Event Names"](/api/classes/Ember.View.html#toc_event-names) for a list of
|
29376
29423
|
acceptable DOM event names.
|
29377
29424
|
|
29378
29425
|
### Specifying whitelisted modifier keys
|
29379
29426
|
|
29380
|
-
`{{action` helpers called in element space can specify modifier keys.
|
29427
|
+
`{{action}}` helpers called in element space can specify modifier keys.
|
29381
29428
|
|
29382
|
-
By default the `{{action}}` helper will ignore click
|
29429
|
+
By default the `{{action}}` helper will ignore click events with pressed modifier
|
29383
29430
|
keys. You can supply an `allowedKeys` option to specify which keys should not be ignored.
|
29384
29431
|
|
29385
29432
|
```handlebars
|
@@ -29388,7 +29435,7 @@ enifed('ember-routing-htmlbars/keywords/action', ['exports', 'htmlbars-runtime/h
|
|
29388
29435
|
</div>
|
29389
29436
|
```
|
29390
29437
|
|
29391
|
-
This way the
|
29438
|
+
This way the action will fire when clicking with the alt key pressed down.
|
29392
29439
|
|
29393
29440
|
Alternatively, supply "any" to the `allowedKeys` option to accept any combination of modifier keys.
|
29394
29441
|
|
@@ -29475,9 +29522,6 @@ enifed('ember-routing-htmlbars/keywords/closure-action', ['exports', 'ember-meta
|
|
29475
29522
|
if (!action) {
|
29476
29523
|
throw new _emberMetalError.default('An action named \'' + actionName + '\' was not found in ' + target + '.');
|
29477
29524
|
}
|
29478
|
-
} else if (action && typeof action[INVOKE] === 'function') {
|
29479
|
-
target = action;
|
29480
|
-
action = action[INVOKE];
|
29481
29525
|
} else if (actionType !== 'function') {
|
29482
29526
|
throw new _emberMetalError.default('An action could not be made for `' + rawAction.label + '` in ' + target + '. Please confirm that you are using either a quoted action name (i.e. `(action \'' + rawAction.label + '\')`) or a function available in ' + target + '.');
|
29483
29527
|
}
|
@@ -29849,7 +29893,6 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
29849
29893
|
}
|
29850
29894
|
|
29851
29895
|
var parentController = _emberMetalStreamsUtils.read(scope.getLocal('controller'));
|
29852
|
-
var target = parentController || router;
|
29853
29896
|
var controller;
|
29854
29897
|
|
29855
29898
|
// choose name
|
@@ -29859,7 +29902,7 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
29859
29902
|
controller = factory.create({
|
29860
29903
|
model: _emberMetalStreamsUtils.read(context),
|
29861
29904
|
parentController: parentController,
|
29862
|
-
target:
|
29905
|
+
target: parentController
|
29863
29906
|
});
|
29864
29907
|
|
29865
29908
|
node.addDestruction(controller);
|
@@ -29867,7 +29910,7 @@ enifed('ember-routing-htmlbars/keywords/render', ['exports', 'ember-metal/debug'
|
|
29867
29910
|
controller = owner.lookup(controllerFullName) || _emberRoutingSystemGenerate_controller.default(owner, controllerName);
|
29868
29911
|
|
29869
29912
|
controller.setProperties({
|
29870
|
-
target:
|
29913
|
+
target: parentController,
|
29871
29914
|
parentController: parentController
|
29872
29915
|
});
|
29873
29916
|
}
|
@@ -30287,7 +30330,7 @@ enifed('ember-routing-views/components/link-to', ['exports', 'ember-metal/logger
|
|
30287
30330
|
|
30288
30331
|
'use strict';
|
30289
30332
|
|
30290
|
-
_emberHtmlbarsTemplatesLinkTo.default.meta.revision = 'Ember@2.
|
30333
|
+
_emberHtmlbarsTemplatesLinkTo.default.meta.revision = 'Ember@2.5.0-beta.1';
|
30291
30334
|
|
30292
30335
|
/**
|
30293
30336
|
`Ember.LinkComponent` renders an element whose `click` event triggers a
|
@@ -30726,7 +30769,7 @@ enifed('ember-routing-views/components/link-to', ['exports', 'ember-metal/logger
|
|
30726
30769
|
_emberMetalDebug.assert('You must provide one or more parameters to the link-to component.', params.length);
|
30727
30770
|
|
30728
30771
|
var disabledWhen = _emberMetalProperty_get.get(this, 'disabledWhen');
|
30729
|
-
if (disabledWhen
|
30772
|
+
if (disabledWhen) {
|
30730
30773
|
this.set('disabled', disabledWhen);
|
30731
30774
|
}
|
30732
30775
|
|
@@ -30790,7 +30833,7 @@ enifed('ember-routing-views/views/outlet', ['exports', 'ember-views/views/view',
|
|
30790
30833
|
|
30791
30834
|
'use strict';
|
30792
30835
|
|
30793
|
-
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.
|
30836
|
+
_emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.5.0-beta.1';
|
30794
30837
|
|
30795
30838
|
var CoreOutletView = _emberViewsViewsView.default.extend({
|
30796
30839
|
defaultTemplate: _emberHtmlbarsTemplatesTopLevelView.default,
|
@@ -30941,7 +30984,18 @@ enifed('ember-runtime/compare', ['exports', 'ember-runtime/utils', 'ember-runtim
|
|
30941
30984
|
return spaceship(v, w);
|
30942
30985
|
|
30943
30986
|
case 'string':
|
30944
|
-
|
30987
|
+
// We are comparing Strings using operators instead of `String#localeCompare`
|
30988
|
+
// because of unexpected behavior for certain edge cases.
|
30989
|
+
// For example `'Z'.localeCompare('a')` returns `1`.
|
30990
|
+
//
|
30991
|
+
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#Description
|
30992
|
+
if (v < w) {
|
30993
|
+
return -1;
|
30994
|
+
} else if (v === w) {
|
30995
|
+
return 0;
|
30996
|
+
}
|
30997
|
+
|
30998
|
+
return 1;
|
30945
30999
|
|
30946
31000
|
case 'array':
|
30947
31001
|
var vLen = v.length;
|
@@ -33258,19 +33312,8 @@ enifed('ember-runtime/mixins/array', ['exports', 'ember-metal/core', 'ember-meta
|
|
33258
33312
|
on the array. Just get an equivalent property on this object and it will
|
33259
33313
|
return an enumerable that maps automatically to the named key on the
|
33260
33314
|
member objects.
|
33261
|
-
|
33262
|
-
|
33263
|
-
myMethod: computed('posts.@each.author', function(){
|
33264
|
-
...
|
33265
|
-
});
|
33266
|
-
```
|
33267
|
-
If you merely want to watch for the array being changed, like an object being
|
33268
|
-
replaced, added or removed, use `[]` instead of `@each`.
|
33269
|
-
```javascript
|
33270
|
-
myMethod: computed('posts.[]', function(){
|
33271
|
-
...
|
33272
|
-
});
|
33273
|
-
```
|
33315
|
+
If you merely want to watch for any items being added or removed to the array,
|
33316
|
+
use the `[]` property instead of `@each`.
|
33274
33317
|
@property @each
|
33275
33318
|
@public
|
33276
33319
|
*/
|
@@ -33727,7 +33770,6 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/property_get'
|
|
33727
33770
|
```
|
33728
33771
|
@property firstObject
|
33729
33772
|
@return {Object} the object or undefined
|
33730
|
-
@readOnly
|
33731
33773
|
@public
|
33732
33774
|
*/
|
33733
33775
|
firstObject: _emberMetalComputed.computed('[]', function () {
|
@@ -33756,7 +33798,6 @@ enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/property_get'
|
|
33756
33798
|
```
|
33757
33799
|
@property lastObject
|
33758
33800
|
@return {Object} the last object or undefined
|
33759
|
-
@readOnly
|
33760
33801
|
@public
|
33761
33802
|
*/
|
33762
33803
|
lastObject: _emberMetalComputed.computed('[]', function () {
|
@@ -36284,8 +36325,9 @@ enifed('ember-runtime/mixins/target_action_support', ['exports', 'ember-metal/co
|
|
36284
36325
|
@return {Boolean} true if the action was sent successfully and did not return false
|
36285
36326
|
@private
|
36286
36327
|
*/
|
36287
|
-
triggerAction: function (
|
36288
|
-
opts =
|
36328
|
+
triggerAction: function () {
|
36329
|
+
var opts = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
36330
|
+
|
36289
36331
|
var action = opts.action || _emberMetalProperty_get.get(this, 'action');
|
36290
36332
|
var target = opts.target || _emberMetalProperty_get.get(this, 'targetObject');
|
36291
36333
|
var actionContext = opts.actionContext;
|
@@ -36829,7 +36871,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-metal/debug', 'emb
|
|
36829
36871
|
if (mergedProperties && mergedProperties.length && mergedProperties.indexOf(keyName) >= 0) {
|
36830
36872
|
var originalValue = this[keyName];
|
36831
36873
|
|
36832
|
-
value = _emberMetalAssign.default(
|
36874
|
+
value = _emberMetalAssign.default(originalValue, value);
|
36833
36875
|
}
|
36834
36876
|
|
36835
36877
|
if (desc) {
|
@@ -38118,14 +38160,14 @@ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal/core', 'emb
|
|
38118
38160
|
if (_emberMetalCore.default.EXTEND_PROTOTYPES === true || _emberMetalCore.default.EXTEND_PROTOTYPES.Array) {
|
38119
38161
|
NativeArray.apply(Array.prototype);
|
38120
38162
|
exports. // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles
|
38121
|
-
A = A = function (
|
38122
|
-
|
38163
|
+
A = A = function () {
|
38164
|
+
var arr = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
|
38165
|
+
return arr;
|
38123
38166
|
};
|
38124
38167
|
} else {
|
38125
|
-
exports.A = A = function (
|
38126
|
-
|
38127
|
-
|
38128
|
-
}
|
38168
|
+
exports.A = A = function () {
|
38169
|
+
var arr = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
|
38170
|
+
|
38129
38171
|
return _emberRuntimeMixinsArray.default.detect(arr) ? arr : NativeArray.apply(arr);
|
38130
38172
|
};
|
38131
38173
|
}
|
@@ -38776,20 +38818,19 @@ enifed('ember-template-compiler/compat', ['exports', 'ember-metal/core', 'ember-
|
|
38776
38818
|
EmberHandlebars.compile = _emberTemplateCompilerSystemCompile.default;
|
38777
38819
|
EmberHandlebars.template = _emberTemplateCompilerSystemTemplate.default;
|
38778
38820
|
});
|
38779
|
-
enifed('ember-template-compiler/index', ['exports', 'ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-template-compiler/plugins', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-item-class', 'ember-template-compiler/plugins/transform-
|
38821
|
+
enifed('ember-template-compiler/index', ['exports', 'ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-template-compiler/plugins', 'ember-template-compiler/plugins/transform-old-binding-syntax', 'ember-template-compiler/plugins/transform-old-class-binding-syntax', 'ember-template-compiler/plugins/transform-item-class', 'ember-template-compiler/plugins/transform-component-attrs-into-mut', 'ember-template-compiler/plugins/transform-component-curly-to-readonly', 'ember-template-compiler/plugins/transform-angle-bracket-components', 'ember-template-compiler/plugins/transform-input-on-to-onEvent', 'ember-template-compiler/plugins/transform-top-level-components', 'ember-template-compiler/plugins/transform-each-into-collection', 'ember-template-compiler/plugins/transform-unescaped-inline-link-to', 'ember-template-compiler/plugins/assert-no-view-and-controller-paths', 'ember-template-compiler/plugins/assert-no-view-helper', 'ember-template-compiler/plugins/assert-no-each-in', 'ember-template-compiler/compat'], function (exports, _emberMetal, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsTransformTopLevelComponents, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsTransformUnescapedInlineLinkTo, _emberTemplateCompilerPluginsAssertNoViewAndControllerPaths, _emberTemplateCompilerPluginsAssertNoViewHelper, _emberTemplateCompilerPluginsAssertNoEachIn, _emberTemplateCompilerCompat) {
|
38780
38822
|
'use strict';
|
38781
38823
|
|
38782
38824
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax.default);
|
38783
38825
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldClassBindingSyntax.default);
|
38784
38826
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformItemClass.default);
|
38785
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformClosureComponentAttrsIntoMut.default);
|
38786
38827
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut.default);
|
38787
38828
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly.default);
|
38788
38829
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformAngleBracketComponents.default);
|
38789
38830
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformInputOnToOnEvent.default);
|
38790
38831
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformTopLevelComponents.default);
|
38791
38832
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformUnescapedInlineLinkTo.default);
|
38792
|
-
_emberTemplateCompilerPlugins.registerPlugin('ast',
|
38833
|
+
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsAssertNoEachIn.default);
|
38793
38834
|
|
38794
38835
|
if (_emberMetal.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
38795
38836
|
_emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachIntoCollection.default);
|
@@ -38806,13 +38847,56 @@ enifed('ember-template-compiler/index', ['exports', 'ember-metal', 'ember-templa
|
|
38806
38847
|
});
|
38807
38848
|
|
38808
38849
|
// used for adding Ember.Handlebars.compile for backwards compat
|
38850
|
+
enifed('ember-template-compiler/plugins/assert-no-each-in', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
38851
|
+
'use strict';
|
38852
|
+
|
38853
|
+
function AssertNoEachIn() {
|
38854
|
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
38855
|
+
|
38856
|
+
this.syntax = null;
|
38857
|
+
this.options = options;
|
38858
|
+
}
|
38859
|
+
|
38860
|
+
AssertNoEachIn.prototype.transform = function AssertNoEachIn_transform(ast) {
|
38861
|
+
if (!!_emberMetalCore.default.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
|
38862
|
+
return ast;
|
38863
|
+
}
|
38864
|
+
var walker = new this.syntax.Walker();
|
38865
|
+
var moduleName = this.options && this.options.moduleName;
|
38866
|
+
|
38867
|
+
walker.visit(ast, function (node) {
|
38868
|
+
if (!validate(node)) {
|
38869
|
+
return;
|
38870
|
+
}
|
38871
|
+
assertHelper(moduleName, node);
|
38872
|
+
});
|
38873
|
+
|
38874
|
+
return ast;
|
38875
|
+
};
|
38876
|
+
|
38877
|
+
function assertHelper(moduleName, node) {
|
38878
|
+
var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay.default(moduleName, node.loc);
|
38879
|
+
var singular = node.params[0].original;
|
38880
|
+
var plural = node.params[2].original;
|
38881
|
+
|
38882
|
+
_emberMetalDebug.assert('Using {{#each ' + singular + ' in ' + plural + '}} ' + moduleInfo + 'is no longer supported in Ember 2.0+, please use {{#each ' + plural + ' as |' + singular + '|}}');
|
38883
|
+
}
|
38884
|
+
|
38885
|
+
function validate(node) {
|
38886
|
+
return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.path.original === 'each' && node.params.length === 3 && node.params[1].type === 'PathExpression' && node.params[1].original === 'in';
|
38887
|
+
}
|
38888
|
+
|
38889
|
+
exports.default = AssertNoEachIn;
|
38890
|
+
});
|
38809
38891
|
enifed('ember-template-compiler/plugins/assert-no-view-and-controller-paths', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
38810
38892
|
'use strict';
|
38811
38893
|
|
38812
|
-
function AssertNoViewAndControllerPaths(
|
38894
|
+
function AssertNoViewAndControllerPaths() {
|
38895
|
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
38896
|
+
|
38813
38897
|
// set later within HTMLBars to the syntax package
|
38814
38898
|
this.syntax = null;
|
38815
|
-
this.options = options
|
38899
|
+
this.options = options;
|
38816
38900
|
}
|
38817
38901
|
|
38818
38902
|
/**
|
@@ -38887,10 +38971,12 @@ enifed('ember-template-compiler/plugins/assert-no-view-and-controller-paths', ['
|
|
38887
38971
|
enifed('ember-template-compiler/plugins/assert-no-view-helper', ['exports', 'ember-metal/core', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
38888
38972
|
'use strict';
|
38889
38973
|
|
38890
|
-
function AssertNoViewHelper(
|
38974
|
+
function AssertNoViewHelper() {
|
38975
|
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
38976
|
+
|
38891
38977
|
// set later within HTMLBars to the syntax package
|
38892
38978
|
this.syntax = null;
|
38893
|
-
this.options = options
|
38979
|
+
this.options = options;
|
38894
38980
|
}
|
38895
38981
|
|
38896
38982
|
/**
|
@@ -38932,45 +39018,6 @@ enifed('ember-template-compiler/plugins/assert-no-view-helper', ['exports', 'emb
|
|
38932
39018
|
|
38933
39019
|
exports.default = AssertNoViewHelper;
|
38934
39020
|
});
|
38935
|
-
enifed('ember-template-compiler/plugins/deprecate-render-block', ['exports', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
38936
|
-
'use strict';
|
38937
|
-
|
38938
|
-
exports.default = DeprecateRenderBlock;
|
38939
|
-
|
38940
|
-
function DeprecateRenderBlock(options) {
|
38941
|
-
this.syntax = null;
|
38942
|
-
this.options = options;
|
38943
|
-
}
|
38944
|
-
|
38945
|
-
DeprecateRenderBlock.prototype.transform = function DeprecateRenderBlock_transform(ast) {
|
38946
|
-
var moduleName = this.options.moduleName;
|
38947
|
-
var walker = new this.syntax.Walker();
|
38948
|
-
|
38949
|
-
walker.visit(ast, function (node) {
|
38950
|
-
if (!validate(node)) {
|
38951
|
-
return;
|
38952
|
-
}
|
38953
|
-
|
38954
|
-
_emberMetalDebug.deprecate(deprecationMessage(moduleName, node), false, {
|
38955
|
-
id: 'ember-template-compiler.deprecate-render-block',
|
38956
|
-
until: '2.4.0',
|
38957
|
-
url: 'http://emberjs.com/deprecations/v2.x#toc_render-helper-with-block'
|
38958
|
-
});
|
38959
|
-
});
|
38960
|
-
|
38961
|
-
return ast;
|
38962
|
-
};
|
38963
|
-
|
38964
|
-
function validate(node) {
|
38965
|
-
return node.type === 'BlockStatement' && node.path.original === 'render';
|
38966
|
-
}
|
38967
|
-
|
38968
|
-
function deprecationMessage(moduleName, node) {
|
38969
|
-
var sourceInformation = _emberTemplateCompilerSystemCalculateLocationDisplay.default(moduleName, node.loc);
|
38970
|
-
|
38971
|
-
return 'Usage of `render` in block form is deprecated ' + sourceInformation + '.';
|
38972
|
-
}
|
38973
|
-
});
|
38974
39021
|
enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['exports'], function (exports) {
|
38975
39022
|
'use strict';
|
38976
39023
|
|
@@ -39004,88 +39051,6 @@ enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['e
|
|
39004
39051
|
|
39005
39052
|
exports.default = TransformAngleBracketComponents;
|
39006
39053
|
});
|
39007
|
-
enifed('ember-template-compiler/plugins/transform-closure-component-attrs-into-mut', ['exports'], function (exports) {
|
39008
|
-
'use strict';
|
39009
|
-
|
39010
|
-
function TransformClosureComponentAttrsIntoMut() {
|
39011
|
-
// set later within HTMLBars to the syntax package
|
39012
|
-
this.syntax = null;
|
39013
|
-
}
|
39014
|
-
|
39015
|
-
/**
|
39016
|
-
@private
|
39017
|
-
@method transform
|
39018
|
-
@param {AST} ast The AST to be transformed.
|
39019
|
-
*/
|
39020
|
-
TransformClosureComponentAttrsIntoMut.prototype.transform = function TransformClosureComponentAttrsIntoMut_transform(ast) {
|
39021
|
-
var b = this.syntax.builders;
|
39022
|
-
var walker = new this.syntax.Walker();
|
39023
|
-
|
39024
|
-
walker.visit(ast, function (node) {
|
39025
|
-
if (validate(node)) {
|
39026
|
-
processExpression(b, node);
|
39027
|
-
}
|
39028
|
-
});
|
39029
|
-
|
39030
|
-
return ast;
|
39031
|
-
};
|
39032
|
-
|
39033
|
-
function processExpression(builder, node) {
|
39034
|
-
processSubExpressionsInNode(builder, node);
|
39035
|
-
|
39036
|
-
if (isComponentClosure(node)) {
|
39037
|
-
mutParameters(builder, node);
|
39038
|
-
}
|
39039
|
-
}
|
39040
|
-
|
39041
|
-
function processSubExpressionsInNode(builder, node) {
|
39042
|
-
for (var i = 0; i < node.params.length; i++) {
|
39043
|
-
if (node.params[i].type === 'SubExpression') {
|
39044
|
-
processExpression(builder, node.params[i]);
|
39045
|
-
}
|
39046
|
-
}
|
39047
|
-
|
39048
|
-
each(node.hash.pairs, function (pair) {
|
39049
|
-
var value = pair.value;
|
39050
|
-
|
39051
|
-
if (value.type === 'SubExpression') {
|
39052
|
-
processExpression(builder, value);
|
39053
|
-
}
|
39054
|
-
});
|
39055
|
-
}
|
39056
|
-
|
39057
|
-
function isComponentClosure(node) {
|
39058
|
-
return node.type === 'SubExpression' && node.path.original === 'component';
|
39059
|
-
}
|
39060
|
-
|
39061
|
-
function mutParameters(builder, node) {
|
39062
|
-
for (var i = 1; i < node.params.length; i++) {
|
39063
|
-
if (node.params[i].type === 'PathExpression') {
|
39064
|
-
node.params[i] = builder.sexpr(builder.path('@mut'), [node.params[i]]);
|
39065
|
-
}
|
39066
|
-
}
|
39067
|
-
|
39068
|
-
each(node.hash.pairs, function (pair) {
|
39069
|
-
var value = pair.value;
|
39070
|
-
|
39071
|
-
if (value.type === 'PathExpression') {
|
39072
|
-
pair.value = builder.sexpr(builder.path('@mut'), [pair.value]);
|
39073
|
-
}
|
39074
|
-
});
|
39075
|
-
}
|
39076
|
-
|
39077
|
-
function validate(node) {
|
39078
|
-
return node.type === 'BlockStatement' || node.type === 'MustacheStatement';
|
39079
|
-
}
|
39080
|
-
|
39081
|
-
function each(list, callback) {
|
39082
|
-
for (var i = 0, l = list.length; i < l; i++) {
|
39083
|
-
callback(list[i]);
|
39084
|
-
}
|
39085
|
-
}
|
39086
|
-
|
39087
|
-
exports.default = TransformClosureComponentAttrsIntoMut;
|
39088
|
-
});
|
39089
39054
|
enifed('ember-template-compiler/plugins/transform-component-attrs-into-mut', ['exports'], function (exports) {
|
39090
39055
|
'use strict';
|
39091
39056
|
|
@@ -39181,75 +39146,6 @@ enifed('ember-template-compiler/plugins/transform-component-curly-to-readonly',
|
|
39181
39146
|
|
39182
39147
|
exports.default = TransformComponentCurlyToReadonly;
|
39183
39148
|
});
|
39184
|
-
enifed('ember-template-compiler/plugins/transform-each-in-to-hash', ['exports'], function (exports) {
|
39185
|
-
/**
|
39186
|
-
@module ember
|
39187
|
-
@submodule ember-htmlbars
|
39188
|
-
*/
|
39189
|
-
|
39190
|
-
/**
|
39191
|
-
An HTMLBars AST transformation that replaces all instances of
|
39192
|
-
|
39193
|
-
```handlebars
|
39194
|
-
{{#each item in items}}
|
39195
|
-
{{/each}}
|
39196
|
-
```
|
39197
|
-
|
39198
|
-
with
|
39199
|
-
|
39200
|
-
```handlebars
|
39201
|
-
{{#each items keyword="item"}}
|
39202
|
-
{{/each}}
|
39203
|
-
```
|
39204
|
-
|
39205
|
-
@class TransformEachInToHash
|
39206
|
-
@private
|
39207
|
-
*/
|
39208
|
-
'use strict';
|
39209
|
-
|
39210
|
-
function TransformEachInToHash(options) {
|
39211
|
-
// set later within HTMLBars to the syntax package
|
39212
|
-
this.syntax = null;
|
39213
|
-
this.options = options || {};
|
39214
|
-
}
|
39215
|
-
|
39216
|
-
/**
|
39217
|
-
@private
|
39218
|
-
@method transform
|
39219
|
-
@param {AST} ast The AST to be transformed.
|
39220
|
-
*/
|
39221
|
-
TransformEachInToHash.prototype.transform = function TransformEachInToHash_transform(ast) {
|
39222
|
-
var pluginContext = this;
|
39223
|
-
var walker = new pluginContext.syntax.Walker();
|
39224
|
-
var b = pluginContext.syntax.builders;
|
39225
|
-
|
39226
|
-
walker.visit(ast, function (node) {
|
39227
|
-
if (pluginContext.validate(node)) {
|
39228
|
-
if (node.program && node.program.blockParams.length) {
|
39229
|
-
throw new Error('You cannot use keyword (`{{each foo in bar}}`) and block params (`{{each bar as |foo|}}`) at the same time.');
|
39230
|
-
}
|
39231
|
-
|
39232
|
-
var removedParams = node.sexpr.params.splice(0, 2);
|
39233
|
-
var keyword = removedParams[0].original;
|
39234
|
-
|
39235
|
-
// TODO: This may not be necessary.
|
39236
|
-
if (!node.sexpr.hash) {
|
39237
|
-
node.sexpr.hash = b.hash();
|
39238
|
-
}
|
39239
|
-
|
39240
|
-
node.sexpr.hash.pairs.push(b.pair('keyword', b.string(keyword)));
|
39241
|
-
}
|
39242
|
-
});
|
39243
|
-
|
39244
|
-
return ast;
|
39245
|
-
};
|
39246
|
-
|
39247
|
-
TransformEachInToHash.prototype.validate = function TransformEachInToHash_validate(node) {
|
39248
|
-
return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.sexpr.path.original === 'each' && node.sexpr.params.length === 3 && node.sexpr.params[1].type === 'PathExpression' && node.sexpr.params[1].original === 'in';
|
39249
|
-
};
|
39250
|
-
|
39251
|
-
exports.default = TransformEachInToHash;
|
39252
|
-
});
|
39253
39149
|
enifed('ember-template-compiler/plugins/transform-each-into-collection', ['exports', 'ember-metal/debug', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalDebug, _emberTemplateCompilerSystemCalculateLocationDisplay) {
|
39254
39150
|
'use strict';
|
39255
39151
|
|
@@ -39339,10 +39235,12 @@ enifed('ember-template-compiler/plugins/transform-input-on-to-onEvent', ['export
|
|
39339
39235
|
@private
|
39340
39236
|
@class TransformInputOnToOnEvent
|
39341
39237
|
*/
|
39342
|
-
function TransformInputOnToOnEvent(
|
39238
|
+
function TransformInputOnToOnEvent() {
|
39239
|
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
39240
|
+
|
39343
39241
|
// set later within HTMLBars to the syntax package
|
39344
39242
|
this.syntax = null;
|
39345
|
-
this.options = options
|
39243
|
+
this.options = options;
|
39346
39244
|
}
|
39347
39245
|
|
39348
39246
|
/**
|
@@ -39691,7 +39589,7 @@ enifed('ember-template-compiler/plugins/transform-old-class-binding-syntax', ['e
|
|
39691
39589
|
return segments;
|
39692
39590
|
}
|
39693
39591
|
});
|
39694
|
-
enifed('ember-template-compiler/plugins/transform-top-level-components', ['exports'
|
39592
|
+
enifed('ember-template-compiler/plugins/transform-top-level-components', ['exports'], function (exports) {
|
39695
39593
|
'use strict';
|
39696
39594
|
|
39697
39595
|
function TransformTopLevelComponents() {
|
@@ -39842,8 +39740,8 @@ enifed('ember-template-compiler/system/calculate-location-display', ['exports'],
|
|
39842
39740
|
|
39843
39741
|
exports.default = calculateLocationDisplay;
|
39844
39742
|
|
39845
|
-
function calculateLocationDisplay(moduleName
|
39846
|
-
var loc =
|
39743
|
+
function calculateLocationDisplay(moduleName) {
|
39744
|
+
var loc = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
39847
39745
|
|
39848
39746
|
var _ref = loc.start || {};
|
39849
39747
|
|
@@ -39905,7 +39803,7 @@ enifed('ember-template-compiler/system/compile', ['exports', 'require', 'ember-t
|
|
39905
39803
|
return _emberTemplateCompilerSystemTemplate.default(templateSpec);
|
39906
39804
|
};
|
39907
39805
|
});
|
39908
|
-
enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-metal/
|
39806
|
+
enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-metal/assign', 'ember-template-compiler/plugins'], function (exports, _emberMetalAssign, _emberTemplateCompilerPlugins) {
|
39909
39807
|
/**
|
39910
39808
|
@module ember
|
39911
39809
|
@submodule ember-template-compiler
|
@@ -39945,7 +39843,7 @@ enifed('ember-template-compiler/system/compile_options', ['exports', 'ember-meta
|
|
39945
39843
|
options.buildMeta = function buildMeta(program) {
|
39946
39844
|
return {
|
39947
39845
|
fragmentReason: fragmentReason(program),
|
39948
|
-
revision: 'Ember@2.
|
39846
|
+
revision: 'Ember@2.5.0-beta.1',
|
39949
39847
|
loc: program.loc,
|
39950
39848
|
moduleName: options.moduleName
|
39951
39849
|
};
|
@@ -40153,7 +40051,7 @@ enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapt
|
|
40153
40051
|
}
|
40154
40052
|
});
|
40155
40053
|
});
|
40156
|
-
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) {
|
40054
|
+
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', 'ember-metal/features'], function (exports, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp, _emberMetalFeatures) {
|
40157
40055
|
'use strict';
|
40158
40056
|
|
40159
40057
|
/**
|
@@ -40164,45 +40062,119 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40164
40062
|
var helper = _emberTestingTest.default.registerHelper;
|
40165
40063
|
var asyncHelper = _emberTestingTest.default.registerAsyncHelper;
|
40166
40064
|
|
40167
|
-
|
40168
|
-
var appController = app.__container__.lookup('controller:application');
|
40065
|
+
var keyboardEventTypes, mouseEventTypes, buildKeyboardEvent, buildMouseEvent, buildBasicEvent, fireEvent, focus;
|
40169
40066
|
|
40170
|
-
|
40171
|
-
|
40067
|
+
var defaultEventOptions = { canBubble: true, cancelable: true };
|
40068
|
+
keyboardEventTypes = ['keydown', 'keypress', 'keyup'];
|
40069
|
+
mouseEventTypes = ['click', 'mousedown', 'mouseup', 'dblclick', 'mousenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'];
|
40172
40070
|
|
40173
|
-
function
|
40174
|
-
var
|
40071
|
+
buildKeyboardEvent = function buildKeyboardEvent(type) {
|
40072
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
40175
40073
|
|
40176
|
-
|
40177
|
-
|
40074
|
+
var event = undefined;
|
40075
|
+
try {
|
40076
|
+
event = document.createEvent('KeyEvents');
|
40077
|
+
var eventOpts = _emberViewsSystemJquery.default.extend({}, defaultEventOptions, options);
|
40078
|
+
event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);
|
40079
|
+
} catch (e) {
|
40080
|
+
event = buildBasicEvent(type, options);
|
40081
|
+
}
|
40082
|
+
return event;
|
40083
|
+
};
|
40178
40084
|
|
40179
|
-
function
|
40180
|
-
var
|
40085
|
+
buildMouseEvent = function buildMouseEvent(type) {
|
40086
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
40181
40087
|
|
40182
|
-
|
40183
|
-
|
40088
|
+
var event = undefined;
|
40089
|
+
try {
|
40090
|
+
event = document.createEvent('MouseEvents');
|
40091
|
+
var eventOpts = _emberViewsSystemJquery.default.extend({}, defaultEventOptions, options);
|
40092
|
+
event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);
|
40093
|
+
} catch (e) {
|
40094
|
+
event = buildBasicEvent(type, options);
|
40095
|
+
}
|
40096
|
+
return event;
|
40097
|
+
};
|
40184
40098
|
|
40185
|
-
function
|
40186
|
-
|
40187
|
-
return new _emberRuntimeExtRsvp.default.Promise(function () {}, 'TestAdapter paused promise');
|
40188
|
-
}
|
40099
|
+
buildBasicEvent = function buildBasicEvent(type) {
|
40100
|
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
40189
40101
|
|
40190
|
-
|
40191
|
-
|
40192
|
-
|
40102
|
+
var event = document.createEvent('Events');
|
40103
|
+
event.initEvent(type, true, true);
|
40104
|
+
_emberViewsSystemJquery.default.extend(event, options);
|
40105
|
+
return event;
|
40106
|
+
};
|
40107
|
+
|
40108
|
+
fireEvent = function fireEvent(element, type) {
|
40109
|
+
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
40110
|
+
|
40111
|
+
if (!element) {
|
40112
|
+
return;
|
40113
|
+
}
|
40114
|
+
var event = undefined;
|
40115
|
+
if (keyboardEventTypes.indexOf(type) > -1) {
|
40116
|
+
event = buildKeyboardEvent(type, options);
|
40117
|
+
} else if (mouseEventTypes.indexOf(type) > -1) {
|
40118
|
+
var rect = element.getBoundingClientRect();
|
40119
|
+
var x = rect.left + 1;
|
40120
|
+
var y = rect.top + 1;
|
40121
|
+
var simulatedCoordinates = {
|
40122
|
+
screenX: x + 5,
|
40123
|
+
screenY: y + 95,
|
40124
|
+
clientX: x,
|
40125
|
+
clientY: y
|
40126
|
+
};
|
40127
|
+
event = buildMouseEvent(type, _emberViewsSystemJquery.default.extend(simulatedCoordinates, options));
|
40128
|
+
} else {
|
40129
|
+
event = buildBasicEvent(type, options);
|
40130
|
+
}
|
40131
|
+
element.dispatchEvent(event);
|
40132
|
+
};
|
40133
|
+
|
40134
|
+
focus = function focus(el) {
|
40135
|
+
if (!el) {
|
40136
|
+
return;
|
40137
|
+
}
|
40138
|
+
var $el = _emberViewsSystemJquery.default(el);
|
40139
|
+
if ($el.is(':input, [contenteditable=true]')) {
|
40140
|
+
var type = $el.prop('type');
|
40193
40141
|
if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {
|
40194
|
-
_emberMetalRun_loop.default(
|
40142
|
+
_emberMetalRun_loop.default(null, function () {
|
40195
40143
|
// Firefox does not trigger the `focusin` event if the window
|
40196
40144
|
// does not have focus. If the document doesn't have focus just
|
40197
40145
|
// use trigger('focusin') instead.
|
40146
|
+
|
40198
40147
|
if (!document.hasFocus || document.hasFocus()) {
|
40199
|
-
|
40148
|
+
el.focus();
|
40200
40149
|
} else {
|
40201
|
-
|
40150
|
+
$el.trigger('focusin');
|
40202
40151
|
}
|
40203
40152
|
});
|
40204
40153
|
}
|
40205
40154
|
}
|
40155
|
+
};
|
40156
|
+
|
40157
|
+
function currentRouteName(app) {
|
40158
|
+
var routingService = app.__container__.lookup('service:-routing');
|
40159
|
+
|
40160
|
+
return _emberMetalProperty_get.get(routingService, 'currentRouteName');
|
40161
|
+
}
|
40162
|
+
|
40163
|
+
function currentPath(app) {
|
40164
|
+
var routingService = app.__container__.lookup('service:-routing');
|
40165
|
+
|
40166
|
+
return _emberMetalProperty_get.get(routingService, 'currentPath');
|
40167
|
+
}
|
40168
|
+
|
40169
|
+
function currentURL(app) {
|
40170
|
+
var router = app.__container__.lookup('router:main');
|
40171
|
+
|
40172
|
+
return _emberMetalProperty_get.get(router, 'location').getURL();
|
40173
|
+
}
|
40174
|
+
|
40175
|
+
function pauseTest() {
|
40176
|
+
_emberTestingTest.default.adapter.asyncStart();
|
40177
|
+
return new _emberRuntimeExtRsvp.default.Promise(function () {}, 'TestAdapter paused promise');
|
40206
40178
|
}
|
40207
40179
|
|
40208
40180
|
function visit(app, url) {
|
@@ -40230,12 +40202,14 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40230
40202
|
|
40231
40203
|
function click(app, selector, context) {
|
40232
40204
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
40233
|
-
|
40205
|
+
var el = $el[0];
|
40234
40206
|
|
40235
|
-
|
40207
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'mousedown');
|
40236
40208
|
|
40237
|
-
|
40238
|
-
|
40209
|
+
focus(el);
|
40210
|
+
|
40211
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'mouseup');
|
40212
|
+
_emberMetalRun_loop.default(null, fireEvent, el, 'click');
|
40239
40213
|
|
40240
40214
|
return app.testHelpers.wait();
|
40241
40215
|
}
|
@@ -40272,10 +40246,9 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40272
40246
|
}
|
40273
40247
|
|
40274
40248
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
40249
|
+
var el = $el[0];
|
40275
40250
|
|
40276
|
-
|
40277
|
-
|
40278
|
-
_emberMetalRun_loop.default($el, 'trigger', event);
|
40251
|
+
_emberMetalRun_loop.default(null, fireEvent, el, type, options);
|
40279
40252
|
|
40280
40253
|
return app.testHelpers.wait();
|
40281
40254
|
}
|
@@ -40296,18 +40269,19 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40296
40269
|
}
|
40297
40270
|
|
40298
40271
|
function fillIn(app, selector, contextOrText, text) {
|
40299
|
-
var $el, context;
|
40272
|
+
var $el, el, context;
|
40300
40273
|
if (typeof text === 'undefined') {
|
40301
40274
|
text = contextOrText;
|
40302
40275
|
} else {
|
40303
40276
|
context = contextOrText;
|
40304
40277
|
}
|
40305
40278
|
$el = app.testHelpers.findWithAssert(selector, context);
|
40306
|
-
|
40279
|
+
el = $el[0];
|
40280
|
+
focus(el);
|
40307
40281
|
_emberMetalRun_loop.default(function () {
|
40308
40282
|
$el.val(text);
|
40309
|
-
|
40310
|
-
|
40283
|
+
fireEvent(el, 'input');
|
40284
|
+
fireEvent(el, 'change');
|
40311
40285
|
});
|
40312
40286
|
return app.testHelpers.wait();
|
40313
40287
|
}
|
@@ -40334,10 +40308,10 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40334
40308
|
|
40335
40309
|
function wait(app, value) {
|
40336
40310
|
return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
|
40311
|
+
var router = app.__container__.lookup('router:main');
|
40312
|
+
|
40337
40313
|
// Every 10ms, poll for the async thing to have finished
|
40338
40314
|
var watcher = setInterval(function () {
|
40339
|
-
var router = app.__container__.lookup('router:main');
|
40340
|
-
|
40341
40315
|
// 1. If the router is loading, keep polling
|
40342
40316
|
var routerIsLoading = router.router && !!router.router.activeTransition;
|
40343
40317
|
if (routerIsLoading) {
|
@@ -40618,6 +40592,10 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal/property_get', 'ember-m
|
|
40618
40592
|
*/
|
40619
40593
|
asyncHelper('triggerEvent', triggerEvent);
|
40620
40594
|
});
|
40595
|
+
|
40596
|
+
// Firefox does not trigger the `focusin` event if the window
|
40597
|
+
// does not have focus. If the document doesn't have focus just
|
40598
|
+
// use trigger('focusin') instead.
|
40621
40599
|
enifed('ember-testing/index', ['exports', 'ember-metal/core', 'ember-testing/initializers', 'ember-testing/support', 'ember-testing/setup_for_testing', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-testing/helpers'], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) {
|
40622
40600
|
'use strict';
|
40623
40601
|
|
@@ -41515,7 +41493,6 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/debug', 'emb
|
|
41515
41493
|
@class Component
|
41516
41494
|
@namespace Ember
|
41517
41495
|
@extends Ember.View
|
41518
|
-
@uses Ember.ViewTargetActionSupport
|
41519
41496
|
@public
|
41520
41497
|
*/
|
41521
41498
|
var Component = _emberViewsViewsView.default.extend(_emberRuntimeMixinsTarget_action_support.default, {
|
@@ -41842,106 +41819,6 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/debug', 'emb
|
|
41842
41819
|
@property positionalParams
|
41843
41820
|
@since 1.13.0
|
41844
41821
|
*/
|
41845
|
-
|
41846
|
-
/**
|
41847
|
-
Called when the attributes passed into the component have been updated.
|
41848
|
-
Called both during the initial render of a container and during a rerender.
|
41849
|
-
Can be used in place of an observer; code placed here will be executed
|
41850
|
-
every time any attribute updates.
|
41851
|
-
@method didReceiveAttrs
|
41852
|
-
@public
|
41853
|
-
@since 1.13.0
|
41854
|
-
*/
|
41855
|
-
|
41856
|
-
/**
|
41857
|
-
Called when the attributes passed into the component have been updated.
|
41858
|
-
Called both during the initial render of a container and during a rerender.
|
41859
|
-
Can be used in place of an observer; code placed here will be executed
|
41860
|
-
every time any attribute updates.
|
41861
|
-
@event didReceiveAttrs
|
41862
|
-
@public
|
41863
|
-
@since 1.13.0
|
41864
|
-
*/
|
41865
|
-
|
41866
|
-
/**
|
41867
|
-
Called after a component has been rendered, both on initial render and
|
41868
|
-
in subsequent rerenders.
|
41869
|
-
@method didRender
|
41870
|
-
@public
|
41871
|
-
@since 1.13.0
|
41872
|
-
*/
|
41873
|
-
|
41874
|
-
/**
|
41875
|
-
Called after a component has been rendered, both on initial render and
|
41876
|
-
in subsequent rerenders.
|
41877
|
-
@event didRender
|
41878
|
-
@public
|
41879
|
-
@since 1.13.0
|
41880
|
-
*/
|
41881
|
-
|
41882
|
-
/**
|
41883
|
-
Called before a component has been rendered, both on initial render and
|
41884
|
-
in subsequent rerenders.
|
41885
|
-
@method willRender
|
41886
|
-
@public
|
41887
|
-
@since 1.13.0
|
41888
|
-
*/
|
41889
|
-
|
41890
|
-
/**
|
41891
|
-
Called before a component has been rendered, both on initial render and
|
41892
|
-
in subsequent rerenders.
|
41893
|
-
@event willRender
|
41894
|
-
@public
|
41895
|
-
@since 1.13.0
|
41896
|
-
*/
|
41897
|
-
|
41898
|
-
/**
|
41899
|
-
Called when the attributes passed into the component have been changed.
|
41900
|
-
Called only during a rerender, not during an initial render.
|
41901
|
-
@method didUpdateAttrs
|
41902
|
-
@public
|
41903
|
-
@since 1.13.0
|
41904
|
-
*/
|
41905
|
-
|
41906
|
-
/**
|
41907
|
-
Called when the attributes passed into the component have been changed.
|
41908
|
-
Called only during a rerender, not during an initial render.
|
41909
|
-
@event didUpdateAttrs
|
41910
|
-
@public
|
41911
|
-
@since 1.13.0
|
41912
|
-
*/
|
41913
|
-
|
41914
|
-
/**
|
41915
|
-
Called when the component is about to update and rerender itself.
|
41916
|
-
Called only during a rerender, not during an initial render.
|
41917
|
-
@method willUpdate
|
41918
|
-
@public
|
41919
|
-
@since 1.13.0
|
41920
|
-
*/
|
41921
|
-
|
41922
|
-
/**
|
41923
|
-
Called when the component is about to update and rerender itself.
|
41924
|
-
Called only during a rerender, not during an initial render.
|
41925
|
-
@event willUpdate
|
41926
|
-
@public
|
41927
|
-
@since 1.13.0
|
41928
|
-
*/
|
41929
|
-
|
41930
|
-
/**
|
41931
|
-
Called when the component has updated and rerendered itself.
|
41932
|
-
Called only during a rerender, not during an initial render.
|
41933
|
-
@event didUpdate
|
41934
|
-
@public
|
41935
|
-
@since 1.13.0
|
41936
|
-
*/
|
41937
|
-
|
41938
|
-
/**
|
41939
|
-
Called when the component has updated and rerendered itself.
|
41940
|
-
Called only during a rerender, not during an initial render.
|
41941
|
-
@event didUpdate
|
41942
|
-
@public
|
41943
|
-
@since 1.13.0
|
41944
|
-
*/
|
41945
41822
|
});
|
41946
41823
|
|
41947
41824
|
Component.reopenClass({
|
@@ -41950,7 +41827,7 @@ enifed('ember-views/components/component', ['exports', 'ember-metal/debug', 'emb
|
|
41950
41827
|
|
41951
41828
|
exports.default = Component;
|
41952
41829
|
});
|
41953
|
-
enifed('ember-views/index', ['exports', 'ember-runtime', 'ember-views/system/jquery', 'ember-views/system/utils', 'ember-views/system/ext', 'ember-views/views/states', 'ember-metal-views
|
41830
|
+
enifed('ember-views/index', ['exports', 'ember-runtime', 'ember-views/system/jquery', 'ember-views/system/utils', 'ember-views/system/ext', 'ember-views/views/states', 'ember-metal-views', 'ember-views/views/core_view', 'ember-views/views/view', 'ember-views/views/container_view', 'ember-views/views/collection_view', 'ember-views/components/component', 'ember-views/system/event_dispatcher', 'ember-views/mixins/view_target_action_support', 'ember-views/component_lookup', 'ember-views/views/checkbox', 'ember-views/mixins/text_support', 'ember-views/views/text_field', 'ember-views/views/text_area', 'ember-views/views/select', 'ember-views/compat/metamorph_view', 'ember-views/views/legacy_each_view'], function (exports, _emberRuntime, _emberViewsSystemJquery, _emberViewsSystemUtils, _emberViewsSystemExt, _emberViewsViewsStates, _emberMetalViews, _emberViewsViewsCore_view, _emberViewsViewsView, _emberViewsViewsContainer_view, _emberViewsViewsCollection_view, _emberViewsComponentsComponent, _emberViewsSystemEvent_dispatcher, _emberViewsMixinsView_target_action_support, _emberViewsComponent_lookup, _emberViewsViewsCheckbox, _emberViewsMixinsText_support, _emberViewsViewsText_field, _emberViewsViewsText_area, _emberViewsViewsSelect, _emberViewsCompatMetamorph_view, _emberViewsViewsLegacy_each_view) {
|
41954
41831
|
/**
|
41955
41832
|
@module ember
|
41956
41833
|
@submodule ember-views
|
@@ -41984,12 +41861,12 @@ enifed('ember-views/index', ['exports', 'ember-runtime', 'ember-views/system/jqu
|
|
41984
41861
|
_emberRuntime.default.View = _emberViewsViewsView.DeprecatedView;
|
41985
41862
|
_emberRuntime.default.View.states = _emberViewsViewsStates.states;
|
41986
41863
|
_emberRuntime.default.View.cloneStates = _emberViewsViewsStates.cloneStates;
|
41987
|
-
_emberRuntime.default.View._Renderer =
|
41864
|
+
_emberRuntime.default.View._Renderer = _emberMetalViews.Renderer;
|
41988
41865
|
_emberRuntime.default.ContainerView = _emberViewsViewsContainer_view.DeprecatedContainerView;
|
41989
41866
|
_emberRuntime.default.CollectionView = _emberViewsViewsCollection_view.default;
|
41990
41867
|
}
|
41991
41868
|
|
41992
|
-
_emberRuntime.default._Renderer =
|
41869
|
+
_emberRuntime.default._Renderer = _emberMetalViews.Renderer;
|
41993
41870
|
|
41994
41871
|
_emberRuntime.default.Checkbox = _emberViewsViewsCheckbox.default;
|
41995
41872
|
_emberRuntime.default.TextField = _emberViewsViewsText_field.default;
|
@@ -42790,7 +42667,9 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
42790
42667
|
@return {Ember.View} new instance
|
42791
42668
|
@private
|
42792
42669
|
*/
|
42793
|
-
createChildView: function (maybeViewClass
|
42670
|
+
createChildView: function (maybeViewClass) {
|
42671
|
+
var attrs = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
42672
|
+
|
42794
42673
|
if (!maybeViewClass) {
|
42795
42674
|
throw new TypeError('createChildViews first argument must exist');
|
42796
42675
|
}
|
@@ -42801,7 +42680,6 @@ enifed('ember-views/mixins/view_child_views_support', ['exports', 'ember-metal/d
|
|
42801
42680
|
return maybeViewClass;
|
42802
42681
|
}
|
42803
42682
|
|
42804
|
-
var attrs = _attrs || {};
|
42805
42683
|
var view;
|
42806
42684
|
|
42807
42685
|
attrs.parentView = this;
|
@@ -45386,7 +45264,7 @@ enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'emb
|
|
45386
45264
|
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) {
|
45387
45265
|
'use strict';
|
45388
45266
|
|
45389
|
-
_emberHtmlbarsTemplatesContainerView.default.meta.revision = 'Ember@2.
|
45267
|
+
_emberHtmlbarsTemplatesContainerView.default.meta.revision = 'Ember@2.5.0-beta.1';
|
45390
45268
|
|
45391
45269
|
/**
|
45392
45270
|
@module ember
|
@@ -45711,7 +45589,7 @@ enifed('ember-views/views/container_view', ['exports', 'ember-metal/core', 'embe
|
|
45711
45589
|
|
45712
45590
|
exports.default = ContainerView;
|
45713
45591
|
});
|
45714
|
-
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
|
45592
|
+
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', 'ember-views/views/states', 'htmlbars-runtime', 'require'], function (exports, _emberMetalDebug, _emberMetalProperty_get, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberRuntimeUtils, _emberMetalViews, _emberViewsViewsStates, _htmlbarsRuntime, _require) {
|
45715
45593
|
'use strict';
|
45716
45594
|
|
45717
45595
|
function K() {
|
@@ -45756,7 +45634,7 @@ enifed('ember-views/views/core_view', ['exports', 'ember-metal/debug', 'ember-me
|
|
45756
45634
|
// via `create()` instead of going through the container.
|
45757
45635
|
if (!this.renderer) {
|
45758
45636
|
var DOMHelper = domHelper();
|
45759
|
-
renderer = renderer || new
|
45637
|
+
renderer = renderer || new _emberMetalViews.Renderer(new DOMHelper());
|
45760
45638
|
this.renderer = renderer;
|
45761
45639
|
}
|
45762
45640
|
|
@@ -46617,7 +46495,7 @@ enifed('ember-views/views/states/destroying', ['exports', 'ember-metal/assign',
|
|
46617
46495
|
|
46618
46496
|
exports.default = destroying;
|
46619
46497
|
});
|
46620
|
-
enifed('ember-views/views/states/has_element', ['exports', 'ember-views/views/states/default', 'ember-metal/assign', 'ember-views/system/jquery', 'ember-metal/run_loop', 'ember-metal/property_get'
|
46498
|
+
enifed('ember-views/views/states/has_element', ['exports', 'ember-views/views/states/default', 'ember-metal/assign', 'ember-views/system/jquery', 'ember-metal/run_loop', 'ember-metal/property_get'], function (exports, _emberViewsViewsStatesDefault, _emberMetalAssign, _emberViewsSystemJquery, _emberMetalRun_loop, _emberMetalProperty_get) {
|
46621
46499
|
'use strict';
|
46622
46500
|
|
46623
46501
|
var hasElement = Object.create(_emberViewsViewsStatesDefault.default);
|
@@ -46643,18 +46521,7 @@ enifed('ember-views/views/states/has_element', ['exports', 'ember-views/views/st
|
|
46643
46521
|
// deferred to allow bindings to synchronize.
|
46644
46522
|
rerender: function (view) {
|
46645
46523
|
view.renderer.ensureViewNotRendering(view);
|
46646
|
-
|
46647
|
-
var renderNode = view._renderNode;
|
46648
|
-
|
46649
|
-
renderNode.isDirty = true;
|
46650
|
-
_htmlbarsRuntime.internal.visitChildren(renderNode.childNodes, function (node) {
|
46651
|
-
if (node.getState().manager) {
|
46652
|
-
node.shouldReceiveAttrs = true;
|
46653
|
-
}
|
46654
|
-
node.isDirty = true;
|
46655
|
-
});
|
46656
|
-
|
46657
|
-
renderNode.ownerNode.emberView.scheduleRevalidate(renderNode, view.toString(), 'rerendering');
|
46524
|
+
view.renderer.rerender(view);
|
46658
46525
|
},
|
46659
46526
|
|
46660
46527
|
cleanup: function (view) {
|
@@ -47195,20 +47062,21 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/de
|
|
47195
47062
|
```
|
47196
47063
|
|
47197
47064
|
If the return value of an `attributeBindings` monitored property is a boolean
|
47198
|
-
the property's
|
47065
|
+
the property will follow HTML's pattern of repeating the attribute's name as
|
47066
|
+
its value:
|
47199
47067
|
|
47200
47068
|
```javascript
|
47201
47069
|
MyTextInput = Ember.View.extend({
|
47202
47070
|
tagName: 'input',
|
47203
47071
|
attributeBindings: ['disabled'],
|
47204
|
-
disabled:
|
47072
|
+
disabled: true
|
47205
47073
|
});
|
47206
47074
|
```
|
47207
47075
|
|
47208
|
-
Will result in
|
47076
|
+
Will result in view instances with an HTML representation of:
|
47209
47077
|
|
47210
47078
|
```html
|
47211
|
-
<input id="ember1" class="ember-view" disabled="
|
47079
|
+
<input id="ember1" class="ember-view" disabled="disabled" />
|
47212
47080
|
```
|
47213
47081
|
|
47214
47082
|
`attributeBindings` can refer to computed properties:
|
@@ -47227,17 +47095,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/de
|
|
47227
47095
|
});
|
47228
47096
|
```
|
47229
47097
|
|
47230
|
-
To prevent setting an attribute altogether, use `null` or `undefined` as the
|
47231
|
-
return value of the `attributeBindings` monitored property:
|
47232
|
-
|
47233
|
-
```javascript
|
47234
|
-
MyTextInput = Ember.View.extend({
|
47235
|
-
tagName: 'form',
|
47236
|
-
attributeBindings: ['novalidate'],
|
47237
|
-
novalidate: null
|
47238
|
-
});
|
47239
|
-
```
|
47240
|
-
|
47241
47098
|
Updates to the property of an attribute binding will result in automatic
|
47242
47099
|
update of the HTML attribute in the view's rendered HTML representation.
|
47243
47100
|
|
@@ -47566,7 +47423,6 @@ enifed('ember-views/views/view', ['exports', 'ember-metal/core', 'ember-metal/de
|
|
47566
47423
|
@namespace Ember
|
47567
47424
|
@extends Ember.CoreView
|
47568
47425
|
@deprecated See http://emberjs.com/deprecations/v1.x/#toc_ember-view
|
47569
|
-
@uses Ember.ViewSupport
|
47570
47426
|
@uses Ember.ViewContextSupport
|
47571
47427
|
@uses Ember.ViewChildViewsSupport
|
47572
47428
|
@uses Ember.TemplateRenderingSupport
|
@@ -54943,6 +54799,8 @@ enifed('rsvp/node', ['exports', 'rsvp/promise', 'rsvp/-internal', 'rsvp/utils'],
|
|
54943
54799
|
|
54944
54800
|
exports.default = denodeify;
|
54945
54801
|
|
54802
|
+
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
54803
|
+
|
54946
54804
|
function Result() {
|
54947
54805
|
this.value = undefined;
|
54948
54806
|
}
|
@@ -55173,7 +55031,7 @@ enifed('rsvp/node', ['exports', 'rsvp/promise', 'rsvp/-internal', 'rsvp/utils'],
|
|
55173
55031
|
}
|
55174
55032
|
};
|
55175
55033
|
|
55176
|
-
fn
|
55034
|
+
_defaults(fn, nodeFunc);
|
55177
55035
|
|
55178
55036
|
return fn;
|
55179
55037
|
}
|