dist/ember.prod.js in ember-source-2.6.0.beta.2 vs dist/ember.prod.js in ember-source-2.6.0.beta.3
- 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.6.0-beta.2
+ * @version 2.6.0-beta.3
*/
var enifed, requireModule, require, Ember;
var mainContext = this;
@@ -686,16 +686,16 @@
},
/*
Join the passed method with an existing queue and execute immediately,
if there isn't one use `Backburner#run`.
- The join method is like the run method except that it will schedule into
+ The join method is like the run method except that it will schedule into
an existing queue if one already exists. In either case, the join method will
immediately execute the passed in function and return its result.
- @method join
+ @method join
@param {Object} target
- @param {Function} method The method to be executed
+ @param {Function} method The method to be executed
@param {any} args The method arguments
@return method result
*/
join: function () /* target, method, args */{
if (!this.currentInstance) {
@@ -730,14 +730,14 @@
}
},
/*
Defer the passed function to run inside the specified queue.
- @method defer
- @param {String} queueName
+ @method defer
+ @param {String} queueName
@param {Object} target
- @param {Function|String} method The method or method name to be executed
+ @param {Function|String} method The method or method name to be executed
@param {any} args The method arguments
@return method result
*/
defer: function (queueName /* , target, method, args */) {
var length = arguments.length;
@@ -859,11 +859,11 @@
} else {
method = args.shift();
}
}
- var executeAt = Date.now() + parseInt(wait, 10);
+ var executeAt = Date.now() + parseInt(wait !== wait ? 0 : wait, 10);
if (_backburnerUtils.isString(method)) {
method = target[method];
}
@@ -7776,11 +7776,11 @@
if (renderNode.cleanup) {
renderNode.cleanup();
}
}
});
-enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/features', 'ember-metal/debug', 'ember-htmlbars/node-managers/component-node-manager', 'ember-views/system/build-component-template', 'ember-htmlbars/utils/lookup-component', 'ember-metal/assign', 'ember-metal/empty_object', 'ember-metal/cache', 'ember-htmlbars/system/lookup-helper', 'ember-htmlbars/keywords/closure-component'], function (exports, _emberMetalFeatures, _emberMetalDebug, _emberHtmlbarsNodeManagersComponentNodeManager, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsUtilsLookupComponent, _emberMetalAssign, _emberMetalEmpty_object, _emberMetalCache, _emberHtmlbarsSystemLookupHelper, _emberHtmlbarsKeywordsClosureComponent) {
+enifed('ember-htmlbars/hooks/component', ['exports', 'ember-metal/features', 'ember-metal/debug', 'ember-htmlbars/node-managers/component-node-manager', 'ember-views/system/build-component-template', 'ember-htmlbars/utils/lookup-component', 'ember-metal/assign', 'ember-metal/empty_object', 'ember-metal/cache', 'ember-htmlbars/system/lookup-helper', 'ember-htmlbars/utils/extract-positional-params', 'ember-htmlbars/keywords/closure-component'], function (exports, _emberMetalFeatures, _emberMetalDebug, _emberHtmlbarsNodeManagersComponentNodeManager, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsUtilsLookupComponent, _emberMetalAssign, _emberMetalEmpty_object, _emberMetalCache, _emberHtmlbarsSystemLookupHelper, _emberHtmlbarsUtilsExtractPositionalParams, _emberHtmlbarsKeywordsClosureComponent) {
'use strict';
exports.default = componentHook;
var IS_ANGLE_CACHE = new _emberMetalCache.default(1000, function (key) {
@@ -7816,10 +7816,13 @@
}
}
// Determine if this is an initial render or a re-render.
if (state.manager) {
+ var templateMeta = state.manager.block.template.meta;
+ env.meta.moduleName = templateMeta && templateMeta.moduleName || env.meta && env.meta.moduleName;
+ _emberHtmlbarsUtilsExtractPositionalParams.default(renderNode, state.manager.component.constructor, params, attrs, false);
state.manager.rerender(env, attrs, visitor);
return;
}
var isAngleBracket = false;
@@ -9691,11 +9694,11 @@
@submodule ember-templates
*/
'use strict';
- _emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.6.0-beta.2';
+ _emberHtmlbarsTemplatesTopLevelView.default.meta.revision = 'Ember@2.6.0-beta.3';
/**
The `{{outlet}}` helper lets you specify where a child route will render in
your template. An important use of the `{{outlet}}` helper is in your
application's `application.hbs` file:
@@ -12002,38 +12005,42 @@
exports.default = extractPositionalParams;
exports.processPositionalParams = processPositionalParams;
function extractPositionalParams(renderNode, component, params, attrs) {
+ var raiseAssertions = arguments.length <= 4 || arguments[4] === undefined ? true : arguments[4];
+
var positionalParams = component.positionalParams;
if (positionalParams) {
- processPositionalParams(renderNode, positionalParams, params, attrs);
+ processPositionalParams(renderNode, positionalParams, params, attrs, raiseAssertions);
}
}
function processPositionalParams(renderNode, positionalParams, params, attrs) {
+ var raiseAssertions = arguments.length <= 4 || arguments[4] === undefined ? true : arguments[4];
+
var isRest = typeof positionalParams === 'string';
if (isRest) {
- processRestPositionalParameters(renderNode, positionalParams, params, attrs);
+ processRestPositionalParameters(renderNode, positionalParams, params, attrs, raiseAssertions);
} else {
- processNamedPositionalParameters(renderNode, positionalParams, params, attrs);
+ processNamedPositionalParameters(renderNode, positionalParams, params, attrs, raiseAssertions);
}
}
- function processNamedPositionalParameters(renderNode, positionalParams, params, attrs) {
+ function processNamedPositionalParameters(renderNode, positionalParams, params, attrs, raiseAssertions) {
var limit = Math.min(params.length, positionalParams.length);
for (var i = 0; i < limit; i++) {
var param = params[i];
attrs[positionalParams[i]] = param;
}
}
- function processRestPositionalParameters(renderNode, positionalParamsName, params, attrs) {
+ function processRestPositionalParameters(renderNode, positionalParamsName, params, attrs, raiseAssertions) {
var nameInAttrs = (positionalParamsName in attrs);
// when no params are used, do not override the specified `attrs.stringParamName` value
if (params.length === 0 && nameInAttrs) {
return;
@@ -13744,11 +13751,11 @@
will have [prototype Extensions](http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/) enabled._
The alternative syntax, with prototype extensions, might look like:
```js
- fullName() {
+ fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
```
@class computed
@@ -14524,11 +14531,11 @@
cross-platform libraries such as jQuery. For more details, see
[Ember-Runtime](http://emberjs.com/api/modules/ember-runtime.html).
@class Ember
@static
- @version 2.6.0-beta.2
+ @version 2.6.0-beta.3
@public
*/
if ('undefined' === typeof Ember) {
// Create core object. Make it act like an instance of Ember.Namespace so that
@@ -14566,15 +14573,15 @@
/**
The semantic version.
@property VERSION
@type String
- @default '2.6.0-beta.2'
+ @default '2.6.0-beta.3'
@static
@public
*/
- Ember.VERSION = '2.6.0-beta.2';
+ Ember.VERSION = '2.6.0-beta.3';
/**
The hash of environment variables used to control various configuration
settings. To specify your own or override default settings, add the
desired properties to a global hash named `EmberENV` (or `ENV` for
@@ -22686,10 +22693,29 @@
can cancel routing by setting the `cancelRouterSetup` property on itself
to `false`.
Calling setURL or replaceURL will not trigger onUpdateURL callbacks.
+ ## Custom implementation
+
+ Ember scans `app/locations/*` for extending the Location API.
+
+ Example:
+
+ ```javascript
+ import Ember from 'ember';
+
+ export default Ember.HistoryLocation.extend({
+ implementation: 'history-url-logging',
+
+ pushState: function (path) {
+ console.log(path);
+ this._super.apply(this, arguments);
+ }
+ });
+ ```
+
@class Location
@namespace Ember
@static
@private
*/
@@ -28243,11 +28269,11 @@
return true;
}
});
// use the singleton controller
-enifed('ember-routing-views/components/link-to', ['exports', 'ember-metal/features', 'ember-metal/logger', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/computed', 'ember-metal/computed_macros', 'ember-views/system/utils', 'ember-views/components/component', 'ember-runtime/inject', 'ember-runtime/system/service', 'ember-runtime/mixins/controller', 'ember-htmlbars/templates/link-to', 'require'], function (exports, _emberMetalFeatures, _emberMetalLogger, _emberMetalDebug, _emberMetalProperty_get, _emberMetalComputed, _emberMetalComputed_macros, _emberViewsSystemUtils, _emberViewsComponentsComponent, _emberRuntimeInject, _emberRuntimeSystemService, _emberRuntimeMixinsController, _emberHtmlbarsTemplatesLinkTo, _require) {
+enifed('ember-routing-views/components/link-to', ['exports', 'ember-metal/features', 'ember-metal/logger', 'ember-metal/debug', 'ember-metal/property_get', 'ember-metal/computed', 'ember-metal/computed_macros', 'ember-views/system/utils', 'ember-views/components/component', 'ember-runtime/inject', 'ember-runtime/system/service', 'ember-runtime/mixins/controller', 'ember-htmlbars/node-managers/component-node-manager', 'ember-htmlbars/templates/link-to', 'require'], function (exports, _emberMetalFeatures, _emberMetalLogger, _emberMetalDebug, _emberMetalProperty_get, _emberMetalComputed, _emberMetalComputed_macros, _emberViewsSystemUtils, _emberViewsComponentsComponent, _emberRuntimeInject, _emberRuntimeSystemService, _emberRuntimeMixinsController, _emberHtmlbarsNodeManagersComponentNodeManager, _emberHtmlbarsTemplatesLinkTo, _require) {
/**
@module ember
@submodule ember-templates
*/
@@ -28890,11 +28916,11 @@
var params = _emberMetalProperty_get.get(this, 'params').slice();
var lastParam = params[params.length - 1];
if (lastParam && lastParam.isQueryParams) {
params.pop();
}
- var onlyQueryParamsSupplied = params.length === 0;
+ var onlyQueryParamsSupplied = this[_emberHtmlbarsNodeManagersComponentNodeManager.HAS_BLOCK] ? params.length === 0 : params.length === 1;
if (onlyQueryParamsSupplied) {
return _emberMetalProperty_get.get(this, '_routing.currentRouteName');
}
return _emberMetalProperty_get.get(this, 'targetRouteName');
}),
@@ -29000,11 +29026,14 @@
if (disabledWhen !== undefined) {
this.set('disabled', disabledWhen);
}
// Process the positional arguments, in order.
- // 1. Inline link title was shifted off by AST.
+ // 1. Inline link title comes first, if present.
+ if (!this[_emberHtmlbarsNodeManagersComponentNodeManager.HAS_BLOCK]) {
+ this.set('linkTitle', params.shift());
+ }
// 2. `targetRouteName` is now always at index 0.
this.set('targetRouteName', params[0]);
// 3. The last argument (if still remaining) is the `queryParams` object.
@@ -37328,45 +37357,22 @@
@method transform
@param {AST} ast The AST to be transformed.
*/
TransformClosureComponentAttrsIntoMut.prototype.transform = function TransformClosureComponentAttrsIntoMut_transform(ast) {
var b = this.syntax.builders;
- var walker = new this.syntax.Walker();
- walker.visit(ast, function (node) {
- if (validate(node)) {
- processExpression(b, node);
+ this.syntax.traverse(ast, {
+ SubExpression: function (node) {
+ if (isComponentClosure(node)) {
+ mutParameters(b, node);
+ }
}
});
return ast;
};
- function processExpression(builder, node) {
- processSubExpressionsInNode(builder, node);
-
- if (isComponentClosure(node)) {
- mutParameters(builder, node);
- }
- }
-
- function processSubExpressionsInNode(builder, node) {
- for (var i = 0; i < node.params.length; i++) {
- if (node.params[i].type === 'SubExpression') {
- processExpression(builder, node.params[i]);
- }
- }
-
- each(node.hash.pairs, function (pair) {
- var value = pair.value;
-
- if (value.type === 'SubExpression') {
- processExpression(builder, value);
- }
- });
- }
-
function isComponentClosure(node) {
return node.type === 'SubExpression' && node.path.original === 'component';
}
function mutParameters(builder, node) {
@@ -37383,14 +37389,10 @@
pair.value = builder.sexpr(builder.path('@mut'), [pair.value]);
}
});
}
- function validate(node) {
- return node.type === 'BlockStatement' || node.type === 'MustacheStatement';
- }
-
function each(list, callback) {
for (var i = 0, l = list.length; i < l; i++) {
callback(list[i]);
}
}
@@ -38138,10 +38140,10 @@
options.plugins = plugins;
options.buildMeta = function buildMeta(program) {
return {
fragmentReason: fragmentReason(program),
- revision: 'Ember@2.6.0-beta.2',
+ revision: 'Ember@2.6.0-beta.3',
loc: program.loc,
moduleName: options.moduleName
};
};