diff --git a/bower.json b/bower.json index 7097022..01e92ac 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-binding", - "version": "1.0.0-beta.1.2.0", + "version": "1.0.0-beta.1.2.1", "description": "An implementation of the templating engine's Binding Language abstraction which uses a pluggable command syntax.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-templating-binding.js b/dist/amd/aurelia-templating-binding.js index dc8c79f..f9d012a 100644 --- a/dist/amd/aurelia-templating-binding.js +++ b/dist/amd/aurelia-templating-binding.js @@ -295,8 +295,8 @@ define(['exports', 'aurelia-logging', 'aurelia-binding', 'aurelia-templating'], return _aureliaBinding.bindingMode.twoWay; } - if (context && attrName in context.attributes) { - return context.attributes[attrName].defaultBindingMode || _aureliaBinding.bindingMode.oneWay; + if (context && attrName in context.attributes && context.attributes[attrName] && context.attributes[attrName].defaultBindingMode >= _aureliaBinding.bindingMode.oneTime) { + return context.attributes[attrName].defaultBindingMode; } return _aureliaBinding.bindingMode.oneWay; @@ -458,6 +458,7 @@ define(['exports', 'aurelia-logging', 'aurelia-binding', 'aurelia-templating'], _this.emptyStringExpression = _this.parser.parse('\'\''); syntaxInterpreter.language = _this; _this.attributeMap = syntaxInterpreter.attributeMap = { + 'accesskey': 'accessKey', 'contenteditable': 'contentEditable', 'for': 'htmlFor', 'tabindex': 'tabIndex', diff --git a/dist/aurelia-templating-binding.js b/dist/aurelia-templating-binding.js index 2745195..1b35e29 100644 --- a/dist/aurelia-templating-binding.js +++ b/dist/aurelia-templating-binding.js @@ -246,8 +246,11 @@ export class SyntaxInterpreter { return bindingMode.twoWay; } - if (context && attrName in context.attributes) { - return context.attributes[attrName].defaultBindingMode || bindingMode.oneWay; + if (context + && attrName in context.attributes + && context.attributes[attrName] + && context.attributes[attrName].defaultBindingMode >= bindingMode.oneTime) { + return context.attributes[attrName].defaultBindingMode; } return bindingMode.oneWay; @@ -449,6 +452,7 @@ export class TemplatingBindingLanguage extends BindingLanguage { this.emptyStringExpression = this.parser.parse('\'\''); syntaxInterpreter.language = this; this.attributeMap = syntaxInterpreter.attributeMap = { + 'accesskey': 'accessKey', 'contenteditable': 'contentEditable', 'for': 'htmlFor', 'tabindex': 'tabIndex', diff --git a/dist/commonjs/aurelia-templating-binding.js b/dist/commonjs/aurelia-templating-binding.js index 30fc024..ebb909d 100644 --- a/dist/commonjs/aurelia-templating-binding.js +++ b/dist/commonjs/aurelia-templating-binding.js @@ -262,8 +262,8 @@ var SyntaxInterpreter = exports.SyntaxInterpreter = function () { return _aureliaBinding.bindingMode.twoWay; } - if (context && attrName in context.attributes) { - return context.attributes[attrName].defaultBindingMode || _aureliaBinding.bindingMode.oneWay; + if (context && attrName in context.attributes && context.attributes[attrName] && context.attributes[attrName].defaultBindingMode >= _aureliaBinding.bindingMode.oneTime) { + return context.attributes[attrName].defaultBindingMode; } return _aureliaBinding.bindingMode.oneWay; @@ -425,6 +425,7 @@ var TemplatingBindingLanguage = exports.TemplatingBindingLanguage = function (_B _this.emptyStringExpression = _this.parser.parse('\'\''); syntaxInterpreter.language = _this; _this.attributeMap = syntaxInterpreter.attributeMap = { + 'accesskey': 'accessKey', 'contenteditable': 'contentEditable', 'for': 'htmlFor', 'tabindex': 'tabIndex', diff --git a/dist/es2015/aurelia-templating-binding.js b/dist/es2015/aurelia-templating-binding.js index 69d053b..f6dcc85 100644 --- a/dist/es2015/aurelia-templating-binding.js +++ b/dist/es2015/aurelia-templating-binding.js @@ -226,8 +226,8 @@ export let SyntaxInterpreter = class SyntaxInterpreter { return bindingMode.twoWay; } - if (context && attrName in context.attributes) { - return context.attributes[attrName].defaultBindingMode || bindingMode.oneWay; + if (context && attrName in context.attributes && context.attributes[attrName] && context.attributes[attrName].defaultBindingMode >= bindingMode.oneTime) { + return context.attributes[attrName].defaultBindingMode; } return bindingMode.oneWay; @@ -381,6 +381,7 @@ export let TemplatingBindingLanguage = class TemplatingBindingLanguage extends B this.emptyStringExpression = this.parser.parse('\'\''); syntaxInterpreter.language = this; this.attributeMap = syntaxInterpreter.attributeMap = { + 'accesskey': 'accessKey', 'contenteditable': 'contentEditable', 'for': 'htmlFor', 'tabindex': 'tabIndex', diff --git a/dist/system/aurelia-templating-binding.js b/dist/system/aurelia-templating-binding.js index be21edf..ee528e6 100644 --- a/dist/system/aurelia-templating-binding.js +++ b/dist/system/aurelia-templating-binding.js @@ -295,8 +295,8 @@ System.register(['aurelia-logging', 'aurelia-binding', 'aurelia-templating'], fu return bindingMode.twoWay; } - if (context && attrName in context.attributes) { - return context.attributes[attrName].defaultBindingMode || bindingMode.oneWay; + if (context && attrName in context.attributes && context.attributes[attrName] && context.attributes[attrName].defaultBindingMode >= bindingMode.oneTime) { + return context.attributes[attrName].defaultBindingMode; } return bindingMode.oneWay; @@ -460,6 +460,7 @@ System.register(['aurelia-logging', 'aurelia-binding', 'aurelia-templating'], fu _this.emptyStringExpression = _this.parser.parse('\'\''); syntaxInterpreter.language = _this; _this.attributeMap = syntaxInterpreter.attributeMap = { + 'accesskey': 'accessKey', 'contenteditable': 'contentEditable', 'for': 'htmlFor', 'tabindex': 'tabIndex', diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 9ea2ecb..55bbe95 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,16 @@ +### 1.0.0-beta.1.2.1 (2016-03-29) + + +#### Bug Fixes + +* **SyntaxInterpreter:** enable specifying oneTime default binding mode ([74953349](http://github.com/aurelia/templating-binding/commit/74953349afb71538cbee4e73498ea5d3584f5f62)) + + +#### Features + +* **attributeMap:** map accesskey ([5d9b1315](http://github.com/aurelia/templating-binding/commit/5d9b1315224cd737c5d613f42eee6bda6db9e858)) + + ### 1.0.0-beta.1.2.0 (2016-03-22) #### Bug Fixes diff --git a/package.json b/package.json index 80d4805..9e3dbc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-binding", - "version": "1.0.0-beta.1.2.0", + "version": "1.0.0-beta.1.2.1", "description": "An implementation of the templating engine's Binding Language abstraction which uses a pluggable command syntax.", "keywords": [ "aurelia", diff --git a/src/syntax-interpreter.js b/src/syntax-interpreter.js index 5fc72b2..f1e6570 100644 --- a/src/syntax-interpreter.js +++ b/src/syntax-interpreter.js @@ -45,7 +45,7 @@ export class SyntaxInterpreter { } if (context - && attrName in context.attributes + && attrName in context.attributes && context.attributes[attrName] && context.attributes[attrName].defaultBindingMode >= bindingMode.oneTime) { return context.attributes[attrName].defaultBindingMode;