dist/ember.js in ember-source-1.13.6 vs dist/ember.js in ember-source-1.13.7

- 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.6 + * @version 1.13.7 */ (function() { var enifed, requireModule, eriuqer, requirejs, Ember; var mainContext = this; @@ -4829,10 +4829,11 @@ makeToString: null, // required resolveOther: null, // required _logLookup: null // required }); + exports.Resolver = Resolver; /** The DefaultResolver defines the default lookup rules to resolve container lookups before consulting the container for registered items: @@ -4901,11 +4902,10 @@ @namespace Ember @extends Ember.Object @public */ - exports.Resolver = Resolver; exports["default"] = _emberRuntimeSystemObject["default"].extend({ /** This will be set to the Application instance when it is created. @property namespace @@ -6256,13 +6256,85 @@ } }); }); enifed("ember-htmlbars", ["exports", "ember-metal/core", "ember-template-compiler", "ember-htmlbars/system/make-view-helper", "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/-bind-attr-class", "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/system/dom-helper", "ember-htmlbars/helper", "ember-htmlbars/system/bootstrap", "ember-htmlbars/compat"], function (exports, _emberMetalCore, _emberTemplateCompiler, _emberHtmlbarsSystemMakeViewHelper, _emberHtmlbarsSystemMake_bound_helper, _emberHtmlbarsHelpers, _emberHtmlbarsHelpersIf_unless, _emberHtmlbarsHelpersWith, _emberHtmlbarsHelpersLoc, _emberHtmlbarsHelpersLog, _emberHtmlbarsHelpersEach, _emberHtmlbarsHelpersBindAttrClass, _emberHtmlbarsHelpersNormalizeClass, _emberHtmlbarsHelpersConcat, _emberHtmlbarsHelpersJoinClasses, _emberHtmlbarsHelpersLegacyEachWithController, _emberHtmlbarsHelpersLegacyEachWithKeyword, _emberHtmlbarsHelpersHtmlSafe, _emberHtmlbarsSystemDomHelper, _emberHtmlbarsHelper, _emberHtmlbarsSystemBootstrap, _emberHtmlbarsCompat) { /** + Ember templates are executed by [HTMLBars](https://github.com/tildeio/htmlbars), + an HTML-friendly version of [Handlebars](http://handlebarsjs.com/). Any valid Handlebars syntax is valid in an Ember template. - &nbsp; + ### Showing a property + Templates manage the flow of an application's UI, and display state (through + the DOM) to a user. For example, given a component with the property "name", + that component's template can use the name in several ways: + + ```javascript + // app/components/person.js + export default Ember.Component.extend({ + name: 'Jill' + }); + ``` + + ```handlebars + {{! app/components/person.hbs }} + {{name}} + <div>{{name}}</div> + <span data-name={{name}}></span> + ``` + + Any time the "name" property on the component changes, the DOM will be + updated. + + Properties can be chained as well: + + ```handlebars + {{aUserModel.name}} + <div>{{listOfUsers.firstObject.name}}</div> + ``` + + ### Using Ember helpers + + When content is passed in mustaches `{{}}`, Ember will first try to find a helper + or component with that name. For example, the `if` helper: + + ```handlebars + {{if name "I have a name" "I have no name"}} + <span data-has-name={{if name true}}></span> + ``` + + The returned value is placed where the `{{}}` is called. The above style is + called "inline". A second style of helper usage is called "block". For example: + + ```handlebars + {{#if name}} + I have a name + {{else}} + I have no name + {{/if}} + ``` + + The block form of helpers allows you to control how the UI is created based + on the values of properties. + + A third form of helper is called "nested". For example here the concat + helper will add " Doe" to a displayed name if the person has no last name: + + ```handlebars + <span data-name={{concat firstName ( + if lastName (concat " " lastName) "Doe" + )}}></span> + ``` + + Ember's built-in helpers are described under the [Ember.Templates.helpers](/api/classes/Ember.Templates.helpers.html) + namespace. Documentation on creating custom helpers can be found under + [Ember.Helper](/api/classes/Ember.Helper.html). + + ### Invoking a Component + + Ember components represent state to the UI of an application. Further + reading on components can be found under [Ember.Component](/api/classes/Ember.Component.html). + @module ember @submodule ember-templates @main ember-templates @public */ @@ -6992,10 +7064,15 @@ } } }); enifed('ember-htmlbars/helpers/-concat', ['exports'], function (exports) { /** + @module ember + @submodule ember-templates + */ + + /** Concatenates input params together. Example: ```handlebars @@ -7004,11 +7081,11 @@ {{! would pass name="<first name value> <last name value>" to the component}} ``` @public @method concat - @for Ember.HTMLBars + @for Ember.Templates.helpers */ 'use strict'; exports["default"] = concat; @@ -7153,14 +7230,14 @@ function normalizeClass(params, hash) { var propName = params[0]; var value = params[1]; var activeClass = hash.activeClass; + var inactiveClass = hash.inactiveClass; // When using the colon syntax, evaluate the truthiness or falsiness // of the value to determine which className to return - var inactiveClass = hash.inactiveClass; if (activeClass || inactiveClass) { if (!!value) { return activeClass; } else { return inactiveClass; @@ -8874,20 +8951,59 @@ } return true; } }); -enifed("ember-htmlbars/keywords/mut", ["exports", "ember-metal/platform/create", "ember-metal/merge", "ember-metal/utils", "ember-metal/streams/proxy-stream", "ember-metal/streams/utils", "ember-metal/streams/stream", "ember-views/compat/attrs-proxy", "ember-routing-htmlbars/keywords/closure-action"], function (exports, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalUtils, _emberMetalStreamsProxyStream, _emberMetalStreamsUtils, _emberMetalStreamsStream, _emberViewsCompatAttrsProxy, _emberRoutingHtmlbarsKeywordsClosureAction) { +enifed("ember-htmlbars/keywords/mut", ["exports", "ember-metal/core", "ember-metal/platform/create", "ember-metal/merge", "ember-metal/utils", "ember-metal/streams/proxy-stream", "ember-metal/streams/utils", "ember-metal/streams/stream", "ember-views/compat/attrs-proxy", "ember-routing-htmlbars/keywords/closure-action"], function (exports, _emberMetalCore, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalUtils, _emberMetalStreamsProxyStream, _emberMetalStreamsUtils, _emberMetalStreamsStream, _emberViewsCompatAttrsProxy, _emberRoutingHtmlbarsKeywordsClosureAction) { "use strict"; var _merge; exports["default"] = mut; exports.privateMut = privateMut; + + /** + @module ember + @submodule ember-templates + */ + var MUTABLE_REFERENCE = _emberMetalUtils.symbol("MUTABLE_REFERENCE"); exports.MUTABLE_REFERENCE = MUTABLE_REFERENCE; + /** + The `mut` helper lets you __clearly specify__ that a child `Component` can update the + (mutable) value passed to it, which will __change the value of the parent compnent__. + + This is very helpful for passing mutable values to a `Component` of any size, but + critical to understanding the logic of a large/complex `Component`. + + To specify that a parameter is mutable, when invoking the child `Component`: + + ```handlebars + <my-child child-click-count={{mut totalClicks}} /> + ``` + + The child `Component` can then modify the parent's value as needed: + + ```javascript + // my-child.js + export default Component.extend({ + click: function() { + this.attrs.childClickCount.update(this.attrs.childClickCount.value + 1); + } + }); + ``` + + 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 + additional information on using `{{mut}}`. + + @public + @method mut + @param {Object} [attr] the "two-way" attribute that can be modified. + @for Ember.Templates.helpers + @public + */ function mut(morph, env, scope, originalParams, hash, template, inverse) { // If `morph` is `null` the keyword is being invoked as a subexpression. if (morph === null) { var valueStream = originalParams[0]; @@ -8920,11 +9036,11 @@ stream.notify(); }; })(); } } else { - Ember.assert("You can only pass a path to mut", _emberMetalStreamsUtils.isStream(stream)); + _emberMetalCore["default"].assert("You can only pass a path to mut", _emberMetalStreamsUtils.isStream(stream)); } if (stream[MUTABLE_REFERENCE]) { return stream; } @@ -8965,15 +9081,59 @@ }, _merge)); }); enifed('ember-htmlbars/keywords/outlet', ['exports', 'htmlbars-runtime/hooks'], function (exports, _htmlbarsRuntimeHooks) { /** @module ember - @submodule ember-htmlbars + @submodule ember-templates */ 'use strict'; + /** + The `{{outlet}}` helper lets you specify where a child routes will render in + your template. An important use of the `{{outlet}}` helper is in your + application's `application.hbs` file: + ```handlebars + {{! app/templates/application.hbs }} + <!-- header content goes here, and will always display --> + {{my-header}} + <div class="my-dynamic-content"> + <!-- this content will change based on the current route, which depends on the current URL --> + {{outlet}} + </div> + <!-- footer content goes here, and will always display --> + {{my-footer}} + ``` + See [templates guide](http://emberjs.com/guides/templates/the-application-template/) for + additional information on using `{{outlet}}` in `application.hbs`. + You may also specify a name for the `{{outlet}}`, which is useful when using more than one + `{{outlet}}` in a template: + ```handlebars + {{outlet "menu"}} + {{outlet "sidebar"}} + {{outlet "main"}} + ``` + Your routes can then render into a specific one of these `outlet`s by specifying the `outlet` + attribute in your `renderTemplate` function: + ```javascript + // app/routes/menu.js + export default Ember.Route.extend({ + renderTemplate() { + this.render({ outlet: 'menu' }); + } + }); + ``` + See the [routing guide](http://emberjs.com/guides/routing/rendering-a-template/) for more + information on how your `route` interacts with the `{{outlet}}` helper. + Note: Your content __will not render__ if there isn't an `{{outlet}}` for it. + @public + @method outlet + @param {String} [name] + @for Ember.Templates.helpers + @public + */ + /* This level of delegation handles backward-compatibility with the `view` parameter to {{outlet}}. When we drop support for the `view` parameter in 2.0, this keyword should just get replaced directly with @real_outlet. @@ -9042,11 +9202,11 @@ @submodule ember-htmlbars */ "use strict"; - _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.6'; + _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.7'; exports["default"] = { willRender: function (renderNode, env) { env.view.ownerView._outlets.push(renderNode); }, @@ -9182,13 +9342,41 @@ } }); enifed("ember-htmlbars/keywords/unbound", ["exports", "ember-metal/merge", "ember-metal/platform/create", "ember-metal/streams/stream", "ember-metal/streams/utils"], function (exports, _emberMetalMerge, _emberMetalPlatformCreate, _emberMetalStreamsStream, _emberMetalStreamsUtils) { /** @module ember - @submodule ember-htmlbars + @submodule ember-templates */ + /** + The `{{unbound}}` helper disconnects the one-way binding of a property, + essentially freezing its value at the moment of rendering. For example, + in this example the display of the variable `name` will not change even + if it is set with a new value: + + ```handlebars + {{unbound name}} + ``` + + Like any helper, the `unbound` helper can accept a nested helper expression. + This allows for custom helpers to be rendered unbound: + + ```handlebars + {{unbound (some-custom-helper)}} + {{unbound (capitalize name)}} + {{! You can use any helper, including unbound, in a nested expression }} + {{capitalize (unbound name)}} + ``` + + The `unbound` helper only accepts a single argument, and it return an + unbound value. + + @method unbound + @for Ember.Templates.helpers + @public + */ + "use strict"; exports["default"] = unbound; function unbound(morph, env, scope, originalParams, hash, template, inverse) { @@ -9210,10 +9398,11 @@ if (params.length === 0) { env.hooks.range(morph, env, scope, null, valueStream); } else if (template === null) { env.hooks.inline(morph, env, scope, valueStream.key, params, hash); } else { + // deprecated via AST transform env.hooks.block(morph, env, scope, valueStream.key, params, hash, template, inverse); } return true; } @@ -9804,31 +9993,28 @@ function createComponent(_component, isAngleBracket, _props, renderNode, env) { var attrs = arguments.length <= 5 || arguments[5] === undefined ? {} : arguments[5]; var proto = arguments.length <= 6 || arguments[6] === undefined ? _component.proto() : arguments[6]; return (function () { var props = _emberMetalMerge.assign({}, _props); - var attrsSnapshot = undefined; if (!isAngleBracket) { var hasSuppliedController = ('controller' in attrs); // 2.0TODO remove _emberMetalCore["default"].deprecate("controller= is deprecated", !hasSuppliedController); - attrsSnapshot = takeSnapshot(attrs); - props.attrs = attrsSnapshot; + var snapshot = takeSnapshot(attrs); + props.attrs = snapshot; - mergeBindings(props, shadowedAttrs(proto, attrsSnapshot)); + mergeBindings(props, shadowedAttrs(proto, snapshot)); } else { props._isAngleBracket = true; } props.renderer = props.parentView ? props.parentView.renderer : env.container.lookup('renderer:-dom'); props._viewRegistry = props.parentView ? props.parentView._viewRegistry : env.container.lookup('-view-registry:main'); var component = _component.create(props); - env.renderer.componentInitAttrs(component, attrsSnapshot); - // for the fallback case component.container = component.container || env.container; if (props.parentView) { props.parentView.appendChild(component); @@ -9997,12 +10183,10 @@ if (component) { newEnv = env.childWithView(component); } if (component) { - var snapshot = takeSnapshot(attrs); - env.renderer.setAttrs(this.component, snapshot); env.renderer.willRender(component); env.renderedViews.push(component.elementId); } if (this.block) { @@ -10032,11 +10216,11 @@ // Notify component that it has become dirty and is about to change. env.renderer.willUpdate(component, snapshot); if (component._renderNode.shouldReceiveAttrs) { - env.renderer.updateAttrs(component, snapshot); + env.renderer.componentUpdateAttrs(component, snapshot); _emberMetalSet_properties["default"](component, mergeBindings({}, shadowedAttrs(component, snapshot))); component._renderNode.shouldReceiveAttrs = false; } env.renderer.willRender(component); @@ -10091,10 +10275,11 @@ delete props._context; } component = component.create(props); } else { + env.renderer.componentUpdateAttrs(component, snapshot); mergeBindings(props, shadowedAttrs(component, snapshot)); _emberMetalSet_properties["default"](component, props); } if (options.parentView) { @@ -13541,11 +13726,11 @@ exports.removeChainWatcher = removeChainWatcher; exports.ChainNode = ChainNode; }); // warn, assert, etc; -enifed("ember-metal/computed", ["exports", "ember-metal/property_set", "ember-metal/utils", "ember-metal/expand_properties", "ember-metal/error", "ember-metal/properties", "ember-metal/property_events", "ember-metal/dependent_keys"], function (exports, _emberMetalProperty_set, _emberMetalUtils, _emberMetalExpand_properties, _emberMetalError, _emberMetalProperties, _emberMetalProperty_events, _emberMetalDependent_keys) { +enifed("ember-metal/computed", ["exports", "ember-metal/core", "ember-metal/property_set", "ember-metal/utils", "ember-metal/expand_properties", "ember-metal/error", "ember-metal/properties", "ember-metal/property_events", "ember-metal/dependent_keys"], function (exports, _emberMetalCore, _emberMetalProperty_set, _emberMetalUtils, _emberMetalExpand_properties, _emberMetalError, _emberMetalProperties, _emberMetalProperty_events, _emberMetalDependent_keys) { "use strict"; /** @module ember @submodule ember-metal @@ -13644,11 +13829,11 @@ this.isDescriptor = true; if (typeof config === "function") { config.__ember_arity = config.length; this._getter = config; if (config.__ember_arity > 1) { - Ember.deprecate("Using the same function as getter and setter is deprecated.", false, { + _emberMetalCore["default"].deprecate("Using the same function as getter and setter is deprecated.", false, { url: "http://emberjs.com/deprecations/v1.x/#toc_deprecate-using-the-same-function-as-getter-and-setter-in-computed-properties" }); this._setter = config; } } else { @@ -13661,14 +13846,14 @@ this._dependentKeys = undefined; this._suspended = undefined; this._meta = undefined; - Ember.deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty('cacheable')); + _emberMetalCore["default"].deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty('cacheable')); this._cacheable = opts && opts.cacheable !== undefined ? opts.cacheable : true; // TODO: Set always to `true` once this deprecation is gone. this._dependentKeys = opts && opts.dependentKeys; - Ember.deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty('readOnly')); + _emberMetalCore["default"].deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty('readOnly')); this._readOnly = opts && (opts.readOnly !== undefined || !!opts.readOnly) || false; // TODO: Set always to `false` once this deprecation is gone. } ComputedProperty.prototype = new _emberMetalProperties.Descriptor(); @@ -13690,11 +13875,11 @@ @chainable @deprecated All computed properties are cacheble by default. Use `volatile()` instead to opt-out to caching. @public */ ComputedPropertyPrototype.cacheable = function (aFlag) { - Ember.deprecate('ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.'); + _emberMetalCore["default"].deprecate('ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.'); this._cacheable = aFlag !== false; return this; }; /** @@ -13739,13 +13924,13 @@ @return {Ember.ComputedProperty} this @chainable @public */ ComputedPropertyPrototype.readOnly = function (readOnly) { - Ember.deprecate('Passing arguments to ComputedProperty.readOnly() is deprecated.', arguments.length === 0); + _emberMetalCore["default"].deprecate('Passing arguments to ComputedProperty.readOnly() is deprecated.', arguments.length === 0); this._readOnly = readOnly === undefined || !!readOnly; // Force to true once this deprecation is gone - Ember.assert("Computed properties that define a setter using the new syntax cannot be read-only", !(this._readOnly && this._setter && this._setter !== this._getter)); + _emberMetalCore["default"].assert("Computed properties that define a setter using the new syntax cannot be read-only", !(this._readOnly && this._setter && this._setter !== this._getter)); return this; }; /** Sets the dependent keys on this computed property. Pass any number of @@ -13777,10 +13962,12 @@ */ ComputedPropertyPrototype.property = function () { var args; var addArg = function (property) { + _emberMetalCore["default"].deprecate("Depending on arrays using a dependent key ending with `@each` is deprecated. " + ("Please refactor from `Ember.computed('" + property + "', function() {});` to `Ember.computed('" + property.slice(0, -6) + ".[]', function() {})`."), property.slice(-5) !== '@each', { id: 'ember-metal.@each-dependent-key-leaf', until: '2.0.0' }); + args.push(property); }; args = []; for (var i = 0, l = arguments.length; i < l; i++) { @@ -14638,10 +14825,11 @@ } } return value; }); + exports.and = and; /** A computed property which performs a logical `or` on the original values for the provided dependent properties. Example @@ -14665,20 +14853,20 @@ @param {String} dependentKey* @return {Ember.ComputedProperty} computed property which performs a logical `or` on the values of all the original values for properties. @public */ - exports.and = and; var or = generateComputedWithProperties(function (properties) { for (var key in properties) { if (properties.hasOwnProperty(key) && properties[key]) { return properties[key]; } } return false; }); + exports.or = or; /** A computed property that returns the first truthy value from a list of dependent properties. Example @@ -14701,21 +14889,21 @@ @return {Ember.ComputedProperty} computed property which returns the first truthy value of given list of properties. @deprecated Use `Ember.computed.or` instead. @public */ - exports.or = or; var any = generateComputedWithProperties(function (properties) { _emberMetalCore["default"].deprecate('Usage of Ember.computed.any is deprecated, use `Ember.computed.or` instead.'); for (var key in properties) { if (properties.hasOwnProperty(key) && properties[key]) { return properties[key]; } } return null; }); + exports.any = any; /** A computed property that returns the array of values for the provided dependent properties. Example @@ -14738,11 +14926,10 @@ @param {String} dependentKey* @return {Ember.ComputedProperty} computed property which maps values of all passed in properties to an array. @public */ - exports.any = any; var collect = generateComputedWithProperties(function (properties) { var res = _emberMetalCore["default"].A(); for (var key in properties) { if (properties.hasOwnProperty(key)) { if (_emberMetalIs_none["default"](properties[key])) { @@ -14753,10 +14940,11 @@ } } return res; }); + exports.collect = collect; /** Creates a new property that is an alias for another property on an object. Calls to `get` or `set` this property behave as though they were called on the original property. @@ -14814,11 +15002,10 @@ @param {String} dependentKey @return {Ember.ComputedProperty} computed property which creates a one way computed property to the original value for property. @public */ - exports.collect = collect; function oneWay(dependentKey) { return _emberMetalAlias["default"](dependentKey).oneWay(); } @@ -14967,11 +15154,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.6 + @version 1.13.7 @public */ 'use strict'; @@ -15001,15 +15188,15 @@ /** The semantic version. @property VERSION @type String - @default '1.13.6' + @default '1.13.7' @static @public */ - Ember.VERSION = '1.13.6'; + Ember.VERSION = '1.13.7'; /** 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 @@ -15158,11 +15345,10 @@ /** An empty function useful for some operations. Always returns `this`. @method K - @private @return {Object} @public */ function K() { return this; @@ -16225,11 +16411,12 @@ Ember.expandProperties('foo.{bar,baz}.@each', echo) //=> 'foo.bar.@each', 'foo.baz.@each' Ember.expandProperties('{foo,bar}.{spam,eggs}', echo) //=> 'foo.spam', 'foo.eggs', 'bar.spam', 'bar.eggs' Ember.expandProperties('{foo}.bar.{baz}') //=> 'foo.bar.baz' ``` - @method + @method expandProperties + @for Ember @private @param {String} pattern The property pattern to expand. @param {Function} callback The callback to invoke. It is invoked once per expansion, and is passed the expansion. */ @@ -17587,11 +17774,11 @@ @method merge @for Ember @param {Object} original The object to merge into @param {Object} updates The object to copy properties from @return {Object} - @private + @public */ function merge(original, updates) { if (!updates || typeof updates !== 'object') { return original; @@ -18474,10 +18661,12 @@ var func = args.slice(-1)[0]; var paths; var addWatchedProperty = function (path) { + _emberMetalCore["default"].deprecate("Depending on arrays using a dependent key ending with `@each` is deprecated. " + ("Please refactor from `Ember.observer('" + path + "', function() {});` to `Ember.computed('" + path.slice(0, -6) + ".[]', function() {})`."), path.slice(-5) !== '@each', { id: 'ember-metal.@each-dependent-key-leaf', until: '2.0.0' }); + paths.push(path); }; var _paths = args.slice(0, -1); if (typeof func !== "function") { @@ -19650,11 +19839,11 @@ exports.overrideChains = overrideChains; exports.beginPropertyChanges = beginPropertyChanges; exports.endPropertyChanges = endPropertyChanges; exports.changeProperties = changeProperties; }); -enifed("ember-metal/property_get", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property", "ember-metal/utils", "ember-metal/is_none"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property, _emberMetalUtils, _emberMetalIs_none) { +enifed("ember-metal/property_get", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property", "ember-metal/is_none"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property, _emberMetalIs_none) { /** @module ember-metal */ "use strict"; @@ -19664,14 +19853,10 @@ exports._getPath = _getPath; exports.getWithDefault = getWithDefault; var FIRST_KEY = /^([^\.]+)/; - var INTERCEPT_GET = _emberMetalUtils.symbol("INTERCEPT_GET"); - exports.INTERCEPT_GET = INTERCEPT_GET; - var UNHANDLED_GET = _emberMetalUtils.symbol("UNHANDLED_GET"); - // .......................................................... // GET AND SET // // If we are on a platform that supports accessors we can use those. // Otherwise simulate accessors by looking up the property directly on the @@ -19700,11 +19885,10 @@ @param {Object} obj The object to retrieve from. @param {String} keyName The property key to retrieve @return {Object} the property value or `null`. @public */ - exports.UNHANDLED_GET = UNHANDLED_GET; function get(obj, keyName) { _emberMetalCore["default"].deprecate("Get must be called with two arguments; an object and a property key", arguments.length === 2); // Helpers that operate with 'this' within an #each if (keyName === '') { @@ -19723,17 +19907,10 @@ if (_emberMetalIs_none["default"](obj)) { _emberMetalCore["default"].deprecate('Calling Ember.get without a target object has been deprecated, please specify a target object.'); return _getPath(obj, keyName); } - if (obj && typeof obj[INTERCEPT_GET] === 'function') { - var result = obj[INTERCEPT_GET](obj, keyName); - if (result !== UNHANDLED_GET) { - return result; - } - } - var meta = obj['__ember_meta__']; var possibleDesc = obj[keyName]; var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; var ret; @@ -19843,18 +20020,15 @@ return value; } exports["default"] = get; }); -enifed("ember-metal/property_set", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_events", "ember-metal/properties", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property, _emberMetalUtils) { +enifed("ember-metal/property_set", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_events", "ember-metal/properties", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property) { "use strict"; exports.set = set; exports.trySet = trySet; - var INTERCEPT_SET = _emberMetalUtils.symbol("INTERCEPT_SET"); - exports.INTERCEPT_SET = INTERCEPT_SET; - var UNHANDLED_SET = _emberMetalUtils.symbol("UNHANDLED_SET"); /** Sets the value of a property on an object, respecting computed properties and notifying observers and other listeners of the change. If the property is not defined but the object implements the `setUnknownProperty` @@ -19866,11 +20040,10 @@ @param {String} keyName The property key to set @param {Object} value The value to set @return {Object} the passed value. @public */ - exports.UNHANDLED_SET = UNHANDLED_SET; function set(obj, keyName, value, tolerant) { if (typeof obj === 'string') { _emberMetalCore["default"].assert("Path '" + obj + "' must be global if no obj is given.", _emberMetalPath_cache.isGlobalPath(obj)); _emberMetalCore["default"].deprecate('Calling Ember.set with only a property key and a value has been deprecated, please also specify a target object.'); @@ -19884,20 +20057,10 @@ if (obj === _emberMetalCore["default"].lookup) { return setPath(obj, keyName, value, tolerant); } - // This path exists purely to implement backwards-compatible - // effects (specifically, setting a property on a view may - // invoke a mutator on `attrs`). - if (obj && typeof obj[INTERCEPT_SET] === 'function') { - var result = obj[INTERCEPT_SET](obj, keyName, value, tolerant); - if (result !== UNHANDLED_SET) { - return result; - } - } - var meta, possibleDesc, desc; if (obj) { meta = obj['__ember_meta__']; possibleDesc = obj[keyName]; desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; @@ -21882,10 +22045,11 @@ var NEXT_SUPER_PROPERTY = { name: '__nextSuper', descriptor: undefinedDescriptor }; + exports.NEXT_SUPER_PROPERTY = NEXT_SUPER_PROPERTY; /** Generates a new guid, optionally saving the guid to the object that you pass in. You will rarely need to use this method. Instead you should call `Ember.guidFor(obj)`, which return an existing guid if available. @@ -21899,11 +22063,10 @@ If no object is passed, just generate a new guid. @param {String} [prefix] Prefix to place in front of the guid. Useful when you want to separate the guid into separate namespaces. @return {String} the guid */ - exports.NEXT_SUPER_PROPERTY = NEXT_SUPER_PROPERTY; function generateGuid(obj, prefix) { if (!prefix) { prefix = GUID_PREFIX; } @@ -23368,13 +23531,13 @@ env.dom.setAttribute(node.element, 'data-ember-action', actionId); } }; var ActionHelper = {}; + exports.ActionHelper = ActionHelper; // registeredActions is re-exported for compatibility with older plugins // that were using this undocumented API. - exports.ActionHelper = ActionHelper; ActionHelper.registeredActions = _emberViewsSystemAction_manager["default"].registeredActions; ActionHelper.registerAction = function (_ref) { var actionId = _ref.actionId; var node = _ref.node; @@ -23458,17 +23621,17 @@ return true; } }); // assert -enifed("ember-routing-htmlbars/keywords/link-to", ["exports", "ember-metal/streams/utils", "ember-metal/core", "ember-metal/merge"], function (exports, _emberMetalStreamsUtils, _emberMetalCore, _emberMetalMerge) { +enifed('ember-routing-htmlbars/keywords/link-to', ['exports', 'ember-metal/streams/utils', 'ember-metal/core', 'ember-metal/merge'], function (exports, _emberMetalStreamsUtils, _emberMetalCore, _emberMetalMerge) { /** @module ember @submodule ember-routing-htmlbars */ - "use strict"; + 'use strict'; /** The `{{link-to}}` helper renders a link to the supplied `routeName` passing an optionally supplied model to the route as its `model` context of the route. The block @@ -23745,11 +23908,13 @@ link: function (state, params, hash) { _emberMetalCore["default"].assert("You must provide one or more parameters to the link-to helper.", params.length); }, render: function (morph, env, scope, params, hash, template, inverse, visitor) { - var attrs = _emberMetalMerge["default"]({}, _emberMetalStreamsUtils.readHash(hash)); + var attrs = _emberMetalMerge["default"]({}, hash); + + // TODO: Rewrite link-to to use arbitrary length positional params. attrs.params = _emberMetalStreamsUtils.readArray(params); // Used for deprecations (to tell the user what view the deprecated syntax // was used in). attrs.view = env.view; @@ -24019,11 +24184,11 @@ @submodule ember-routing-views */ "use strict"; - _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = 'Ember@1.13.6'; + _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = 'Ember@1.13.7'; var linkComponentClassNameBindings = ['active', 'loading', 'disabled']; linkComponentClassNameBindings = ['active', 'loading', 'disabled', 'transitioningIn', 'transitioningOut']; @@ -24056,44 +24221,44 @@ currentWhen: null, /** Used to determine when this LinkComponent is active. @property currentWhen - @private + @public */ 'current-when': null, /** Sets the `title` attribute of the `LinkComponent`'s HTML element. @property title @default null - @private + @public **/ title: null, /** Sets the `rel` attribute of the `LinkComponent`'s HTML element. @property rel @default null - @private + @public **/ rel: null, /** Sets the `tabindex` attribute of the `LinkComponent`'s HTML element. @property tabindex @default null - @private + @public **/ tabindex: null, /** Sets the `target` attribute of the `LinkComponent`'s HTML element. @since 1.8.0 @property target @default null - @private + @public **/ target: null, /** The CSS class to apply to `LinkComponent`'s element when its `active` @@ -24130,32 +24295,32 @@ Determines whether the `LinkComponent` will trigger routing via the `replaceWith` routing strategy. @property replace @type Boolean @default false - @private + @public **/ replace: false, /** By default the `{{link-to}}` helper will bind to the `href` and `title` attributes. It's discouraged that you override these defaults, however you can push onto the array if needed. @property attributeBindings @type Array | String @default ['title', 'rel', 'tabindex', 'target'] - @private + @public */ attributeBindings: ['href', 'title', 'rel', 'tabindex', 'target'], /** By default the `{{link-to}}` helper will bind to the `active`, `loading`, and `disabled` classes. It is discouraged to override these directly. @property classNameBindings @type Array @default ['active', 'loading', 'disabled'] - @private + @public */ classNameBindings: linkComponentClassNameBindings, /** By default the `{{link-to}}` helper responds to the `click` event. You @@ -24552,11 +24717,11 @@ @submodule ember-routing-views */ "use strict"; - _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.6'; + _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.7'; var CoreOutletView = _emberViewsViewsView["default"].extend({ defaultTemplate: _emberHtmlbarsTemplatesTopLevelView["default"], init: function () { @@ -28484,11 +28649,11 @@ /** Handles updating the paths and notifying any listeners of the URL change. Triggers the router level `didTransition` hook. @method didTransition - @private + @public @since 1.2.0 */ didTransition: function (infos) { updatePaths(this); @@ -28544,11 +28709,11 @@ /** Handles notifying any listeners of an impending URL change. Triggers the router level `willTransition` hook. @method willTransition - @private + @public @since 1.11.0 */ willTransition: function (oldInfos, newInfos, transition) { _emberMetalRun_loop["default"].once(this, this.trigger, 'willTransition', transition); @@ -30104,11 +30269,11 @@ return dependentArrayObserver.itemPropertyDidChange(obj, keyName, observerContext.dependentArray, observerContext); }; }, resetTransformations: function (dependentKey, observerContexts) { - this.trackedArraysByGuid[dependentKey] = new _emberRuntimeSystemTracked_array["default"](observerContexts); + this.trackedArraysByGuid[dependentKey] = new _emberRuntimeSystemTracked_array["default"](observerContexts, true); }, trackAdd: function (dependentKey, index, newItems) { var trackedArray = this.trackedArraysByGuid[dependentKey]; @@ -31047,10 +31212,11 @@ @param propertyKey @public */ var mapProperty = mapBy; + exports.mapProperty = mapProperty; /** Filters the array by the callback. The callback method you provide should have the following signature. `item` is the current item in the iteration. @@ -31084,18 +31250,17 @@ @param {String} dependentKey @param {Function} callback @return {Ember.ComputedProperty} the filtered array @public */ - exports.mapProperty = mapProperty; function filter(dependentKey, callback) { var options = { _suppressDeprecation: true, initialize: function (array, changeMeta, instanceMeta) { - instanceMeta.filteredArrayIndexes = new _emberRuntimeSystemSubarray["default"](); + instanceMeta.filteredArrayIndexes = new _emberRuntimeSystemSubarray["default"](undefined, true); }, addedItem: function (array, item, changeMeta, instanceMeta) { var match = !!callback.call(this, item, changeMeta.index, changeMeta.arrayChanged); var filterIndex = instanceMeta.filteredArrayIndexes.addItem(changeMeta.index, match); @@ -31174,10 +31339,11 @@ @deprecated Use `Ember.computed.filterBy` instead @public */ var filterProperty = filterBy; + exports.filterProperty = filterProperty; /** A computed property which returns a new array with all the unique elements from one or more dependent arrays. Example @@ -31204,11 +31370,10 @@ @param {String} propertyKey* @return {Ember.ComputedProperty} computes a new array with all the unique elements from the dependent array @public */ - exports.filterProperty = filterProperty; function uniq() { var args = a_slice.call(arguments); args.push({ @@ -31255,10 +31420,11 @@ unique elements from the dependent array @public */ var union = uniq; + exports.union = union; /** A computed property which returns a new array with all the duplicated elements from two or more dependent arrays. Example @@ -31279,11 +31445,10 @@ @param {String} propertyKey* @return {Ember.ComputedProperty} computes a new array with all the duplicated elements from the dependent arrays @public */ - exports.union = union; function intersect() { var args = a_slice.call(arguments); args.push({ @@ -31687,10 +31852,11 @@ var arrayControllerDeprecation = '`Ember.ArrayController` is deprecated.'; exports.arrayControllerDeprecation = arrayControllerDeprecation; var arrayControllerDeprecation = '`Ember.ArrayController` is deprecated.'; + exports.arrayControllerDeprecation = arrayControllerDeprecation; /** `Ember.ArrayController` provides a way for you to publish a collection of objects so that you can easily bind to the collection from a Handlebars `#each` helper, an `Ember.CollectionView`, or other controllers. @@ -31775,11 +31941,10 @@ @uses Ember.ControllerMixin @deprecated @public */ - exports.arrayControllerDeprecation = arrayControllerDeprecation; exports["default"] = _emberRuntimeSystemArray_proxy["default"].extend(_emberRuntimeMixinsController["default"], _emberRuntimeMixinsSortable["default"], { /** A string containing the controller name used to wrap items. For example: @@ -32018,10 +32183,11 @@ enifed('ember-runtime/controllers/object_controller', ['exports', 'ember-metal/core', 'ember-runtime/mixins/controller', 'ember-runtime/system/object_proxy'], function (exports, _emberMetalCore, _emberRuntimeMixinsController, _emberRuntimeSystemObject_proxy) { 'use strict'; var objectControllerDeprecation = 'Ember.ObjectController is deprecated, ' + 'please use Ember.Controller and use `model.propertyName`.'; + exports.objectControllerDeprecation = objectControllerDeprecation; /** @module ember @submodule ember-runtime */ @@ -32038,11 +32204,10 @@ @extends Ember.ObjectProxy @uses Ember.ControllerMixin @deprecated @public **/ - exports.objectControllerDeprecation = objectControllerDeprecation; exports["default"] = _emberRuntimeSystemObject_proxy["default"].extend(_emberRuntimeMixinsController["default"], { init: function () { this._super(); _emberMetalCore["default"].deprecate(objectControllerDeprecation, this.isGenerated); } @@ -33916,11 +34081,11 @@ to give your iterator function access to the current object. @method forEach @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Object} receiver - @private + @public */ forEach: function (callback, target) { if (typeof callback !== 'function') { throw new TypeError(); } @@ -34256,11 +34421,11 @@ ``` @method every @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Boolean} - @private + @public */ every: function (callback, target) { return !this.find(function (x, idx, i) { return !callback.call(target, x, idx, i); }); @@ -34509,11 +34674,11 @@ var arr = ['a', null, 'c', undefined]; arr.compact(); // ['a', 'c'] ``` @method compact @return {Array} the array without null and undefined elements. - @private + @public */ compact: function () { return this.filter(function (value) { return value != null; }); @@ -34528,11 +34693,11 @@ arr.without('a'); // ['b', 'c'] ``` @method without @param {Object} value @return {Ember.Enumerable} - @private + @public */ without: function (value) { if (!this.contains(value)) { return this; // nothing to do } @@ -34771,11 +34936,11 @@ You may provide multiple arguments to sort by multiple properties. @method sortBy @param {String} property name(s) to sort on @return {Array} The sorted array. @since 1.2.0 - @private + @public */ sortBy: function () { var sortKeys = arguments; return this.toArray().sort(function (a, b) { @@ -36309,11 +36474,11 @@ Overrides the default `arrangedContent` from `ArrayProxy` in order to sort by `sortFunction`. Also sets up observers for each `sortProperty` on each item in the content Array. @property arrangedContent @private */ - arrangedContent: _emberMetalComputed.computed('content', 'sortProperties.@each', { + arrangedContent: _emberMetalComputed.computed('content', 'sortProperties.[]', { get: function (key) { var content = _emberMetalProperty_get.get(this, 'content'); var isSorted = _emberMetalProperty_get.get(this, 'isSorted'); var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); var self = this; @@ -36660,11 +36825,11 @@ @class ArrayProxy @namespace Ember @extends Ember.Object @uses Ember.MutableArray - @private + @public */ var ArrayProxy = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsMutable_array["default"], { /** The content array. Must be an object that implements `Ember.Array` and/or @@ -38053,10 +38218,11 @@ var loadHooks = _emberMetalCore["default"].ENV.EMBER_LOAD_HOOKS || {}; var loaded = {}; var _loaded = loaded; + exports._loaded = _loaded; /** Detects when a specific package of Ember (e.g. 'Ember.Application') has fully loaded and is available for extension. The provided `callback` will be called with the `name` passed @@ -38072,11 +38238,10 @@ @for Ember @param name {String} name of hook @param callback {Function} callback to be called @private */ - exports._loaded = _loaded; function onLoad(name, callback) { var object = loaded[name]; loadHooks[name] = loadHooks[name] || _emberMetalCore["default"].A(); @@ -39454,11 +39619,11 @@ exports.classify = classify; exports.underscore = underscore; exports.capitalize = capitalize; }); // Ember.STRINGS, Ember.FEATURES -enifed("ember-runtime/system/subarray", ["exports", "ember-metal/error", "ember-metal/enumerable_utils"], function (exports, _emberMetalError, _emberMetalEnumerable_utils) { +enifed("ember-runtime/system/subarray", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/enumerable_utils"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalEnumerable_utils) { "use strict"; var RETAIN = 'r'; var FILTER = 'f'; @@ -39476,12 +39641,14 @@ @class SubArray @namespace Ember @private */ - function SubArray(length) { - if (arguments.length < 1) { + function SubArray(length, _suppressDeprecation) { + _emberMetalCore["default"].deprecate('Ember.SubArray will be removed in 2.0.0.', _suppressDeprecation, { id: 'ember-metal.sub-array', until: '2.0.0' }); + + if (length === undefined) { length = 0; } if (length > 0) { this._operations = [new Operation(RETAIN, length)]; @@ -39628,11 +39795,11 @@ }); return str.substring(1); } }; }); -enifed("ember-runtime/system/tracked_array", ["exports", "ember-metal/property_get", "ember-metal/enumerable_utils"], function (exports, _emberMetalProperty_get, _emberMetalEnumerable_utils) { +enifed("ember-runtime/system/tracked_array", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/enumerable_utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalEnumerable_utils) { "use strict"; var RETAIN = 'r'; var INSERT = 'i'; var DELETE = 'd'; @@ -39648,11 +39815,13 @@ @namespace Ember @param {Array} [items=[]] The array to be tracked. This is used just to get the initial items for the starting state of retain:n. @private */ - function TrackedArray(items) { + function TrackedArray(items, _suppressDeprecation) { + _emberMetalCore["default"].deprecate('Ember.TrackedArray will be removed in 2.0.0.', _suppressDeprecation, { id: 'ember-metal.tracked-array', until: '2.0.0' }); + if (arguments.length < 1) { items = []; } var length = _emberMetalProperty_get.get(items, 'length'); @@ -40108,11 +40277,11 @@ } return ret; } }); -enifed("ember-template-compiler", ["exports", "ember-metal/core", "ember-template-compiler/system/precompile", "ember-template-compiler/system/compile", "ember-template-compiler/system/template", "ember-template-compiler/plugins", "ember-template-compiler/plugins/transform-each-in-to-block-params", "ember-template-compiler/plugins/transform-with-as-to-hash", "ember-template-compiler/plugins/transform-bind-attr-to-attributes", "ember-template-compiler/plugins/transform-each-into-collection", "ember-template-compiler/plugins/transform-single-arg-each", "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/deprecate-view-and-controller-paths", "ember-template-compiler/plugins/deprecate-view-helper", "ember-template-compiler/compat"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformEachInToBlockParams, _emberTemplateCompilerPluginsTransformWithAsToHash, _emberTemplateCompilerPluginsTransformBindAttrToAttributes, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsTransformSingleArgEach, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths, _emberTemplateCompilerPluginsDeprecateViewHelper, _emberTemplateCompilerCompat) { +enifed("ember-template-compiler", ["exports", "ember-metal/core", "ember-template-compiler/system/precompile", "ember-template-compiler/system/compile", "ember-template-compiler/system/template", "ember-template-compiler/plugins", "ember-template-compiler/plugins/transform-each-in-to-block-params", "ember-template-compiler/plugins/transform-with-as-to-hash", "ember-template-compiler/plugins/transform-bind-attr-to-attributes", "ember-template-compiler/plugins/transform-each-into-collection", "ember-template-compiler/plugins/transform-single-arg-each", "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/deprecate-view-and-controller-paths", "ember-template-compiler/plugins/deprecate-view-helper", "ember-template-compiler/plugins/deprecate-with-controller", "ember-template-compiler/plugins/deprecate-unbound-block-and-multi-param", "ember-template-compiler/compat"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformEachInToBlockParams, _emberTemplateCompilerPluginsTransformWithAsToHash, _emberTemplateCompilerPluginsTransformBindAttrToAttributes, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsTransformSingleArgEach, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths, _emberTemplateCompilerPluginsDeprecateViewHelper, _emberTemplateCompilerPluginsDeprecateWithController, _emberTemplateCompilerPluginsDeprecateUnboundBlockAndMultiParam, _emberTemplateCompilerCompat) { "use strict"; _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformWithAsToHash["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachInToBlockParams["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformBindAttrToAttributes["default"]); @@ -40125,10 +40294,12 @@ _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformAngleBracketComponents["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformInputOnToOnEvent["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths["default"]); _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateViewHelper["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateWithController["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateUnboundBlockAndMultiParam["default"]); exports._Ember = _emberMetalCore["default"]; exports.precompile = _emberTemplateCompilerSystemPrecompile["default"]; exports.compile = _emberTemplateCompilerSystemCompile["default"]; exports.template = _emberTemplateCompilerSystemTemplate["default"]; @@ -40204,10 +40375,58 @@ plugins[type].push(Plugin); } exports["default"] = plugins; }); +enifed('ember-template-compiler/plugins/deprecate-unbound-block-and-multi-param', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + 'use strict'; + + function DeprecateUnboundBlockAndMultiParam(options) { + // set later within HTMLBars to the syntax package + this.syntax = null; + this.options = options || {}; + } + + DeprecateUnboundBlockAndMultiParam.prototype.transform = function (ast) { + var pluginContext = this; + var walker = new pluginContext.syntax.Walker(); + var moduleName = pluginContext.options.moduleName; + + walker.visit(ast, function (node) { + + if (pluginContext.isBlockUsage(node)) { + var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc); + + _emberMetalCore["default"].deprecate('Using the {{unbound}} helper with a block ' + moduleInfo + 'is deprecated and will be removed in 2.0.0.', false, { + id: 'ember-template-compiler.unbound-block', + until: '2.0.0', + url: 'http://emberjs.com/deprecations/v1.x/#toc_block-and-multi-argument-unbound-helper' + }); + } else if (pluginContext.hasMultipleParams(node)) { + var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc); + + _emberMetalCore["default"].deprecate('Using the {{unbound}} helper with multiple params ' + moduleInfo + 'is deprecated and will be removed in 2.0.0. Please refactor to nested helper usage.', false, { + id: 'ember-template-compiler.unbound-multiple-params', + until: '2.0.0', + url: 'http://emberjs.com/deprecations/v1.x/#toc_block-and-multi-argument-unbound-helper' + }); + } + }); + + return ast; + }; + + DeprecateUnboundBlockAndMultiParam.prototype.isBlockUsage = function (node) { + return node.type === 'BlockStatement' && node.path.original === 'unbound'; + }; + + DeprecateUnboundBlockAndMultiParam.prototype.hasMultipleParams = function (node) { + return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.path.original === 'unbound' && node.params.length > 1; + }; + + exports["default"] = DeprecateUnboundBlockAndMultiParam; +}); enifed("ember-template-compiler/plugins/deprecate-view-and-controller-paths", ["exports", "ember-metal/core", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { "use strict"; function DeprecateViewAndControllerPaths(options) { // set later within HTMLBars to the syntax package @@ -40333,10 +40552,69 @@ return (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && node.path.parts[0] === 'view'; } exports["default"] = DeprecateViewHelper; }); +enifed('ember-template-compiler/plugins/deprecate-with-controller', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + 'use strict'; + + /** + @module ember + @submodule ember-template-compiler + */ + + /** + An HTMLBars AST transformation that deprecates usage of `controller` with the `{{with}}` + helper. + + @private + @class DeprecateWithController + */ + function DeprecateWithController(options) { + // set later within HTMLBars to the syntax package + this.syntax = null; + this.options = options || {}; + } + + /** + @private + @method transform + @param {AST} ast The AST to be transformed. + */ + DeprecateWithController.prototype.transform = function DeprecateWithController_transform(ast) { + var pluginContext = this; + var walker = new pluginContext.syntax.Walker(); + var moduleName = pluginContext.options.moduleName; + + walker.visit(ast, function (node) { + if (pluginContext.validate(node)) { + var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc); + + _emberMetalCore["default"].deprecate('Using the {{with}} helper with a `controller` specified ' + moduleInfo + 'is deprecated and will be removed in 2.0.0.', false, { id: 'ember-template-compiler.with-controller', until: '2.0.0' }); + } + }); + + return ast; + }; + + DeprecateWithController.prototype.validate = function TransformWithAsToHash_validate(node) { + return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.path.original === 'with' && hashPairForKey(node.hash, 'controller'); + }; + + function hashPairForKey(hash, key) { + for (var i = 0, l = hash.pairs.length; i < l; i++) { + var pair = hash.pairs[i]; + if (pair.key === key) { + return pair; + } + } + + return false; + } + + exports["default"] = DeprecateWithController; +}); enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['exports'], function (exports) { 'use strict'; function TransformAngleBracketComponents() { // set later within HTMLBars to the syntax package @@ -41435,11 +41713,11 @@ } options.plugins = plugins; options.buildMeta = function buildMeta(program) { return { - revision: 'Ember@1.13.6', + revision: 'Ember@1.13.7', loc: program.loc, moduleName: options.moduleName }; }; @@ -42795,36 +43073,26 @@ // END EXPORTS exports["default"] = _emberRuntime["default"]; }); // for the side effect of extending Ember.run.queues -enifed("ember-views/compat/attrs-proxy", ["exports", "ember-metal/property_get", "ember-metal/mixin", "ember-metal/events", "ember-metal/utils", "ember-metal/keys", "ember-metal/property_events", "ember-metal/observer"], function (exports, _emberMetalProperty_get, _emberMetalMixin, _emberMetalEvents, _emberMetalUtils, _emberMetalKeys, _emberMetalProperty_events, _emberMetalObserver) { - "use strict"; +enifed('ember-views/compat/attrs-proxy', ['exports', 'ember-metal/mixin', 'ember-metal/utils', 'ember-metal/property_events', 'ember-metal/events'], function (exports, _emberMetalMixin, _emberMetalUtils, _emberMetalProperty_events, _emberMetalEvents) { + 'use strict'; exports.deprecation = deprecation; function deprecation(key) { - return "You tried to look up an attribute directly on the component. This is deprecated. Use attrs." + key + " instead."; + return 'You tried to look up an attribute directly on the component. This is deprecated. Use attrs.' + key + ' instead.'; } var MUTABLE_CELL = _emberMetalUtils.symbol("MUTABLE_CELL"); exports.MUTABLE_CELL = MUTABLE_CELL; function isCell(val) { return val && val[MUTABLE_CELL]; } - function attrsWillChange(view, attrsKey) { - var key = attrsKey.slice(6); - view.currentState.legacyAttrWillChange(view, key); - } - - function attrsDidChange(view, attrsKey) { - var key = attrsKey.slice(6); - view.currentState.legacyAttrDidChange(view, key); - } - var AttrsProxyMixin = { attrs: null, getAttr: function (key) { var attrs = this.attrs; @@ -42842,64 +43110,49 @@ setAttr: function (key, value) { var attrs = this.attrs; var val = attrs[key]; if (!isCell(val)) { - throw new Error("You can't update attrs." + key + ", because it's not mutable"); + throw new Error('You can\'t update attrs.' + key + ', because it\'s not mutable'); } val.update(value); }, - willWatchProperty: function (key) { - if (this._isAngleBracket || key === 'attrs') { - return; + _propagateAttrsToThis: function () { + var attrs = this.attrs; + var values = {}; + for (var prop in attrs) { + if (prop !== 'attrs') { + values[prop] = this.getAttr(prop); + } } - - var attrsKey = "attrs." + key; - _emberMetalObserver._addBeforeObserver(this, attrsKey, null, attrsWillChange); - _emberMetalObserver.addObserver(this, attrsKey, null, attrsDidChange); + this.setProperties(values); }, - didUnwatchProperty: function (key) { - if (this._isAngleBracket || key === 'attrs') { - return; - } + initializeShape: _emberMetalEvents.on('init', function () { + this._isDispatchingAttrs = false; + }), - var attrsKey = "attrs." + key; - _emberMetalObserver._removeBeforeObserver(this, attrsKey, null, attrsWillChange); - _emberMetalObserver.removeObserver(this, attrsKey, null, attrsDidChange); + didReceiveAttrs: function () { + this._super(); + this._isDispatchingAttrs = true; + this._propagateAttrsToThis(); + this._isDispatchingAttrs = false; }, - legacyDidReceiveAttrs: _emberMetalEvents.on('didReceiveAttrs', function () { - if (this._isAngleBracket) { - return; - } - - var keys = _emberMetalKeys["default"](this.attrs); - - for (var i = 0, l = keys.length; i < l; i++) { - // Only issue the deprecation if it wasn't already issued when - // setting attributes initially. - if (!(keys[i] in this)) { - this.notifyPropertyChange(keys[i]); - } - } - }), - unknownProperty: function (key) { if (this._isAngleBracket) { return; } - var attrs = _emberMetalProperty_get.get(this, 'attrs'); + var attrs = this.attrs; if (attrs && key in attrs) { // do not deprecate accessing `this[key]` at this time. // add this back when we have a proper migration path - // Ember.deprecate(deprecation(key)); - var possibleCell = _emberMetalProperty_get.get(attrs, key); + var possibleCell = attrs.key; if (possibleCell && possibleCell[MUTABLE_CELL]) { return possibleCell.value; } @@ -42914,22 +43167,21 @@ AttrsProxyMixin[_emberMetalProperty_events.PROPERTY_DID_CHANGE] = function (key) { if (this._isAngleBracket) { return; } + if (this._isDispatchingAttrs) { + return; + } if (this.currentState) { this.currentState.legacyPropertyDidChange(this, key); } }; exports["default"] = _emberMetalMixin.Mixin.create(AttrsProxyMixin); }); - -//import { set } from "ember-metal/property_set"; - -//import run from "ember-metal/run_loop"; enifed("ember-views/compat/metamorph_view", ["exports", "ember-metal/core", "ember-views/views/view", "ember-metal/mixin"], function (exports, _emberMetalCore, _emberViewsViewsView, _emberMetalMixin) { /*jshint newcap:false*/ "use strict"; /** @@ -42957,18 +43209,18 @@ _emberMetalCore["default"].deprecate("Using " + this.__metamorphType + " is deprecated."); } }); + exports._Metamorph = _Metamorph; /** @class _MetamorphView @namespace Ember @extends Ember.View @uses Ember._Metamorph @private */ - exports._Metamorph = _Metamorph; exports["default"] = _emberViewsViewsView["default"].extend(_Metamorph, { __metamorphType: 'Ember._MetamorphView' }); }); // Ember.deprecate @@ -45340,14 +45592,15 @@ var className = classes[i]; Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", className.indexOf(' ') === -1); var _className$split = className.split(':'); - // Legacy :class microsyntax for static class names var propName = _className$split[0]; var activeClass = _className$split[1]; var inactiveClass = _className$split[2]; + + // Legacy :class microsyntax for static class names if (propName === '') { output.push(activeClass); continue; } @@ -46431,11 +46684,11 @@ also specifying the layout property. @deprecated @property template @public */ - template: _emberMetalComputed.computed('_template', { + template: _emberMetalComputed.computed({ get: function () { _emberMetalCore["default"].deprecate("Accessing 'template' in " + this + " is deprecated. To determine if a block was specified to " + this + " please use '{{#if hasBlock}}' in the components layout."); return _emberMetalProperty_get.get(this, '_template'); }, @@ -46443,11 +46696,11 @@ set: function (key, value) { return _emberMetalProperty_set.set(this, '_template', value); } }), - _template: _emberMetalComputed.computed('templateName', { + _template: _emberMetalComputed.computed({ get: function () { if (_emberMetalProperty_get.get(this, '_deprecatedFlagForBlockProvided')) { return true; } var templateName = _emberMetalProperty_get.get(this, 'templateName'); @@ -46683,11 +46936,11 @@ }); // 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) { "use strict"; - _emberHtmlbarsTemplatesContainerView["default"].meta.revision = 'Ember@1.13.6'; + _emberHtmlbarsTemplatesContainerView["default"].meta.revision = 'Ember@1.13.7'; /** @module ember @submodule ember-views */ @@ -47655,11 +47908,11 @@ _emberMetalProperty_get.get(groupedContent, 'lastObject.content').push(item); }); return groupedContent; - }).property('optionGroupPath', 'content.@each'), + }).property('optionGroupPath', 'content.[]'), /** The view class for option. @property optionView @type Ember.View @@ -47674,11 +47927,11 @@ } else { this._changeSingle(hasDOM); } }, - selectionDidChange: _emberMetalMixin.observer('selection.@each', function () { + selectionDidChange: _emberMetalMixin.observer('selection.[]', function () { var selection = _emberMetalProperty_get.get(this, 'selection'); if (_emberMetalProperty_get.get(this, 'multiple')) { if (!_emberRuntimeUtils.isArray(selection)) { _emberMetalProperty_set.set(this, 'selection', _emberRuntimeSystemNative_array.A([selection])); return; @@ -47912,11 +48165,11 @@ hasElement: _emberViewsViewsStatesHas_element["default"], destroying: _emberViewsViewsStatesDestroying["default"] }; exports.states = states; }); -enifed("ember-views/views/states/default", ["exports", "ember-metal/error", "ember-metal/property_get", "ember-metal/property_events", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_events, _emberViewsCompatAttrsProxy) { +enifed("ember-views/views/states/default", ["exports", "ember-metal/error", "ember-metal/property_get", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalError, _emberMetalProperty_get, _emberViewsCompatAttrsProxy) { "use strict"; /** @module ember @submodule ember-views @@ -47933,25 +48186,12 @@ getElement: function () { return null; }, - legacyAttrWillChange: function (view, key) { - if (key in view.attrs && !(key in view)) { - _emberMetalProperty_events.propertyWillChange(view, key); - } - }, - - legacyAttrDidChange: function (view, key) { - if (key in view.attrs && !(key in view)) { - _emberMetalProperty_events.propertyDidChange(view, key); - } - }, - legacyPropertyDidChange: function (view, key) { var attrs = view.attrs; - if (attrs && key in attrs) { var possibleCell = attrs[key]; if (possibleCell && possibleCell[_emberViewsCompatAttrsProxy.MUTABLE_CELL]) { var value = _emberMetalProperty_get.get(view, key); @@ -48137,12 +48377,10 @@ */ var preRender = _emberMetalPlatformCreate["default"](_emberViewsViewsStatesDefault["default"]); _emberMetalMerge["default"](preRender, { - legacyAttrWillChange: function (view, key) {}, - legacyAttrDidChange: function (view, key) {}, legacyPropertyDidChange: function (view, key) {} }); exports["default"] = preRender; }); @@ -49005,12 +49243,11 @@ the template yourself. @property template @type Function @private */ - - template: _emberMetalComputed.computed('templateName', { + template: _emberMetalComputed.computed({ get: function () { var templateName = _emberMetalProperty_get.get(this, 'templateName'); var template = this.templateForName(templateName, 'template'); _emberMetalCore["default"].assert("You specified the templateName " + templateName + " for " + this + ", but it did not exist.", !templateName || !!template); return template || _emberMetalProperty_get.get(this, 'defaultTemplate'); @@ -49034,11 +49271,11 @@ on a subclass. @property layout @type Function @public */ - layout: _emberMetalComputed.computed('layoutName', { + layout: _emberMetalComputed.computed({ get: function (key) { var layoutName = _emberMetalProperty_get.get(this, 'layoutName'); var layout = this.templateForName(layoutName, 'layout'); _emberMetalCore["default"].assert("You specified the layoutName " + layoutName + " for " + this + ", but it did not exist.", !layoutName || !!layout); @@ -49550,10 +49787,14 @@ this._super.apply(this, arguments); if (!this._viewRegistry) { this._viewRegistry = View.views; } + + this.renderer.componentInitAttrs(this, this.attrs || {}); + + _emberMetalCore["default"].deprecate('Using a custom `.render` function is deprecated and will be removed in Ember 2.0.0.', !this.render, { id: 'ember-views.render', until: '2.0.0' }); }, __defineNonEnumerable: function (property) { this[property.name] = property.descriptor.value; }, @@ -49750,26 +49991,27 @@ View.notifyMutationListeners = function () { mutation.trigger('change'); }; - /** - Global views hash - - @property views - @static - @type Object - @private - */ - View.views = {}; + View.reopenClass({ + /** + Global views hash + @property views + @static + @type Object + @private + */ + views: {}, - // If someone overrides the child views computed property when - // defining their class, we want to be able to process the user's - // supplied childViews and then restore the original computed property - // at view initialization time. This happens in Ember.ContainerView's init - // method. - View.childViewsProperty = _emberViewsMixinsView_child_views_support.childViewsProperty; + // If someone overrides the child views computed property when + // defining their class, we want to be able to process the user's + // supplied childViews and then restore the original computed property + // at view initialization time. This happens in Ember.ContainerView's init + // method. + childViewsProperty: _emberViewsMixinsView_child_views_support.childViewsProperty + }); function viewDeprecationMessage() { _emberMetalCore["default"].deprecate("Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy.", !!_emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT, { url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-view', id: 'ember-views.view-deprecated', @@ -50380,11 +50622,11 @@ // this list will be pruned from the MorphList during the cleanup // process. var handledMorphs = renderState.handledMorphs; var key = undefined; - if (handledMorphs[_key]) { + if (_key in handledMorphs) { // In this branch we are dealing with a duplicate key. The strategy // is to take the original key and append a counter to it that is // incremented every time the key is reused. In order to greatly // reduce the chance of colliding with another valid key we also add // an extra string "--z8mS2hvDW0A--" to the new key. @@ -51008,10 +51250,11 @@ return !!(scope.blocks[name] && scope.blocks[name].arity); } }; + exports.keywords = keywords; /** Host Hook: partial @param {RenderNode} renderNode @param {Environment} env @@ -51034,11 +51277,10 @@ and not to the ambient lexical environment. The host hook should invoke the referenced partial with the ambient `self`. */ - exports.keywords = keywords; function partial(renderNode, env, scope, path) { var template = env.partials[path]; return template.render(scope.self, env, {}).fragment; } @@ -51831,14 +52073,14 @@ return obj; } var toString = Object.prototype.toString; + exports.toString = toString; // Sourced from lodash // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt /*eslint-disable func-style, no-var */ - exports.toString = toString; var isFunction = function (value) { return typeof value === 'function'; }; // fallback for older versions of Chrome and Safari /* istanbul ignore next */ @@ -51846,20 +52088,20 @@ exports.isFunction = isFunction = function (value) { return typeof value === 'function' && toString.call(value) === '[object Function]'; }; } var isFunction; + exports.isFunction = isFunction; /*eslint-enable func-style, no-var */ /* istanbul ignore next */ - exports.isFunction = isFunction; var isArray = Array.isArray || function (value) { return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; }; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. function indexOf(array, value) { for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; @@ -55420,16 +55662,16 @@ function F() {} F.prototype = proto; return new F(); }; + exports.oCreate = oCreate; /** @private Extracts query params from the end of an array **/ - exports.oCreate = oCreate; function extractQueryParams(array) { var len = array && array.length, head, queryParams; @@ -58229,12 +58471,12 @@ _isArray = Array.isArray; } var isArray = _isArray; + exports.isArray = isArray; // Date.now is not available in browsers < IE9 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility - exports.isArray = isArray; var now = Date.now || function () { return new Date().getTime(); }; exports.now = now; \ No newline at end of file