diff --git a/bower.json b/bower.json index 7876764..35db77f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-router", - "version": "0.8.0", + "version": "0.9.0", "description": "An implementation of the RouteLoader interface for use with the router module. Also contains a custom element that allows the templating engine to display the current route.", "keywords": [ "aurelia", diff --git a/dist/amd/route-loader.js b/dist/amd/route-loader.js index e19fda6..869c6e3 100644 --- a/dist/amd/route-loader.js +++ b/dist/amd/route-loader.js @@ -35,7 +35,7 @@ define(["exports", "aurelia-templating", "aurelia-router", "aurelia-path", "aure _prototypeProperties(TemplatingRouteLoader, { inject: { - value: function () { + value: function inject() { return [CompositionEngine]; }, writable: true, @@ -44,7 +44,7 @@ define(["exports", "aurelia-templating", "aurelia-router", "aurelia-path", "aure } }, { loadRoute: { - value: function (router, config) { + value: function loadRoute(router, config) { var childContainer = router.container.createChild(), instruction = { viewModel: relativeToFile(config.moduleId, Origin.get(router.container.viewModel.constructor).moduleId), diff --git a/dist/amd/router-view.js b/dist/amd/router-view.js index 36525ed..e367233 100644 --- a/dist/amd/router-view.js +++ b/dist/amd/router-view.js @@ -7,12 +7,10 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating", "aureli }; var Container = _aureliaDependencyInjection.Container; - var CustomElement = _aureliaTemplating.CustomElement; var ViewSlot = _aureliaTemplating.ViewSlot; var ViewStrategy = _aureliaTemplating.ViewStrategy; - var UseView = _aureliaTemplating.UseView; - var NoView = _aureliaTemplating.NoView; var Router = _aureliaRouter.Router; + var Metadata = _aureliaMetadata.Metadata; var Origin = _aureliaMetadata.Origin; var RouterView = (function () { function RouterView(element, container, viewSlot, router) { @@ -24,16 +22,16 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating", "aureli } _prototypeProperties(RouterView, { - annotations: { - value: function () { - return [new CustomElement("router-view"), new NoView()]; + metadata: { + value: function metadata() { + return Metadata.customElement("router-view").noView(); }, writable: true, enumerable: true, configurable: true }, inject: { - value: function () { + value: function inject() { return [Element, Container, ViewSlot, Router]; }, writable: true, @@ -42,7 +40,7 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating", "aureli } }, { process: { - value: function (viewPortInstruction, waitToSwap) { + value: function process(viewPortInstruction, waitToSwap) { var _this = this; var component = viewPortInstruction.component, viewStrategy = component.view, @@ -74,7 +72,7 @@ define(["exports", "aurelia-dependency-injection", "aurelia-templating", "aureli configurable: true }, swap: { - value: function (viewPortInstruction) { + value: function swap(viewPortInstruction) { this.viewSlot.swap(viewPortInstruction.behavior.view); if (this.view) { diff --git a/dist/commonjs/route-loader.js b/dist/commonjs/route-loader.js index 9d700b0..c997ef1 100644 --- a/dist/commonjs/route-loader.js +++ b/dist/commonjs/route-loader.js @@ -34,7 +34,7 @@ var TemplatingRouteLoader = (function (RouteLoader) { _prototypeProperties(TemplatingRouteLoader, { inject: { - value: function () { + value: function inject() { return [CompositionEngine]; }, writable: true, @@ -43,7 +43,7 @@ var TemplatingRouteLoader = (function (RouteLoader) { } }, { loadRoute: { - value: function (router, config) { + value: function loadRoute(router, config) { var childContainer = router.container.createChild(), instruction = { viewModel: relativeToFile(config.moduleId, Origin.get(router.container.viewModel.constructor).moduleId), diff --git a/dist/commonjs/router-view.js b/dist/commonjs/router-view.js index 210cf98..637ea8a 100644 --- a/dist/commonjs/router-view.js +++ b/dist/commonjs/router-view.js @@ -6,12 +6,10 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { }; var Container = require("aurelia-dependency-injection").Container; -var CustomElement = require("aurelia-templating").CustomElement; var ViewSlot = require("aurelia-templating").ViewSlot; var ViewStrategy = require("aurelia-templating").ViewStrategy; -var UseView = require("aurelia-templating").UseView; -var NoView = require("aurelia-templating").NoView; var Router = require("aurelia-router").Router; +var Metadata = require("aurelia-metadata").Metadata; var Origin = require("aurelia-metadata").Origin; var RouterView = (function () { function RouterView(element, container, viewSlot, router) { @@ -23,16 +21,16 @@ var RouterView = (function () { } _prototypeProperties(RouterView, { - annotations: { - value: function () { - return [new CustomElement("router-view"), new NoView()]; + metadata: { + value: function metadata() { + return Metadata.customElement("router-view").noView(); }, writable: true, enumerable: true, configurable: true }, inject: { - value: function () { + value: function inject() { return [Element, Container, ViewSlot, Router]; }, writable: true, @@ -41,7 +39,7 @@ var RouterView = (function () { } }, { process: { - value: function (viewPortInstruction, waitToSwap) { + value: function process(viewPortInstruction, waitToSwap) { var _this = this; var component = viewPortInstruction.component, viewStrategy = component.view, @@ -73,7 +71,7 @@ var RouterView = (function () { configurable: true }, swap: { - value: function (viewPortInstruction) { + value: function swap(viewPortInstruction) { this.viewSlot.swap(viewPortInstruction.behavior.view); if (this.view) { diff --git a/dist/es6/router-view.js b/dist/es6/router-view.js index 90193ea..83ac2e7 100644 --- a/dist/es6/router-view.js +++ b/dist/es6/router-view.js @@ -1,16 +1,10 @@ import {Container} from 'aurelia-dependency-injection'; -import {CustomElement, ViewSlot, ViewStrategy, UseView, NoView} from 'aurelia-templating'; +import {ViewSlot, ViewStrategy} from 'aurelia-templating'; import {Router} from 'aurelia-router'; -import {Origin} from 'aurelia-metadata'; +import {Metadata, Origin} from 'aurelia-metadata'; export class RouterView { - static annotations(){ - return [ - new CustomElement('router-view'), - new NoView() - ]; - } - + static metadata(){ return Metadata.customElement('router-view').noView(); } static inject() { return [Element,Container,ViewSlot,Router]; } constructor(element, container, viewSlot, router) { this.element = element; diff --git a/dist/system/route-loader.js b/dist/system/route-loader.js index 12f8780..06d37e9 100644 --- a/dist/system/route-loader.js +++ b/dist/system/route-loader.js @@ -43,7 +43,7 @@ System.register(["aurelia-templating", "aurelia-router", "aurelia-path", "aureli _prototypeProperties(TemplatingRouteLoader, { inject: { - value: function () { + value: function inject() { return [CompositionEngine]; }, writable: true, @@ -52,7 +52,7 @@ System.register(["aurelia-templating", "aurelia-router", "aurelia-path", "aureli } }, { loadRoute: { - value: function (router, config) { + value: function loadRoute(router, config) { var childContainer = router.container.createChild(), instruction = { viewModel: relativeToFile(config.moduleId, Origin.get(router.container.viewModel.constructor).moduleId), diff --git a/dist/system/router-view.js b/dist/system/router-view.js index 34400de..59b9337 100644 --- a/dist/system/router-view.js +++ b/dist/system/router-view.js @@ -1,19 +1,17 @@ System.register(["aurelia-dependency-injection", "aurelia-templating", "aurelia-router", "aurelia-metadata"], function (_export) { "use strict"; - var Container, CustomElement, ViewSlot, ViewStrategy, UseView, NoView, Router, Origin, _prototypeProperties, RouterView; + var Container, ViewSlot, ViewStrategy, Router, Metadata, Origin, _prototypeProperties, RouterView; return { setters: [function (_aureliaDependencyInjection) { Container = _aureliaDependencyInjection.Container; }, function (_aureliaTemplating) { - CustomElement = _aureliaTemplating.CustomElement; ViewSlot = _aureliaTemplating.ViewSlot; ViewStrategy = _aureliaTemplating.ViewStrategy; - UseView = _aureliaTemplating.UseView; - NoView = _aureliaTemplating.NoView; }, function (_aureliaRouter) { Router = _aureliaRouter.Router; }, function (_aureliaMetadata) { + Metadata = _aureliaMetadata.Metadata; Origin = _aureliaMetadata.Origin; }], execute: function () { @@ -32,16 +30,16 @@ System.register(["aurelia-dependency-injection", "aurelia-templating", "aurelia- } _prototypeProperties(RouterView, { - annotations: { - value: function () { - return [new CustomElement("router-view"), new NoView()]; + metadata: { + value: function metadata() { + return Metadata.customElement("router-view").noView(); }, writable: true, enumerable: true, configurable: true }, inject: { - value: function () { + value: function inject() { return [Element, Container, ViewSlot, Router]; }, writable: true, @@ -50,7 +48,7 @@ System.register(["aurelia-dependency-injection", "aurelia-templating", "aurelia- } }, { process: { - value: function (viewPortInstruction, waitToSwap) { + value: function process(viewPortInstruction, waitToSwap) { var _this = this; var component = viewPortInstruction.component, viewStrategy = component.view, @@ -82,7 +80,7 @@ System.register(["aurelia-dependency-injection", "aurelia-templating", "aurelia- configurable: true }, swap: { - value: function (viewPortInstruction) { + value: function swap(viewPortInstruction) { this.viewSlot.swap(viewPortInstruction.behavior.view); if (this.view) { diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index ee61240..808c317 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,17 @@ +## 0.9.0 (2015-01-22) + + +#### Bug Fixes + +* **package:** update dependencies ([f956c4ff](http://github.com/aurelia/templating-router/commit/f956c4ff85900c7e2c323d18b161a8ae74fa2dbb)) +* **router-view:** update to latest metadata api ([9813b21a](http://github.com/aurelia/templating-router/commit/9813b21a71b8d4c301625724a9e2ec203c78ab00)) + + +#### Features + +* **router-view:** update to new fluent metadata ([3335a303](http://github.com/aurelia/templating-router/commit/3335a3030f24c41357a28bcf4995c5a0556acbca)) + + ## 0.8.0 (2015-01-12) diff --git a/package.json b/package.json index d5c9af1..b1a910d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-router", - "version": "0.8.0", + "version": "0.9.0", "description": "An implementation of the RouteLoader interface for use with the router module. Also contains a custom element that allows the templating engine to display the current route.", "keywords": [ "aurelia",