Skip to content

Commit

Permalink
chore(all): prepare release 0.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 9, 2015
1 parent 6e224d7 commit 04ecb7b
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 41 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating",
"version": "0.12.0",
"version": "0.12.1",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down
25 changes: 16 additions & 9 deletions dist/amd/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ define(['exports', 'aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue',
this.handlesUnbind = 'unbind' in proto;
this.handlesAttached = 'attached' in proto;
this.handlesDetached = 'detached' in proto;
this.apiName = (this.elementName || this.attributeName).replace(/-([a-z])/g, function (m, w) {
this.htmlName = this.elementName || this.attributeName;
this.apiName = this.htmlName.replace(/-([a-z])/g, function (m, w) {
return w.toUpperCase();
});

Expand Down Expand Up @@ -229,7 +230,7 @@ define(['exports', 'aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue',
viewFactory = instruction.viewFactory || this.viewFactory;

if (viewFactory) {
behaviorInstance.view = viewFactory.create(container, behaviorInstance.executionContext, instruction);
behaviorInstance.view = viewFactory.create(container, executionContext, instruction);
}

if (element) {
Expand All @@ -256,31 +257,37 @@ define(['exports', 'aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue',

if (instruction.anchorIsContainer) {
if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, executionContext));
}

behaviorInstance.view.appendNodesTo(host);
} else {
behaviorInstance.view.insertNodesBefore(host);
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}
} else if (behaviorInstance.view) {
behaviorInstance.view.owner = behaviorInstance;

if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}

if (element && !(this.apiName in element)) {
element[this.apiName] = behaviorInstance.executionContext;
if (element) {
if (!(this.apiName in element)) {
element[this.apiName] = executionContext;
}

if (!(this.htmlName in element)) {
element[this.htmlName] = behaviorInstance;
}
}

return behaviorInstance;
Expand Down
25 changes: 16 additions & 9 deletions dist/commonjs/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ var HtmlBehaviorResource = (function () {
this.handlesUnbind = 'unbind' in proto;
this.handlesAttached = 'attached' in proto;
this.handlesDetached = 'detached' in proto;
this.apiName = (this.elementName || this.attributeName).replace(/-([a-z])/g, function (m, w) {
this.htmlName = this.elementName || this.attributeName;
this.apiName = this.htmlName.replace(/-([a-z])/g, function (m, w) {
return w.toUpperCase();
});

Expand Down Expand Up @@ -246,7 +247,7 @@ var HtmlBehaviorResource = (function () {
viewFactory = instruction.viewFactory || this.viewFactory;

if (viewFactory) {
behaviorInstance.view = viewFactory.create(container, behaviorInstance.executionContext, instruction);
behaviorInstance.view = viewFactory.create(container, executionContext, instruction);
}

if (element) {
Expand All @@ -273,31 +274,37 @@ var HtmlBehaviorResource = (function () {

if (instruction.anchorIsContainer) {
if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, executionContext));
}

behaviorInstance.view.appendNodesTo(host);
} else {
behaviorInstance.view.insertNodesBefore(host);
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}
} else if (behaviorInstance.view) {
behaviorInstance.view.owner = behaviorInstance;

if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}

if (element && !(this.apiName in element)) {
element[this.apiName] = behaviorInstance.executionContext;
if (element) {
if (!(this.apiName in element)) {
element[this.apiName] = executionContext;
}

if (!(this.htmlName in element)) {
element[this.htmlName] = behaviorInstance;
}
}

return behaviorInstance;
Expand Down
27 changes: 17 additions & 10 deletions dist/es6/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export class HtmlBehaviorResource {
this.handlesUnbind = ('unbind' in proto);
this.handlesAttached = ('attached' in proto);
this.handlesDetached = ('detached' in proto);
this.apiName = (this.elementName || this.attributeName).replace(/-([a-z])/g, (m, w) => w.toUpperCase());
this.htmlName = this.elementName || this.attributeName;
this.apiName = this.htmlName.replace(/-([a-z])/g, (m, w) => w.toUpperCase());

if(attributeName !== null){
if(properties.length === 0){ //default for custom attributes
Expand Down Expand Up @@ -223,8 +224,8 @@ export class HtmlBehaviorResource {
viewFactory = instruction.viewFactory || this.viewFactory;

if(viewFactory){
//TODO: apply element instructions? var results = viewFactory.applyElementInstructions(container, behaviorInstance.executionContext, element);
behaviorInstance.view = viewFactory.create(container, behaviorInstance.executionContext, instruction);
//TODO: apply element instructions? var results = viewFactory.applyElementInstructions(container, executionContext, element);
behaviorInstance.view = viewFactory.create(container, executionContext, instruction);
//TODO: register results with view
}

Expand Down Expand Up @@ -254,34 +255,40 @@ export class HtmlBehaviorResource {

if(instruction.anchorIsContainer){
if(this.childExpression){
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, executionContext));
}

behaviorInstance.view.appendNodesTo(host);
}else{
behaviorInstance.view.insertNodesBefore(host);
}
}else if(this.childExpression){
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}
}else if(behaviorInstance.view){
//dynamic element with view
behaviorInstance.view.owner = behaviorInstance;

if(this.childExpression){
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, executionContext));
}
}else if(this.childExpression){
//dynamic element without view
bindings.push(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if(this.childExpression){
//custom attribute
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}

if(element && !(this.apiName in element)){
element[this.apiName] = behaviorInstance.executionContext;
if(element){
if(!(this.apiName in element)){
element[this.apiName] = executionContext;
}

if(!(this.htmlName in element)){
element[this.htmlName] = behaviorInstance;
}
}

return behaviorInstance;
Expand Down
25 changes: 16 additions & 9 deletions dist/system/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ System.register(['aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue', '.
this.handlesUnbind = 'unbind' in proto;
this.handlesAttached = 'attached' in proto;
this.handlesDetached = 'detached' in proto;
this.apiName = (this.elementName || this.attributeName).replace(/-([a-z])/g, function (m, w) {
this.htmlName = this.elementName || this.attributeName;
this.apiName = this.htmlName.replace(/-([a-z])/g, function (m, w) {
return w.toUpperCase();
});

Expand Down Expand Up @@ -250,7 +251,7 @@ System.register(['aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue', '.
viewFactory = instruction.viewFactory || this.viewFactory;

if (viewFactory) {
behaviorInstance.view = viewFactory.create(container, behaviorInstance.executionContext, instruction);
behaviorInstance.view = viewFactory.create(container, executionContext, instruction);
}

if (element) {
Expand All @@ -277,31 +278,37 @@ System.register(['aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue', '.

if (instruction.anchorIsContainer) {
if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(host, executionContext));
}

behaviorInstance.view.appendNodesTo(host);
} else {
behaviorInstance.view.insertNodesBefore(host);
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}
} else if (behaviorInstance.view) {
behaviorInstance.view.owner = behaviorInstance;

if (this.childExpression) {
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
behaviorInstance.view.addBinding(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(instruction.host, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(instruction.host, executionContext));
}
} else if (this.childExpression) {
bindings.push(this.childExpression.createBinding(element, behaviorInstance.executionContext));
bindings.push(this.childExpression.createBinding(element, executionContext));
}

if (element && !(this.apiName in element)) {
element[this.apiName] = behaviorInstance.executionContext;
if (element) {
if (!(this.apiName in element)) {
element[this.apiName] = executionContext;
}

if (!(this.htmlName in element)) {
element[this.htmlName] = behaviorInstance;
}
}

return behaviorInstance;
Expand Down
8 changes: 8 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 0.12.1 (2015-06-09)


#### Bug Fixes

* **html-behavior:** add htmlName to element with behavior instance reference ([6e224d78](http://github.com/aurelia/templating/commit/6e224d785306c818143c6aab4589717862c154f8))


## 0.12.0 (2015-06-08)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating",
"version": "0.12.0",
"version": "0.12.1",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down
4 changes: 2 additions & 2 deletions src/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ export class HtmlBehaviorResource {
}

if(element){
if(!(this.apiName in element){
if(!(this.apiName in element)){
element[this.apiName] = executionContext;
}

if(!(this.htmlName in element){
if(!(this.htmlName in element)){
element[this.htmlName] = behaviorInstance;
}
}
Expand Down

0 comments on commit 04ecb7b

Please sign in to comment.