Skip to content

Commit

Permalink
chore(*): prepare release 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Dec 18, 2014
1 parent c754589 commit a807329
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 17 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-resources",
"version": "0.3.1",
"version": "0.3.2",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand Down
15 changes: 11 additions & 4 deletions dist/amd/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating"], functi
var NoView = _aureliaTemplating.NoView;
var UseView = _aureliaTemplating.UseView;
var ViewEngine = _aureliaTemplating.ViewEngine;
var ViewResources = _aureliaTemplating.ViewResources;
var Compose = (function () {
var Compose = function Compose(container, resourceCoordinator, viewEngine, viewSlot) {
var Compose = function Compose(container, resourceCoordinator, viewEngine, viewSlot, viewResources) {
this.container = container;
this.resourceCoordinator = resourceCoordinator;
this.viewEngine = viewEngine;
this.viewSlot = viewSlot;
this.viewResources = viewResources;
};

Compose.annotations = function () {
return [new CustomElement("compose"), new Property("model"), new Property("view"), new Property("viewModel"), new NoView()];
};

Compose.inject = function () {
return [Container, ResourceCoordinator, ViewEngine, ViewSlot];
return [Container, ResourceCoordinator, ViewEngine, ViewSlot, ViewResources];
};

Compose.prototype.bind = function (executionContext) {
Expand Down Expand Up @@ -79,8 +81,13 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating"], functi
function processInstruction(composer, instruction) {
var useView, result, options, childContainer;

if (typeof instruction.viewModel == "string") {
composer.resourceCoordinator.loadAnonymousElement(composer.viewModel, null, instruction.view).then(function (type) {
if (instruction.view) {
instruction.view = composer.viewResources.relativeToView(instruction.view);
}

if (typeof instruction.viewModel === "string") {
instruction.viewModel = composer.viewResources.relativeToView(instruction.viewModel);
composer.resourceCoordinator.loadAnonymousElement(instruction.viewModel, null, instruction.view).then(function (type) {
childContainer = composer.container.createChild();
options = { suppressBind: true };
result = type.create(childContainer, options);
Expand Down
15 changes: 11 additions & 4 deletions dist/commonjs/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ var ViewSlot = require('aurelia-templating').ViewSlot;
var NoView = require('aurelia-templating').NoView;
var UseView = require('aurelia-templating').UseView;
var ViewEngine = require('aurelia-templating').ViewEngine;
var ViewResources = require('aurelia-templating').ViewResources;
var Compose = (function () {
var Compose = function Compose(container, resourceCoordinator, viewEngine, viewSlot) {
var Compose = function Compose(container, resourceCoordinator, viewEngine, viewSlot, viewResources) {
this.container = container;
this.resourceCoordinator = resourceCoordinator;
this.viewEngine = viewEngine;
this.viewSlot = viewSlot;
this.viewResources = viewResources;
};

Compose.annotations = function () {
return [new CustomElement("compose"), new Property("model"), new Property("view"), new Property("viewModel"), new NoView()];
};

Compose.inject = function () {
return [Container, ResourceCoordinator, ViewEngine, ViewSlot];
return [Container, ResourceCoordinator, ViewEngine, ViewSlot, ViewResources];
};

Compose.prototype.bind = function (executionContext) {
Expand Down Expand Up @@ -78,8 +80,13 @@ function processBehavior(composer, instruction, behavior) {
function processInstruction(composer, instruction) {
var useView, result, options, childContainer;

if (typeof instruction.viewModel == "string") {
composer.resourceCoordinator.loadAnonymousElement(composer.viewModel, null, instruction.view).then(function (type) {
if (instruction.view) {
instruction.view = composer.viewResources.relativeToView(instruction.view);
}

if (typeof instruction.viewModel === "string") {
instruction.viewModel = composer.viewResources.relativeToView(instruction.viewModel);
composer.resourceCoordinator.loadAnonymousElement(instruction.viewModel, null, instruction.view).then(function (type) {
childContainer = composer.container.createChild();
options = { suppressBind: true };
result = type.create(childContainer, options);
Expand Down
19 changes: 12 additions & 7 deletions dist/es6/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
ViewSlot,
NoView,
UseView,
ViewEngine
ViewEngine,
ViewResources
} from 'aurelia-templating';

export class Compose {
Expand All @@ -20,12 +21,13 @@ export class Compose {
];
}

static inject(){ return [Container,ResourceCoordinator,ViewEngine,ViewSlot]; }
constructor(container, resourceCoordinator, viewEngine, viewSlot){
static inject(){ return [Container,ResourceCoordinator,ViewEngine,ViewSlot,ViewResources]; }
constructor(container, resourceCoordinator, viewEngine, viewSlot, viewResources){
this.container = container;
this.resourceCoordinator = resourceCoordinator;
this.viewEngine = viewEngine;
this.viewSlot = viewSlot;
this.viewResources = viewResources;
}

bind(executionContext){
Expand Down Expand Up @@ -75,9 +77,13 @@ function processBehavior(composer, instruction, behavior){
function processInstruction(composer, instruction){
var useView, result, options, childContainer;

if(typeof instruction.viewModel == 'string'){
//TODO: make instruction.viewModel relative to compose's containing view
composer.resourceCoordinator.loadAnonymousElement(composer.viewModel, null, instruction.view).then(type => {
if(instruction.view){
instruction.view = composer.viewResources.relativeToView(instruction.view);
}

if(typeof instruction.viewModel === 'string'){
instruction.viewModel = composer.viewResources.relativeToView(instruction.viewModel);
composer.resourceCoordinator.loadAnonymousElement(instruction.viewModel, null, instruction.view).then(type => {
childContainer= composer.container.createChild();
options = {suppressBind:true};
result = type.create(childContainer, options);
Expand All @@ -86,7 +92,6 @@ function processInstruction(composer, instruction){
});
}else{
if(instruction.view) {
//TODO: make instruction.view relative to compose's containing view
useView = new UseView(instruction.view);
}

Expand Down
13 changes: 13 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### 0.3.2 (2014-12-18)


#### Bug Fixes

* **package:** update templating to latest version ([c754589a](http://github.com/aurelia/templating-resources/commit/c754589a1972dc7346b41e3a2558b7d574d8ad28))


#### Features

* **compose:** view and view-model are now relative ([0b54a750](http://github.com/aurelia/templating-resources/commit/0b54a750c21211f2071723d08e767bc035dfb745))


### 0.3.1 (2014-12-18)


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-resources",
"version": "0.3.1",
"version": "0.3.2",
"description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit a807329

Please sign in to comment.