dist/ember.js in ember-source-2.8.0 vs dist/ember.js in ember-source-2.8.1
- old
+ new
@@ -4,11 +4,11 @@
* @copyright Copyright 2011-2016 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
- * @version 2.8.0
+ * @version 2.8.1
*/
var enifed, requireModule, require, Ember;
var mainContext = this;
@@ -10322,11 +10322,10 @@
view.renderer.didDestroyElement(view);
if (view.parentView && view.parentView === env.view) {
view.parentView.removeChild(view);
}
- view.parentView = null;
view._transitionTo('preRender');
});
}
@@ -19106,11 +19105,11 @@
// To maintain stacktrace consistency across browsers
var getStack = function (error) {
var stack = error.stack;
var message = error.message;
- if (stack.indexOf(message) === -1) {
+ if (stack && stack.indexOf(message) === -1) {
stack = message + '\n' + stack;
}
return stack;
};
@@ -25423,11 +25422,11 @@
*/
WeakMap.prototype.toString = function () {
return '[object WeakMap]';
};
});
-enifed('ember-routing/ext/controller', ['exports', 'ember-metal/property_get', 'ember-runtime/mixins/controller'], function (exports, _emberMetalProperty_get, _emberRuntimeMixinsController) {
+enifed('ember-routing/ext/controller', ['exports', 'ember-metal/property_get', 'ember-runtime/mixins/controller', 'ember-routing/utils', 'ember-metal/features'], function (exports, _emberMetalProperty_get, _emberRuntimeMixinsController, _emberRoutingUtils, _emberMetalFeatures) {
'use strict';
/**
@module ember
@submodule ember-routing
@@ -25579,10 +25578,30 @@
var method = target.replaceRoute || target.replaceWith;
return method.apply(target, arguments);
}
});
+ if (true) {
+ _emberRuntimeMixinsController.default.reopen({
+ transitionToRoute: function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return this._super.apply(this, _emberRoutingUtils.prefixRouteNameArg(this, args));
+ },
+
+ replaceRoute: function () {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return this._super.apply(this, _emberRoutingUtils.prefixRouteNameArg(this, args));
+ }
+ });
+ }
+
exports.default = _emberRuntimeMixinsController.default;
});
enifed('ember-routing/ext/run_loop', ['exports', 'ember-metal/run_loop'], function (exports, _emberMetalRun_loop) {
'use strict';
@@ -29207,60 +29226,36 @@
function deprecateQueryParamDefaultValuesSetOnController(controllerName, routeName, propName) {
_emberMetalDebug.deprecate('Configuring query parameter default values on controllers is deprecated. Please move the value for the property \'' + propName + '\' from the \'' + controllerName + '\' controller to the \'' + routeName + '\' route in the format: {queryParams: ' + propName + ': {defaultValue: <default value> }}', false, { id: 'ember-routing.deprecate-query-param-default-values-set-on-controller', until: '3.0.0' });
}
- /*
- Returns an arguments array where the route name arg is prefixed based on the mount point
-
- @private
- */
- function prefixRouteNameArg(route, args) {
- var routeName = args[0];
- var owner = _containerOwner.getOwner(route);
- var prefix = owner.mountPoint;
-
- // only alter the routeName if it's actually referencing a route.
- if (owner.routable && typeof routeName === 'string') {
- if (resemblesURL(routeName)) {
- throw new _emberMetalError.default('Route#transitionTo cannot be used for URLs. Please use the route name instead.');
- } else {
- routeName = prefix + '.' + routeName;
- args[0] = routeName;
- }
- }
-
- return args;
- }
-
- /*
- Check if a routeName resembles a url instead
-
- @private
- */
- function resemblesURL(str) {
- return typeof str === 'string' && (str === '' || str.charAt(0) === '/');
- }
-
if (true) {
Route.reopen({
replaceWith: function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
- return this._super.apply(this, prefixRouteNameArg(this, args));
+ return this._super.apply(this, _emberRoutingUtils.prefixRouteNameArg(this, args));
},
transitionTo: function () {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
- return this._super.apply(this, prefixRouteNameArg(this, args));
+ return this._super.apply(this, _emberRoutingUtils.prefixRouteNameArg(this, args));
},
+ intermediateTransitionTo: function () {
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
+ args[_key4] = arguments[_key4];
+ }
+
+ return this._super.apply(this, _emberRoutingUtils.prefixRouteNameArg(this, args));
+ },
+
modelFor: function (_routeName) {
var routeName = undefined;
var owner = _containerOwner.getOwner(this);
if (owner.routable && this.router && this.router.router.activeTransition) {
@@ -29269,12 +29264,12 @@
routeName = getEngineRouteName(owner, _routeName);
} else {
routeName = _routeName;
}
- for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
- args[_key4 - 1] = arguments[_key4];
+ for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
+ args[_key5 - 1] = arguments[_key5];
}
return this._super.apply(this, [routeName].concat(args));
}
});
@@ -29723,26 +29718,25 @@
this.router.reset();
}
},
willDestroy: function () {
- if (true) {
- var instances = this._engineInstances;
- for (var _name in instances) {
- for (var id in instances[_name]) {
- _emberMetalRun_loop.default(instances[_name][id], 'destroy');
- }
- }
- }
-
if (this._toplevelView) {
this._toplevelView.destroy();
this._toplevelView = null;
}
+
this._super.apply(this, arguments);
this.reset();
+
+ var instances = this._engineInstances;
+ for (var _name in instances) {
+ for (var id in instances[_name]) {
+ _emberMetalRun_loop.default(instances[_name][id], 'destroy');
+ }
+ }
},
_lookupActiveComponentNode: function (templateName) {
return this._activeViews[templateName];
},
@@ -30725,18 +30719,19 @@
}
}
return true;
}
});
-enifed('ember-routing/utils', ['exports', 'ember-metal/assign', 'ember-metal/property_get'], function (exports, _emberMetalAssign, _emberMetalProperty_get) {
+enifed('ember-routing/utils', ['exports', 'ember-metal/assign', 'ember-metal/property_get', 'container/owner', 'ember-metal/error'], function (exports, _emberMetalAssign, _emberMetalProperty_get, _containerOwner, _emberMetalError) {
'use strict';
exports.routeArgs = routeArgs;
exports.getActiveTargetName = getActiveTargetName;
exports.stashParamNames = stashParamNames;
exports.calculateCacheKey = calculateCacheKey;
exports.normalizeControllerQueryParams = normalizeControllerQueryParams;
+ exports.prefixRouteNameArg = prefixRouteNameArg;
var ALL_PERIODS_REGEX = /\./g;
function routeArgs(targetRouteName, models, queryParams) {
var args = [];
@@ -30901,10 +30896,43 @@
_emberMetalAssign.default(tmp, singleDesc);
accum[key] = tmp;
}
}
+
+ /*
+ Check if a routeName resembles a url instead
+
+ @private
+ */
+ function resemblesURL(str) {
+ return typeof str === 'string' && (str === '' || str.charAt(0) === '/');
+ }
+
+ /*
+ Returns an arguments array where the route name arg is prefixed based on the mount point
+
+ @private
+ */
+
+ function prefixRouteNameArg(route, args) {
+ var routeName = args[0];
+ var owner = _containerOwner.getOwner(route);
+ var prefix = owner.mountPoint;
+
+ // only alter the routeName if it's actually referencing a route.
+ if (owner.routable && typeof routeName === 'string') {
+ if (resemblesURL(routeName)) {
+ throw new _emberMetalError.default('Route#transitionTo cannot be used for URLs. Please use the route name instead.');
+ } else {
+ routeName = prefix + '.' + routeName;
+ args[0] = routeName;
+ }
+ }
+
+ return args;
+ }
});
enifed('ember-runtime/compare', ['exports', 'ember-runtime/utils', 'ember-runtime/mixins/comparable'], function (exports, _emberRuntimeUtils, _emberRuntimeMixinsComparable) {
'use strict';
exports.default = compare;
@@ -41839,11 +41867,11 @@
if (!shouldBubble) {
return;
}
}
- target = _emberMetalProperty_get.get(this, 'target') || _emberMetalProperty_get.get(this, '_targetObject');
+ target = _emberMetalProperty_get.get(this, 'target');
if (target) {
var _target;
_emberMetalDebug.assert('The `target` for ' + this + ' (' + target + ') does not have a `send` method', typeof target.send === 'function');
@@ -42897,10 +42925,14 @@
this[property.name] = property.descriptor.value;
}, _Mixin$create.revalidate = function () {
this.renderer.revalidateTopLevelView(this);
this.scheduledRevalidation = false;
}, _Mixin$create.scheduleRevalidate = function (node, label, manualRerender) {
+ if (this.isDestroying) {
+ return;
+ }
+
if (node && !this._dispatching && this._env.renderedNodes.has(node)) {
if (manualRerender) {
_emberMetalDebug.deprecate('You manually rerendered ' + label + ' (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember 3.0', false, { id: 'ember-views.manual-parent-rerender', until: '3.0.0' });
} else {
_emberMetalDebug.deprecate('You modified ' + label + ' twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 3.0', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
@@ -44490,11 +44522,11 @@
*/
});
enifed("ember/version", ["exports"], function (exports) {
"use strict";
- exports.default = "2.8.0";
+ exports.default = "2.8.1";
});
enifed('htmlbars-runtime', ['exports', 'htmlbars-runtime/hooks', 'htmlbars-runtime/render', 'htmlbars-util/morph-utils', 'htmlbars-util/template-utils'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) {
'use strict';
var internal = {
@@ -50062,12 +50094,12 @@
this.params = undefined;
this.handlerInfos = undefined;
this.targetName = undefined;
this.pivotHandler = undefined;
this.sequence = undefined;
- this.isAborted = undefined;
- this.isActive = undefined;
+ this.isAborted = false;
+ this.isActive = true;
if (error) {
this.promise = _rsvpPromise.default.reject(error);
this.error = error;
return;
@@ -50122,10 +50154,9 @@
urlMethod: 'update',
intent: null,
pivotHandler: null,
resolveIndex: 0,
resolvedModels: null,
- isActive: true,
state: null,
queryParamsOnly: false,
isTransition: true,