dist/ember.prod.js in ember-source-1.12.1 vs dist/ember.prod.js in ember-source-1.12.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.12.1
+ * @version 1.12.2
*/
(function() {
var enifed, requireModule, eriuqer, requirejs, Ember;
var mainContext = this;
@@ -3197,42 +3197,42 @@
for (i = 0, l = needs.length; i < l; i++) {
dependency = needs[i];
- if (dependency.indexOf(":") === -1) {
+ if (dependency.indexOf(':') === -1) {
dependency = "controller:" + dependency;
}
// Structure assert to still do verification but not string concat in production
if (!container._registry.has(dependency)) {
missing.push(dependency);
}
}
if (missing.length) {
- throw new EmberError['default'](utils.inspect(controller) + " needs [ " + missing.join(", ") + " ] but " + (missing.length > 1 ? "they" : "it") + " could not be found");
+ throw new EmberError['default'](utils.inspect(controller) + " needs [ " + missing.join(', ') + " ] but " + (missing.length > 1 ? 'they' : 'it') + " could not be found");
}
}
var defaultControllersComputedProperty = computed.computed(function () {
var controller = this;
return {
- needs: property_get.get(controller, "needs"),
- container: property_get.get(controller, "container"),
+ needs: property_get.get(controller, 'needs'),
+ container: property_get.get(controller, 'container'),
unknownProperty: function (controllerName) {
var needs = this.needs;
var dependency, i, l;
for (i = 0, l = needs.length; i < l; i++) {
dependency = needs[i];
if (dependency === controllerName) {
- return this.container.lookup("controller:" + controllerName);
+ return this.container.lookup('controller:' + controllerName);
}
}
- var errorMessage = utils.inspect(controller) + "#needs does not include `" + controllerName + "`. To access the " + controllerName + " controller from " + utils.inspect(controller) + ", " + utils.inspect(controller) + " should have a `needs` property that is an array of the controllers it has access to.";
+ var errorMessage = utils.inspect(controller) + '#needs does not include `' + controllerName + '`. To access the ' + controllerName + ' controller from ' + utils.inspect(controller) + ', ' + utils.inspect(controller) + ' should have a `needs` property that is an array of the controllers it has access to.';
throw new ReferenceError(errorMessage);
},
setUnknownProperty: function (key, value) {
throw new Error("You cannot overwrite the value of `controllers." + key + "` of " + utils.inspect(controller));
}
@@ -3242,11 +3242,11 @@
/**
@class ControllerMixin
@namespace Ember
*/
ControllerMixin['default'].reopen({
- concatenatedProperties: ["needs"],
+ concatenatedProperties: ['needs'],
/**
An array of other controller objects available inside
instances of this controller via the `controllers`
property:
@@ -3282,21 +3282,21 @@
@default []
*/
needs: [],
init: function () {
- var needs = property_get.get(this, "needs");
- var length = property_get.get(needs, "length");
+ var needs = property_get.get(this, 'needs');
+ var length = property_get.get(needs, 'length');
if (length > 0) {
if (this.container) {
verifyNeedsDependencies(this, this.container, needs);
}
// if needs then initialize controllers proxy
- property_get.get(this, "controllers");
+ property_get.get(this, 'controllers');
}
this._super.apply(this, arguments);
},
@@ -3304,11 +3304,11 @@
@method controllerFor
@see {Ember.Route#controllerFor}
@deprecated Use `needs` instead
*/
controllerFor: function (controllerName) {
- return controllerFor['default'](property_get.get(this, "container"), controllerName);
+ return controllerFor['default'](property_get.get(this, 'container'), controllerName);
},
/**
Stores the instances of other controllers available from within
this controller. Any controller listed by name in the `needs`
@@ -3404,15 +3404,15 @@
// Why do we need to register the instance in the first place?
// Because we need a good way for the root route (a.k.a ApplicationRoute)
// to notify us when it has created the root-most view. That view is then
// appended to the rootElement, in the case of apps, to the fixture harness
// in tests, or rendered to a string in the case of FastBoot.
- this.registry.register("-application-instance:main", this, { instantiate: false });
+ this.registry.register('-application-instance:main', this, { instantiate: false });
},
router: computed.computed(function () {
- return this.container.lookup("router:main");
+ return this.container.lookup('router:main');
}).readOnly(),
/**
Instantiates and sets up the router, specifically overriding the default
location. This is useful for manually starting the app in FastBoot or
@@ -3421,14 +3421,14 @@
@param options
@private
*/
overrideRouterLocation: function (options) {
var location = options && options.location;
- var router = property_get.get(this, "router");
+ var router = property_get.get(this, 'router');
if (location) {
- property_set.set(router, "location", location);
+ property_set.set(router, 'location', location);
}
},
/**
This hook is called by the root-most Route (a.k.a. the ApplicationRoute)
@@ -3449,11 +3449,11 @@
current URL of the page to determine the initial URL to start routing to.
To start the app at a specific URL, call `handleURL` instead.
@private
*/
startRouting: function () {
- var router = property_get.get(this, "router");
+ var router = property_get.get(this, 'router');
var isModuleBasedResolver = !!this.registry.resolver.moduleBasedResolver;
router.startRouting(isModuleBasedResolver);
this._didSetupRouter = true;
},
@@ -3468,11 +3468,11 @@
if (this._didSetupRouter) {
return;
}
this._didSetupRouter = true;
- var router = property_get.get(this, "router");
+ var router = property_get.get(this, 'router');
var isModuleBasedResolver = !!this.registry.resolver.moduleBasedResolver;
router.setupRouter(isModuleBasedResolver);
},
/**
@@ -3481,32 +3481,32 @@
have called `setupRouter()` before calling this method.
@param url {String} the URL the router should route to
@private
*/
handleURL: function (url) {
- var router = property_get.get(this, "router");
+ var router = property_get.get(this, 'router');
this.setupRouter();
return router.handleURL(url);
},
/**
@private
*/
setupEventDispatcher: function () {
- var dispatcher = this.container.lookup("event_dispatcher:main");
+ var dispatcher = this.container.lookup('event_dispatcher:main');
dispatcher.setup(this.customEvents, this.rootElement);
return dispatcher;
},
/**
@private
*/
willDestroy: function () {
this._super.apply(this, arguments);
- run['default'](this.container, "destroy");
+ run['default'](this.container, 'destroy');
}
});
});
enifed('ember-application/system/application', ['exports', 'dag-map', 'container/registry', 'ember-metal', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/lazy_load', 'ember-runtime/system/namespace', 'ember-runtime/mixins/deferred', 'ember-application/system/resolver', 'ember-metal/platform/create', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/controllers/controller', 'ember-metal/enumerable_utils', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-views/system/renderer', 'dom-helper', 'ember-views/views/select', 'ember-routing-views/views/outlet', 'ember-views/views/view', 'ember-views/views/metamorph_view', 'ember-views/system/event_dispatcher', 'ember-views/system/jquery', 'ember-routing/system/route', 'ember-routing/system/router', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/location/none_location', 'ember-routing/system/cache', 'ember-application/system/application-instance', 'ember-extension-support/container_debug_adapter', 'ember-metal/environment'], function (exports, DAG, Registry, Ember, property_get, property_set, lazy_load, Namespace, DeferredMixin, DefaultResolver, create, run, utils, Controller, EnumerableUtils, ObjectController, ArrayController, Renderer, DOMHelper, SelectView, outlet, EmberView, _MetamorphView, EventDispatcher, jQuery, Route, Router, HashLocation, HistoryLocation, AutoLocation, NoneLocation, BucketCache, ApplicationInstance, ContainerDebugAdapter, environment) {
@@ -4496,12 +4496,11 @@
resolve: null, // required
parseName: null, // required
lookupDescription: null, // required
makeToString: null, // required
resolveOther: null, // required
- _logLookup: null // required
- });exports['default'] = EmberObject['default'].extend({
+ _logLookup: null });exports['default'] = EmberObject['default'].extend({
/**
This will be set to the Application instance when it is
created.
@property namespace
*/
@@ -4830,11 +4829,11 @@
@method canCatalogEntriesByType
@param {String} type The type. e.g. "model", "controller", "route"
@return {boolean} whether a list is available for this type.
*/
canCatalogEntriesByType: function (type) {
- if (type === "model" || type === "template") {
+ if (type === 'model' || type === 'template') {
return false;
}
return true;
},
@@ -4856,12 +4855,12 @@
if (!namespace.hasOwnProperty(key)) {
continue;
}
if (typeSuffixRegex.test(key)) {
var klass = namespace[key];
- if (utils.typeOf(klass) === "class") {
- types.push(string.dasherize(key.replace(typeSuffixRegex, "")));
+ if (utils.typeOf(klass) === 'class') {
+ types.push(string.dasherize(key.replace(typeSuffixRegex, '')));
}
}
}
}
});
@@ -4966,12 +4965,12 @@
this.releaseMethods.pushObject(release);
return release;
},
_nameToClass: function (type) {
- if (typeof type === "string") {
- type = this.container.lookupFactory("model:" + type);
+ if (typeof type === 'string') {
+ type = this.container.lookupFactory('model:' + type);
}
return type;
},
/**
@@ -5092,11 +5091,11 @@
var onChange = function () {
typesUpdated([self.wrapModelType(type)]);
};
var observer = {
didChange: function () {
- run['default'].scheduleOnce("actions", this, onChange);
+ run['default'].scheduleOnce('actions', this, onChange);
},
willChange: function () {
return this;
}
};
@@ -5130,11 +5129,11 @@
var records = this.getRecords(type);
var typeToSend;
typeToSend = {
name: name || type.toString(),
- count: property_get.get(records, "length"),
+ count: property_get.get(records, 'length'),
columns: this.columnsForType(type),
object: type
};
return typeToSend;
@@ -5146,15 +5145,15 @@
@method getModelTypes
@return {Array} Array of model types
*/
getModelTypes: function () {
var self = this;
- var containerDebugAdapter = this.get("containerDebugAdapter");
+ var containerDebugAdapter = this.get('containerDebugAdapter');
var types;
- if (containerDebugAdapter.canCatalogEntriesByType("model")) {
- types = containerDebugAdapter.catalogEntriesByType("model");
+ if (containerDebugAdapter.canCatalogEntriesByType('model')) {
+ types = containerDebugAdapter.catalogEntriesByType('model');
} else {
types = this._getObjectsOnNamespaces();
}
// New adapters return strings instead of classes
@@ -5194,11 +5193,11 @@
if (!self.detect(namespace[key])) {
continue;
}
var name = string.dasherize(key);
if (!(namespace instanceof Application['default']) && namespace.toString()) {
- name = namespace + "/" + name;
+ name = namespace + '/' + name;
}
types.push(name);
}
});
return types;
@@ -5297,30 +5296,30 @@
});
enifed('ember-htmlbars', ['ember-metal/core', 'ember-template-compiler', 'ember-htmlbars/system/make-view-helper', 'ember-htmlbars/system/make_bound_helper', 'ember-htmlbars/helpers', 'ember-htmlbars/helpers/view', 'ember-htmlbars/helpers/component', 'ember-htmlbars/helpers/yield', 'ember-htmlbars/helpers/with', 'ember-htmlbars/helpers/log', 'ember-htmlbars/helpers/debugger', 'ember-htmlbars/helpers/bind-attr', 'ember-htmlbars/helpers/if_unless', 'ember-htmlbars/helpers/loc', 'ember-htmlbars/helpers/partial', 'ember-htmlbars/helpers/template', 'ember-htmlbars/helpers/input', 'ember-htmlbars/helpers/text_area', 'ember-htmlbars/helpers/collection', 'ember-htmlbars/helpers/each', 'ember-htmlbars/helpers/unbound', 'ember-htmlbars/system/bootstrap', 'ember-htmlbars/compat'], function (Ember, ember_template_compiler, makeViewHelper, makeBoundHelper, helpers, view, component, _yield, _with, log, _debugger, bind_attr, if_unless, loc, partial, template, input, text_area, collection, each, unbound) {
'use strict';
- helpers.registerHelper("view", view.viewHelper);
+ helpers.registerHelper('view', view.viewHelper);
- helpers.registerHelper("component", component.componentHelper);
+ helpers.registerHelper('component', component.componentHelper);
- helpers.registerHelper("yield", _yield.yieldHelper);
- helpers.registerHelper("with", _with.withHelper);
- helpers.registerHelper("if", if_unless.ifHelper);
- helpers.registerHelper("unless", if_unless.unlessHelper);
- helpers.registerHelper("log", log.logHelper);
- helpers.registerHelper("debugger", _debugger.debuggerHelper);
- helpers.registerHelper("loc", loc.locHelper);
- helpers.registerHelper("partial", partial.partialHelper);
- helpers.registerHelper("template", template.templateHelper);
- helpers.registerHelper("bind-attr", bind_attr.bindAttrHelper);
- helpers.registerHelper("bindAttr", bind_attr.bindAttrHelperDeprecated);
- helpers.registerHelper("input", input.inputHelper);
- helpers.registerHelper("textarea", text_area.textareaHelper);
- helpers.registerHelper("collection", collection.collectionHelper);
- helpers.registerHelper("each", each.eachHelper);
- helpers.registerHelper("unbound", unbound.unboundHelper);
+ helpers.registerHelper('yield', _yield.yieldHelper);
+ helpers.registerHelper('with', _with.withHelper);
+ helpers.registerHelper('if', if_unless.ifHelper);
+ helpers.registerHelper('unless', if_unless.unlessHelper);
+ helpers.registerHelper('log', log.logHelper);
+ helpers.registerHelper('debugger', _debugger.debuggerHelper);
+ helpers.registerHelper('loc', loc.locHelper);
+ helpers.registerHelper('partial', partial.partialHelper);
+ helpers.registerHelper('template', template.templateHelper);
+ helpers.registerHelper('bind-attr', bind_attr.bindAttrHelper);
+ helpers.registerHelper('bindAttr', bind_attr.bindAttrHelperDeprecated);
+ helpers.registerHelper('input', input.inputHelper);
+ helpers.registerHelper('textarea', text_area.textareaHelper);
+ helpers.registerHelper('collection', collection.collectionHelper);
+ helpers.registerHelper('each', each.eachHelper);
+ helpers.registerHelper('unbound', unbound.unboundHelper);
Ember['default'].HTMLBars = {
_registerHelper: helpers.registerHelper,
template: ember_template_compiler.template,
compile: ember_template_compiler.compile,
@@ -5390,11 +5389,11 @@
var slice = [].slice;
function calculateCompatType(item) {
if (utils.isStream(item)) {
- return "ID";
+ return 'ID';
} else {
var itemType = typeof item;
return itemType.toUpperCase();
}
@@ -5469,10 +5468,11 @@
}
HandlebarsCompatibleHelper.prototype = {
preprocessArguments: function () {}
};
+
function registerHandlebarsCompatibleHelper(name, value) {
var helper;
if (value && value.isHTMLBars) {
helper = value;
@@ -5757,17 +5757,11 @@
'use strict';
exports.registerHelper = registerHelper;
- var helpers = o_create['default'](null); /**
- @private
- @method _registerHelper
- @for Ember.HTMLBars
- @param {String} name
- @param {Object|Function} helperFunc the helper function to add
- */
+ var helpers = o_create['default'](null);
function registerHelper(name, helperFunc) {
var helper;
if (helperFunc && helperFunc.isHelper) {
helper = helperFunc;
@@ -5798,29 +5792,29 @@
var view = env.data.view;
// Handle classes differently, as we can bind multiple classes
- var classNameBindings = hash["class"];
+ var classNameBindings = hash['class'];
if (classNameBindings !== null && classNameBindings !== undefined) {
if (!utils.isStream(classNameBindings)) {
classNameBindings = applyClassNameBindings(classNameBindings, view);
}
- var classView = new AttrNode['default']("class", classNameBindings);
- classView._morph = env.dom.createAttrMorph(element, "class");
+ var classView = new AttrNode['default']('class', classNameBindings);
+ classView._morph = env.dom.createAttrMorph(element, 'class');
view.appendChild(classView);
}
var attrKeys = keys['default'](hash);
var attr, path, lazyValue, attrView;
for (var i = 0, l = attrKeys.length; i < l; i++) {
attr = attrKeys[i];
- if (attr === "class") {
+ if (attr === 'class') {
continue;
}
path = hash[attr];
if (utils.isStream(path)) {
lazyValue = path;
@@ -5835,15 +5829,15 @@
view.appendChild(attrView);
}
}
function applyClassNameBindings(classNameBindings, view) {
- var arrayOfClassNameBindings = classNameBindings.split(" ");
+ var arrayOfClassNameBindings = classNameBindings.split(' ');
var boundClassNameBindings = enumerable_utils.map(arrayOfClassNameBindings, function (classNameBinding) {
return class_name_binding.streamifyClassNameBinding(view, classNameBinding);
});
- var concatenatedClassNames = utils.concat(boundClassNameBindings, " ");
+ var concatenatedClassNames = utils.concat(boundClassNameBindings, ' ');
return concatenatedClassNames;
}
/**
See `bind-attr`
@@ -5855,11 +5849,11 @@
@param {Hash} options
@return {String} HTML string
*/
function bindAttrHelperDeprecated() {
- return helpers['default']["bind-attr"].helperFunction.apply(this, arguments);
+ return helpers['default']['bind-attr'].helperFunction.apply(this, arguments);
}
exports['default'] = bindAttrHelper;
});
@@ -5879,11 +5873,11 @@
var inverse = options.inverse;
var view = data.view;
// This should be deterministic, and should probably come from a
// parent view and not the controller.
- var controller = property_get.get(view, "controller");
+ var controller = property_get.get(view, 'controller');
var container = controller && controller.container ? controller.container : view.container;
// If passed a path string, convert that into an object.
// Otherwise, just default to the standard class.
var collectionClass;
@@ -5906,22 +5900,22 @@
itemViewClass = utils.readViewFactory(hash.itemViewClass, container);
} else {
itemViewClass = collectionPrototype.itemViewClass;
}
- if (typeof itemViewClass === "string") {
- itemViewClass = container.lookupFactory("view:" + itemViewClass);
+ if (typeof itemViewClass === 'string') {
+ itemViewClass = container.lookupFactory('view:' + itemViewClass);
}
delete hash.itemViewClass;
delete hash.itemView;
// Go through options passed to the {{collection}} helper and extract options
// that configure item views instead of the collection itself.
for (var prop in hash) {
- if (prop === "itemController" || prop === "itemClassBinding") {
+ if (prop === 'itemController' || prop === 'itemClassBinding') {
continue;
}
if (hash.hasOwnProperty(prop)) {
match = prop.match(/^item(.)(.*)$/);
if (match) {
@@ -5942,11 +5936,11 @@
delete options.template;
}
var emptyViewClass;
if (inverse) {
- emptyViewClass = property_get.get(collectionPrototype, "emptyViewClass");
+ emptyViewClass = property_get.get(collectionPrototype, 'emptyViewClass');
emptyViewClass = emptyViewClass.extend({
template: inverse,
tagName: itemHash.tagName
});
} else if (hash.emptyViewClass) {
@@ -5957,20 +5951,20 @@
}
var viewOptions = mergeViewBindings['default'](view, {}, itemHash);
if (hash.itemClassBinding) {
- var itemClassBindings = hash.itemClassBinding.split(" ");
+ var itemClassBindings = hash.itemClassBinding.split(' ');
viewOptions.classNameBindings = enumerable_utils.map(itemClassBindings, function (classBinding) {
return class_name_binding.streamifyClassNameBinding(view, classBinding);
});
}
hash.itemViewClass = itemViewClass;
hash._itemViewProps = viewOptions;
- options.helperName = options.helperName || "collection";
+ options.helperName = options.helperName || 'collection';
return env.helpers.view.helperFunction.call(this, [collectionClass], hash, options, env);
}
});
@@ -5985,11 +5979,11 @@
var view = env.data.view;
var componentNameParam = params[0];
var container = view.container || utils.read(view._keywords.view).container;
var props = {
- helperName: options.helperName || "component"
+ helperName: options.helperName || 'component'
};
if (options.template) {
props.template = options.template;
}
@@ -5999,11 +5993,11 @@
props = { _boundComponentOptions: Ember['default'].merge(hash, props) };
props._boundComponentOptions.componentNameStream = componentNameParam;
} else {
viewClass = streams__utils.readComponentFactory(componentNameParam, container);
if (!viewClass) {
- throw new EmberError['default']("HTMLBars error: Could not find component named \"" + componentNameParam + "\".");
+ throw new EmberError['default']('HTMLBars error: Could not find component named "' + componentNameParam + '".');
}
mergeViewBindings['default'](view, props, hash);
}
appendTemplatedView['default'](view, options.morph, viewClass, props);
@@ -6045,12 +6039,12 @@
@module ember
@submodule ember-htmlbars
*/
function eachHelper(params, hash, options, env) {
var view = env.data.view;
- var helperName = "each";
- var path = params[0] || view.getStream("");
+ var helperName = 'each';
+ var path = params[0] || view.getStream('');
var blockParams = options.template && options.template.blockParams;
if (blockParams) {
@@ -6079,20 +6073,20 @@
@module ember
@submodule ember-htmlbars
*/
function ifHelper(params, hash, options, env) {
- var helperName = options.helperName || "if";
+ var helperName = options.helperName || 'if';
return appendConditional(false, helperName, params, hash, options, env);
}
/**
@method unless
@for Ember.Handlebars.helpers
*/
function unlessHelper(params, hash, options, env) {
- var helperName = options.helperName || "unless";
+ var helperName = options.helperName || 'unless';
return appendConditional(true, helperName, params, hash, options, env);
}
function assertInlineIfNotEnabled() {
}
@@ -6115,11 +6109,11 @@
var falsyTemplate = (inverted ? options.template : options.inverse) || emptyTemplate['default'];
if (utils.isStream(condition)) {
view.appendChild(BoundIfView['default'], {
_morph: options.morph,
- _context: property_get.get(view, "context"),
+ _context: property_get.get(view, 'context'),
conditionStream: condition,
truthyTemplate: truthyTemplate,
falsyTemplate: falsyTemplate,
helperName: helperName
});
@@ -6148,19 +6142,19 @@
var onEvent = hash.on;
var inputType;
inputType = utils.read(hash.type);
- if (inputType === "checkbox") {
+ if (inputType === 'checkbox') {
delete hash.type;
env.helpers.view.helperFunction.call(this, [Checkbox['default']], hash, options, env);
} else {
delete hash.on;
- hash.onEvent = onEvent || "enter";
+ hash.onEvent = onEvent || 'enter';
env.helpers.view.helperFunction.call(this, [TextField['default']], hash, options, env);
}
}
});
@@ -6205,13 +6199,13 @@
var templateName = params[0];
if (utils.isStream(templateName)) {
view.appendChild(BoundPartialView['default'], {
_morph: options.morph,
- _context: property_get.get(view, "context"),
+ _context: property_get.get(view, 'context'),
templateNameStream: templateName,
- helperName: options.helperName || "partial"
+ helperName: options.helperName || 'partial'
});
} else {
var template = lookupPartial['default'](view, templateName);
return template.render(view, env, options.morph.contextualElement);
}
@@ -6224,11 +6218,11 @@
exports.templateHelper = templateHelper;
function templateHelper(params, hash, options, env) {
- options.helperName = options.helperName || "template";
+ options.helperName = options.helperName || 'template';
return env.helpers.partial.helperFunction.call(this, params, hash, options, env);
}
});
@@ -6253,18 +6247,18 @@
function unboundHelper(params, hash, options, env) {
if (params.length === 1) {
return utils.read(params[0]);
} else {
- options.helperName = options.helperName || "unbound";
+ options.helperName = options.helperName || 'unbound';
var view = env.data.view;
var helperName = params[0]._label;
var helper = lookupHelper['default'](helperName, view, env);
if (!helper) {
- throw new EmberError['default']("HTMLBars error: Could not find component or helper named " + helperName + ".");
+ throw new EmberError['default']('HTMLBars error: Could not find component or helper named ' + helperName + '.');
}
return helper.helperFunction.call(this, readParams(params), readHash(hash, view), options, env);
}
}
@@ -6284,11 +6278,11 @@
var unboundHash = {};
for (var prop in hash) {
if (mixin.IS_BINDING.test(prop)) {
var value = hash[prop];
- if (typeof value === "string") {
+ if (typeof value === 'string') {
value = view.getStream(value);
}
unboundHash[prop.slice(0, -7)] = utils.read(value);
} else {
@@ -6311,20 +6305,20 @@
var view = env.data.view;
var container = view.container || utils.read(view._keywords.view).container;
var viewClassOrInstance;
if (params.length === 0) {
if (container) {
- viewClassOrInstance = container.lookupFactory("view:toplevel");
+ viewClassOrInstance = container.lookupFactory('view:toplevel');
} else {
viewClassOrInstance = View['default'];
}
} else {
viewClassOrInstance = streams__utils.readViewFactory(params[0], container);
}
var props = {
- helperName: options.helperName || "view"
+ helperName: options.helperName || 'view'
};
if (options.template) {
props.template = options.template;
}
@@ -6354,15 +6348,15 @@
view.appendChild(WithView['default'], {
_morph: options.morph,
withValue: params[0],
preserveContext: preserveContext,
- previousContext: view.get("context"),
+ previousContext: view.get('context'),
controllerName: hash.controller,
mainTemplate: options.template,
inverseTemplate: options.inverse,
- helperName: options.helperName || "with"
+ helperName: options.helperName || 'with'
});
}
});
enifed('ember-htmlbars/helpers/yield', ['exports', 'ember-metal/core', 'ember-metal/property_get'], function (exports, Ember, property_get) {
@@ -6374,11 +6368,11 @@
function yieldHelper(params, hash, options, env) {
var view = env.data.view;
var layoutView = view;
// Yea gods
- while (layoutView && !property_get.get(layoutView, "layout")) {
+ while (layoutView && !property_get.get(layoutView, 'layout')) {
if (layoutView._contextView) {
layoutView = layoutView._contextView;
} else {
layoutView = layoutView._parentView;
}
@@ -6411,11 +6405,11 @@
var attrNode = new AttrNode['default'](attrName, attrValue);
attrNode._morph = morph;
env.data.view.appendChild(attrNode);
} else {
if (utils.isStream(attrValue)) {
- throw new EmberError['default']("Bound attributes are not yet supported in Ember.js");
+ throw new EmberError['default']('Bound attributes are not yet supported in Ember.js');
} else {
var sanitizedValue = sanitizeAttributeValue['default'](env.dom, element, attrName, attrValue);
env.dom.setProperty(element, attrName, sanitizedValue);
}
}
@@ -6485,11 +6479,11 @@
@module ember
@submodule ember-htmlbars
*/
function concat(env, parts) {
- return utils.concat(parts, "");
+ return utils.concat(parts, '');
}
});
enifed('ember-htmlbars/hooks/content', ['exports', 'ember-views/views/simple_bound_view', 'ember-metal/streams/utils', 'ember-htmlbars/system/lookup-helper'], function (exports, simple_bound_view, utils, lookupHelper) {
@@ -6539,14 +6533,14 @@
var fakeElement;
function updateElementAttributesFromString(dom, element, string) {
if (!fakeElement) {
- fakeElement = document.createElement("div");
+ fakeElement = document.createElement('div');
}
- fakeElement.innerHTML = "<" + element.tagName + " " + string + "><" + "/" + element.tagName + ">";
+ fakeElement.innerHTML = '<' + element.tagName + ' ' + string + '><' + '/' + element.tagName + '>';
var attrs = fakeElement.firstChild.attributes;
for (var i = 0, l = attrs.length; i < l; i++) {
var attr = attrs[i];
if (attr.specified) {
@@ -6683,11 +6677,11 @@
var noControllerInProto = !viewProto.controller;
if (viewProto.controller && viewProto.controller.isDescriptor) {
noControllerInProto = true;
}
if (noControllerInProto && !viewProto.controllerBinding && !props.controller && !props.controllerBinding) {
- props._context = property_get.get(parentView, "context"); // TODO: is this right?!
+ props._context = property_get.get(parentView, 'context'); // TODO: is this right?!
}
props._morph = morph;
return parentView.appendChild(viewClassOrInstance, props);
@@ -6704,26 +6698,26 @@
@module ember
@submodule ember-htmlbars
*/
function bootstrap(ctx) {
- var selectors = "script[type=\"text/x-handlebars\"], script[type=\"text/x-raw-handlebars\"]";
+ var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';
jQuery['default'](selectors, ctx).each(function () {
// Get a reference to the script tag
var script = jQuery['default'](this);
- var compile = script.attr("type") === "text/x-raw-handlebars" ? jQuery['default'].proxy(Handlebars.compile, Handlebars) : htmlbarsCompile['default'];
+ var compile = script.attr('type') === 'text/x-raw-handlebars' ? jQuery['default'].proxy(Handlebars.compile, Handlebars) : htmlbarsCompile['default'];
// Get the name of the script, used by Ember.View's templateName property.
// First look for data-template-name attribute, then fall back to its
// id if no name is found.
- var templateName = script.attr("data-template-name") || script.attr("id") || "application";
+ var templateName = script.attr('data-template-name') || script.attr('id') || 'application';
var template = compile(script.html());
// Check if template of same name already exists
if (Ember['default'].TEMPLATES[templateName] !== undefined) {
- throw new EmberError['default']("Template named \"" + templateName + "\" already exists.");
+ throw new EmberError['default']('Template named "' + templateName + '" already exists.');
}
// For templates which have a name, we save them and then remove them from the DOM
Ember['default'].TEMPLATES[templateName] = template;
@@ -6735,11 +6729,11 @@
function _bootstrap() {
bootstrap(jQuery['default'](document));
}
function registerComponentLookup(registry) {
- registry.register("component-lookup:main", ComponentLookup['default']);
+ registry.register('component-lookup:main', ComponentLookup['default']);
}
/*
We tie this to application.load to ensure that we've at least
attempted to bootstrap at the point that the application is loaded.
@@ -6749,19 +6743,19 @@
There's no harm to running this twice, since we remove the templates
from the DOM after processing.
*/
- lazy_load.onLoad("Ember.Application", function (Application) {
+ lazy_load.onLoad('Ember.Application', function (Application) {
Application.initializer({
- name: "domTemplates",
+ name: 'domTemplates',
initialize: environment['default'].hasDOM ? _bootstrap : function () {}
});
Application.initializer({
- name: "registerComponentLookup",
- after: "domTemplates",
+ name: 'registerComponentLookup',
+ after: 'domTemplates',
initialize: registerComponentLookup
});
});
exports['default'] = bootstrap;
@@ -6799,11 +6793,11 @@
@module ember
@submodule ember-htmlbars
*/
var ISNT_HELPER_CACHE = new Cache['default'](1000, function (key) {
- return key.indexOf("-") === -1;
+ return key.indexOf('-') === -1;
});
function lookupHelper(name, view, env) {
var helper = env.helpers[name];
if (helper) {
@@ -6814,14 +6808,14 @@
if (!container || ISNT_HELPER_CACHE.get(name)) {
return;
}
- var helperName = "helper:" + name;
+ var helperName = 'helper:' + name;
helper = container.lookup(helperName);
if (!helper) {
- var componentLookup = container.lookup("component-lookup:main");
+ var componentLookup = container.lookup('component-lookup:main');
var Component = componentLookup.lookupFactory(name, container);
if (Component) {
helper = makeViewHelper['default'](Component);
container._registry.register(helperName, helper);
@@ -6924,29 +6918,29 @@
return props;
}
function mergeGenericViewBindings(view, props, hash) {
for (var key in hash) {
- if (key === "id" || key === "tag" || key === "class" || key === "classBinding" || key === "classNameBindings" || key === "attributeBindings") {
+ if (key === 'id' || key === 'tag' || key === 'class' || key === 'classBinding' || key === 'classNameBindings' || key === 'attributeBindings') {
continue;
}
var value = hash[key];
if (mixin.IS_BINDING.test(key)) {
- if (typeof value === "string") {
+ if (typeof value === 'string') {
props[key] = view._getBindingForStream(value);
} else if (utils.isStream(value)) {
props[key] = view._getBindingForStream(value);
} else {
props[key] = value;
}
} else {
if (utils.isStream(value)) {
- props[key + "Binding"] = view._getBindingForStream(value);
+ props[key + 'Binding'] = view._getBindingForStream(value);
} else {
props[key] = value;
}
}
}
@@ -6962,31 +6956,31 @@
props.tagName = utils.read(hash.tag);
}
var classBindings = [];
- if (hash["class"]) {
- if (typeof hash["class"] === "string") {
- props.classNames = hash["class"].split(" ");
- } else if (hash["class"]._label) {
+ if (hash['class']) {
+ if (typeof hash['class'] === 'string') {
+ props.classNames = hash['class'].split(' ');
+ } else if (hash['class']._label) {
// label exists for via property paths in the template
// but not for streams with nested sub-expressions
- classBindings.push(hash["class"]._label);
+ classBindings.push(hash['class']._label);
} else {
// this stream did not have a label which means that
// it is not a simple property path type stream (likely
// the result of a sub-expression)
- classBindings.push(hash["class"]);
+ classBindings.push(hash['class']);
}
}
if (hash.classBinding) {
- a_push.apply(classBindings, hash.classBinding.split(" "));
+ a_push.apply(classBindings, hash.classBinding.split(' '));
}
if (hash.classNameBindings) {
- a_push.apply(classBindings, hash.classNameBindings.split(" "));
+ a_push.apply(classBindings, hash.classNameBindings.split(' '));
}
if (classBindings.length > 0) {
props.classNameBindings = classBindings;
@@ -7054,11 +7048,11 @@
return template.render(view, env, contextualElement, args);
}
function renderLegacyTemplate(view, buffer, template) {
- var context = property_get.get(view, "context");
+ var context = property_get.get(view, 'context');
var options = {
data: {
view: view,
buffer: buffer
}
@@ -7073,11 +7067,11 @@
'use strict';
exports['default'] = template['default']((function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7121,11 +7115,11 @@
'use strict';
exports['default'] = template['default']((function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7161,11 +7155,11 @@
'use strict';
exports['default'] = template['default']((function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7209,11 +7203,11 @@
'use strict';
exports['default'] = template['default']((function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7257,11 +7251,11 @@
'use strict';
exports['default'] = template['default']((function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7306,11 +7300,11 @@
exports['default'] = template['default']((function () {
var child0 = (function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7350,11 +7344,11 @@
})();
var child1 = (function () {
var child0 = (function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7392,11 +7386,11 @@
}
};
})();
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7436,11 +7430,11 @@
})();
var child2 = (function () {
var child0 = (function () {
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7478,11 +7472,11 @@
}
};
})();
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7520,11 +7514,11 @@
}
};
})();
return {
isHTMLBars: true,
- revision: "Ember@1.12.1",
+ revision: "Ember@1.12.2",
blockParams: 0,
cachedFragment: null,
hasRendered: false,
build: function build(dom) {
var el0 = dom.createDocumentFragment();
@@ -7584,12 +7578,12 @@
function htmlSafe(str) {
if (str === null || str === undefined) {
return "";
}
- if (typeof str !== "string") {
- str = "" + str;
+ if (typeof str !== 'string') {
+ str = '' + str;
}
return new htmlbars_util.SafeString(str);
}
EmberStringUtils['default'].htmlSafe = htmlSafe;
@@ -7697,11 +7691,11 @@
//
// For FastBoot purposes, rendering the DOM without a contextual element
// should work fine, because it essentially re-emits the original markup
// as a String, which will then be parsed again by the browser, which will
// apply the appropriate parsing rules.
- contextualElement = typeof document !== "undefined" ? document.body : null;
+ contextualElement = typeof document !== 'undefined' ? document.body : null;
}
element = this.createElement(view, contextualElement);
parents[level++] = parentIndex;
parentIndex = index;
@@ -7960,14 +7954,11 @@
computed.computed.defaultTo = computed_macros.defaultTo;
computed.computed.deprecatingAlias = computed_macros.deprecatingAlias;
computed.computed.and = computed_macros.and;
computed.computed.or = computed_macros.or;
computed.computed.any = computed_macros.any;
- computed.computed.collect = computed_macros.collect; // END IMPORTS
-
- // BEGIN EXPORTS
- var EmberInstrumentation = Ember['default'].Instrumentation = {};
+ computed.computed.collect = computed_macros.collect;var EmberInstrumentation = Ember['default'].Instrumentation = {};
EmberInstrumentation.instrument = instrumentation.instrument;
EmberInstrumentation.subscribe = instrumentation.subscribe;
EmberInstrumentation.unsubscribe = instrumentation.unsubscribe;
EmberInstrumentation.reset = instrumentation.reset;
@@ -8110,11 +8101,11 @@
* @private
*/
Ember['default'].Backburner = Backburner['default'];
Ember['default'].libraries = new Libraries['default']();
- Ember['default'].libraries.registerCoreLibrary("Ember", Ember['default'].VERSION);
+ Ember['default'].libraries.registerCoreLibrary('Ember', Ember['default'].VERSION);
Ember['default'].isNone = isNone['default'];
Ember['default'].isEmpty = isEmpty['default'];
Ember['default'].isBlank = isBlank['default'];
Ember['default'].isPresent = isPresent['default'];
@@ -8145,12 +8136,12 @@
Ember['default'].onerror = null;
// END EXPORTS
// do this for side-effects of updating Ember.assert, warn, etc when
// ember-debug is present
- if (Ember['default'].__loader.registry["ember-debug"]) {
- requireModule("ember-debug");
+ if (Ember['default'].__loader.registry['ember-debug']) {
+ requireModule('ember-debug');
}
exports['default'] = Ember['default'];
});
@@ -8240,11 +8231,11 @@
// Testing this is not ideal, but we want to use native functions
// if available, but not to use versions created by libraries like Prototype
var isNativeFunc = function (func) {
// This should probably work in all browsers likely to have ES5 array methods
- return func && Function.prototype.toString.call(func).indexOf("[native code]") > -1;
+ return func && Function.prototype.toString.call(func).indexOf('[native code]') > -1;
};
var defineNativeShim = function (nativeFunc, shim) {
if (isNativeFunc(nativeFunc)) {
return nativeFunc;
@@ -8474,11 +8465,11 @@
/**
@method toString
@return {String} string representation of binding
*/
toString: function () {
- var oneWay = this._oneWay ? "[oneWay]" : "";
+ var oneWay = this._oneWay ? '[oneWay]' : '';
return "Ember.Binding<" + utils.guidFor(this) + ">(" + this._from + " -> " + this._to + ")" + oneWay;
},
// ..........................................................
// CONNECT AND SYNC
@@ -8539,31 +8530,31 @@
// PRIVATE
//
/* called when the from side changes */
fromDidChange: function (target) {
- this._scheduleSync(target, "fwd");
+ this._scheduleSync(target, 'fwd');
},
/* called when the to side changes */
toDidChange: function (target) {
- this._scheduleSync(target, "back");
+ this._scheduleSync(target, 'back');
},
_scheduleSync: function (obj, dir) {
var existingDir = this._direction;
// if we haven't scheduled the binding yet, schedule it
if (existingDir === undefined) {
- run['default'].schedule("sync", this, this._sync, obj);
+ run['default'].schedule('sync', this, this._sync, obj);
this._direction = dir;
}
// If both a 'back' and 'fwd' sync have been scheduled on the same object,
// default to a 'fwd' sync so that it remains deterministic.
- if (existingDir === "back" && dir === "fwd") {
- this._direction = "fwd";
+ if (existingDir === 'back' && dir === 'fwd') {
+ this._direction = 'fwd';
}
},
_sync: function (obj) {
var log = Ember['default'].LOG_BINDINGS;
@@ -8581,32 +8572,32 @@
var toPath = this._to;
this._direction = undefined;
// if we're synchronizing from the remote object...
- if (direction === "fwd") {
+ if (direction === 'fwd') {
var fromValue = getWithGlobals(obj, this._from);
if (log) {
- Ember['default'].Logger.log(" ", this.toString(), "->", fromValue, obj);
+ Ember['default'].Logger.log(' ', this.toString(), '->', fromValue, obj);
}
if (this._oneWay) {
property_set.trySet(obj, toPath, fromValue);
} else {
observer._suspendObserver(obj, toPath, this, this.toDidChange, function () {
property_set.trySet(obj, toPath, fromValue);
});
}
// if we're synchronizing *to* the remote object
- } else if (direction === "back") {
- var toValue = property_get.get(obj, this._to);
- if (log) {
- Ember['default'].Logger.log(" ", this.toString(), "<-", toValue, obj);
+ } else if (direction === 'back') {
+ var toValue = property_get.get(obj, this._to);
+ if (log) {
+ Ember['default'].Logger.log(' ', this.toString(), '<-', toValue, obj);
+ }
+ observer._suspendObserver(obj, fromPath, this, this.fromDidChange, function () {
+ property_set.trySet(path_cache.isGlobal(fromPath) ? Ember['default'].lookup : obj, fromPath, toValue);
+ });
}
- observer._suspendObserver(obj, fromPath, this, this.fromDidChange, function () {
- property_set.trySet(path_cache.isGlobal(fromPath) ? Ember['default'].lookup : obj, fromPath, toValue);
- });
- }
}
};
function mixinProperties(to, from) {
@@ -8801,10 +8792,11 @@
Must be relative to obj.
@param {String} from The path to the 'from' side of the binding.
Must be relative to obj or a global path.
@return {Ember.Binding} binding instance
*/
+
function bind(obj, to, from) {
return new Binding(to, from).connect(obj);
}
/**
@@ -8815,10 +8807,11 @@
Must be relative to obj.
@param {String} from The path to the 'from' side of the binding.
Must be relative to obj or a global path.
@return {Ember.Binding} binding instance
*/
+
function oneWay(obj, to, from) {
return new Binding(to, from).oneWay().connect(obj);
}
exports.isGlobalPath = path_cache.isGlobal;
@@ -8896,11 +8889,11 @@
function firstKey(path) {
return path.match(FIRST_KEY)[0];
}
function isObject(obj) {
- return obj && typeof obj === "object";
+ return obj && typeof obj === 'object';
}
var pendingQueue = [];
// attempts to add the pendingQueue chains again. If some of them end up
@@ -8917,22 +8910,22 @@
array.forEach.call(queue, function (q) {
q[0].add(q[1]);
});
- warn("Watching an undefined global, Ember expects watched globals to be" + " setup by the time the run loop is flushed, check for typos", pendingQueue.length === 0);
+ warn('Watching an undefined global, Ember expects watched globals to be' + ' setup by the time the run loop is flushed, check for typos', pendingQueue.length === 0);
}
function addChainWatcher(obj, keyName, node) {
if (!isObject(obj)) {
return;
}
var m = utils.meta(obj);
var nodes = m.chainWatchers;
- if (!m.hasOwnProperty("chainWatchers")) {
+ if (!m.hasOwnProperty('chainWatchers')) {
// FIXME?!
nodes = m.chainWatchers = {};
}
if (!nodes[keyName]) {
@@ -8945,12 +8938,12 @@
function removeChainWatcher(obj, keyName, node) {
if (!isObject(obj)) {
return;
}
- var m = obj["__ember_meta__"];
- if (m && !m.hasOwnProperty("chainWatchers")) {
+ var m = obj['__ember_meta__'];
+ if (m && !m.hasOwnProperty('chainWatchers')) {
return;
}
var nodes = m && m.chainWatchers;
@@ -8993,21 +8986,21 @@
// Special-case: the EachProxy relies on immediate evaluation to
// establish its observers.
//
// TODO: Replace this with an efficient callback that the EachProxy
// can implement.
- if (this._parent && this._parent._key === "@each") {
+ if (this._parent && this._parent._key === '@each') {
this.value();
}
}
function lazyGet(obj, key) {
if (!obj) {
return;
}
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
// check if object meant only to be a prototype
if (meta && meta.proto === obj) {
return;
}
@@ -9015,11 +9008,11 @@
return property_get.get(obj, key);
}
// if a CP only return cached value
var possibleDesc = obj[key];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (desc && desc._cacheable) {
if (meta.cache && key in meta.cache) {
return meta.cache[key];
} else {
return;
@@ -9082,20 +9075,20 @@
path = path.slice(key.length + 1);
// global path, but object does not exist yet.
// put into a queue and try to connect later.
} else if (!tuple[0]) {
- pendingQueue.push([this, path]);
- tuple.length = 0;
- return;
+ pendingQueue.push([this, path]);
+ tuple.length = 0;
+ return;
- // global path, and object already exists
- } else {
- src = tuple[0];
- key = path.slice(0, 0 - (tuple[1].length + 1));
- path = tuple[1];
- }
+ // global path, and object already exists
+ } else {
+ src = tuple[0];
+ key = path.slice(0, 0 - (tuple[1].length + 1));
+ path = tuple[1];
+ }
tuple.length = 0;
this.chain(key, path, src);
},
@@ -9183,38 +9176,38 @@
}
},
chainWillChange: function (chain, path, depth, events) {
if (this._key) {
- path = this._key + "." + path;
+ path = this._key + '.' + path;
}
if (this._parent) {
this._parent.chainWillChange(this, path, depth + 1, events);
} else {
if (depth > 1) {
events.push(this.value(), path);
}
- path = "this." + path;
+ path = 'this.' + path;
if (this._paths[path] > 0) {
events.push(this.value(), path);
}
}
},
chainDidChange: function (chain, path, depth, events) {
if (this._key) {
- path = this._key + "." + path;
+ path = this._key + '.' + path;
}
if (this._parent) {
this._parent.chainDidChange(this, path, depth + 1, events);
} else {
if (depth > 1) {
events.push(this.value(), path);
}
- path = "this." + path;
+ path = 'this.' + path;
if (this._paths[path] > 0) {
events.push(this.value(), path);
}
}
},
@@ -9230,11 +9223,11 @@
}
this._value = undefined;
// Special-case: the EachProxy relies on immediate evaluation to
// establish its observers.
- if (this._parent && this._parent._key === "@each") {
+ if (this._parent && this._parent._key === '@each') {
this.value();
}
}
// then notify chains...
@@ -9257,13 +9250,14 @@
if (this._parent) {
this._parent.chainDidChange(this, this._key, 1, events);
}
}
};
+
function finishChains(obj) {
// We only create meta if we really have to
- var m = obj["__ember_meta__"];
+ var m = obj['__ember_meta__'];
var chains, chainWatchers, chainNodes;
if (m) {
// finish any current chains node watchers that reference obj
chainWatchers = m.chainWatchers;
@@ -9848,10 +9842,12 @@
}
var cp = new ComputedProperty(func);
// jscs:disable
+ // Empty block on purpose
+
if (args) {
cp.property.apply(cp, args);
}
return cp;
@@ -9869,11 +9865,11 @@
@param {String} key the name of the property whose cached value you want
to return
@return {Object} the cached value
*/
function cacheFor(obj, key) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var cache = meta && meta.cache;
var ret = cache && cache[key];
if (ret === UNDEFINED) {
return undefined;
@@ -9969,12 +9965,13 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which negate
the original value for property
*/
+
function empty(dependentKey) {
- return computed.computed(dependentKey + ".length", function () {
+ return computed.computed(dependentKey + '.length', function () {
return isEmpty['default'](property_get.get(this, dependentKey));
});
}
/**
@@ -9999,12 +9996,13 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns true if
original value for property is not empty.
*/
+
function notEmpty(dependentKey) {
- return computed.computed(dependentKey + ".length", function () {
+ return computed.computed(dependentKey + '.length', function () {
return !isEmpty['default'](property_get.get(this, dependentKey));
});
}
/**
@@ -10032,10 +10030,11 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which
returns true if original value for property is null or undefined.
*/
+
function none(dependentKey) {
return computed.computed(dependentKey, function () {
return isNone['default'](property_get.get(this, dependentKey));
});
}
@@ -10062,10 +10061,11 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which returns
inverse of the original value for property
*/
+
function not(dependentKey) {
return computed.computed(dependentKey, function () {
return !property_get.get(this, dependentKey);
});
}
@@ -10094,10 +10094,11 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which converts
to boolean the original value for property
*/
+
function bool(dependentKey) {
return computed.computed(dependentKey, function () {
return !!property_get.get(this, dependentKey);
});
}
@@ -10128,15 +10129,16 @@
@param {String} dependentKey
@param {RegExp} regexp
@return {Ember.ComputedProperty} computed property which match
the original value for property against a given RegExp
*/
+
function match(dependentKey, regexp) {
return computed.computed(dependentKey, function () {
var value = property_get.get(this, dependentKey);
- return typeof value === "string" ? regexp.test(value) : false;
+ return typeof value === 'string' ? regexp.test(value) : false;
});
}
/**
A computed property that returns true if the provided dependent property
@@ -10163,10 +10165,11 @@
@param {String} dependentKey
@param {String|Number|Object} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is equal to the given value.
*/
+
function equal(dependentKey, value) {
return computed.computed(dependentKey, function () {
return property_get.get(this, dependentKey) === value;
});
}
@@ -10196,10 +10199,11 @@
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater than given value.
*/
+
function gt(dependentKey, value) {
return computed.computed(dependentKey, function () {
return property_get.get(this, dependentKey) > value;
});
}
@@ -10229,10 +10233,11 @@
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is greater or equal then given value.
*/
+
function gte(dependentKey, value) {
return computed.computed(dependentKey, function () {
return property_get.get(this, dependentKey) >= value;
});
}
@@ -10262,10 +10267,11 @@
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less then given value.
*/
+
function lt(dependentKey, value) {
return computed.computed(dependentKey, function () {
return property_get.get(this, dependentKey) < value;
});
}
@@ -10295,10 +10301,11 @@
@param {String} dependentKey
@param {Number} value
@return {Ember.ComputedProperty} computed property which returns true if
the original value for property is less or equal than given value.
*/
+
function lte(dependentKey, value) {
return computed.computed(dependentKey, function () {
return property_get.get(this, dependentKey) <= value;
});
}
@@ -10421,10 +10428,11 @@
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which creates a
one way computed property to the original value for property.
@since 1.5.0
*/
+
function readOnly(dependentKey) {
return alias['default'](dependentKey).readOnly();
}
/**
@@ -10452,10 +10460,11 @@
@param {String} defaultPath
@return {Ember.ComputedProperty} computed property which acts like
a standard getter and setter, but defaults to the value from `defaultPath`.
@deprecated Use `Ember.computed.oneWay` or custom CP with default instead.
*/
+
function defaultTo(defaultPath) {
return computed.computed({
get: function (key) {
return property_get.get(this, defaultPath);
},
@@ -10477,10 +10486,11 @@
@param {String} dependentKey
@return {Ember.ComputedProperty} computed property which creates an
alias with a deprecation to the original value for property.
@since 1.7.0
*/
+
function deprecatingAlias(dependentKey) {
return computed.computed(dependentKey, {
get: function (key) {
return property_get.get(this, dependentKey);
},
@@ -10525,11 +10535,11 @@
The core Runtime framework is based on the jQuery API with a number of
performance optimizations.
@class Ember
@static
- @version 1.12.1
+ @version 1.12.2
*/
if ('undefined' === typeof Ember) {
// Create core object. Make it act like an instance of Ember.Namespace so that
// objects assigned to it are given a sane string representation.
@@ -10554,14 +10564,14 @@
};
/**
@property VERSION
@type String
- @default '1.12.1'
+ @default '1.12.2'
@static
*/
- Ember.VERSION = '1.12.1';
+ Ember.VERSION = '1.12.2';
/**
Standard environmental variables. You can define these in a global `EmberENV`
variable before loading Ember to control various configuration settings.
@@ -10735,30 +10745,11 @@
exports.addDependentKeys = addDependentKeys;
exports.removeDependentKeys = removeDependentKeys;
- "REMOVE_USE_STRICT: true"; /**
- @module ember-metal
- */
-
- // ..........................................................
- // DEPENDENT KEYS
- //
-
- // data structure:
- // meta.deps = {
- // 'depKey': {
- // 'keyName': count,
- // }
- // }
-
- /*
- This function returns a map of unique dependencies for a
- given object and key.
- */
- function keysForDep(depsMeta, depKey) {
+ "REMOVE_USE_STRICT: true";function keysForDep(depsMeta, depKey) {
var keys = depsMeta[depKey];
if (!keys) {
// if there are no dependencies yet for a the given key
// create a new empty list of dependencies for the key
keys = depsMeta[depKey] = {};
@@ -10769,12 +10760,13 @@
}
return keys;
}
function metaForDeps(meta) {
- return keysForDep(meta, "deps");
+ return keysForDep(meta, 'deps');
}
+
function addDependentKeys(desc, obj, keyName, meta) {
// the descriptor has a list of dependent keys, so
// add all of its dependent keys.
var depsMeta, idx, len, depKey, keys;
var depKeys = desc._dependentKeys;
@@ -10894,10 +10886,11 @@
* @param {Function} callback The callback to execute
* @param {Object} thisArg Value to use as this when executing *callback*
*
* @return {Array} An array of mapped values.
*/
+
function map(obj, callback, thisArg) {
return obj.map ? obj.map(callback, thisArg) : ember_metal__array.map.call(obj, callback, thisArg);
}
/**
@@ -10908,10 +10901,11 @@
* @param {Object} obj The object to call forEach on
* @param {Function} callback The callback to execute
* @param {Object} thisArg Value to use as this when executing *callback*
*
*/
+
function forEach(obj, callback, thisArg) {
return obj.forEach ? obj.forEach(callback, thisArg) : ember_metal__array.forEach.call(obj, callback, thisArg);
}
/**
@@ -10924,10 +10918,11 @@
* @param {Object} thisArg Value to use as this when executing *callback*
*
* @return {Array} An array containing the filtered values
* @since 1.4.0
*/
+
function filter(obj, callback, thisArg) {
return obj.filter ? obj.filter(callback, thisArg) : ember_metal__array.filter.call(obj, callback, thisArg);
}
/**
@@ -10938,10 +10933,11 @@
* @param {Object} obj The object to call indexOn on
* @param {Function} callback The callback to execute
* @param {Object} index The index to start searching from
*
*/
+
function indexOf(obj, element, index) {
return obj.indexOf ? obj.indexOf(element, index) : ember_metal__array.indexOf.call(obj, element, index);
}
/**
@@ -10961,10 +10957,11 @@
* @param {Array} elements The elements to search for on *obj*
*
* @return {Array} An array of indexes.
*
*/
+
function indexesOf(obj, elements) {
return elements === undefined ? [] : map(elements, function (item) {
return indexOf(obj, item);
});
}
@@ -10977,10 +10974,11 @@
* @param {Array} array The array the passed item should be added to
* @param {Object} item The item to add to the passed array
*
* @return 'undefined'
*/
+
function addObject(array, item) {
var index = indexOf(array, item);
if (index === -1) {
array.push(item);
}
@@ -10994,10 +10992,11 @@
* @param {Array} array The array to remove the item from.
* @param {Object} item The item to remove from the passed array.
*
* @return 'undefined'
*/
+
function removeObject(array, item) {
var index = indexOf(array, item);
if (index !== -1) {
array.splice(index, 1);
}
@@ -11052,10 +11051,11 @@
* @param {Array} objects An array of zero or more objects that should be
* inserted into the array at *idx*
*
* @return {Array} The modified array.
*/
+
function replace(array, idx, amt, objects) {
if (array.replace) {
return array.replace(idx, amt, objects);
} else {
return _replace(array, idx, amt, objects);
@@ -11083,10 +11083,11 @@
* @param {Array} array1 The first array
* @param {Array} array2 The second array
*
* @return {Array} The intersection of the two passed arrays.
*/
+
function intersection(array1, array2) {
var result = [];
forEach(array1, function (element) {
if (indexOf(array2, element) >= 0) {
result.push(element);
@@ -11137,11 +11138,11 @@
environment = {
hasDOM: false,
isChrome: false,
location: null,
history: null,
- userAgent: 'Lynx (textmode)',
+ userAgent: "Lynx (textmode)",
global: null
};
}
exports['default'] = environment;
@@ -11197,12 +11198,11 @@
exports.hasListeners = hasListeners;
exports.listenersFor = listenersFor;
exports.on = on;
exports.removeListener = removeListener;
- "REMOVE_USE_STRICT: true"; /* listener flags */
- var ONCE = 1;
+ "REMOVE_USE_STRICT: true";var ONCE = 1;
var SUSPENDED = 2;
/*
The event system uses a series of nested hashes to store listeners on an
object. When a listener is registered, or when an event arrives, these
@@ -11260,12 +11260,13 @@
actions.__source__ = obj;
}
return actions;
}
+
function accumulateListeners(obj, eventName, otherActions) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var actions = meta && meta.listeners && meta.listeners[eventName];
if (!actions) {
return;
}
@@ -11296,13 +11297,14 @@
@param {String} eventName
@param {Object|Function} target A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
@param {Boolean} once A flag whether a function should only be called once
*/
+
function addListener(obj, eventName, target, method, once) {
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
var actions = actionsFor(obj, eventName);
@@ -11317,11 +11319,11 @@
return;
}
actions.push(target, method, flags);
- if ("function" === typeof obj.didAddListener) {
+ if ('function' === typeof obj.didAddListener) {
obj.didAddListener(eventName, target, method);
}
}
/**
@@ -11336,11 +11338,11 @@
@param {Object|Function} target A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
*/
function removeListener(obj, eventName, target, method) {
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
function _removeListener(target, method) {
@@ -11352,19 +11354,19 @@
return;
}
actions.splice(actionIndex, 3);
- if ("function" === typeof obj.didRemoveListener) {
+ if ('function' === typeof obj.didRemoveListener) {
obj.didRemoveListener(eventName, target, method);
}
}
if (method) {
_removeListener(target, method);
} else {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var actions = meta && meta.listeners && meta.listeners[eventName];
if (!actions) {
return;
}
@@ -11390,12 +11392,13 @@
@param {String} eventName
@param {Object|Function} target A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
@param {Function} callback
*/
+
function suspendListener(obj, eventName, target, method, callback) {
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
var actions = actionsFor(obj, eventName);
@@ -11428,12 +11431,13 @@
@param {Array} eventNames Array of event names
@param {Object|Function} target A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
@param {Function} callback
*/
+
function suspendListeners(obj, eventNames, target, method, callback) {
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
var suspendedActions = [];
@@ -11472,17 +11476,18 @@
@private
@method watchedEvents
@for Ember
@param obj
*/
+
function watchedEvents(obj) {
- var listeners = obj["__ember_meta__"].listeners;
+ var listeners = obj['__ember_meta__'].listeners;
var ret = [];
if (listeners) {
for (var eventName in listeners) {
- if (eventName !== "__source__" && listeners[eventName]) {
+ if (eventName !== '__source__' && listeners[eventName]) {
ret.push(eventName);
}
}
}
return ret;
@@ -11500,18 +11505,19 @@
@param {String} eventName
@param {Array} params Optional parameters for each listener.
@param {Array} actions Optional array of actions (listeners).
@return true
*/
+
function sendEvent(obj, eventName, params, actions) {
// first give object a chance to handle it
- if (obj !== Ember['default'] && "function" === typeof obj.sendEvent) {
+ if (obj !== Ember['default'] && 'function' === typeof obj.sendEvent) {
obj.sendEvent(eventName, params);
}
if (!actions) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
actions = meta && meta.listeners && meta.listeners[eventName];
}
if (!actions) {
return;
@@ -11533,11 +11539,11 @@
removeListener(obj, eventName, target, method);
}
if (!target) {
target = obj;
}
- if ("string" === typeof method) {
+ if ('string' === typeof method) {
if (params) {
utils.applyStr(target, method, params);
} else {
target[method]();
}
@@ -11557,12 +11563,13 @@
@method hasListeners
@for Ember
@param obj
@param {String} eventName
*/
+
function hasListeners(obj, eventName) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var actions = meta && meta.listeners && meta.listeners[eventName];
return !!(actions && actions.length);
}
@@ -11571,13 +11578,14 @@
@method listenersFor
@for Ember
@param obj
@param {String} eventName
*/
+
function listenersFor(obj, eventName) {
var ret = [];
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var actions = meta && meta.listeners && meta.listeners[eventName];
if (!actions) {
return ret;
}
@@ -11612,10 +11620,11 @@
@for Ember
@param {String} eventNames*
@param {Function} func
@return func
*/
+
function on() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
@@ -11708,11 +11717,11 @@
function getProperties(obj) {
var ret = {};
var propertyNames = arguments;
var i = 1;
- if (arguments.length === 2 && utils.typeOf(arguments[1]) === "array") {
+ if (arguments.length === 2 && utils.typeOf(arguments[1]) === 'array') {
i = 0;
propertyNames = arguments[1];
}
for (var len = propertyNames.length; i < len; i++) {
ret[propertyNames[i]] = property_get.get(obj, propertyNames[i]);
@@ -11733,14 +11742,14 @@
AliasedPropertyPrototype.oneWay.call(this);
}
function injectedPropertyGet(keyName) {
var possibleDesc = this[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
- return this.container.lookup(desc.type + ":" + (desc.name || keyName));
+ return this.container.lookup(desc.type + ':' + (desc.name || keyName));
}
InjectedProperty.prototype = create['default'](properties.Descriptor.prototype);
var InjectedPropertyPrototype = InjectedProperty.prototype;
@@ -11784,11 +11793,11 @@
cache[name] = listeners;
return listeners;
};
var time = (function () {
- var perf = "undefined" !== typeof window ? window.performance || {} : {};
+ var perf = 'undefined' !== typeof window ? window.performance || {} : {};
var fn = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow;
// fn.bind will be available in all the browsers that support the advanced window.performance... ;-)
return fn ? fn.bind(perf) : function () {
return +new Date();
};
@@ -11803,12 +11812,13 @@
@param {String} [name] Namespaced event name.
@param {Object} payload
@param {Function} callback Function that you're instrumenting.
@param {Object} binding Context that instrument function is called with.
*/
+
function instrument(name, _payload, callback, binding) {
- if (arguments.length <= 3 && typeof _payload === "function") {
+ if (arguments.length <= 3 && typeof _payload === 'function') {
binding = callback;
callback = _payload;
_payload = undefined;
}
if (subscribers.length === 0) {
@@ -11885,10 +11895,11 @@
@param {String} [pattern] Namespaced event name.
@param {Object} [object] Before and After hooks.
@return {Subscriber}
*/
+
function subscribe(pattern, object) {
var paths = pattern.split(".");
var path;
var regex = [];
@@ -11922,10 +11933,11 @@
@method unsubscribe
@namespace Ember.Instrumentation
@param {Object} [subscriber]
*/
+
function unsubscribe(subscriber) {
var index;
for (var i = 0, l = subscribers.length; i < l; i++) {
if (subscribers[i] === subscriber) {
@@ -11941,10 +11953,11 @@
Resets `Ember.Instrumentation` by flushing list of subscribers.
@method reset
@namespace Ember.Instrumentation
*/
+
function reset() {
subscribers.length = 0;
cache = {};
}
@@ -12157,31 +12170,31 @@
function consoleMethod(name) {
var consoleObj, logToConsole;
if (Ember['default'].imports.console) {
consoleObj = Ember['default'].imports.console;
- } else if (typeof console !== "undefined") {
+ } else if (typeof console !== 'undefined') {
consoleObj = console;
}
- var method = typeof consoleObj === "object" ? consoleObj[name] : null;
+ var method = typeof consoleObj === 'object' ? consoleObj[name] : null;
if (method) {
// Older IE doesn't support bind, but Chrome needs it
- if (typeof method.bind === "function") {
+ if (typeof method.bind === 'function') {
logToConsole = method.bind(consoleObj);
- logToConsole.displayName = "console." + name;
+ logToConsole.displayName = 'console.' + name;
return logToConsole;
- } else if (typeof method.apply === "function") {
+ } else if (typeof method.apply === 'function') {
logToConsole = function () {
method.apply(consoleObj, arguments);
};
- logToConsole.displayName = "console." + name;
+ logToConsole.displayName = 'console.' + name;
return logToConsole;
} else {
return function () {
- var message = Array.prototype.join.call(arguments, ", ");
+ var message = Array.prototype.join.call(arguments, ', ');
method(message);
};
}
}
}
@@ -12217,11 +12230,11 @@
```
@method log
@for Ember.Logger
@param {*} arguments
*/
- log: consoleMethod("log") || K,
+ log: consoleMethod('log') || K,
/**
Prints the arguments to the console with a warning icon.
You can pass as many arguments as you want and they will be joined together with a space.
```javascript
@@ -12230,11 +12243,11 @@
```
@method warn
@for Ember.Logger
@param {*} arguments
*/
- warn: consoleMethod("warn") || K,
+ warn: consoleMethod('warn') || K,
/**
Prints the arguments to the console with an error icon, red text and a stack trace.
You can pass as many arguments as you want and they will be joined together with a space.
```javascript
@@ -12243,11 +12256,11 @@
```
@method error
@for Ember.Logger
@param {*} arguments
*/
- error: consoleMethod("error") || K,
+ error: consoleMethod('error') || K,
/**
Logs the arguments to the console.
You can pass as many arguments as you want and they will be joined together with a space.
```javascript
@@ -12257,11 +12270,11 @@
```
@method info
@for Ember.Logger
@param {*} arguments
*/
- info: consoleMethod("info") || K,
+ info: consoleMethod('info') || K,
/**
Logs the arguments to the console in blue text.
You can pass as many arguments as you want and they will be joined together with a space.
```javascript
@@ -12271,11 +12284,11 @@
```
@method debug
@for Ember.Logger
@param {*} arguments
*/
- debug: consoleMethod("debug") || consoleMethod("info") || K,
+ debug: consoleMethod('debug') || consoleMethod('info') || K,
/**
If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace.
```javascript
Ember.Logger.assert(true); // undefined
@@ -12283,11 +12296,11 @@
```
@method assert
@for Ember.Logger
@param {Boolean} bool Value to test
*/
- assert: consoleMethod("assert") || assertPolyfill
+ assert: consoleMethod('assert') || assertPolyfill
};
});
enifed('ember-metal/map', ['exports', 'ember-metal/utils', 'ember-metal/array', 'ember-metal/platform/create', 'ember-metal/deprecate_property'], function (exports, utils, array, create, deprecate_property) {
@@ -12318,11 +12331,11 @@
Map is mocked out to look like an Ember object, so you can do
`Ember.Map.create()` for symmetry with other Ember classes.
*/
function missingFunction(fn) {
- throw new TypeError("" + Object.prototype.toString.call(fn) + " is not a function");
+ throw new TypeError(Object.prototype.toString.call(fn) + " is not a function");
}
function missingNew(name) {
throw new TypeError("Constructor " + name + " requires 'new'");
}
@@ -12475,11 +12488,11 @@
@method forEach
@param {Function} fn
@param self
*/
forEach: function (fn /*, ...thisArg*/) {
- if (typeof fn !== "function") {
+ if (typeof fn !== 'function') {
missingFunction(fn);
}
if (this.size === 0) {
return;
@@ -12523,11 +12536,11 @@
return set;
}
};
- deprecate_property.deprecateProperty(OrderedSet.prototype, "length", "size");
+ deprecate_property.deprecateProperty(OrderedSet.prototype, 'length', 'size');
/**
A Map stores values indexed by keys. Unlike JavaScript's
default Objects, the keys of a Map can be any JavaScript
object.
@@ -12680,11 +12693,11 @@
@param {Function} callback
@param {*} self if passed, the `this` value inside the
callback. By default, `this` is the map.
*/
forEach: function (callback /*, ...thisArg*/) {
- if (typeof callback !== "function") {
+ if (typeof callback !== 'function') {
missingFunction(callback);
}
if (this.size === 0) {
return;
@@ -12724,11 +12737,11 @@
copy: function () {
return copyMap(this, new Map());
}
};
- deprecate_property.deprecateProperty(Map.prototype, "length", "size");
+ deprecate_property.deprecateProperty(Map.prototype, 'length', 'size');
/**
@class MapWithDefault
@namespace Ember
@extends Ember.Map
@@ -12869,18 +12882,18 @@
function mixinsMeta(obj) {
var m = utils.meta(obj, true);
var ret = m.mixins;
if (!ret) {
ret = m.mixins = {};
- } else if (!m.hasOwnProperty("mixins")) {
+ } else if (!m.hasOwnProperty('mixins')) {
ret = m.mixins = o_create['default'](ret);
}
return ret;
}
function isMethod(obj) {
- return "function" === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;
+ return 'function' === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;
}
var CONTINUE = {};
function mixinProperties(mixinsMeta, mixin) {
@@ -12921,11 +12934,11 @@
// If we didn't find the original descriptor in a parent mixin, find
// it on the original object.
if (!superProperty) {
var possibleDesc = base[key];
- var superDesc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var superDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
superProperty = superDesc;
}
if (superProperty === undefined || !(superProperty instanceof computed.ComputedProperty)) {
@@ -12948,11 +12961,11 @@
return property;
}
var sourceAvailable = (function () {
return this;
- }).toString().indexOf("return this;") > -1;
+ }).toString().indexOf('return this;') > -1;
function giveMethodSuper(obj, key, method, values, descs) {
var superMethod;
// Methods overwrite computed properties, and do not call super to them.
@@ -12964,20 +12977,20 @@
// If we didn't find the original value in a parent mixin, find it in
// the original object
superMethod = superMethod || obj[key];
// Only wrap the new method if the original method was a function
- if (superMethod === undefined || "function" !== typeof superMethod) {
+ if (superMethod === undefined || 'function' !== typeof superMethod) {
return method;
}
var hasSuper;
if (sourceAvailable) {
hasSuper = method.__hasSuper;
if (hasSuper === undefined) {
- hasSuper = method.toString().indexOf("_super") > -1;
+ hasSuper = method.toString().indexOf('_super') > -1;
method.__hasSuper = hasSuper;
}
}
if (sourceAvailable === false || hasSuper) {
@@ -12989,11 +13002,11 @@
function applyConcatenatedProperties(obj, key, value, values) {
var baseValue = values[key] || obj[key];
if (baseValue) {
- if ("function" === typeof baseValue.concat) {
+ if ('function' === typeof baseValue.concat) {
if (value === null || value === undefined) {
return baseValue;
} else {
return baseValue.concat(value);
}
@@ -13051,11 +13064,11 @@
}
descs[key] = value;
values[key] = undefined;
} else {
- if (concats && array.indexOf.call(concats, key) >= 0 || key === "concatenatedProperties" || key === "mergedProperties") {
+ if (concats && array.indexOf.call(concats, key) >= 0 || key === 'concatenatedProperties' || key === 'mergedProperties') {
value = applyConcatenatedProperties(base, key, value, values);
} else if (mergings && array.indexOf.call(mergings, key) >= 0) {
value = applyMergedProperties(base, key, value, values);
} else if (isMethod(value)) {
value = giveMethodSuper(base, key, value, values, descs);
@@ -13085,23 +13098,23 @@
if (props) {
meta = utils.meta(base);
if (base.willMergeMixin) {
base.willMergeMixin(props);
}
- concats = concatenatedMixinProperties("concatenatedProperties", props, values, base);
- mergings = concatenatedMixinProperties("mergedProperties", props, values, base);
+ concats = concatenatedMixinProperties('concatenatedProperties', props, values, base);
+ mergings = concatenatedMixinProperties('mergedProperties', props, values, base);
for (key in props) {
if (!props.hasOwnProperty(key)) {
continue;
}
keys.push(key);
addNormalizedProperty(base, key, props[key], meta, descs, values, concats, mergings);
}
// manually copy toString() because some JS engines do not enumerate it
- if (props.hasOwnProperty("toString")) {
+ if (props.hasOwnProperty('toString')) {
base.toString = props.toString;
}
} else if (currentMixin.mixins) {
mergeMixins(currentMixin.mixins, m, descs, values, base, keys);
if (currentMixin._without) {
@@ -13116,11 +13129,11 @@
function detectBinding(obj, key, value, m) {
if (IS_BINDING.test(key)) {
var bindings = m.bindings;
if (!bindings) {
bindings = m.bindings = {};
- } else if (!m.hasOwnProperty("bindings")) {
+ } else if (!m.hasOwnProperty('bindings')) {
bindings = m.bindings = o_create['default'](m.bindings);
}
bindings[key] = value;
}
}
@@ -13188,11 +13201,11 @@
var value;
var possibleDesc;
if (descs[altKey] || values[altKey]) {
value = values[altKey];
desc = descs[altKey];
- } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor) {
+ } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor) {
desc = possibleDesc;
value = undefined;
} else {
desc = undefined;
value = obj[altKey];
@@ -13212,20 +13225,20 @@
}
function replaceObserversAndListeners(obj, key, observerOrListener) {
var prev = obj[key];
- if ("function" === typeof prev) {
- updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", ember_metal__observer.removeBeforeObserver);
- updateObserversAndListeners(obj, key, prev, "__ember_observes__", ember_metal__observer.removeObserver);
- updateObserversAndListeners(obj, key, prev, "__ember_listens__", events.removeListener);
+ if ('function' === typeof prev) {
+ updateObserversAndListeners(obj, key, prev, '__ember_observesBefore__', ember_metal__observer.removeBeforeObserver);
+ updateObserversAndListeners(obj, key, prev, '__ember_observes__', ember_metal__observer.removeObserver);
+ updateObserversAndListeners(obj, key, prev, '__ember_listens__', events.removeListener);
}
- if ("function" === typeof observerOrListener) {
- updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", ember_metal__observer.addBeforeObserver);
- updateObserversAndListeners(obj, key, observerOrListener, "__ember_observes__", ember_metal__observer.addObserver);
- updateObserversAndListeners(obj, key, observerOrListener, "__ember_listens__", events.addListener);
+ if ('function' === typeof observerOrListener) {
+ updateObserversAndListeners(obj, key, observerOrListener, '__ember_observesBefore__', ember_metal__observer.addBeforeObserver);
+ updateObserversAndListeners(obj, key, observerOrListener, '__ember_observes__', ember_metal__observer.addObserver);
+ updateObserversAndListeners(obj, key, observerOrListener, '__ember_listens__', events.addListener);
}
}
function applyMixin(obj, mixins, partial) {
var descs = {};
@@ -13245,11 +13258,11 @@
// * Copying `toString` in broken browsers
mergeMixins(mixins, mixinsMeta(obj), descs, values, obj, keys);
for (var i = 0, l = keys.length; i < l; i++) {
key = keys[i];
- if (key === "constructor" || !values.hasOwnProperty(key)) {
+ if (key === 'constructor' || !values.hasOwnProperty(key)) {
continue;
}
desc = descs[key];
value = values[key];
@@ -13286,10 +13299,11 @@
@for Ember
@param obj
@param mixins*
@return obj
*/
+
function mixin(obj) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
@@ -13392,17 +13406,18 @@
@method create
@static
@param arguments*
*/
Mixin.create = function () {
+ // ES6TODO: this relies on a global state?
+ Ember['default'].anyUnprocessedMixins = true;
+ var M = this;
+
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
- // ES6TODO: this relies on a global state?
- Ember['default'].anyUnprocessedMixins = true;
- var M = this;
return new M(args, undefined);
};
var MixinPrototype = Mixin.prototype;
@@ -13482,24 +13497,25 @@
return false;
}
if (obj instanceof Mixin) {
return _detect(obj, this, {});
}
- var m = obj["__ember_meta__"];
+ var m = obj['__ember_meta__'];
var mixins = m && m.mixins;
if (mixins) {
return !!mixins[utils.guidFor(this)];
}
return false;
};
MixinPrototype.without = function () {
+ var ret = new Mixin([this]);
+
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
- var ret = new Mixin([this]);
ret._without = args;
return ret;
};
function _keys(ret, mixin, seen) {
@@ -13536,11 +13552,11 @@
};
// returns the mixins currently applied to the specified object
// TODO: Make Ember.mixin
Mixin.mixins = function (obj) {
- var m = obj["__ember_meta__"];
+ var m = obj['__ember_meta__'];
var mixins = m && m.mixins;
var ret = [];
if (!mixins) {
return ret;
@@ -13558,19 +13574,20 @@
return ret;
};
REQUIRED = new ember_metal__properties.Descriptor();
REQUIRED.toString = function () {
- return "(Required Property)";
+ return '(Required Property)';
};
/**
Denotes a required property for a mixin
@method required
@for Ember
*/
+
function required() {
return REQUIRED;
}
function Alias(methodName) {
@@ -13599,10 +13616,11 @@
@method aliasMethod
@for Ember
@param {String} methodName name of the method to alias
*/
+
function aliasMethod(methodName) {
return new Alias(methodName);
}
// ..........................................................
@@ -13630,10 +13648,11 @@
@for Ember
@param {String} propertyNames*
@param {Function} func
@return func
*/
+
function observer() {
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
@@ -13687,10 +13706,11 @@
@for Ember
@param {String} propertyNames*
@param {Function} func
@return func
*/
+
function immediateObserver() {
for (var i = 0, l = arguments.length; i < l; i++) {
var arg = arguments[i];
}
@@ -13737,10 +13757,11 @@
@for Ember
@param {String} propertyNames*
@param {Function} func
@return func
*/
+
function beforeObserver() {
for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
@@ -13791,12 +13812,12 @@
exports._suspendBeforeObservers = _suspendBeforeObservers;
exports._suspendObservers = _suspendObservers;
exports.beforeObserversFor = beforeObserversFor;
exports.removeBeforeObserver = removeBeforeObserver;
- var AFTER_OBSERVERS = ":change";
- var BEFORE_OBSERVERS = ":before";
+ var AFTER_OBSERVERS = ':change';
+ var BEFORE_OBSERVERS = ':before';
function changeEvent(keyName) {
return keyName + AFTER_OBSERVERS;
}
@@ -13810,10 +13831,11 @@
@param obj
@param {String} path
@param {Object|Function} targetOrMethod
@param {Function|String} [method]
*/
+
function addObserver(obj, _path, target, method) {
ember_metal__events.addListener(obj, changeEvent(_path), target, method);
watching.watch(obj, _path);
return this;
@@ -13829,10 +13851,11 @@
@param obj
@param {String} path
@param {Object|Function} target
@param {Function|String} [method]
*/
+
function removeObserver(obj, path, target, method) {
watching.unwatch(obj, path);
ember_metal__events.removeListener(obj, changeEvent(path), target, method);
return this;
@@ -13844,10 +13867,11 @@
@param obj
@param {String} path
@param {Object|Function} target
@param {Function|String} [method]
*/
+
function addBeforeObserver(obj, path, target, method) {
ember_metal__events.addListener(obj, beforeEvent(path), target, method);
watching.watch(obj, path);
return this;
@@ -13886,10 +13910,11 @@
@param obj
@param {String} path
@param {Object|Function} target
@param {Function|String} [method]
*/
+
function removeBeforeObserver(obj, path, target, method) {
watching.unwatch(obj, path);
ember_metal__events.removeListener(obj, beforeEvent(path), target, method);
return this;
@@ -14000,11 +14025,13 @@
isGlobalPathCache: isGlobalPathCache,
hasThisCache: hasThisCache,
firstDotIndexCache: firstDotIndexCache,
firstKeyCache: firstKeyCache,
tailPathCache: tailPathCache
- };function isGlobal(path) {
+ };
+
+ function isGlobal(path) {
return isGlobalCache.get(path);
}
function isGlobalPath(path) {
return isGlobalPathCache.get(path);
@@ -14032,24 +14059,11 @@
enifed('ember-metal/platform/create', ['exports', 'ember-metal/platform/define_properties'], function (exports, defineProperties) {
- 'REMOVE_USE_STRICT: true'; /**
- @class platform
- @namespace Ember
- @static
- */
-
- /**
- Identical to `Object.create()`. Implements if not available natively.
-
- @since 1.8.0
- @method create
- @for Ember
- */
- var create;
+ "REMOVE_USE_STRICT: true";var create;
// ES5 15.2.3.5
// http://es5.github.com/#x15.2.3.5
if (!(Object.create && !Object.create(null).hasOwnProperty)) {
/* jshint scripturl:true, proto:true */
// Contributed by Brandon Benvie, October, 2012
@@ -14058,11 +14072,11 @@
// the following produces false positives
// in Opera Mini => not a reliable check
// Object.prototype.__proto__ === null
if (supportsProto || typeof document === 'undefined') {
createEmpty = function () {
- return { '__proto__': null };
+ return { "__proto__": null };
};
} else {
// In old IE __proto__ can't be used to manually set `null`, nor does
// any other method exist to make an object that inherits from nothing,
// aside from Object.prototype itself. Instead, create a new global
@@ -14101,17 +14115,17 @@
function Type() {} // An empty constructor.
if (prototype === null) {
object = createEmpty();
} else {
- if (typeof prototype !== 'object' && typeof prototype !== 'function') {
+ if (typeof prototype !== "object" && typeof prototype !== "function") {
// In the native implementation `parent` can be `null`
// OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc)
// Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object`
// like they are in modern browsers. Using `Object.create` on DOM elements
// is...err...probably inappropriate, but the native version allows for it.
- throw new TypeError('Object prototype may only be an Object or null'); // same msg as Chrome
+ throw new TypeError("Object prototype may only be an Object or null"); // same msg as Chrome
}
Type.prototype = prototype;
object = new Type();
@@ -14262,14 +14276,14 @@
if (!canDefinePropertyOnDOM) {
defineProperty = function (obj, keyName, desc) {
var isNode;
- if (typeof Node === 'object') {
+ if (typeof Node === "object") {
isNode = obj instanceof Node;
} else {
- isNode = typeof obj === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string';
+ isNode = typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string";
}
if (isNode) {
// TODO: Should we have a warning here?
return obj[keyName] = desc.value;
@@ -14319,11 +14333,11 @@
};
}
function DEFAULT_GETTER_FUNCTION(name) {
return function GETTER_FUNCTION() {
- var meta = this["__ember_meta__"];
+ var meta = this['__ember_meta__'];
return meta && meta.values[name];
};
}
/**
@@ -14369,19 +14383,20 @@
computed property) or an ES5 descriptor.
You must provide this or `data` but not both.
@param {*} [data] something other than a descriptor, that will
become the explicit value of this property.
*/
+
function defineProperty(obj, keyName, desc, data, meta) {
var possibleDesc, existingDesc, watching, value;
if (!meta) {
meta = utils.meta(obj);
}
var watchEntry = meta.watching[keyName];
possibleDesc = obj[keyName];
- existingDesc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ existingDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
watching = watchEntry !== undefined && watchEntry > 0;
if (existingDesc) {
existingDesc.teardown(obj, keyName);
@@ -14460,15 +14475,15 @@
@param {Object} obj The object with the property that will change
@param {String} keyName The property key (or path) that will change.
@return {void}
*/
function propertyWillChange(obj, keyName) {
- var m = obj["__ember_meta__"];
- var watching = m && m.watching[keyName] > 0 || keyName === "length";
+ var m = obj['__ember_meta__'];
+ var watching = m && m.watching[keyName] > 0 || keyName === 'length';
var proto = m && m.proto;
var possibleDesc = obj[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (!watching) {
return;
}
@@ -14499,26 +14514,26 @@
@param {Object} obj The object with the property that will change
@param {String} keyName The property key (or path) that will change.
@return {void}
*/
function propertyDidChange(obj, keyName) {
- var m = obj["__ember_meta__"];
- var watching = m && m.watching[keyName] > 0 || keyName === "length";
+ var m = obj['__ember_meta__'];
+ var watching = m && m.watching[keyName] > 0 || keyName === 'length';
var proto = m && m.proto;
var possibleDesc = obj[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (proto === obj) {
return;
}
// shouldn't this mean that we're watching this key?
if (desc && desc.didChange) {
desc.didChange(obj, keyName);
}
- if (!watching && keyName !== "length") {
+ if (!watching && keyName !== 'length') {
return;
}
if (m && m.deps && m.deps[keyName]) {
dependentKeysDidChange(obj, keyName, m);
@@ -14603,11 +14618,11 @@
if (deps) {
keys = keysOf(deps);
for (i = 0; i < keys.length; i++) {
key = keys[i];
possibleDesc = obj[key];
- desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (desc && desc._suspended === obj) {
continue;
}
@@ -14615,11 +14630,11 @@
}
}
}
function chainsWillChange(obj, keyName, m) {
- if (!(m.hasOwnProperty("chainWatchers") && m.chainWatchers[keyName])) {
+ if (!(m.hasOwnProperty('chainWatchers') && m.chainWatchers[keyName])) {
return;
}
var nodes = m.chainWatchers[keyName];
var events = [];
@@ -14633,11 +14648,11 @@
propertyWillChange(events[i], events[i + 1]);
}
}
function chainsDidChange(obj, keyName, m, suppressEvents) {
- if (!(m && m.hasOwnProperty("chainWatchers") && m.chainWatchers[keyName])) {
+ if (!(m && m.hasOwnProperty('chainWatchers') && m.chainWatchers[keyName])) {
return;
}
var nodes = m.chainWatchers[keyName];
var events = suppressEvents ? null : [];
@@ -14704,11 +14719,11 @@
function notifyBeforeObservers(obj, keyName) {
if (obj.isDestroying) {
return;
}
- var eventName = keyName + ":before";
+ var eventName = keyName + ':before';
var listeners, added;
if (deferred) {
listeners = beforeObserverSet.add(obj, keyName, eventName);
added = ember_metal__events.accumulateListeners(obj, eventName, listeners);
ember_metal__events.sendEvent(obj, eventName, [obj, keyName], added);
@@ -14720,11 +14735,11 @@
function notifyObservers(obj, keyName) {
if (obj.isDestroying) {
return;
}
- var eventName = keyName + ":change";
+ var eventName = keyName + ':change';
var listeners;
if (deferred) {
listeners = observerSet.add(obj, keyName, eventName);
ember_metal__events.accumulateListeners(obj, eventName, listeners);
} else {
@@ -14773,29 +14788,30 @@
@for Ember
@param {Object} obj The object to retrieve from.
@param {String} keyName The property key to retrieve
@return {Object} the property value or `null`.
*/
+
function get(obj, keyName) {
// Helpers that operate with 'this' within an #each
- if (keyName === "") {
+ if (keyName === '') {
return obj;
}
- if (!keyName && "string" === typeof obj) {
+ if (!keyName && 'string' === typeof obj) {
keyName = obj;
obj = Ember['default'].lookup;
}
if (isNone['default'](obj)) {
return _getPath(obj, keyName);
}
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var possibleDesc = obj[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
var ret;
if (desc === undefined && path_cache.isPath(keyName)) {
return _getPath(obj, keyName);
}
@@ -14805,11 +14821,11 @@
} else {
ret = obj[keyName];
- if (ret === undefined && "object" === typeof obj && !(keyName in obj) && "function" === typeof obj.unknownProperty) {
+ if (ret === undefined && 'object' === typeof obj && !(keyName in obj) && 'function' === typeof obj.unknownProperty) {
return obj.unknownProperty(keyName);
}
return ret;
}
@@ -14826,17 +14842,18 @@
@for Ember
@param {Object} target The current target. May be `null`.
@param {String} path A path on the target or a global property path.
@return {Array} a temporary array with the normalized target/path pair.
*/
+
function normalizeTuple(target, path) {
var hasThis = path_cache.hasThis(path);
var isGlobal = !hasThis && path_cache.isGlobal(path);
var key;
if (!target && !isGlobal) {
- return [undefined, ""];
+ return [undefined, ''];
}
if (hasThis) {
path = path.slice(5);
}
@@ -14860,10 +14877,11 @@
function validateIsPath(path) {
if (!path || path.length === 0) {
throw new EmberError['default']("Object in path " + path + " could not be found or was destroyed.");
}
}
+
function _getPath(root, path) {
var hasThis, parts, tuple, idx, len;
// detect complicated paths and normalize them
hasThis = path_cache.hasThis(path);
@@ -14904,11 +14922,11 @@
exports.set = set;
exports.trySet = trySet;
function set(obj, keyName, value, tolerant) {
- if (typeof obj === "string") {
+ if (typeof obj === 'string') {
value = keyName;
keyName = obj;
obj = Ember['default'].lookup;
}
@@ -14917,13 +14935,13 @@
return setPath(obj, keyName, value, tolerant);
}
var meta, possibleDesc, desc;
if (obj) {
- meta = obj["__ember_meta__"];
+ meta = obj['__ember_meta__'];
possibleDesc = obj[keyName];
- desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
}
var isUnknown, currentValue;
if ((!obj || desc === undefined) && path_cache.isPath(keyName)) {
return setPath(obj, keyName, value, tolerant);
@@ -14932,20 +14950,20 @@
if (desc) {
desc.set(obj, keyName, value);
} else {
- if (obj !== null && value !== undefined && typeof obj === "object" && obj[keyName] === value) {
+ if (obj !== null && value !== undefined && typeof obj === 'object' && obj[keyName] === value) {
return value;
}
- isUnknown = "object" === typeof obj && !(keyName in obj);
+ isUnknown = 'object' === typeof obj && !(keyName in obj);
// setUnknownProperty is called if `obj` is an object,
// the property does not already exist, and the
// `setUnknownProperty` method exists on the object
- if (isUnknown && "function" === typeof obj.setUnknownProperty) {
+ if (isUnknown && 'function' === typeof obj.setUnknownProperty) {
obj.setUnknownProperty(keyName, value);
} else if (meta && meta.watching[keyName] > 0) {
if (meta.proto !== obj) {
currentValue = obj[keyName];
@@ -14968,30 +14986,30 @@
function setPath(root, path, value, tolerant) {
var keyName;
// get the last part of the path
- keyName = path.slice(path.lastIndexOf(".") + 1);
+ keyName = path.slice(path.lastIndexOf('.') + 1);
// get the first part of the part
path = path === keyName ? keyName : path.slice(0, path.length - (keyName.length + 1));
// unless the path is this, look up the first part to
// get the root
- if (path !== "this") {
+ if (path !== 'this') {
root = property_get._getPath(root, path);
}
if (!keyName || keyName.length === 0) {
- throw new EmberError['default']("Property set failed: You passed an empty path");
+ throw new EmberError['default']('Property set failed: You passed an empty path');
}
if (!root) {
if (tolerant) {
return;
} else {
- throw new EmberError['default']("Property set failed: object in path \"" + path + "\" could not be found or was destroyed.");
+ throw new EmberError['default']('Property set failed: object in path "' + path + '" could not be found or was destroyed.');
}
}
return set(root, keyName, value);
}
@@ -15007,10 +15025,11 @@
@for Ember
@param {Object} obj The object to modify.
@param {String} path The property path to set
@param {Object} value The value to set
*/
+
function trySet(root, path, value) {
return set(root, path, value, true);
}
});
@@ -15266,11 +15285,11 @@
will be resolved on the target object at the time the scheduled item is
invoked allowing you to change the target function.
@param {Object} [arguments*] Optional arguments to be passed to the queued method.
@return {void}
*/
- run.schedule = function () {
+ run.schedule = function () /* queue, target, method */{
checkAutoRun();
backburner.schedule.apply(backburner, arguments);
};
// Used by global test teardown
@@ -15328,11 +15347,11 @@
target at the time the method is invoked.
@param {Object} [args*] Optional arguments to pass to the timeout.
@param {Number} wait Number of milliseconds to wait.
@return {*} Timer information for use in cancelling, see `run.cancel`.
*/
- run.later = function () {
+ run.later = function () /*target, method*/{
return backburner.later.apply(backburner, arguments);
};
/**
Schedule a function to run one time during the current RunLoop. This is equivalent
@@ -15345,15 +15364,16 @@
target at the time the method is invoked.
@param {Object} [args*] Optional arguments to pass to the timeout.
@return {Object} Timer information for use in cancelling, see `run.cancel`.
*/
run.once = function () {
+ checkAutoRun();
+
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
- checkAutoRun();
args.unshift('actions');
return backburner.scheduleOnce.apply(backburner, args);
};
/**
@@ -15405,11 +15425,11 @@
If you pass a string it will be resolved on the
target at the time the method is invoked.
@param {Object} [args*] Optional arguments to pass to the timeout.
@return {Object} Timer information for use in cancelling, see `run.cancel`.
*/
- run.scheduleOnce = function () {
+ run.scheduleOnce = function () /*queue, target, method*/{
checkAutoRun();
return backburner.scheduleOnce.apply(backburner, arguments);
};
/**
@@ -15664,11 +15684,10 @@
run._addQueue = function (name, after) {
if (array.indexOf.call(run.queues, name) === -1) {
run.queues.splice(array.indexOf.call(run.queues, after) + 1, 0, name);
}
};
- /* queue, target, method */ /*target, method*/ /*queue, target, method*/
});
enifed('ember-metal/set_properties', ['exports', 'ember-metal/property_events', 'ember-metal/property_set', 'ember-metal/keys'], function (exports, property_events, property_set, keys) {
'use strict';
@@ -15857,11 +15876,11 @@
Stream.prototype = {
isStream: true,
init: function () {
- this.state = "dirty";
+ this.state = 'dirty';
this.cache = undefined;
this.subscriberHead = null;
this.subscriberTail = null;
this.children = undefined;
this._label = undefined;
@@ -15888,14 +15907,14 @@
return keyStream.get(tailPath);
}
},
value: function () {
- if (this.state === "clean") {
+ if (this.state === 'clean') {
return this.cache;
- } else if (this.state === "dirty") {
- this.state = "clean";
+ } else if (this.state === 'dirty') {
+ this.state = 'clean';
return this.cache = this.valueFn();
}
// TODO: Ensure value is never called on a destroyed stream
// so that we can uncomment this assertion.
//
@@ -15913,12 +15932,12 @@
notify: function () {
this.notifyExcept();
},
notifyExcept: function (callbackToSkip, contextToSkip) {
- if (this.state === "clean") {
- this.state = "dirty";
+ if (this.state === 'clean') {
+ this.state = 'dirty';
this._notifySubscribers(callbackToSkip, contextToSkip);
}
},
subscribe: function (callback, context) {
@@ -15972,12 +15991,12 @@
}
}
},
destroy: function () {
- if (this.state !== "destroyed") {
- this.state = "destroyed";
+ if (this.state !== 'destroyed') {
+ this.state = 'destroyed';
var children = this.children;
for (var key in children) {
children[key].destroy();
}
@@ -16035,20 +16054,20 @@
_scheduleSync: function (value, callback, context) {
if (this.senderCallback === undefined && this.senderContext === undefined) {
this.senderCallback = callback;
this.senderContext = context;
this.senderValue = value;
- run['default'].schedule("sync", this, this._sync);
+ run['default'].schedule('sync', this, this._sync);
} else if (this.senderContext !== this) {
this.senderCallback = callback;
this.senderContext = context;
this.senderValue = value;
}
},
_sync: function () {
- if (this.state === "destroyed") {
+ if (this.state === 'destroyed') {
return;
}
if (this.senderContext !== this) {
this.stream.setValue(this.senderValue);
@@ -16059,11 +16078,11 @@
this.senderCallback = undefined;
this.senderContext = undefined;
this.senderValue = undefined;
// Force StreamBindings to always notify
- this.state = "clean";
+ this.state = 'clean';
this.notifyExcept(senderCallback, senderContext);
},
_super$destroy: Stream['default'].prototype.destroy,
@@ -16108,10 +16127,11 @@
@param {Object|Stream} object object or stream to potentially subscribe to
@param {Function} callback function to run when stream value changes
@param {Object} [context] the callback will be executed with this context if it
is provided
*/
+
function subscribe(object, callback, context) {
if (object && object.isStream) {
object.subscribe(callback, context);
}
}
@@ -16125,10 +16145,11 @@
@function unsubscribe
@param {Object|Stream} object object or stream to potentially unsubscribe from
@param {Function} callback function originally passed to `subscribe()`
@param {Object} [context] object originally passed to `subscribe()`
*/
+
function unsubscribe(object, callback, context) {
if (object && object.isStream) {
object.unsubscribe(callback, context);
}
}
@@ -16141,10 +16162,11 @@
@for Ember.stream
@function read
@param {Object|Stream} object object to return the value of
@return the stream's current value, or the non-stream object itself
*/
+
function read(object) {
if (object && object.isStream) {
return object.value();
} else {
return object;
@@ -16161,10 +16183,11 @@
@return {Array} a new array of the same length with the values of non-stream
objects mapped from their original positions untouched, and
the values of stream objects retaining their original position
and replaced with the stream's current value.
*/
+
function readArray(array) {
var length = array.length;
var ret = new Array(length);
for (var i = 0; i < length; i++) {
ret[i] = read(array[i]);
@@ -16183,10 +16206,11 @@
@return {Object} a new object with the same keys as the passed object. The
property values in the new object are the original values in
the case of non-stream objects, and the streams' current
values in the case of stream objects.
*/
+
function readHash(object) {
var ret = {};
for (var key in object) {
ret[key] = read(object[key]);
}
@@ -16201,10 +16225,11 @@
@function scanArray
@param {Array} array array given to a handlebars helper
@return {Boolean} `true` if the array contains a stream/bound value, `false`
otherwise
*/
+
function scanArray(array) {
var length = array.length;
var containsStream = false;
for (var i = 0; i < length; i++) {
@@ -16225,10 +16250,11 @@
@function scanHash
@param {Object} hash "hash" argument given to a handlebars helper
@return {Boolean} `true` if the object contains a stream/bound value, `false`
otherwise
*/
+
function scanHash(hash) {
var containsStream = false;
for (var prop in hash) {
if (isStream(hash[prop])) {
@@ -16251,10 +16277,11 @@
@param {String} separator string to be used to join array elements
@return {String} String with array elements concatenated and joined by the
provided separator, and any stream array members having been
replaced by the current value of the stream
*/
+
function concat(array, separator) {
// TODO: Create subclass ConcatStream < Stream. Defer
// subscribing to streams until the value() is called.
var hasStream = scanArray(array);
if (hasStream) {
@@ -16303,10 +16330,11 @@
stream that will be updated with the return value of
the provided function `fn`. In the case of a
non-stream object, the return value of the provided
function `fn`.
*/
+
function chain(value, fn) {
if (isStream(value)) {
var stream = new Stream['default'](fn);
subscribe(value, stream.notify, stream);
return stream;
@@ -16334,32 +16362,22 @@
exports.meta = meta;
exports.typeOf = typeOf;
exports.isArray = isArray;
exports.canInvoke = canInvoke;
- "REMOVE_USE_STRICT: true"; /**
- @module ember-metal
- */
+ "REMOVE_USE_STRICT: true";var _uuid = 0;
/**
- Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from
- jQuery master. We'll just bootstrap our own uuid now.
-
- @private
- @return {Number} the uuid
- */
- var _uuid = 0;
-
- /**
Generates a universally unique identifier. This method
is used internally by Ember for assisting with
the generation of GUID's and other unique identifiers
such as `bind-attr` data attributes.
@public
@return {Number} [description]
*/
+
function uuid() {
return ++_uuid;
}
/**
@@ -16368,11 +16386,11 @@
@property GUID_PREFIX
@for Ember
@type String
@final
*/
- var GUID_PREFIX = "ember";
+ var GUID_PREFIX = 'ember';
// Used for guid generation...
var numberCache = [];
var stringCache = {};
@@ -16438,11 +16456,11 @@
@property GUID_KEY
@for Ember
@type String
@final
*/
- var GUID_KEY = intern("__ember" + +new Date());
+ var GUID_KEY = intern('__ember' + +new Date());
var GUID_DESC = {
writable: true,
configurable: true,
enumerable: false,
@@ -16469,21 +16487,21 @@
enumerable: false,
value: null
};
var EMBER_META_PROPERTY = {
- name: "__ember_meta__",
+ name: '__ember_meta__',
descriptor: META_DESC
};
var GUID_KEY_PROPERTY = {
name: GUID_KEY,
descriptor: nullDescriptor
};
var NEXT_SUPER_PROPERTY = {
- name: "__nextSuper",
+ name: '__nextSuper',
descriptor: undefinedDescriptor
};
function generateGuid(obj, prefix) {
if (!prefix) {
@@ -16518,10 +16536,11 @@
@method guidFor
@for Ember
@param {Object} obj any object, string, number, Element, or primitive
@return {String} the unique guid for this instance.
*/
+
function guidFor(obj) {
// special cases where we don't want to add a key to object
if (obj === undefined) {
return "(undefined)";
@@ -16534,42 +16553,42 @@
var ret;
var type = typeof obj;
// Don't allow prototype changes to String etc. to change the guidFor
switch (type) {
- case "number":
+ case 'number':
ret = numberCache[obj];
if (!ret) {
- ret = numberCache[obj] = "nu" + obj;
+ ret = numberCache[obj] = 'nu' + obj;
}
return ret;
- case "string":
+ case 'string':
ret = stringCache[obj];
if (!ret) {
- ret = stringCache[obj] = "st" + uuid();
+ ret = stringCache[obj] = 'st' + uuid();
}
return ret;
- case "boolean":
- return obj ? "(true)" : "(false)";
+ case 'boolean':
+ return obj ? '(true)' : '(false)';
default:
if (obj[GUID_KEY]) {
return obj[GUID_KEY];
}
if (obj === Object) {
- return "(Object)";
+ return '(Object)';
}
if (obj === Array) {
- return "(Array)";
+ return '(Array)';
}
ret = GUID_PREFIX + uuid();
if (obj[GUID_KEY] === null) {
@@ -16651,11 +16670,11 @@
if (!ret) {
if (define_property.canDefineNonEnumerableProperties) {
if (obj.__defineNonEnumerable) {
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
} else {
- define_property.defineProperty(obj, "__ember_meta__", META_DESC);
+ define_property.defineProperty(obj, '__ember_meta__', META_DESC);
}
}
ret = new Meta(obj);
@@ -16663,24 +16682,25 @@
obj.__ember_meta__ = ret;
} else if (ret.source !== obj) {
if (obj.__defineNonEnumerable) {
obj.__defineNonEnumerable(EMBER_META_PROPERTY);
} else {
- define_property.defineProperty(obj, "__ember_meta__", META_DESC);
+ define_property.defineProperty(obj, '__ember_meta__', META_DESC);
}
ret = o_create['default'](ret);
ret.watching = o_create['default'](ret.watching);
ret.cache = undefined;
ret.cacheMeta = undefined;
ret.source = obj;
- obj["__ember_meta__"] = ret;
+ obj['__ember_meta__'] = ret;
}
return ret;
}
+
function getMeta(obj, property) {
var _meta = meta(obj, false);
return _meta[property];
}
@@ -16721,10 +16741,11 @@
@param {Array} path An array of keys to walk down
@param {Boolean} writable whether or not to create a new meta
(or meta property) if one does not already exist or if it's
shared with its constructor
*/
+
function metaPath(obj, path, writable) {
var _meta = meta(obj, writable);
var keyName, value;
for (var i = 0, l = path.length; i < l; i++) {
@@ -16760,10 +16781,11 @@
@for Ember
@param {Function} func The function to call
@param {Function} superFunc The super function.
@return {Function} wrapped function.
*/
+
function wrap(func, superFunc) {
function superWrapper() {
var ret;
var sup = this && this.__nextSuper;
var length = arguments.length;
@@ -16829,13 +16851,13 @@
// ES6TODO: Move up to runtime? This is only use in ember-metal by concatenatedProperties
function isArray(obj) {
var modulePath, type;
if (typeof EmberArray === "undefined") {
- modulePath = "ember-runtime/mixins/array";
+ modulePath = 'ember-runtime/mixins/array';
if (Ember['default'].__loader.registry[modulePath]) {
- EmberArray = Ember['default'].__loader.require(modulePath)["default"];
+ EmberArray = Ember['default'].__loader.require(modulePath)['default'];
}
}
if (!obj || obj.setInterval) {
return false;
@@ -16846,14 +16868,14 @@
if (EmberArray && EmberArray.detect(obj)) {
return true;
}
type = typeOf(obj);
- if ("array" === type) {
+ if ('array' === type) {
return true;
}
- if (obj.length !== undefined && "object" === type) {
+ if (obj.length !== undefined && 'object' === type) {
return true;
}
return false;
}
@@ -16877,10 +16899,11 @@
@method makeArray
@for Ember
@param {Object} obj the object
@return {Array}
*/
+
function makeArray(obj) {
if (obj === null || obj === undefined) {
return [];
}
return isArray(obj) ? obj : [obj];
@@ -16902,11 +16925,11 @@
@param {Object} obj The object to check for the method
@param {String} methodName The method name to check for
@return {Boolean}
*/
function canInvoke(obj, methodName) {
- return !!(obj && typeof obj[methodName] === "function");
+ return !!(obj && typeof obj[methodName] === 'function');
}
/**
Checks to see if the `methodName` exists on the `obj`,
and if it does, invokes it with the arguments passed.
@@ -16924,10 +16947,11 @@
@param {Object} obj The object to check for the method
@param {String} methodName The method name to check for
@param {Array} [args] The arguments to pass to the method
@return {*} the return value of the invoked method or undefined if it cannot be invoked
*/
+
function tryInvoke(obj, methodName, args) {
if (canInvoke(obj, methodName)) {
return args ? applyStr(obj, methodName, args) : applyStr(obj, methodName);
}
}
@@ -16937,11 +16961,11 @@
var count = 0;
try {
// jscs:disable
try {} finally {
count++;
- throw new Error("needsFinallyFixTest");
+ throw new Error('needsFinallyFixTest');
}
// jscs:enable
} catch (e) {}
return count !== 1;
@@ -17174,29 +17198,29 @@
function typeOf(item) {
var ret, modulePath;
// ES6TODO: Depends on Ember.Object which is defined in runtime.
if (typeof EmberObject === "undefined") {
- modulePath = "ember-runtime/system/object";
+ modulePath = 'ember-runtime/system/object';
if (Ember['default'].__loader.registry[modulePath]) {
- EmberObject = Ember['default'].__loader.require(modulePath)["default"];
+ EmberObject = Ember['default'].__loader.require(modulePath)['default'];
}
}
- ret = item === null || item === undefined ? String(item) : TYPE_MAP[toString.call(item)] || "object";
+ ret = item === null || item === undefined ? String(item) : TYPE_MAP[toString.call(item)] || 'object';
- if (ret === "function") {
+ if (ret === 'function') {
if (EmberObject && EmberObject.detect(item)) {
- ret = "class";
+ ret = 'class';
}
- } else if (ret === "object") {
+ } else if (ret === 'object') {
if (item instanceof Error) {
- ret = "error";
+ ret = 'error';
} else if (EmberObject && item instanceof EmberObject) {
- ret = "instance";
+ ret = 'instance';
} else if (item instanceof Date) {
- ret = "date";
+ ret = 'date';
}
}
return ret;
}
@@ -17212,32 +17236,33 @@
@for Ember
@param {Object} obj The object you want to inspect.
@return {String} A description of the object
@since 1.4.0
*/
+
function inspect(obj) {
var type = typeOf(obj);
- if (type === "array") {
- return "[" + obj + "]";
+ if (type === 'array') {
+ return '[' + obj + ']';
}
- if (type !== "object") {
- return obj + "";
+ if (type !== 'object') {
+ return obj + '';
}
var v;
var ret = [];
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
v = obj[key];
- if (v === "toString") {
+ if (v === 'toString') {
continue;
} // ignore useless items
- if (typeOf(v) === "function") {
+ if (typeOf(v) === 'function') {
v = "function() { ... }";
}
- if (v && typeof v.toString !== "function") {
+ if (v && typeof v.toString !== 'function') {
ret.push(key + ": " + toString.call(v));
} else {
ret.push(key + ": " + v);
}
}
@@ -17250,10 +17275,11 @@
/**
@param {Object} target
@param {Function} method
@param {Array} args
*/
+
function apply(t, m, a) {
var l = a && a.length;
if (!a || !l) {
return m.call(t);
}
@@ -17276,10 +17302,11 @@
/**
@param {Object} target
@param {String} method
@param {Array} args
*/
+
function applyStr(t, m, a) {
var l = a && a.length;
if (!a || !l) {
return t[m]();
}
@@ -17319,11 +17346,11 @@
exports.watchKey = watchKey;
exports.unwatchKey = unwatchKey;
function watchKey(obj, keyName, meta) {
// can't watch length on Array - it is special...
- if (keyName === "length" && utils.typeOf(obj) === "array") {
+ if (keyName === 'length' && utils.typeOf(obj) === 'array') {
return;
}
var m = meta || utils.meta(obj);
var watching = m.watching;
@@ -17331,16 +17358,16 @@
// activate watching first time
if (!watching[keyName]) {
watching[keyName] = 1;
var possibleDesc = obj[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (desc && desc.willWatch) {
desc.willWatch(obj, keyName);
}
- if ("function" === typeof obj.willWatchProperty) {
+ if ('function' === typeof obj.willWatchProperty) {
obj.willWatchProperty(keyName);
}
} else {
watching[keyName] = (watching[keyName] || 0) + 1;
@@ -17358,16 +17385,16 @@
if (watching[keyName] === 1) {
watching[keyName] = 0;
var possibleDesc = obj[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (desc && desc.didUnwatch) {
desc.didUnwatch(obj, keyName);
}
- if ("function" === typeof obj.didUnwatchProperty) {
+ if ('function' === typeof obj.didUnwatchProperty) {
obj.didUnwatchProperty(keyName);
}
} else if (watching[keyName] > 1) {
watching[keyName]--;
@@ -17390,13 +17417,14 @@
} else if (ret.value() !== obj) {
ret = m.chains = ret.copy(obj);
}
return ret;
}
+
function watchPath(obj, keyPath, meta) {
// can't watch length on Array - it is special...
- if (keyPath === "length" && utils.typeOf(obj) === "array") {
+ if (keyPath === 'length' && utils.typeOf(obj) === 'array') {
return;
}
var m = meta || utils.meta(obj);
var watching = m.watching;
@@ -17432,11 +17460,11 @@
exports.destroy = destroy;
exports.watch = watch;
function watch(obj, _keyPath, m) {
// can't watch length on Array - it is special...
- if (_keyPath === "length" && utils.typeOf(obj) === "array") {
+ if (_keyPath === 'length' && utils.typeOf(obj) === 'array') {
return;
}
if (!path_cache.isPath(_keyPath)) {
watch_key.watchKey(obj, _keyPath, m);
@@ -17444,18 +17472,19 @@
watch_path.watchPath(obj, _keyPath, m);
}
}
function isWatching(obj, key) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
return (meta && meta.watching[key]) > 0;
}
watch.flushPending = chains.flushPendingChains;
+
function unwatch(obj, _keyPath, m) {
// can't watch length on Array - it is special...
- if (_keyPath === "length" && utils.typeOf(obj) === "array") {
+ if (_keyPath === 'length' && utils.typeOf(obj) === 'array') {
return;
}
if (!path_cache.isPath(_keyPath)) {
watch_key.unwatchKey(obj, _keyPath, m);
@@ -17473,16 +17502,17 @@
@method destroy
@for Ember
@param {Object} obj the object to destroy
@return {void}
*/
+
function destroy(obj) {
- var meta = obj["__ember_meta__"];
+ var meta = obj['__ember_meta__'];
var node, nodes, key, nodeObject;
if (meta) {
- obj["__ember_meta__"] = null;
+ obj['__ember_meta__'] = null;
// remove chainWatchers to remove circular references that would prevent GC
node = meta.chains;
if (node) {
NODE_STACK.push(node);
// process tree
@@ -17520,16 +17550,16 @@
@module ember
@submodule ember-routing-htmlbars
@requires ember-routing
*/
- helpers.registerHelper("outlet", outlet.outletHelper);
- helpers.registerHelper("render", render.renderHelper);
- helpers.registerHelper("link-to", link_to.linkToHelper);
- helpers.registerHelper("linkTo", link_to.deprecatedLinkToHelper);
- helpers.registerHelper("action", action.actionHelper);
- helpers.registerHelper("query-params", query_params.queryParamsHelper);
+ helpers.registerHelper('outlet', outlet.outletHelper);
+ helpers.registerHelper('render', render.renderHelper);
+ helpers.registerHelper('link-to', link_to.linkToHelper);
+ helpers.registerHelper('linkTo', link_to.deprecatedLinkToHelper);
+ helpers.registerHelper('action', action.actionHelper);
+ helpers.registerHelper('query-params', query_params.queryParamsHelper);
exports['default'] = Ember['default'];
});
enifed('ember-routing-htmlbars/helpers/action', ['exports', 'ember-metal/core', 'ember-metal/utils', 'ember-metal/run_loop', 'ember-views/streams/utils', 'ember-views/system/utils', 'ember-views/system/action_manager', 'ember-metal/streams/utils'], function (exports, Ember, utils, run, streams__utils, system__utils, ActionManager, ember_metal__streams__utils) {
@@ -17570,11 +17600,11 @@
var isAllowedEvent = function (event, allowedKeys) {
if (typeof allowedKeys === "undefined") {
if (POINTER_EVENT_TYPE_REGEX.test(event.type)) {
return system__utils.isSimpleClick(event);
} else {
- allowedKeys = "";
+ allowedKeys = '';
}
}
if (allowedKeys.indexOf("any") >= 0) {
return true;
@@ -17628,11 +17658,11 @@
}
});
}
};
- options.view.on("willClearRender", function () {
+ options.view.on('willClearRender', function () {
delete ActionManager['default'].registeredActions[actionId];
});
return actionId;
};
@@ -17798,15 +17828,16 @@
@for Ember.Handlebars.helpers
@param {String} actionName
@param {Object} [context]*
@param {Hash} options
*/
+
function actionHelper(params, hash, options, env) {
var view = env.data.view;
var target;
if (!hash.target) {
- target = view.getStream("controller");
+ target = view.getStream('controller');
} else if (ember_metal__streams__utils.isStream(hash.target)) {
target = hash.target;
} else {
target = view.getStream(hash.target);
}
@@ -17823,11 +17854,11 @@
target: target,
withKeyCode: hash.withKeyCode
};
var actionId = ActionHelper.registerAction(params[0], actionOptions, hash.allowedKeys);
- env.dom.setAttribute(options.element, "data-ember-action", actionId);
+ env.dom.setAttribute(options.element, 'data-ember-action', actionId);
}
exports.ActionHelper = ActionHelper;
});
@@ -17877,21 +17908,21 @@
var lazyValue = params[i];
if (!lazyValue._isController) {
while (ControllerMixin['default'].detect(lazyValue.value())) {
- lazyValue = lazyValue.get("model");
+ lazyValue = lazyValue.get('model');
}
}
params[i] = lazyValue;
}
}
hash.params = params;
- options.helperName = options.helperName || "link-to";
+ options.helperName = options.helperName || 'link-to';
return env.helpers.view.helperFunction.call(this, [link.LinkView], hash, options, env);
}
/**
@@ -17904,11 +17935,11 @@
@param {Object} [context]*
@return {String} HTML string
*/
function deprecatedLinkToHelper(params, hash, options, env) {
- return env.helpers["link-to"].helperFunction.call(this, params, hash, options, env);
+ return env.helpers['link-to'].helperFunction.call(this, params, hash, options, env);
}
});
enifed('ember-routing-htmlbars/helpers/outlet', ['exports', 'ember-metal/core'], function (exports, Ember) {
@@ -17921,22 +17952,22 @@
var viewClass;
var viewFullName;
var view = env.data.view;
- var property = params[0] || "main";
+ var property = params[0] || 'main';
// provide controller override
viewName = hash.view;
if (viewName) {
- viewFullName = "view:" + viewName;
+ viewFullName = 'view:' + viewName;
}
- viewClass = viewName ? view.container.lookupFactory(viewFullName) : hash.viewClass || view.container.lookupFactory("view:-outlet");
+ viewClass = viewName ? view.container.lookupFactory(viewFullName) : hash.viewClass || view.container.lookupFactory('view:-outlet');
hash._outletName = property;
- options.helperName = options.helperName || "outlet";
+ options.helperName = options.helperName || 'outlet';
return env.helpers.view.helperFunction.call(this, [viewClass], hash, options, env);
}
});
enifed('ember-routing-htmlbars/helpers/query-params', ['exports', 'ember-metal/core', 'ember-routing/system/query_params'], function (exports, Ember, QueryParams) {
@@ -17965,11 +17996,11 @@
var name = params[0];
var context = params[1];
container = currentView._keywords.controller.value().container;
- router = container.lookup("router:main");
+ router = container.lookup('router:main');
if (params.length === 1) {
// use the singleton controller
@@ -17979,37 +18010,37 @@
} else {
throw new EmberError['default']("You must pass a templateName to render");
}
// # legacy namespace
- name = name.replace(/\//g, ".");
+ name = name.replace(/\//g, '.');
// \ legacy slash as namespace support
- var templateName = "template:" + name;
+ var templateName = 'template:' + name;
var template = options.template;
- view = container.lookup("view:" + name);
+ view = container.lookup('view:' + name);
if (!view) {
- view = container.lookup("view:default");
+ view = container.lookup('view:default');
}
- var viewHasTemplateSpecified = !!property_get.get(view, "template");
+ var viewHasTemplateSpecified = !!property_get.get(view, 'template');
if (!viewHasTemplateSpecified) {
template = template || container.lookup(templateName);
}
// provide controller override
var controllerName;
var controllerFullName;
if (hash.controller) {
controllerName = hash.controller;
- controllerFullName = "controller:" + controllerName;
+ controllerFullName = 'controller:' + controllerName;
delete hash.controller;
} else {
controllerName = name;
- controllerFullName = "controller:" + controllerName;
+ controllerFullName = 'controller:' + controllerName;
}
var parentController = currentView._keywords.controller.value();
// choose name
@@ -18020,11 +18051,11 @@
modelBinding: context, // TODO: Use a StreamBinding
parentController: parentController,
target: parentController
});
- view.one("willDestroyElement", function () {
+ view.one('willDestroyElement', function () {
controller.destroy();
});
} else {
controller = container.lookup(controllerFullName) || generateController['default'](container, controllerName);
@@ -18041,11 +18072,11 @@
}
var props = {
template: template,
controller: controller,
- helperName: "render \"" + name + "\""
+ helperName: 'render "' + name + '"'
};
impersonateAnOutlet(currentView, view, name);
mergeViewBindings['default'](currentView, props, hash);
appendTemplatedView['default'](currentView, options.morph, view, props);
@@ -18054,11 +18085,11 @@
// Megahax to make outlets inside the render helper work, until we
// can kill that behavior at 2.0.
function impersonateAnOutlet(currentView, view, name) {
view._childOutlets = Ember['default'].A();
view._isOutlet = true;
- view._outletName = "__ember_orphans__";
+ view._outletName = '__ember_orphans__';
view._matchOutletName = name;
view._parentOutlet = function () {
var parent = this._parentView;
while (parent && !parent._isOutlet) {
parent = parent._parentView;
@@ -18067,11 +18098,11 @@
};
view.setOutletState = function (state) {
var ownState;
if (state && (ownState = state.outlets[this._matchOutletName])) {
this._outletState = {
- render: { name: "render helper stub" },
+ render: { name: 'render helper stub' },
outlets: create['default'](null)
};
this._outletState.outlets[ownState.render.outlet] = ownState;
ownState.wasUsed = true;
} else {
@@ -18140,13 +18171,13 @@
}
return req;
};
- var linkViewClassNameBindings = ["active", "loading", "disabled"];
+ var linkViewClassNameBindings = ['active', 'loading', 'disabled'];
- linkViewClassNameBindings = ["active", "loading", "disabled", "transitioningIn", "transitioningOut"];
+ linkViewClassNameBindings = ['active', 'loading', 'disabled', 'transitioningIn', 'transitioningOut'];
/**
`Ember.LinkView` renders an element whose `click` event triggers a
transition of the application's instance of `Ember.Router` to
@@ -18160,11 +18191,11 @@
@namespace Ember
@extends Ember.View
@see {Handlebars.helpers.link-to}
**/
var LinkView = EmberComponent['default'].extend({
- tagName: "a",
+ tagName: 'a',
/**
@deprecated Use current-when instead.
@property currentWhen
*/
@@ -18172,11 +18203,11 @@
/**
Used to determine when this LinkView is active.
@property currentWhen
*/
- "current-when": null,
+ 'current-when': null,
/**
Sets the `title` attribute of the `LinkView`'s HTML element.
@property title
@default null
@@ -18210,29 +18241,29 @@
property is `true`.
@property activeClass
@type String
@default active
**/
- activeClass: "active",
+ activeClass: 'active',
/**
The CSS class to apply to `LinkView`'s element when its `loading`
property is `true`.
@property loadingClass
@type String
@default loading
**/
- loadingClass: "loading",
+ loadingClass: 'loading',
/**
The CSS class to apply to a `LinkView`'s element when its `disabled`
property is `true`.
@property disabledClass
@type String
@default disabled
**/
- disabledClass: "disabled",
+ disabledClass: 'disabled',
_isDisabled: false,
/**
Determines whether the `LinkView` will trigger routing via
the `replaceWith` routing strategy.
@@ -18248,11 +18279,11 @@
however you can push onto the array if needed.
@property attributeBindings
@type Array | String
@default ['href', 'title', 'rel', 'tabindex', 'target']
**/
- attributeBindings: ["href", "title", "rel", "tabindex", "target"],
+ 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
@@ -18269,11 +18300,11 @@
click delay using some sort of custom `tap` event.
@property eventName
@type String
@default click
*/
- eventName: "click",
+ eventName: 'click',
// this is doc'ed here so it shows up in the events
// section of the API documentation, which is where
// people will likely go looking for it.
/**
@@ -18305,11 +18336,11 @@
init: function () {
this._super.apply(this, arguments);
// Map desired event name to invoke function
- var eventName = property_get.get(this, "eventName");
+ var eventName = property_get.get(this, 'eventName');
this.on(eventName, this, this._invoke);
},
/**
This method is invoked by observers installed during `init` that fire
@@ -18317,11 +18348,11 @@
@private
@method _paramsChanged
@since 1.3.0
*/
_paramsChanged: function () {
- this.notifyPropertyChange("resolvedParams");
+ this.notifyPropertyChange('resolvedParams');
},
/**
This is called to setup observers that will trigger a rerender.
@private
@@ -18365,14 +18396,14 @@
get: function (key, value) {
return false;
},
set: function (key, value) {
if (value !== undefined) {
- this.set("_isDisabled", value);
+ this.set('_isDisabled', value);
}
- return value ? property_get.get(this, "disabledClass") : false;
+ return value ? property_get.get(this, 'disabledClass') : false;
}
}),
/**
Accessed as a classname binding to apply the `LinkView`'s `activeClass`
@@ -18382,20 +18413,20 @@
transitions into.
The `currentWhen` property can match against multiple routes by separating
route names using the ` ` (space) character.
@property active
**/
- active: computed.computed("loadedParams", function computeLinkViewActive() {
- var router = property_get.get(this, "router");
+ active: computed.computed('loadedParams', function computeLinkViewActive() {
+ var router = property_get.get(this, 'router');
if (!router) {
return;
}
return computeActive(this, router.currentState);
}),
- willBeActive: computed.computed("router.targetState", function () {
- var router = property_get.get(this, "router");
+ willBeActive: computed.computed('router.targetState', function () {
+ var router = property_get.get(this, 'router');
if (!router) {
return;
}
var targetState = router.targetState;
if (router.currentState === targetState) {
@@ -18403,26 +18434,26 @@
}
return !!computeActive(this, targetState);
}),
- transitioningIn: computed.computed("active", "willBeActive", function () {
- var willBeActive = property_get.get(this, "willBeActive");
- if (typeof willBeActive === "undefined") {
+ transitioningIn: computed.computed('active', 'willBeActive', function () {
+ var willBeActive = property_get.get(this, 'willBeActive');
+ if (typeof willBeActive === 'undefined') {
return false;
}
- return !property_get.get(this, "active") && willBeActive && "ember-transitioning-in";
+ return !property_get.get(this, 'active') && willBeActive && 'ember-transitioning-in';
}),
- transitioningOut: computed.computed("active", "willBeActive", function () {
- var willBeActive = property_get.get(this, "willBeActive");
- if (typeof willBeActive === "undefined") {
+ transitioningOut: computed.computed('active', 'willBeActive', function () {
+ var willBeActive = property_get.get(this, 'willBeActive');
+ if (typeof willBeActive === 'undefined') {
return false;
}
- return property_get.get(this, "active") && !willBeActive && "ember-transitioning-out";
+ return property_get.get(this, 'active') && !willBeActive && 'ember-transitioning-out';
}),
/**
Accessed as a classname binding to apply the `LinkView`'s `loadingClass`
CSS `class` to the element when the link is loading.
@@ -18430,25 +18461,25 @@
parameter whose value is currently null or undefined. During
this time, clicking the link will perform no transition and
emit a warning that the link is still in a loading state.
@property loading
**/
- loading: computed.computed("loadedParams", function computeLinkViewLoading() {
- if (!property_get.get(this, "loadedParams")) {
- return property_get.get(this, "loadingClass");
+ loading: computed.computed('loadedParams', function computeLinkViewLoading() {
+ if (!property_get.get(this, 'loadedParams')) {
+ return property_get.get(this, 'loadingClass');
}
}),
/**
Returns the application's main router from the container.
@private
@property router
**/
router: computed.computed(function () {
- var controller = property_get.get(this, "controller");
+ var controller = property_get.get(this, 'controller');
if (controller && controller.container) {
- return controller.container.lookup("router:main");
+ return controller.container.lookup('router:main');
}
}),
/**
Event handler that invokes the link, activating the associated route.
@@ -18460,40 +18491,40 @@
if (!utils.isSimpleClick(event)) {
return true;
}
if (this.preventDefault !== false) {
- var targetAttribute = property_get.get(this, "target");
- if (!targetAttribute || targetAttribute === "_self") {
+ var targetAttribute = property_get.get(this, 'target');
+ if (!targetAttribute || targetAttribute === '_self') {
event.preventDefault();
}
}
if (this.bubbles === false) {
event.stopPropagation();
}
- if (property_get.get(this, "_isDisabled")) {
+ if (property_get.get(this, '_isDisabled')) {
return false;
}
- if (property_get.get(this, "loading")) {
+ if (property_get.get(this, 'loading')) {
Ember['default'].Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.");
return false;
}
- var targetAttribute2 = property_get.get(this, "target");
- if (targetAttribute2 && targetAttribute2 !== "_self") {
+ var targetAttribute2 = property_get.get(this, 'target');
+ if (targetAttribute2 && targetAttribute2 !== '_self') {
return false;
}
- var router = property_get.get(this, "router");
- var loadedParams = property_get.get(this, "loadedParams");
+ var router = property_get.get(this, 'router');
+ var loadedParams = property_get.get(this, 'loadedParams');
var transition = router._doTransition(loadedParams.targetRouteName, loadedParams.models, loadedParams.queryParams);
- if (property_get.get(this, "replace")) {
- transition.method("replace");
+ if (property_get.get(this, 'replace')) {
+ transition.method('replace');
}
return;
@@ -18505,11 +18536,11 @@
// without it! Note that we don't use the first level router because it
// calls location.formatURL(), which also would add the rootURL!
var args = ember_routing__utils.routeArgs(loadedParams.targetRouteName, loadedParams.models, transition.state.queryParams);
var url = router.router.generate.apply(router.router, args);
- run['default'].scheduleOnce("routerTransitions", this, this._eagerUpdateUrl, transition, url);
+ run['default'].scheduleOnce('routerTransitions', this, this._eagerUpdateUrl, transition, url);
},
/**
@private
@method _eagerUpdateUrl
@@ -18521,19 +18552,19 @@
// transition was aborted, already ran to completion,
// or it has a null url-updated method.
return;
}
- if (href.indexOf("#") === 0) {
+ if (href.indexOf('#') === 0) {
href = href.slice(1);
}
// Re-use the routerjs hooks set up by the Ember router.
- var routerjs = property_get.get(this, "router.router");
- if (transition.urlMethod === "update") {
+ var routerjs = property_get.get(this, 'router.router');
+ if (transition.urlMethod === 'update') {
routerjs.updateURL(href);
- } else if (transition.urlMethod === "replace") {
+ } else if (transition.urlMethod === 'replace') {
routerjs.replaceURL(href);
}
// Prevent later update url refire.
transition.method(null);
@@ -18552,19 +18583,19 @@
```
@private
@property
@return {Array}
*/
- resolvedParams: computed.computed("router.url", function () {
+ resolvedParams: computed.computed('router.url', function () {
var params = this.params;
var targetRouteName;
var models = [];
var onlyQueryParamsSupplied = params.length === 0;
if (onlyQueryParamsSupplied) {
- var appController = this.container.lookup("controller:application");
- targetRouteName = property_get.get(appController, "currentRouteName");
+ var appController = this.container.lookup('controller:application');
+ targetRouteName = property_get.get(appController, 'currentRouteName');
} else {
targetRouteName = streams__utils.read(params[0]);
for (var i = 1; i < params.length; i++) {
models.push(streams__utils.read(params[i]));
@@ -18587,17 +18618,17 @@
is still in a loading state.
@private
@property
@return {Array} An array with the route name and any dynamic segments
**/
- loadedParams: computed.computed("resolvedParams", function computeLinkViewRouteArgs() {
- var router = property_get.get(this, "router");
+ loadedParams: computed.computed('resolvedParams', function computeLinkViewRouteArgs() {
+ var router = property_get.get(this, 'router');
if (!router) {
return;
}
- var resolvedParams = property_get.get(this, "resolvedParams");
+ var resolvedParams = property_get.get(this, 'resolvedParams');
var namedRoute = resolvedParams.targetRouteName;
if (!namedRoute) {
return;
}
@@ -18617,20 +18648,20 @@
the `LinkView`'s targeted route.
If the `LinkView`'s `tagName` is changed to a value other
than `a`, this property will be ignored.
@property href
**/
- href: computed.computed("loadedParams", function computeLinkViewHref() {
- if (property_get.get(this, "tagName") !== "a") {
+ href: computed.computed('loadedParams', function computeLinkViewHref() {
+ if (property_get.get(this, 'tagName') !== 'a') {
return;
}
- var router = property_get.get(this, "router");
- var loadedParams = property_get.get(this, "loadedParams");
+ var router = property_get.get(this, 'router');
+ var loadedParams = property_get.get(this, 'loadedParams');
if (!loadedParams) {
- return property_get.get(this, "loadingHref");
+ return property_get.get(this, 'loadingHref');
}
var visibleQueryParams = {};
merge['default'](visibleQueryParams, loadedParams.queryParams);
router._prepareQueryParams(loadedParams.targetRouteName, loadedParams.models, visibleQueryParams);
@@ -18645,11 +18676,11 @@
Only applies when tagName is 'a'
@property loadingHref
@type String
@default #
*/
- loadingHref: "#"
+ loadingHref: '#'
});
LinkView.toString = function () {
return "LinkView";
};
@@ -18674,38 +18705,38 @@
}
function paramsAreLoaded(params) {
for (var i = 0, len = params.length; i < len; ++i) {
var param = params[i];
- if (param === null || typeof param === "undefined") {
+ if (param === null || typeof param === 'undefined') {
return false;
}
}
return true;
}
function computeActive(route, routerState) {
- if (property_get.get(route, "loading")) {
+ if (property_get.get(route, 'loading')) {
return false;
}
- var currentWhen = route["current-when"] || route.currentWhen;
+ var currentWhen = route['current-when'] || route.currentWhen;
var isCurrentWhenSpecified = !!currentWhen;
- currentWhen = currentWhen || property_get.get(route, "loadedParams").targetRouteName;
- currentWhen = currentWhen.split(" ");
+ currentWhen = currentWhen || property_get.get(route, 'loadedParams').targetRouteName;
+ currentWhen = currentWhen.split(' ');
for (var i = 0, len = currentWhen.length; i < len; i++) {
if (isActiveForRoute(route, currentWhen[i], isCurrentWhenSpecified, routerState)) {
- return property_get.get(route, "activeClass");
+ return property_get.get(route, 'activeClass');
}
}
return false;
}
function isActiveForRoute(route, routeName, isCurrentWhenSpecified, routerState) {
- var router = property_get.get(route, "router");
- var loadedParams = property_get.get(route, "loadedParams");
+ var router = property_get.get(route, 'router');
+ var loadedParams = property_get.get(route, 'loadedParams');
var contexts = loadedParams.models;
var handlers = router.router.recognizer.handlersFor(routeName);
var leafName = handlers[handlers.length - 1].handler;
var maximumContexts = numberOfContextsAcceptedByHandler(routeName, handlers);
@@ -18754,11 +18785,11 @@
parent = parent._parentView;
}
return parent;
},
- _linkParent: Ember.on("init", "parentViewDidChange", function () {
+ _linkParent: Ember.on('init', 'parentViewDidChange', function () {
var parent = this._parentOutlet();
if (parent) {
parent._childOutlets.push(this);
if (parent._outletState) {
this.setOutletState(parent._outletState.outlets[this._outletName]);
@@ -18790,11 +18821,11 @@
var child = children[i];
child.setOutletState(this._outletState && this._outletState.outlets[child._outletName]);
}
} else {
var view = this._buildView(this._outletState);
- var length = property_get.get(this, "length");
+ var length = property_get.get(this, 'length');
if (view) {
this.replace(0, length, [view]);
} else {
this.replace(0, length, []);
}
@@ -18804,29 +18835,29 @@
_buildView: function (state) {
if (!state) {
return;
}
- var LOG_VIEW_LOOKUPS = property_get.get(this, "namespace.LOG_VIEW_LOOKUPS");
+ var LOG_VIEW_LOOKUPS = property_get.get(this, 'namespace.LOG_VIEW_LOOKUPS');
var view;
var render = state.render;
var ViewClass = render.ViewClass;
var isDefaultView = false;
if (!ViewClass) {
isDefaultView = true;
- ViewClass = this.container.lookupFactory(this._isTopLevel ? "view:toplevel" : "view:default");
+ ViewClass = this.container.lookupFactory(this._isTopLevel ? 'view:toplevel' : 'view:default');
}
view = ViewClass.create({
_debugTemplateName: render.name,
renderedName: render.name,
controller: render.controller
});
- if (!property_get.get(view, "template")) {
- view.set("template", render.template);
+ if (!property_get.get(view, 'template')) {
+ view.set('template', render.template);
}
if (LOG_VIEW_LOOKUPS) {
}
@@ -18850,11 +18881,11 @@
for (var key in a) {
if (a.hasOwnProperty(key)) {
// name is only here for logging & debugging. If two different
// names result in otherwise identical states, they're still
// identical.
- if (a[key] !== b[key] && key !== "name") {
+ if (a[key] !== b[key] && key !== 'name') {
return false;
}
}
}
return true;
@@ -18897,11 +18928,11 @@
enifed('ember-routing/ext/controller', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/computed', 'ember-metal/utils', 'ember-metal/merge', 'ember-runtime/mixins/controller'], function (exports, Ember, property_get, property_set, computed, utils, merge, ControllerMixin) {
'use strict';
ControllerMixin['default'].reopen({
- concatenatedProperties: ["queryParams", "_pCacheMeta"],
+ concatenatedProperties: ['queryParams', '_pCacheMeta'],
init: function () {
this._super.apply(this, arguments);
listenForQueryParamChanges(this);
},
@@ -18927,14 +18958,14 @@
@private
*/
_normalizedQueryParams: computed.computed(function () {
var m = utils.meta(this);
if (m.proto !== this) {
- return property_get.get(m.proto, "_normalizedQueryParams");
+ return property_get.get(m.proto, '_normalizedQueryParams');
}
- var queryParams = property_get.get(this, "queryParams");
+ var queryParams = property_get.get(this, 'queryParams');
if (queryParams._qpMap) {
return queryParams._qpMap;
}
var qpMap = queryParams._qpMap = {};
@@ -18951,25 +18982,25 @@
@private
*/
_cacheMeta: computed.computed(function () {
var m = utils.meta(this);
if (m.proto !== this) {
- return property_get.get(m.proto, "_cacheMeta");
+ return property_get.get(m.proto, '_cacheMeta');
}
var cacheMeta = {};
- var qpMap = property_get.get(this, "_normalizedQueryParams");
+ var qpMap = property_get.get(this, '_normalizedQueryParams');
for (var prop in qpMap) {
if (!qpMap.hasOwnProperty(prop)) {
continue;
}
var qp = qpMap[prop];
var scope = qp.scope;
var parts;
- if (scope === "controller") {
+ if (scope === 'controller') {
parts = [];
}
cacheMeta[prop] = {
parts: parts, // provided by route if 'model' scope
@@ -18986,11 +19017,11 @@
/**
@method _updateCacheParams
@private
*/
_updateCacheParams: function (params) {
- var cacheMeta = property_get.get(this, "_cacheMeta");
+ var cacheMeta = property_get.get(this, '_cacheMeta');
for (var prop in cacheMeta) {
if (!cacheMeta.hasOwnProperty(prop)) {
continue;
}
var propMeta = cacheMeta[prop];
@@ -19010,11 +19041,11 @@
@method _qpChanged
@private
*/
_qpChanged: function (controller, _prop) {
var prop = _prop.substr(0, _prop.length - 3);
- var cacheMeta = property_get.get(controller, "_cacheMeta");
+ var cacheMeta = property_get.get(controller, '_cacheMeta');
var propCache = cacheMeta[prop];
var cacheKey = controller._calculateCacheKey(propCache.prefix || "", propCache.parts, propCache.values);
var value = property_get.get(controller, prop);
// 1. Update model-dep cache
@@ -19040,11 +19071,11 @@
for (var i = 0, len = parts.length; i < len; ++i) {
var part = parts[i];
var value = property_get.get(values, part);
suffixes += "::" + part + ":" + value;
}
- return prefix + suffixes.replace(ALL_PERIODS_REGEX, "-");
+ return prefix + suffixes.replace(ALL_PERIODS_REGEX, '-');
},
/**
Transition the application into another route. The route may
be either a single route or route path:
@@ -19101,11 +19132,11 @@
@for Ember.ControllerMixin
@method transitionToRoute
*/
transitionToRoute: function () {
// target may be either another controller or a router
- var target = property_get.get(this, "target");
+ var target = property_get.get(this, 'target');
var method = target.transitionToRoute || target.transitionTo;
return method.apply(target, arguments);
},
/**
@@ -19161,11 +19192,11 @@
@for Ember.ControllerMixin
@method replaceRoute
*/
replaceRoute: function () {
// target may be either another controller or a router
- var target = property_get.get(this, "target");
+ var target = property_get.get(this, 'target');
var method = target.replaceRoute || target.replaceWith;
return method.apply(target, arguments);
},
/**
@@ -19181,11 +19212,11 @@
var ALL_PERIODS_REGEX = /\./g;
function accumulateQueryParamDescriptors(_desc, accum) {
var desc = _desc;
var tmp;
- if (utils.typeOf(desc) === "string") {
+ if (utils.typeOf(desc) === 'string') {
tmp = {};
tmp[desc] = { as: null };
desc = tmp;
}
@@ -19193,28 +19224,28 @@
if (!desc.hasOwnProperty(key)) {
return;
}
var singleDesc = desc[key];
- if (utils.typeOf(singleDesc) === "string") {
+ if (utils.typeOf(singleDesc) === 'string') {
singleDesc = { as: singleDesc };
}
- tmp = accum[key] || { as: null, scope: "model" };
+ tmp = accum[key] || { as: null, scope: 'model' };
merge['default'](tmp, singleDesc);
accum[key] = tmp;
}
}
function listenForQueryParamChanges(controller) {
- var qpMap = property_get.get(controller, "_normalizedQueryParams");
+ var qpMap = property_get.get(controller, '_normalizedQueryParams');
for (var prop in qpMap) {
if (!qpMap.hasOwnProperty(prop)) {
continue;
}
- controller.addObserver(prop + ".[]", controller, controller._qpChanged);
+ controller.addObserver(prop + '.[]', controller, controller._qpChanged);
}
}
exports['default'] = ControllerMixin['default'];
@@ -19356,11 +19387,11 @@
Will be pre-pended to path upon state change.
@since 1.5.1
@property rootURL
@default '/'
*/
- rootURL: "/",
+ rootURL: '/',
/**
Called by the router to instruct the location to do any feature detection
necessary. In the case of AutoLocation, we detect whether to use history
or hash concrete implementations.
@@ -19377,45 +19408,46 @@
documentMode: this.documentMode,
global: this.global
});
if (implementation === false) {
- property_set.set(this, "cancelRouterSetup", true);
- implementation = "none";
+ property_set.set(this, 'cancelRouterSetup', true);
+ implementation = 'none';
}
- var concrete = this.container.lookup("location:" + implementation);
- property_set.set(concrete, "rootURL", rootURL);
+ var concrete = this.container.lookup('location:' + implementation);
+ property_set.set(concrete, 'rootURL', rootURL);
- property_set.set(this, "concreteImplementation", concrete);
+ property_set.set(this, 'concreteImplementation', concrete);
},
- initState: delegateToConcreteImplementation("initState"),
- getURL: delegateToConcreteImplementation("getURL"),
- setURL: delegateToConcreteImplementation("setURL"),
- replaceURL: delegateToConcreteImplementation("replaceURL"),
- onUpdateURL: delegateToConcreteImplementation("onUpdateURL"),
- formatURL: delegateToConcreteImplementation("formatURL"),
+ initState: delegateToConcreteImplementation('initState'),
+ getURL: delegateToConcreteImplementation('getURL'),
+ setURL: delegateToConcreteImplementation('setURL'),
+ replaceURL: delegateToConcreteImplementation('replaceURL'),
+ onUpdateURL: delegateToConcreteImplementation('onUpdateURL'),
+ formatURL: delegateToConcreteImplementation('formatURL'),
willDestroy: function () {
- var concreteImplementation = property_get.get(this, "concreteImplementation");
+ var concreteImplementation = property_get.get(this, 'concreteImplementation');
if (concreteImplementation) {
concreteImplementation.destroy();
}
}
});
function delegateToConcreteImplementation(methodName) {
return function () {
+ var concreteImplementation = property_get.get(this, 'concreteImplementation');
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- var concreteImplementation = property_get.get(this, "concreteImplementation");
- return utils.tryInvoke(concreteImplementation, methodName, args);
+ return utils.tryInvoke(concreteImplementation, methodName, args);
};
}
/**
Given the browser's `location`, `history` and `userAgent`, and a configured
@@ -19437,25 +19469,25 @@
var history = options.history;
var documentMode = options.documentMode;
var global = options.global;
var rootURL = options.rootURL;
- var implementation = "none";
+ var implementation = 'none';
var cancelRouterSetup = false;
var currentPath = util.getFullPath(location);
if (util.supportsHistory(userAgent, history)) {
var historyPath = getHistoryPath(rootURL, location);
// If the browser supports history and we have a history path, we can use
// the history location with no redirects.
if (currentPath === historyPath) {
- return "history";
+ return 'history';
} else {
- if (currentPath.substr(0, 2) === "/#") {
+ if (currentPath.substr(0, 2) === '/#') {
history.replaceState({ path: historyPath }, null, historyPath);
- implementation = "history";
+ implementation = 'history';
} else {
cancelRouterSetup = true;
util.replacePath(location, historyPath);
}
}
@@ -19463,12 +19495,12 @@
var hashPath = getHashPath(rootURL, location);
// Be sure we're using a hashed path, otherwise let's switch over it to so
// we start off clean and consistent. We'll count an index path with no
// hash as "good enough" as well.
- if (currentPath === hashPath || currentPath === "/" && hashPath === "/#/") {
- implementation = "hash";
+ if (currentPath === hashPath || currentPath === '/' && hashPath === '/#/') {
+ implementation = 'hash';
} else {
// Our URL isn't in the expected hash-supported format, so we want to
// cancel the router setup and replace the URL to start off clean
cancelRouterSetup = true;
util.replacePath(location, hashPath);
@@ -19487,10 +19519,11 @@
Returns the current path as it should appear for HistoryLocation supported
browsers. This may very well differ from the real current path (e.g. if it
starts off as a hashed URL)
*/
+
function getHistoryPath(rootURL, location) {
var path = util.getPath(location);
var hash = util.getHash(location);
var query = util.getQuery(location);
var rootURLIndex = path.indexOf(rootURL);
@@ -19498,27 +19531,27 @@
// By convention, Ember.js routes using HashLocation are required to start
// with `#/`. Anything else should NOT be considered a route and should
// be passed straight through, without transformation.
- if (hash.substr(0, 2) === "#/") {
+ if (hash.substr(0, 2) === '#/') {
// There could be extra hash segments after the route
- hashParts = hash.substr(1).split("#");
+ hashParts = hash.substr(1).split('#');
// The first one is always the route url
routeHash = hashParts.shift();
// If the path already has a trailing slash, remove the one
// from the hashed route so we don't double up.
- if (path.slice(-1) === "/") {
+ if (path.slice(-1) === '/') {
routeHash = routeHash.substr(1);
}
// This is the "expected" final order
path = path + routeHash + query;
if (hashParts.length) {
- path += "#" + hashParts.join("#");
+ path += '#' + hashParts.join('#');
}
} else {
path = path + query + hash;
}
@@ -19531,21 +19564,22 @@
Returns the current path as it should appear for HashLocation supported
browsers. This may very well differ from the real current path.
@method _getHashPath
*/
+
function getHashPath(rootURL, location) {
var path = rootURL;
var historyPath = getHistoryPath(rootURL, location);
var routePath = historyPath.substr(rootURL.length);
- if (routePath !== "") {
- if (routePath.charAt(0) !== "/") {
- routePath = "/" + routePath;
+ if (routePath !== '') {
+ if (routePath.charAt(0) !== '/') {
+ routePath = '/' + routePath;
}
- path += "#" + routePath;
+ path += '#' + routePath;
}
return path;
}
@@ -19553,14 +19587,14 @@
enifed('ember-routing/location/hash_location', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/system/object', 'ember-routing/location/api'], function (exports, Ember, property_get, property_set, run, utils, EmberObject, EmberLocation) {
'use strict';
exports['default'] = EmberObject['default'].extend({
- implementation: "hash",
+ implementation: 'hash',
init: function () {
- property_set.set(this, "location", property_get.get(this, "_location") || window.location);
+ property_set.set(this, 'location', property_get.get(this, '_location') || window.location);
},
/**
@private
Returns normalized location.hash
@@ -19579,19 +19613,19 @@
*/
getURL: function () {
var originalPath = this.getHash().substr(1);
var outPath = originalPath;
- if (outPath.charAt(0) !== "/") {
- outPath = "/";
+ if (outPath.charAt(0) !== '/') {
+ outPath = '/';
// Only add the # if the path isn't empty.
// We do NOT want `/#` since the ampersand
// is only included (conventionally) when
// the location.hash has a value
if (originalPath) {
- outPath += "#" + originalPath;
+ outPath += '#' + originalPath;
}
}
return outPath;
},
@@ -19603,24 +19637,24 @@
@private
@method setURL
@param path {String}
*/
setURL: function (path) {
- property_get.get(this, "location").hash = path;
- property_set.set(this, "lastSetURL", path);
+ property_get.get(this, 'location').hash = path;
+ property_set.set(this, 'lastSetURL', path);
},
/**
Uses location.replace to update the url without a page reload
or history modification.
@private
@method replaceURL
@param path {String}
*/
replaceURL: function (path) {
- property_get.get(this, "location").replace("#" + path);
- property_set.set(this, "lastSetURL", path);
+ property_get.get(this, 'location').replace('#' + path);
+ property_set.set(this, 'lastSetURL', path);
},
/**
Register a callback to be invoked when the hash changes. These
callbacks will execute when the user presses the back or forward
@@ -19631,18 +19665,18 @@
*/
onUpdateURL: function (callback) {
var self = this;
var guid = utils.guidFor(this);
- Ember['default'].$(window).on("hashchange.ember-location-" + guid, function () {
+ Ember['default'].$(window).on('hashchange.ember-location-' + guid, function () {
run['default'](function () {
var path = self.getURL();
- if (property_get.get(self, "lastSetURL") === path) {
+ if (property_get.get(self, 'lastSetURL') === path) {
return;
}
- property_set.set(self, "lastSetURL", null);
+ property_set.set(self, 'lastSetURL', null);
callback(path);
});
});
},
@@ -19655,22 +19689,22 @@
@private
@method formatURL
@param url {String}
*/
formatURL: function (url) {
- return "#" + url;
+ return '#' + url;
},
/**
Cleans up the HashLocation event listener.
@private
@method willDestroy
*/
willDestroy: function () {
var guid = utils.guidFor(this);
- Ember['default'].$(window).off("hashchange.ember-location-" + guid);
+ Ember['default'].$(window).off('hashchange.ember-location-' + guid);
}
});
});
enifed('ember-routing/location/history_location', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/utils', 'ember-runtime/system/object', 'ember-routing/location/api', 'ember-views/system/jquery'], function (exports, property_get, property_set, utils, EmberObject, EmberLocation, jQuery) {
@@ -19686,27 +19720,27 @@
@class HistoryLocation
@namespace Ember
@extends Ember.Object
*/
exports['default'] = EmberObject['default'].extend({
- implementation: "history",
+ implementation: 'history',
init: function () {
- property_set.set(this, "location", property_get.get(this, "location") || window.location);
- property_set.set(this, "baseURL", jQuery['default']("base").attr("href") || "");
+ property_set.set(this, 'location', property_get.get(this, 'location') || window.location);
+ property_set.set(this, 'baseURL', jQuery['default']('base').attr('href') || '');
},
/**
Used to set state on first call to setURL
@private
@method initState
*/
initState: function () {
- var history = property_get.get(this, "history") || window.history;
- property_set.set(this, "history", history);
+ var history = property_get.get(this, 'history') || window.history;
+ property_set.set(this, 'history', history);
- if (history && "state" in history) {
+ if (history && 'state' in history) {
this.supportsHistory = true;
}
this.replaceState(this.formatURL(this.getURL()));
},
@@ -19714,29 +19748,29 @@
/**
Will be pre-pended to path upon state change
@property rootURL
@default '/'
*/
- rootURL: "/",
+ rootURL: '/',
/**
Returns the current `location.pathname` without `rootURL` or `baseURL`
@private
@method getURL
@return url {String}
*/
getURL: function () {
- var rootURL = property_get.get(this, "rootURL");
- var location = property_get.get(this, "location");
+ var rootURL = property_get.get(this, 'rootURL');
+ var location = property_get.get(this, 'location');
var path = location.pathname;
- var baseURL = property_get.get(this, "baseURL");
+ var baseURL = property_get.get(this, 'baseURL');
- rootURL = rootURL.replace(/\/$/, "");
- baseURL = baseURL.replace(/\/$/, "");
+ rootURL = rootURL.replace(/\/$/, '');
+ baseURL = baseURL.replace(/\/$/, '');
- var url = path.replace(baseURL, "").replace(rootURL, "");
- var search = location.search || "";
+ var url = path.replace(baseURL, '').replace(rootURL, '');
+ var search = location.search || '';
url += search;
url += this.getHash();
return url;
@@ -19782,11 +19816,11 @@
@method getState
@return state {Object}
*/
getState: function () {
if (this.supportsHistory) {
- return property_get.get(this, "history").state;
+ return property_get.get(this, 'history').state;
}
return this._historyState;
},
@@ -19797,11 +19831,11 @@
@param path {String}
*/
pushState: function (path) {
var state = { path: path };
- property_get.get(this, "history").pushState(state, null, path);
+ property_get.get(this, 'history').pushState(state, null, path);
this._historyState = state;
// used for webkit workaround
this._previousURL = this.getURL();
@@ -19813,11 +19847,11 @@
@method replaceState
@param path {String}
*/
replaceState: function (path) {
var state = { path: path };
- property_get.get(this, "history").replaceState(state, null, path);
+ property_get.get(this, 'history').replaceState(state, null, path);
this._historyState = state;
// used for webkit workaround
this._previousURL = this.getURL();
@@ -19832,11 +19866,11 @@
*/
onUpdateURL: function (callback) {
var guid = utils.guidFor(this);
var self = this;
- jQuery['default'](window).on("popstate.ember-location-" + guid, function (e) {
+ jQuery['default'](window).on('popstate.ember-location-' + guid, function (e) {
// Ignore initial page load popstate event in Chrome
if (!popstateFired) {
popstateFired = true;
if (self.getURL() === self._previousURL) {
return;
@@ -19852,18 +19886,18 @@
@method formatURL
@param url {String}
@return formatted url {String}
*/
formatURL: function (url) {
- var rootURL = property_get.get(this, "rootURL");
- var baseURL = property_get.get(this, "baseURL");
+ var rootURL = property_get.get(this, 'rootURL');
+ var baseURL = property_get.get(this, 'baseURL');
- if (url !== "") {
- rootURL = rootURL.replace(/\/$/, "");
- baseURL = baseURL.replace(/\/$/, "");
+ if (url !== '') {
+ rootURL = rootURL.replace(/\/$/, '');
+ baseURL = baseURL.replace(/\/$/, '');
} else if (baseURL.match(/^\//) && rootURL.match(/^\//)) {
- baseURL = baseURL.replace(/\/$/, "");
+ baseURL = baseURL.replace(/\/$/, '');
}
return baseURL + rootURL + url;
},
@@ -19873,11 +19907,11 @@
@method willDestroy
*/
willDestroy: function () {
var guid = utils.guidFor(this);
- jQuery['default'](window).off("popstate.ember-location-" + guid);
+ jQuery['default'](window).off('popstate.ember-location-' + guid);
},
/**
@private
Returns normalized location.hash
@@ -19890,32 +19924,32 @@
enifed('ember-routing/location/none_location', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/object'], function (exports, property_get, property_set, EmberObject) {
'use strict';
exports['default'] = EmberObject['default'].extend({
- implementation: "none",
- path: "",
+ implementation: 'none',
+ path: '',
/**
Returns the current path.
@private
@method getURL
@return {String} path
*/
getURL: function () {
- return property_get.get(this, "path");
+ return property_get.get(this, 'path');
},
/**
Set the path and remembers what was set. Using this method
to change the path will not invoke the `updateURL` callback.
@private
@method setURL
@param path {String}
*/
setURL: function (path) {
- property_set.set(this, "path", path);
+ property_set.set(this, 'path', path);
},
/**
Register a callback to be invoked when the path changes. These
callbacks will execute when the user presses the back or forward
@@ -19933,11 +19967,11 @@
@private
@method handleURL
@param callback {Function}
*/
handleURL: function (url) {
- property_set.set(this, "path", url);
+ property_set.set(this, 'path', url);
this.updateCallback(url);
},
/**
Given a URL, formats it to be placed into the page as part
@@ -19984,10 +20018,11 @@
/**
@private
Returns the current `location.search`.
*/
+
function getQuery(location) {
return location.search;
}
/**
@@ -19998,10 +20033,11 @@
Should be passed the browser's `location` object as the first argument.
https://bugzilla.mozilla.org/show_bug.cgi?id=483304
*/
+
function getHash(location) {
var href = location.href;
var hashIndex = href.indexOf('#');
if (hashIndex === -1) {
@@ -20037,10 +20073,11 @@
`global` is an object that may have an `onhashchange` property.
@private
@function supportsHashChange
*/
+
function supportsHashChange(documentMode, global) {
return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);
}
/*
@@ -20050,10 +20087,11 @@
and Mobile Safari, but not Chrome.
@private
@function supportsHistory
*/
+
function supportsHistory(userAgent, history) {
// Boosted from Modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
// The stock browser on Android 2.2 & 2.3 returns positive on history support
// Unfortunately support is really buggy and there is no clean way to detect
// these bugs, so we fall back to a user agent sniff :(
@@ -20071,10 +20109,11 @@
Replaces the current location, making sure we explicitly include the origin
to prevent redirecting to a different origin.
@private
*/
+
function replacePath(location, path) {
location.replace(getOrigin(location) + path);
}
});
@@ -20147,56 +20186,56 @@
}
exports['default'] = DSL;
DSL.prototype = {
route: function (name, options, callback) {
- if (arguments.length === 2 && typeof options === "function") {
+ if (arguments.length === 2 && typeof options === 'function') {
callback = options;
options = {};
}
if (arguments.length === 1) {
options = {};
}
- var type = options.resetNamespace === true ? "resource" : "route";
+ var type = options.resetNamespace === true ? 'resource' : 'route';
if (this.enableLoadingSubstates) {
- createRoute(this, name + "_loading", { resetNamespace: options.resetNamespace });
- createRoute(this, name + "_error", { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
+ createRoute(this, name + '_loading', { resetNamespace: options.resetNamespace });
+ createRoute(this, name + '_error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
}
if (callback) {
var fullName = getFullName(this, name, options.resetNamespace);
var dsl = new DSL(fullName, {
enableLoadingSubstates: this.enableLoadingSubstates
});
- createRoute(dsl, "loading");
- createRoute(dsl, "error", { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
+ createRoute(dsl, 'loading');
+ createRoute(dsl, 'error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
callback.call(dsl);
createRoute(this, name, options, dsl.generate());
} else {
createRoute(this, name, options);
}
},
push: function (url, name, callback) {
- var parts = name.split(".");
+ var parts = name.split('.');
if (url === "" || url === "/" || parts[parts.length - 1] === "index") {
this.explicitIndex = true;
}
this.matches.push([url, name, callback]);
},
resource: function (name, options, callback) {
- if (arguments.length === 2 && typeof options === "function") {
+ if (arguments.length === 2 && typeof options === 'function') {
callback = options;
options = {};
}
if (arguments.length === 1) {
@@ -20222,11 +20261,11 @@
};
}
};
function canNest(dsl) {
- return dsl.parent && dsl.parent !== "application";
+ return dsl.parent && dsl.parent !== 'application';
}
function getFullName(dsl, name, resetNamespace) {
if (canNest(dsl) && resetNamespace !== true) {
return dsl.parent + "." + name;
@@ -20238,11 +20277,11 @@
function createRoute(dsl, name, options, callback) {
options = options || {};
var fullName = getFullName(dsl, name, options.resetNamespace);
- if (typeof options.path !== "string") {
+ if (typeof options.path !== 'string') {
options.path = "/" + name;
}
dsl.push(options.path, fullName, callback);
}
@@ -20263,27 +20302,27 @@
exports['default'] = generateController;
function generateControllerFactory(container, controllerName, context) {
var Factory, fullName, factoryName, controllerType;
if (context && utils.isArray(context)) {
- controllerType = "array";
+ controllerType = 'array';
} else if (context) {
- controllerType = "object";
+ controllerType = 'object';
} else {
- controllerType = "basic";
+ controllerType = 'basic';
}
- factoryName = "controller:" + controllerType;
+ factoryName = 'controller:' + controllerType;
Factory = container.lookupFactory(factoryName).extend({
isGenerated: true,
toString: function () {
return "(generated " + controllerName + " controller)";
}
});
- fullName = "controller:" + controllerName;
+ fullName = 'controller:' + controllerName;
container._registry.register(fullName, Factory);
return Factory;
}
@@ -20301,14 +20340,14 @@
@private
@since 1.3.0
*/
function generateController(container, controllerName, context) {
generateControllerFactory(container, controllerName, context);
- var fullName = "controller:" + controllerName;
+ var fullName = 'controller:' + controllerName;
var instance = container.lookup(fullName);
- if (property_get.get(instance, "namespace.LOG_ACTIVE_GENERATION")) {
+ if (property_get.get(instance, 'namespace.LOG_ACTIVE_GENERATION')) {
}
return instance;
}
@@ -20392,19 +20431,19 @@
@private
@property _qp
*/
_qp: computed.computed(function () {
var controllerName = this.controllerName || this.routeName;
- var controllerClass = this.container.lookupFactory("controller:" + controllerName);
+ var controllerClass = this.container.lookupFactory('controller:' + controllerName);
if (!controllerClass) {
return defaultQPMeta;
}
var controllerProto = controllerClass.proto();
- var qpProps = property_get.get(controllerProto, "_normalizedQueryParams");
- var cacheMeta = property_get.get(controllerProto, "_cacheMeta");
+ var qpProps = property_get.get(controllerProto, '_normalizedQueryParams');
+ var cacheMeta = property_get.get(controllerProto, '_cacheMeta');
var qps = [];
var map = {};
var self = this;
for (var propName in qpProps) {
@@ -20420,11 +20459,11 @@
defaultValue = Ember['default'].A(defaultValue.slice());
}
var type = utils.typeOf(defaultValue);
var defaultValueSerialized = this.serializeQueryParam(defaultValue, urlKey, type);
- var fprop = controllerName + ":" + propName;
+ var fprop = controllerName + ':' + propName;
var qp = {
def: defaultValue,
sdef: defaultValueSerialized,
type: type,
urlKey: urlKey,
@@ -20479,22 +20518,22 @@
if (!names.length) {
handlerInfo = dynamicParent;
names = handlerInfo && handlerInfo._names || [];
}
- var qps = property_get.get(this, "_qp.qps");
+ var qps = property_get.get(this, '_qp.qps');
var len = qps.length;
var namePaths = new Array(names.length);
for (var a = 0, nlen = names.length; a < nlen; ++a) {
- namePaths[a] = handlerInfo.name + "." + names[a];
+ namePaths[a] = handlerInfo.name + '.' + names[a];
}
for (var i = 0; i < len; ++i) {
var qp = qps[i];
var cacheMeta = qp.cacheMeta;
- if (cacheMeta.scope === "model") {
+ if (cacheMeta.scope === 'model') {
cacheMeta.parts = namePaths;
}
cacheMeta.prefix = qp.ctrl;
}
},
@@ -20528,20 +20567,20 @@
router._qpUpdates = {};
}
router._qpUpdates[qp.urlKey] = true;
},
- mergedProperties: ["events", "queryParams"],
+ mergedProperties: ['events', 'queryParams'],
/**
Retrieves parameters, for current route using the state.params
variable and getQueryParamsFor, using the supplied routeName.
@method paramsFor
@param {String} name
*/
paramsFor: function (name) {
- var route = this.container.lookup("route:" + name);
+ var route = this.container.lookup('route:' + name);
if (!route) {
return {};
}
@@ -20573,14 +20612,14 @@
*/
serializeQueryParam: function (value, urlKey, defaultValueType) {
// urlKey isn't used here, but anyone overriding
// can use it to provide serialization specific
// to a certain query param.
- if (defaultValueType === "array") {
+ if (defaultValueType === 'array') {
return JSON.stringify(value);
}
- return "" + value;
+ return '' + value;
},
/**
Deserializes value of the query parameter based on defaultValueType
@method deserializeQueryParam
@@ -20593,15 +20632,15 @@
// can use it to provide deserialization specific
// to a certain query param.
// Use the defaultValueType of the default value (the initial value assigned to a
// controller query param property), to intelligently deserialize and cast.
- if (defaultValueType === "boolean") {
- return value === "true" ? true : false;
- } else if (defaultValueType === "number") {
+ if (defaultValueType === 'boolean') {
+ return value === 'true' ? true : false;
+ } else if (defaultValueType === 'number') {
return Number(value).valueOf();
- } else if (defaultValueType === "array") {
+ } else if (defaultValueType === 'array') {
return Ember['default'].A(JSON.parse(value));
}
return value;
},
@@ -20617,11 +20656,11 @@
/**
@private
@property _optionsForQueryParam
*/
_optionsForQueryParam: function (qp) {
- return property_get.get(this, "queryParams." + qp.urlKey) || property_get.get(this, "queryParams." + qp.prop) || {};
+ return property_get.get(this, 'queryParams.' + qp.urlKey) || property_get.get(this, 'queryParams.' + qp.prop) || {};
},
/**
A hook you can use to reset controller values either when the model
changes or the route is exiting.
@@ -20647,11 +20686,11 @@
@private
@method exit
*/
exit: function () {
this.deactivate();
- this.trigger("deactivate");
+ this.trigger('deactivate');
this.teardownViews();
},
/**
@private
@@ -20659,11 +20698,11 @@
@since 1.7.0
*/
_reset: function (isExiting, transition) {
var controller = this.controller;
- controller._qpDelegate = property_get.get(this, "_qp.states.inactive");
+ controller._qpDelegate = property_get.get(this, '_qp.states.inactive');
this.resetController(controller, isExiting, transition);
},
/**
@@ -20671,11 +20710,11 @@
@method enter
*/
enter: function () {
this.connections = [];
this.activate();
- this.trigger("activate");
+ this.trigger('activate');
},
/**
The name of the view to use by default when rendering this routes template.
When rendering a template, the route will, by default, determine the
@@ -20913,25 +20952,25 @@
*/
_actions: {
queryParamsDidChange: function (changed, totalPresent, removed) {
- var qpMap = property_get.get(this, "_qp").map;
+ var qpMap = property_get.get(this, '_qp').map;
var totalChanged = keys['default'](changed).concat(keys['default'](removed));
for (var i = 0, len = totalChanged.length; i < len; ++i) {
var qp = qpMap[totalChanged[i]];
- if (qp && property_get.get(this._optionsForQueryParam(qp), "refreshModel")) {
+ if (qp && property_get.get(this._optionsForQueryParam(qp), 'refreshModel')) {
this.refresh();
}
}
return true;
},
finalizeQueryParamChange: function (params, finalParams, transition) {
- if (this.routeName !== "application") {
+ if (this.routeName !== 'application') {
return true;
}
// Transition object is absent for intermediate transitions.
if (!transition) {
@@ -20969,17 +21008,17 @@
svalue = qp.sdef;
value = copyDefaultValue(qp.def);
}
}
- controller._qpDelegate = property_get.get(this, "_qp.states.inactive");
+ controller._qpDelegate = property_get.get(this, '_qp.states.inactive');
var thisQueryParamChanged = svalue !== qp.svalue;
if (thisQueryParamChanged) {
if (transition.queryParamsOnly && replaceUrl !== false) {
var options = route._optionsForQueryParam(qp);
- var replaceConfigValue = property_get.get(options, "replace");
+ var replaceConfigValue = property_get.get(options, 'replace');
if (replaceConfigValue) {
replaceUrl = true;
} else if (replaceConfigValue === false) {
// Explicit pushState wins over any other replaceStates.
replaceUrl = false;
@@ -21001,17 +21040,17 @@
});
}
}
if (replaceUrl) {
- transition.method("replace");
+ transition.method('replace');
}
enumerable_utils.forEach(qpMeta.qps, function (qp) {
- var routeQpMeta = property_get.get(qp.route, "_qp");
+ var routeQpMeta = property_get.get(qp.route, '_qp');
var finalizedController = qp.route.controller;
- finalizedController._qpDelegate = property_get.get(routeQpMeta, "states.active");
+ finalizedController._qpDelegate = property_get.get(routeQpMeta, 'states.active');
});
router._qpUpdates = null;
}
},
@@ -21300,11 +21339,11 @@
this.controller = controller;
if (this.setupControllers) {
this.setupControllers(controller, context);
} else {
- var states = property_get.get(this, "_qp.states");
+ var states = property_get.get(this, '_qp.states');
if (transition) {
// Update the model dep values used to calculate cache keys.
ember_routing__utils.stashParamNames(this.router, transition.state.handlerInfos);
controller._qpDelegate = states.changingKeys;
controller._updateCacheParams(transition.params);
@@ -21508,14 +21547,14 @@
will be used as the model for this route.
*/
model: function (params, transition) {
var match, name, sawParams, value;
- var queryParams = property_get.get(this, "_qp.map");
+ var queryParams = property_get.get(this, '_qp.map');
for (var prop in params) {
- if (prop === "queryParams" || queryParams && prop in queryParams) {
+ if (prop === 'queryParams' || queryParams && prop in queryParams) {
continue;
}
if (match = prop.match(/^(.*)_id$/)) {
name = match[1];
@@ -21555,11 +21594,11 @@
@method findModel
@param {String} type the model type
@param {Object} value the value passed to find
*/
findModel: function () {
- var store = property_get.get(this, "store");
+ var store = property_get.get(this, 'store');
return store.find.apply(store, arguments);
},
/**
Store property provides a hook for data persistence libraries to inject themselves.
@@ -21571,15 +21610,15 @@
@param {Object} store
*/
store: computed.computed(function () {
var container = this.container;
var routeName = this.routeName;
- var namespace = property_get.get(this, "router.namespace");
+ var namespace = property_get.get(this, 'router.namespace');
return {
find: function (name, value) {
- var modelClass = container.lookupFactory("model:" + name);
+ var modelClass = container.lookupFactory('model:' + name);
if (!modelClass) {
return;
}
@@ -21697,11 +21736,11 @@
@param {Controller} controller instance
@param {Object} model
*/
setupController: function (controller, context, transition) {
if (controller && context !== undefined) {
- property_set.set(controller, "model", context);
+ property_set.set(controller, 'model', context);
}
},
/**
Returns the controller for a particular route or name.
@@ -21719,18 +21758,18 @@
@param {String} name the name of the route or controller
@return {Ember.Controller}
*/
controllerFor: function (name, _skipAssert) {
var container = this.container;
- var route = container.lookup("route:" + name);
+ var route = container.lookup('route:' + name);
var controller;
if (route && route.controllerName) {
name = route.controllerName;
}
- controller = container.lookup("controller:" + name);
+ controller = container.lookup('controller:' + name);
// NOTE: We're specifically checking that skipAssert is true, because according
// to the old API the second parameter was model. We do not want people who
// passed a model to skip the assertion.
@@ -21786,11 +21825,11 @@
@method modelFor
@param {String} name the name of the route
@return {Object} the model object
*/
modelFor: function (name) {
- var route = this.container.lookup("route:" + name);
+ var route = this.container.lookup('route:' + name);
var transition = this.router ? this.router.router.activeTransition : null;
// If we are mid-transition, we want to try and look up
// resolved parent contexts on the current transitionEvent.
if (transition) {
@@ -21931,24 +21970,24 @@
@param {Object} [options.model] the model object to set on `options.controller`.
Defaults to the return value of the Route's model hook
*/
render: function (_name, options) {
- var namePassed = typeof _name === "string" && !!_name;
+ var namePassed = typeof _name === 'string' && !!_name;
var isDefaultRender = arguments.length === 0 || Ember['default'].isEmpty(arguments[0]);
var name;
- if (typeof _name === "object" && !options) {
+ if (typeof _name === 'object' && !options) {
name = this.routeName;
options = _name;
} else {
name = _name;
}
var renderOptions = buildRenderOptions(this, namePassed, isDefaultRender, name, options);
this.connections.push(renderOptions);
- run['default'].once(this.router, "_setOutlets");
+ run['default'].once(this.router, '_setOutlets');
},
/**
Disconnects a view that has been rendered into an outlet.
You may pass any or all of the following options to `disconnectOutlet`:
@@ -21991,12 +22030,12 @@
outletName = options;
} else {
outletName = options.outlet;
parentView = options.parentView;
}
- parentView = parentView && parentView.replace(/\//g, ".");
- outletName = outletName || "main";
+ parentView = parentView && parentView.replace(/\//g, '.');
+ outletName = outletName || 'main';
this._disconnectOutlet(outletName, parentView);
for (var i = 0; i < this.router.router.currentHandlerInfos.length; i++) {
// This non-local state munging is sadly necessary to maintain
// backward compatibility with our existing semantics, which allow
// any route to disconnectOutlet things originally rendered by any
@@ -22022,11 +22061,11 @@
this.connections[i] = {
into: connection.into,
outlet: connection.outlet,
name: connection.name
};
- run['default'].once(this.router, "_setOutlets");
+ run['default'].once(this.router, '_setOutlets');
}
}
},
willDestroy: function () {
@@ -22038,11 +22077,11 @@
@method teardownViews
*/
teardownViews: function () {
if (this.connections && this.connections.length > 0) {
this.connections = [];
- run['default'].once(this.router, "_setOutlets");
+ run['default'].once(this.router, '_setOutlets');
}
}
});
var defaultQPMeta = {
@@ -22075,45 +22114,45 @@
var controller = options && options.controller;
var templateName;
var viewName;
var ViewClass;
var template;
- var LOG_VIEW_LOOKUPS = property_get.get(route.router, "namespace.LOG_VIEW_LOOKUPS");
- var into = options && options.into && options.into.replace(/\//g, ".");
- var outlet = options && options.outlet || "main";
+ var LOG_VIEW_LOOKUPS = property_get.get(route.router, 'namespace.LOG_VIEW_LOOKUPS');
+ var into = options && options.into && options.into.replace(/\//g, '.');
+ var outlet = options && options.outlet || 'main';
if (name) {
- name = name.replace(/\//g, ".");
+ name = name.replace(/\//g, '.');
templateName = name;
} else {
name = route.routeName;
templateName = route.templateName || name;
}
if (!controller) {
if (namePassed) {
- controller = route.container.lookup("controller:" + name) || route.controllerName || route.routeName;
+ controller = route.container.lookup('controller:' + name) || route.controllerName || route.routeName;
} else {
- controller = route.controllerName || route.container.lookup("controller:" + name);
+ controller = route.controllerName || route.container.lookup('controller:' + name);
}
}
- if (typeof controller === "string") {
+ if (typeof controller === 'string') {
var controllerName = controller;
- controller = route.container.lookup("controller:" + controllerName);
+ controller = route.container.lookup('controller:' + controllerName);
if (!controller) {
throw new EmberError['default']("You passed `controller: '" + controllerName + "'` into the `render` method, but no such controller could be found.");
}
}
if (options && options.model) {
- controller.set("model", options.model);
+ controller.set('model', options.model);
}
viewName = options && options.view || namePassed && name || route.viewName || name;
- ViewClass = route.container.lookupFactory("view:" + viewName);
- template = route.container.lookup("template:" + templateName);
+ ViewClass = route.container.lookupFactory('view:' + viewName);
+ template = route.container.lookup('template:' + templateName);
if (!ViewClass && !template) {
if (LOG_VIEW_LOOKUPS) {
}
}
@@ -22158,11 +22197,11 @@
var fullQueryParams = getFullQueryParams(route.router, state);
var params = state.queryParamsFor[name] = {};
// Copy over all the query params for this route/controller into params hash.
- var qpMeta = property_get.get(route, "_qp");
+ var qpMeta = property_get.get(route, '_qp');
var qps = qpMeta.qps;
for (var i = 0, len = qps.length; i < len; ++i) {
// Put deserialized qp on params hash.
var qp = qps[i];
@@ -22213,19 +22252,19 @@
* `none`
@property location
@default 'hash'
@see {Ember.Location}
*/
- location: "hash",
+ location: 'hash',
/**
Represents the URL of the root of the application, often '/'. This prefix is
assumed on all routes defined on this router.
@property rootURL
@default '/'
*/
- rootURL: "/",
+ rootURL: '/',
_initRouterJs: function (moduleBasedResolver) {
var router = this.router = new Router['default']();
router.triggerEvent = triggerEvent;
@@ -22236,20 +22275,20 @@
var dsl = new EmberRouterDSL['default'](null, {
enableLoadingSubstates: !!moduleBasedResolver
});
function generateDSL() {
- this.resource("application", { path: "/", overrideNameAssertion: true }, function () {
+ this.resource('application', { path: "/", overrideNameAssertion: true }, function () {
for (var i = 0; i < dslCallbacks.length; i++) {
dslCallbacks[i].call(this);
}
});
}
generateDSL.call(dsl);
- if (property_get.get(this, "namespace.LOG_TRANSITIONS_INTERNAL")) {
+ if (property_get.get(this, 'namespace.LOG_TRANSITIONS_INTERNAL')) {
router.log = Ember['default'].Logger.debug;
}
router.map(dsl.generate());
},
@@ -22264,11 +22303,11 @@
Represents the current URL.
@method url
@return {String} The current URL.
*/
url: computed.computed(function () {
- return property_get.get(this, "location").getURL();
+ return property_get.get(this, 'location').getURL();
}),
/**
Initializes the current router instance and sets up the change handling
event listeners used by the instances `location` implementation.
@@ -22276,15 +22315,15 @@
If no value is found `/` will be used.
@method startRouting
@private
*/
startRouting: function (moduleBasedResolver) {
- var initialURL = property_get.get(this, "initialURL");
+ var initialURL = property_get.get(this, 'initialURL');
if (this.setupRouter(moduleBasedResolver)) {
if (typeof initialURL === "undefined") {
- initialURL = property_get.get(this, "location").getURL();
+ initialURL = property_get.get(this, 'location').getURL();
}
var initialTransition = this.handleURL(initialURL);
if (initialTransition && initialTransition.error) {
throw initialTransition.error;
}
@@ -22294,16 +22333,16 @@
setupRouter: function (moduleBasedResolver) {
this._initRouterJs(moduleBasedResolver);
this._setupLocation();
var router = this.router;
- var location = property_get.get(this, "location");
+ var location = property_get.get(this, 'location');
var self = this;
// Allow the Location class to cancel the router setup while it refreshes
// the page
- if (property_get.get(location, "cancelRouterSetup")) {
+ if (property_get.get(location, 'cancelRouterSetup')) {
return false;
}
this._setupRouter(router, location);
@@ -22325,18 +22364,18 @@
didTransition: function (infos) {
updatePaths(this);
this._cancelSlowTransitionTimer();
- this.notifyPropertyChange("url");
- this.set("currentState", this.targetState);
+ this.notifyPropertyChange('url');
+ this.set('currentState', this.targetState);
// Put this in the runloop so url will be accurate. Seems
// less surprising than didTransition being out of sync.
- run['default'].once(this, this.trigger, "didTransition");
+ run['default'].once(this, this.trigger, 'didTransition');
- if (property_get.get(this, "namespace").LOG_TRANSITIONS) {
+ if (property_get.get(this, 'namespace').LOG_TRANSITIONS) {
Ember['default'].Logger.log("Transitioned into '" + EmberRouter._routePath(infos) + "'");
}
},
_setOutlets: function () {
@@ -22354,23 +22393,23 @@
var connections = route.connections;
var ownState;
for (var j = 0; j < connections.length; j++) {
var appended = appendLiveRoute(liveRoutes, defaultParentState, connections[j]);
liveRoutes = appended.liveRoutes;
- if (appended.ownState.render.name === route.routeName || appended.ownState.render.outlet === "main") {
+ if (appended.ownState.render.name === route.routeName || appended.ownState.render.outlet === 'main') {
ownState = appended.ownState;
}
}
if (connections.length === 0) {
ownState = representEmptyRoute(liveRoutes, defaultParentState, route);
}
defaultParentState = ownState;
}
if (!this._toplevelView) {
- var OutletView = this.container.lookupFactory("view:-outlet");
+ var OutletView = this.container.lookupFactory('view:-outlet');
this._toplevelView = OutletView.create({ _isTopLevel: true });
- var instance = this.container.lookup("-application-instance:main");
+ var instance = this.container.lookup('-application-instance:main');
instance.didCreateRootView(this._toplevelView);
}
this._toplevelView.setOutletState(liveRoutes);
},
@@ -22381,42 +22420,43 @@
@method willTransition
@private
@since 1.11.0
*/
willTransition: function (oldInfos, newInfos, transition) {
- run['default'].once(this, this.trigger, "willTransition", transition);
+ run['default'].once(this, this.trigger, 'willTransition', transition);
- if (property_get.get(this, "namespace").LOG_TRANSITIONS) {
+ if (property_get.get(this, 'namespace').LOG_TRANSITIONS) {
Ember['default'].Logger.log("Preparing to transition from '" + EmberRouter._routePath(oldInfos) + "' to '" + EmberRouter._routePath(newInfos) + "'");
}
},
handleURL: function (url) {
// Until we have an ember-idiomatic way of accessing #hashes, we need to
// remove it because router.js doesn't know how to handle it.
url = url.split(/#(.+)?/)[0];
- return this._doURLTransition("handleURL", url);
+ return this._doURLTransition('handleURL', url);
},
_doURLTransition: function (routerJsMethod, url) {
- var transition = this.router[routerJsMethod](url || "/");
+ var transition = this.router[routerJsMethod](url || '/');
didBeginTransition(transition, this);
return transition;
},
transitionTo: function () {
+ var queryParams;
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- var queryParams;
if (resemblesURL(args[0])) {
- return this._doURLTransition("transitionTo", args[0]);
+ return this._doURLTransition('transitionTo', args[0]);
}
var possibleQueryParams = args[args.length - 1];
- if (possibleQueryParams && possibleQueryParams.hasOwnProperty("queryParams")) {
+ if (possibleQueryParams && possibleQueryParams.hasOwnProperty('queryParams')) {
queryParams = args.pop().queryParams;
} else {
queryParams = {};
}
@@ -22430,17 +22470,17 @@
(_router = this.router).intermediateTransitionTo.apply(_router, arguments);
updatePaths(this);
var infos = this.router.currentHandlerInfos;
- if (property_get.get(this, "namespace").LOG_TRANSITIONS) {
+ if (property_get.get(this, 'namespace').LOG_TRANSITIONS) {
Ember['default'].Logger.log("Intermediate-transitioned into '" + EmberRouter._routePath(infos) + "'");
}
},
replaceWith: function () {
- return this.transitionTo.apply(this, arguments).method("replace");
+ return this.transitionTo.apply(this, arguments).method('replace');
},
generate: function () {
var _router2;
@@ -22520,68 +22560,68 @@
_connectActiveView: function (templateName, view) {
var existing = this._activeViews[templateName];
if (existing) {
- existing[0].off("willDestroyElement", this, existing[1]);
+ existing[0].off('willDestroyElement', this, existing[1]);
}
function disconnectActiveView() {
delete this._activeViews[templateName];
}
this._activeViews[templateName] = [view, disconnectActiveView];
- view.one("willDestroyElement", this, disconnectActiveView);
+ view.one('willDestroyElement', this, disconnectActiveView);
},
_setupLocation: function () {
- var location = property_get.get(this, "location");
- var rootURL = property_get.get(this, "rootURL");
+ var location = property_get.get(this, 'location');
+ var rootURL = property_get.get(this, 'rootURL');
- if ("string" === typeof location && this.container) {
- var resolvedLocation = this.container.lookup("location:" + location);
+ if ('string' === typeof location && this.container) {
+ var resolvedLocation = this.container.lookup('location:' + location);
- if ("undefined" !== typeof resolvedLocation) {
- location = property_set.set(this, "location", resolvedLocation);
+ if ('undefined' !== typeof resolvedLocation) {
+ location = property_set.set(this, 'location', resolvedLocation);
} else {
// Allow for deprecated registration of custom location API's
var options = {
implementation: location
};
- location = property_set.set(this, "location", EmberLocation['default'].create(options));
+ location = property_set.set(this, 'location', EmberLocation['default'].create(options));
}
}
- if (location !== null && typeof location === "object") {
+ if (location !== null && typeof location === 'object') {
if (rootURL) {
- property_set.set(location, "rootURL", rootURL);
+ property_set.set(location, 'rootURL', rootURL);
}
// Allow the location to do any feature detection, such as AutoLocation
// detecting history support. This gives it a chance to set its
// `cancelRouterSetup` property which aborts routing.
- if (typeof location.detect === "function") {
+ if (typeof location.detect === 'function') {
location.detect();
}
// ensure that initState is called AFTER the rootURL is set on
// the location instance
- if (typeof location.initState === "function") {
+ if (typeof location.initState === 'function') {
location.initState();
}
}
},
_getHandlerFunction: function () {
var seen = create['default'](null);
var container = this.container;
- var DefaultRoute = container.lookupFactory("route:basic");
+ var DefaultRoute = container.lookupFactory('route:basic');
var self = this;
return function (name) {
- var routeName = "route:" + name;
+ var routeName = 'route:' + name;
var handler = container.lookup(routeName);
if (seen[name]) {
return handler;
}
@@ -22590,11 +22630,11 @@
if (!handler) {
container._registry.register(routeName, DefaultRoute.extend());
handler = container.lookup(routeName);
- if (property_get.get(self, "namespace.LOG_ACTIVE_GENERATION")) {
+ if (property_get.get(self, 'namespace.LOG_ACTIVE_GENERATION')) {
}
}
handler.routeName = name;
return handler;
@@ -22718,11 +22758,11 @@
var recogHandlerInfos = routerjs.recognizer.handlersFor(leafRouteName);
for (var i = 0, len = recogHandlerInfos.length; i < len; ++i) {
var recogHandler = recogHandlerInfos[i];
var route = routerjs.getHandler(recogHandler.handler);
- var qpMeta = property_get.get(route, "_qp");
+ var qpMeta = property_get.get(route, '_qp');
if (!qpMeta) {
continue;
}
@@ -22760,11 +22800,11 @@
utils.stashParamNames(this, handlerInfos);
for (var i = 0, len = handlerInfos.length; i < len; ++i) {
var route = handlerInfos[i].handler;
- var qpMeta = property_get.get(route, "_qp");
+ var qpMeta = property_get.get(route, '_qp');
for (var j = 0, qpLen = qpMeta.qps.length; j < qpLen; ++j) {
var qp = qpMeta.qps[j];
var presentProp = qp.prop in queryParams && qp.prop || qp.fprop in queryParams && qp.fprop;
@@ -22773,22 +22813,22 @@
queryParams[qp.fprop] = queryParams[presentProp];
delete queryParams[presentProp];
}
} else {
var controllerProto = qp.cProto;
- var cacheMeta = property_get.get(controllerProto, "_cacheMeta");
+ var cacheMeta = property_get.get(controllerProto, '_cacheMeta');
var cacheKey = controllerProto._calculateCacheKey(qp.ctrl, cacheMeta[qp.prop].parts, state.params);
queryParams[qp.fprop] = appCache.lookup(cacheKey, qp.prop, qp.def);
}
}
}
},
_scheduleLoadingEvent: function (transition, originRoute) {
this._cancelSlowTransitionTimer();
- this._slowTransitionTimer = run['default'].scheduleOnce("routerTransitions", this, "_handleSlowTransition", transition, originRoute);
+ this._slowTransitionTimer = run['default'].scheduleOnce('routerTransitions', this, '_handleSlowTransition', transition, originRoute);
},
currentState: null,
targetState: null,
@@ -22797,17 +22837,17 @@
// Don't fire an event if we've since moved on from
// the transition that put us in a loading state.
return;
}
- this.set("targetState", RouterState['default'].create({
+ this.set('targetState', RouterState['default'].create({
emberRouter: this,
routerJs: this.router,
routerJsState: this.router.activeTransition.state
}));
- transition.trigger(true, "loading", transition, originRoute);
+ transition.trigger(true, 'loading', transition, originRoute);
},
_cancelSlowTransitionTimer: function () {
if (this._slowTransitionTimer) {
run['default'].cancel(this._slowTransitionTimer);
@@ -22859,35 +22899,35 @@
error: function (error, transition, originRoute) {
// Attempt to find an appropriate error substate to enter.
var router = originRoute.router;
var tryTopLevel = forEachRouteAbove(originRoute, transition, function (route, childRoute) {
- var childErrorRouteName = findChildRouteName(route, childRoute, "error");
+ var childErrorRouteName = findChildRouteName(route, childRoute, 'error');
if (childErrorRouteName) {
router.intermediateTransitionTo(childErrorRouteName, error);
return;
}
return true;
});
if (tryTopLevel) {
// Check for top-level error state to enter.
- if (routeHasBeenDefined(originRoute.router, "application_error")) {
- router.intermediateTransitionTo("application_error", error);
+ if (routeHasBeenDefined(originRoute.router, 'application_error')) {
+ router.intermediateTransitionTo('application_error', error);
return;
}
}
- logError(error, "Error while processing route: " + transition.targetName);
+ logError(error, 'Error while processing route: ' + transition.targetName);
},
loading: function (transition, originRoute) {
// Attempt to find an appropriate loading substate to enter.
var router = originRoute.router;
var tryTopLevel = forEachRouteAbove(originRoute, transition, function (route, childRoute) {
- var childLoadingRouteName = findChildRouteName(route, childRoute, "loading");
+ var childLoadingRouteName = findChildRouteName(route, childRoute, 'loading');
if (childLoadingRouteName) {
router.intermediateTransitionTo(childLoadingRouteName);
return;
}
@@ -22898,22 +22938,22 @@
}
});
if (tryTopLevel) {
// Check for top-level loading state to enter.
- if (routeHasBeenDefined(originRoute.router, "application_loading")) {
- router.intermediateTransitionTo("application_loading");
+ if (routeHasBeenDefined(originRoute.router, 'application_loading')) {
+ router.intermediateTransitionTo('application_loading');
return;
}
}
}
};
function logError(_error, initialMessage) {
var errorArgs = [];
var error;
- if (_error && typeof _error === "object" && typeof _error.errorThrown === "object") {
+ if (_error && typeof _error === 'object' && typeof _error.errorThrown === 'object') {
error = _error.errorThrown;
} else {
error = _error;
}
@@ -22938,16 +22978,16 @@
}
function findChildRouteName(parentRoute, originatingChildRoute, name) {
var router = parentRoute.router;
var childName;
- var targetChildRouteName = originatingChildRoute.routeName.split(".").pop();
- var namespace = parentRoute.routeName === "application" ? "" : parentRoute.routeName + ".";
+ var targetChildRouteName = originatingChildRoute.routeName.split('.').pop();
+ var namespace = parentRoute.routeName === 'application' ? '' : parentRoute.routeName + '.';
// First, try a named loading state, e.g. 'foo_loading'
- childName = namespace + targetChildRouteName + "_" + name;
+ childName = namespace + targetChildRouteName + '_' + name;
if (routeHasBeenDefined(router, childName)) {
return childName;
}
@@ -22958,11 +22998,11 @@
}
}
function routeHasBeenDefined(router, name) {
var container = router.container;
- return router.hasRoute(name) && (container._registry.has("template:" + name) || container._registry.has("route:" + name));
+ return router.hasRoute(name) && (container._registry.has('template:' + name) || container._registry.has('route:' + name));
}
function triggerEvent(handlerInfos, ignoreFailure, args) {
var name = args.shift();
@@ -23014,11 +23054,11 @@
}
return state;
}
function updatePaths(router) {
- var appController = router.container.lookup("controller:application");
+ var appController = router.container.lookup('controller:application');
if (!appController) {
// appController might not exist when top-level loading/error
// substates have been entered since ApplicationRoute hasn't
// actually been entered at that point.
@@ -23026,21 +23066,21 @@
}
var infos = router.router.currentHandlerInfos;
var path = EmberRouter._routePath(infos);
- if (!("currentPath" in appController)) {
- properties.defineProperty(appController, "currentPath");
+ if (!('currentPath' in appController)) {
+ properties.defineProperty(appController, 'currentPath');
}
- property_set.set(appController, "currentPath", path);
+ property_set.set(appController, 'currentPath', path);
- if (!("currentRouteName" in appController)) {
- properties.defineProperty(appController, "currentRouteName");
+ if (!('currentRouteName' in appController)) {
+ properties.defineProperty(appController, 'currentRouteName');
}
- property_set.set(appController, "currentRouteName", infos[infos.length - 1].name);
+ property_set.set(appController, 'currentRouteName', infos[infos.length - 1].name);
}
EmberRouter.reopenClass({
router: null,
@@ -23113,26 +23153,26 @@
routerJs: router.router,
routerJsState: transition.state
});
if (!router.currentState) {
- router.set("currentState", routerState);
+ router.set('currentState', routerState);
}
- router.set("targetState", routerState);
+ router.set('targetState', routerState);
transition.then(null, function (error) {
if (!error || !error.name) {
return;
}
return error;
- }, "Ember: Process errors from Router");
+ }, 'Ember: Process errors from Router');
}
function resemblesURL(str) {
- return typeof str === "string" && (str === "" || str.charAt(0) === "/");
+ return typeof str === 'string' && (str === '' || str.charAt(0) === '/');
}
function forEachQueryParam(router, targetRouteName, queryParams, callback) {
var qpCache = router._queryParamsFor(targetRouteName);
@@ -23200,17 +23240,17 @@
function appendOrphan(liveRoutes, into, myState) {
if (!liveRoutes.outlets.__ember_orphans__) {
liveRoutes.outlets.__ember_orphans__ = {
render: {
- name: "__ember_orphans__"
+ name: '__ember_orphans__'
},
outlets: create['default'](null)
};
}
liveRoutes.outlets.__ember_orphans__.outlets[into] = myState;
- Ember['default'].run.schedule("afterRender", function () {
+ Ember['default'].run.schedule('afterRender', function () {
// `wasUsed` gets set by the render helper. See the function
// `impersonateAnOutlet`.
});
}
@@ -23227,11 +23267,11 @@
// just so other routes can target it and inherit its place
// in the outlet hierarchy.
defaultParentState.outlets.main = {
render: {
name: route.routeName,
- outlet: "main"
+ outlet: 'main'
},
outlets: {}
};
return defaultParentState;
}
@@ -24566,10 +24606,11 @@
@for Ember
@param {String} [dependentKeys*]
@param {Object} options
@return {Ember.ComputedProperty}
*/
+
function reduceComputed(options) {
var args;
if (arguments.length > 1) {
args = a_slice.call(arguments, 0, -1);
@@ -24620,10 +24661,11 @@
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computes the sum of all values in the dependentKey's array
@since 1.4.0
*/
+
function sum(dependentKey) {
return reduce_computed.reduceComputed(dependentKey, {
initialValue: 0,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -24667,10 +24709,11 @@
@method max
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computes the largest value in the dependentKey's array
*/
+
function max(dependentKey) {
return reduce_computed.reduceComputed(dependentKey, {
initialValue: -Infinity,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -24716,10 +24759,11 @@
@method min
@for Ember.computed
@param {String} dependentKey
@return {Ember.ComputedProperty} computes the smallest value in the dependentKey's array
*/
+
function min(dependentKey) {
return reduce_computed.reduceComputed(dependentKey, {
initialValue: Infinity,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -24765,10 +24809,11 @@
@for Ember.computed
@param {String} dependentKey
@param {Function} callback
@return {Ember.ComputedProperty} an array mapped via the callback
*/
+
function map(dependentKey, callback) {
var options = {
addedItem: function (array, item, changeMeta, instanceMeta) {
var mapped = callback.call(this, item, changeMeta.index);
array.insertAt(changeMeta.index, mapped);
@@ -24810,10 +24855,11 @@
@for Ember.computed
@param {String} dependentKey
@param {String} propertyKey
@return {Ember.ComputedProperty} an array mapped to the specified key
*/
+
function mapBy(dependentKey, propertyKey) {
var callback = function (item) {
return property_get.get(item, propertyKey);
};
return map(dependentKey + '.@each.' + propertyKey, callback);
@@ -24883,10 +24929,11 @@
@param {String} dependentKey
@param {String} propertyKey
@param {*} value
@return {Ember.ComputedProperty} the filtered array
*/
+
function filterBy(dependentKey, propertyKey, value) {
var callback;
if (arguments.length === 2) {
callback = function (item) {
@@ -25043,10 +25090,11 @@
@param {String} setBProperty
@return {Ember.ComputedProperty} computes a new array with all the
items from the first dependent array that are not in the second
dependent array
*/
+
function setDiff(setAProperty, setBProperty) {
if (arguments.length !== 2) {
throw new EmberError['default']('setDiff requires exactly two dependent arrays.');
}
@@ -25185,10 +25233,11 @@
@param {String or Function} sortDefinition a dependent key to an
array of sort properties (add `:desc` to the arrays sort properties to sort descending) or a function to use when sorting
@return {Ember.ComputedProperty} computes a new sorted array based
on the sort property array or callback function
*/
+
function sort(itemsKey, sortDefinition) {
if (typeof sortDefinition === 'function') {
return customSort(itemsKey, sortDefinition);
} else {
@@ -25913,10 +25962,11 @@
});
RSVP.Promise.prototype.fail = function (callback, label) {
return this['catch'](callback, label);
};
+
function onerrorDefault(e) {
var error;
if (e && e.errorThrown) {
// jqXHR provides this
@@ -26074,10 +26124,11 @@
@since 1.10.0
@for Ember
@param {String} type The container type the helper will inject
@param {Function} validator A validation callback that is executed at mixin-time
*/
+
function createInjectionHelper(type, validator) {
typeValidators[type] = validator;
inject[type] = function (name) {
return new InjectedProperty['default'](type, name);
@@ -26092,10 +26143,11 @@
@method validatePropertyInjections
@since 1.10.0
@for Ember
@param {Object} factory The factory object
*/
+
function validatePropertyInjections(factory) {
var proto = factory.proto();
var types = [];
var key, desc, validator, i, l;
@@ -26108,11 +26160,11 @@
if (types.length) {
for (i = 0, l = types.length; i < l; i++) {
validator = typeValidators[types[i]];
- if (typeof validator === "function") {
+ if (typeof validator === 'function') {
validator(factory);
}
}
}
@@ -26160,31 +26212,31 @@
@property content
@type Ember.Object
@default null
*/
content: null,
- _contentDidChange: mixin.observer("content", function () {
+ _contentDidChange: mixin.observer('content', function () {
}),
- isTruthy: computed.computed.bool("content"),
+ isTruthy: computed.computed.bool('content'),
_debugContainerKey: null,
willWatchProperty: function (key) {
- var contentKey = "content." + key;
+ var contentKey = 'content.' + key;
observer.addBeforeObserver(this, contentKey, null, contentPropertyWillChange);
observer.addObserver(this, contentKey, null, contentPropertyDidChange);
},
didUnwatchProperty: function (key) {
- var contentKey = "content." + key;
+ var contentKey = 'content.' + key;
observer.removeBeforeObserver(this, contentKey, null, contentPropertyWillChange);
observer.removeObserver(this, contentKey, null, contentPropertyDidChange);
},
unknownProperty: function (key) {
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
return property_get.get(content, key);
}
},
@@ -26195,11 +26247,11 @@
// rather than delegate
properties.defineProperty(this, key, null, value);
return value;
}
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
return property_set.set(content, key, value);
}
});
@@ -26212,11 +26264,11 @@
/**
@module ember
@submodule ember-runtime
*/
var ActionHandler = mixin.Mixin.create({
- mergedProperties: ["_actions"],
+ mergedProperties: ['_actions'],
/**
The collection of functions, keyed by name, available on this
`ActionHandler` as action targets.
These functions will be invoked when a matching `{{action}}` is triggered
@@ -26326,14 +26378,14 @@
willMergeMixin: function (props) {
var hashName;
if (!props._actions) {
- if (utils.typeOf(props.actions) === "object") {
- hashName = "actions";
- } else if (utils.typeOf(props.events) === "object") {
- hashName = "events";
+ if (utils.typeOf(props.actions) === 'object') {
+ hashName = 'actions';
+ } else if (utils.typeOf(props.events) === 'object') {
+ hashName = 'events';
}
if (hashName) {
props._actions = merge['default'](props._actions || {}, props[hashName]);
}
@@ -26379,12 +26431,14 @@
if (!shouldBubble) {
return;
}
}
- if (target = property_get.get(this, "target")) {
- target.send.apply(target, arguments);
+ if (target = property_get.get(this, 'target')) {
+ var _target;
+
+ (_target = target).send.apply(_target, arguments);
}
}
});
exports['default'] = ActionHandler;
@@ -26930,11 +26984,11 @@
model: null,
/**
@private
*/
- content: alias['default']("model")
+ content: alias['default']('model')
});
});
enifed('ember-runtime/mixins/controller_content_model_alias_deprecation', ['exports', 'ember-metal/core', 'ember-metal/mixin'], function (exports, Ember, mixin) {
@@ -26998,11 +27052,11 @@
@method frozenCopy
@return {Object} copy of receiver or receiver
*/
frozenCopy: function () {
if (freezable.Freezable && freezable.Freezable.detect(this)) {
- return property_get.get(this, "isFrozen") ? this : this.copy().freeze();
+ return property_get.get(this, 'isFrozen') ? this : this.copy().freeze();
} else {
throw new EmberError['default'](string.fmt("%@ does not support freezing", [this]));
}
}
});
@@ -27021,11 +27075,11 @@
*/
then: function (resolve, reject, label) {
var deferred, promise, entity;
entity = this;
- deferred = property_get.get(this, "_deferred");
+ deferred = property_get.get(this, '_deferred');
promise = deferred.promise;
function fulfillmentHandler(fulfillment) {
if (fulfillment === promise) {
return resolve(entity);
@@ -27042,11 +27096,11 @@
@method resolve
*/
resolve: function (value) {
var deferred, promise;
- deferred = property_get.get(this, "_deferred");
+ deferred = property_get.get(this, '_deferred');
promise = deferred.promise;
if (value === this) {
deferred.resolve(promise);
} else {
@@ -27057,16 +27111,16 @@
/**
Reject a Deferred object and call any `failCallbacks` with the given args.
@method reject
*/
reject: function (value) {
- property_get.get(this, "_deferred").reject(value);
+ property_get.get(this, '_deferred').reject(value);
},
_deferred: computed.computed(function () {
- return RSVP['default'].defer("Ember: DeferredMixin - " + this);
+ return RSVP['default'].defer('Ember: DeferredMixin - ' + this);
})
});
});
enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-metal/enumerable_utils', 'ember-metal/computed', 'ember-metal/property_events', 'ember-metal/events', 'ember-runtime/compare'], function (exports, Ember, property_get, property_set, mixin, enumerable_utils, computed, property_events, events, compare) {
@@ -28242,15 +28296,15 @@
no longer allow any properties to be edited.
@method freeze
@return {Object} receiver
*/
freeze: function () {
- if (property_get.get(this, "isFrozen")) {
+ if (property_get.get(this, 'isFrozen')) {
return this;
}
- property_set.set(this, "isFrozen", true);
+ property_set.set(this, 'isFrozen', true);
return this;
}
});
@@ -28269,31 +28323,11 @@
// ..........................................................
// HELPERS
//
var OUT_OF_RANGE_EXCEPTION = "Index out of range";
- var EMPTY = []; /**
- This mixin defines the API for modifying array-like objects. These methods
- can be applied only to a collection that keeps its items in an ordered set.
- It builds upon the Array mixin and adds methods to modify the array.
- Concrete implementations of this class include ArrayProxy and ArrayController.
-
- It is important to use the methods in this class to modify arrays so that
- changes are observable. This allows the binding system in Ember to function
- correctly.
-
-
- Note that an Array can change even if it does not implement this mixin.
- For example, one might implement a SparseArray that cannot be directly
- modified, but if its underlying enumerable changes, it will change also.
-
- @class MutableArray
- @namespace Ember
- @uses Ember.Array
- @uses Ember.MutableEnumerable
- */
- exports['default'] = mixin.Mixin.create(EmberArray['default'], MutableEnumerable['default'], {
+ var EMPTY = [];exports['default'] = mixin.Mixin.create(EmberArray['default'], MutableEnumerable['default'], {
/**
__Required.__ You must implement this method to apply this mixin.
This is one of the primitives you must implement to support `Ember.Array`.
You should replace amt objects started at idx with the objects in the
@@ -28319,11 +28353,11 @@
```
@method clear
@return {Ember.Array} An empty Array.
*/
clear: function () {
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
if (len === 0) {
return this;
}
this.replace(0, len, EMPTY);
@@ -28342,11 +28376,11 @@
@param {Number} idx index of insert the object at.
@param {Object} object object to insert
@return {Ember.Array} receiver
*/
insertAt: function (idx, object) {
- if (idx > property_get.get(this, "length")) {
+ if (idx > property_get.get(this, 'length')) {
throw new EmberError['default'](OUT_OF_RANGE_EXCEPTION);
}
this.replace(idx, 0, [object]);
return this;
@@ -28367,13 +28401,13 @@
@param {Number} start index, start of range
@param {Number} len length of passing range
@return {Ember.Array} receiver
*/
removeAt: function (start, len) {
- if ("number" === typeof start) {
+ if ('number' === typeof start) {
- if (start < 0 || start >= property_get.get(this, "length")) {
+ if (start < 0 || start >= property_get.get(this, 'length')) {
throw new EmberError['default'](OUT_OF_RANGE_EXCEPTION);
}
// fast case
if (len === undefined) {
@@ -28397,11 +28431,11 @@
@method pushObject
@param {*} obj object to push
@return object same object passed as a param
*/
pushObject: function (obj) {
- this.insertAt(property_get.get(this, "length"), obj);
+ this.insertAt(property_get.get(this, 'length'), obj);
return obj;
},
/**
Add the objects in the passed numerable to the end of the array. Defers
@@ -28416,11 +28450,11 @@
*/
pushObjects: function (objects) {
if (!(Enumerable['default'].detect(objects) || utils.isArray(objects))) {
throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");
}
- this.replace(property_get.get(this, "length"), 0, objects);
+ this.replace(property_get.get(this, 'length'), 0, objects);
return this;
},
/**
Pop object from array or nil if none are left. Works just like `pop()` but
@@ -28432,11 +28466,11 @@
```
@method popObject
@return object
*/
popObject: function () {
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
if (len === 0) {
return null;
}
var ret = this.objectAt(len - 1);
@@ -28454,11 +28488,11 @@
```
@method shiftObject
@return object
*/
shiftObject: function () {
- if (property_get.get(this, "length") === 0) {
+ if (property_get.get(this, 'length') === 0) {
return null;
}
var ret = this.objectAt(0);
this.removeAt(0);
@@ -28504,11 +28538,11 @@
KVO-compliant.
@method reverseObjects
@return {Ember.Array} receiver
*/
reverseObjects: function () {
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
if (len === 0) {
return this;
}
var objects = this.toArray().reverse();
@@ -28532,11 +28566,11 @@
setObjects: function (objects) {
if (objects.length === 0) {
return this.clear();
}
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
this.replace(0, len, objects);
return this;
},
// ..........................................................
@@ -28554,11 +28588,11 @@
@method removeObject
@param {*} obj object to remove
@return {Ember.Array} receiver
*/
removeObject: function (obj) {
- var loc = property_get.get(this, "length") || 0;
+ var loc = property_get.get(this, 'length') || 0;
while (--loc >= 0) {
var curObject = this.objectAt(loc);
if (curObject === obj) {
this.removeAt(loc);
@@ -28928,11 +28962,11 @@
@method hasObserverFor
@param {String} key Key to check
@return {Boolean}
*/
hasObserverFor: function (key) {
- return events.hasListeners(this, key + ":change");
+ return events.hasListeners(this, key + ':change');
},
/**
Retrieves the value of a property, or a default value in the case that the
property returns `undefined`.
@@ -29131,18 +29165,18 @@
/**
Once the proxied promise has settled this will become `false`.
@property isPending
@default true
*/
- isPending: not("isSettled").readOnly(),
+ isPending: not('isSettled').readOnly(),
/**
Once the proxied promise has settled this will become `true`.
@property isSettled
@default false
*/
- isSettled: or("isRejected", "isFulfilled").readOnly(),
+ isSettled: or('isRejected', 'isFulfilled').readOnly(),
/**
Will become `true` if the proxied promise is rejected.
@property isRejected
@default false
@@ -29182,37 +29216,37 @@
See RSVP.Promise.then.
@method then
@param {Function} callback
@return {RSVP.Promise}
*/
- then: promiseAlias("then"),
+ then: promiseAlias('then'),
/**
An alias to the proxied promise's `catch`.
See RSVP.Promise.catch.
@method catch
@param {Function} callback
@return {RSVP.Promise}
@since 1.3.0
*/
- "catch": promiseAlias("catch"),
+ 'catch': promiseAlias('catch'),
/**
An alias to the proxied promise's `finally`.
See RSVP.Promise.finally.
@method finally
@param {Function} callback
@return {RSVP.Promise}
@since 1.3.0
*/
- "finally": promiseAlias("finally")
+ 'finally': promiseAlias('finally')
});
function promiseAlias(name) {
return function () {
- var promise = property_get.get(this, "promise");
+ var promise = property_get.get(this, 'promise');
return promise[name].apply(promise, arguments);
};
}
});
@@ -29264,13 +29298,13 @@
*/
sortFunction: compare['default'],
orderBy: function (item1, item2) {
var result = 0;
- var sortProperties = property_get.get(this, "sortProperties");
- var sortAscending = property_get.get(this, "sortAscending");
- var sortFunction = property_get.get(this, "sortFunction");
+ var sortProperties = property_get.get(this, 'sortProperties');
+ var sortAscending = property_get.get(this, 'sortAscending');
+ var sortFunction = property_get.get(this, 'sortFunction');
enumerable_utils.forEach(sortProperties, function (propertyName) {
if (result === 0) {
result = sortFunction.call(this, property_get.get(item1, propertyName), property_get.get(item2, propertyName));
@@ -29282,138 +29316,138 @@
return result;
},
destroy: function () {
- var content = property_get.get(this, "content");
- var sortProperties = property_get.get(this, "sortProperties");
+ var content = property_get.get(this, 'content');
+ var sortProperties = property_get.get(this, 'sortProperties');
if (content && sortProperties) {
enumerable_utils.forEach(content, function (item) {
enumerable_utils.forEach(sortProperties, function (sortProperty) {
- observer.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange");
+ observer.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
}, this);
}, this);
}
return this._super.apply(this, arguments);
},
- isSorted: computed_macros.notEmpty("sortProperties"),
+ isSorted: computed_macros.notEmpty('sortProperties'),
/**
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
*/
- arrangedContent: computed.computed("content", "sortProperties.@each", {
+ arrangedContent: computed.computed('content', 'sortProperties.@each', {
get: function (key) {
- var content = property_get.get(this, "content");
- var isSorted = property_get.get(this, "isSorted");
- var sortProperties = property_get.get(this, "sortProperties");
+ var content = property_get.get(this, 'content');
+ var isSorted = property_get.get(this, 'isSorted');
+ var sortProperties = property_get.get(this, 'sortProperties');
var self = this;
if (content && isSorted) {
content = content.slice();
content.sort(function (item1, item2) {
return self.orderBy(item1, item2);
});
enumerable_utils.forEach(content, function (item) {
enumerable_utils.forEach(sortProperties, function (sortProperty) {
- observer.addObserver(item, sortProperty, this, "contentItemSortPropertyDidChange");
+ observer.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
}, this);
}, this);
return Ember['default'].A(content);
}
return content;
}
}),
- _contentWillChange: mixin.beforeObserver("content", function () {
- var content = property_get.get(this, "content");
- var sortProperties = property_get.get(this, "sortProperties");
+ _contentWillChange: mixin.beforeObserver('content', function () {
+ var content = property_get.get(this, 'content');
+ var sortProperties = property_get.get(this, 'sortProperties');
if (content && sortProperties) {
enumerable_utils.forEach(content, function (item) {
enumerable_utils.forEach(sortProperties, function (sortProperty) {
- observer.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange");
+ observer.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
}, this);
}, this);
}
this._super.apply(this, arguments);
}),
- sortPropertiesWillChange: mixin.beforeObserver("sortProperties", function () {
+ sortPropertiesWillChange: mixin.beforeObserver('sortProperties', function () {
this._lastSortAscending = undefined;
}),
- sortPropertiesDidChange: mixin.observer("sortProperties", function () {
+ sortPropertiesDidChange: mixin.observer('sortProperties', function () {
this._lastSortAscending = undefined;
}),
- sortAscendingWillChange: mixin.beforeObserver("sortAscending", function () {
- this._lastSortAscending = property_get.get(this, "sortAscending");
+ sortAscendingWillChange: mixin.beforeObserver('sortAscending', function () {
+ this._lastSortAscending = property_get.get(this, 'sortAscending');
}),
- sortAscendingDidChange: mixin.observer("sortAscending", function () {
- if (this._lastSortAscending !== undefined && property_get.get(this, "sortAscending") !== this._lastSortAscending) {
- var arrangedContent = property_get.get(this, "arrangedContent");
+ sortAscendingDidChange: mixin.observer('sortAscending', function () {
+ if (this._lastSortAscending !== undefined && property_get.get(this, 'sortAscending') !== this._lastSortAscending) {
+ var arrangedContent = property_get.get(this, 'arrangedContent');
arrangedContent.reverseObjects();
}
}),
contentArrayWillChange: function (array, idx, removedCount, addedCount) {
- var isSorted = property_get.get(this, "isSorted");
+ var isSorted = property_get.get(this, 'isSorted');
if (isSorted) {
- var arrangedContent = property_get.get(this, "arrangedContent");
+ var arrangedContent = property_get.get(this, 'arrangedContent');
var removedObjects = array.slice(idx, idx + removedCount);
- var sortProperties = property_get.get(this, "sortProperties");
+ var sortProperties = property_get.get(this, 'sortProperties');
enumerable_utils.forEach(removedObjects, function (item) {
arrangedContent.removeObject(item);
enumerable_utils.forEach(sortProperties, function (sortProperty) {
- observer.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange");
+ observer.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
}, this);
}, this);
}
return this._super(array, idx, removedCount, addedCount);
},
contentArrayDidChange: function (array, idx, removedCount, addedCount) {
- var isSorted = property_get.get(this, "isSorted");
- var sortProperties = property_get.get(this, "sortProperties");
+ var isSorted = property_get.get(this, 'isSorted');
+ var sortProperties = property_get.get(this, 'sortProperties');
if (isSorted) {
var addedObjects = array.slice(idx, idx + addedCount);
enumerable_utils.forEach(addedObjects, function (item) {
this.insertItemSorted(item);
enumerable_utils.forEach(sortProperties, function (sortProperty) {
- observer.addObserver(item, sortProperty, this, "contentItemSortPropertyDidChange");
+ observer.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange');
}, this);
}, this);
}
return this._super(array, idx, removedCount, addedCount);
},
insertItemSorted: function (item) {
- var arrangedContent = property_get.get(this, "arrangedContent");
- var length = property_get.get(arrangedContent, "length");
+ var arrangedContent = property_get.get(this, 'arrangedContent');
+ var length = property_get.get(arrangedContent, 'length');
var idx = this._binarySearch(item, 0, length);
arrangedContent.insertAt(idx, item);
},
contentItemSortPropertyDidChange: function (item) {
- var arrangedContent = property_get.get(this, "arrangedContent");
+ var arrangedContent = property_get.get(this, 'arrangedContent');
var oldIndex = arrangedContent.indexOf(item);
var leftItem = arrangedContent.objectAt(oldIndex - 1);
var rightItem = arrangedContent.objectAt(oldIndex + 1);
var leftResult = leftItem && this.orderBy(item, leftItem);
var rightResult = rightItem && this.orderBy(item, rightItem);
@@ -29429,11 +29463,11 @@
if (low === high) {
return low;
}
- arrangedContent = property_get.get(this, "arrangedContent");
+ arrangedContent = property_get.get(this, 'arrangedContent');
mid = low + Math.floor((high - low) / 2);
midItem = arrangedContent.objectAt(mid);
res = this.orderBy(midItem, item);
@@ -29461,11 +29495,11 @@
target: null,
action: null,
actionContext: null,
targetObject: computed.computed(function () {
- var target = property_get.get(this, "target");
+ var target = property_get.get(this, 'target');
if (utils.typeOf(target) === "string") {
var value = property_get.get(this, target);
if (value === undefined) {
value = property_get.get(Ember['default'].lookup, target);
@@ -29473,25 +29507,25 @@
return value;
} else {
return target;
}
- }).property("target"),
+ }).property('target'),
actionContextObject: computed.computed(function () {
- var actionContext = property_get.get(this, "actionContext");
+ var actionContext = property_get.get(this, 'actionContext');
if (utils.typeOf(actionContext) === "string") {
var value = property_get.get(this, actionContext);
if (value === undefined) {
value = property_get.get(Ember['default'].lookup, actionContext);
}
return value;
} else {
return actionContext;
}
- }).property("actionContext"),
+ }).property('actionContext'),
/**
Send an `action` with an `actionContext` to a `target`. The action, actionContext
and target will be retrieved from properties of the object. For example:
```javascript
@@ -29537,12 +29571,12 @@
@param opts {Hash} (optional, with the optional keys action, target and/or actionContext)
@return {Boolean} true if the action was sent successfully and did not return false
*/
triggerAction: function (opts) {
opts = opts || {};
- var action = opts.action || property_get.get(this, "action");
- var target = opts.target || property_get.get(this, "targetObject");
+ var action = opts.action || property_get.get(this, 'action');
+ var target = opts.target || property_get.get(this, 'targetObject');
var actionContext = opts.actionContext;
function args(options, actionName) {
var ret = [];
if (actionName) {
@@ -29550,12 +29584,12 @@
}
return ret.concat(options);
}
- if (typeof actionContext === "undefined") {
- actionContext = property_get.get(this, "actionContextObject") || this;
+ if (typeof actionContext === 'undefined') {
+ actionContext = property_get.get(this, 'actionContextObject') || this;
}
if (target && action) {
var ret;
@@ -29649,11 +29683,11 @@
The array that the proxy pretends to be. In the default `ArrayProxy`
implementation, this and `content` are the same. Subclasses of `ArrayProxy`
can override this property to provide things like sorting and filtering.
@property arrangedContent
*/
- arrangedContent: alias['default']("content"),
+ arrangedContent: alias['default']('content'),
/**
Should actually retrieve the object at the specified index from the
content. You can override this method in subclasses to transform the
content item to something new.
@@ -29661,11 +29695,11 @@
@method objectAtContent
@param {Number} idx The index to retrieve.
@return {Object} the value or undefined if none found
*/
objectAtContent: function (idx) {
- return property_get.get(this, "arrangedContent").objectAt(idx);
+ return property_get.get(this, 'arrangedContent').objectAt(idx);
},
/**
Should actually replace the specified objects on the content array.
You can override this method in subclasses to transform the content item
@@ -29677,30 +29711,30 @@
@param {Array} objects Optional array of objects to insert or null if no
objects.
@return {void}
*/
replaceContent: function (idx, amt, objects) {
- property_get.get(this, "content").replace(idx, amt, objects);
+ property_get.get(this, 'content').replace(idx, amt, objects);
},
/**
Invoked when the content property is about to change. Notifies observers that the
entire array content will change.
@private
@method _contentWillChange
*/
- _contentWillChange: mixin.beforeObserver("content", function () {
+ _contentWillChange: mixin.beforeObserver('content', function () {
this._teardownContent();
}),
_teardownContent: function () {
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
content.removeArrayObserver(this, {
- willChange: "contentArrayWillChange",
- didChange: "contentArrayDidChange"
+ willChange: 'contentArrayWillChange',
+ didChange: 'contentArrayDidChange'
});
}
},
/**
@@ -29726,128 +29760,128 @@
Invoked when the content property changes. Notifies observers that the
entire array content has changed.
@private
@method _contentDidChange
*/
- _contentDidChange: mixin.observer("content", function () {
- var content = property_get.get(this, "content");
+ _contentDidChange: mixin.observer('content', function () {
+ var content = property_get.get(this, 'content');
this._setupContent();
}),
_setupContent: function () {
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
content.addArrayObserver(this, {
- willChange: "contentArrayWillChange",
- didChange: "contentArrayDidChange"
+ willChange: 'contentArrayWillChange',
+ didChange: 'contentArrayDidChange'
});
}
},
- _arrangedContentWillChange: mixin.beforeObserver("arrangedContent", function () {
- var arrangedContent = property_get.get(this, "arrangedContent");
- var len = arrangedContent ? property_get.get(arrangedContent, "length") : 0;
+ _arrangedContentWillChange: mixin.beforeObserver('arrangedContent', function () {
+ var arrangedContent = property_get.get(this, 'arrangedContent');
+ var len = arrangedContent ? property_get.get(arrangedContent, 'length') : 0;
this.arrangedContentArrayWillChange(this, 0, len, undefined);
this.arrangedContentWillChange(this);
this._teardownArrangedContent(arrangedContent);
}),
- _arrangedContentDidChange: mixin.observer("arrangedContent", function () {
- var arrangedContent = property_get.get(this, "arrangedContent");
- var len = arrangedContent ? property_get.get(arrangedContent, "length") : 0;
+ _arrangedContentDidChange: mixin.observer('arrangedContent', function () {
+ var arrangedContent = property_get.get(this, 'arrangedContent');
+ var len = arrangedContent ? property_get.get(arrangedContent, 'length') : 0;
this._setupArrangedContent();
this.arrangedContentDidChange(this);
this.arrangedContentArrayDidChange(this, 0, undefined, len);
}),
_setupArrangedContent: function () {
- var arrangedContent = property_get.get(this, "arrangedContent");
+ var arrangedContent = property_get.get(this, 'arrangedContent');
if (arrangedContent) {
arrangedContent.addArrayObserver(this, {
- willChange: "arrangedContentArrayWillChange",
- didChange: "arrangedContentArrayDidChange"
+ willChange: 'arrangedContentArrayWillChange',
+ didChange: 'arrangedContentArrayDidChange'
});
}
},
_teardownArrangedContent: function () {
- var arrangedContent = property_get.get(this, "arrangedContent");
+ var arrangedContent = property_get.get(this, 'arrangedContent');
if (arrangedContent) {
arrangedContent.removeArrayObserver(this, {
- willChange: "arrangedContentArrayWillChange",
- didChange: "arrangedContentArrayDidChange"
+ willChange: 'arrangedContentArrayWillChange',
+ didChange: 'arrangedContentArrayDidChange'
});
}
},
arrangedContentWillChange: K,
arrangedContentDidChange: K,
objectAt: function (idx) {
- return property_get.get(this, "content") && this.objectAtContent(idx);
+ return property_get.get(this, 'content') && this.objectAtContent(idx);
},
length: computed.computed(function () {
- var arrangedContent = property_get.get(this, "arrangedContent");
- return arrangedContent ? property_get.get(arrangedContent, "length") : 0;
+ var arrangedContent = property_get.get(this, 'arrangedContent');
+ return arrangedContent ? property_get.get(arrangedContent, 'length') : 0;
// No dependencies since Enumerable notifies length of change
}),
_replace: function (idx, amt, objects) {
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
this.replaceContent(idx, amt, objects);
}
return this;
},
replace: function () {
- if (property_get.get(this, "arrangedContent") === property_get.get(this, "content")) {
+ if (property_get.get(this, 'arrangedContent') === property_get.get(this, 'content')) {
this._replace.apply(this, arguments);
} else {
throw new EmberError['default']("Using replace on an arranged ArrayProxy is not allowed.");
}
},
_insertAt: function (idx, object) {
- if (idx > property_get.get(this, "content.length")) {
+ if (idx > property_get.get(this, 'content.length')) {
throw new EmberError['default'](OUT_OF_RANGE_EXCEPTION);
}
this._replace(idx, 0, [object]);
return this;
},
insertAt: function (idx, object) {
- if (property_get.get(this, "arrangedContent") === property_get.get(this, "content")) {
+ if (property_get.get(this, 'arrangedContent') === property_get.get(this, 'content')) {
return this._insertAt(idx, object);
} else {
throw new EmberError['default']("Using insertAt on an arranged ArrayProxy is not allowed.");
}
},
removeAt: function (start, len) {
- if ("number" === typeof start) {
- var content = property_get.get(this, "content");
- var arrangedContent = property_get.get(this, "arrangedContent");
+ if ('number' === typeof start) {
+ var content = property_get.get(this, 'content');
+ var arrangedContent = property_get.get(this, 'arrangedContent');
var indices = [];
var i;
- if (start < 0 || start >= property_get.get(this, "length")) {
+ if (start < 0 || start >= property_get.get(this, 'length')) {
throw new EmberError['default'](OUT_OF_RANGE_EXCEPTION);
}
if (len === undefined) {
len = 1;
@@ -29873,28 +29907,28 @@
return this;
},
pushObject: function (obj) {
- this._insertAt(property_get.get(this, "content.length"), obj);
+ this._insertAt(property_get.get(this, 'content.length'), obj);
return obj;
},
pushObjects: function (objects) {
if (!(Enumerable['default'].detect(objects) || utils.isArray(objects))) {
throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");
}
- this._replace(property_get.get(this, "length"), 0, objects);
+ this._replace(property_get.get(this, 'length'), 0, objects);
return this;
},
setObjects: function (objects) {
if (objects.length === 0) {
return this.clear();
}
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
this._replace(0, len, objects);
return this;
},
unshiftObject: function (obj) {
@@ -29998,11 +30032,11 @@
for (var i = 0, l = props.length; i < l; i++) {
var properties = props[i];
- if (typeof properties !== "object" && properties !== undefined) {
+ if (typeof properties !== 'object' && properties !== undefined) {
throw new EmberError['default']("Ember.Object.create only accepts objects.");
}
if (!properties) {
continue;
@@ -30016,25 +30050,25 @@
if (mixin.IS_BINDING.test(keyName)) {
var bindings = m.bindings;
if (!bindings) {
bindings = m.bindings = {};
- } else if (!m.hasOwnProperty("bindings")) {
+ } else if (!m.hasOwnProperty('bindings')) {
bindings = m.bindings = o_create['default'](m.bindings);
}
bindings[keyName] = value;
}
var possibleDesc = this[keyName];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
if (concatenatedProperties && concatenatedProperties.length > 0 && enumerable_utils.indexOf(concatenatedProperties, keyName) >= 0) {
var baseValue = this[keyName];
if (baseValue) {
- if ("function" === typeof baseValue.concat) {
+ if ('function' === typeof baseValue.concat) {
value = baseValue.concat(value);
} else {
value = utils.makeArray(baseValue).concat(value);
}
} else {
@@ -30049,11 +30083,11 @@
}
if (desc) {
desc.set(this, keyName, value);
} else {
- if (typeof this.setUnknownProperty === "function" && !(keyName in this)) {
+ if (typeof this.setUnknownProperty === 'function' && !(keyName in this)) {
this.setUnknownProperty(keyName, value);
} else {
this[keyName] = value;
@@ -30081,11 +30115,11 @@
this.init.apply(this, args);
}
m.proto = proto;
chains.finishChains(this);
- events.sendEvent(this, "init");
+ events.sendEvent(this, 'init');
};
Class.toString = mixin.Mixin.prototype.toString;
Class.willReopen = function () {
if (wasApplied) {
@@ -30252,12 +30286,12 @@
if (this.isDestroying) {
return;
}
this.isDestroying = true;
- schedule("actions", this, this.willDestroy);
- schedule("destroy", this, this._scheduledDestroy);
+ schedule('actions', this, this.willDestroy);
+ schedule('destroy', this, this._scheduledDestroy);
return this;
},
/**
Override to implement teardown.
@@ -30316,13 +30350,13 @@
```
@method toString
@return {String} string representation
*/
toString: function () {
- var hasToStringExtension = typeof this.toStringExtension === "function";
- var extension = hasToStringExtension ? ":" + this.toStringExtension() : "";
- var ret = "<" + this.constructor.toString() + ":" + utils.guidFor(this) + extension + ">";
+ var hasToStringExtension = typeof this.toStringExtension === 'function';
+ var extension = hasToStringExtension ? ":" + this.toStringExtension() : '';
+ var ret = '<' + this.constructor.toString() + ':' + utils.guidFor(this) + extension + '>';
this.toString = makeToString(ret);
return ret;
}
});
@@ -30439,15 +30473,16 @@
@method createWithMixins
@static
@param [arguments]*
*/
createWithMixins: function () {
+ var C = this;
+
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
- var C = this;
if (args.length > 0) {
this._initMixins(args);
}
return new C();
},
@@ -30480,15 +30515,16 @@
@method create
@static
@param [arguments]*
*/
create: function () {
+ var C = this;
+
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
- var C = this;
if (args.length > 0) {
this._initProperties(args);
}
return new C();
},
@@ -30570,11 +30606,11 @@
applyMixin(this, arguments, false);
return this;
},
detect: function (obj) {
- if ("function" !== typeof obj) {
+ if ('function' !== typeof obj) {
return false;
}
while (obj) {
if (obj === this) {
return true;
@@ -30611,11 +30647,11 @@
@param key {String} property name
*/
metaForProperty: function (key) {
var proto = this.proto();
var possibleDesc = proto[key];
- var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined;
+ var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined;
return desc._meta || {};
},
_computedProperties: computed.computed(function () {
@@ -30647,11 +30683,11 @@
*/
eachComputedProperty: function (callback, binding) {
var property, name;
var empty = {};
- var properties = property_get.get(this, "_computedProperties");
+ var properties = property_get.get(this, '_computedProperties');
for (var i = 0, length = properties.length; i < length; i++) {
property = properties[i];
name = property.name;
callback.call(binding || this, property.name, property.meta || empty);
@@ -30676,11 +30712,11 @@
var key, desc;
for (key in proto) {
desc = proto[key];
if (desc instanceof InjectedProperty['default']) {
- injections[key] = desc.type + ":" + (desc.name || key);
+ injections[key] = desc.type + ':' + (desc.name || key);
}
}
return injections;
};
@@ -30755,11 +30791,11 @@
return item && property_get.get(item, this._keyName);
},
length: computed.computed(function () {
var content = this._content;
- return content ? property_get.get(content, "length") : 0;
+ return content ? property_get.get(content, 'length') : 0;
})
});
var IS_OBSERVER = /^.+:(before|change)$/;
@@ -30772,12 +30808,12 @@
}
while (--loc >= idx) {
var item = content.objectAt(loc);
if (item) {
- observer.addBeforeObserver(item, keyName, proxy, "contentKeyWillChange");
- observer.addObserver(item, keyName, proxy, "contentKeyDidChange");
+ observer.addBeforeObserver(item, keyName, proxy, 'contentKeyWillChange');
+ observer.addObserver(item, keyName, proxy, 'contentKeyDidChange');
// keep track of the index each item was found at so we can map
// it back when the obj changes.
guid = utils.guidFor(item);
if (!objects[guid]) {
@@ -30798,12 +30834,12 @@
var indices, guid;
while (--loc >= idx) {
var item = content.objectAt(loc);
if (item) {
- observer.removeBeforeObserver(item, keyName, proxy, "contentKeyWillChange");
- observer.removeObserver(item, keyName, proxy, "contentKeyDidChange");
+ observer.removeBeforeObserver(item, keyName, proxy, 'contentKeyWillChange');
+ observer.removeObserver(item, keyName, proxy, 'contentKeyDidChange');
guid = utils.guidFor(item);
indices = objects[guid];
indices[array.indexOf.call(indices, loc)] = null;
}
@@ -30864,11 +30900,11 @@
}
property_events.propertyWillChange(this, key);
}
- property_events.propertyWillChange(this._content, "@each");
+ property_events.propertyWillChange(this._content, '@each');
property_events.endPropertyChanges(this);
},
arrayDidChange: function (content, idx, removedCnt, addedCnt) {
var keys = this._keys;
@@ -30886,11 +30922,11 @@
}
property_events.propertyDidChange(this, key);
}
- property_events.propertyDidChange(this._content, "@each");
+ property_events.propertyDidChange(this._content, '@each');
}, this);
},
// ..........................................................
// LISTEN FOR NEW OBSERVERS AND OTHER EVENT LISTENERS
@@ -30919,11 +30955,11 @@
}
if (!keys[keyName]) {
keys[keyName] = 1;
var content = this._content;
- var len = property_get.get(content, "length");
+ var len = property_get.get(content, 'length');
addObserverForContentKey(content, keyName, this, 0, len);
} else {
keys[keyName]++;
}
@@ -30931,11 +30967,11 @@
stopObservingContentKey: function (keyName) {
var keys = this._keys;
if (keys && keys[keyName] > 0 && --keys[keyName] <= 0) {
var content = this._content;
- var len = property_get.get(content, "length");
+ var len = property_get.get(content, 'length');
removeObserverForContentKey(content, keyName, this, 0, len);
}
},
@@ -30978,10 +31014,11 @@
@method onLoad
@for Ember
@param name {String} name of hook
@param callback {Function} callback to be called
*/
+
function onLoad(name, callback) {
var object;
loadHooks[name] = loadHooks[name] || Ember['default'].A();
loadHooks[name].pushObject(callback);
@@ -30998,14 +31035,15 @@
@method runLoadHooks
@for Ember
@param name {String} name of hook
@param object {Object} object to pass to callbacks
*/
+
function runLoadHooks(name, object) {
loaded[name] = object;
- if (typeof window === "object" && typeof window.dispatchEvent === "function" && typeof CustomEvent === "function") {
+ if (typeof window === 'object' && typeof window.dispatchEvent === 'function' && typeof CustomEvent === "function") {
var event = new CustomEvent(name, { detail: object, name: name });
window.dispatchEvent(event);
}
if (loadHooks[name]) {
@@ -31033,11 +31071,11 @@
Namespace.NAMESPACES.push(this);
Namespace.PROCESSED = false;
},
toString: function () {
- var name = property_get.get(this, "name") || property_get.get(this, "modulePrefix");
+ var name = property_get.get(this, 'name') || property_get.get(this, 'modulePrefix');
if (name) {
return name;
}
findNamespaces();
@@ -31080,11 +31118,11 @@
var hasOwnProp = ({}).hasOwnProperty;
function processNamespace(paths, root, seen) {
var idx = paths.length;
- NAMESPACES_BY_ID[paths.join(".")] = root;
+ NAMESPACES_BY_ID[paths.join('.')] = root;
// Loop over all of the keys in the namespace, looking for classes
for (var key in root) {
if (!hasOwnProp.call(root, key)) {
continue;
@@ -31100,24 +31138,24 @@
// If we have found an unprocessed class
if (obj && obj.toString === classToString) {
// Replace the class' `toString` with the dot-separated path
// and set its `NAME_KEY`
- obj.toString = makeToString(paths.join("."));
- obj[NAME_KEY] = paths.join(".");
+ obj.toString = makeToString(paths.join('.'));
+ obj[NAME_KEY] = paths.join('.');
// Support nested namespaces
} else if (obj && obj.isNamespace) {
- // Skip aliased namespaces
- if (seen[utils.guidFor(obj)]) {
- continue;
- }
- seen[utils.guidFor(obj)] = true;
+ // Skip aliased namespaces
+ if (seen[utils.guidFor(obj)]) {
+ continue;
+ }
+ seen[utils.guidFor(obj)] = true;
- // Process the child namespace
- processNamespace(paths, obj, seen);
- }
+ // Process the child namespace
+ processNamespace(paths, obj, seen);
+ }
}
paths.length = idx; // cut out last item
}
@@ -31125,11 +31163,13 @@
function tryIsNamespace(lookup, prop) {
try {
var obj = lookup[prop];
return obj && obj.isNamespace && obj;
- } catch (e) {}
+ } catch (e) {
+ // continue
+ }
}
function findNamespaces() {
var lookup = Ember['default'].lookup;
var obj;
@@ -31156,11 +31196,11 @@
obj[NAME_KEY] = prop;
}
}
}
- var NAME_KEY = Ember['default'].NAME_KEY = utils.GUID_KEY + "_name";
+ var NAME_KEY = Ember['default'].NAME_KEY = utils.GUID_KEY + '_name';
function superClassString(mixin) {
var superclass = mixin.superclass;
if (superclass) {
if (superclass[NAME_KEY]) {
@@ -31227,12 +31267,10 @@
ember_metal__mixin.Mixin.prototype.toString = classToString; // ES6TODO: altering imported objects. SBB.
exports['default'] = Namespace;
- // continue
-
});
enifed('ember-runtime/system/native_array', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/enumerable_utils', 'ember-metal/mixin', 'ember-metal/array', 'ember-runtime/mixins/array', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/freezable', 'ember-runtime/copy'], function (exports, Ember, property_get, enumerable_utils, mixin, array, EmberArray, MutableArray, Observable, Copyable, freezable, copy) {
'use strict';
@@ -31244,13 +31282,13 @@
var NativeArray = mixin.Mixin.create(MutableArray['default'], Observable['default'], Copyable['default'], {
// because length is a built-in property we need to know to just get the
// original property.
get: function (key) {
- if (key === "length") {
+ if (key === 'length') {
return this.length;
- } else if ("number" === typeof key) {
+ } else if ('number' === typeof key) {
return this[key];
} else {
return this._super(key);
}
},
@@ -31267,11 +31305,11 @@
}
// if we replaced exactly the same number of items, then pass only the
// replaced range. Otherwise, pass the full remaining array length
// since everything has shifted
- var len = objects ? property_get.get(objects, "length") : 0;
+ var len = objects ? property_get.get(objects, 'length') : 0;
this.arrayContentWillChange(idx, amt, len);
if (len === 0) {
this.splice(idx, amt);
} else {
@@ -31306,11 +31344,11 @@
return this.slice();
}
});
// Remove any methods implemented natively so we don't override them
- var ignore = ["length"];
+ var ignore = ['length'];
enumerable_utils.forEach(NativeArray.keys(), function (methodName) {
if (Array.prototype[methodName]) {
ignore.push(methodName);
}
});
@@ -31466,31 +31504,31 @@
clear: function () {
if (this.isFrozen) {
throw new EmberError['default'](freezable.FROZEN_ERROR);
}
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
if (len === 0) {
return this;
}
var guid;
this.enumerableContentWillChange(len, 0);
- property_events.propertyWillChange(this, "firstObject");
- property_events.propertyWillChange(this, "lastObject");
+ property_events.propertyWillChange(this, 'firstObject');
+ property_events.propertyWillChange(this, 'lastObject');
for (var i = 0; i < len; i++) {
guid = utils.guidFor(this[i]);
delete this[guid];
delete this[i];
}
- property_set.set(this, "length", 0);
+ property_set.set(this, 'length', 0);
- property_events.propertyDidChange(this, "firstObject");
- property_events.propertyDidChange(this, "lastObject");
+ property_events.propertyDidChange(this, 'firstObject');
+ property_events.propertyDidChange(this, 'lastObject');
this.enumerableContentDidChange(len, 0);
return this;
},
@@ -31511,12 +31549,12 @@
// fail fast
if (!Enumerable['default'].detect(obj)) {
return false;
}
- var loc = property_get.get(this, "length");
- if (property_get.get(obj, "length") !== loc) {
+ var loc = property_get.get(this, 'length');
+ if (property_get.get(obj, 'length') !== loc) {
return false;
}
while (--loc >= 0) {
if (!obj.contains(this[loc])) {
@@ -31542,11 +31580,11 @@
```
@method add
@param {Object} obj The object to add.
@return {Ember.Set} The set itself.
*/
- add: mixin.aliasMethod("addObject"),
+ add: mixin.aliasMethod('addObject'),
/**
Removes the object from the set if it is found. If you pass a `null` value
or an object that is already not in the set, this method will have no
effect. This is an alias for `Ember.MutableEnumerable.removeObject()`.
@@ -31558,11 +31596,11 @@
```
@method remove
@param {Object} obj The object to remove
@return {Ember.Set} The set itself.
*/
- remove: mixin.aliasMethod("removeObject"),
+ remove: mixin.aliasMethod('removeObject'),
/**
Removes the last element from the set and returns it, or `null` if it's empty.
```javascript
var colors = new Ember.Set(["green", "blue"]);
@@ -31572,11 +31610,11 @@
```
@method pop
@return {Object} The removed object from the set or null.
*/
pop: function () {
- if (property_get.get(this, "isFrozen")) {
+ if (property_get.get(this, 'isFrozen')) {
throw new EmberError['default'](freezable.FROZEN_ERROR);
}
var obj = this.length > 0 ? this[this.length - 1] : null;
this.remove(obj);
@@ -31594,11 +31632,11 @@
colors.push("blue"); // ["red", "green", "blue"]
```
@method push
@return {Ember.Set} The set itself.
*/
- push: mixin.aliasMethod("addObject"),
+ push: mixin.aliasMethod('addObject'),
/**
Removes the last element from the set and returns it, or `null` if it's empty.
This is an alias for `Ember.Set.pop()`.
```javascript
@@ -31608,11 +31646,11 @@
colors.shift(); // null
```
@method shift
@return {Object} The removed object from the set or null.
*/
- shift: mixin.aliasMethod("pop"),
+ shift: mixin.aliasMethod('pop'),
/**
Inserts the given object on to the end of the set. It returns
the set itself.
This is an alias of `Ember.Set.push()`
@@ -31623,11 +31661,11 @@
colors.unshift("blue"); // ["red", "green", "blue"]
```
@method unshift
@return {Ember.Set} The set itself.
*/
- unshift: mixin.aliasMethod("push"),
+ unshift: mixin.aliasMethod('push'),
/**
Adds each object in the passed enumerable to the set.
This is an alias of `Ember.MutableEnumerable.addObjects()`
```javascript
@@ -31636,11 +31674,11 @@
```
@method addEach
@param {Ember.Enumerable} objects the objects to add.
@return {Ember.Set} The set itself.
*/
- addEach: mixin.aliasMethod("addObjects"),
+ addEach: mixin.aliasMethod('addObjects'),
/**
Removes each object in the passed enumerable to the set.
This is an alias of `Ember.MutableEnumerable.removeObjects()`
```javascript
@@ -31649,11 +31687,11 @@
```
@method removeEach
@param {Ember.Enumerable} objects the objects to remove.
@return {Ember.Set} The set itself.
*/
- removeEach: mixin.aliasMethod("removeObjects"),
+ removeEach: mixin.aliasMethod('removeObjects'),
// ..........................................................
// PRIVATE ENUMERABLE SUPPORT
//
@@ -31680,69 +31718,69 @@
return this.length > 0 ? this[this.length - 1] : undefined;
}),
// implements Ember.MutableEnumerable
addObject: function (obj) {
- if (property_get.get(this, "isFrozen")) {
+ if (property_get.get(this, 'isFrozen')) {
throw new EmberError['default'](freezable.FROZEN_ERROR);
}
if (isNone['default'](obj)) {
return this; // nothing to do
}
var guid = utils.guidFor(obj);
var idx = this[guid];
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
var added;
if (idx >= 0 && idx < len && this[idx] === obj) {
return this; // added
}
added = [obj];
this.enumerableContentWillChange(null, added);
- property_events.propertyWillChange(this, "lastObject");
+ property_events.propertyWillChange(this, 'lastObject');
- len = property_get.get(this, "length");
+ len = property_get.get(this, 'length');
this[guid] = len;
this[len] = obj;
- property_set.set(this, "length", len + 1);
+ property_set.set(this, 'length', len + 1);
- property_events.propertyDidChange(this, "lastObject");
+ property_events.propertyDidChange(this, 'lastObject');
this.enumerableContentDidChange(null, added);
return this;
},
// implements Ember.MutableEnumerable
removeObject: function (obj) {
- if (property_get.get(this, "isFrozen")) {
+ if (property_get.get(this, 'isFrozen')) {
throw new EmberError['default'](freezable.FROZEN_ERROR);
}
if (isNone['default'](obj)) {
return this; // nothing to do
}
var guid = utils.guidFor(obj);
var idx = this[guid];
- var len = property_get.get(this, "length");
+ var len = property_get.get(this, 'length');
var isFirst = idx === 0;
var isLast = idx === len - 1;
var last, removed;
if (idx >= 0 && idx < len && this[idx] === obj) {
removed = [obj];
this.enumerableContentWillChange(removed, null);
if (isFirst) {
- property_events.propertyWillChange(this, "firstObject");
+ property_events.propertyWillChange(this, 'firstObject');
}
if (isLast) {
- property_events.propertyWillChange(this, "lastObject");
+ property_events.propertyWillChange(this, 'lastObject');
}
// swap items - basically move the item to the end so it can be removed
if (idx < len - 1) {
last = this[len - 1];
@@ -31750,17 +31788,17 @@
this[utils.guidFor(last)] = idx;
}
delete this[guid];
delete this[len - 1];
- property_set.set(this, "length", len - 1);
+ property_set.set(this, 'length', len - 1);
if (isFirst) {
- property_events.propertyDidChange(this, "firstObject");
+ property_events.propertyDidChange(this, 'firstObject');
}
if (isLast) {
- property_events.propertyDidChange(this, "lastObject");
+ property_events.propertyDidChange(this, 'lastObject');
}
this.enumerableContentDidChange(removed, null);
}
return this;
@@ -31772,13 +31810,13 @@
},
copy: function () {
var C = this.constructor;
var ret = new C();
- var loc = property_get.get(this, "length");
+ var loc = property_get.get(this, 'length');
- property_set.set(ret, "length", loc);
+ property_set.set(ret, 'length', loc);
while (--loc >= 0) {
ret[loc] = this[loc];
ret[utils.guidFor(this[loc])] = loc;
}
return ret;
@@ -31790,11 +31828,11 @@
var idx;
for (idx = 0; idx < len; idx++) {
array[idx] = this[idx];
}
- return string.fmt("Ember.Set<%@>", [array.join(",")]);
+ return string.fmt("Ember.Set<%@>", [array.join(',')]);
}
});
});
enifed('ember-runtime/system/string', ['exports', 'ember-metal/core', 'ember-metal/utils', 'ember-metal/cache'], function (exports, Ember, utils, Cache) {
@@ -31816,16 +31854,16 @@
@submodule ember-runtime
*/
var STRING_DASHERIZE_REGEXP = /[ _]/g;
var STRING_DASHERIZE_CACHE = new Cache['default'](1000, function (key) {
- return decamelize(key).replace(STRING_DASHERIZE_REGEXP, "-");
+ return decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-');
});
var CAMELIZE_CACHE = new Cache['default'](1000, function (key) {
return key.replace(STRING_CAMELIZE_REGEXP, function (match, separator, chr) {
- return chr ? chr.toUpperCase() : "";
+ return chr ? chr.toUpperCase() : '';
}).replace(/^([A-Z])/, function (match, separator, chr) {
return match.toLowerCase();
});
});
@@ -31840,19 +31878,19 @@
return out.join(".");
});
var UNDERSCORE_CACHE = new Cache['default'](1000, function (str) {
- return str.replace(STRING_UNDERSCORE_REGEXP_1, "$1_$2").replace(STRING_UNDERSCORE_REGEXP_2, "_").toLowerCase();
+ return str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase();
});
var CAPITALIZE_CACHE = new Cache['default'](1000, function (str) {
return str.charAt(0).toUpperCase() + str.substr(1);
});
var DECAMELIZE_CACHE = new Cache['default'](1000, function (str) {
- return str.replace(STRING_DECAMELIZE_REGEXP, "$1_$2").toLowerCase();
+ return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase();
});
var STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g;
var STRING_CAMELIZE_REGEXP = /(\-|_|\.|\s)+(.)?/g;
var STRING_UNDERSCORE_REGEXP_1 = /([a-z\d])([A-Z]+)/g;
@@ -31872,11 +31910,11 @@
// first, replace any ORDERED replacements.
var idx = 0; // the current index for non-numerical replacements
return str.replace(/%@([0-9]+)?/g, function (s, argIndex) {
argIndex = argIndex ? parseInt(argIndex, 10) - 1 : idx++;
s = cachedFormats[argIndex];
- return s === null ? "(null)" : s === undefined ? "" : utils.inspect(s);
+ return s === null ? '(null)' : s === undefined ? '' : utils.inspect(s);
});
}
function loc(str, formats) {
if (!utils.isArray(formats) || arguments.length > 2) {
@@ -32085,12 +32123,12 @@
});
enifed('ember-runtime/system/subarray', ['exports', 'ember-metal/error', 'ember-metal/enumerable_utils'], function (exports, EmberError, EnumerableUtils) {
'use strict';
- var RETAIN = "r";
- var FILTER = "f";
+ var RETAIN = 'r';
+ var FILTER = 'f';
function Operation(type, count) {
this.type = type;
this.count = count;
}
@@ -32258,13 +32296,13 @@
});
enifed('ember-runtime/system/tracked_array', ['exports', 'ember-metal/property_get', 'ember-metal/enumerable_utils'], function (exports, property_get, enumerable_utils) {
'use strict';
- var RETAIN = "r";
- var INSERT = "i";
- var DELETE = "d";
+ var RETAIN = 'r';
+ var INSERT = 'i';
+ var DELETE = 'd';
exports['default'] = TrackedArray;
/**
An `Ember.TrackedArray` tracks array operations. It's useful when you want to
@@ -32279,11 +32317,11 @@
function TrackedArray(items) {
if (arguments.length < 1) {
items = [];
}
- var length = property_get.get(items, "length");
+ var length = property_get.get(items, 'length');
if (length) {
this._operations = [new ArrayOperation(RETAIN, length, items)];
} else {
this._operations = [];
@@ -32301,11 +32339,11 @@
@method addItems
@param index
@param newItems
*/
addItems: function (index, newItems) {
- var count = property_get.get(newItems, "length");
+ var count = property_get.get(newItems, 'length');
if (count < 1) {
return;
}
var match = this._findArrayOperation(index);
@@ -32586,12 +32624,12 @@
});
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-hash', 'ember-template-compiler/plugins/transform-with-as-to-hash', 'ember-template-compiler/compat'], function (exports, _Ember, precompile, compile, template, plugins, TransformEachInToHash, TransformWithAsToHash) {
'use strict';
- plugins.registerPlugin("ast", TransformWithAsToHash['default']);
- plugins.registerPlugin("ast", TransformEachInToHash['default']);
+ plugins.registerPlugin('ast', TransformWithAsToHash['default']);
+ plugins.registerPlugin('ast', TransformEachInToHash['default']);
exports._Ember = _Ember['default'];
exports.precompile = precompile['default'];
exports.compile = compile['default'];
exports.template = template['default'];
@@ -32652,10 +32690,11 @@
Adds an AST plugin to be used by Ember.HTMLBars.compile.
@private
@method registerASTPlugin
*/
+
function registerPlugin(type, Plugin) {
if (!plugins[type]) {
throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.');
}
@@ -32782,11 +32821,11 @@
walker.visit(ast, function (node) {
if (pluginContext.validate(node)) {
if (node.program && node.program.blockParams.length) {
- throw new Error("You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time.");
+ throw new Error('You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time.');
}
var removedParams = node.sexpr.params.splice(1, 2);
var keyword = removedParams[1].original;
@@ -32796,38 +32835,28 @@
return ast;
};
TransformWithAsToHash.prototype.validate = function TransformWithAsToHash_validate(node) {
- return node.type === "BlockStatement" && node.sexpr.path.original === "with" && node.sexpr.params.length === 3 && node.sexpr.params[1].type === "PathExpression" && node.sexpr.params[1].original === "as";
+ return node.type === 'BlockStatement' && node.sexpr.path.original === 'with' && node.sexpr.params.length === 3 && node.sexpr.params[1].type === 'PathExpression' && node.sexpr.params[1].original === 'as';
};
exports['default'] = TransformWithAsToHash;
});
enifed('ember-template-compiler/system/compile', ['exports', 'ember-template-compiler/system/compile_options', 'ember-template-compiler/system/template'], function (exports, compileOptions, template) {
'use strict';
- var compile; /**
- Uses HTMLBars `compile` function to process a string into a compiled template.
-
- This is not present in production builds.
-
- @private
- @method compile
- @param {String} templateString This is the string to be compiled by HTMLBars.
- @param {Object} options This is an options hash to augment the compiler options.
- */
- exports['default'] = function (templateString, options) {
- if (!compile && Ember.__loader.registry["htmlbars-compiler/compiler"]) {
- compile = requireModule("htmlbars-compiler/compiler").compile;
+ var compile;exports['default'] = function (templateString, options) {
+ if (!compile && Ember.__loader.registry['htmlbars-compiler/compiler']) {
+ compile = requireModule('htmlbars-compiler/compiler').compile;
}
if (!compile) {
- throw new Error("Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.");
+ throw new Error('Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.');
}
var templateSpec = compile(templateString, compileOptions['default'](options));
return template['default'](templateSpec);
@@ -32852,11 +32881,11 @@
// `options` being true, and causing an error during compilation.
if (options === true) {
options = {};
}
- options.revision = "Ember@1.12.1";
+ options.revision = 'Ember@1.12.2';
options.disableComponentGeneration = disableComponentGeneration;
options.plugins = plugins['default'];
return options;
}
@@ -32903,26 +32932,25 @@
/**
@module ember
@submodule ember-template-compiler
*/
+ exports['default'] = function (templateSpec) {
+ templateSpec.isTop = true;
+ templateSpec.isMethod = false;
+
+ return templateSpec;
+ }
/**
Augments the default precompiled output of an HTMLBars template with
additional information needed by Ember.
@private
@method template
@param {Function} templateSpec This is the compiled HTMLBars template spec.
*/
- exports['default'] = function (templateSpec) {
- templateSpec.isTop = true;
- templateSpec.isMethod = false;
-
- return templateSpec;
- }
-
});
enifed('ember-views', ['exports', 'ember-runtime', 'ember-views/system/jquery', 'ember-views/system/utils', 'ember-views/system/render_buffer', 'ember-views/system/renderer', 'dom-helper', 'ember-views/system/ext', 'ember-views/views/states', 'ember-views/views/core_view', 'ember-views/views/view', 'ember-views/views/container_view', 'ember-views/views/collection_view', 'ember-views/views/component', 'ember-views/system/event_dispatcher', 'ember-views/mixins/view_target_action_support', 'ember-views/component_lookup', 'ember-views/views/checkbox', 'ember-views/mixins/text_support', 'ember-views/views/text_field', 'ember-views/views/text_area', 'ember-views/views/simple_bound_view', 'ember-views/views/metamorph_view', 'ember-views/views/select'], function (exports, Ember, jQuery, utils, RenderBuffer, Renderer, DOMHelper, __dep6__, states, core_view, View, ContainerView, CollectionView, Component, EventDispatcher, ViewTargetActionSupport, ComponentLookup, Checkbox, TextSupport, TextField, TextArea, SimpleBoundView, _MetamorphView, select) {
'use strict';
@@ -32987,17 +33015,17 @@
function AttrNode(attrName, attrValue) {
this.init(attrName, attrValue);
}
- var styleWarning = "Binding style attributes may introduce cross-site scripting vulnerabilities; " + "please ensure that values being bound are properly escaped. For more information, " + "including how to disable this warning, see " + "http://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes.";
+ var styleWarning = 'Binding style attributes may introduce cross-site scripting vulnerabilities; ' + 'please ensure that values being bound are properly escaped. For more information, ' + 'including how to disable this warning, see ' + 'http://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes.';
AttrNode.prototype.init = function init(attrName, simpleAttrValue) {
this.isAttrNode = true;
this.isView = true;
- this.tagName = "";
+ this.tagName = '';
this.isVirtual = true;
this.attrName = attrName;
this.attrValue = simpleAttrValue;
this.isDirty = true;
@@ -33025,20 +33053,20 @@
return;
}
var value = utils.read(this.attrValue);
- if (this.attrName === "value" && (value === null || value === undefined)) {
- value = "";
+ if (this.attrName === 'value' && (value === null || value === undefined)) {
+ value = '';
}
if (value === undefined) {
value = null;
}
// If user is typing in a value we don't want to rerender and loose cursor position.
- if (this.hasRenderedInitially && this.attrName === "value" && this._morph.element.value === value) {
+ if (this.hasRenderedInitially && this.attrName === 'value' && this._morph.element.value === value) {
this.lastValue = value;
return;
}
if (this.lastValue !== null || value !== null) {
@@ -33052,11 +33080,11 @@
AttrNode.prototype._deprecateEscapedStyle = function AttrNode_deprecateEscapedStyle(value) {
};
AttrNode.prototype.rerender = function AttrNode_render() {
this.isDirty = true;
- run['default'].schedule("render", this, this.renderIfDirty);
+ run['default'].schedule('render', this, this.renderIfDirty);
};
AttrNode.prototype.destroy = function AttrNode_destroy() {
this.isDestroying = true;
this.isDirty = false;
@@ -33101,12 +33129,12 @@
if (value === undefined) {
value = null;
}
- if ((this.attrName === "value" || this.attrName === "src") && value === null) {
- value = "";
+ if ((this.attrName === 'value' || this.attrName === 'src') && value === null) {
+ value = '';
}
if (this.lastValue !== null || value !== null) {
this._deprecateEscapedStyle(value);
@@ -33163,11 +33191,11 @@
/**
@class AttributeBindingsSupport
@namespace Ember
*/
var AttributeBindingsSupport = mixin.Mixin.create({
- concatenatedProperties: ["attributeBindings"],
+ concatenatedProperties: ['attributeBindings'],
/**
A list of properties of the view to apply as attributes. If the property is
a string value, the value of that string will be applied as the attribute.
```javascript
@@ -33214,26 +33242,26 @@
var binding, colonIndex, property, attrName, attrNode, attrValue;
var i, l;
for (i = 0, l = attributeBindings.length; i < l; i++) {
binding = attributeBindings[i];
- colonIndex = binding.indexOf(":");
+ colonIndex = binding.indexOf(':');
if (colonIndex === -1) {
property = binding;
attrName = binding;
} else {
property = binding.substring(0, colonIndex);
attrName = binding.substring(colonIndex + 1);
}
if (property in this) {
- attrValue = this.getStream("view." + property);
+ attrValue = this.getStream('view.' + property);
attrNode = new AttrNode['default'](attrName, attrValue);
this.appendAttr(attrNode);
- if (!platform.canSetNameOnInputs && attrName === "name") {
- buffer.attr("name", utils.read(attrValue));
+ if (!platform.canSetNameOnInputs && attrName === 'name') {
+ buffer.attr('name', utils.read(attrValue));
}
} else {
unspecifiedAttributeBindings[property] = attrName;
}
}
@@ -33257,11 +33285,11 @@
var attrName = this._unspecifiedAttributeBindings && this._unspecifiedAttributeBindings[key];
properties.defineProperty(this, key);
if (attrName) {
- var attrValue = this.getStream("view." + key);
+ var attrValue = this.getStream('view.' + key);
var attrNode = new AttrNode['default'](attrName, attrValue);
this.appendAttr(attrNode);
}
return property_set.set(this, key, value);
}
@@ -33283,11 +33311,11 @@
/**
@class ClassNamesSupport
@namespace Ember
*/
var ClassNamesSupport = mixin.Mixin.create({
- concatenatedProperties: ["classNames", "classNameBindings"],
+ concatenatedProperties: ['classNames', 'classNameBindings'],
init: function () {
this._super.apply(this, arguments);
this.classNameBindings = native_array.A(this.classNameBindings.slice());
@@ -33301,11 +33329,11 @@
superclasses as well.
@property classNames
@type Array
@default ['ember-view']
*/
- classNames: ["ember-view"],
+ classNames: ['ember-view'],
/**
A list of properties of the view to apply as class names. If the property
is a string value, the value of that string will be applied as a class
name.
@@ -33366,11 +33394,11 @@
var boundBinding;
if (utils.isStream(binding)) {
boundBinding = binding;
} else {
- boundBinding = class_name_binding.streamifyClassNameBinding(this, binding, "_view.");
+ boundBinding = class_name_binding.streamifyClassNameBinding(this, binding, '_view.');
}
// Variable in which the old class value is saved. The observer function
// closes over this variable, so it knows which string to remove when
// the property changes.
@@ -33416,11 +33444,11 @@
}
utils.subscribe(boundBinding, observer, this);
// Remove className so when the view is rerendered,
// the className is added based on binding reevaluation
- this.one("willClearRender", function () {
+ this.one('willClearRender', function () {
if (oldClass) {
classNames.removeObject(oldClass);
oldClass = null;
}
});
@@ -33491,18 +33519,18 @@
@property instrumentDisplay
@type String
*/
instrumentDisplay: computed.computed(function () {
if (this.helperName) {
- return "{{" + this.helperName + "}}";
+ return '{{' + this.helperName + '}}';
}
}),
- instrumentName: "view",
+ instrumentName: 'view',
instrumentDetails: function (hash) {
- hash.template = property_get.get(this, "templateName");
+ hash.template = property_get.get(this, 'templateName');
this._super(hash);
}
});
exports['default'] = InstrumentationSupport;
@@ -33559,17 +33587,17 @@
@return Ember.View
@deprecated
*/
nearestChildOf: function (klass) {
- var view = property_get.get(this, "parentView");
+ var view = property_get.get(this, 'parentView');
while (view) {
- if (property_get.get(view, "parentView") instanceof klass) {
+ if (property_get.get(view, 'parentView') instanceof klass) {
return view;
}
- view = property_get.get(view, "parentView");
+ view = property_get.get(view, 'parentView');
}
},
/**
Return the nearest ancestor that is an instance of the provided
@@ -33578,17 +33606,17 @@
@param {Class} klass Subclass of Ember.View (or Ember.View itself)
@return Ember.View
@deprecated
*/
nearestInstanceOf: function (klass) {
- var view = property_get.get(this, "parentView");
+ var view = property_get.get(this, 'parentView');
while (view) {
if (view instanceof klass) {
return view;
}
- view = property_get.get(view, "parentView");
+ view = property_get.get(view, 'parentView');
}
}
});
exports['default'] = LegacyViewSupport;
@@ -33622,11 +33650,11 @@
exports['default'] = mixin.Mixin.create({
_states: states,
normalizedValue: function () {
var value = this.lazyValue.value();
- var valueNormalizer = property_get.get(this, "valueNormalizerFunc");
+ var valueNormalizer = property_get.get(this, 'valueNormalizerFunc');
return valueNormalizer ? valueNormalizer(value) : value;
},
rerenderIfNeeded: function () {
this.currentState.rerenderIfNeeded(this);
@@ -33643,11 +33671,11 @@
@submodule ember-views
*/
var _renderView;
function renderView(view, buffer, template) {
if (_renderView === undefined) {
- _renderView = eriuqer("ember-htmlbars/system/render-view")["default"];
+ _renderView = eriuqer('ember-htmlbars/system/render-view')['default'];
}
_renderView(view, buffer, template);
}
/**
@@ -33667,11 +33695,11 @@
*/
render: function (buffer) {
// If this view has a layout, it is the responsibility of the
// the layout to render the view's template. Otherwise, render the template
// directly.
- var template = property_get.get(this, "layout") || property_get.get(this, "template");
+ var template = property_get.get(this, 'layout') || property_get.get(this, 'template');
renderView(this, buffer, template);
}
});
exports['default'] = TemplateRenderingSupport;
@@ -33687,11 +33715,11 @@
*/
var TextSupport = mixin.Mixin.create(TargetActionSupport['default'], {
value: "",
- attributeBindings: ["autocapitalize", "autocorrect", "autofocus", "disabled", "form", "maxlength", "placeholder", "readonly", "required", "selectionDirection", "spellcheck", "tabindex", "title"],
+ attributeBindings: ['autocapitalize', 'autocorrect', 'autofocus', 'disabled', 'form', 'maxlength', 'placeholder', 'readonly', 'required', 'selectionDirection', 'spellcheck', 'tabindex', 'title'],
placeholder: null,
disabled: false,
maxlength: null,
init: function () {
@@ -33719,11 +33747,11 @@
* `keyPress`: the user pressed a key
@property onEvent
@type String
@default enter
*/
- onEvent: "enter",
+ onEvent: 'enter',
/**
Whether the `keyUp` event that triggers an `action` to be sent continues
propagating to other views.
By default, when the user presses the return key on their keyboard and
@@ -33746,11 +33774,11 @@
return this[method](event);
}
},
_elementValueDidChange: function () {
- property_set.set(this, "value", this.$().val());
+ property_set.set(this, 'value', this.$().val());
},
change: function (event) {
this._elementValueDidChange(event);
},
@@ -33765,12 +33793,12 @@
reference the example near the top of this file.
@method insertNewline
@param {Event} event
*/
insertNewline: function (event) {
- sendAction("enter", this, event);
- sendAction("insert-newline", this, event);
+ sendAction('enter', this, event);
+ sendAction('insert-newline', this, event);
},
/**
Allows you to specify a controller action to invoke when the escape button
is pressed. To use this method, give your field an `escape-press`
@@ -33780,11 +33808,11 @@
the example near the top of this file.
@method cancel
@param {Event} event
*/
cancel: function (event) {
- sendAction("escape-press", this, event);
+ sendAction('escape-press', this, event);
},
/**
Allows you to specify a controller action to invoke when a field receives
focus. To use this method, give your field a `focus-in` attribute. The value
@@ -33794,11 +33822,11 @@
example near the top of this file.
@method focusIn
@param {Event} event
*/
focusIn: function (event) {
- sendAction("focus-in", this, event);
+ sendAction('focus-in', this, event);
},
/**
Allows you to specify a controller action to invoke when a field loses
focus. To use this method, give your field a `focus-out` attribute. The value
@@ -33809,11 +33837,11 @@
@method focusOut
@param {Event} event
*/
focusOut: function (event) {
this._elementValueDidChange(event);
- sendAction("focus-out", this, event);
+ sendAction('focus-out', this, event);
},
/**
Allows you to specify a controller action to invoke when a key is pressed.
To use this method, give your field a `key-press` attribute. The value of
@@ -33823,11 +33851,11 @@
example near the top of this file.
@method keyPress
@param {Event} event
*/
keyPress: function (event) {
- sendAction("key-press", this, event);
+ sendAction('key-press', this, event);
},
/**
Allows you to specify a controller action to invoke when a key-up event is
fired. To use this method, give your field a `key-up` attribute. The value
@@ -33839,11 +33867,11 @@
@param {Event} event
*/
keyUp: function (event) {
this.interpretKeyEvents(event);
- this.sendAction("key-up", property_get.get(this, "value"), event);
+ this.sendAction('key-up', property_get.get(this, 'value'), event);
},
/**
Allows you to specify a controller action to invoke when a key-down event is
fired. To use this method, give your field a `key-down` attribute. The value
@@ -33853,38 +33881,38 @@
example near the top of this file.
@method keyDown
@param {Event} event
*/
keyDown: function (event) {
- this.sendAction("key-down", property_get.get(this, "value"), event);
+ this.sendAction('key-down', property_get.get(this, 'value'), event);
}
});
TextSupport.KEY_EVENTS = {
- 13: "insertNewline",
- 27: "cancel"
+ 13: 'insertNewline',
+ 27: 'cancel'
};
// In principle, this shouldn't be necessary, but the legacy
// sendAction semantics for TextField are different from
// the component semantics so this method normalizes them.
function sendAction(eventName, view, event) {
var action = property_get.get(view, eventName);
- var on = property_get.get(view, "onEvent");
- var value = property_get.get(view, "value");
+ var on = property_get.get(view, 'onEvent');
+ var value = property_get.get(view, 'value');
// back-compat support for keyPress as an event name even though
// it's also a method name that consumes the event (and therefore
// incompatible with sendAction semantics).
- if (on === eventName || on === "keyPress" && eventName === "key-press") {
- view.sendAction("action", value);
+ if (on === eventName || on === 'keyPress' && eventName === 'key-press') {
+ view.sendAction('action', value);
}
view.sendAction(eventName, value);
if (action || on === eventName) {
- if (!property_get.get(view, "bubbles")) {
+ if (!property_get.get(view, 'bubbles')) {
event.stopPropagation();
}
}
}
@@ -33904,11 +33932,11 @@
var ret = native_array.A();
enumerable_utils.forEach(childViews, function (view) {
var currentChildViews;
if (view.isVirtual) {
- if (currentChildViews = property_get.get(view, "childViews")) {
+ if (currentChildViews = property_get.get(view, 'childViews')) {
ret.pushObjects(currentChildViews);
}
} else {
ret.push(view);
}
@@ -33960,18 +33988,18 @@
if (this.isDestroying) {
return;
}
// update parent node
- property_set.set(view, "_parentView", null);
+ property_set.set(view, '_parentView', null);
// remove view from childViews array.
var childViews = this._childViews;
enumerable_utils.removeObject(childViews, view);
- this.propertyDidChange("childViews"); // HUH?! what happened to will change?
+ this.propertyDidChange('childViews'); // HUH?! what happened to will change?
return this;
},
/**
@@ -34005,14 +34033,14 @@
view = maybeViewClass.create(attrs);
// don't set the property on a virtual view, as they are invisible to
// consumers of the view API
if (view.viewName) {
- property_set.set(property_get.get(this, "concreteView"), view.viewName, view);
+ property_set.set(property_get.get(this, 'concreteView'), view.viewName, view);
}
- } else if ("string" === typeof maybeViewClass) {
- var fullName = "view:" + maybeViewClass;
+ } else if ('string' === typeof maybeViewClass) {
+ var fullName = 'view:' + maybeViewClass;
var ViewKlass = this.container.lookupFactory(fullName);
view = ViewKlass.create(attrs);
} else {
@@ -34049,14 +34077,14 @@
@property context
@type Object
*/
context: computed.computed({
get: function () {
- return property_get.get(this, "_context");
+ return property_get.get(this, '_context');
},
set: function (key, value) {
- property_set.set(this, "_context", value);
+ property_set.set(this, '_context', value);
return value;
}
})["volatile"](),
/**
@@ -34075,17 +34103,17 @@
*/
_context: computed.computed({
get: function () {
var parentView, controller;
- if (controller = property_get.get(this, "controller")) {
+ if (controller = property_get.get(this, 'controller')) {
return controller;
}
parentView = this._parentView;
if (parentView) {
- return property_get.get(parentView, "_context");
+ return property_get.get(parentView, '_context');
}
return null;
},
set: function (key, value) {
return value;
@@ -34104,11 +34132,11 @@
get: function () {
if (this._controller) {
return this._controller;
}
- return this._parentView ? property_get.get(this._parentView, "controller") : null;
+ return this._parentView ? property_get.get(this._parentView, 'controller') : null;
},
set: function (_, value) {
this._controller = value;
return value;
}
@@ -34129,11 +34157,11 @@
if (!this._keywords) {
this._keywords = create['default'](null);
}
this._keywords._view = this;
this._keywords.view = undefined;
- this._keywords.controller = new KeyStream['default'](this, "controller");
+ this._keywords.controller = new KeyStream['default'](this, 'controller');
this._setupKeywords();
},
_setupKeywords: function () {
var keywords = this._keywords;
@@ -34252,11 +34280,11 @@
this._streamBindings = undefined;
},
_getContextStream: function () {
if (this._contextStream === undefined) {
- this._baseContext = new KeyStream['default'](this, "context");
+ this._baseContext = new KeyStream['default'](this, 'context');
this._contextStream = new ContextStream['default'](this);
}
return this._contextStream;
},
@@ -34268,11 +34296,11 @@
this._contextStream = undefined;
},
_unsubscribeFromStreamBindings: function () {
for (var key in this._streamBindingSubscriptions) {
- var streamBinding = this[key + "Binding"];
+ var streamBinding = this[key + 'Binding'];
var callback = this._streamBindingSubscriptions[key];
streamBinding.unsubscribe(callback);
}
}
});
@@ -34286,15 +34314,15 @@
exports['default'] = mixin.Mixin.create(TargetActionSupport['default'], {
/**
@property target
*/
- target: alias['default']("controller"),
+ target: alias['default']('controller'),
/**
@property actionContext
*/
- actionContext: alias['default']("context")
+ actionContext: alias['default']('context')
});
});
enifed('ember-views/mixins/visibility_support', ['exports', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/run_loop'], function (exports, mixin, property_get, run) {
@@ -34328,20 +34356,20 @@
When the view's `isVisible` property changes, toggle the visibility
element of the actual DOM element.
@method _isVisibleDidChange
@private
*/
- _isVisibleDidChange: mixin.observer("isVisible", function () {
- if (this._isVisible === property_get.get(this, "isVisible")) {
+ _isVisibleDidChange: mixin.observer('isVisible', function () {
+ if (this._isVisible === property_get.get(this, 'isVisible')) {
return;
}
- run['default'].scheduleOnce("render", this, this._toggleVisibility);
+ run['default'].scheduleOnce('render', this, this._toggleVisibility);
}),
_toggleVisibility: function () {
var $el = this.$();
- var isVisible = property_get.get(this, "isVisible");
+ var isVisible = property_get.get(this, 'isVisible');
if (this._isVisible === isVisible) {
return;
}
@@ -34365,41 +34393,41 @@
this._notifyBecameHidden();
}
},
_notifyBecameVisible: function () {
- this.trigger("becameVisible");
+ this.trigger('becameVisible');
this.forEachChildView(function (view) {
- var isVisible = property_get.get(view, "isVisible");
+ var isVisible = property_get.get(view, 'isVisible');
if (isVisible || isVisible === null) {
view._notifyBecameVisible();
}
});
},
_notifyBecameHidden: function () {
- this.trigger("becameHidden");
+ this.trigger('becameHidden');
this.forEachChildView(function (view) {
- var isVisible = property_get.get(view, "isVisible");
+ var isVisible = property_get.get(view, 'isVisible');
if (isVisible || isVisible === null) {
view._notifyBecameHidden();
}
});
},
_isAncestorHidden: function () {
- var parent = property_get.get(this, "parentView");
+ var parent = property_get.get(this, 'parentView');
while (parent) {
- if (property_get.get(parent, "isVisible") === false) {
+ if (property_get.get(parent, 'isVisible') === false) {
return true;
}
- parent = property_get.get(parent, "parentView");
+ parent = property_get.get(parent, 'parentView');
}
return false;
}
});
@@ -34414,11 +34442,11 @@
exports.parsePropertyPath = parsePropertyPath;
exports.classStringForValue = classStringForValue;
exports.streamifyClassNameBinding = streamifyClassNameBinding;
function parsePropertyPath(path) {
- var split = path.split(":");
+ var split = path.split(':');
var propertyPath = split[0];
var classNames = "";
var className, falsyClassName;
// check if the property is defined as prop:class or prop:trueClass:falseClass
@@ -34426,20 +34454,20 @@
className = split[1];
if (split.length === 3) {
falsyClassName = split[2];
}
- classNames = ":" + className;
+ classNames = ':' + className;
if (falsyClassName) {
classNames += ":" + falsyClassName;
}
}
return {
path: propertyPath,
classNames: classNames,
- className: className === "" ? undefined : className,
+ className: className === '' ? undefined : className,
falsyClassName: falsyClassName
};
}
/**
@@ -34464,13 +34492,14 @@
@param className
@param falsyClassName
@static
@private
*/
+
function classStringForValue(path, val, className, falsyClassName) {
if (ember_metal__utils.isArray(val)) {
- val = property_get.get(val, "length") !== 0;
+ val = property_get.get(val, 'length') !== 0;
}
// When using the colon syntax, evaluate the truthiness or falsiness
// of the value to determine which className to return
if (className || falsyClassName) {
@@ -34483,32 +34512,32 @@
}
// If value is a Boolean and true, return the dasherized property
// name.
} else if (val === true) {
- // Normalize property path to be suitable for use
- // as a class name. For exaple, content.foo.barBaz
- // becomes bar-baz.
- var parts = path.split(".");
- return string.dasherize(parts[parts.length - 1]);
+ // Normalize property path to be suitable for use
+ // as a class name. For exaple, content.foo.barBaz
+ // becomes bar-baz.
+ var parts = path.split('.');
+ return string.dasherize(parts[parts.length - 1]);
- // If the value is not false, undefined, or null, return the current
- // value of the property.
- } else if (val !== false && val != null) {
- return val;
+ // If the value is not false, undefined, or null, return the current
+ // value of the property.
+ } else if (val !== false && val != null) {
+ return val;
- // Nothing to display. Return null so that the old class is removed
- // but no new class is added.
- } else {
- return null;
- }
+ // Nothing to display. Return null so that the old class is removed
+ // but no new class is added.
+ } else {
+ return null;
+ }
}
function streamifyClassNameBinding(view, classNameBinding, prefix) {
- prefix = prefix || "";
+ prefix = prefix || '';
var parsedPath = parsePropertyPath(classNameBinding);
- if (parsedPath.path === "") {
+ if (parsedPath.path === '') {
return classStringForValue(parsedPath.path, true, parsedPath.className, parsedPath.falsyClassName);
} else {
var pathValue = view.getStream(prefix + parsedPath.path);
return utils.chain(pathValue, function () {
return classStringForValue(parsedPath.path, utils.read(pathValue), parsedPath.className, parsedPath.falsyClassName);
@@ -34667,27 +34696,27 @@
function shouldDisplay(predicate) {
if (utils.isStream(predicate)) {
return new ShouldDisplayStream(predicate);
}
- var truthy = predicate && property_get.get(predicate, "isTruthy");
- if (typeof truthy === "boolean") {
+ var truthy = predicate && property_get.get(predicate, 'isTruthy');
+ if (typeof truthy === 'boolean') {
return truthy;
}
if (ember_metal__utils.isArray(predicate)) {
- return property_get.get(predicate, "length") !== 0;
+ return property_get.get(predicate, 'length') !== 0;
} else {
return !!predicate;
}
}
function ShouldDisplayStream(predicateStream) {
this.init();
this.oldPredicate = undefined;
this.predicateStream = predicateStream;
- this.isTruthyStream = predicateStream.get("isTruthy");
+ this.isTruthyStream = predicateStream.get('isTruthy');
this.lengthStream = undefined;
utils.subscribe(this.predicateStream, this.notify, this);
utils.subscribe(this.isTruthyStream, this.notify, this);
}
@@ -34704,18 +34733,18 @@
utils.unsubscribe(this.lengthStream, this.notify, this);
this.lengthStream = undefined;
}
if (!this.lengthStream && newIsArray) {
- this.lengthStream = this.predicateStream.get("length");
+ this.lengthStream = this.predicateStream.get('length');
utils.subscribe(this.lengthStream, this.notify, this);
}
this.oldPredicate = newPredicate;
}
var truthy = utils.read(this.isTruthyStream);
- if (typeof truthy === "boolean") {
+ if (typeof truthy === 'boolean') {
return truthy;
}
if (this.lengthStream) {
var length = utils.read(this.lengthStream);
@@ -34736,15 +34765,15 @@
function readViewFactory(object, container) {
var value = utils.read(object);
var viewClass;
- if (typeof value === "string") {
+ if (typeof value === 'string') {
if (path_cache.isGlobal(value)) {
viewClass = property_get.get(null, value);
} else {
- viewClass = container.lookupFactory("view:" + value);
+ viewClass = container.lookupFactory('view:' + value);
}
} else {
viewClass = value;
}
@@ -34752,11 +34781,11 @@
return viewClass;
}
function readComponentFactory(nameOrStream, container) {
var name = utils.read(nameOrStream);
- var componentLookup = container.lookup("component-lookup:main");
+ var componentLookup = container.lookup('component-lookup:main');
return componentLookup.lookupFactory(name, container);
}
function readUnwrappedModel(object) {
@@ -34764,11 +34793,11 @@
var result = object.value();
// If the path is exactly `controller` then we don't unwrap it.
if (!object._isController) {
while (ControllerMixin['default'].detect(result)) {
- result = property_get.get(result, "model");
+ result = property_get.get(result, 'model');
}
}
return result;
} else {
@@ -34818,37 +34847,37 @@
This set will be modified by `setup` to also include any events added at that time.
@property events
@type Object
*/
events: {
- touchstart: "touchStart",
- touchmove: "touchMove",
- touchend: "touchEnd",
- touchcancel: "touchCancel",
- keydown: "keyDown",
- keyup: "keyUp",
- keypress: "keyPress",
- mousedown: "mouseDown",
- mouseup: "mouseUp",
- contextmenu: "contextMenu",
- click: "click",
- dblclick: "doubleClick",
- mousemove: "mouseMove",
- focusin: "focusIn",
- focusout: "focusOut",
- mouseenter: "mouseEnter",
- mouseleave: "mouseLeave",
- submit: "submit",
- input: "input",
- change: "change",
- dragstart: "dragStart",
- drag: "drag",
- dragenter: "dragEnter",
- dragleave: "dragLeave",
- dragover: "dragOver",
- drop: "drop",
- dragend: "dragEnd"
+ touchstart: 'touchStart',
+ touchmove: 'touchMove',
+ touchend: 'touchEnd',
+ touchcancel: 'touchCancel',
+ keydown: 'keyDown',
+ keyup: 'keyUp',
+ keypress: 'keyPress',
+ mousedown: 'mouseDown',
+ mouseup: 'mouseUp',
+ contextmenu: 'contextMenu',
+ click: 'click',
+ dblclick: 'doubleClick',
+ mousemove: 'mouseMove',
+ focusin: 'focusIn',
+ focusout: 'focusOut',
+ mouseenter: 'mouseEnter',
+ mouseleave: 'mouseLeave',
+ submit: 'submit',
+ input: 'input',
+ change: 'change',
+ dragstart: 'dragStart',
+ drag: 'drag',
+ dragenter: 'dragEnter',
+ dragleave: 'dragLeave',
+ dragover: 'dragOver',
+ drop: 'drop',
+ dragend: 'dragEnd'
},
/**
The root DOM element to which event listeners should be attached. Event
listeners will be attached to the document unless this is overridden.
@@ -34858,11 +34887,11 @@
@private
@property rootElement
@type DOMElement
@default 'body'
*/
- rootElement: "body",
+ rootElement: 'body',
/**
It enables events to be dispatched to the view's `eventManager.` When present,
this object takes precedence over handling of events on the view itself.
Note that most Ember applications do not use this feature. If your app also
@@ -34898,22 +34927,22 @@
@method setup
@param addedEvents {Hash}
*/
setup: function (addedEvents, rootElement) {
var event;
- var events = property_get.get(this, "events");
+ var events = property_get.get(this, 'events');
merge['default'](events, addedEvents || {});
if (!isNone['default'](rootElement)) {
- property_set.set(this, "rootElement", rootElement);
+ property_set.set(this, 'rootElement', rootElement);
}
- rootElement = jQuery['default'](property_get.get(this, "rootElement"));
+ rootElement = jQuery['default'](property_get.get(this, 'rootElement'));
- rootElement.addClass("ember-application");
+ rootElement.addClass('ember-application');
for (event in events) {
if (events.hasOwnProperty(event)) {
this.setupHandler(rootElement, event, events[event]);
@@ -34934,11 +34963,11 @@
@param {String} eventName the name of the method to call on the view
*/
setupHandler: function (rootElement, event, eventName) {
var self = this;
- rootElement.on(event + ".ember", ".ember-view", function (evt, triggeringManager) {
+ rootElement.on(event + '.ember', '.ember-view', function (evt, triggeringManager) {
var view = View['default'].views[this.id];
var result = true;
var manager = self.canDispatchToEventManager ? self._findNearestEventManager(view, eventName) : null;
@@ -34949,12 +34978,12 @@
}
return result;
});
- rootElement.on(event + ".ember", "[data-ember-action]", function (evt) {
- var actionId = jQuery['default'](evt.currentTarget).attr("data-ember-action");
+ rootElement.on(event + '.ember', '[data-ember-action]', function (evt) {
+ var actionId = jQuery['default'](evt.currentTarget).attr('data-ember-action');
var action = ActionManager['default'].registeredActions[actionId];
// We have to check for action here since in some cases, jQuery will trigger
// an event on `removeChild` (i.e. focusout) after we've already torn down the
// action handlers for the view.
@@ -34966,26 +34995,26 @@
_findNearestEventManager: function (view, eventName) {
var manager = null;
while (view) {
- manager = property_get.get(view, "eventManager");
+ manager = property_get.get(view, 'eventManager');
if (manager && manager[eventName]) {
break;
}
- view = property_get.get(view, "parentView");
+ view = property_get.get(view, 'parentView');
}
return manager;
},
_dispatchEvent: function (object, evt, eventName, view) {
var result = true;
var handler = object[eventName];
- if (utils.typeOf(handler) === "function") {
+ if (utils.typeOf(handler) === 'function') {
result = run['default'](object, handler, evt, view);
// Do not preventDefault in eventManagers.
evt.stopPropagation();
} else {
result = this._bubbleEvent(view, evt, eventName);
@@ -34997,17 +35026,17 @@
_bubbleEvent: function (view, evt, eventName) {
return run['default'].join(view, view.handleEvent, eventName, evt);
},
destroy: function () {
- var rootElement = property_get.get(this, "rootElement");
- jQuery['default'](rootElement).off(".ember", "**").removeClass("ember-application");
+ var rootElement = property_get.get(this, 'rootElement');
+ jQuery['default'](rootElement).off('.ember', '**').removeClass('ember-application');
return this._super.apply(this, arguments);
},
toString: function () {
- return "(EventDispatcher)";
+ return '(EventDispatcher)';
}
});
});
enifed('ember-views/system/ext', ['ember-metal/run_loop'], function (run) {
@@ -35069,11 +35098,11 @@
var nameParts = templateName.split("/");
var lastPart = nameParts[nameParts.length - 1];
nameParts[nameParts.length - 1] = "_" + lastPart;
- var underscoredName = nameParts.join("/");
+ var underscoredName = nameParts.join('/');
var template = view.templateForName(underscoredName);
if (!template) {
template = view.templateForName(templateName);
}
@@ -35111,16 +35140,16 @@
var omittedStartTagChildren;
var omittedStartTagChildTest = /(?:<script)*.*?<([\w:]+)/i;
function detectOmittedStartTag(dom, string, contextualElement) {
omittedStartTagChildren = omittedStartTagChildren || {
- tr: dom.createElement("tbody"),
- col: dom.createElement("colgroup")
+ tr: dom.createElement('tbody'),
+ col: dom.createElement('colgroup')
};
// Omitted start tags are only inside table tags.
- if (contextualElement.tagName === "TABLE") {
+ if (contextualElement.tagName === 'TABLE') {
var omittedStartTagChildMatch = omittedStartTagChildTest.exec(string);
if (omittedStartTagChildMatch) {
// It is already asserted that the contextual element is a table
// and not the proper start tag. Just look up the start tag.
return omittedStartTagChildren[omittedStartTagChildMatch[1].toLowerCase()];
@@ -35154,11 +35183,11 @@
if (!BAD_TAG_NAME_TEST_REGEXP.test(tagName)) {
return tagName;
}
- return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, "");
+ return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, '');
}
var BAD_CHARS_REGEXP = /&(?!\w+;)|[<>"'`]/g;
var POSSIBLE_CHARS_REGEXP = /[&<>"'`]/;
@@ -35166,11 +35195,11 @@
// Stolen shamelessly from Handlebars
var escape = {
"<": "<",
">": ">",
- "\"": """,
+ '"': """,
"'": "'",
"`": "`"
};
var escapeChar = function (chr) {
@@ -35315,11 +35344,11 @@
elementStyle: null,
pushChildView: function (view) {
var index = this.childViews.length;
this.childViews[index] = view;
- this.push("<script id='morph-" + index + "' type='text/x-placeholder'></script>");
+ this.push("<script id='morph-" + index + "' type='text/x-placeholder'>\x3C/script>");
},
pushAttrNode: function (node) {
var index = this.attrNodes.length;
this.attrNodes[index] = node;
@@ -35328,11 +35357,11 @@
hydrateMorphs: function (contextualElement) {
var childViews = this.childViews;
var el = this._element;
for (var i = 0, l = childViews.length; i < l; i++) {
var childView = childViews[i];
- var ref = el.querySelector("#morph-" + i);
+ var ref = el.querySelector('#morph-' + i);
var parent = ref.parentNode;
childView._morph = this.dom.insertMorphBefore(parent, ref, parent.nodeType === 1 ? parent : contextualElement);
@@ -35345,13 +35374,13 @@
@method push
@param {String} string HTML to push into the buffer
@chainable
*/
push: function (content) {
- if (typeof content === "string") {
+ if (typeof content === 'string') {
if (this.buffer === null) {
- this.buffer = "";
+ this.buffer = '';
}
this.buffer += content;
} else {
this.buffer = content;
}
@@ -35485,38 +35514,38 @@
var id = this.elementId;
var classes = this.classes;
var attrs = this.elementAttributes;
var props = this.elementProperties;
var style = this.elementStyle;
- var styleBuffer = "";
+ var styleBuffer = '';
var attr, prop, tagString;
if (!platform.canSetNameOnInputs && attrs && attrs.name) {
// IE allows passing a tag to createElement. See note on `canSetNameOnInputs` above as well.
- tagString = "<" + stripTagName(tagName) + " name=\"" + escapeAttribute(attrs.name) + "\">";
+ tagString = '<' + stripTagName(tagName) + ' name="' + escapeAttribute(attrs.name) + '">';
} else {
tagString = tagName;
}
var element = this.dom.createElement(tagString, this.outerContextualElement());
if (id) {
- this.dom.setAttribute(element, "id", id);
+ this.dom.setAttribute(element, 'id', id);
this.elementId = null;
}
if (classes) {
- this.dom.setAttribute(element, "class", classes.join(" "));
+ this.dom.setAttribute(element, 'class', classes.join(' '));
this.classes = null;
this.elementClasses = null;
}
if (style) {
for (prop in style) {
- styleBuffer += prop + ":" + style[prop] + ";";
+ styleBuffer += prop + ':' + style[prop] + ';';
}
- this.dom.setAttribute(element, "style", styleBuffer);
+ this.dom.setAttribute(element, 'style', styleBuffer);
this.elementStyle = null;
}
if (attrs) {
@@ -35593,12 +35622,12 @@
string: function () {
if (this._element) {
// Firefox versions < 11 do not have support for element.outerHTML.
var thisElement = this.element();
var outerHTML = thisElement.outerHTML;
- if (typeof outerHTML === "undefined") {
- return jQuery['default']("<div/>").append(thisElement).html();
+ if (typeof outerHTML === 'undefined') {
+ return jQuery['default']('<div/>').append(thisElement).html();
}
return outerHTML;
} else {
return this.innerString();
}
@@ -35670,11 +35699,11 @@
var tagName = view.tagName;
if (tagName !== null && typeof tagName === 'object' && tagName.isDescriptor) {
tagName = property_get.get(view, 'tagName');
}
var classNameBindings = view.classNameBindings;
- var taglessViewWithClassBindings = tagName === '' && (classNameBindings && classNameBindings.length > 0);
+ var taglessViewWithClassBindings = tagName === '' && classNameBindings && classNameBindings.length > 0;
if (tagName === null || tagName === undefined) {
tagName = 'div';
}
@@ -35821,10 +35850,11 @@
@private
@method getViewClientRects
@param {Ember.View} view
*/
+
function getViewClientRects(view) {
var range = getViewRange(view);
return range.getClientRects();
}
@@ -35837,10 +35867,11 @@
@private
@method getViewBoundingClientRect
@param {Ember.View} view
*/
+
function getViewBoundingClientRect(view) {
var range = getViewRange(view);
return range.getBoundingClientRect();
}
@@ -35875,18 +35906,18 @@
return this.createChildView(View['default']);
}
var componentClass = streams__utils.readComponentFactory(componentName, this.container);
if (!componentClass) {
- throw new EmberError['default']("HTMLBars error: Could not find component named \"" + utils.read(this._boundComponentOptions.componentNameStream) + "\".");
+ throw new EmberError['default']('HTMLBars error: Could not find component named "' + utils.read(this._boundComponentOptions.componentNameStream) + '".');
}
var hash = this._boundComponentOptions;
var hashForComponent = {};
var prop;
for (prop in hash) {
- if (prop === "_boundComponentOptions" || prop === "componentNameStream") {
+ if (prop === '_boundComponentOptions' || prop === 'componentNameStream') {
continue;
}
hashForComponent[prop] = hash[prop];
}
@@ -35906,11 +35937,11 @@
this._super.apply(this, arguments);
var self = this;
this.conditionStream.subscribe(this._wrapAsScheduled(function () {
- run['default'].scheduleOnce("render", self, "rerenderIfNeeded");
+ run['default'].scheduleOnce('render', self, 'rerenderIfNeeded');
}));
},
normalizedValue: function () {
return this.conditionStream.value();
@@ -35940,11 +35971,11 @@
this._super.apply(this, arguments);
var self = this;
this.templateNameStream.subscribe(this._wrapAsScheduled(function () {
- run['default'].scheduleOnce("render", self, "rerenderIfNeeded");
+ run['default'].scheduleOnce('render', self, 'rerenderIfNeeded');
}));
},
normalizedValue: function () {
return this.templateNameStream.value();
@@ -35967,35 +35998,35 @@
enifed('ember-views/views/checkbox', ['exports', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-views/views/view'], function (exports, property_get, property_set, View) {
'use strict';
exports['default'] = View['default'].extend({
- instrumentDisplay: "{{input type=\"checkbox\"}}",
+ instrumentDisplay: '{{input type="checkbox"}}',
- classNames: ["ember-checkbox"],
+ classNames: ['ember-checkbox'],
- tagName: "input",
+ tagName: 'input',
- attributeBindings: ["type", "checked", "indeterminate", "disabled", "tabindex", "name", "autofocus", "required", "form"],
+ attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form'],
- type: "checkbox",
+ type: 'checkbox',
checked: false,
disabled: false,
indeterminate: false,
init: function () {
this._super.apply(this, arguments);
- this.on("change", this, this._updateElementValue);
+ this.on('change', this, this._updateElementValue);
},
didInsertElement: function () {
this._super.apply(this, arguments);
- property_get.get(this, "element").indeterminate = !!property_get.get(this, "indeterminate");
+ property_get.get(this, 'element').indeterminate = !!property_get.get(this, 'indeterminate');
},
_updateElementValue: function () {
- property_set.set(this, "checked", this.$().prop("checked"));
+ property_set.set(this, 'checked', this.$().prop('checked'));
}
});
});
enifed('ember-views/views/collection_view', ['exports', 'ember-metal/core', 'ember-metal/binding', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/string', 'ember-views/views/container_view', 'ember-views/views/core_view', 'ember-views/views/view', 'ember-metal/mixin', 'ember-views/streams/utils', 'ember-runtime/mixins/array'], function (exports, Ember, binding, property_get, property_set, string, ContainerView, CoreView, View, mixin, utils, EmberArray) {
@@ -36056,17 +36087,17 @@
Invoked when the content property is about to change. Notifies observers that the
entire array content will change.
@private
@method _contentWillChange
*/
- _contentWillChange: mixin.beforeObserver("content", function () {
- var content = this.get("content");
+ _contentWillChange: mixin.beforeObserver('content', function () {
+ var content = this.get('content');
if (content) {
content.removeArrayObserver(this);
}
- var len = content ? property_get.get(content, "length") : 0;
+ var len = content ? property_get.get(content, 'length') : 0;
this.arrayWillChange(content, 0, len);
}),
/**
Check to make sure that the content has changed, and if so,
@@ -36074,19 +36105,19 @@
asynchronously, to allow the element to be created before
bindings have synchronized and vice versa.
@private
@method _contentDidChange
*/
- _contentDidChange: mixin.observer("content", function () {
- var content = property_get.get(this, "content");
+ _contentDidChange: mixin.observer('content', function () {
+ var content = property_get.get(this, 'content');
if (content) {
this._assertArrayLike(content);
content.addArrayObserver(this);
}
- var len = content ? property_get.get(content, "length") : 0;
+ var len = content ? property_get.get(content, 'length') : 0;
this.arrayDidChange(content, 0, null, len);
}),
/**
Ensure that the content implements Ember.Array
@@ -36103,11 +36134,11 @@
destroy: function () {
if (!this._super.apply(this, arguments)) {
return;
}
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
content.removeArrayObserver(this);
}
if (this._createdEmptyView) {
@@ -36128,11 +36159,11 @@
@param {Number} removed number of object to be removed from content
*/
arrayWillChange: function (content, start, removedCount) {
// If the contents were empty before and this template collection has an
// empty view remove it now.
- var emptyView = property_get.get(this, "emptyView");
+ var emptyView = property_get.get(this, 'emptyView');
if (emptyView && emptyView instanceof View['default']) {
emptyView.removeFromParent();
}
// Loop through child views that correspond with the removed items.
@@ -36160,31 +36191,31 @@
*/
arrayDidChange: function (content, start, removed, added) {
var addedViews = [];
var view, item, idx, len, itemViewClass, emptyView, itemViewProps;
- len = content ? property_get.get(content, "length") : 0;
+ len = content ? property_get.get(content, 'length') : 0;
if (len) {
itemViewProps = this._itemViewProps || {};
- itemViewClass = property_get.get(this, "itemViewClass");
+ itemViewClass = property_get.get(this, 'itemViewClass');
itemViewClass = utils.readViewFactory(itemViewClass, this.container);
for (idx = start; idx < start + added; idx++) {
item = content.objectAt(idx);
- itemViewProps._context = this.keyword ? this.get("context") : item;
+ itemViewProps._context = this.keyword ? this.get('context') : item;
itemViewProps.content = item;
itemViewProps.contentIndex = idx;
view = this.createChildView(itemViewClass, itemViewProps);
if (this.blockParams > 0) {
view._blockArguments = [item];
}
if (this.blockParams > 1) {
- view._blockArguments.push(view.getStream("_view.contentIndex"));
+ view._blockArguments.push(view.getStream('_view.contentIndex'));
}
addedViews.push(view);
}
@@ -36192,28 +36223,28 @@
if (this.blockParams > 1) {
var childViews = this._childViews;
for (idx = start + added; idx < len; idx++) {
view = childViews[idx];
- property_set.set(view, "contentIndex", idx);
+ property_set.set(view, 'contentIndex', idx);
}
}
} else {
- emptyView = property_get.get(this, "emptyView");
+ emptyView = property_get.get(this, 'emptyView');
if (!emptyView) {
return;
}
- if ("string" === typeof emptyView && binding.isGlobalPath(emptyView)) {
+ if ('string' === typeof emptyView && binding.isGlobalPath(emptyView)) {
emptyView = property_get.get(emptyView) || emptyView;
}
emptyView = this.createChildView(emptyView);
addedViews.push(emptyView);
- property_set.set(this, "emptyView", emptyView);
+ property_set.set(this, 'emptyView', emptyView);
if (CoreView['default'].detect(emptyView)) {
this._createdEmptyView = emptyView;
}
@@ -36235,15 +36266,15 @@
@return {Ember.View} new instance
*/
createChildView: function (_view, attrs) {
var view = this._super(_view, attrs);
- var itemTagName = property_get.get(view, "tagName");
+ var itemTagName = property_get.get(view, 'tagName');
if (itemTagName === null || itemTagName === undefined) {
- itemTagName = CollectionView.CONTAINER_MAP[property_get.get(this, "tagName")];
- property_set.set(view, "tagName", itemTagName);
+ itemTagName = CollectionView.CONTAINER_MAP[property_get.get(this, 'tagName')];
+ property_set.set(view, 'tagName', itemTagName);
}
return view;
}
});
@@ -36257,18 +36288,18 @@
@type Hash
@static
@final
*/
CollectionView.CONTAINER_MAP = {
- ul: "li",
- ol: "li",
- table: "tr",
- thead: "tr",
- tbody: "tr",
- tfoot: "tr",
- tr: "td",
- select: "option"
+ ul: 'li',
+ ol: 'li',
+ table: 'tr',
+ thead: 'tr',
+ tbody: 'tr',
+ tfoot: 'tr',
+ tr: 'td',
+ select: 'option'
};
exports['default'] = CollectionView;
});
@@ -36282,22 +36313,22 @@
think that it should set the components `context` to that of the parent view.
*/
controller: null,
context: null,
- instrumentName: "component",
+ instrumentName: 'component',
instrumentDisplay: computed.computed(function () {
if (this._debugContainerKey) {
- return "{{" + this._debugContainerKey.split(":")[1] + "}}";
+ return '{{' + this._debugContainerKey.split(':')[1] + '}}';
}
}),
init: function () {
this._super.apply(this, arguments);
this._keywords.view = this;
- property_set.set(this, "context", this);
- property_set.set(this, "controller", this);
+ property_set.set(this, 'context', this);
+ property_set.set(this, 'controller', this);
},
defaultLayout: defaultComponentLayout['default'],
/**
@@ -36313,16 +36344,16 @@
Specifying a template directly to a component is deprecated without
also specifying the layout property.
@deprecated
@property template
*/
- template: computed.computed("templateName", {
+ template: computed.computed('templateName', {
get: function () {
- var templateName = property_get.get(this, "templateName");
- var template = this.templateForName(templateName, "template");
+ var templateName = property_get.get(this, 'templateName');
+ var template = this.templateForName(templateName, 'template');
- return template || property_get.get(this, "defaultTemplate");
+ return template || property_get.get(this, 'defaultTemplate');
},
set: function (key, value) {
return value;
}
}),
@@ -36338,23 +36369,23 @@
_setupKeywords: function () {},
_yield: function (context, options, morph, blockArguments) {
var view = options.data.view;
var parentView = this._parentView;
- var template = property_get.get(this, "template");
+ var template = property_get.get(this, 'template');
if (template) {
view.appendChild(View['default'], {
isVirtual: true,
- tagName: "",
+ tagName: '',
template: template,
_blockArguments: blockArguments,
_contextView: parentView,
_morph: morph,
- context: property_get.get(parentView, "context"),
- controller: property_get.get(parentView, "controller")
+ context: property_get.get(parentView, 'context'),
+ controller: property_get.get(parentView, 'controller')
});
}
},
/**
@@ -36362,13 +36393,13 @@
property will point to the controller of the parent view.
@property targetObject
@type Ember.Controller
@default null
*/
- targetObject: computed.computed("_parentView", function (key) {
+ targetObject: computed.computed('_parentView', function (key) {
var parentView = this._parentView;
- return parentView ? property_get.get(parentView, "controller") : null;
+ return parentView ? property_get.get(parentView, 'controller') : null;
}),
/**
Triggers a named action on the controller context where the component is used if
this controller has registered for notifications of the action.
@@ -36443,11 +36474,11 @@
var actionName;
// Send the default action
if (action === undefined) {
- actionName = property_get.get(this, "action");
+ actionName = property_get.get(this, 'action');
} else {
actionName = property_get.get(this, action);
}
// If no action name for that action could be found, just abort.
@@ -36474,15 +36505,17 @@
if (!shouldBubble) {
return;
}
}
- if (target = property_get.get(this, "target")) {
- target.send.apply(target, arguments);
+ if (target = property_get.get(this, 'target')) {
+ var _target;
+
+ (_target = target).send.apply(_target, arguments);
} else {
if (!hasAction) {
- throw new Error(Ember['default'].inspect(this) + " had no action handler for: " + actionName);
+ throw new Error(Ember['default'].inspect(this) + ' had no action handler for: ' + actionName);
}
}
}
});
@@ -36662,42 +36695,42 @@
},
init: function () {
this._super.apply(this, arguments);
- var childViews = property_get.get(this, "childViews");
+ var childViews = property_get.get(this, 'childViews');
// redefine view's childViews property that was obliterated
- properties.defineProperty(this, "childViews", View['default'].childViewsProperty);
+ properties.defineProperty(this, 'childViews', View['default'].childViewsProperty);
var _childViews = this._childViews;
enumerable_utils.forEach(childViews, function (viewName, idx) {
var view;
- if ("string" === typeof viewName) {
+ if ('string' === typeof viewName) {
view = property_get.get(this, viewName);
view = this.createChildView(view);
property_set.set(this, viewName, view);
} else {
view = this.createChildView(viewName);
}
_childViews[idx] = view;
}, this);
- var currentView = property_get.get(this, "currentView");
+ var currentView = property_get.get(this, 'currentView');
if (currentView) {
if (!_childViews.length) {
_childViews = this._childViews = this._childViews.slice();
}
_childViews.push(this.createChildView(currentView));
}
},
replace: function (idx, removedCount, addedViews) {
- var addedCount = addedViews ? property_get.get(addedViews, "length") : 0;
+ var addedCount = addedViews ? property_get.get(addedViews, 'length') : 0;
var self = this;
this.arrayContentWillChange(idx, removedCount, addedCount);
this.childViewsWillChange(this._childViews, idx, removedCount);
@@ -36733,22 +36766,22 @@
*/
render: function (buffer) {
var element = buffer.element();
var dom = buffer.dom;
- if (this.tagName === "") {
+ if (this.tagName === '') {
element = dom.createDocumentFragment();
buffer._element = element;
this._childViewsMorph = dom.appendMorph(element, this._morph.contextualElement);
} else {
this._childViewsMorph = dom.appendMorph(element);
}
return element;
},
- instrumentName: "container",
+ instrumentName: 'container',
/**
When a child view is removed, destroy its element so that
it is removed from the DOM.
The array observer that triggers this action is set up in the
@@ -36758,11 +36791,11 @@
@param {Ember.Array} views the child views array before mutation
@param {Number} start the start position of the mutation
@param {Number} removed the number of child views removed
**/
childViewsWillChange: function (views, start, removed) {
- this.propertyWillChange("childViews");
+ this.propertyWillChange('childViews');
if (removed > 0) {
var changedViews = views.slice(start, start + removed);
// transition to preRender before clearing parentView
this.currentState.childViewsWillChange(this, views, start, removed);
@@ -36793,34 +36826,34 @@
if (added > 0) {
var changedViews = views.slice(start, start + added);
this.initializeViews(changedViews, this);
this.currentState.childViewsDidChange(this, views, start, added);
}
- this.propertyDidChange("childViews");
+ this.propertyDidChange('childViews');
},
initializeViews: function (views, parentView) {
enumerable_utils.forEach(views, function (view) {
- property_set.set(view, "_parentView", parentView);
+ property_set.set(view, '_parentView', parentView);
if (!view.container && parentView) {
- property_set.set(view, "container", parentView.container);
+ property_set.set(view, 'container', parentView.container);
}
});
},
currentView: null,
- _currentViewWillChange: mixin.beforeObserver("currentView", function () {
- var currentView = property_get.get(this, "currentView");
+ _currentViewWillChange: mixin.beforeObserver('currentView', function () {
+ var currentView = property_get.get(this, 'currentView');
if (currentView) {
currentView.destroy();
}
}),
- _currentViewDidChange: mixin.observer("currentView", function () {
- var currentView = property_get.get(this, "currentView");
+ _currentViewDidChange: mixin.observer('currentView', function () {
+ var currentView = property_get.get(this, 'currentView');
if (currentView) {
this.pushObject(currentView);
}
}),
@@ -36835,11 +36868,11 @@
ensureChildrenAreInDOM: K
});
merge['default'](states.inBuffer, {
childViewsDidChange: function (parentView, views, start, added) {
- throw new EmberError['default']("You cannot modify child views while in the inBuffer state");
+ throw new EmberError['default']('You cannot modify child views while in the inBuffer state');
}
});
merge['default'](states.hasElement, {
childViewsWillChange: function (view, views, start, removed) {
@@ -36849,11 +36882,11 @@
_view.remove();
}
},
childViewsDidChange: function (view, views, start, added) {
- run['default'].scheduleOnce("render", view, "_ensureChildrenAreInDOM");
+ run['default'].scheduleOnce('render', view, '_ensureChildrenAreInDOM');
},
ensureChildrenAreInDOM: function (view) {
var childViews = view._childViews;
var renderer = view._renderer;
@@ -36908,13 +36941,13 @@
_states: states.cloneStates(states.states),
init: function () {
this._super.apply(this, arguments);
- this._state = "preRender";
+ this._state = 'preRender';
this.currentState = this._states.preRender;
- this._isVisible = property_get.get(this, "isVisible");
+ this._isVisible = property_get.get(this, 'isVisible');
// Fallback for legacy cases where the view was created directly
// via `create()` instead of going through the container.
if (!this.renderer) {
renderer = renderer || new Renderer['default'](new DOMHelper['default']());
@@ -36927,34 +36960,34 @@
property will point to the parent of the view.
@property parentView
@type Ember.View
@default null
*/
- parentView: computed.computed("_parentView", function () {
+ parentView: computed.computed('_parentView', function () {
var parent = this._parentView;
if (parent && parent.isVirtual) {
- return property_get.get(parent, "parentView");
+ return property_get.get(parent, 'parentView');
} else {
return parent;
}
}),
_state: null,
_parentView: null,
// return the current view, not including virtual views
- concreteView: computed.computed("parentView", function () {
+ concreteView: computed.computed('parentView', function () {
if (!this.isVirtual) {
return this;
} else {
- return property_get.get(this, "parentView.concreteView");
+ return property_get.get(this, 'parentView.concreteView');
}
}),
- instrumentName: "core_view",
+ instrumentName: 'core_view',
instrumentDetails: function (hash) {
hash.object = this.toString();
hash.containerKey = this._debugContainerKey;
hash.view = this;
@@ -36980,11 +37013,11 @@
return method.apply(this, args);
}
},
has: function (name) {
- return utils.typeOf(this[name]) === "function" || this._super(name);
+ return utils.typeOf(this[name]) === 'function' || this._super(name);
},
destroy: function () {
var parent = this._parentView;
@@ -37003,11 +37036,11 @@
// the DOM again.
if (parent) {
parent.removeChild(this);
}
- this._transitionTo("destroying", false);
+ this._transitionTo('destroying', false);
return this;
},
clearRenderedChildren: K,
@@ -37035,32 +37068,32 @@
'use strict';
exports['default'] = CollectionView['default'].extend(_MetamorphView._Metamorph, {
init: function () {
- var itemController = property_get.get(this, "itemController");
+ var itemController = property_get.get(this, 'itemController');
var binding;
if (itemController) {
- var controller = property_get.get(this, "controller.container").lookupFactory("controller:array").create({
+ var controller = property_get.get(this, 'controller.container').lookupFactory('controller:array').create({
_isVirtual: true,
- parentController: property_get.get(this, "controller"),
+ parentController: property_get.get(this, 'controller'),
itemController: itemController,
- target: property_get.get(this, "controller"),
+ target: property_get.get(this, 'controller'),
_eachView: this
});
this.disableContentObservers(function () {
- property_set.set(this, "content", controller);
- binding = new ember_metal__binding.Binding("content", "_eachView.dataSource").oneWay();
+ property_set.set(this, 'content', controller);
+ binding = new ember_metal__binding.Binding('content', '_eachView.dataSource').oneWay();
binding.connect(controller);
});
this._arrayController = controller;
} else {
this.disableContentObservers(function () {
- binding = new ember_metal__binding.Binding("content", "dataSource").oneWay();
+ binding = new ember_metal__binding.Binding('content', 'dataSource').oneWay();
binding.connect(this);
});
}
return this._super.apply(this, arguments);
@@ -37068,36 +37101,36 @@
_assertArrayLike: function (content) {
},
disableContentObservers: function (callback) {
- observer.removeBeforeObserver(this, "content", null, "_contentWillChange");
- observer.removeObserver(this, "content", null, "_contentDidChange");
+ observer.removeBeforeObserver(this, 'content', null, '_contentWillChange');
+ observer.removeObserver(this, 'content', null, '_contentDidChange');
callback.call(this);
- observer.addBeforeObserver(this, "content", null, "_contentWillChange");
- observer.addObserver(this, "content", null, "_contentDidChange");
+ observer.addBeforeObserver(this, 'content', null, '_contentWillChange');
+ observer.addObserver(this, 'content', null, '_contentDidChange');
},
itemViewClass: _MetamorphView['default'],
emptyViewClass: _MetamorphView['default'],
createChildView: function (_view, attrs) {
var view = this._super(_view, attrs);
- var content = property_get.get(view, "content");
- var keyword = property_get.get(this, "keyword");
+ var content = property_get.get(view, 'content');
+ var keyword = property_get.get(this, 'keyword');
if (keyword) {
view._keywords[keyword] = content;
}
// If {{#each}} is looping over an array of controllers,
// point each child view at their respective controller.
if (content && content.isController) {
- property_set.set(view, "controller", content);
+ property_set.set(view, 'controller', content);
}
return view;
},
@@ -37120,13 +37153,13 @@
'use strict';
/*jshint newcap:false*/
var _Metamorph = mixin.Mixin.create({
isVirtual: true,
- tagName: "",
+ tagName: '',
- instrumentName: "metamorph",
+ instrumentName: 'metamorph',
init: function () {
this._super.apply(this, arguments);
}
});
@@ -37146,14 +37179,14 @@
*/
var defaultTemplate = htmlbarsTemplate['default'];
var SelectOption = View['default'].extend({
- instrumentDisplay: "Ember.SelectOption",
+ instrumentDisplay: 'Ember.SelectOption',
- tagName: "option",
- attributeBindings: ["value", "selected"],
+ tagName: 'option',
+ attributeBindings: ['value', 'selected'],
defaultTemplate: selectOptionDefaultTemplate['default'],
init: function () {
this.labelPathDidChange();
@@ -37161,44 +37194,44 @@
this._super.apply(this, arguments);
},
selected: computed.computed(function () {
- var value = property_get.get(this, "value");
- var selection = property_get.get(this, "parentView.selection");
- if (property_get.get(this, "parentView.multiple")) {
+ var value = property_get.get(this, 'value');
+ var selection = property_get.get(this, 'parentView.selection');
+ if (property_get.get(this, 'parentView.multiple')) {
return selection && enumerable_utils.indexOf(selection, value) > -1;
} else {
// Primitives get passed through bindings as objects... since
// `new Number(4) !== 4`, we use `==` below
- return value === property_get.get(this, "parentView.value");
+ return value === property_get.get(this, 'parentView.value');
}
- }).property("content", "parentView.selection"),
+ }).property('content', 'parentView.selection'),
- labelPathDidChange: mixin.observer("parentView.optionLabelPath", function () {
- var labelPath = property_get.get(this, "parentView.optionLabelPath");
- properties.defineProperty(this, "label", computed.computed.alias(labelPath));
+ labelPathDidChange: mixin.observer('parentView.optionLabelPath', function () {
+ var labelPath = property_get.get(this, 'parentView.optionLabelPath');
+ properties.defineProperty(this, 'label', computed.computed.alias(labelPath));
}),
- valuePathDidChange: mixin.observer("parentView.optionValuePath", function () {
- var valuePath = property_get.get(this, "parentView.optionValuePath");
- properties.defineProperty(this, "value", computed.computed.alias(valuePath));
+ valuePathDidChange: mixin.observer('parentView.optionValuePath', function () {
+ var valuePath = property_get.get(this, 'parentView.optionValuePath');
+ properties.defineProperty(this, 'value', computed.computed.alias(valuePath));
})
});
var SelectOptgroup = CollectionView['default'].extend({
- instrumentDisplay: "Ember.SelectOptgroup",
+ instrumentDisplay: 'Ember.SelectOptgroup',
- tagName: "optgroup",
- attributeBindings: ["label"],
+ tagName: 'optgroup',
+ attributeBindings: ['label'],
- selectionBinding: "parentView.selection",
- multipleBinding: "parentView.multiple",
- optionLabelPathBinding: "parentView.optionLabelPath",
- optionValuePathBinding: "parentView.optionValuePath",
+ selectionBinding: 'parentView.selection',
+ multipleBinding: 'parentView.multiple',
+ optionLabelPathBinding: 'parentView.optionLabelPath',
+ optionValuePathBinding: 'parentView.optionValuePath',
- itemViewClassBinding: "parentView.optionView"
+ itemViewClassBinding: 'parentView.optionView'
});
/**
The `Ember.Select` view class renders a
[select](https://developer.mozilla.org/en/HTML/Element/select) HTML element,
@@ -37438,16 +37471,16 @@
@class Select
@namespace Ember
@extends Ember.View
*/
var Select = View['default'].extend({
- instrumentDisplay: "Ember.Select",
+ instrumentDisplay: 'Ember.Select',
- tagName: "select",
- classNames: ["ember-select"],
+ tagName: 'select',
+ classNames: ['ember-select'],
defaultTemplate: defaultTemplate,
- attributeBindings: ["autofocus", "autocomplete", "disabled", "form", "multiple", "name", "required", "size", "tabindex"],
+ attributeBindings: ['autofocus', 'autocomplete', 'disabled', 'form', 'multiple', 'name', 'required', 'size', 'tabindex'],
/**
The `multiple` attribute of the select element. Indicates whether multiple
options can be selected.
@property multiple
@@ -37515,17 +37548,17 @@
@type String
@default null
*/
value: computed.computed({
get: function (key) {
- var valuePath = property_get.get(this, "_valuePath");
- return valuePath ? property_get.get(this, "selection." + valuePath) : property_get.get(this, "selection");
+ var valuePath = property_get.get(this, '_valuePath');
+ return valuePath ? property_get.get(this, 'selection.' + valuePath) : property_get.get(this, 'selection');
},
set: function (key, value) {
return value;
}
- }).property("_valuePath", "selection"),
+ }).property('_valuePath', 'selection'),
/**
If given, a top-most dummy option will be rendered to serve as a user
prompt.
@property prompt
@@ -37538,19 +37571,19 @@
The path of the option labels. See [content](/api/classes/Ember.Select.html#property_content).
@property optionLabelPath
@type String
@default 'content'
*/
- optionLabelPath: "content",
+ optionLabelPath: 'content',
/**
The path of the option values. See [content](/api/classes/Ember.Select.html#property_content).
@property optionValuePath
@type String
@default 'content'
*/
- optionValuePath: "content",
+ optionValuePath: 'content',
/**
The path of the option group.
When this property is used, `content` should be sorted by `optionGroupPath`.
@property optionGroupPath
@@ -37566,78 +37599,78 @@
@default Ember.SelectOptgroup
*/
groupView: SelectOptgroup,
groupedContent: computed.computed(function () {
- var groupPath = property_get.get(this, "optionGroupPath");
+ var groupPath = property_get.get(this, 'optionGroupPath');
var groupedContent = native_array.A();
- var content = property_get.get(this, "content") || [];
+ var content = property_get.get(this, 'content') || [];
enumerable_utils.forEach(content, function (item) {
var label = property_get.get(item, groupPath);
- if (property_get.get(groupedContent, "lastObject.label") !== label) {
+ if (property_get.get(groupedContent, 'lastObject.label') !== label) {
groupedContent.pushObject({
label: label,
content: native_array.A()
});
}
- property_get.get(groupedContent, "lastObject.content").push(item);
+ property_get.get(groupedContent, 'lastObject.content').push(item);
});
return groupedContent;
- }).property("optionGroupPath", "content.@each"),
+ }).property('optionGroupPath', 'content.@each'),
/**
The view class for option.
@property optionView
@type Ember.View
@default Ember.SelectOption
*/
optionView: SelectOption,
_change: function () {
- if (property_get.get(this, "multiple")) {
+ if (property_get.get(this, 'multiple')) {
this._changeMultiple();
} else {
this._changeSingle();
}
},
- selectionDidChange: mixin.observer("selection.@each", function () {
- var selection = property_get.get(this, "selection");
- if (property_get.get(this, "multiple")) {
+ selectionDidChange: mixin.observer('selection.@each', function () {
+ var selection = property_get.get(this, 'selection');
+ if (property_get.get(this, 'multiple')) {
if (!utils.isArray(selection)) {
- property_set.set(this, "selection", native_array.A([selection]));
+ property_set.set(this, 'selection', native_array.A([selection]));
return;
}
this._selectionDidChangeMultiple();
} else {
this._selectionDidChangeSingle();
}
}),
- valueDidChange: mixin.observer("value", function () {
- var content = property_get.get(this, "content");
- var value = property_get.get(this, "value");
- var valuePath = property_get.get(this, "optionValuePath").replace(/^content\.?/, "");
- var selectedValue = valuePath ? property_get.get(this, "selection." + valuePath) : property_get.get(this, "selection");
+ valueDidChange: mixin.observer('value', function () {
+ var content = property_get.get(this, 'content');
+ var value = property_get.get(this, 'value');
+ var valuePath = property_get.get(this, 'optionValuePath').replace(/^content\.?/, '');
+ var selectedValue = valuePath ? property_get.get(this, 'selection.' + valuePath) : property_get.get(this, 'selection');
var selection;
if (value !== selectedValue) {
selection = content ? content.find(function (obj) {
return value === (valuePath ? property_get.get(obj, valuePath) : obj);
}) : null;
- this.set("selection", selection);
+ this.set('selection', selection);
}
}),
_setDefaults: function () {
- var selection = property_get.get(this, "selection");
- var value = property_get.get(this, "value");
+ var selection = property_get.get(this, 'selection');
+ var value = property_get.get(this, 'value');
if (!isNone['default'](selection)) {
this.selectionDidChange();
}
if (!isNone['default'](value)) {
@@ -37648,33 +37681,33 @@
}
},
_changeSingle: function () {
var selectedIndex = this.$()[0].selectedIndex;
- var content = property_get.get(this, "content");
- var prompt = property_get.get(this, "prompt");
+ var content = property_get.get(this, 'content');
+ var prompt = property_get.get(this, 'prompt');
- if (!content || !property_get.get(content, "length")) {
+ if (!content || !property_get.get(content, 'length')) {
return;
}
if (prompt && selectedIndex === 0) {
- property_set.set(this, "selection", null);
+ property_set.set(this, 'selection', null);
return;
}
if (prompt) {
selectedIndex -= 1;
}
- property_set.set(this, "selection", content.objectAt(selectedIndex));
+ property_set.set(this, 'selection', content.objectAt(selectedIndex));
},
_changeMultiple: function () {
- var options = this.$("option:selected");
- var prompt = property_get.get(this, "prompt");
+ var options = this.$('option:selected');
+ var prompt = property_get.get(this, 'prompt');
var offset = prompt ? 1 : 0;
- var content = property_get.get(this, "content");
- var selection = property_get.get(this, "selection");
+ var content = property_get.get(this, 'content');
+ var selection = property_get.get(this, 'selection');
if (!content) {
return;
}
if (options) {
@@ -37682,58 +37715,58 @@
return this.index - offset;
}).toArray();
var newSelection = content.objectsAt(selectedIndexes);
if (utils.isArray(selection)) {
- enumerable_utils.replace(selection, 0, property_get.get(selection, "length"), newSelection);
+ enumerable_utils.replace(selection, 0, property_get.get(selection, 'length'), newSelection);
} else {
- property_set.set(this, "selection", newSelection);
+ property_set.set(this, 'selection', newSelection);
}
}
},
_selectionDidChangeSingle: function () {
- var value = property_get.get(this, "value");
+ var value = property_get.get(this, 'value');
var self = this;
if (value && value.then) {
value.then(function (resolved) {
// Ensure that we don't overwrite new value
- if (property_get.get(self, "value") === value) {
+ if (property_get.get(self, 'value') === value) {
self._setSelectedIndex(resolved);
}
});
} else {
this._setSelectedIndex(value);
}
},
_setSelectedIndex: function (selectionValue) {
- var el = property_get.get(this, "element");
- var content = property_get.get(this, "contentValues");
+ var el = property_get.get(this, 'element');
+ var content = property_get.get(this, 'contentValues');
if (!el) {
return;
}
var selectionIndex = enumerable_utils.indexOf(content, selectionValue);
- var prompt = property_get.get(this, "prompt");
+ var prompt = property_get.get(this, 'prompt');
if (prompt) {
selectionIndex += 1;
}
if (el) {
el.selectedIndex = selectionIndex;
}
},
- _valuePath: computed.computed("optionValuePath", function () {
- var optionValuePath = property_get.get(this, "optionValuePath");
- return optionValuePath.replace(/^content\.?/, "");
+ _valuePath: computed.computed('optionValuePath', function () {
+ var optionValuePath = property_get.get(this, 'optionValuePath');
+ return optionValuePath.replace(/^content\.?/, '');
}),
- contentValues: computed.computed("content.[]", "_valuePath", function () {
- var valuePath = property_get.get(this, "_valuePath");
- var content = property_get.get(this, "content") || [];
+ contentValues: computed.computed('content.[]', '_valuePath', function () {
+ var valuePath = property_get.get(this, '_valuePath');
+ var content = property_get.get(this, 'content') || [];
if (valuePath) {
return enumerable_utils.map(content, function (el) {
return property_get.get(el, valuePath);
});
@@ -37743,16 +37776,16 @@
});
}
}),
_selectionDidChangeMultiple: function () {
- var content = property_get.get(this, "content");
- var selection = property_get.get(this, "selection");
+ var content = property_get.get(this, 'content');
+ var selection = property_get.get(this, 'selection');
var selectedIndexes = content ? enumerable_utils.indexesOf(content, selection) : [-1];
- var prompt = property_get.get(this, "prompt");
+ var prompt = property_get.get(this, 'prompt');
var offset = prompt ? 1 : 0;
- var options = this.$("option");
+ var options = this.$('option');
var adjusted;
if (options) {
options.each(function () {
adjusted = this.index > -1 ? this.index - offset : -1;
@@ -37787,33 +37820,33 @@
function SimpleBoundView(parentView, renderer, morph, stream) {
this.stream = stream;
this[utils.GUID_KEY] = utils.uuid();
this._lastNormalizedValue = undefined;
- this.state = "preRender";
+ this.state = 'preRender';
this.updateId = null;
this._parentView = parentView;
this.buffer = null;
this._morph = morph;
this.renderer = renderer;
}
SimpleBoundView.prototype = {
isVirtual: true,
isView: true,
- tagName: "",
+ tagName: '',
destroy: function () {
if (this.updateId) {
run['default'].cancel(this.updateId);
this.updateId = null;
}
if (this._parentView) {
this._parentView.removeChild(this);
}
this.morph = null;
- this.state = "destroyed";
+ this.state = 'destroyed';
},
propertyWillChange: K,
propertyDidChange: K,
@@ -37834,18 +37867,18 @@
buffer._element = value;
},
rerender: function () {
switch (this.state) {
- case "preRender":
- case "destroyed":
+ case 'preRender':
+ case 'destroyed':
break;
- case "inBuffer":
+ case 'inBuffer':
throw new EmberError['default']("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");
- case "hasElement":
- case "inDOM":
- this.updateId = run['default'].scheduleOnce("render", this, "update");
+ case 'hasElement':
+ case 'inDOM':
+ this.updateId = run['default'].scheduleOnce('render', this, 'update');
break;
}
return this;
},
@@ -37867,15 +37900,16 @@
SimpleBoundView.create = function (attrs) {
return new SimpleBoundView(attrs._parentView, attrs.renderer, attrs._morph, attrs.stream);
};
SimpleBoundView.isViewClass = true;
+
function appendSimpleBoundView(parentView, morph, stream) {
var view = parentView.appendChild(SimpleBoundView, { _morph: morph, stream: stream });
stream.subscribe(parentView._wrapAsScheduled(function () {
- run['default'].scheduleOnce("render", view, "rerender");
+ run['default'].scheduleOnce('render', view, 'rerender');
}));
}
exports['default'] = SimpleBoundView;
@@ -37970,17 +38004,17 @@
var destroying = create['default'](_default['default']);
merge['default'](destroying, {
appendChild: function () {
- throw new EmberError['default'](string.fmt(destroyingError, ["appendChild"]));
+ throw new EmberError['default'](string.fmt(destroyingError, ['appendChild']));
},
rerender: function () {
- throw new EmberError['default'](string.fmt(destroyingError, ["rerender"]));
+ throw new EmberError['default'](string.fmt(destroyingError, ['rerender']));
},
destroyElement: function () {
- throw new EmberError['default'](string.fmt(destroyingError, ["destroyElement"]));
+ throw new EmberError['default'](string.fmt(destroyingError, ['destroyElement']));
}
});
exports['default'] = destroying;
@@ -37991,33 +38025,33 @@
var hasElement = create['default'](_default['default']);
merge['default'](hasElement, {
$: function (view, sel) {
- var elem = view.get("concreteView").element;
+ var elem = view.get('concreteView').element;
return sel ? jQuery['default'](sel, elem) : jQuery['default'](elem);
},
getElement: function (view) {
- var parent = property_get.get(view, "parentView");
+ var parent = property_get.get(view, 'parentView');
if (parent) {
- parent = property_get.get(parent, "element");
+ parent = property_get.get(parent, 'element');
}
if (parent) {
return view.findElementInParentElement(parent);
}
- return jQuery['default']("#" + property_get.get(view, "elementId"))[0];
+ return jQuery['default']("#" + property_get.get(view, 'elementId'))[0];
},
// once the view has been inserted into the DOM, rerendering is
// deferred to allow bindings to synchronize.
rerender: function (view) {
if (view._root._morph && !view._elementInserted) {
- throw new EmberError['default']("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.");
+ throw new EmberError['default']('Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.');
}
- run['default'].scheduleOnce("render", view, "_rerender");
+ run['default'].scheduleOnce('render', view, '_rerender');
},
// once the view is already in the DOM, destroying it removes it
// from the DOM, nukes its element, and puts it back into the
// preRender state if inDOM.
@@ -38083,11 +38117,11 @@
if (!childView._morph) {
buffer.pushChildView(childView);
}
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return childView;
},
appendAttr: function (view, attrNode) {
@@ -38101,11 +38135,11 @@
if (!attrNode._morph) {
buffer.pushAttrNode(attrNode);
}
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return attrNode;
},
invokeObserver: function (target, observer) {
@@ -38147,11 +38181,11 @@
_attrNodes.push(attrNode);
attrNode._parentView = view;
view.renderer.appendAttrTo(attrNode, view.element, attrNode.attrName);
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return attrNode;
}
});
@@ -38176,22 +38210,22 @@
/**
@module ember
@submodule ember-views
*/
exports['default'] = Component['default'].extend(TextSupport['default'], {
- instrumentDisplay: "{{textarea}}",
+ instrumentDisplay: '{{textarea}}',
- classNames: ["ember-text-area"],
+ classNames: ['ember-text-area'],
tagName: "textarea",
- attributeBindings: ["rows", "cols", "name", "selectionEnd", "selectionStart", "wrap", "lang", "dir"],
+ attributeBindings: ['rows', 'cols', 'name', 'selectionEnd', 'selectionStart', 'wrap', 'lang', 'dir'],
rows: null,
cols: null,
- _updateElementValue: mixin.observer("value", function () {
+ _updateElementValue: mixin.observer('value', function () {
// We do this check so cursor position doesn't get affected in IE
- var value = property_get.get(this, "value");
+ var value = property_get.get(this, 'value');
var $el = this.$();
if ($el && value !== $el.val()) {
$el.val(value);
}
}),
@@ -38225,11 +38259,11 @@
return type;
}
if (!inputTypeTestElement) {
- inputTypeTestElement = document.createElement("input");
+ inputTypeTestElement = document.createElement('input');
}
try {
inputTypeTestElement.type = type;
} catch (e) {}
@@ -38239,15 +38273,15 @@
function getTypeComputed() {
return computed.computed({
get: function () {
- return "text";
+ return 'text';
},
set: function (key, value) {
- var type = "text";
+ var type = 'text';
if (canSetTypeOfInput(value)) {
type = value;
}
@@ -38273,15 +38307,15 @@
@namespace Ember
@extends Ember.Component
@uses Ember.TextSupport
*/
exports['default'] = Component['default'].extend(TextSupport['default'], {
- instrumentDisplay: "{{input type=\"text\"}}",
+ instrumentDisplay: '{{input type="text"}}',
- classNames: ["ember-text-field"],
+ classNames: ['ember-text-field'],
tagName: "input",
- attributeBindings: ["accept", "autocomplete", "autosave", "dir", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "inputmode", "lang", "list", "max", "min", "multiple", "name", "pattern", "size", "step", "type", "value", "width"],
+ attributeBindings: ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'type', 'value', 'width'],
defaultLayout: null,
/**
The `value` attribute of the input element. As the user inputs text, this
@@ -39021,15 +39055,15 @@
the template yourself.
@property template
@type Function
*/
- template: computed.computed("templateName", {
+ template: computed.computed('templateName', {
get: function () {
- var templateName = property_get.get(this, "templateName");
- var template = this.templateForName(templateName, "template");
- return template || property_get.get(this, "defaultTemplate");
+ var templateName = property_get.get(this, 'templateName');
+ var template = this.templateForName(templateName, 'template');
+ return template || property_get.get(this, 'defaultTemplate');
},
set: function (key, value) {
if (value !== undefined) {
return value;
}
@@ -39047,26 +39081,26 @@
the rendering of the contents of the wrapper to the `template` property
on a subclass.
@property layout
@type Function
*/
- layout: computed.computed("layoutName", {
+ layout: computed.computed('layoutName', {
get: function (key) {
- var layoutName = property_get.get(this, "layoutName");
- var layout = this.templateForName(layoutName, "layout");
+ var layoutName = property_get.get(this, 'layoutName');
+ var layout = this.templateForName(layoutName, 'layout');
- return layout || property_get.get(this, "defaultLayout");
+ return layout || property_get.get(this, 'defaultLayout');
},
set: function (key, value) {
return value;
}
}),
_yield: function (context, options, morph) {
- var template = property_get.get(this, "template");
+ var template = property_get.get(this, 'template');
if (template) {
if (template.isHTMLBars) {
return template.render(context, options, morph.contextualElement);
} else {
@@ -39081,44 +39115,44 @@
if (!name) {
return;
}
if (!this.container) {
- throw new EmberError['default']("Container was not found when looking up a views template. " + "This is most likely due to manually instantiating an Ember.View. " + "See: http://git.io/EKPpnA");
+ throw new EmberError['default']('Container was not found when looking up a views template. ' + 'This is most likely due to manually instantiating an Ember.View. ' + 'See: http://git.io/EKPpnA');
}
- return this.container.lookup("template:" + name);
+ return this.container.lookup('template:' + name);
},
/**
If a value that affects template rendering changes, the view should be
re-rendered to reflect the new value.
@method _contextDidChange
@private
*/
- _contextDidChange: mixin.observer("context", function () {
+ _contextDidChange: mixin.observer('context', function () {
this.rerender();
}),
// When it's a virtual view, we need to notify the parent that their
// childViews will change.
- _childViewsWillChange: mixin.beforeObserver("childViews", function () {
+ _childViewsWillChange: mixin.beforeObserver('childViews', function () {
if (this.isVirtual) {
- var parentView = property_get.get(this, "parentView");
+ var parentView = property_get.get(this, 'parentView');
if (parentView) {
- property_events.propertyWillChange(parentView, "childViews");
+ property_events.propertyWillChange(parentView, 'childViews');
}
}
}),
// When it's a virtual view, we need to notify the parent that their
// childViews did change.
- _childViewsDidChange: mixin.observer("childViews", function () {
+ _childViewsDidChange: mixin.observer('childViews', function () {
if (this.isVirtual) {
- var parentView = property_get.get(this, "parentView");
+ var parentView = property_get.get(this, 'parentView');
if (parentView) {
- property_events.propertyDidChange(parentView, "childViews");
+ property_events.propertyDidChange(parentView, 'childViews');
}
}
}),
/**
@@ -39128,69 +39162,69 @@
@param {Class,Mixin} klass Subclass of Ember.View (or Ember.View itself),
or an instance of Ember.Mixin.
@return Ember.View
*/
nearestOfType: function (klass) {
- var view = property_get.get(this, "parentView");
+ var view = property_get.get(this, 'parentView');
var isOfType = klass instanceof mixin.Mixin ? function (view) {
return klass.detect(view);
} : function (view) {
return klass.detect(view.constructor);
};
while (view) {
if (isOfType(view)) {
return view;
}
- view = property_get.get(view, "parentView");
+ view = property_get.get(view, 'parentView');
}
},
/**
Return the nearest ancestor that has a given property.
@method nearestWithProperty
@param {String} property A property name
@return Ember.View
*/
nearestWithProperty: function (property) {
- var view = property_get.get(this, "parentView");
+ var view = property_get.get(this, 'parentView');
while (view) {
if (property in view) {
return view;
}
- view = property_get.get(view, "parentView");
+ view = property_get.get(view, 'parentView');
}
},
/**
When the parent view changes, recursively invalidate `controller`
@method _parentViewDidChange
@private
*/
- _parentViewDidChange: mixin.observer("_parentView", function () {
+ _parentViewDidChange: mixin.observer('_parentView', function () {
if (this.isDestroying) {
return;
}
this._setupKeywords();
- this.trigger("parentViewDidChange");
+ this.trigger('parentViewDidChange');
- if (property_get.get(this, "parentView.controller") && !property_get.get(this, "controller")) {
- this.notifyPropertyChange("controller");
+ if (property_get.get(this, 'parentView.controller') && !property_get.get(this, 'controller')) {
+ this.notifyPropertyChange('controller');
}
}),
- _controllerDidChange: mixin.observer("controller", function () {
+ _controllerDidChange: mixin.observer('controller', function () {
if (this.isDestroying) {
return;
}
this.rerender();
this.forEachChildView(function (view) {
- view.propertyDidChange("controller");
+ view.propertyDidChange('controller');
});
}),
/**
Renders the view again. This will work regardless of whether the
@@ -39336,11 +39370,11 @@
@method renderToElement
@param {String} tagName The tag of the element to create and render into. Defaults to "body".
@return {HTMLBodyElement} element
*/
renderToElement: function (tagName) {
- tagName = tagName || "body";
+ tagName = tagName || 'body';
var element = this.renderer._dom.createElement(tagName);
this.renderer.appendTo(this, element);
return element;
@@ -39528,17 +39562,17 @@
this._applyAttributeBindings(buffer);
buffer.setClasses(this.classNames);
buffer.id(this.elementId);
- var role = property_get.get(this, "ariaRole");
+ var role = property_get.get(this, 'ariaRole');
if (role) {
- buffer.attr("role", role);
+ buffer.attr('role', role);
}
- if (property_get.get(this, "isVisible") === false) {
- buffer.style("display", "none");
+ if (property_get.get(this, 'isVisible') === false) {
+ buffer.style('display', 'none');
}
},
// ..........................................................
// STANDARD RENDER PROPERTIES
@@ -39628,11 +39662,11 @@
memory manager.
@method destroy
*/
destroy: function () {
// get parentView before calling super because it'll be destroyed
- var nonVirtualParentView = property_get.get(this, "parentView");
+ var nonVirtualParentView = property_get.get(this, 'parentView');
var viewName = this.viewName;
if (!this._super.apply(this, arguments)) {
return;
}
@@ -39682,43 +39716,43 @@
_unregister: function () {
delete this._viewRegistry[this.elementId];
},
registerObserver: function (root, path, target, observer) {
- if (!observer && "function" === typeof target) {
+ if (!observer && 'function' === typeof target) {
observer = target;
target = null;
}
- if (!root || typeof root !== "object") {
+ if (!root || typeof root !== 'object') {
return;
}
var scheduledObserver = this._wrapAsScheduled(observer);
ember_metal__observer.addObserver(root, path, target, scheduledObserver);
- this.one("willClearRender", function () {
+ this.one('willClearRender', function () {
ember_metal__observer.removeObserver(root, path, target, scheduledObserver);
});
},
_wrapAsScheduled: function (fn) {
var view = this;
var stateCheckedFn = function () {
view.currentState.invokeObserver(this, fn);
};
var scheduledFn = function () {
- run['default'].scheduleOnce("render", this, stateCheckedFn);
+ run['default'].scheduleOnce('render', this, stateCheckedFn);
};
return scheduledFn;
}
});
// jscs:enable validateIndentation
- deprecate_property.deprecateProperty(View.prototype, "state", "_state");
- deprecate_property.deprecateProperty(View.prototype, "states", "_states");
+ deprecate_property.deprecateProperty(View.prototype, 'state', '_state');
+ deprecate_property.deprecateProperty(View.prototype, 'states', '_states');
/*
Describe how the specified actions should behave in the various
states that a view can exist in. Possible states:
@@ -39746,19 +39780,19 @@
// are done on the DOM element.
var mutation = EmberObject['default'].extend(Evented['default']).create();
// TODO MOVE TO RENDERER HOOKS
View.addMutationListener = function (callback) {
- mutation.on("change", callback);
+ mutation.on('change', callback);
};
View.removeMutationListener = function (callback) {
- mutation.off("change", callback);
+ mutation.off('change', callback);
};
View.notifyMutationListeners = function () {
- mutation.trigger("change");
+ mutation.trigger('change');
};
/**
Global views hash
@@ -39801,33 +39835,33 @@
this._super.apply(this, arguments);
var self = this;
this.withValue.subscribe(this._wrapAsScheduled(function () {
- run['default'].scheduleOnce("render", self, "rerenderIfNeeded");
+ run['default'].scheduleOnce('render', self, 'rerenderIfNeeded');
}));
var controllerName = this.controllerName;
if (controllerName) {
- var controllerFactory = this.container.lookupFactory("controller:" + controllerName);
+ var controllerFactory = this.container.lookupFactory('controller:' + controllerName);
var controller = controllerFactory.create({
parentController: this.previousContext,
target: this.previousContext
});
this._generatedController = controller;
if (this.preserveContext) {
this._blockArguments = [controller];
this.withValue.subscribe(function (modelStream) {
- property_set.set(controller, "model", modelStream.value());
+ property_set.set(controller, 'model', modelStream.value());
});
} else {
- property_set.set(this, "controller", controller);
+ property_set.set(this, 'controller', controller);
}
- property_set.set(controller, "model", this.withValue.value());
+ property_set.set(controller, 'model', this.withValue.value());
} else {
if (this.preserveContext) {
this._blockArguments = [this.withValue];
}
}
@@ -39840,11 +39874,11 @@
render: function (buffer) {
var withValue = this.normalizedValue();
this._lastNormalizedValue = withValue;
if (!this.preserveContext && !this.controllerName) {
- property_set.set(this, "_context", withValue);
+ property_set.set(this, '_context', withValue);
}
var template = withValue ? this.mainTemplate : this.inverseTemplate;
renderView['default'](this, buffer, template);
},
@@ -39863,21 +39897,21 @@
'use strict';
// require the main entry points for each of these packages
// this is so that the global exports occur properly
- if (Ember.__loader.registry["ember-template-compiler"]) {
- requireModule("ember-template-compiler");
+ if (Ember.__loader.registry['ember-template-compiler']) {
+ requireModule('ember-template-compiler');
}
// do this to ensure that Ember.Test is defined properly on the global
// if it is present.
- if (Ember.__loader.registry["ember-testing"]) {
- requireModule("ember-testing");
+ if (Ember.__loader.registry['ember-testing']) {
+ requireModule('ember-testing');
}
- lazy_load.runLoadHooks("Ember");
+ lazy_load.runLoadHooks('Ember');
/**
Ember
@module ember
@@ -40313,11 +40347,11 @@
case 'object':
if (typeof content.nodeType === 'number') {
return this.setNode(content);
}
/* Handlebars.SafeString */
- if (typeof content.string === 'string') {
- return this.setHTML(content.string);
+ if (typeof content.toHTML === 'function') {
+ return this.setHTML(content.toHTML());
}
if (this.parseTextAsHTML) {
return this.setHTML(content.toString());
}
/* falls through */
\ No newline at end of file