dist/ember.js in ember-source-1.12.1 vs dist/ember.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;
@@ -1129,11 +1129,11 @@
@private
@class Container
*/
function Container(registry, options) {
this._registry = registry || (function () {
- Ember['default'].deprecate('A container should only be created for an already instantiated ' + 'registry. For backward compatibility, an isolated registry will ' + 'be instantiated just for this container.');
+ Ember['default'].deprecate("A container should only be created for an already instantiated " + "registry. For backward compatibility, an isolated registry will " + "be instantiated just for this container.");
// TODO - See note above about transpiler import workaround.
if (!Registry) {
Registry = requireModule('container/registry')['default'];
}
@@ -1614,21 +1614,21 @@
lookup: function (fullName, options) {
Ember['default'].assert('Create a container on the registry (with `registry.container()`) before calling `lookup`.', this._defaultContainer);
if (instanceInitializersFeatureEnabled) {
- Ember['default'].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: 'http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers' });
+ Ember['default'].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
}
return this._defaultContainer.lookup(fullName, options);
},
lookupFactory: function (fullName) {
Ember['default'].assert('Create a container on the registry (with `registry.container()`) before calling `lookupFactory`.', this._defaultContainer);
if (instanceInitializersFeatureEnabled) {
- Ember['default'].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: 'http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers' });
+ Ember['default'].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" });
}
return this._defaultContainer.lookupFactory(fullName);
},
@@ -2053,11 +2053,11 @@
normalizeInjectionsHash: function (hash) {
var injections = [];
for (var key in hash) {
if (hash.hasOwnProperty(key)) {
- Ember['default'].assert('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
+ Ember['default'].assert("Expected a proper full name, given '" + hash[key] + "'", this.validateFullName(hash[key]));
injections.push({
property: key,
fullName: hash[key]
});
@@ -3212,44 +3212,44 @@
var missing = [];
for (i = 0, l = needs.length; i < l; i++) {
dependency = needs[i];
- Ember['default'].assert(utils.inspect(controller) + "#needs must not specify dependencies with periods in their names (" + dependency + ")", dependency.indexOf(".") === -1);
+ Ember['default'].assert(utils.inspect(controller) + "#needs must not specify dependencies with periods in their names (" + dependency + ")", dependency.indexOf('.') === -1);
- 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));
}
@@ -3259,11 +3259,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:
@@ -3299,22 +3299,22 @@
@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) {
- Ember['default'].assert(" `" + utils.inspect(this) + " specifies `needs`, but does " + "not have a container. Please ensure this controller was " + "instantiated with a container.", this.container || this.controllers !== defaultControllersComputedProperty);
+ Ember['default'].assert(' `' + utils.inspect(this) + ' specifies `needs`, but does ' + "not have a container. Please ensure this controller was " + "instantiated with a container.", this.container || this.controllers !== defaultControllersComputedProperty);
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);
},
@@ -3323,11 +3323,11 @@
@see {Ember.Route#controllerFor}
@deprecated Use `needs` instead
*/
controllerFor: function (controllerName) {
Ember['default'].deprecate("Controller#controllerFor is deprecated, please use Controller#needs instead");
- 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`
@@ -3423,15 +3423,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
@@ -3440,14 +3440,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)
@@ -3468,11 +3468,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;
},
@@ -3487,11 +3487,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);
},
/**
@@ -3500,32 +3500,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) {
@@ -3858,12 +3858,12 @@
However, if the setup requires a loading UI, it might be better
to use the router for this purpose.
@method deferReadiness
*/
deferReadiness: function () {
- Ember['default'].assert('You must call deferReadiness on an instance of Ember.Application', this instanceof Application);
- Ember['default'].assert('You cannot defer readiness since the `ready()` hook has already been called.', this._readinessDeferrals > 0);
+ Ember['default'].assert("You must call deferReadiness on an instance of Ember.Application", this instanceof Application);
+ Ember['default'].assert("You cannot defer readiness since the `ready()` hook has already been called.", this._readinessDeferrals > 0);
this._readinessDeferrals++;
},
/**
Call `advanceReadiness` after any asynchronous setup logic has completed.
@@ -3871,11 +3871,11 @@
or the application will never become ready and routing will not begin.
@method advanceReadiness
@see {Ember.Application#deferReadiness}
*/
advanceReadiness: function () {
- Ember['default'].assert('You must call advanceReadiness on an instance of Ember.Application', this instanceof Application);
+ Ember['default'].assert("You must call advanceReadiness on an instance of Ember.Application", this instanceof Application);
this._readinessDeferrals--;
if (this._readinessDeferrals === 0) {
run['default'].once(this, this.didBecomeReady);
}
@@ -4095,20 +4095,20 @@
@method runInitializers
*/
runInitializers: function (registry) {
var App = this;
this._runInitializer('initializers', function (name, initializer) {
- Ember['default'].assert('No application initializer named \'' + name + '\'', !!initializer);
+ Ember['default'].assert("No application initializer named '" + name + "'", !!initializer);
initializer.initialize(registry, App);
});
},
runInstanceInitializers: function (instance) {
this._runInitializer('instanceInitializers', function (name, initializer) {
- Ember['default'].assert('No instance initializer named \'' + name + '\'', !!initializer);
+ Ember['default'].assert("No instance initializer named '" + name + "'", !!initializer);
initializer.initialize(instance);
});
},
_runInitializer: function (bucketName, cb) {
@@ -4497,13 +4497,13 @@
var attrs = {};
attrs[bucketName] = create['default'](this[bucketName]);
this.reopenClass(attrs);
}
- Ember['default'].assert('The ' + humanName + ' \'' + initializer.name + '\' has already been registered', !this[bucketName][initializer.name]);
- Ember['default'].assert('An ' + humanName + ' cannot be registered without an initialize function', utils.canInvoke(initializer, 'initialize'));
- Ember['default'].assert('An ' + humanName + ' cannot be registered without a name property', initializer.name !== undefined);
+ Ember['default'].assert("The " + humanName + " '" + initializer.name + "' has already been registered", !this[bucketName][initializer.name]);
+ Ember['default'].assert("An " + humanName + " cannot be registered without an initialize function", utils.canInvoke(initializer, 'initialize'));
+ Ember['default'].assert("An " + humanName + " cannot be registered without a name property", initializer.name !== undefined);
this[bucketName][initializer.name] = initializer;
};
}
@@ -4530,12 +4530,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
*/
@@ -4548,11 +4547,11 @@
var _fullName$split = fullName.split(':', 2);
var type = _fullName$split[0];
var name = _fullName$split[1];
- Ember['default'].assert('Tried to normalize a container name without a colon (:) in it.' + ' You probably tried to lookup a name that did not contain a type,' + ' a colon, and a name. A proper lookup name would be `view:post`.', fullName.split(':').length === 2);
+ Ember['default'].assert("Tried to normalize a container name without a colon (:) in it." + " You probably tried to lookup a name that did not contain a type," + " a colon, and a name. A proper lookup name would be `view:post`.", fullName.split(':').length === 2);
if (type !== 'template') {
var result = name;
if (result.indexOf('.') > -1) {
@@ -4828,11 +4827,11 @@
exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
Ember['default'].assert = function (desc, test) {
var throwAssertion;
- if (utils.typeOf(test) === "function") {
+ if (utils.typeOf(test) === 'function') {
throwAssertion = !test();
} else {
throwAssertion = !test;
}
@@ -4851,11 +4850,11 @@
will be displayed.
*/
Ember['default'].warn = function (message, test) {
if (!test) {
Logger['default'].warn("WARNING: " + message);
- if ("trace" in Logger['default']) {
+ if ('trace' in Logger['default']) {
Logger['default'].trace();
}
}
};
@@ -4888,11 +4887,11 @@
in a `url` to the transition guide on the emberjs.com website.
*/
Ember['default'].deprecate = function (message, test, options) {
var noDeprecation;
- if (typeof test === "function") {
+ if (typeof test === 'function') {
noDeprecation = test();
} else {
noDeprecation = test;
}
@@ -4912,27 +4911,27 @@
} catch (e) {
error = e;
}
if (arguments.length === 3) {
- Ember['default'].assert("options argument to Ember.deprecate should be an object", options && typeof options === "object");
+ Ember['default'].assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object');
if (options.url) {
- message += " See " + options.url + " for more details.";
+ message += ' See ' + options.url + ' for more details.';
}
}
if (Ember['default'].LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
var stack;
- var stackStr = "";
+ var stackStr = '';
- if (error["arguments"]) {
+ if (error['arguments']) {
// Chrome
- stack = error.stack.replace(/^\s+at\s+/gm, "").replace(/^([^\(]+?)([\n$])/gm, "{anonymous}($1)$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, "{anonymous}($1)").split("\n");
+ stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
stack.shift();
} else {
// Firefox
- stack = error.stack.replace(/(?:\n@:0)?\s+$/m, "").replace(/^\(/gm, "{anonymous}(").split("\n");
+ stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
}
stackStr = "\n " + stack.slice(2).join("\n ");
message = message + stackStr;
}
@@ -4995,48 +4994,49 @@
@private
@method _warnIfUsingStrippedFeatureFlags
@return {void}
*/
+
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
if (featuresWereStripped) {
- Ember['default'].warn("Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.", !Ember['default'].ENV.ENABLE_ALL_FEATURES);
- Ember['default'].warn("Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.", !Ember['default'].ENV.ENABLE_OPTIONAL_FEATURES);
+ Ember['default'].warn('Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.', !Ember['default'].ENV.ENABLE_ALL_FEATURES);
+ Ember['default'].warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !Ember['default'].ENV.ENABLE_OPTIONAL_FEATURES);
for (var key in FEATURES) {
- if (FEATURES.hasOwnProperty(key) && key !== "isEnabled") {
- Ember['default'].warn("FEATURE[\"" + key + "\"] is set as enabled, but FEATURE flags are only available in canary builds.", !FEATURES[key]);
+ if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') {
+ Ember['default'].warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key]);
}
}
}
}
if (!Ember['default'].testing) {
// Complain if they're using FEATURE flags in builds other than canary
- Ember['default'].FEATURES["features-stripped-test"] = true;
+ Ember['default'].FEATURES['features-stripped-test'] = true;
var featuresWereStripped = true;
- delete Ember['default'].FEATURES["features-stripped-test"];
+ delete Ember['default'].FEATURES['features-stripped-test'];
_warnIfUsingStrippedFeatureFlags(Ember['default'].ENV.FEATURES, featuresWereStripped);
// Inform the developer about the Ember Inspector if not installed.
- var isFirefox = typeof InstallTrigger !== "undefined";
+ var isFirefox = typeof InstallTrigger !== 'undefined';
var isChrome = environment['default'].isChrome;
- if (typeof window !== "undefined" && (isFirefox || isChrome) && window.addEventListener) {
+ if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {
window.addEventListener("load", function () {
if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {
var downloadURL;
if (isChrome) {
- downloadURL = "https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi";
+ downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';
} else if (isFirefox) {
- downloadURL = "https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/";
+ downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';
}
- Ember['default'].debug("For more advanced debugging, install the Ember Inspector from " + downloadURL);
+ Ember['default'].debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);
}
}, false);
}
}
@@ -5048,11 +5048,11 @@
so that if `ember.js` (which must be output for backwards compat reasons) is
used a nice helpful warning message will be printed out.
*/
var runningNonEmberDebugJS = true;
if (runningNonEmberDebugJS) {
- Ember['default'].warn("Please use `ember.debug.js` instead of `ember.js` for development and debugging.");
+ Ember['default'].warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
}
exports.runningNonEmberDebugJS = runningNonEmberDebugJS;
});
@@ -5101,11 +5101,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;
},
@@ -5127,12 +5127,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, '')));
}
}
}
}
});
@@ -5237,12 +5237,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;
},
/**
@@ -5363,11 +5363,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;
}
};
@@ -5401,11 +5401,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;
@@ -5417,15 +5417,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
@@ -5465,11 +5465,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;
@@ -5568,30 +5568,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,
@@ -5662,11 +5662,11 @@
var slice = [].slice;
function calculateCompatType(item) {
if (utils.isStream(item)) {
- return "ID";
+ return 'ID';
} else {
var itemType = typeof item;
return itemType.toUpperCase();
}
@@ -5741,10 +5741,11 @@
}
HandlebarsCompatibleHelper.prototype = {
preprocessArguments: function () {}
};
+
function registerHandlebarsCompatibleHelper(name, value) {
var helper;
if (value && value.isHTMLBars) {
helper = value;
@@ -6031,17 +6032,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;
@@ -6073,55 +6068,55 @@
Ember['default'].assert("You must specify at least one hash argument to bind-attr", !!keys['default'](hash).length);
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');
- Ember['default'].assert("You cannot set `class` manually and via `{{bind-attr}}` helper on the same element. " + "Please use `{{bind-attr}}`'s `:static-class` syntax instead.", !element.getAttribute("class"));
+ Ember['default'].assert('You cannot set `class` manually and via `{{bind-attr}}` helper on the same element. ' + 'Please use `{{bind-attr}}`\'s `:static-class` syntax instead.', !element.getAttribute('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;
} else {
- Ember['default'].assert(string.fmt("You must provide an expression as the value of bound attribute." + " You specified: %@=%@", [attr, path]), typeof path === "string");
+ Ember['default'].assert(string.fmt("You must provide an expression as the value of bound attribute." + " You specified: %@=%@", [attr, path]), typeof path === 'string');
lazyValue = view.getStream(path);
}
attrView = new LegacyBindAttrNode['default'](attr, lazyValue);
attrView._morph = env.dom.createAttrMorph(element, attr);
- Ember['default'].assert("You cannot set `" + attr + "` manually and via `{{bind-attr}}` helper on the same element.", !element.getAttribute(attr));
+ Ember['default'].assert('You cannot set `' + attr + '` manually and via `{{bind-attr}}` helper on the same element.', !element.getAttribute(attr));
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`
@@ -6134,11 +6129,11 @@
@return {String} HTML string
*/
function bindAttrHelperDeprecated() {
Ember['default'].deprecate("The 'bindAttr' view helper is deprecated in favor of 'bind-attr'");
- return helpers['default']["bind-attr"].helperFunction.apply(this, arguments);
+ return helpers['default']['bind-attr'].helperFunction.apply(this, arguments);
}
exports['default'] = bindAttrHelper;
});
@@ -6149,22 +6144,22 @@
exports.collectionHelper = collectionHelper;
function collectionHelper(params, hash, options, env) {
var path = params[0];
- Ember['default'].deprecate("Using the {{collection}} helper without specifying a class has been" + " deprecated as the {{each}} helper now supports the same functionality.", path !== "collection");
+ Ember['default'].deprecate("Using the {{collection}} helper without specifying a class has been" + " deprecated as the {{each}} helper now supports the same functionality.", path !== 'collection');
Ember['default'].assert("You cannot pass more than one argument to the collection helper", params.length <= 1);
var data = env.data;
var template = options.template;
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;
@@ -6188,23 +6183,23 @@
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);
}
Ember['default'].assert(string.fmt("%@ #collection: Could not find itemViewClass %@", [data.view, itemViewClass]), !!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) {
@@ -6225,11 +6220,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) {
@@ -6240,20 +6235,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);
}
});
@@ -6269,11 +6264,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;
}
@@ -6283,11 +6278,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);
@@ -6329,23 +6324,23 @@
@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('');
Ember['default'].assert("If you pass more than one argument to the each helper, " + "it must be in the form {{#each foo in bar}}", params.length <= 1);
var blockParams = options.template && options.template.blockParams;
if (blockParams) {
hash.keyword = true;
hash.blockParams = blockParams;
}
- Ember['default'].deprecate("Using the context switching form of {{each}} is deprecated. " + "Please use the block param form (`{{#each bar as |foo|}}`) instead.", hash.keyword === true || typeof hash.keyword === "string", { url: "http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope" });
+ Ember['default'].deprecate("Using the context switching form of {{each}} is deprecated. " + "Please use the block param form (`{{#each bar as |foo|}}`) instead.", hash.keyword === true || typeof hash.keyword === 'string', { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' });
hash.dataSource = path;
options.helperName = options.helperName || helperName;
return env.helpers.collection.helperFunction.call(this, [EachView['default']], hash, options, env);
@@ -6365,20 +6360,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() {
Ember['default'].assert("To use the inline forms of the `if` and `unless` helpers you must " + "enable the `ember-htmlbars-inline-if-helper` feature flag.");
@@ -6403,11 +6398,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
});
@@ -6431,27 +6426,27 @@
'use strict';
exports.inputHelper = inputHelper;
function inputHelper(params, hash, options, env) {
- Ember['default'].assert("You can only pass attributes to the `input` helper, not arguments", params.length === 0);
+ Ember['default'].assert('You can only pass attributes to the `input` helper, not arguments', params.length === 0);
var onEvent = hash.on;
var inputType;
inputType = utils.read(hash.type);
- if (inputType === "checkbox") {
+ if (inputType === 'checkbox') {
delete hash.type;
- Ember['default'].assert("{{input type='checkbox'}} does not support setting `value=someBooleanValue`;" + " you must use `checked=someBooleanValue` instead.", !hash.hasOwnProperty("value"));
+ Ember['default'].assert("{{input type='checkbox'}} does not support setting `value=someBooleanValue`;" + " you must use `checked=someBooleanValue` instead.", !hash.hasOwnProperty('value'));
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);
}
}
});
@@ -6504,13 +6499,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);
}
@@ -6524,11 +6519,11 @@
exports.templateHelper = templateHelper;
function templateHelper(params, hash, options, env) {
Ember['default'].deprecate("The `template` helper has been deprecated in favor of the `partial` helper." + " Please use `partial` instead, which will work the same way.");
- options.helperName = options.helperName || "template";
+ options.helperName = options.helperName || 'template';
return env.helpers.partial.helperFunction.call(this, params, hash, options, env);
}
});
@@ -6537,11 +6532,11 @@
'use strict';
exports.textareaHelper = textareaHelper;
function textareaHelper(params, hash, options, env) {
- Ember['default'].assert("You can only pass attributes to the `textarea` helper, not arguments", params.length === 0);
+ Ember['default'].assert('You can only pass attributes to the `textarea` helper, not arguments', params.length === 0);
return env.helpers.view.helperFunction.call(this, [TextArea['default']], hash, options, env);
}
});
@@ -6555,18 +6550,18 @@
Ember.assert("The `unbound` helper expects at least one argument, " + "e.g. `{{unbound user.name}}`.", params.length > 0);
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);
}
}
@@ -6586,11 +6581,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 {
@@ -6614,20 +6609,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;
}
@@ -6652,23 +6647,23 @@
var preserveContext;
if (options.template.blockParams) {
preserveContext = true;
} else {
- Ember['default'].deprecate("Using the context switching form of `{{with}}` is deprecated. " + "Please use the block param form (`{{#with bar as |foo|}}`) instead.", false, { url: "http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope" });
+ Ember['default'].deprecate("Using the context switching form of `{{with}}` is deprecated. " + "Please use the block param form (`{{#with bar as |foo|}}`) instead.", false, { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' });
preserveContext = false;
}
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) {
@@ -6680,11 +6675,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;
}
@@ -6718,11 +6713,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);
}
}
@@ -6775,11 +6770,11 @@
*/
function component(env, morph, view, tagName, attrs, template) {
var helper = lookupHelper['default'](tagName, view, env);
- Ember['default'].assert("You specified `" + tagName + "` in your template, but a component for `" + tagName + "` could not be found.", !!helper);
+ Ember['default'].assert('You specified `' + tagName + '` in your template, but a component for `' + tagName + '` could not be found.', !!helper);
return helper.helperFunction.call(undefined, [], attrs, { morph: morph, template: template }, env);
}
});
@@ -6794,11 +6789,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) {
@@ -6848,14 +6843,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) {
@@ -6877,11 +6872,11 @@
valueOrLazyValue = view.getStream(path);
}
var value = utils.read(valueOrLazyValue);
if (value) {
- Ember['default'].deprecate("Returning a string of attributes from a helper inside an element is deprecated.");
+ Ember['default'].deprecate('Returning a string of attributes from a helper inside an element is deprecated.');
updateElementAttributesFromString(env.dom, domElement, value);
}
}
});
@@ -6986,21 +6981,21 @@
viewProto = viewClassOrInstance;
} else {
viewProto = viewClassOrInstance.proto();
}
- Ember['default'].assert("You cannot provide a template block if you also specified a templateName", !props.template || !property_get.get(props, "templateName") && !property_get.get(viewProto, "templateName"));
+ Ember['default'].assert("You cannot provide a template block if you also specified a templateName", !props.template || !property_get.get(props, 'templateName') && !property_get.get(viewProto, 'templateName'));
// We only want to override the `_context` computed property if there is
// no specified controller. See View#_context for more information.
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);
@@ -7017,26 +7012,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;
@@ -7048,11 +7043,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.
@@ -7062,19 +7057,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;
@@ -7112,11 +7107,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) {
@@ -7127,14 +7122,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');
Ember['default'].assert("Could not find 'component-lookup:main' on the provided container," + " which is necessary for performing component lookups", componentLookup);
var Component = componentLookup.lookupFactory(name, container);
if (Component) {
helper = makeViewHelper['default'](Component);
@@ -7240,18 +7235,18 @@
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') {
Ember['default'].deprecate("You're attempting to render a view by passing " + key + " " + "to a view helper, but this syntax is deprecated. You should use `" + key.slice(0, -7) + "=someValue` instead.");
props[key] = view._getBindingForStream(value);
} else if (utils.isStream(value)) {
Ember['default'].deprecate("You're attempting to render a view by passing " + key + " " + "to a view helper without a quoted value, but this syntax is " + "ambiguous. You should either surround " + key + "'s value in " + "quotes or remove `Binding` from " + key + ".");
@@ -7260,11 +7255,11 @@
} 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;
}
}
}
@@ -7281,31 +7276,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;
@@ -7343,24 +7338,24 @@
}
var output;
if (template.isHTMLBars) {
- Ember['default'].assert("template must be an object. Did you mean to call Ember.Handlebars.compile(\"...\") or specify templateName instead?", typeof template === "object");
+ Ember['default'].assert('template must be an object. Did you mean to call Ember.Handlebars.compile("...") or specify templateName instead?', typeof template === 'object');
output = renderHTMLBarsTemplate(view, buffer, template);
} else {
- Ember['default'].assert("template must be a function. Did you mean to call Ember.Handlebars.compile(\"...\") or specify templateName instead?", typeof template === "function");
+ Ember['default'].assert('template must be a function. Did you mean to call Ember.Handlebars.compile("...") or specify templateName instead?', typeof template === 'function');
output = renderLegacyTemplate(view, buffer, template);
}
if (output !== undefined) {
buffer.push(output);
}
}
function renderHTMLBarsTemplate(view, buffer, template) {
- Ember['default'].assert("The template being rendered by `" + view + "` was compiled with `" + template.revision + "` which does not match `Ember@1.12.1` (this revision).", template.revision === "Ember@1.12.1");
+ Ember['default'].assert('The template being rendered by `' + view + '` was compiled with `' + template.revision + '` which does not match `Ember@1.12.2` (this revision).', template.revision === 'Ember@1.12.2');
var contextualElement = buffer.innerContextualElement();
var args = view._blockArguments;
var env = {
view: this,
@@ -7376,11 +7371,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
}
@@ -7395,11 +7390,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();
@@ -7443,11 +7438,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();
@@ -7483,11 +7478,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();
@@ -7531,11 +7526,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();
@@ -7579,11 +7574,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();
@@ -7628,11 +7623,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();
@@ -7672,11 +7667,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();
@@ -7714,11 +7709,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();
@@ -7758,11 +7753,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();
@@ -7800,11 +7795,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();
@@ -7842,11 +7837,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();
@@ -7906,12 +7901,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;
@@ -8019,11 +8014,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;
@@ -8283,14 +8278,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;
@@ -8433,11 +8425,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'];
@@ -8468,12 +8460,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'];
});
@@ -8564,11 +8556,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;
@@ -8798,11 +8790,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
@@ -8815,11 +8807,11 @@
@method connect
@param {Object} obj The root object for this binding.
@return {Ember.Binding} `this`
*/
connect: function (obj) {
- Ember['default'].assert("Must pass a valid object to Ember.Binding.connect()", !!obj);
+ Ember['default'].assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
var fromPath = this._from;
var toPath = this._to;
property_set.trySet(obj, toPath, getWithGlobals(obj, fromPath));
@@ -8842,11 +8834,11 @@
@method disconnect
@param {Object} obj The root object you passed when connecting the binding.
@return {Ember.Binding} `this`
*/
disconnect: function (obj) {
- Ember['default'].assert("Must pass a valid object to Ember.Binding.disconnect()", !!obj);
+ Ember['default'].assert('Must pass a valid object to Ember.Binding.disconnect()', !!obj);
var twoWay = !this._oneWay;
// remove an observer on the object so we're no longer notified of
// changes that should update bindings.
@@ -8865,31 +8857,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;
@@ -8907,32 +8899,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) {
@@ -9127,10 +9119,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);
}
/**
@@ -9141,10 +9134,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;
@@ -9222,11 +9216,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
@@ -9243,22 +9237,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]) {
@@ -9271,12 +9265,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;
@@ -9319,21 +9313,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;
}
@@ -9341,11 +9335,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;
@@ -9408,20 +9402,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);
},
@@ -9509,38 +9503,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);
}
}
},
@@ -9556,11 +9550,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...
@@ -9583,13 +9577,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;
@@ -9734,14 +9729,14 @@
this._dependentKeys = undefined;
this._suspended = undefined;
this._meta = undefined;
- Ember.deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty("cacheable"));
+ Ember.deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty('cacheable'));
this._cacheable = opts && opts.cacheable !== undefined ? opts.cacheable : true; // TODO: Set always to `true` once this deprecation is gone.
this._dependentKeys = opts && opts.dependentKeys;
- Ember.deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty("readOnly"));
+ Ember.deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty('readOnly'));
this._readOnly = opts && (opts.readOnly !== undefined || !!opts.readOnly) || false; // TODO: Set always to `false` once this deprecation is gone.
}
ComputedProperty.prototype = new properties.Descriptor();
@@ -9762,11 +9757,11 @@
@return {Ember.ComputedProperty} this
@chainable
@deprecated All computed properties are cacheble by default. Use `volatile()` instead to opt-out to caching.
*/
ComputedPropertyPrototype.cacheable = function (aFlag) {
- Ember.deprecate("ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.");
+ Ember.deprecate('ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.');
this._cacheable = aFlag !== false;
return this;
};
/**
@@ -9809,11 +9804,11 @@
@method readOnly
@return {Ember.ComputedProperty} this
@chainable
*/
ComputedPropertyPrototype.readOnly = function (readOnly) {
- Ember.deprecate("Passing arguments to ComputedProperty.readOnly() is deprecated.", arguments.length === 0);
+ Ember.deprecate('Passing arguments to ComputedProperty.readOnly() is deprecated.', arguments.length === 0);
this._readOnly = readOnly === undefined || !!readOnly; // Force to true once this deprecation is gone
Ember.assert("Computed properties that define a setter using the new syntax cannot be read-only", !(this._readOnly && this._setter && this._setter !== this._getter));
return this;
};
@@ -10182,10 +10177,12 @@
}
var cp = new ComputedProperty(func);
// jscs:disable
+ // Empty block on purpose
+
if (args) {
cp.property.apply(cp, args);
}
return cp;
@@ -10203,11 +10200,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;
@@ -10303,12 +10300,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));
});
}
/**
@@ -10333,12 +10331,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));
});
}
/**
@@ -10366,10 +10365,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));
});
}
@@ -10396,10 +10396,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);
});
}
@@ -10428,10 +10429,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);
});
}
@@ -10462,15 +10464,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
@@ -10497,10 +10500,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;
});
}
@@ -10530,10 +10534,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;
});
}
@@ -10563,10 +10568,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;
});
}
@@ -10596,10 +10602,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;
});
}
@@ -10629,10 +10636,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;
});
}
@@ -10755,10 +10763,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();
}
/**
@@ -10786,19 +10795,20 @@
@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) {
- Ember['default'].deprecate("Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.");
+ Ember['default'].deprecate('Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.');
return property_get.get(this, defaultPath);
},
set: function (key, newValue, cachedValue) {
- Ember['default'].deprecate("Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.");
+ Ember['default'].deprecate('Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.');
return newValue != null ? newValue : property_get.get(this, defaultPath);
}
});
}
@@ -10813,10 +10823,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) {
Ember['default'].deprecate("Usage of `" + key + "` is deprecated, use `" + dependentKey + "` instead.");
return property_get.get(this, dependentKey);
@@ -10863,11 +10874,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.
@@ -10892,14 +10903,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.
@@ -11074,30 +11085,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] = {};
@@ -11108,12 +11100,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;
@@ -11234,10 +11227,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);
}
/**
@@ -11248,10 +11242,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);
}
/**
@@ -11264,10 +11259,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);
}
/**
@@ -11278,10 +11274,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);
}
/**
@@ -11301,10 +11298,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);
});
}
@@ -11317,10 +11315,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);
}
@@ -11334,10 +11333,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);
}
@@ -11392,10 +11392,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);
@@ -11423,10 +11424,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);
@@ -11477,11 +11479,11 @@
environment = {
hasDOM: false,
isChrome: false,
location: null,
history: null,
- userAgent: 'Lynx (textmode)',
+ userAgent: "Lynx (textmode)",
global: null
};
}
exports['default'] = environment;
@@ -11537,12 +11539,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
@@ -11600,12 +11601,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;
}
@@ -11636,14 +11638,15 @@
@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) {
Ember['default'].assert("You must pass at least an object and event name to Ember.addListener", !!obj && !!eventName);
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
var actions = actionsFor(obj, eventName);
@@ -11658,11 +11661,11 @@
return;
}
actions.push(target, method, flags);
- if ("function" === typeof obj.didAddListener) {
+ if ('function' === typeof obj.didAddListener) {
obj.didAddListener(eventName, target, method);
}
}
/**
@@ -11678,11 +11681,11 @@
@param {Function|String} method A function or the name of a function to be called on `target`
*/
function removeListener(obj, eventName, target, method) {
Ember['default'].assert("You must pass at least an object and event name to Ember.removeListener", !!obj && !!eventName);
- if (!method && "function" === typeof target) {
+ if (!method && 'function' === typeof target) {
method = target;
target = null;
}
function _removeListener(target, method) {
@@ -11694,19 +11697,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;
}
@@ -11732,12 +11735,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);
@@ -11770,12 +11774,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 = [];
@@ -11814,17 +11819,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;
@@ -11842,18 +11848,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;
@@ -11875,11 +11882,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]();
}
@@ -11899,12 +11906,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);
}
@@ -11913,13 +11921,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;
}
@@ -11954,10 +11963,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];
}
@@ -12050,11 +12060,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]);
@@ -12075,15 +12085,15 @@
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;
Ember['default'].assert("Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.", this.container);
- 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;
@@ -12127,11 +12137,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();
};
@@ -12146,12 +12156,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) {
@@ -12228,10 +12239,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 = [];
@@ -12265,10 +12277,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) {
@@ -12284,10 +12297,11 @@
Resets `Ember.Instrumentation` by flushing list of subscribers.
@method reset
@namespace Ember.Instrumentation
*/
+
function reset() {
subscribers.length = 0;
cache = {};
}
@@ -12479,11 +12493,11 @@
this._registry.splice(index, 1);
}
},
each: function (callback) {
- Ember['default'].deprecate("Using Ember.libraries.each() is deprecated. Access to a list of registered libraries is currently a private API. If you are not knowingly accessing this method, your out-of-date Ember Inspector may be doing so.");
+ Ember['default'].deprecate('Using Ember.libraries.each() is deprecated. Access to a list of registered libraries is currently a private API. If you are not knowingly accessing this method, your out-of-date Ember Inspector may be doing so.');
enumerable_utils.forEach(this._registry, function (lib) {
callback(lib.name, lib.version);
});
}
};
@@ -12502,31 +12516,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);
};
}
}
}
@@ -12562,11 +12576,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
@@ -12575,11 +12589,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
@@ -12588,11 +12602,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
@@ -12602,11 +12616,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
@@ -12616,11 +12630,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
@@ -12628,11 +12642,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) {
@@ -12663,11 +12677,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'");
}
@@ -12761,11 +12775,11 @@
@param obj
@param _guid (optional and for internal use only)
@return {Boolean}
*/
remove: function (obj, _guid) {
- Ember.deprecate("Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.", this._silenceRemoveDeprecation);
+ Ember.deprecate('Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.', this._silenceRemoveDeprecation);
return this["delete"](obj, _guid);
},
/**
@@ -12821,11 +12835,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;
@@ -12869,11 +12883,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.
@@ -12975,11 +12989,11 @@
@method remove
@param {*} key
@return {Boolean} true if an item was removed, false otherwise
*/
remove: function (key) {
- Ember.deprecate("Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.");
+ Ember.deprecate('Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.');
return this["delete"](key);
},
/**
@@ -13027,11 +13041,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;
@@ -13071,11 +13085,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
@@ -13216,18 +13230,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) {
@@ -13268,11 +13282,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)) {
@@ -13295,11 +13309,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.
@@ -13311,20 +13325,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) {
@@ -13336,11 +13350,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);
}
@@ -13399,11 +13413,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);
@@ -13422,11 +13436,11 @@
delete values[keyName];
}
for (var i = 0, l = mixins.length; i < l; i++) {
currentMixin = mixins[i];
- Ember['default'].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === "object" && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== "[object Array]");
+ Ember['default'].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
props = mixinProperties(m, currentMixin);
if (props === CONTINUE) {
continue;
}
@@ -13434,23 +13448,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) {
@@ -13465,11 +13479,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;
}
}
@@ -13537,11 +13551,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];
@@ -13561,20 +13575,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 = {};
@@ -13594,11 +13608,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];
@@ -13635,10 +13649,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];
}
@@ -13741,17 +13756,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;
@@ -13774,11 +13790,11 @@
var mixins = this.mixins;
var idx;
for (idx = 0; idx < len; idx++) {
currentMixin = arguments[idx];
- Ember['default'].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === "object" && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== "[object Array]");
+ Ember['default'].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
if (currentMixin instanceof Mixin) {
mixins.push(currentMixin);
} else {
mixins.push(new Mixin(undefined, currentMixin));
@@ -13832,24 +13848,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) {
@@ -13886,11 +13903,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;
@@ -13908,21 +13925,22 @@
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() {
- Ember['default'].deprecate("Ember.required is deprecated as its behavior is inconsistent and unreliable.", false);
+ Ember['default'].deprecate('Ember.required is deprecated as its behavior is inconsistent and unreliable.', false);
return REQUIRED;
}
function Alias(methodName) {
this.isDescriptor = true;
@@ -13950,10 +13968,11 @@
@method aliasMethod
@for Ember
@param {String} methodName name of the method to alias
*/
+
function aliasMethod(methodName) {
return new Alias(methodName);
}
// ..........................................................
@@ -13981,10 +14000,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];
}
@@ -14038,14 +14058,15 @@
@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];
- Ember['default'].assert("Immediate observers must observe internal properties only, not properties on other objects.", typeof arg !== "string" || arg.indexOf(".") === -1);
+ Ember['default'].assert("Immediate observers must observe internal properties only, not properties on other objects.", typeof arg !== "string" || arg.indexOf('.') === -1);
}
return observer.apply(this, arguments);
}
@@ -14089,10 +14110,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];
}
@@ -14143,12 +14165,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;
}
@@ -14162,10 +14184,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;
@@ -14181,10 +14204,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;
@@ -14196,10 +14220,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;
@@ -14238,10 +14263,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;
@@ -14352,11 +14378,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);
@@ -14384,24 +14412,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
@@ -14410,11 +14425,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
@@ -14453,17 +14468,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();
@@ -14614,14 +14629,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;
@@ -14672,11 +14687,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];
};
}
/**
@@ -14722,19 +14737,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);
@@ -14830,15 +14846,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;
}
@@ -14869,26 +14885,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);
@@ -14973,11 +14989,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;
}
@@ -14985,11 +15001,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 = [];
@@ -15003,11 +15019,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 : [];
@@ -15074,11 +15090,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);
@@ -15090,11 +15106,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 {
@@ -15143,17 +15159,18 @@
@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;
}
Ember['default'].assert("Cannot call get with " + keyName + " key.", !!keyName);
@@ -15161,13 +15178,13 @@
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);
}
@@ -15180,11 +15197,11 @@
ret = meta.values[keyName];
} 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;
}
@@ -15201,17 +15218,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);
}
@@ -15235,10 +15253,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);
@@ -15279,11 +15298,11 @@
exports.set = set;
exports.trySet = trySet;
function set(obj, keyName, value, tolerant) {
- if (typeof obj === "string") {
+ if (typeof obj === 'string') {
Ember['default'].assert("Path '" + obj + "' must be global if no obj is given.", path_cache.isGlobalPath(obj));
value = keyName;
keyName = obj;
obj = Ember['default'].lookup;
}
@@ -15294,37 +15313,37 @@
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);
}
Ember['default'].assert("You need to provide an object and key to `set`.", !!obj && keyName !== undefined);
- Ember['default'].assert("calling set on destroyed object", !obj.isDestroyed);
+ Ember['default'].assert('calling set on destroyed object', !obj.isDestroyed);
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) {
if (define_property.hasPropertyAccessors) {
@@ -15339,12 +15358,12 @@
if (define_property.hasPropertyAccessors) {
if (currentValue === undefined && !(keyName in obj) || !Object.prototype.propertyIsEnumerable.call(obj, keyName)) {
properties.defineProperty(obj, keyName, null, value); // setup mandatory setter
} else {
- meta.values[keyName] = value;
- }
+ meta.values[keyName] = value;
+ }
} else {
obj[keyName] = value;
}
property_events.propertyDidChange(obj, keyName);
}
@@ -15357,30 +15376,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);
}
@@ -15396,10 +15415,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);
}
});
@@ -15655,11 +15675,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
@@ -15717,11 +15737,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
@@ -15734,15 +15754,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);
};
/**
@@ -15794,11 +15815,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);
};
/**
@@ -16054,11 +16075,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';
@@ -16247,11 +16267,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;
@@ -16278,14 +16298,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.
//
@@ -16303,12 +16323,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) {
@@ -16362,12 +16382,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();
}
@@ -16426,20 +16446,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);
@@ -16450,11 +16470,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,
@@ -16499,10 +16519,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);
}
}
@@ -16516,10 +16537,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);
}
}
@@ -16532,10 +16554,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;
@@ -16552,10 +16575,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]);
@@ -16574,10 +16598,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]);
}
@@ -16592,10 +16617,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++) {
@@ -16616,10 +16642,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])) {
@@ -16642,10 +16669,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) {
@@ -16694,10 +16722,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;
@@ -16725,32 +16754,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;
}
/**
@@ -16759,11 +16778,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 = {};
@@ -16829,11 +16848,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,
@@ -16860,21 +16879,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) {
@@ -16909,10 +16928,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)";
@@ -16925,42 +16945,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) {
@@ -17047,11 +17067,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);
@@ -17064,11 +17084,11 @@
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;
@@ -17079,14 +17099,15 @@
if (define_property.hasPropertyAccessors) {
ret.values = o_create['default'](ret.values);
}
- obj["__ember_meta__"] = ret;
+ obj['__ember_meta__'] = ret;
}
return ret;
}
+
function getMeta(obj, property) {
var _meta = meta(obj, false);
return _meta[property];
}
@@ -17127,10 +17148,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) {
Ember['default'].deprecate("Ember.metaPath is deprecated and will be removed from future releases.");
var _meta = meta(obj, writable);
var keyName, value;
@@ -17167,10 +17189,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;
@@ -17236,13 +17259,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;
@@ -17253,14 +17276,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;
}
@@ -17284,10 +17307,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];
@@ -17309,11 +17333,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.
@@ -17331,10 +17355,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);
}
}
@@ -17344,11 +17369,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;
@@ -17583,29 +17608,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;
}
@@ -17621,32 +17646,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);
}
}
@@ -17659,10 +17685,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);
}
@@ -17685,10 +17712,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]();
}
@@ -17728,11 +17756,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;
@@ -17740,16 +17768,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);
}
if (define_property.hasPropertyAccessors) {
@@ -17764,13 +17792,13 @@
var handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) {
var descriptor = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, keyName);
var configurable = descriptor ? descriptor.configurable : true;
var isWritable = descriptor ? descriptor.writable : true;
- var hasValue = descriptor ? "value" in descriptor : true;
+ var hasValue = descriptor ? 'value' in descriptor : true;
var possibleDesc = descriptor && descriptor.value;
- var isDescriptor = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor;
+ var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
if (isDescriptor) {
return;
}
@@ -17797,16 +17825,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);
}
if (!desc && define_property.hasPropertyAccessors && keyName in obj) {
@@ -17848,13 +17876,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;
@@ -17890,11 +17919,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);
@@ -17902,18 +17931,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);
@@ -17931,16 +17961,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
@@ -17978,16 +18009,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) {
@@ -18028,11 +18059,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;
@@ -18072,27 +18103,27 @@
var actionName;
if (ember_metal__streams__utils.isStream(actionNameOrStream)) {
actionName = actionNameOrStream.value();
- Ember['default'].assert("You specified a quoteless path to the {{action}} helper " + "which did not resolve to an action name (a string). " + "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", typeof actionName === "string");
+ Ember['default'].assert("You specified a quoteless path to the {{action}} helper " + "which did not resolve to an action name (a string). " + "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", typeof actionName === 'string');
} else {
actionName = actionNameOrStream;
}
run['default'](function runRegisteredAction() {
if (target.send) {
target.send.apply(target, actionArgs(parameters, actionName));
} else {
- Ember['default'].assert("The action '" + actionName + "' did not exist on " + target, typeof target[actionName] === "function");
+ Ember['default'].assert("The action '" + actionName + "' did not exist on " + target, typeof target[actionName] === 'function');
target[actionName].apply(target, actionArgs(parameters));
}
});
}
};
- options.view.on("willClearRender", function () {
+ options.view.on('willClearRender', function () {
delete ActionManager['default'].registeredActions[actionId];
});
return actionId;
};
@@ -18258,15 +18289,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);
}
@@ -18283,11 +18315,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;
});
@@ -18337,23 +18369,23 @@
if (utils.isStream(params[i])) {
var lazyValue = params[i];
if (!lazyValue._isController) {
while (ControllerMixin['default'].detect(lazyValue.value())) {
- Ember['default'].deprecate("Providing `{{link-to}}` with a param that is wrapped in a controller is deprecated. Please update `" + view + "` to use `{{link-to \"post\" someController.model}}` instead.");
+ Ember['default'].deprecate('Providing `{{link-to}}` with a param that is wrapped in a controller is deprecated. Please update `' + view + '` to use `{{link-to "post" someController.model}}` instead.');
- 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);
}
/**
@@ -18367,11 +18399,11 @@
@return {String} HTML string
*/
function deprecatedLinkToHelper(params, hash, options, env) {
Ember['default'].deprecate("The 'linkTo' view helper is deprecated in favor of 'link-to'");
- 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) {
@@ -18383,26 +18415,26 @@
var viewName;
var viewClass;
var viewFullName;
var view = env.data.view;
- Ember['default'].assert("Using {{outlet}} with an unquoted name is not supported.", params.length === 0 || typeof params[0] === "string");
+ Ember['default'].assert("Using {{outlet}} with an unquoted name is not supported.", params.length === 0 || typeof params[0] === 'string');
- var property = params[0] || "main";
+ var property = params[0] || 'main';
// provide controller override
viewName = hash.view;
if (viewName) {
- viewFullName = "view:" + viewName;
- Ember['default'].assert("Using a quoteless view parameter with {{outlet}} is not supported." + " Please update to quoted usage '{{outlet ... view=\"" + viewName + "\"}}.", typeof hash.view === "string");
+ viewFullName = 'view:' + viewName;
+ Ember['default'].assert("Using a quoteless view parameter with {{outlet}} is not supported." + " Please update to quoted usage '{{outlet ... view=\"" + viewName + "\"}}.", typeof hash.view === 'string');
Ember['default'].assert("The view name you supplied '" + viewName + "' did not resolve to a view.", view.container._registry.has(viewFullName));
}
- 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) {
@@ -18432,13 +18464,13 @@
var name = params[0];
var context = params[1];
container = currentView._keywords.controller.value().container;
- router = container.lookup("router:main");
+ router = container.lookup('router:main');
- Ember['default'].assert("The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === "string");
+ Ember['default'].assert("The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === 'string');
Ember['default'].assert("The second argument of {{render}} must be a path, e.g. {{render \"post\" post}}.", params.length < 2 || utils.isStream(params[1]));
if (params.length === 1) {
// use the singleton controller
@@ -18449,39 +18481,39 @@
} 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;
Ember['default'].assert("You used `{{render '" + name + "'}}`, but '" + name + "' can not be " + "found as either a template or a view.", container._registry.has("view:" + name) || container._registry.has(templateName) || !!options.template);
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;
Ember['default'].assert("The controller name you supplied '" + controllerName + "' " + "did not resolve to a controller.", container._registry.has(controllerFullName));
} else {
controllerName = name;
- controllerFullName = "controller:" + controllerName;
+ controllerFullName = 'controller:' + controllerName;
}
var parentController = currentView._keywords.controller.value();
// choose name
@@ -18492,11 +18524,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);
@@ -18513,11 +18545,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);
@@ -18526,11 +18558,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;
@@ -18539,11 +18571,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 {
@@ -18612,13 +18644,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
@@ -18632,11 +18664,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
*/
@@ -18644,11 +18676,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
@@ -18682,29 +18714,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.
@@ -18720,11 +18752,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
@@ -18741,11 +18773,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.
/**
@@ -18775,14 +18807,14 @@
@method init
*/
init: function () {
this._super.apply(this, arguments);
- Ember['default'].deprecate("Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.", !this.currentWhen);
+ Ember['default'].deprecate('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.', !this.currentWhen);
// 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
@@ -18790,11 +18822,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
@@ -18838,14 +18870,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`
@@ -18855,20 +18887,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) {
@@ -18876,26 +18908,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.
@@ -18903,25 +18935,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.
@@ -18933,40 +18965,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;
@@ -18978,11 +19010,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
@@ -18994,19 +19026,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);
@@ -19025,19 +19057,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]));
@@ -19060,17 +19092,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;
}
@@ -19091,20 +19123,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);
@@ -19119,11 +19151,11 @@
Only applies when tagName is 'a'
@property loadingHref
@type String
@default #
*/
- loadingHref: "#"
+ loadingHref: '#'
});
LinkView.toString = function () {
return "LinkView";
};
@@ -19148,38 +19180,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);
@@ -19228,11 +19260,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]);
@@ -19264,11 +19296,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, []);
}
@@ -19278,33 +19310,33 @@
_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) {
- Ember.Logger.info("Rendering " + render.name + " with " + (render.isDefaultView ? "default view " : "") + view, { fullName: "view:" + render.name });
+ Ember.Logger.info("Rendering " + render.name + " with " + (render.isDefaultView ? "default view " : "") + view, { fullName: 'view:' + render.name });
}
return view;
}
});
@@ -19325,11 +19357,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;
@@ -19372,11 +19404,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);
},
@@ -19402,14 +19434,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 = {};
@@ -19426,25 +19458,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
@@ -19461,11 +19493,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];
@@ -19485,11 +19517,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
@@ -19515,11 +19547,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:
@@ -19576,11 +19608,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);
},
/**
@@ -19637,11 +19669,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);
},
/**
@@ -19658,11 +19690,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;
}
@@ -19670,28 +19702,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'];
@@ -19751,11 +19783,11 @@
@param {Object} implementation of the `location` API
@deprecated Register your custom location implementation with the
container directly.
*/
registerImplementation: function (name, implementation) {
- Ember['default'].deprecate("Using the Ember.Location.registerImplementation is no longer supported." + " Register your custom location implementation with the container instead.");
+ Ember['default'].deprecate('Using the Ember.Location.registerImplementation is no longer supported.' + ' Register your custom location implementation with the container instead.');
this.implementations[name] = implementation;
},
implementations: {},
@@ -19836,21 +19868,21 @@
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.
*/
detect: function () {
var rootURL = this.rootURL;
- Ember['default'].assert("rootURL must end with a trailing forward slash e.g. \"/app/\"", rootURL.charAt(rootURL.length - 1) === "/");
+ Ember['default'].assert('rootURL must end with a trailing forward slash e.g. "/app/"', rootURL.charAt(rootURL.length - 1) === '/');
var implementation = detectImplementation({
location: this.location,
history: this.history,
userAgent: this.userAgent,
@@ -19858,46 +19890,47 @@
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);
Ember['default'].assert("Could not find location '" + implementation + "'.", !!concrete);
- 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');
+ Ember['default'].assert("AutoLocation's detect() method should be called before calling any other hooks.", !!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");
- Ember['default'].assert("AutoLocation's detect() method should be called before calling any other hooks.", !!concreteImplementation);
return utils.tryInvoke(concreteImplementation, methodName, args);
};
}
/**
@@ -19920,25 +19953,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);
}
}
@@ -19946,12 +19979,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);
@@ -19970,39 +20003,40 @@
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);
var routeHash, hashParts;
- Ember['default'].assert("Path " + path + " does not start with the provided rootURL " + rootURL, rootURLIndex === 0);
+ Ember['default'].assert('Path ' + path + ' does not start with the provided rootURL ' + rootURL, rootURLIndex === 0);
// 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;
}
@@ -20015,21 +20049,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;
}
@@ -20037,14 +20072,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
@@ -20063,19 +20098,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;
},
@@ -20087,24 +20122,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
@@ -20115,18 +20150,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);
});
});
},
@@ -20139,22 +20174,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) {
@@ -20170,27 +20205,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()));
},
@@ -20198,29 +20233,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;
@@ -20266,11 +20301,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;
},
@@ -20281,11 +20316,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();
@@ -20297,11 +20332,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();
@@ -20316,11 +20351,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;
@@ -20336,18 +20371,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;
},
@@ -20357,11 +20392,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
@@ -20374,32 +20409,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
@@ -20417,11 +20452,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
@@ -20468,10 +20503,11 @@
/**
@private
Returns the current `location.search`.
*/
+
function getQuery(location) {
return location.search;
}
/**
@@ -20482,10 +20518,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) {
@@ -20521,10 +20558,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);
}
/*
@@ -20534,10 +20572,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 :(
@@ -20555,10 +20594,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);
}
});
@@ -20631,63 +20671,63 @@
}
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';
Ember['default'].assert("'" + name + "' cannot be used as a " + type + " name.", (function () {
if (options.overrideNameAssertion === true) {
return true;
}
- return array.indexOf.call(["array", "basic", "object", "application"], name) === -1;
+ return array.indexOf.call(['array', 'basic', 'object', 'application'], name) === -1;
})());
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) {
@@ -20713,11 +20753,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;
@@ -20729,11 +20769,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);
}
@@ -20754,27 +20794,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;
}
@@ -20792,14 +20832,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')) {
Ember['default'].Logger.info("generated -> " + fullName, { fullName: fullName });
}
return instance;
}
@@ -20884,19 +20924,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) {
@@ -20912,11 +20952,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,
@@ -20971,22 +21011,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;
}
},
@@ -21020,20 +21060,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 {};
}
@@ -21065,14 +21105,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
@@ -21085,15 +21125,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;
},
@@ -21109,11 +21149,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.
@@ -21139,11 +21179,11 @@
@private
@method exit
*/
exit: function () {
this.deactivate();
- this.trigger("deactivate");
+ this.trigger('deactivate');
this.teardownViews();
},
/**
@private
@@ -21151,11 +21191,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);
},
/**
@@ -21163,11 +21203,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
@@ -21405,25 +21445,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) {
@@ -21461,17 +21501,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;
@@ -21493,17 +21533,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;
}
},
@@ -21793,11 +21833,11 @@
if (this.setupControllers) {
Ember['default'].deprecate("Ember.Route.setupControllers is deprecated. Please use Ember.Route.setupController(controller, model) instead.");
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);
@@ -22002,14 +22042,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];
@@ -22049,11 +22089,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.
@@ -22065,23 +22105,23 @@
@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);
Ember['default'].assert("You used the dynamic segment " + name + "_id in your route " + routeName + ", but " + namespace + "." + string.classify(name) + " did not exist and you did not override your route's `model` " + "hook.", !!modelClass);
if (!modelClass) {
return;
}
- Ember['default'].assert(string.classify(name) + " has no method `find`.", typeof modelClass.find === "function");
+ Ember['default'].assert(string.classify(name) + ' has no method `find`.', typeof modelClass.find === 'function');
return modelClass.find(value);
}
};
}),
@@ -22193,11 +22233,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.
@@ -22215,18 +22255,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.
Ember['default'].assert("The controller named '" + name + "' could not be found. Make sure " + "that this route exists and has already been entered at least " + "once. If you are accessing a controller not associated with a " + "route, make sure the controller class is explicitly defined.", controller || _skipAssert === true);
@@ -22283,11 +22323,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) {
@@ -22429,24 +22469,24 @@
Defaults to the return value of the Route's model hook
*/
render: function (_name, options) {
Ember['default'].assert("The name in the given arguments is undefined", arguments.length > 0 ? !isNone['default'](arguments[0]) : true);
- 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`:
@@ -22489,12 +22529,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
@@ -22520,11 +22560,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 () {
@@ -22536,11 +22576,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 = {
@@ -22573,49 +22613,49 @@
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) {
Ember['default'].assert("Could not find \"" + name + "\" template or view.", isDefaultRender);
if (LOG_VIEW_LOOKUPS) {
- Ember['default'].Logger.info("Could not find \"" + name + "\" template or view. Nothing will be rendered", { fullName: "template:" + name });
+ Ember['default'].Logger.info("Could not find \"" + name + "\" template or view. Nothing will be rendered", { fullName: 'template:' + name });
}
}
var parent;
if (into && (parent = parentRoute(route)) && into === parentRoute(route).routeName) {
@@ -22658,11 +22698,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];
@@ -22713,19 +22753,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;
@@ -22736,20 +22776,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());
},
@@ -22764,11 +22804,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.
@@ -22776,15 +22816,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;
}
@@ -22794,16 +22834,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);
@@ -22825,18 +22865,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 () {
@@ -22854,23 +22894,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);
},
@@ -22881,42 +22921,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 = {};
}
@@ -22930,17 +22971,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;
@@ -23020,68 +23061,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;
}
@@ -23090,11 +23131,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')) {
Ember['default'].Logger.info("generated -> " + routeName, { fullName: routeName });
}
}
handler.routeName = name;
@@ -23221,11 +23262,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;
}
@@ -23263,11 +23304,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;
@@ -23276,22 +23317,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,
@@ -23300,17 +23341,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);
@@ -23362,35 +23403,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;
}
@@ -23401,22 +23442,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;
}
@@ -23441,16 +23482,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;
}
@@ -23461,11 +23502,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();
@@ -23517,11 +23558,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.
@@ -23529,21 +23570,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,
@@ -23616,27 +23657,27 @@
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;
}
Ember['default'].assert("The URL '" + error.message + "' did not match any routes in your application", error.name !== "UnrecognizedURLError");
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);
@@ -23704,17 +23745,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`.
Ember['default'].assert("You attempted to render into '" + into + "' but it was not found", liveRoutes.outlets.__ember_orphans__.outlets[into].wasUsed);
});
}
@@ -23732,11 +23773,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;
}
@@ -25074,10 +25115,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);
@@ -25128,10 +25170,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) {
@@ -25175,10 +25218,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) {
@@ -25224,10 +25268,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) {
@@ -25273,10 +25318,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);
@@ -25318,10 +25364,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);
@@ -25391,10 +25438,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) {
@@ -25551,10 +25599,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.');
}
@@ -25693,10 +25742,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) {
Ember['default'].assert('Ember.computed.sort requires two arguments: an array key to sort and ' + 'either a sort properties key or sort function', arguments.length === 2);
if (typeof sortDefinition === 'function') {
return customSort(itemsKey, sortDefinition);
@@ -26042,11 +26092,11 @@
'use strict';
var Controller = EmberObject['default'].extend(Mixin['default']);
function controllerInjectionHelper(factory) {
- Ember['default'].assert('Defining an injected controller property on a ' + 'non-controller is not allowed.', Mixin['default'].detect(factory.PrototypeMixin));
+ Ember['default'].assert("Defining an injected controller property on a " + "non-controller is not allowed.", Mixin['default'].detect(factory.PrototypeMixin));
}
/**
Creates a property that lazily looks up another controller in the container.
Can only be used when defining another controller.
@@ -26436,10 +26486,11 @@
RSVP.Promise.prototype.fail = function (callback, label) {
Ember['default'].deprecate('RSVP.Promise.fail has been renamed as RSVP.Promise.catch');
return this['catch'](callback, label);
};
+
function onerrorDefault(e) {
var error;
if (e && e.errorThrown) {
// jqXHR provides this
@@ -26598,10 +26649,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);
@@ -26616,10 +26668,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;
@@ -26632,11 +26685,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);
}
}
}
@@ -26684,34 +26737,34 @@
@property content
@type Ember.Object
@default null
*/
content: null,
- _contentDidChange: mixin.observer("content", function () {
- Ember['default'].assert("Can't set Proxy's content to itself", property_get.get(this, "content") !== this);
+ _contentDidChange: mixin.observer('content', function () {
+ Ember['default'].assert("Can't set Proxy's content to itself", property_get.get(this, 'content') !== this);
}),
- 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) {
- Ember['default'].deprecate(string.fmt("You attempted to access `%@` from `%@`, but object proxying is deprecated. " + "Please use `model.%@` instead.", [key, this, key]), !this.isController, { url: "http://emberjs.com/guides/deprecations/#toc_objectcontroller" });
+ Ember['default'].deprecate(string.fmt('You attempted to access `%@` from `%@`, but object proxying is deprecated. ' + 'Please use `model.%@` instead.', [key, this, key]), !this.isController, { url: 'http://emberjs.com/guides/deprecations/#toc_objectcontroller' });
return property_get.get(content, key);
}
},
setUnknownProperty: function (key, value) {
@@ -26721,14 +26774,14 @@
// 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');
Ember['default'].assert(string.fmt("Cannot delegate set('%@', %@) to the 'content' property of" + " object proxy %@: its 'content' is undefined.", [key, value, this]), content);
- Ember['default'].deprecate(string.fmt("You attempted to set `%@` from `%@`, but object proxying is deprecated. " + "Please use `model.%@` instead.", [key, this, key]), !this.isController, { url: "http://emberjs.com/guides/deprecations/#toc_objectcontroller" });
+ Ember['default'].deprecate(string.fmt('You attempted to set `%@` from `%@`, but object proxying is deprecated. ' + 'Please use `model.%@` instead.', [key, this, key]), !this.isController, { url: 'http://emberjs.com/guides/deprecations/#toc_objectcontroller' });
return property_set.set(content, key, value);
}
});
@@ -26740,11 +26793,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
@@ -26853,17 +26906,17 @@
*/
willMergeMixin: function (props) {
var hashName;
if (!props._actions) {
- Ember.assert("'actions' should not be a function", typeof props.actions !== "function");
+ Ember.assert("'actions' should not be a function", typeof props.actions !== 'function');
- if (utils.typeOf(props.actions) === "object") {
- hashName = "actions";
- } else if (utils.typeOf(props.events) === "object") {
- Ember.deprecate("Action handlers contained in an `events` object are deprecated in favor" + " of putting them in an `actions` object");
- hashName = "events";
+ if (utils.typeOf(props.actions) === 'object') {
+ hashName = 'actions';
+ } else if (utils.typeOf(props.events) === 'object') {
+ Ember.deprecate('Action handlers contained in an `events` object are deprecated in favor' + ' of putting them in an `actions` object');
+ hashName = 'events';
}
if (hashName) {
props._actions = merge['default'](props._actions || {}, props[hashName]);
}
@@ -26909,13 +26962,15 @@
if (!shouldBubble) {
return;
}
}
- if (target = property_get.get(this, "target")) {
- Ember.assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === "function");
- target.send.apply(target, arguments);
+ if (target = property_get.get(this, 'target')) {
+ var _target;
+
+ Ember.assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === 'function');
+ (_target = target).send.apply(_target, arguments);
}
}
});
exports['default'] = ActionHandler;
@@ -27461,11 +27516,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) {
@@ -27530,11 +27585,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]));
}
}
});
@@ -27553,11 +27608,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);
@@ -27574,11 +27629,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 {
@@ -27589,17 +27644,17 @@
/**
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 () {
- Ember['default'].deprecate("Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.", this._suppressDeferredDeprecation, { url: "http://emberjs.com/guides/deprecations/#toc_ember-deferredmixin-and-ember-deferred" });
+ Ember['default'].deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation, { url: 'http://emberjs.com/guides/deprecations/#toc_ember-deferredmixin-and-ember-deferred' });
- 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) {
@@ -28775,15 +28830,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;
}
});
@@ -28802,31 +28857,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
@@ -28852,11 +28887,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);
@@ -28875,11 +28910,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;
@@ -28900,13 +28935,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) {
@@ -28930,11 +28965,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
@@ -28949,11 +28984,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
@@ -28965,11 +29000,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);
@@ -28987,11 +29022,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);
@@ -29037,11 +29072,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();
@@ -29065,11 +29100,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;
},
// ..........................................................
@@ -29087,11 +29122,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);
@@ -29395,11 +29430,11 @@
this.propertyDidChange(keyName);
return this;
},
addBeforeObserver: function (key, target, method) {
- Ember['default'].deprecate("Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.", false, { url: "http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers" });
+ Ember['default'].deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers' });
observer.addBeforeObserver(this, key, target, method);
},
/**
Adds an observer on a property.
@@ -29462,11 +29497,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`.
@@ -29667,18 +29702,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
@@ -29718,37 +29753,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);
};
}
});
@@ -29800,13 +29835,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');
Ember['default'].assert("you need to define `sortProperties`", !!sortProperties);
enumerable_utils.forEach(sortProperties, function (propertyName) {
if (result === 0) {
@@ -29819,138 +29854,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);
@@ -29966,11 +30001,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);
@@ -29998,11 +30033,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);
@@ -30010,25 +30045,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
@@ -30074,12 +30109,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) {
@@ -30087,21 +30122,21 @@
}
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;
if (target.send) {
ret = target.send.apply(target, args(actionContext, action));
} else {
- Ember['default'].assert("The action '" + action + "' did not exist on " + target, typeof target[action] === "function");
+ Ember['default'].assert("The action '" + action + "' did not exist on " + target, typeof target[action] === 'function');
ret = target[action].apply(target, args(actionContext));
}
if (ret !== false) {
ret = true;
@@ -30187,11 +30222,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.
@@ -30199,11 +30234,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
@@ -30215,30 +30250,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'
});
}
},
/**
@@ -30264,133 +30299,133 @@
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');
Ember['default'].assert("Can't set ArrayProxy's content to itself", content !== this);
this._setupContent();
}),
_setupContent: function () {
- var content = property_get.get(this, "content");
+ var content = property_get.get(this, 'content');
if (content) {
- Ember['default'].assert(string.fmt("ArrayProxy expects an Array or " + "Ember.ArrayProxy, but you passed %@", [typeof content]), utils.isArray(content) || content.isDestroyed);
+ Ember['default'].assert(string.fmt('ArrayProxy expects an Array or ' + 'Ember.ArrayProxy, but you passed %@', [typeof content]), utils.isArray(content) || content.isDestroyed);
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;
Ember['default'].assert("Can't set ArrayProxy's content to itself", arrangedContent !== this);
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) {
- Ember['default'].assert(string.fmt("ArrayProxy expects an Array or " + "Ember.ArrayProxy, but you passed %@", [typeof arrangedContent]), utils.isArray(arrangedContent) || arrangedContent.isDestroyed);
+ Ember['default'].assert(string.fmt('ArrayProxy expects an Array or ' + 'Ember.ArrayProxy, but you passed %@', [typeof arrangedContent]), utils.isArray(arrangedContent) || arrangedContent.isDestroyed);
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");
- Ember['default'].assert("The content property of " + this.constructor + " should be set before modifying it", content);
+ var content = property_get.get(this, 'content');
+ Ember['default'].assert('The content property of ' + this.constructor + ' should be set before modifying it', 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;
@@ -30416,28 +30451,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) {
@@ -30542,11 +30577,11 @@
for (var i = 0, l = props.length; i < l; i++) {
var properties = props[i];
Ember['default'].assert("Ember.Object.create no longer supports mixing in other definitions, use createWithMixins instead.", !(properties instanceof mixin.Mixin));
- 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;
@@ -30560,28 +30595,28 @@
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;
Ember['default'].assert("Ember.Object.create no longer supports defining computed properties. Define computed properties using extend() or reopen() before calling create().", !(value instanceof computed.ComputedProperty));
- Ember['default'].assert("Ember.Object.create no longer supports defining methods that call _super.", !(typeof value === "function" && value.toString().indexOf("._super") !== -1));
- Ember['default'].assert("`actions` must be provided at extend time, not at create " + "time, when Ember.ActionHandler is used (i.e. views, " + "controllers & routes).", !(keyName === "actions" && ActionHandler['default'].detect(this)));
+ Ember['default'].assert("Ember.Object.create no longer supports defining methods that call _super.", !(typeof value === 'function' && value.toString().indexOf('._super') !== -1));
+ Ember['default'].assert("`actions` must be provided at extend time, not at create " + "time, when Ember.ActionHandler is used (i.e. views, " + "controllers & routes).", !(keyName === 'actions' && ActionHandler['default'].detect(this)));
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 {
@@ -30596,19 +30631,19 @@
}
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 {
if (define_property.hasPropertyAccessors) {
ember_metal__properties.defineProperty(this, keyName, null, value); // setup mandatory setter
} else {
- this[keyName] = value;
- }
+ this[keyName] = value;
+ }
}
}
}
}
}
@@ -30631,11 +30666,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) {
@@ -30802,12 +30837,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.
@@ -30866,13 +30901,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;
}
});
@@ -30989,15 +31024,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();
},
@@ -31030,15 +31066,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();
},
@@ -31120,11 +31157,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;
@@ -31161,11 +31198,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;
Ember['default'].assert("metaForProperty() could not find a computed property with key '" + key + "'.", !!desc && desc instanceof computed.ComputedProperty);
return desc._meta || {};
},
@@ -31198,11 +31235,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);
@@ -31236,11 +31273,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;
};
@@ -31275,11 +31312,11 @@
'use strict';
var Deferred = EmberObject['default'].extend(DeferredMixin['default'], {
init: function () {
- Ember['default'].deprecate("Usage of Ember.Deferred is deprecated.", false, { url: "http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred" });
+ Ember['default'].deprecate('Usage of Ember.Deferred is deprecated.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' });
this._super.apply(this, arguments);
}
});
Deferred.reopenClass({
@@ -31316,11 +31353,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)$/;
@@ -31333,13 +31370,13 @@
}
while (--loc >= idx) {
var item = content.objectAt(loc);
if (item) {
- Ember['default'].assert("When using @each to observe the array " + content + ", the array must return an object", utils.typeOf(item) === "instance" || utils.typeOf(item) === "object");
- observer.addBeforeObserver(item, keyName, proxy, "contentKeyWillChange");
- observer.addObserver(item, keyName, proxy, "contentKeyDidChange");
+ Ember['default'].assert('When using @each to observe the array ' + content + ', the array must return an object', utils.typeOf(item) === 'instance' || utils.typeOf(item) === 'object');
+ 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]) {
@@ -31360,12 +31397,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;
}
@@ -31426,11 +31463,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;
@@ -31448,11 +31485,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
@@ -31481,11 +31518,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]++;
}
@@ -31493,11 +31530,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);
}
},
@@ -31540,10 +31577,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);
@@ -31560,14 +31598,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]) {
@@ -31595,11 +31634,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();
@@ -31642,11 +31681,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;
@@ -31662,24 +31701,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
}
@@ -31687,11 +31726,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;
@@ -31718,11 +31759,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]) {
@@ -31789,12 +31830,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';
@@ -31806,13 +31845,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);
}
},
@@ -31829,11 +31868,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 {
@@ -31868,11 +31907,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);
}
});
@@ -32028,31 +32067,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;
},
@@ -32073,12 +32112,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])) {
@@ -32104,11 +32143,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()`.
@@ -32120,11 +32159,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"]);
@@ -32134,11 +32173,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);
@@ -32156,11 +32195,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
@@ -32170,11 +32209,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()`
@@ -32185,11 +32224,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
@@ -32198,11 +32237,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
@@ -32211,18 +32250,18 @@
```
@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
//
init: function (items) {
- Ember['default'].deprecate("Ember.Set is deprecated and will be removed in a future release.");
+ Ember['default'].deprecate('Ember.Set is deprecated and will be removed in a future release.');
this._super.apply(this, arguments);
if (items) {
this.addObjects(items);
}
@@ -32243,69 +32282,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];
@@ -32313,17 +32352,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;
@@ -32335,13 +32374,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;
@@ -32353,11 +32392,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) {
@@ -32379,16 +32418,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();
});
});
@@ -32403,19 +32442,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;
@@ -32435,11 +32474,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) {
@@ -32648,12 +32687,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;
}
@@ -32821,13 +32860,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
@@ -32842,11 +32881,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 = [];
@@ -32864,11 +32903,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);
@@ -33149,12 +33188,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'];
@@ -33215,10 +33254,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.');
}
@@ -33345,11 +33385,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.');
}
Ember.deprecate("Using {{with}} without block syntax is deprecated. " + "Please use standard block form (`{{#with foo as |bar|}}`) " + (moduleName ? " in `" + moduleName + "` " : "") + "instead.", false, { url: "http://emberjs.com/deprecations/v1.x/#toc_code-as-code-sytnax-for-code-with-code" });
var removedParams = node.sexpr.params.splice(1, 2);
@@ -33360,38 +33400,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);
@@ -33416,11 +33446,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;
}
@@ -33467,26 +33497,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-testing', ['ember-metal/core', 'ember-testing/initializers', 'ember-testing/support', 'ember-testing/setup_for_testing', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-testing/helpers'], function (Ember, __dep1__, __dep2__, setupForTesting, Test, Adapter, QUnitAdapter) {
'use strict';
@@ -33578,99 +33607,99 @@
var helper = Test['default'].registerHelper;
var asyncHelper = Test['default'].registerAsyncHelper;
function currentRouteName(app) {
- var appController = app.__container__.lookup("controller:application");
+ var appController = app.__container__.lookup('controller:application');
- return property_get.get(appController, "currentRouteName");
+ return property_get.get(appController, 'currentRouteName');
}
function currentPath(app) {
- var appController = app.__container__.lookup("controller:application");
+ var appController = app.__container__.lookup('controller:application');
- return property_get.get(appController, "currentPath");
+ return property_get.get(appController, 'currentPath');
}
function currentURL(app) {
- var router = app.__container__.lookup("router:main");
+ var router = app.__container__.lookup('router:main');
- return property_get.get(router, "location").getURL();
+ return property_get.get(router, 'location').getURL();
}
function pauseTest() {
Test['default'].adapter.asyncStart();
- return new Ember['default'].RSVP.Promise(function () {}, "TestAdapter paused promise");
+ return new Ember['default'].RSVP.Promise(function () {}, 'TestAdapter paused promise');
}
function focus(el) {
- if (el && el.is(":input, [contenteditable=true]")) {
- var type = el.prop("type");
- if (type !== "checkbox" && type !== "radio" && type !== "hidden") {
+ if (el && el.is(':input, [contenteditable=true]')) {
+ var type = el.prop('type');
+ if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {
run['default'](el, function () {
// Firefox does not trigger the `focusin` event if the window
// does not have focus. If the document doesn't have focus just
// use trigger('focusin') instead.
if (!document.hasFocus || document.hasFocus()) {
this.focus();
} else {
- this.trigger("focusin");
+ this.trigger('focusin');
}
});
}
}
}
function visit(app, url) {
- var router = app.__container__.lookup("router:main");
+ var router = app.__container__.lookup('router:main');
app.boot().then(function () {
router.location.setURL(url);
});
if (app._readinessDeferrals > 0) {
- router["initialURL"] = url;
- run['default'](app, "advanceReadiness");
- delete router["initialURL"];
+ router['initialURL'] = url;
+ run['default'](app, 'advanceReadiness');
+ delete router['initialURL'];
} else {
- run['default'](app.__deprecatedInstance__, "handleURL", url);
+ run['default'](app.__deprecatedInstance__, 'handleURL', url);
}
return app.testHelpers.wait();
}
function click(app, selector, context) {
var $el = app.testHelpers.findWithAssert(selector, context);
- run['default']($el, "mousedown");
+ run['default']($el, 'mousedown');
focus($el);
- run['default']($el, "mouseup");
- run['default']($el, "click");
+ run['default']($el, 'mouseup');
+ run['default']($el, 'click');
return app.testHelpers.wait();
}
function check(app, selector, context) {
var $el = app.testHelpers.findWithAssert(selector, context);
- var type = $el.prop("type");
+ var type = $el.prop('type');
- Ember['default'].assert("To check '" + selector + "', the input must be a checkbox", type === "checkbox");
+ Ember['default'].assert('To check \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
- if (!$el.prop("checked")) {
+ if (!$el.prop('checked')) {
app.testHelpers.click(selector, context);
}
return app.testHelpers.wait();
}
function uncheck(app, selector, context) {
var $el = app.testHelpers.findWithAssert(selector, context);
- var type = $el.prop("type");
+ var type = $el.prop('type');
- Ember['default'].assert("To uncheck '" + selector + "', the input must be a checkbox", type === "checkbox");
+ Ember['default'].assert('To uncheck \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
- if ($el.prop("checked")) {
+ if ($el.prop('checked')) {
app.testHelpers.click(selector, context);
}
return app.testHelpers.wait();
}
@@ -33708,19 +33737,19 @@
var $el = app.testHelpers.findWithAssert(selector, context);
var event = jQuery['default'].Event(type, options);
- run['default']($el, "trigger", event);
+ run['default']($el, 'trigger', event);
return app.testHelpers.wait();
}
function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) {
var context, type;
- if (typeof keyCode === "undefined") {
+ if (typeof keyCode === 'undefined') {
context = null;
keyCode = typeOrKeyCode;
type = contextOrType;
} else {
context = contextOrType;
@@ -33730,11 +33759,11 @@
return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode });
}
function fillIn(app, selector, contextOrText, text) {
var $el, context;
- if (typeof text === "undefined") {
+ if (typeof text === 'undefined') {
text = contextOrText;
} else {
context = contextOrText;
}
$el = app.testHelpers.findWithAssert(selector, context);
@@ -33753,11 +33782,11 @@
return $el;
}
function find(app, selector, context) {
var $el;
- context = context || property_get.get(app, "rootElement");
+ context = context || property_get.get(app, 'rootElement');
$el = app.$(selector, context);
return $el;
}
@@ -33767,11 +33796,11 @@
function wait(app, value) {
return new RSVP['default'].Promise(function (resolve) {
// Every 10ms, poll for the async thing to have finished
var watcher = setInterval(function () {
- var router = app.__container__.lookup("router:main");
+ var router = app.__container__.lookup('router:main');
// 1. If the router is loading, keep polling
var routerIsLoading = router.router && !!router.router.activeTransition;
if (routerIsLoading) {
return;
@@ -33817,11 +33846,11 @@
*
* @method visit
* @param {String} url the name of the route
* @return {RSVP.Promise}
*/
- asyncHelper("visit", visit);
+ asyncHelper('visit', visit);
/**
* Clicks an element and triggers any actions triggered by the element's `click`
* event.
*
@@ -33835,11 +33864,11 @@
*
* @method click
* @param {String} selector jQuery selector for finding element on the DOM
* @return {RSVP.Promise}
*/
- asyncHelper("click", click);
+ asyncHelper('click', click);
/**
* Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
*
* Example:
@@ -33855,11 +33884,11 @@
* @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`
* @param {Number} keyCode the keyCode of the simulated key event
* @return {RSVP.Promise}
* @since 1.5.0
*/
- asyncHelper("keyEvent", keyEvent);
+ asyncHelper('keyEvent', keyEvent);
/**
* Fills in an input element with some text.
*
* Example:
@@ -33874,11 +33903,11 @@
* @param {String} selector jQuery selector finding an input element on the DOM
* to fill text with
* @param {String} text text to place inside the input element
* @return {RSVP.Promise}
*/
- asyncHelper("fillIn", fillIn);
+ asyncHelper('fillIn', fillIn);
/**
* Finds an element in the context of the app's container element. A simple alias
* for `app.$(selector)`.
*
@@ -33890,11 +33919,11 @@
*
* @method find
* @param {String} selector jQuery string selector for element lookup
* @return {Object} jQuery object representing the results of the query
*/
- helper("find", find);
+ helper('find', find);
/**
* Like `find`, but throws an error if the element selector returns no results.
*
* Example:
@@ -33907,11 +33936,11 @@
* @param {String} selector jQuery selector string for finding an element within
* the DOM
* @return {Object} jQuery object representing the results of the query
* @throws {Error} throws error if jQuery object returned has a length of 0
*/
- helper("findWithAssert", findWithAssert);
+ helper('findWithAssert', findWithAssert);
/**
Causes the run loop to process any pending events. This is used to ensure that
any async operations from other helpers (or your assertions) have been processed.
@@ -33932,12 +33961,12 @@
@method wait
@param {Object} value The value to be returned.
@return {RSVP.Promise}
*/
- asyncHelper("wait", wait);
- asyncHelper("andThen", andThen);
+ asyncHelper('wait', wait);
+ asyncHelper('andThen', andThen);
/**
Returns the currently active route name.
Example:
@@ -33952,11 +33981,11 @@
@method currentRouteName
@return {Object} The name of the currently active route.
@since 1.5.0
*/
- helper("currentRouteName", currentRouteName);
+ helper('currentRouteName', currentRouteName);
/**
Returns the current path.
Example:
@@ -33971,11 +34000,11 @@
@method currentPath
@return {Object} The currently active path.
@since 1.5.0
*/
- helper("currentPath", currentPath);
+ helper('currentPath', currentPath);
/**
Returns the current URL.
Example:
@@ -33990,11 +34019,11 @@
@method currentURL
@return {Object} The currently active URL.
@since 1.5.0
*/
- helper("currentURL", currentURL);
+ helper('currentURL', currentURL);
/**
Pauses the current test - this is useful for debugging while testing or for test-driving.
It allows you to inspect the state of your application at any point.
@@ -34009,11 +34038,11 @@
@since 1.9.0
@method pauseTest
@return {Object} A promise that will never resolve
*/
- helper("pauseTest", pauseTest);
+ helper('pauseTest', pauseTest);
/**
Triggers the given DOM event on the element identified by the provided selector.
Example:
@@ -34035,11 +34064,11 @@
@param {String} type The event type to be triggered.
@param {Object} [options] The options to be passed to jQuery.Event.
@return {RSVP.Promise}
@since 1.5.0
*/
- asyncHelper("triggerEvent", triggerEvent);
+ asyncHelper('triggerEvent', triggerEvent);
});
enifed('ember-testing/initializers', ['ember-runtime/system/lazy_load'], function (lazy_load) {
'use strict';
@@ -34094,11 +34123,11 @@
@namespace Ember
@since 1.5.0
*/
function setupForTesting() {
if (!Test) {
- Test = requireModule("ember-testing/test")["default"];
+ Test = requireModule('ember-testing/test')['default'];
}
Ember['default'].testing = true;
// if adapter is not manually set default to QUnit
@@ -34107,14 +34136,14 @@
}
requests = [];
Test.pendingAjaxRequests = requests.length;
- jQuery['default'](document).off("ajaxSend", incrementAjaxPendingRequests);
- jQuery['default'](document).off("ajaxComplete", decrementAjaxPendingRequests);
- jQuery['default'](document).on("ajaxSend", incrementAjaxPendingRequests);
- jQuery['default'](document).on("ajaxComplete", decrementAjaxPendingRequests);
+ jQuery['default'](document).off('ajaxSend', incrementAjaxPendingRequests);
+ jQuery['default'](document).off('ajaxComplete', decrementAjaxPendingRequests);
+ jQuery['default'](document).on('ajaxSend', incrementAjaxPendingRequests);
+ jQuery['default'](document).on('ajaxComplete', decrementAjaxPendingRequests);
}
});
enifed('ember-testing/support', ['ember-metal/core', 'ember-views/system/jquery', 'ember-metal/environment'], function (Ember, jQuery, environment) {
@@ -34129,11 +34158,11 @@
@private
@method testCheckboxClick
*/
function testCheckboxClick(handler) {
- $("<input type=\"checkbox\">").css({ position: "absolute", left: "-1000px", top: "-1000px" }).appendTo("body").on("click", handler).trigger("click").remove();
+ $('<input type="checkbox">').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove();
}
if (environment['default'].hasDOM) {
$(function () {
/*
@@ -34495,11 +34524,11 @@
setupForTesting['default']();
this.testing = true;
this.Router.reopen({
- location: "none"
+ location: 'none'
});
},
/**
This will be used as the container to inject the test helpers into. By
@@ -34703,17 +34732,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;
@@ -34741,20 +34770,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) {
@@ -34770,21 +34799,21 @@
// SafeString
if (value && value.toHTML) {
return true;
}
- if (name !== "style") {
+ if (name !== 'style') {
return true;
}
return !escaped;
})(this.attrName, value, this._morph.escaped));
};
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;
@@ -34829,15 +34858,15 @@
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 = '';
}
- Ember.assert(string.fmt("Attributes must be numbers, strings or booleans, not %@", [value]), value === null || value === undefined || utils.typeOf(value) === "number" || utils.typeOf(value) === "string" || utils.typeOf(value) === "boolean" || !!(value && value.toHTML));
+ Ember.assert(string.fmt("Attributes must be numbers, strings or booleans, not %@", [value]), value === null || value === undefined || utils.typeOf(value) === 'number' || utils.typeOf(value) === 'string' || utils.typeOf(value) === 'boolean' || !!(value && value.toHTML));
if (this.lastValue !== null || value !== null) {
this._deprecateEscapedStyle(value);
this._morph.setContent(value);
this.lastValue = value;
@@ -34892,11 +34921,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
@@ -34943,27 +34972,27 @@
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);
}
- Ember.assert("You cannot use class as an attributeBinding, use classNameBindings instead.", attrName !== "class");
+ Ember.assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attrName !== 'class');
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;
}
}
@@ -34987,11 +35016,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);
}
@@ -35013,19 +35042,19 @@
/**
@class ClassNamesSupport
@namespace Ember
*/
var ClassNamesSupport = mixin.Mixin.create({
- concatenatedProperties: ["classNames", "classNameBindings"],
+ concatenatedProperties: ['classNames', 'classNameBindings'],
init: function () {
this._super.apply(this, arguments);
- Ember['default'].assert("Only arrays are allowed for 'classNameBindings'", ember_metal__utils.typeOf(this.classNameBindings) === "array");
+ Ember['default'].assert("Only arrays are allowed for 'classNameBindings'", ember_metal__utils.typeOf(this.classNameBindings) === 'array');
this.classNameBindings = native_array.A(this.classNameBindings.slice());
- Ember['default'].assert("Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.", ember_metal__utils.typeOf(this.classNames) === "array");
+ Ember['default'].assert("Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.", ember_metal__utils.typeOf(this.classNames) === 'array');
this.classNames = native_array.A(this.classNames.slice());
},
/**
Standard CSS class names to apply to the view's outer element. This
@@ -35033,11 +35062,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.
@@ -35098,11 +35127,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.
@@ -35148,11 +35177,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;
}
});
@@ -35224,18 +35253,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;
@@ -35293,17 +35322,17 @@
@deprecated
*/
nearestChildOf: function (klass) {
Ember['default'].deprecate("nearestChildOf has been deprecated.");
- 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
@@ -35313,17 +35342,17 @@
@return Ember.View
@deprecated
*/
nearestInstanceOf: function (klass) {
Ember['default'].deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType.");
- 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;
@@ -35357,11 +35386,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);
@@ -35378,11 +35407,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);
}
/**
@@ -35402,11 +35431,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;
@@ -35422,11 +35451,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 () {
@@ -35454,11 +35483,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
@@ -35481,11 +35510,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);
},
@@ -35500,12 +35529,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`
@@ -35515,11 +35544,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
@@ -35529,11 +35558,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
@@ -35544,11 +35573,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
@@ -35558,11 +35587,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
@@ -35574,11 +35603,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
@@ -35588,38 +35617,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();
}
}
}
@@ -35639,11 +35668,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);
}
@@ -35695,18 +35724,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;
},
/**
@@ -35740,22 +35769,22 @@
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);
Ember['default'].assert("Could not find view: '" + fullName + "'", !!ViewKlass);
view = ViewKlass.create(attrs);
} else {
view = maybeViewClass;
- Ember['default'].assert("You must pass instance or subclass of View", view.isView);
+ Ember['default'].assert('You must pass instance or subclass of View', view.isView);
attrs.container = this.container;
setProperties['default'](view, attrs);
}
@@ -35786,14 +35815,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"](),
/**
@@ -35812,17 +35841,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;
@@ -35841,11 +35870,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;
}
@@ -35866,11 +35895,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;
@@ -35990,11 +36019,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;
},
@@ -36006,11 +36035,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);
}
}
});
@@ -36024,15 +36053,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) {
@@ -36066,20 +36095,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;
}
@@ -36103,41 +36132,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;
}
});
@@ -36152,11 +36181,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
@@ -36164,20 +36193,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
};
}
/**
@@ -36202,13 +36231,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) {
@@ -36221,33 +36251,33 @@
}
// 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 || "";
- Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", classNameBinding.indexOf(" ") === -1);
+ prefix = prefix || '';
+ Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", classNameBinding.indexOf(' ') === -1);
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);
@@ -36259,11 +36289,11 @@
enifed('ember-views/streams/context_stream', ['exports', 'ember-metal/core', 'ember-metal/merge', 'ember-metal/platform/create', 'ember-metal/path_cache', 'ember-metal/streams/stream', 'ember-metal/streams/simple'], function (exports, Ember, merge, create, path_cache, Stream, SimpleStream) {
'use strict';
function ContextStream(view) {
- Ember['default'].assert('ContextStream error: the argument is not a view', view && view.isView);
+ Ember['default'].assert("ContextStream error: the argument is not a view", view && view.isView);
this.init();
this.view = view;
}
@@ -36276,11 +36306,11 @@
var stream;
if (key === '' || key === 'this') {
stream = this.view._baseContext;
} else if (path_cache.isGlobal(key) && Ember['default'].lookup[key]) {
- Ember['default'].deprecate('Global lookup of ' + _fullPath + ' from a Handlebars template is deprecated.');
+ Ember['default'].deprecate("Global lookup of " + _fullPath + " from a Handlebars template is deprecated.");
stream = new SimpleStream['default'](Ember['default'].lookup[key]);
stream._isGlobal = true;
} else if (key in this.view._keywords) {
stream = new SimpleStream['default'](this.view._keywords[key]);
} else {
@@ -36303,12 +36333,12 @@
enifed('ember-views/streams/key_stream', ['exports', 'ember-metal/core', 'ember-metal/merge', 'ember-metal/platform/create', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/observer', 'ember-metal/streams/stream', 'ember-metal/streams/utils'], function (exports, Ember, merge, create, property_get, property_set, observer, Stream, utils) {
'use strict';
function KeyStream(source, key) {
- Ember['default'].assert('KeyStream error: key must be a non-empty string', typeof key === 'string' && key.length > 0);
- Ember['default'].assert('KeyStream error: key must not have a \'.\'', key.indexOf('.') === -1);
+ Ember['default'].assert("KeyStream error: key must be a non-empty string", typeof key === 'string' && key.length > 0);
+ Ember['default'].assert("KeyStream error: key must not have a '.'", key.indexOf('.') === -1);
this.init();
this.source = source;
this.obj = undefined;
this.key = key;
@@ -36347,11 +36377,11 @@
property_set.set(this.obj, this.key, value);
}
},
setSource: function (nextSource) {
- Ember['default'].assert('KeyStream error: source must be an object', typeof nextSource === 'object');
+ Ember['default'].assert("KeyStream error: source must be an object", typeof nextSource === 'object');
var prevSource = this.source;
if (nextSource !== prevSource) {
if (utils.isStream(prevSource)) {
@@ -36411,27 +36441,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);
}
@@ -36448,18 +36478,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);
@@ -36480,17 +36510,17 @@
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);
- Ember['default'].deprecate("Resolved the view \"" + value + "\" on the global context. Pass a view name to be looked up on the container instead, such as {{view \"select\"}}.", !viewClass, { url: "http://emberjs.com/guides/deprecations/#toc_global-lookup-of-views" });
+ Ember['default'].deprecate('Resolved the view "' + value + '" on the global context. Pass a view name to be looked up on the container instead, such as {{view "select"}}.', !viewClass, { url: 'http://emberjs.com/guides/deprecations/#toc_global-lookup-of-views' });
} else {
Ember['default'].assert("View requires a container to resolve views not passed in through the context", !!container);
- viewClass = container.lookupFactory("view:" + value);
+ viewClass = container.lookupFactory('view:' + value);
}
} else {
viewClass = value;
}
@@ -36499,11 +36529,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');
Ember['default'].assert("Could not find 'component-lookup:main' on the provided container," + " which is necessary for performing component lookups", componentLookup);
return componentLookup.lookupFactory(name, container);
}
@@ -36512,11 +36542,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 {
@@ -36566,37 +36596,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.
@@ -36606,11 +36636,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
@@ -36646,27 +36676,27 @@
@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'));
- Ember['default'].assert(string.fmt("You cannot use the same root element (%@) multiple times in an Ember.Application", [rootElement.selector || rootElement[0].tagName]), !rootElement.is(".ember-application"));
- Ember['default'].assert("You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application", !rootElement.closest(".ember-application").length);
- Ember['default'].assert("You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application", !rootElement.find(".ember-application").length);
+ Ember['default'].assert(string.fmt('You cannot use the same root element (%@) multiple times in an Ember.Application', [rootElement.selector || rootElement[0].tagName]), !rootElement.is('.ember-application'));
+ Ember['default'].assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest('.ember-application').length);
+ Ember['default'].assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find('.ember-application').length);
- rootElement.addClass("ember-application");
+ rootElement.addClass('ember-application');
- Ember['default'].assert("Unable to add \"ember-application\" class to rootElement. Make sure you set rootElement to the body or an element in the body.", rootElement.is(".ember-application"));
+ Ember['default'].assert('Unable to add "ember-application" class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is('.ember-application'));
for (event in events) {
if (events.hasOwnProperty(event)) {
this.setupHandler(rootElement, event, events[event]);
}
@@ -36686,11 +36716,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;
@@ -36701,12 +36731,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.
@@ -36718,26 +36748,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);
@@ -36749,17 +36779,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) {
@@ -36786,11 +36816,11 @@
jQuery = Ember['default'].imports && Ember['default'].imports.jQuery || mainContext && mainContext.jQuery; //jshint ignore:line
if (!jQuery && typeof eriuqer === 'function') {
jQuery = eriuqer('jquery');
}
- Ember['default'].assert('Ember Views require jQuery between 1.7 and 2.1', jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || Ember['default'].ENV.FORCE_JQUERY));
+ Ember['default'].assert("Ember Views require jQuery between 1.7 and 2.1", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || Ember['default'].ENV.FORCE_JQUERY));
/**
@module ember
@submodule ember-views
*/
@@ -36822,17 +36852,17 @@
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);
}
- Ember['default'].assert("Unable to find partial with name \"" + templateName + "\"", !!template);
+ Ember['default'].assert('Unable to find partial with name "' + templateName + '"', !!template);
return template;
}
});
@@ -36865,16 +36895,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()];
@@ -36908,11 +36938,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 = /[&<>"'`]/;
@@ -36920,11 +36950,11 @@
// Stolen shamelessly from Handlebars
var escape = {
"<": "<",
">": ">",
- "\"": """,
+ '"': """,
"'": "'",
"`": "`"
};
var escapeChar = function (chr) {
@@ -37070,11 +37100,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;
@@ -37083,13 +37113,13 @@
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);
- Ember['default'].assert("An error occurred while setting up template bindings. Please check " + (childView && childView._parentView && childView._parentView._debugTemplateName ? "\"" + childView._parentView._debugTemplateName + "\" template " : "") + "for invalid markup or bindings within HTML comments.", ref);
+ Ember['default'].assert('An error occurred while setting up template bindings. Please check ' + (childView && childView._parentView && childView._parentView._debugTemplateName ? '"' + childView._parentView._debugTemplateName + '" template ' : '') + 'for invalid markup or bindings within HTML comments.', ref);
var parent = ref.parentNode;
childView._morph = this.dom.insertMorphBefore(parent, ref, parent.nodeType === 1 ? parent : contextualElement);
parent.removeChild(ref);
@@ -37101,13 +37131,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 = '';
}
Ember['default'].assert("A string cannot be pushed into the buffer after a fragment", !this.buffer.nodeType);
this.buffer += content;
} else {
Ember['default'].assert("A fragment cannot be pushed into a buffer that contains content", !this.buffer);
@@ -37243,38 +37273,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) {
@@ -37351,12 +37381,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();
}
@@ -37430,11 +37460,11 @@
if (tagName !== null && typeof tagName === 'object' && tagName.isDescriptor) {
tagName = property_get.get(view, 'tagName');
Ember['default'].deprecate('In the future using a computed property to define tagName will not be permitted. That value will be respected, but changing it will not update the element.', !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';
}
@@ -37582,10 +37612,11 @@
@private
@method getViewClientRects
@param {Ember.View} view
*/
+
function getViewClientRects(view) {
var range = getViewRange(view);
return range.getClientRects();
}
@@ -37598,10 +37629,11 @@
@private
@method getViewBoundingClientRect
@param {Ember.View} view
*/
+
function getViewBoundingClientRect(view) {
var range = getViewRange(view);
return range.getBoundingClientRect();
}
@@ -37636,18 +37668,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];
}
@@ -37667,11 +37699,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();
@@ -37701,11 +37733,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();
@@ -37728,35 +37760,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) {
@@ -37817,17 +37849,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,
@@ -37835,19 +37867,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
@@ -37865,11 +37897,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) {
@@ -37890,11 +37922,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.
@@ -37922,31 +37954,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);
}
@@ -37954,28 +37986,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;
}
@@ -37997,15 +38029,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;
}
});
@@ -38019,18 +38051,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;
});
@@ -38044,22 +38076,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'],
/**
@@ -38075,17 +38107,17 @@
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');
Ember['default'].assert("You specified the templateName " + templateName + " for " + this + ", but it did not exist.", !templateName || !!template);
- return template || property_get.get(this, "defaultTemplate");
+ return template || property_get.get(this, 'defaultTemplate');
},
set: function (key, value) {
return value;
}
}),
@@ -38101,24 +38133,24 @@
_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) {
Ember['default'].assert("A Component must have a parent view in order to yield.", parentView);
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')
});
}
},
/**
@@ -38126,13 +38158,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.
@@ -38207,15 +38239,15 @@
var actionName;
// Send the default action
if (action === undefined) {
- actionName = property_get.get(this, "action");
- Ember['default'].assert("The default action was triggered on the component " + this.toString() + ", but the action name (" + actionName + ") was not a string.", isNone['default'](actionName) || typeof actionName === "string");
+ actionName = property_get.get(this, 'action');
+ Ember['default'].assert("The default action was triggered on the component " + this.toString() + ", but the action name (" + actionName + ") was not a string.", isNone['default'](actionName) || typeof actionName === 'string');
} else {
actionName = property_get.get(this, action);
- Ember['default'].assert("The " + action + " action was triggered on the component " + this.toString() + ", but the action name (" + actionName + ") was not a string.", isNone['default'](actionName) || typeof actionName === "string");
+ Ember['default'].assert("The " + action + " action was triggered on the component " + this.toString() + ", but the action name (" + actionName + ") was not a string.", isNone['default'](actionName) || typeof actionName === 'string');
}
// If no action name for that action could be found, just abort.
if (actionName === undefined) {
return;
@@ -38240,16 +38272,18 @@
if (!shouldBubble) {
return;
}
}
- if (target = property_get.get(this, "target")) {
- Ember['default'].assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === "function");
- target.send.apply(target, arguments);
+ if (target = property_get.get(this, 'target')) {
+ var _target;
+
+ Ember['default'].assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === 'function');
+ (_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);
}
}
}
});
@@ -38424,49 +38458,49 @@
*/
var ContainerView = View['default'].extend(MutableArray['default'], {
_states: states,
willWatchProperty: function (prop) {
- Ember['default'].deprecate("ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView.", !prop.match(/\[]/) && prop.indexOf("@") !== 0);
+ Ember['default'].deprecate("ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView.", !prop.match(/\[]/) && prop.indexOf('@') !== 0);
},
init: function () {
this._super.apply(this, arguments);
- var childViews = property_get.get(this, "childViews");
- Ember['default'].deprecate("Setting `childViews` on a Container is deprecated.", Ember['default'].isEmpty(childViews));
+ var childViews = property_get.get(this, 'childViews');
+ Ember['default'].deprecate('Setting `childViews` on a Container is deprecated.', Ember['default'].isEmpty(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;
Ember['default'].assert("You can't add a child to a container - the child is already a child of another view", native_array.A(addedViews).every(function (item) {
return !item._parentView || item._parentView === self;
}));
@@ -38505,22 +38539,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
@@ -38530,11 +38564,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);
@@ -38565,34 +38599,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) {
Ember['default'].assert("You tried to set a current view that already has a parent. Make sure you don't have multiple outlets in the same view.", !currentView._parentView);
this.pushObject(currentView);
}
}),
@@ -38608,11 +38642,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) {
@@ -38622,11 +38656,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;
@@ -38681,13 +38715,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']());
@@ -38700,34 +38734,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;
@@ -38753,11 +38787,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;
@@ -38776,11 +38810,11 @@
// the DOM again.
if (parent) {
parent.removeChild(this);
}
- this._transitionTo("destroying", false);
+ this._transitionTo('destroying', false);
return this;
},
clearRenderedChildren: K,
@@ -38792,11 +38826,11 @@
isViewClass: true
});
var DeprecatedCoreView = CoreView.extend({
init: function () {
- Ember.deprecate("Ember.CoreView is deprecated. Please use Ember.View.", false);
+ Ember.deprecate('Ember.CoreView is deprecated. Please use Ember.View.', false);
this._super.apply(this, arguments);
}
});
exports['default'] = CoreView;
@@ -38809,71 +38843,71 @@
'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);
},
_assertArrayLike: function (content) {
Ember['default'].assert(string.fmt("The value that #each loops over must be an Array. You " + "passed %@, but it should have been an ArrayController", [content.constructor]), !ControllerMixin['default'].detect(content) || content && content.isGenerated || content instanceof ArrayController['default']);
- Ember['default'].assert(string.fmt("The value that #each loops over must be an Array. You passed %@", [ControllerMixin['default'].detect(content) && content.get("model") !== undefined ? string.fmt("'%@' (wrapped in %@)", [content.get("model"), content]) : content]), EmberArray['default'].detect(content));
+ Ember['default'].assert(string.fmt("The value that #each loops over must be an Array. You passed %@", [ControllerMixin['default'].detect(content) && content.get('model') !== undefined ? string.fmt("'%@' (wrapped in %@)", [content.get('model'), content]) : content]), EmberArray['default'].detect(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;
},
@@ -38896,17 +38930,17 @@
'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);
- Ember['default'].deprecate("Supplying a tagName to Metamorph views is unreliable and is deprecated." + " You may be setting the tagName on a Handlebars helper that creates a Metamorph.", !this.tagName);
+ Ember['default'].deprecate('Supplying a tagName to Metamorph views is unreliable and is deprecated.' + ' You may be setting the tagName on a Handlebars helper that creates a Metamorph.', !this.tagName);
}
});
exports['default'] = View['default'].extend(_Metamorph);
@@ -38923,14 +38957,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();
@@ -38938,44 +38972,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,
@@ -39215,16 +39249,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
@@ -39292,17 +39326,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
@@ -39315,19 +39349,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
@@ -39343,78 +39377,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)) {
@@ -39425,33 +39459,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) {
@@ -39459,58 +39493,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);
});
@@ -39520,16 +39554,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;
@@ -39564,33 +39598,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,
@@ -39611,18 +39645,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;
},
@@ -39644,15 +39678,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;
@@ -39747,17 +39782,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;
@@ -39768,33 +39803,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.
@@ -39860,11 +39895,11 @@
if (!childView._morph) {
buffer.pushChildView(childView);
}
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return childView;
},
appendAttr: function (view, attrNode) {
@@ -39879,11 +39914,11 @@
if (!attrNode._morph) {
Ember.assert("bound attributes that do not have a morph must have a buffer", !!buffer);
buffer.pushAttrNode(attrNode);
}
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return attrNode;
},
invokeObserver: function (target, observer) {
@@ -39907,11 +39942,11 @@
if (!view.isVirtual) {
view._register();
}
Ember.runInDebug(function () {
- observer.addBeforeObserver(view, "elementId", function () {
+ observer.addBeforeObserver(view, 'elementId', function () {
throw new EmberError['default']("Changing a view's elementId after creation is not allowed");
});
});
},
@@ -39930,11 +39965,11 @@
_attrNodes.push(attrNode);
attrNode._parentView = view;
view.renderer.appendAttrTo(attrNode, view.element, attrNode.attrName);
- view.propertyDidChange("childViews");
+ view.propertyDidChange('childViews');
return attrNode;
}
});
@@ -39959,22 +39994,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);
}
}),
@@ -40008,11 +40043,11 @@
return type;
}
if (!inputTypeTestElement) {
- inputTypeTestElement = document.createElement("input");
+ inputTypeTestElement = document.createElement('input');
}
try {
inputTypeTestElement.type = type;
} catch (e) {}
@@ -40022,15 +40057,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;
}
@@ -40056,15 +40091,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
@@ -40805,16 +40840,16 @@
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");
+ var templateName = property_get.get(this, 'templateName');
+ var template = this.templateForName(templateName, 'template');
Ember['default'].assert("You specified the templateName " + templateName + " for " + this + ", but it did not exist.", !templateName || !!template);
- return template || property_get.get(this, "defaultTemplate");
+ return template || property_get.get(this, 'defaultTemplate');
},
set: function (key, value) {
if (value !== undefined) {
return value;
}
@@ -40832,27 +40867,27 @@
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');
Ember['default'].assert("You specified the layoutName " + layoutName + " for " + this + ", but it did not exist.", !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 {
@@ -40865,47 +40900,47 @@
templateForName: function (name, type) {
if (!name) {
return;
}
- Ember['default'].assert("templateNames are not allowed to contain periods: " + name, name.indexOf(".") === -1);
+ Ember['default'].assert("templateNames are not allowed to contain periods: " + name, name.indexOf('.') === -1);
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');
}
}
}),
/**
@@ -40915,69 +40950,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
@@ -41042,11 +41077,11 @@
@method $
@param {String} [selector] a jQuery-compatible selector string
@return {jQuery} the jQuery object for the DOM node
*/
$: function (sel) {
- Ember['default'].assert("You cannot access this.$() on a component with `tagName: ''` specified.", this.tagName !== "");
+ Ember['default'].assert('You cannot access this.$() on a component with `tagName: \'\'` specified.', this.tagName !== '');
return this.currentState.$(this, sel);
},
forEachChildView: function (callback) {
var childViews = this._childViews;
@@ -41084,11 +41119,11 @@
*/
appendTo: function (selector) {
var target = jQuery['default'](selector);
Ember['default'].assert("You tried to append to (" + selector + ") but that isn't in the DOM", target.length > 0);
- Ember['default'].assert("You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is(".ember-view") && !target.parents().is(".ember-view"));
+ Ember['default'].assert("You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is('.ember-view') && !target.parents().is('.ember-view'));
this.renderer.appendTo(this, target[0]);
return this;
},
@@ -41126,11 +41161,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;
@@ -41149,11 +41184,11 @@
*/
replaceIn: function (selector) {
var target = jQuery['default'](selector);
Ember['default'].assert("You tried to replace in (" + selector + ") but that isn't in the DOM", target.length > 0);
- Ember['default'].assert("You cannot replace an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is(".ember-view") && !target.parents().is(".ember-view"));
+ Ember['default'].assert("You cannot replace an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is('.ember-view') && !target.parents().is('.ember-view'));
this.renderer.replaceIn(this, target[0]);
return this;
},
@@ -41320,17 +41355,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
@@ -41420,11 +41455,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;
}
@@ -41475,43 +41510,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:
@@ -41539,19 +41574,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
@@ -41594,33 +41629,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];
}
}
@@ -41633,11 +41668,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);
},
@@ -41656,29 +41691,29 @@
'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
*/
- Ember.deprecate("Usage of Ember is deprecated for Internet Explorer 6 and 7, support will be removed in the next major version.", !environment['default'].userAgent.match(/MSIE [67]/));
+ Ember.deprecate('Usage of Ember is deprecated for Internet Explorer 6 and 7, support will be removed in the next major version.', !environment['default'].userAgent.match(/MSIE [67]/));
});
enifed("htmlbars-util",
["./htmlbars-util/safe-string","./htmlbars-util/handlebars/utils","./htmlbars-util/namespaces","exports"],
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
@@ -42107,11 +42142,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