Skip to content

Commit

Permalink
chore(all): prepare release 0.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 19, 2015
1 parent 83cbd5e commit e202cd5
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 194 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-binding",
"version": "0.8.4",
"version": "0.8.5",
"description": "An implementation of the templating engine's Binding Language abstraction which uses a pluggable command syntax.",
"keywords": [
"aurelia",
Expand Down
45 changes: 8 additions & 37 deletions dist/amd/binding-language.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interpreter"], function (exports, _aureliaTemplating, _aureliaBinding, _syntaxInterpreter) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var _inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) subClass.__proto__ = superClass;
};
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };

var BindingLanguage = _aureliaTemplating.BindingLanguage;
var Parser = _aureliaBinding.Parser;
Expand All @@ -32,7 +16,7 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete

var info = {};

var TemplatingBindingLanguage = (function (BindingLanguage) {
var TemplatingBindingLanguage = exports.TemplatingBindingLanguage = (function (BindingLanguage) {
function TemplatingBindingLanguage(parser, observerLocator, syntaxInterpreter) {
this.parser = parser;
this.observerLocator = observerLocator;
Expand All @@ -41,7 +25,8 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
syntaxInterpreter.language = this;
this.attributeMap = syntaxInterpreter.attributeMap = {
"class": "className",
"for": "htmlFor"
"for": "htmlFor",
tabindex: "tabIndex"
};
}

Expand All @@ -53,7 +38,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return [Parser, ObserverLocator, SyntaxInterpreter];
},
writable: true,
enumerable: true,
configurable: true
}
}, {
Expand Down Expand Up @@ -83,7 +67,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return info;
},
writable: true,
enumerable: true,
configurable: true
},
createAttributeInstruction: {
Expand All @@ -104,15 +87,13 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return instruction;
},
writable: true,
enumerable: true,
configurable: true
},
parseText: {
value: function parseText(resources, value) {
return this.parseContent(resources, "textContent", value);
},
writable: true,
enumerable: true,
configurable: true
},
parseContent: {
Expand All @@ -133,16 +114,13 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return new InterpolationBindingExpression(this.observerLocator, this.attributeMap[attrName] || attrName, parts, ONE_WAY, resources.valueConverterLookupFunction, attrName);
},
writable: true,
enumerable: true,
configurable: true
}
});

return TemplatingBindingLanguage;
})(BindingLanguage);

exports.TemplatingBindingLanguage = TemplatingBindingLanguage;
var InterpolationBindingExpression = (function () {
var InterpolationBindingExpression = exports.InterpolationBindingExpression = (function () {
function InterpolationBindingExpression(observerLocator, targetProperty, parts, mode, valueConverterLookupFunction, attribute) {
this.observerLocator = observerLocator;
this.targetProperty = targetProperty;
Expand All @@ -159,15 +137,12 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return new InterpolationBinding(this.observerLocator, this.parts, target, this.targetProperty, this.mode, this.valueConverterLookupFunction);
},
writable: true,
enumerable: true,
configurable: true
}
});

return InterpolationBindingExpression;
})();

exports.InterpolationBindingExpression = InterpolationBindingExpression;
var InterpolationBinding = (function () {
function InterpolationBinding(observerLocator, parts, target, targetProperty, mode, valueConverterLookupFunction) {
this.observerLocator = observerLocator;
Expand All @@ -184,7 +159,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return this.observerLocator.getObserver(obj, propertyName);
},
writable: true,
enumerable: true,
configurable: true
},
bind: {
Expand All @@ -200,7 +174,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
}
},
writable: true,
enumerable: true,
configurable: true
},
setValue: {
Expand All @@ -209,7 +182,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
this.targetProperty.setValue(value);
},
writable: true,
enumerable: true,
configurable: true
},
connect: {
Expand All @@ -234,7 +206,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
}
},
writable: true,
enumerable: true,
configurable: true
},
interpolate: {
Expand All @@ -259,7 +230,6 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
return value;
},
writable: true,
enumerable: true,
configurable: true
},
unbind: {
Expand All @@ -277,11 +247,12 @@ define(["exports", "aurelia-templating", "aurelia-binding", "./syntax-interprete
this.toDispose = null;
},
writable: true,
enumerable: true,
configurable: true
}
});

return InterpolationBinding;
})();

exports.__esModule = true;
});
1 change: 1 addition & 0 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ define(["exports", "aurelia-templating", "./binding-language", "./syntax-interpr
exports.TemplatingBindingLanguage = TemplatingBindingLanguage;
exports.SyntaxInterpreter = SyntaxInterpreter;
exports.install = install;
exports.__esModule = true;
});
32 changes: 14 additions & 18 deletions dist/amd/syntax-interpreter.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var Parser = _aureliaBinding.Parser;
var ObserverLocator = _aureliaBinding.ObserverLocator;
Expand All @@ -16,7 +13,7 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
var ONE_WAY = _aureliaBinding.ONE_WAY;
var TWO_WAY = _aureliaBinding.TWO_WAY;
var ONE_TIME = _aureliaBinding.ONE_TIME;
var SyntaxInterpreter = (function () {
var SyntaxInterpreter = exports.SyntaxInterpreter = (function () {
function SyntaxInterpreter(parser, observerLocator, eventManager) {
this.parser = parser;
this.observerLocator = observerLocator;
Expand All @@ -29,7 +26,6 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return [Parser, ObserverLocator, EventManager];
},
writable: true,
enumerable: true,
configurable: true
}
}, {
Expand All @@ -42,7 +38,6 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return this.handleUnknownCommand(resources, element, info, existingInstruction);
},
writable: true,
enumerable: true,
configurable: true
},
handleUnknownCommand: {
Expand All @@ -60,7 +55,6 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return instruction;
},
writable: true,
enumerable: true,
configurable: true
},
determineDefaultBindingMode: {
Expand All @@ -76,7 +70,6 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return ONE_WAY;
},
writable: true,
enumerable: true,
configurable: true
},
bind: {
Expand All @@ -88,23 +81,20 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return instruction;
},
writable: true,
enumerable: true,
configurable: true
},
trigger: {
value: function trigger(resources, element, info) {
return new ListenerExpression(this.eventManager, info.attrName, this.parser.parse(info.attrValue), false, true);
},
writable: true,
enumerable: true,
configurable: true
},
delegate: {
value: function delegate(resources, element, info) {
return new ListenerExpression(this.eventManager, info.attrName, this.parser.parse(info.attrValue), true, true);
},
writable: true,
enumerable: true,
configurable: true
},
call: {
Expand All @@ -116,7 +106,6 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return instruction;
},
writable: true,
enumerable: true,
configurable: true
},
options: {
Expand Down Expand Up @@ -163,16 +152,13 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
return instruction;
},
writable: true,
enumerable: true,
configurable: true
}
});

return SyntaxInterpreter;
})();

exports.SyntaxInterpreter = SyntaxInterpreter;


SyntaxInterpreter.prototype["for"] = function (resources, element, info, existingInstruction) {
var parts = info.attrValue.split(" of ");
Expand All @@ -183,8 +169,17 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {

var instruction = existingInstruction || { attrName: info.attrName, attributes: {} };

instruction.attributes.local = parts[0];
instruction.attributes[info.attrName] = new BindingExpression(this.observerLocator, info.attrName, this.parser.parse(parts[1]), ONE_WAY, resources.valueConverterLookupFunction);
if (parts[0].match(/[[].+[,]\s.+[\]]/)) {
var firstPart = parts[0];
parts[0] = firstPart.substr(1, firstPart.indexOf(",") - 1);
parts.splice(1, 0, firstPart.substring(firstPart.indexOf(", ") + 2, firstPart.length - 1));
instruction.attributes.key = parts[0];
instruction.attributes.value = parts[1];
} else {
instruction.attributes.local = parts[0];
}

instruction.attributes[info.attrName] = new BindingExpression(this.observerLocator, info.attrName, this.parser.parse(parts[parts.length - 1]), ONE_WAY, resources.valueConverterLookupFunction);

return instruction;
};
Expand Down Expand Up @@ -216,4 +211,5 @@ define(["exports", "aurelia-binding"], function (exports, _aureliaBinding) {
SyntaxInterpreter.prototype["view-model"] = function (resources, element, info) {
return new NameExpression(info.attrValue, "view-model");
};
exports.__esModule = true;
});
Loading

0 comments on commit e202cd5

Please sign in to comment.