dist/ember.js in ember-source-1.13.1.1 vs dist/ember.js in ember-source-1.13.2
- old
+ new
@@ -3,11 +3,11 @@
* @copyright Copyright 2011-2015 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 1.13.1
+ * @version 1.13.2
*/
(function() {
var enifed, requireModule, eriuqer, requirejs, Ember;
var mainContext = this;
@@ -7158,17 +7158,12 @@
When this `{{#each}}` re-renders, Ember will match up the previously rendered
items (and reorder the generated DOM elements) based on each item's `id`
property.
- There are a few special values for `key`:
+ By default the item's own reference is used.
- * `@index` - The index of the item in the array.
- * `@item` - The item in the array itself. This can only be used for arrays of strings
- or numbers.
- * `@guid` - Generate a unique identifier for each object (uses `Ember.guidFor`).
-
### {{else}} condition
`{{#each}}` can have a matching `{{else}}`. The contents of this block will render
if the collection is empty.
@@ -8589,11 +8584,11 @@
return true;
}
});
enifed("ember-htmlbars/keywords/real_outlet", ["exports", "ember-metal/property_get", "ember-htmlbars/node-managers/view-node-manager", "ember-htmlbars/templates/top-level-view"], function (exports, _emberMetalProperty_get, _emberHtmlbarsNodeManagersViewNodeManager, _emberHtmlbarsTemplatesTopLevelView) {
- _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.1";
+ _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.2";
exports["default"] = {
willRender: function (renderNode, env) {
env.view.ownerView._outlets.push(renderNode);
},
@@ -11111,36 +11106,55 @@
})());
});
enifed("ember-htmlbars/utils/decode-each-key", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils) {
exports["default"] = decodeEachKey;
+ function identity(item) {
+ var key = undefined;
+ var type = typeof item;
+
+ if (type === "string" || type === "number") {
+ key = item;
+ } else {
+ key = (0, _emberMetalUtils.guidFor)(item);
+ }
+
+ return key;
+ }
+
function decodeEachKey(item, keyPath, index) {
- var key;
+ var key, deprecatedSpecialKey;
switch (keyPath) {
case "@index":
key = index;
break;
case "@guid":
+ deprecatedSpecialKey = "@guid";
key = (0, _emberMetalUtils.guidFor)(item);
break;
case "@item":
+ deprecatedSpecialKey = "@item";
key = item;
break;
+ case "@identity":
+ key = identity(item);
+ break;
default:
if (keyPath) {
key = (0, _emberMetalProperty_get.get)(item, keyPath);
} else {
- _emberMetalCore["default"].warn("Using `{{each}}` without specifying a key can lead to unusual behavior. Please specify a `key` that identifies a unique value on each item being iterated. E.g. `{{each model key=\"@guid\" as |item|}}`.");
- key = index;
+ key = identity(item);
}
}
if (typeof key === "number") {
key = String(key);
}
+ _emberMetalCore["default"].deprecate("Using '" + deprecatedSpecialKey + "' with the {{each}} helper, is deprecated. Switch to '@identity' or remove 'key=' from your template.", !deprecatedSpecialKey);
+
return key;
}
});
enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-htmlbars/system/lookup-helper'], function (exports, _emberHtmlbarsSystemLookupHelper) {
exports["default"] = isComponent;
@@ -14364,11 +14378,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 1.13.1
+ @version 1.13.2
@public
*/
if ('undefined' === typeof Ember) {
// Create core object. Make it act like an instance of Ember.Namespace so that
@@ -14396,15 +14410,15 @@
/**
The semantic version.
@property VERSION
@type String
- @default '1.13.1'
+ @default '1.13.2'
@static
@public
*/
- Ember.VERSION = '1.13.1';
+ Ember.VERSION = '1.13.2';
/**
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
@@ -23250,11 +23264,11 @@
/**
@module ember
@submodule ember-routing-views
*/
enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-views/system/utils", "ember-views/views/component", "ember-runtime/inject", "ember-runtime/mixins/controller", "ember-htmlbars/templates/link-to"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberViewsSystemUtils, _emberViewsViewsComponent, _emberRuntimeInject, _emberRuntimeMixinsController, _emberHtmlbarsTemplatesLinkTo) {
- _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = "Ember@1.13.1";
+ _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = "Ember@1.13.2";
var linkComponentClassNameBindings = ["active", "loading", "disabled"];
if (_emberMetalCore["default"].FEATURES.isEnabled("ember-routing-transitioning-classes")) {
linkComponentClassNameBindings = ["active", "loading", "disabled", "transitioningIn", "transitioningOut"];
}
@@ -23760,11 +23774,11 @@
@submodule ember-routing-views
*/
// FEATURES, Logger, assert
enifed("ember-routing-views/views/outlet", ["exports", "ember-views/views/view", "ember-htmlbars/templates/top-level-view"], function (exports, _emberViewsViewsView, _emberHtmlbarsTemplatesTopLevelView) {
- _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.1";
+ _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.2";
var CoreOutletView = _emberViewsViewsView["default"].extend({
defaultTemplate: _emberHtmlbarsTemplatesTopLevelView["default"],
init: function () {
@@ -40444,11 +40458,11 @@
}
options.plugins = plugins;
options.buildMeta = function buildMeta(program) {
return {
- revision: "Ember@1.13.1",
+ revision: "Ember@1.13.2",
loc: program.loc,
moduleName: options.moduleName
};
};
@@ -45612,10 +45626,10 @@
exports["default"] = Component;
});
// Ember.assert, Ember.Handlebars
enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "ember-runtime/mixins/mutable_array", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/enumerable_utils", "ember-metal/mixin", "ember-metal/events", "ember-htmlbars/templates/container-view"], function (exports, _emberMetalCore, _emberRuntimeMixinsMutable_array, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalEvents, _emberHtmlbarsTemplatesContainerView) {
- _emberHtmlbarsTemplatesContainerView["default"].meta.revision = "Ember@1.13.1";
+ _emberHtmlbarsTemplatesContainerView["default"].meta.revision = "Ember@1.13.2";
/**
@module ember
@submodule ember-views
*/
\ No newline at end of file