Skip to content

Commit

Permalink
chore(all): prepare release 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jan 13, 2015
1 parent ae6cf40 commit 8756cc1
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 18 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.7.1",
"version": "0.7.2",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down
21 changes: 17 additions & 4 deletions dist/amd/composition-engine.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
define(["exports", "./view-strategy", "./resource-coordinator", "./view-engine", "./custom-element"], function (exports, _viewStrategy, _resourceCoordinator, _viewEngine, _customElement) {
define(["exports", "aurelia-metadata", "./view-strategy", "./resource-coordinator", "./view-engine", "./custom-element"], function (exports, _aureliaMetadata, _viewStrategy, _resourceCoordinator, _viewEngine, _customElement) {
"use strict";

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

var Origin = _aureliaMetadata.Origin;
var ViewStrategy = _viewStrategy.ViewStrategy;
var UseView = _viewStrategy.UseView;
var ResourceCoordinator = _resourceCoordinator.ResourceCoordinator;
Expand Down Expand Up @@ -62,14 +63,22 @@ define(["exports", "./view-strategy", "./resource-coordinator", "./view-engine",
viewModel = instruction.viewModel;

return this.activate(instruction).then(function () {
var doneLoading;
var doneLoading, viewStrategyFromViewModel, origin;

if ("getViewStrategy" in viewModel && !instruction.view) {
viewStrategyFromViewModel = true;
instruction.view = ViewStrategy.normalize(viewModel.getViewStrategy());
}

if (instruction.view && instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
if (instruction.view) {
if (viewStrategyFromViewModel) {
origin = Origin.get(viewModel.constructor);
if (origin) {
instruction.view.makeRelativeTo(origin.moduleId);
}
} else if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}
}

if (viewModelInfo) {
Expand Down Expand Up @@ -119,6 +128,10 @@ define(["exports", "./view-strategy", "./resource-coordinator", "./view-engine",
return this.createBehaviorAndSwap(instruction);
}
} else if (instruction.view) {
if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}

return instruction.view.loadViewFactory(this.viewEngine).then(function (viewFactory) {
result = viewFactory.create(childContainer, instruction.executionContext);
instruction.viewSlot.swap(result);
Expand Down
4 changes: 4 additions & 0 deletions dist/amd/view-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ define(["exports", "aurelia-metadata", "aurelia-path"], function (exports, _aure
_prototypeProperties(UseView, null, {
loadViewFactory: {
value: function (viewEngine, options) {
if (!this.absolutePath && this.moduleId) {
this.absolutePath = relativeToFile(this.path, this.moduleId);
}

return viewEngine.loadViewFactory(this.absolutePath || this.path, options, this.moduleId);
},
writable: true,
Expand Down
19 changes: 16 additions & 3 deletions dist/commonjs/composition-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var _prototypeProperties = function (child, staticProps, instanceProps) {
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};

var Origin = require("aurelia-metadata").Origin;
var ViewStrategy = require("./view-strategy").ViewStrategy;
var UseView = require("./view-strategy").UseView;
var ResourceCoordinator = require("./resource-coordinator").ResourceCoordinator;
Expand Down Expand Up @@ -61,14 +62,22 @@ var CompositionEngine = (function () {
viewModel = instruction.viewModel;

return this.activate(instruction).then(function () {
var doneLoading;
var doneLoading, viewStrategyFromViewModel, origin;

if ("getViewStrategy" in viewModel && !instruction.view) {
viewStrategyFromViewModel = true;
instruction.view = ViewStrategy.normalize(viewModel.getViewStrategy());
}

if (instruction.view && instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
if (instruction.view) {
if (viewStrategyFromViewModel) {
origin = Origin.get(viewModel.constructor);
if (origin) {
instruction.view.makeRelativeTo(origin.moduleId);
}
} else if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}
}

if (viewModelInfo) {
Expand Down Expand Up @@ -118,6 +127,10 @@ var CompositionEngine = (function () {
return this.createBehaviorAndSwap(instruction);
}
} else if (instruction.view) {
if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}

return instruction.view.loadViewFactory(this.viewEngine).then(function (viewFactory) {
result = viewFactory.create(childContainer, instruction.executionContext);
instruction.viewSlot.swap(result);
Expand Down
4 changes: 4 additions & 0 deletions dist/commonjs/view-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ var UseView = (function (ViewStrategy) {
_prototypeProperties(UseView, null, {
loadViewFactory: {
value: function (viewEngine, options) {
if (!this.absolutePath && this.moduleId) {
this.absolutePath = relativeToFile(this.path, this.moduleId);
}

return viewEngine.loadViewFactory(this.absolutePath || this.path, options, this.moduleId);
},
writable: true,
Expand Down
19 changes: 16 additions & 3 deletions dist/es6/composition-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {Origin} from 'aurelia-metadata';
import {ViewStrategy, UseView} from './view-strategy';
import {ResourceCoordinator} from './resource-coordinator';
import {ViewEngine} from './view-engine';
Expand Down Expand Up @@ -36,14 +37,22 @@ export class CompositionEngine {
viewModel = instruction.viewModel;

return this.activate(instruction).then(() => {
var doneLoading;
var doneLoading, viewStrategyFromViewModel, origin;

if('getViewStrategy' in viewModel && !instruction.view){
viewStrategyFromViewModel = true;
instruction.view = ViewStrategy.normalize(viewModel.getViewStrategy());
}

if(instruction.view && instruction.viewResources){
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
if (instruction.view) {
if(viewStrategyFromViewModel){
origin = Origin.get(viewModel.constructor);
if(origin){
instruction.view.makeRelativeTo(origin.moduleId);
}
}else if(instruction.viewResources){
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}
}

if(viewModelInfo){
Expand Down Expand Up @@ -86,6 +95,10 @@ export class CompositionEngine {
return this.createBehaviorAndSwap(instruction);
}
}else if(instruction.view){
if(instruction.viewResources){
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}

return instruction.view.loadViewFactory(this.viewEngine).then(viewFactory => {
result = viewFactory.create(childContainer, instruction.executionContext);
instruction.viewSlot.swap(result);
Expand Down
4 changes: 4 additions & 0 deletions dist/es6/view-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export class UseView extends ViewStrategy {
}

loadViewFactory(viewEngine, options){
if(!this.absolutePath && this.moduleId){
this.absolutePath = relativeToFile(this.path, this.moduleId);
}

return viewEngine.loadViewFactory(this.absolutePath || this.path, options, this.moduleId);
}

Expand Down
26 changes: 20 additions & 6 deletions dist/system/composition-engine.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
System.register(["./view-strategy", "./resource-coordinator", "./view-engine", "./custom-element"], function (_export) {
System.register(["aurelia-metadata", "./view-strategy", "./resource-coordinator", "./view-engine", "./custom-element"], function (_export) {
"use strict";

var ViewStrategy, UseView, ResourceCoordinator, ViewEngine, CustomElement, _prototypeProperties, CompositionEngine;
var Origin, ViewStrategy, UseView, ResourceCoordinator, ViewEngine, CustomElement, _prototypeProperties, CompositionEngine;
return {
setters: [function (_viewStrategy) {
setters: [function (_aureliaMetadata) {
Origin = _aureliaMetadata.Origin;
}, function (_viewStrategy) {
ViewStrategy = _viewStrategy.ViewStrategy;
UseView = _viewStrategy.UseView;
}, function (_resourceCoordinator) {
Expand Down Expand Up @@ -70,14 +72,22 @@ System.register(["./view-strategy", "./resource-coordinator", "./view-engine", "
viewModel = instruction.viewModel;

return this.activate(instruction).then(function () {
var doneLoading;
var doneLoading, viewStrategyFromViewModel, origin;

if ("getViewStrategy" in viewModel && !instruction.view) {
viewStrategyFromViewModel = true;
instruction.view = ViewStrategy.normalize(viewModel.getViewStrategy());
}

if (instruction.view && instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
if (instruction.view) {
if (viewStrategyFromViewModel) {
origin = Origin.get(viewModel.constructor);
if (origin) {
instruction.view.makeRelativeTo(origin.moduleId);
}
} else if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}
}

if (viewModelInfo) {
Expand Down Expand Up @@ -127,6 +137,10 @@ System.register(["./view-strategy", "./resource-coordinator", "./view-engine", "
return this.createBehaviorAndSwap(instruction);
}
} else if (instruction.view) {
if (instruction.viewResources) {
instruction.view.makeRelativeTo(instruction.viewResources.viewUrl);
}

return instruction.view.loadViewFactory(this.viewEngine).then(function (viewFactory) {
result = viewFactory.create(childContainer, instruction.executionContext);
instruction.viewSlot.swap(result);
Expand Down
4 changes: 4 additions & 0 deletions dist/system/view-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ System.register(["aurelia-metadata", "aurelia-path"], function (_export) {
_prototypeProperties(UseView, null, {
loadViewFactory: {
value: function (viewEngine, options) {
if (!this.absolutePath && this.moduleId) {
this.absolutePath = relativeToFile(this.path, this.moduleId);
}

return viewEngine.loadViewFactory(this.absolutePath || this.path, options, this.moduleId);
},
writable: true,
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.7.2 (2015-01-13)


#### Bug Fixes

* **view-strategy:** dynamic strategy hook results should be relative to view-model ([ae6cf40c](http://github.com/aurelia/templating/commit/ae6cf40cbaffc7504867100e10e709a780231d82))


### 0.7.1 (2015-01-12)


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.7.1",
"version": "0.7.2",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 8756cc1

Please sign in to comment.