dist/ember.prod.js in ember-source-2.8.0 vs dist/ember.prod.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; @@ -9672,11 +9672,10 @@ view.renderer.didDestroyElement(view); if (view.parentView && view.parentView === env.view) { view.parentView.removeChild(view); } - view.parentView = null; view._transitionTo('preRender'); }); } @@ -18301,11 +18300,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; }; @@ -24568,11 +24567,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 @@ -24724,10 +24723,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'; @@ -28317,60 +28336,36 @@ }); } function deprecateQueryParamDefaultValuesSetOnController(controllerName, routeName, propName) {} - /* - 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) { @@ -28379,12 +28374,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)); } }); @@ -28833,26 +28828,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]; }, @@ -29828,18 +29822,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 = []; @@ -30004,10 +29999,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; @@ -39274,11 +39302,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; (_target = target).send.apply(_target, arguments); @@ -40304,10 +40332,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) {} else {} _emberMetalRun_loop.default.scheduleOnce('render', this, this.revalidate); return; } @@ -41877,11 +41909,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 = { @@ -47449,12 +47481,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; @@ -47509,10 +47541,9 @@ urlMethod: 'update', intent: null, pivotHandler: null, resolveIndex: 0, resolvedModels: null, - isActive: true, state: null, queryParamsOnly: false, isTransition: true,