ember-source 2.12.0.beta.1 → 2.12.0.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/dist/ember.prod.js CHANGED
@@ -6,10 +6,11 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.12.0-beta.1
9
+ * @version 2.12.0-beta.2
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
13
+ var mainContext = this; // Used in ember-environment/lib/global.js
13
14
 
14
15
  (function() {
15
16
  var isNode = typeof window === 'undefined' &&
@@ -8233,7 +8234,7 @@ enifed('ember-glimmer/components/text_area', ['exports', 'ember-glimmer/componen
8233
8234
  you only need to setup the action name to the event name property.
8234
8235
 
8235
8236
  ```handlebars
8236
- {{textarea focus-in="alertMessage"}}
8237
+ {{textarea focus-out="alertMessage"}}
8237
8238
  ```
8238
8239
 
8239
8240
  See more about [Text Support Actions](/api/classes/Ember.TextArea.html)
@@ -9576,9 +9577,11 @@ enifed('ember-glimmer/helpers/component', ['exports', 'ember-utils', 'ember-glim
9576
9577
 
9577
9578
  function ClosureComponentReference(args, symbolTable, env) {
9578
9579
  _CachedReference.call(this);
9579
- this.defRef = args.positional.at(0);
9580
+
9581
+ var firstArg = args.positional.at(0);
9582
+ this.defRef = firstArg;
9583
+ this.tag = firstArg.tag;
9580
9584
  this.env = env;
9581
- this.tag = args.positional.at(0).tag;
9582
9585
  this.symbolTable = symbolTable;
9583
9586
  this.args = args;
9584
9587
  this.lastDefinition = undefined;
@@ -10097,6 +10100,7 @@ enifed("ember-glimmer/helpers/hash", ["exports"], function (exports) {
10097
10100
  @for Ember.Templates.helpers
10098
10101
  @param {Object} options
10099
10102
  @return {Object} Hash
10103
+ @since 2.3.0
10100
10104
  @public
10101
10105
  */
10102
10106
 
@@ -10671,9 +10675,7 @@ enifed('ember-glimmer/helpers/unbound', ['exports', 'ember-metal', 'ember-glimme
10671
10675
  });
10672
10676
  enifed('ember-glimmer/index', ['exports', 'ember-glimmer/helpers/action', 'ember-glimmer/templates/root', 'ember-glimmer/syntax', 'ember-glimmer/template', 'ember-glimmer/components/checkbox', 'ember-glimmer/components/text_field', 'ember-glimmer/components/text_area', 'ember-glimmer/components/link-to', 'ember-glimmer/component', 'ember-glimmer/helper', 'ember-glimmer/environment', 'ember-glimmer/make-bound-helper', 'ember-glimmer/utils/string', 'ember-glimmer/renderer', 'ember-glimmer/template_registry', 'ember-glimmer/setup-registry', 'ember-glimmer/dom'], function (exports, _emberGlimmerHelpersAction, _emberGlimmerTemplatesRoot, _emberGlimmerSyntax, _emberGlimmerTemplate, _emberGlimmerComponentsCheckbox, _emberGlimmerComponentsText_field, _emberGlimmerComponentsText_area, _emberGlimmerComponentsLinkTo, _emberGlimmerComponent, _emberGlimmerHelper, _emberGlimmerEnvironment, _emberGlimmerMakeBoundHelper, _emberGlimmerUtilsString, _emberGlimmerRenderer, _emberGlimmerTemplate_registry, _emberGlimmerSetupRegistry, _emberGlimmerDom) {
10673
10677
  /**
10674
- [Glimmer](https://github.com/tildeio/glimmer) is a [Handlebars](http://handlebarsjs.com/)
10675
- compatible templating engine used by Ember.js.
10676
- Any valid Handlebars syntax is valid in an Ember template.
10678
+ [Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.
10677
10679
 
10678
10680
  ### Showing a property
10679
10681
 
@@ -10681,15 +10683,13 @@ enifed('ember-glimmer/index', ['exports', 'ember-glimmer/helpers/action', 'ember
10681
10683
  the DOM) to a user. For example, given a component with the property "name",
10682
10684
  that component's template can use the name in several ways:
10683
10685
 
10684
- ```javascript
10685
- // app/components/person.js
10686
+ ```app/components/person.js
10686
10687
  export default Ember.Component.extend({
10687
10688
  name: 'Jill'
10688
10689
  });
10689
10690
  ```
10690
10691
 
10691
- ```handlebars
10692
- {{! app/components/person.hbs }}
10692
+ ```app/components/person.hbs
10693
10693
  {{name}}
10694
10694
  <div>{{name}}</div>
10695
10695
  <span data-name={{name}}></span>
@@ -10996,13 +10996,7 @@ enifed('ember-glimmer/modifiers/action', ['exports', 'ember-utils', 'ember-metal
10996
10996
  registerAction: function (actionState) {
10997
10997
  var actionId = actionState.actionId;
10998
10998
 
10999
- var actions = _emberViews.ActionManager.registeredActions[actionId];
11000
-
11001
- if (!actions) {
11002
- actions = _emberViews.ActionManager.registeredActions[actionId] = [];
11003
- }
11004
-
11005
- actions.push(actionState);
10999
+ _emberViews.ActionManager.registeredActions[actionId] = actionState;
11006
11000
 
11007
11001
  return actionId;
11008
11002
  },
@@ -11010,21 +11004,7 @@ enifed('ember-glimmer/modifiers/action', ['exports', 'ember-utils', 'ember-metal
11010
11004
  unregisterAction: function (actionState) {
11011
11005
  var actionId = actionState.actionId;
11012
11006
 
11013
- var actions = _emberViews.ActionManager.registeredActions[actionId];
11014
-
11015
- if (!actions) {
11016
- return;
11017
- }
11018
-
11019
- var index = actions.indexOf(actionState);
11020
-
11021
- if (index !== -1) {
11022
- actions.splice(index, 1);
11023
- }
11024
-
11025
- if (actions.length === 0) {
11026
- delete _emberViews.ActionManager.registeredActions[actionId];
11027
- }
11007
+ delete _emberViews.ActionManager.registeredActions[actionId];
11028
11008
  }
11029
11009
  };
11030
11010
 
@@ -11189,11 +11169,8 @@ enifed('ember-glimmer/modifiers/action', ['exports', 'ember-utils', 'ember-metal
11189
11169
  if (!actionNameRef[_emberGlimmerHelpersAction.INVOKE]) {
11190
11170
  actionState.actionName = actionNameRef.value();
11191
11171
  }
11192
- actionState.eventName = actionState.getEventName();
11193
11172
 
11194
- // Not sure if this is needed? If we mutate the actionState is that good enough?
11195
- ActionHelper.unregisterAction(actionState);
11196
- ActionHelper.registerAction(actionState);
11173
+ actionState.eventName = actionState.getEventName();
11197
11174
  };
11198
11175
 
11199
11176
  ActionModifierManager.prototype.getDestructor = function getDestructor(modifier) {
@@ -12002,8 +11979,6 @@ babelHelpers.inherits(CurlyComponentManager, _AbstractManager);
12002
11979
  bucket.classRef = args.named.get('class');
12003
11980
  }
12004
11981
 
12005
- processComponentInitializationAssertions(component, props);
12006
-
12007
11982
  if (environment.isInteractive && component.tagName !== '') {
12008
11983
  component.trigger('willRender');
12009
11984
  }
@@ -12189,8 +12164,6 @@ babelHelpers.inherits(TopComponentManager, _CurlyComponentManager);
12189
12164
  }
12190
12165
  }
12191
12166
 
12192
- processComponentInitializationAssertions(component, {});
12193
-
12194
12167
  return new ComponentStateBucket(environment, component, args, finalizer);
12195
12168
  };
12196
12169
 
@@ -19645,7 +19618,10 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
19645
19618
  post: null
19646
19619
  });
19647
19620
 
19648
- let comment = Comment.create(post: somePost);
19621
+ let comment = Comment.create({
19622
+ post: somePost
19623
+ });
19624
+
19649
19625
  comment.edit(); // outputs 'starting to edit'
19650
19626
  ```
19651
19627
 
@@ -35071,7 +35047,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35071
35047
  }
35072
35048
  });
35073
35049
  let steve = Person.create({
35074
- name: "Steve"
35050
+ name: 'Steve'
35075
35051
  });
35076
35052
  // alerts 'Name is Steve'.
35077
35053
  ```
@@ -35373,8 +35349,8 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35373
35349
  nonMerged: 'superclass value of nonMerged'
35374
35350
  },
35375
35351
  mergedProperty: {
35376
- page: {replace: false},
35377
- limit: {replace: true}
35352
+ page: { replace: false },
35353
+ limit: { replace: true }
35378
35354
  }
35379
35355
  });
35380
35356
  const FooBar = Bar.extend({
@@ -35382,7 +35358,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35382
35358
  completelyNonMerged: 'subclass value of nonMerged'
35383
35359
  },
35384
35360
  mergedProperty: {
35385
- limit: {replace: false}
35361
+ limit: { replace: false }
35386
35362
  }
35387
35363
  });
35388
35364
  let fooBar = FooBar.create();
@@ -35526,9 +35502,9 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35526
35502
  }
35527
35503
  });
35528
35504
  let yehuda = Soldier.create({
35529
- name: "Yehuda Katz"
35505
+ name: 'Yehuda Katz'
35530
35506
  });
35531
- yehuda.say("Yes"); // alerts "Yehuda Katz says: Yes, sir!"
35507
+ yehuda.say('Yes'); // alerts "Yehuda Katz says: Yes, sir!"
35532
35508
  ```
35533
35509
  The `create()` on line #17 creates an *instance* of the `Soldier` class.
35534
35510
  The `extend()` on line #8 creates a *subclass* of `Person`. Any instance
@@ -35600,13 +35576,13 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35600
35576
  o = MyObject.create();
35601
35577
  o.get('name'); // 'an object'
35602
35578
  MyObject.reopen({
35603
- say(msg){
35579
+ say(msg) {
35604
35580
  console.log(msg);
35605
35581
  }
35606
- })
35582
+ });
35607
35583
  o2 = MyObject.create();
35608
- o2.say("hello"); // logs "hello"
35609
- o.say("goodbye"); // logs "goodbye"
35584
+ o2.say('hello'); // logs "hello"
35585
+ o.say('goodbye'); // logs "goodbye"
35610
35586
  ```
35611
35587
  To add functions and properties to the constructor itself,
35612
35588
  see `reopenClass`
@@ -35630,23 +35606,22 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
35630
35606
  These are only available on the class and not on any instance of that class.
35631
35607
  ```javascript
35632
35608
  const Person = Ember.Object.extend({
35633
- name: "",
35609
+ name: '',
35634
35610
  sayHello() {
35635
- alert("Hello. My name is " + this.get('name'));
35611
+ alert(`Hello. My name is ${this.get('name')}`);
35636
35612
  }
35637
35613
  });
35638
35614
  Person.reopenClass({
35639
- species: "Homo sapiens",
35640
- createPerson(newPersonsName){
35641
- return Person.create({
35642
- name:newPersonsName
35643
- });
35615
+ species: 'Homo sapiens',
35616
+
35617
+ createPerson(name) {
35618
+ return Person.create({ name });
35644
35619
  }
35645
35620
  });
35646
35621
  let tom = Person.create({
35647
- name: "Tom Dale"
35622
+ name: 'Tom Dale'
35648
35623
  });
35649
- let yehuda = Person.createPerson("Yehuda Katz");
35624
+ let yehuda = Person.createPerson('Yehuda Katz');
35650
35625
  tom.sayHello(); // "Hello. My name is Tom Dale"
35651
35626
  yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
35652
35627
  alert(Person.species); // "Homo sapiens"
@@ -36381,7 +36356,7 @@ enifed('ember-runtime/system/object_proxy', ['exports', 'ember-runtime/system/ob
36381
36356
  @class ObjectProxy
36382
36357
  @namespace Ember
36383
36358
  @extends Ember.Object
36384
- @extends Ember._ProxyMixin
36359
+ @uses Ember.ProxyMixin
36385
36360
  @public
36386
36361
  */
36387
36362
 
@@ -38373,6 +38348,43 @@ enifed('ember-views/mixins/view_support', ['exports', 'ember-utils', 'ember-meta
38373
38348
  @private
38374
38349
  */
38375
38350
  exports.default = _emberMetal.Mixin.create((_Mixin$create = {
38351
+ /**
38352
+ A list of properties of the view to apply as attributes. If the property
38353
+ is a string value, the value of that string will be applied as the value
38354
+ for an attribute of the property's name.
38355
+ The following example creates a tag like `<div priority="high" />`.
38356
+ ```javascript
38357
+ Ember.Component.extend({
38358
+ attributeBindings: ['priority'],
38359
+ priority: 'high'
38360
+ });
38361
+ ```
38362
+ If the value of the property is a Boolean, the attribute is treated as
38363
+ an HTML Boolean attribute. It will be present if the property is `true`
38364
+ and omitted if the property is `false`.
38365
+ The following example creates markup like `<div visible />`.
38366
+ ```javascript
38367
+ Ember.Component.extend({
38368
+ attributeBindings: ['visible'],
38369
+ visible: true
38370
+ });
38371
+ ```
38372
+ If you would prefer to use a custom value instead of the property name,
38373
+ you can create the same markup as the last example with a binding like
38374
+ this:
38375
+ ```javascript
38376
+ Ember.Component.extend({
38377
+ attributeBindings: ['isVisible:visible'],
38378
+ isVisible: true
38379
+ });
38380
+ ```
38381
+ This list of attributes is inherited from the component's superclasses,
38382
+ as well.
38383
+ @property attributeBindings
38384
+ @type Array
38385
+ @default []
38386
+ @public
38387
+ */
38376
38388
  concatenatedProperties: ['attributeBindings']
38377
38389
  }, _Mixin$create[_emberRuntimeSystemCore_object.POST_INIT] = function () {
38378
38390
  dispatchLifeCycleHook(this, 'didInitAttrs', undefined, this.attrs);
@@ -38959,43 +38971,23 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
38959
38971
  });
38960
38972
 
38961
38973
  rootElement.on(event + '.ember', '[data-ember-action]', function (evt) {
38962
- var actionId = _emberViewsSystemJquery.default(evt.currentTarget).attr('data-ember-action');
38963
- var actions = _emberViewsSystemAction_manager.default.registeredActions[actionId];
38964
-
38965
- // In Glimmer2 this attribute is set to an empty string and an additional
38966
- // attribute it set for each action on a given element. In this case, the
38967
- // attributes need to be read so that a proper set of action handlers can
38968
- // be coalesced.
38969
- if (actionId === '') {
38970
- var attributes = evt.currentTarget.attributes;
38971
- var attributeCount = attributes.length;
38974
+ var attributes = evt.currentTarget.attributes;
38972
38975
 
38973
- actions = [];
38976
+ for (var i = 0; i < attributes.length; i++) {
38977
+ var attr = attributes.item(i);
38978
+ var attrName = attr.name;
38974
38979
 
38975
- for (var i = 0; i < attributeCount; i++) {
38976
- var attr = attributes.item(i);
38977
- var attrName = attr.name;
38980
+ if (attrName.lastIndexOf('data-ember-action-', 0) !== -1) {
38981
+ var action = _emberViewsSystemAction_manager.default.registeredActions[attr.value];
38978
38982
 
38979
- if (attrName.indexOf('data-ember-action-') === 0) {
38980
- actions = actions.concat(_emberViewsSystemAction_manager.default.registeredActions[attr.value]);
38983
+ // We have to check for action here since in some cases, jQuery will trigger
38984
+ // an event on `removeChild` (i.e. focusout) after we've already torn down the
38985
+ // action handlers for the view.
38986
+ if (action && action.eventName === eventName) {
38987
+ action.handler(evt);
38981
38988
  }
38982
38989
  }
38983
38990
  }
38984
-
38985
- // We have to check for actions here since in some cases, jQuery will trigger
38986
- // an event on `removeChild` (i.e. focusout) after we've already torn down the
38987
- // action handlers for the view.
38988
- if (!actions) {
38989
- return;
38990
- }
38991
-
38992
- for (var index = 0; index < actions.length; index++) {
38993
- var action = actions[index];
38994
-
38995
- if (action && action.eventName === eventName) {
38996
- return action.handler(evt);
38997
- }
38998
- }
38999
38991
  });
39000
38992
  },
39001
38993
 
@@ -39626,10 +39618,7 @@ enifed("ember-views/views/view", ["exports"], function (exports) {
39626
39618
  @namespace Ember
39627
39619
  @extends Ember.CoreView
39628
39620
  @deprecated See http://emberjs.com/deprecations/v1.x/#toc_ember-view
39629
- @uses Ember.ViewSupport
39630
- @uses Ember.ChildViewsSupport
39631
39621
  @uses Ember.ClassNamesSupport
39632
- @uses Ember.AttributeBindingsSupport
39633
39622
  @private
39634
39623
  */
39635
39624
  enifed("ember/features", ["exports"], function (exports) {
@@ -40168,7 +40157,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'ember-utils',
40168
40157
  enifed("ember/version", ["exports"], function (exports) {
40169
40158
  "use strict";
40170
40159
 
40171
- exports.default = "2.12.0-beta.1";
40160
+ exports.default = "2.12.0-beta.2";
40172
40161
  });
40173
40162
  enifed('internal-test-helpers/apply-mixins', ['exports', 'ember-utils'], function (exports, _emberUtils) {
40174
40163
  'use strict';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0.beta.1
4
+ version: 2.12.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ember.js source code wrapper for use with Ruby libs.
14
14
  email: