diff --git a/bower.json b/bower.json
index 5fe4e43..372cc5a 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating-router",
- "version": "1.4.0",
+ "version": "1.5.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/aurelia-templating-router.js b/dist/amd/aurelia-templating-router.js
index bb02d8d..ce2fbe7 100644
--- a/dist/amd/aurelia-templating-router.js
+++ b/dist/amd/aurelia-templating-router.js
@@ -1,43 +1,62 @@
-define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metadata', 'aurelia-path', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-pal', 'aurelia-logging'], function (exports, aureliaRouter, aureliaMetadata, aureliaPath, aureliaTemplating, aureliaDependencyInjection, aureliaBinding, aureliaPal, LogManager) { 'use strict';
+define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metadata', 'aurelia-path', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-pal', 'aurelia-logging'], (function (exports, aureliaRouter, aureliaMetadata, aureliaPath, aureliaTemplating, aureliaDependencyInjection, aureliaBinding, aureliaPal, LogManager) { 'use strict';
+
+ function _interopNamespace(e) {
+ if (e && e.__esModule) return e;
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () { return e[k]; }
+ });
+ }
+ });
+ }
+ n["default"] = e;
+ return Object.freeze(n);
+ }
+
+ var LogManager__namespace = /*#__PURE__*/_interopNamespace(LogManager);
/*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
+ Copyright (c) Microsoft Corporation.
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted.
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
- var EmptyLayoutViewModel = /** @class */ (function () {
+ var EmptyLayoutViewModel = (function () {
function EmptyLayoutViewModel() {
}
return EmptyLayoutViewModel;
}());
- /**
- * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
- */
- var RouterView = /** @class */ (function () {
+ var RouterView = (function () {
function RouterView(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {
this.element = element;
this.container = container;
@@ -46,21 +65,12 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
this.viewLocator = viewLocator;
this.compositionTransaction = compositionTransaction;
this.compositionEngine = compositionEngine;
- // add this to router view ports lookup based on name attribute
- // when this router is the root router-view
- // also trigger AppRouter registerViewPort extra flow
this.router.registerViewPort(this, this.element.getAttribute('name'));
- // Each process its instruction as a composition transaction
- // there are differences between intial composition and subsequent compositions
- // also there are differences between root composition and child composition
- // mark the first composition transaction with a property initialComposition to distinguish it
- // when the root gets new instruction for the first time
if (!('initialComposition' in compositionTransaction)) {
compositionTransaction.initialComposition = true;
this.compositionTransactionNotifier = compositionTransaction.enlist();
}
}
- /**@internal */
RouterView.inject = function () {
return [aureliaPal.DOM.Element, aureliaDependencyInjection.Container, aureliaTemplating.ViewSlot, aureliaRouter.Router, aureliaTemplating.ViewLocator, aureliaTemplating.CompositionTransaction, aureliaTemplating.CompositionEngine];
};
@@ -68,17 +78,11 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
this.owningView = owningView;
};
RouterView.prototype.bind = function (bindingContext, overrideContext) {
- // router needs to get access to view model of current route parent
- // doing it in generic way via viewModel property on container
this.container.viewModel = bindingContext;
this.overrideContext = overrideContext;
};
- /**
- * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline
- */
RouterView.prototype.process = function ($viewPortInstruction, waitToSwap) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var component = viewPortInstruction.component;
var childContainer = component.childContainer;
@@ -88,7 +92,6 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
var config = component.router.currentInstruction.config;
var viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};
childContainer.get(RouterViewLocator)._notify(this);
- // layoutInstruction is our layout viewModel
var layoutInstruction = {
viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,
view: viewPortConfig.layoutView || config.layoutView || this.layoutView,
@@ -97,24 +100,13 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
childContainer: childContainer,
viewSlot: this.viewSlot
};
- // viewport will be a thin wrapper around composition engine
- // to process instruction/configuration from users
- // preparing all information related to a composition process
- // first by getting view strategy of a ViewPortComponent View
var viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);
if (viewStrategy && component.view) {
viewStrategy.makeRelativeTo(aureliaMetadata.Origin.get(component.router.container.viewModel.constructor).moduleId);
}
- // using metadata of a custom element view model to load appropriate view-factory instance
return metadata
.load(childContainer, viewModelResource.value, null, viewStrategy, true)
- // for custom element, viewFactory typing is always ViewFactory
- // for custom attribute, it will be HtmlBehaviorResource
.then(function (viewFactory) {
- // if this is not the first time that this is composing its instruction
- // try to capture ownership of the composition transaction
- // child will not be able to capture, since root typically captures
- // the ownership token
if (!_this.compositionTransactionNotifier) {
_this.compositionTransactionOwnershipToken = _this.compositionTransaction.tryCapture();
}
@@ -131,12 +123,10 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
};
RouterView.prototype.swap = function ($viewPortInstruction) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var viewPortController = viewPortInstruction.controller;
var layoutInstruction = viewPortInstruction.layoutInstruction;
var previousView = this.view;
- // Final step of swapping a ViewPortComponent
var work = function () {
var swapStrategy = aureliaTemplating.SwapStrategies[_this.swapOrder] || aureliaTemplating.SwapStrategies.after;
var viewSlot = _this.viewSlot;
@@ -144,14 +134,9 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
_this._notify();
});
};
- // Ensure all users setups have been completed
var ready = function (owningView_or_layoutView) {
viewPortController.automate(_this.overrideContext, owningView_or_layoutView);
var transactionOwnerShipToken = _this.compositionTransactionOwnershipToken;
- // if this router-view is the root of a normal startup via aurelia.setRoot
- // attemp to take control of the transaction
- // if ownership can be taken
- // wait for transaction to complete before swapping
if (transactionOwnerShipToken) {
return transactionOwnerShipToken
.waitForCompositionComplete()
@@ -160,28 +145,17 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
return work();
});
}
- // otherwise, just swap
return work();
};
- // If there is layout instruction, new to compose layout before processing ViewPortComponent
- // layout controller/view/view-model is composed using composition engine APIs
if (layoutInstruction) {
if (!layoutInstruction.viewModel) {
- // createController chokes if there's no viewmodel, so create a dummy one
- // but avoid using a POJO as it creates unwanted metadata in Object constructor
layoutInstruction.viewModel = new EmptyLayoutViewModel();
}
- // using composition engine to create compose layout
return this.compositionEngine
- // first create controller from layoutInstruction
- // and treat it as CompositionContext
- // then emulate slot projection with ViewPortComponent view
.createController(layoutInstruction)
.then(function (layoutController) {
var layoutView = layoutController.view;
aureliaTemplating.ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);
- // when there is a layout
- // view hierarchy is: owner view -> layout view -> ViewPortComponent view
layoutController.automate(aureliaBinding.createOverrideContext(layoutInstruction.viewModel), _this.owningView);
layoutView.children.push(viewPortController.view);
return layoutView || layoutController;
@@ -191,18 +165,9 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
return ready(newView);
});
}
- // if there is no layout, then get ViewPortComponent view ready as view property
- // and process controller/swapping
- // when there is no layout
- // view hierarchy is: owner view -> ViewPortComponent view
this.view = viewPortController.view;
return ready(this.owningView);
};
- /**
- * Notify composition transaction that this router has finished processing
- * Happens when this is the root router-view
- * @internal
- */
RouterView.prototype._notify = function () {
var notifier = this.compositionTransactionNotifier;
if (notifier) {
@@ -210,69 +175,40 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
this.compositionTransactionNotifier = null;
}
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- *
- * There is no view to compose by default in a router view
- * This custom element is responsible for composing its own view, based on current config
- */
RouterView.$view = null;
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouterView.$resource = {
name: 'router-view',
bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context']
};
return RouterView;
}());
- /**
- * Locator which finds the nearest RouterView, relative to the current dependency injection container.
- */
- var RouterViewLocator = /** @class */ (function () {
- /**
- * Creates an instance of the RouterViewLocator class.
- */
+ var RouterViewLocator = (function () {
function RouterViewLocator() {
var _this = this;
this.promise = new Promise(function (resolve) { return _this.resolve = resolve; });
}
- /**
- * Finds the nearest RouterView instance.
- * @returns A promise that will be resolved with the located RouterView instance.
- */
RouterViewLocator.prototype.findNearest = function () {
return this.promise;
};
- /**@internal */
RouterViewLocator.prototype._notify = function (routerView) {
this.resolve(routerView);
};
return RouterViewLocator;
}());
- /**@internal exported for unit testing */
- var EmptyClass = /** @class */ (function () {
+ var EmptyClass = (function () {
function EmptyClass() {
}
return EmptyClass;
}());
aureliaTemplating.inlineView('')(EmptyClass);
- /**
- * Default implementation of `RouteLoader` used for loading component based on a route config
- */
- var TemplatingRouteLoader = /** @class */ (function (_super) {
+ var TemplatingRouteLoader = (function (_super) {
__extends(TemplatingRouteLoader, _super);
function TemplatingRouteLoader(compositionEngine) {
var _this = _super.call(this) || this;
_this.compositionEngine = compositionEngine;
return _this;
}
- /**
- * Resolve a view model from a RouteConfig
- * Throws when there is neither "moduleId" nor "viewModel" property
- * @internal
- */
TemplatingRouteLoader.prototype.resolveViewModel = function (router, config) {
return new Promise(function (resolve, reject) {
var viewModel;
@@ -282,9 +218,6 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
viewModel = EmptyClass;
}
else {
- // this requires container of router has passes a certain point
- // where a view model has been setup on the container
- // it will fail in enhance scenario because no viewport has been registered
moduleId = aureliaPath.relativeToFile(moduleId, aureliaMetadata.Origin.get(router.container.viewModel.constructor).moduleId);
if (/\.html/i.test(moduleId)) {
viewModel = createDynamicClass(moduleId);
@@ -295,15 +228,9 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
}
return resolve(viewModel);
}
- // todo: add if ('viewModel' in config) to support static view model resolution
reject(new Error('Invalid route config. No "moduleId" found.'));
});
};
- /**
- * Create child container based on a router container
- * Also ensures that child router are properly constructed in the newly created child container
- * @internal
- */
TemplatingRouteLoader.prototype.createChildContainer = function (router) {
var childContainer = router.container.createChild();
childContainer.registerSingleton(RouterViewLocator);
@@ -314,10 +241,7 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
};
return childContainer;
};
- /**
- * Load corresponding component of a route config of a navigation instruction
- */
- TemplatingRouteLoader.prototype.loadRoute = function (router, config, _navInstruction) {
+ TemplatingRouteLoader.prototype.loadRoute = function (router, config, navInstruction) {
var _this = this;
return this
.resolveViewModel(router, config)
@@ -328,14 +252,12 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
router: router
}); });
};
- /**@internal */
TemplatingRouteLoader.inject = [aureliaTemplating.CompositionEngine];
return TemplatingRouteLoader;
}(aureliaRouter.RouteLoader));
- /**@internal exported for unit testing */
function createDynamicClass(moduleId) {
var name = /([^\/^\?]+)\.html/i.exec(moduleId)[1];
- var DynamicClass = /** @class */ (function () {
+ var DynamicClass = (function () {
function DynamicClass() {
}
DynamicClass.prototype.bind = function (bindingContext) {
@@ -348,17 +270,13 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
return DynamicClass;
}
- var logger = LogManager.getLogger('route-href');
- /**
- * Helper custom attribute to help associate an element with a route by name
- */
- var RouteHref = /** @class */ (function () {
+ var logger = LogManager__namespace.getLogger('route-href');
+ var RouteHref = (function () {
function RouteHref(router, element) {
this.router = router;
this.element = element;
this.attribute = 'href';
}
- /*@internal */
RouteHref.inject = function () {
return [aureliaRouter.Router, aureliaPal.DOM.Element];
};
@@ -381,7 +299,6 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
.ensureConfigured()
.then(function () {
if (!_this.isActive) {
- // returning null to avoid Bluebird warning
return null;
}
var element = _this.element;
@@ -392,16 +309,12 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
else {
element.setAttribute(_this.attribute, href);
}
- // returning null to avoid Bluebird warning
return null;
})
.catch(function (reason) {
logger.error(reason);
});
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouteHref.$resource = {
type: 'attribute',
name: 'route-href',
@@ -409,7 +322,7 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
{ name: 'route', changeHandler: 'processChange', primaryProperty: true },
{ name: 'params', changeHandler: 'processChange' },
'attribute'
- ] // type definition of Aurelia templating is wrong
+ ]
};
return RouteHref;
}());
@@ -424,10 +337,11 @@ define('aurelia-templating-router', ['exports', 'aurelia-router', 'aurelia-metad
exports.RouteHref = RouteHref;
exports.RouterView = RouterView;
+ exports.RouterViewLocator = RouterViewLocator;
exports.TemplatingRouteLoader = TemplatingRouteLoader;
exports.configure = configure;
Object.defineProperty(exports, '__esModule', { value: true });
-});
+}));
//# sourceMappingURL=aurelia-templating-router.js.map
diff --git a/dist/amd/aurelia-templating-router.js.map b/dist/amd/aurelia-templating-router.js.map
index b2be828..d1ff3e3 100644
--- a/dist/amd/aurelia-templating-router.js.map
+++ b/dist/amd/aurelia-templating-router.js.map
@@ -1 +1 @@
-{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["import { Container } from 'aurelia-dependency-injection';\nimport { createOverrideContext, OverrideContext } from 'aurelia-binding';\nimport {\n ViewSlot,\n ViewLocator,\n BehaviorInstruction,\n CompositionTransaction,\n CompositionEngine,\n ShadowDOM,\n SwapStrategies,\n ResourceDescription,\n HtmlBehaviorResource,\n CompositionTransactionNotifier,\n View,\n CompositionTransactionOwnershipToken,\n Controller,\n ViewFactory,\n CompositionContext,\n IStaticResourceConfig,\n IStaticViewConfig\n} from 'aurelia-templating';\nimport {\n Router\n} from 'aurelia-router';\nimport { Origin } from 'aurelia-metadata';\nimport { DOM } from 'aurelia-pal';\nimport { IRouterViewViewPortInstruction, Constructable } from './interfaces';\n\nclass EmptyLayoutViewModel {\n\n}\n\n/**\n * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views\n */\nexport class RouterView {\n\n /**@internal */\n static inject() {\n return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n *\n * There is no view to compose by default in a router view\n * This custom element is responsible for composing its own view, based on current config\n */\n static $view: IStaticViewConfig = null;\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n name: 'router-view',\n bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context'] as any\n };\n\n /**\n * Swapping order when going to a new route. By default, supports 3 value: before, after, with\n * - before = new in -> old out\n * - after = old out -> new in\n * - with = new in + old out\n *\n * These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework\n * Can be extended there and used here\n */\n swapOrder?: string;\n\n /**\n * Layout view used for this router-view layout, if no layout-viewmodel specified\n */\n layoutView?: any;\n\n /**\n * Layout view model used as binding context for this router-view layout\n * Actual type would be {string | Constructable | object}\n */\n layoutViewModel?: any;\n\n /**\n * Layout model used to activate layout view model, if specified with `layoutViewModel`\n */\n layoutModel?: any;\n\n /**\n * Element associated with this custom element\n */\n readonly element: Element;\n\n /**\n * Current router associated with this \n */\n readonly router: Router;\n\n /**\n * Container at this level\n */\n container: Container;\n\n /**\n * @internal\n * the view slot for adding / removing Routing related views created dynamically\n */\n viewSlot: ViewSlot;\n\n /**\n * @internal\n * Used to mimic partially functionalities of CompositionEngine\n */\n viewLocator: ViewLocator;\n\n /**\n * @internal\n * View composed by the CompositionEngine, depends on layout / viewports/ moduleId / viewModel of routeconfig\n */\n view: View;\n\n /**\n * @internal\n * The view where this `` is placed in\n */\n owningView: View;\n\n /**\n * @internal\n * Composition Transaction of initial composition transaction, when this is created\n */\n compositionTransaction: CompositionTransaction;\n\n /**\n * @internal\n * CompositionEngine instance, responsible for composing view/view model during process changes phase of this \n */\n compositionEngine: CompositionEngine;\n\n /**\n * Composition transaction notifier instance. Created when this router-view composing its instruction\n * for the first time.\n * Null on 2nd time and after.\n * @internal\n */\n compositionTransactionNotifier: CompositionTransactionNotifier;\n\n /**\n * @internal\n */\n compositionTransactionOwnershipToken: CompositionTransactionOwnershipToken;\n\n /**\n * @internal\n */\n overrideContext: OverrideContext;\n\n constructor(\n element: Element,\n container: Container,\n viewSlot: ViewSlot,\n router: Router,\n viewLocator: ViewLocator,\n compositionTransaction: CompositionTransaction,\n compositionEngine: CompositionEngine\n ) {\n this.element = element;\n this.container = container;\n this.viewSlot = viewSlot;\n this.router = router;\n this.viewLocator = viewLocator;\n this.compositionTransaction = compositionTransaction;\n this.compositionEngine = compositionEngine;\n // add this to router view ports lookup based on name attribute\n // when this router is the root router-view\n // also trigger AppRouter registerViewPort extra flow\n this.router.registerViewPort(this, this.element.getAttribute('name'));\n\n // Each process its instruction as a composition transaction\n // there are differences between intial composition and subsequent compositions\n // also there are differences between root composition and child composition\n // mark the first composition transaction with a property initialComposition to distinguish it\n // when the root gets new instruction for the first time\n if (!('initialComposition' in compositionTransaction)) {\n compositionTransaction.initialComposition = true;\n this.compositionTransactionNotifier = compositionTransaction.enlist();\n }\n }\n\n created(owningView: View): void {\n this.owningView = owningView;\n }\n\n bind(bindingContext: any, overrideContext: OverrideContext): void {\n // router needs to get access to view model of current route parent\n // doing it in generic way via viewModel property on container\n this.container.viewModel = bindingContext;\n this.overrideContext = overrideContext;\n }\n\n /**\n * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline\n */\n process($viewPortInstruction: any, waitToSwap?: boolean): Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction = $viewPortInstruction as IRouterViewViewPortInstruction;\n const component = viewPortInstruction.component;\n const childContainer = component.childContainer;\n const viewModel = component.viewModel;\n const viewModelResource = component.viewModelResource as unknown as ResourceDescription;\n const metadata = viewModelResource.metadata;\n const config = component.router.currentInstruction.config;\n const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};\n\n (childContainer.get(RouterViewLocator) as RouterViewLocator)._notify(this);\n\n // layoutInstruction is our layout viewModel\n const layoutInstruction = {\n viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,\n view: viewPortConfig.layoutView || config.layoutView || this.layoutView,\n model: viewPortConfig.layoutModel || config.layoutModel || this.layoutModel,\n router: viewPortInstruction.component.router,\n childContainer: childContainer,\n viewSlot: this.viewSlot\n };\n\n // viewport will be a thin wrapper around composition engine\n // to process instruction/configuration from users\n // preparing all information related to a composition process\n // first by getting view strategy of a ViewPortComponent View\n const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);\n if (viewStrategy && component.view) {\n viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);\n }\n\n // using metadata of a custom element view model to load appropriate view-factory instance\n return metadata\n .load(childContainer, viewModelResource.value, null, viewStrategy, true)\n // for custom element, viewFactory typing is always ViewFactory\n // for custom attribute, it will be HtmlBehaviorResource\n .then((viewFactory: ViewFactory | HtmlBehaviorResource) => {\n // if this is not the first time that this is composing its instruction\n // try to capture ownership of the composition transaction\n // child will not be able to capture, since root typically captures\n // the ownership token\n if (!this.compositionTransactionNotifier) {\n this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();\n }\n\n if (layoutInstruction.viewModel || layoutInstruction.view) {\n viewPortInstruction.layoutInstruction = layoutInstruction;\n }\n\n const viewPortComponentBehaviorInstruction = BehaviorInstruction.dynamic(\n this.element,\n viewModel,\n viewFactory as ViewFactory\n );\n viewPortInstruction.controller = metadata.create(childContainer, viewPortComponentBehaviorInstruction);\n\n if (waitToSwap) {\n return null;\n }\n\n this.swap(viewPortInstruction);\n });\n }\n\n swap($viewPortInstruction: any): void | Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction: IRouterViewViewPortInstruction = $viewPortInstruction;\n const viewPortController = viewPortInstruction.controller;\n const layoutInstruction = viewPortInstruction.layoutInstruction;\n const previousView = this.view;\n\n // Final step of swapping a ViewPortComponent\n const work = () => {\n const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;\n const viewSlot = this.viewSlot;\n\n swapStrategy(\n viewSlot,\n previousView,\n () => Promise.resolve(viewSlot.add(this.view))\n ).then(() => {\n this._notify();\n });\n };\n\n // Ensure all users setups have been completed\n const ready = (owningView_or_layoutView: View) => {\n viewPortController.automate(this.overrideContext, owningView_or_layoutView);\n const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;\n // if this router-view is the root of a normal startup via aurelia.setRoot\n // attemp to take control of the transaction\n\n // if ownership can be taken\n // wait for transaction to complete before swapping\n if (transactionOwnerShipToken) {\n return transactionOwnerShipToken\n .waitForCompositionComplete()\n .then(() => {\n this.compositionTransactionOwnershipToken = null;\n return work();\n });\n }\n\n // otherwise, just swap\n return work();\n };\n\n // If there is layout instruction, new to compose layout before processing ViewPortComponent\n // layout controller/view/view-model is composed using composition engine APIs\n if (layoutInstruction) {\n if (!layoutInstruction.viewModel) {\n // createController chokes if there's no viewmodel, so create a dummy one\n // but avoid using a POJO as it creates unwanted metadata in Object constructor\n layoutInstruction.viewModel = new EmptyLayoutViewModel();\n }\n\n // using composition engine to create compose layout\n return this.compositionEngine\n // first create controller from layoutInstruction\n // and treat it as CompositionContext\n // then emulate slot projection with ViewPortComponent view\n .createController(layoutInstruction as CompositionContext)\n .then((layoutController: Controller) => {\n const layoutView = layoutController.view;\n ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);\n // when there is a layout\n // view hierarchy is: owner view -> layout view -> ViewPortComponent view\n layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);\n layoutView.children.push(viewPortController.view);\n return layoutView || layoutController;\n })\n .then((newView: View | Controller) => {\n this.view = newView as View;\n return ready(newView as View);\n });\n }\n\n // if there is no layout, then get ViewPortComponent view ready as view property\n // and process controller/swapping\n // when there is no layout\n // view hierarchy is: owner view -> ViewPortComponent view\n this.view = viewPortController.view;\n\n return ready(this.owningView);\n }\n\n /**\n * Notify composition transaction that this router has finished processing\n * Happens when this is the root router-view\n * @internal\n */\n _notify() {\n const notifier = this.compositionTransactionNotifier;\n if (notifier) {\n notifier.done();\n this.compositionTransactionNotifier = null;\n }\n }\n}\n\n/**\n* Locator which finds the nearest RouterView, relative to the current dependency injection container.\n*/\nexport class RouterViewLocator {\n\n /*@internal */\n promise: Promise;\n\n /*@internal */\n resolve: (val?: any) => void;\n\n /**\n * Creates an instance of the RouterViewLocator class.\n */\n constructor() {\n this.promise = new Promise((resolve) => this.resolve = resolve);\n }\n\n /**\n * Finds the nearest RouterView instance.\n * @returns A promise that will be resolved with the located RouterView instance.\n */\n findNearest(): Promise {\n return this.promise;\n }\n\n /**@internal */\n _notify(routerView: RouterView): void {\n this.resolve(routerView);\n }\n}\n","import { Origin } from 'aurelia-metadata';\nimport { relativeToFile } from 'aurelia-path';\nimport { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';\nimport { CompositionEngine, customElement, inlineView, useView, CompositionContext } from 'aurelia-templating';\nimport { RouterViewLocator } from './router-view';\nimport { Container } from 'aurelia-dependency-injection';\n\n/**@internal exported for unit testing */\nexport class EmptyClass { }\ninlineView('')(EmptyClass);\n\n/**\n * Default implementation of `RouteLoader` used for loading component based on a route config\n */\nexport class TemplatingRouteLoader extends RouteLoader {\n\n /**@internal */\n static inject = [CompositionEngine];\n\n /**@internal */\n compositionEngine: CompositionEngine;\n\n constructor(\n compositionEngine: CompositionEngine\n ) {\n super();\n this.compositionEngine = compositionEngine;\n }\n\n /**\n * Resolve a view model from a RouteConfig\n * Throws when there is neither \"moduleId\" nor \"viewModel\" property\n * @internal\n */\n resolveViewModel(router: Router, config: RouteConfig): Promise {\n return new Promise((resolve, reject) => {\n let viewModel: string | null | Function;\n if ('moduleId' in config) {\n let moduleId = config.moduleId;\n if (moduleId === null) {\n viewModel = EmptyClass;\n } else {\n // this requires container of router has passes a certain point\n // where a view model has been setup on the container\n // it will fail in enhance scenario because no viewport has been registered\n moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);\n if (/\\.html/i.test(moduleId)) {\n viewModel = createDynamicClass(moduleId);\n } else {\n viewModel = moduleId;\n }\n }\n return resolve(viewModel);\n }\n // todo: add if ('viewModel' in config) to support static view model resolution\n reject(new Error('Invalid route config. No \"moduleId\" found.'));\n });\n }\n\n /**\n * Create child container based on a router container\n * Also ensures that child router are properly constructed in the newly created child container\n * @internal\n */\n createChildContainer(router: Router): Container {\n const childContainer = router.container.createChild();\n\n childContainer.registerSingleton(RouterViewLocator);\n childContainer.getChildRouter = function() {\n let childRouter: Router;\n\n childContainer.registerHandler(\n Router,\n () => childRouter || (childRouter = router.createChild(childContainer))\n );\n\n return childContainer.get(Router);\n };\n return childContainer;\n }\n\n /**\n * Load corresponding component of a route config of a navigation instruction\n */\n loadRoute(router: Router, config: RouteConfig, _navInstruction: NavigationInstruction): Promise {\n return this\n .resolveViewModel(router, config)\n .then(viewModel => this.compositionEngine.ensureViewModel({\n viewModel: viewModel,\n childContainer: this.createChildContainer(router),\n view: config.view || config.viewStrategy,\n router: router\n } as CompositionContext));\n }\n}\n\n/**@internal exported for unit testing */\nexport function createDynamicClass(moduleId: string) {\n const name = /([^\\/^\\?]+)\\.html/i.exec(moduleId)[1];\n\n class DynamicClass {\n\n $parent: any;\n\n bind(bindingContext: any) {\n this.$parent = bindingContext;\n }\n }\n\n customElement(name)(DynamicClass);\n useView(moduleId)(DynamicClass);\n\n return DynamicClass;\n}\n","import { IStaticResourceConfig } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { DOM } from 'aurelia-pal';\nimport * as LogManager from 'aurelia-logging';\n\nconst logger = LogManager.getLogger('route-href');\n\n/**\n * Helper custom attribute to help associate an element with a route by name\n */\nexport class RouteHref {\n\n /*@internal */\n static inject() {\n return [Router, DOM.Element];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n type: 'attribute',\n name: 'route-href',\n bindables: [\n { name: 'route', changeHandler: 'processChange', primaryProperty: true },\n { name: 'params', changeHandler: 'processChange' },\n 'attribute'\n ] as any // type definition of Aurelia templating is wrong\n };\n\n /**\n * Current router of this attribute\n */\n readonly router: Router;\n\n /**\n * Element this attribute is associated with\n */\n readonly element: Element;\n\n /**@internal */\n isActive: boolean;\n\n /**\n * Name of the route this attribute refers to. This name should exist in the current router hierarchy\n */\n route: string;\n\n /**\n * Parameters of this attribute to generate URL.\n */\n params: Record;\n\n /**\n * Target property on a custom element if this attribute is put on a custom element\n * OR an attribute if this attribute is put on a normal element\n */\n attribute: string;\n\n constructor(\n router: Router,\n element: Element\n ) {\n this.router = router;\n this.element = element;\n this.attribute = 'href';\n }\n\n bind() {\n this.isActive = true;\n this.processChange();\n }\n\n unbind() {\n this.isActive = false;\n }\n\n attributeChanged(value: any, previous: any) {\n if (previous) {\n this.element.removeAttribute(previous);\n }\n\n return this.processChange();\n }\n\n processChange() {\n return this.router\n .ensureConfigured()\n .then((): null => {\n if (!this.isActive) {\n // returning null to avoid Bluebird warning\n return null;\n }\n const element = this.element as Element & { au: any };\n\n const href = this.router.generate(this.route, this.params);\n\n if (element.au.controller) {\n element.au.controller.viewModel[this.attribute] = href;\n } else {\n element.setAttribute(this.attribute, href);\n }\n\n // returning null to avoid Bluebird warning\n return null;\n })\n .catch((reason: any) => {\n logger.error(reason);\n });\n }\n}\n\n","import { Router, AppRouter, RouteLoader } from 'aurelia-router';\nimport { TemplatingRouteLoader } from './route-loader';\nimport { RouterView } from './router-view';\nimport { RouteHref } from './route-href';\nimport { IFrameworkConfiguration } from './interfaces';\n\nexport function configure(config: IFrameworkConfiguration) {\n config\n .singleton(RouteLoader, TemplatingRouteLoader)\n .singleton(Router, AppRouter)\n .globalResources(\n RouterView,\n RouteHref\n );\n\n config.container.registerAlias(Router, AppRouter);\n}\n\nexport {\n TemplatingRouteLoader,\n RouterView,\n RouteHref\n};\n"],"names":["DOM","Container","ViewSlot","Router","ViewLocator","CompositionTransaction","CompositionEngine","Origin","BehaviorInstruction","SwapStrategies","ShadowDOM","createOverrideContext","inlineView","tslib_1.__extends","relativeToFile","RouteLoader","customElement","useView","LogManager.getLogger","AppRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BA;QAAA;SAEC;QAAD,2BAAC;IAAD,CAAC,IAAA;IAED;;;AAGA;QAsHE,oBACE,OAAgB,EAChB,SAAoB,EACpB,QAAkB,EAClB,MAAc,EACd,WAAwB,EACxB,sBAA8C,EAC9C,iBAAoC;YAEpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;YACrD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;;;YAI3C,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;;;;;;YAOtE,IAAI,EAAE,oBAAoB,IAAI,sBAAsB,CAAC,EAAE;gBACrD,sBAAsB,CAAC,kBAAkB,GAAG,IAAI,CAAC;gB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,OAAO,IAAI,CAAC;iBACb;gBACD,IAAM,OAAO,GAAG,KAAI,CAAC,OAAgC,CAAC;gBAEtD,IAAM,IAAI,GAAG,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAI,CAAC,KAAK,EAAE,KAAI,CAAC,MAAM,CAAC,CAAC;gBAE3D,IAAI,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE;oBACzB,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,KAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;iBACxD;qBAAM;oBACL,OAAO,CAAC,YAAY,CAAC,KAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;iBAC5C;;gBAGD,OAAO,IAAI,CAAC;aACb,CAAC;iBACD,KAAK,CAAC,UAAC,MAAW;gBACjB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aACtB,CAAC,CAAC;SACN;;;;QAzFM,mBAAS,GAA0B;YACxC,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE;gBACT,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE;gBACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE;gBAClD,WAAW;aACL;SACT,CAAC;QAkFJ,gBAAC;KApGD;;aCJgB,SAAS,CAAC,MAA+B;QACvD,MAAM;aACH,SAAS,CAACe,yBAAW,EAAE,qBAAqB,CAAC;aAC7C,SAAS,CAACZ,oBAAM,EAAEgB,uBAAS,CAAC;aAC5B,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;QAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAChB,oBAAM,EAAEgB,uBAAS,CAAC,CAAC;IACpD,CAAC;;;;;;;;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"aurelia-templating-router.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null],"names":["DOM","Container","ViewSlot","Router","ViewLocator","CompositionTransaction","CompositionEngine","Origin","BehaviorInstruction","SwapStrategies","ShadowDOM","createOverrideContext","inlineView","relativeToFile","RouteLoader","customElement","useView","LogManager","AppRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC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;;;;;"}
\ No newline at end of file
diff --git a/dist/aurelia-templating-router.d.ts b/dist/aurelia-templating-router.d.ts
index e05da8c..07efa45 100644
--- a/dist/aurelia-templating-router.d.ts
+++ b/dist/aurelia-templating-router.d.ts
@@ -1,3 +1,5 @@
+// Generated by dts-bundle-generator v6.7.0
+
import { OverrideContext } from 'aurelia-binding';
import { Container } from 'aurelia-dependency-injection';
import { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';
@@ -11,7 +13,7 @@ export declare class TemplatingRouteLoader extends RouteLoader {
/**
* Load corresponding component of a route config of a navigation instruction
*/
- loadRoute(router: Router, config: RouteConfig, _navInstruction: NavigationInstruction): Promise;
+ loadRoute(router: Router, config: RouteConfig, navInstruction: NavigationInstruction): Promise;
}
/**
* Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
@@ -26,7 +28,7 @@ export declare class RouterView {
* These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework
* Can be extended there and used here
*/
- swapOrder?: string;
+ swapOrder?: "before" | "after" | "with";
/**
* Layout view used for this router-view layout, if no layout-viewmodel specified
*/
@@ -61,6 +63,20 @@ export declare class RouterView {
process($viewPortInstruction: any, waitToSwap?: boolean): Promise;
swap($viewPortInstruction: any): void | Promise;
}
+/**
+* Locator which finds the nearest RouterView, relative to the current dependency injection container.
+*/
+export declare class RouterViewLocator {
+ /**
+ * Creates an instance of the RouterViewLocator class.
+ */
+ constructor();
+ /**
+ * Finds the nearest RouterView instance.
+ * @returns A promise that will be resolved with the located RouterView instance.
+ */
+ findNearest(): Promise;
+}
/**
* Helper custom attribute to help associate an element with a route by name
*/
@@ -97,4 +113,6 @@ export interface IFrameworkConfiguration {
singleton(...args: any[]): this;
globalResources(...args: any[]): this;
}
-export declare function configure(config: IFrameworkConfiguration): void;
\ No newline at end of file
+export declare function configure(config: IFrameworkConfiguration): void;
+
+export {};
diff --git a/dist/commonjs/aurelia-templating-router.js b/dist/commonjs/aurelia-templating-router.js
index d7e0235..17e6c38 100644
--- a/dist/commonjs/aurelia-templating-router.js
+++ b/dist/commonjs/aurelia-templating-router.js
@@ -11,44 +11,63 @@ var aureliaBinding = require('aurelia-binding');
var aureliaPal = require('aurelia-pal');
var LogManager = require('aurelia-logging');
+function _interopNamespace(e) {
+ if (e && e.__esModule) return e;
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () { return e[k]; }
+ });
+ }
+ });
+ }
+ n["default"] = e;
+ return Object.freeze(n);
+}
+
+var LogManager__namespace = /*#__PURE__*/_interopNamespace(LogManager);
+
/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
+Copyright (c) Microsoft Corporation.
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
-var EmptyLayoutViewModel = /** @class */ (function () {
+var EmptyLayoutViewModel = (function () {
function EmptyLayoutViewModel() {
}
return EmptyLayoutViewModel;
}());
-/**
- * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
- */
-var RouterView = /** @class */ (function () {
+var RouterView = (function () {
function RouterView(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {
this.element = element;
this.container = container;
@@ -57,21 +76,12 @@ var RouterView = /** @class */ (function () {
this.viewLocator = viewLocator;
this.compositionTransaction = compositionTransaction;
this.compositionEngine = compositionEngine;
- // add this to router view ports lookup based on name attribute
- // when this router is the root router-view
- // also trigger AppRouter registerViewPort extra flow
this.router.registerViewPort(this, this.element.getAttribute('name'));
- // Each process its instruction as a composition transaction
- // there are differences between intial composition and subsequent compositions
- // also there are differences between root composition and child composition
- // mark the first composition transaction with a property initialComposition to distinguish it
- // when the root gets new instruction for the first time
if (!('initialComposition' in compositionTransaction)) {
compositionTransaction.initialComposition = true;
this.compositionTransactionNotifier = compositionTransaction.enlist();
}
}
- /**@internal */
RouterView.inject = function () {
return [aureliaPal.DOM.Element, aureliaDependencyInjection.Container, aureliaTemplating.ViewSlot, aureliaRouter.Router, aureliaTemplating.ViewLocator, aureliaTemplating.CompositionTransaction, aureliaTemplating.CompositionEngine];
};
@@ -79,17 +89,11 @@ var RouterView = /** @class */ (function () {
this.owningView = owningView;
};
RouterView.prototype.bind = function (bindingContext, overrideContext) {
- // router needs to get access to view model of current route parent
- // doing it in generic way via viewModel property on container
this.container.viewModel = bindingContext;
this.overrideContext = overrideContext;
};
- /**
- * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline
- */
RouterView.prototype.process = function ($viewPortInstruction, waitToSwap) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var component = viewPortInstruction.component;
var childContainer = component.childContainer;
@@ -99,7 +103,6 @@ var RouterView = /** @class */ (function () {
var config = component.router.currentInstruction.config;
var viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};
childContainer.get(RouterViewLocator)._notify(this);
- // layoutInstruction is our layout viewModel
var layoutInstruction = {
viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,
view: viewPortConfig.layoutView || config.layoutView || this.layoutView,
@@ -108,24 +111,13 @@ var RouterView = /** @class */ (function () {
childContainer: childContainer,
viewSlot: this.viewSlot
};
- // viewport will be a thin wrapper around composition engine
- // to process instruction/configuration from users
- // preparing all information related to a composition process
- // first by getting view strategy of a ViewPortComponent View
var viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);
if (viewStrategy && component.view) {
viewStrategy.makeRelativeTo(aureliaMetadata.Origin.get(component.router.container.viewModel.constructor).moduleId);
}
- // using metadata of a custom element view model to load appropriate view-factory instance
return metadata
.load(childContainer, viewModelResource.value, null, viewStrategy, true)
- // for custom element, viewFactory typing is always ViewFactory
- // for custom attribute, it will be HtmlBehaviorResource
.then(function (viewFactory) {
- // if this is not the first time that this is composing its instruction
- // try to capture ownership of the composition transaction
- // child will not be able to capture, since root typically captures
- // the ownership token
if (!_this.compositionTransactionNotifier) {
_this.compositionTransactionOwnershipToken = _this.compositionTransaction.tryCapture();
}
@@ -142,12 +134,10 @@ var RouterView = /** @class */ (function () {
};
RouterView.prototype.swap = function ($viewPortInstruction) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var viewPortController = viewPortInstruction.controller;
var layoutInstruction = viewPortInstruction.layoutInstruction;
var previousView = this.view;
- // Final step of swapping a ViewPortComponent
var work = function () {
var swapStrategy = aureliaTemplating.SwapStrategies[_this.swapOrder] || aureliaTemplating.SwapStrategies.after;
var viewSlot = _this.viewSlot;
@@ -155,14 +145,9 @@ var RouterView = /** @class */ (function () {
_this._notify();
});
};
- // Ensure all users setups have been completed
var ready = function (owningView_or_layoutView) {
viewPortController.automate(_this.overrideContext, owningView_or_layoutView);
var transactionOwnerShipToken = _this.compositionTransactionOwnershipToken;
- // if this router-view is the root of a normal startup via aurelia.setRoot
- // attemp to take control of the transaction
- // if ownership can be taken
- // wait for transaction to complete before swapping
if (transactionOwnerShipToken) {
return transactionOwnerShipToken
.waitForCompositionComplete()
@@ -171,28 +156,17 @@ var RouterView = /** @class */ (function () {
return work();
});
}
- // otherwise, just swap
return work();
};
- // If there is layout instruction, new to compose layout before processing ViewPortComponent
- // layout controller/view/view-model is composed using composition engine APIs
if (layoutInstruction) {
if (!layoutInstruction.viewModel) {
- // createController chokes if there's no viewmodel, so create a dummy one
- // but avoid using a POJO as it creates unwanted metadata in Object constructor
layoutInstruction.viewModel = new EmptyLayoutViewModel();
}
- // using composition engine to create compose layout
return this.compositionEngine
- // first create controller from layoutInstruction
- // and treat it as CompositionContext
- // then emulate slot projection with ViewPortComponent view
.createController(layoutInstruction)
.then(function (layoutController) {
var layoutView = layoutController.view;
aureliaTemplating.ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);
- // when there is a layout
- // view hierarchy is: owner view -> layout view -> ViewPortComponent view
layoutController.automate(aureliaBinding.createOverrideContext(layoutInstruction.viewModel), _this.owningView);
layoutView.children.push(viewPortController.view);
return layoutView || layoutController;
@@ -202,18 +176,9 @@ var RouterView = /** @class */ (function () {
return ready(newView);
});
}
- // if there is no layout, then get ViewPortComponent view ready as view property
- // and process controller/swapping
- // when there is no layout
- // view hierarchy is: owner view -> ViewPortComponent view
this.view = viewPortController.view;
return ready(this.owningView);
};
- /**
- * Notify composition transaction that this router has finished processing
- * Happens when this is the root router-view
- * @internal
- */
RouterView.prototype._notify = function () {
var notifier = this.compositionTransactionNotifier;
if (notifier) {
@@ -221,69 +186,40 @@ var RouterView = /** @class */ (function () {
this.compositionTransactionNotifier = null;
}
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- *
- * There is no view to compose by default in a router view
- * This custom element is responsible for composing its own view, based on current config
- */
RouterView.$view = null;
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouterView.$resource = {
name: 'router-view',
bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context']
};
return RouterView;
}());
-/**
-* Locator which finds the nearest RouterView, relative to the current dependency injection container.
-*/
-var RouterViewLocator = /** @class */ (function () {
- /**
- * Creates an instance of the RouterViewLocator class.
- */
+var RouterViewLocator = (function () {
function RouterViewLocator() {
var _this = this;
this.promise = new Promise(function (resolve) { return _this.resolve = resolve; });
}
- /**
- * Finds the nearest RouterView instance.
- * @returns A promise that will be resolved with the located RouterView instance.
- */
RouterViewLocator.prototype.findNearest = function () {
return this.promise;
};
- /**@internal */
RouterViewLocator.prototype._notify = function (routerView) {
this.resolve(routerView);
};
return RouterViewLocator;
}());
-/**@internal exported for unit testing */
-var EmptyClass = /** @class */ (function () {
+var EmptyClass = (function () {
function EmptyClass() {
}
return EmptyClass;
}());
aureliaTemplating.inlineView('')(EmptyClass);
-/**
- * Default implementation of `RouteLoader` used for loading component based on a route config
- */
-var TemplatingRouteLoader = /** @class */ (function (_super) {
+var TemplatingRouteLoader = (function (_super) {
__extends(TemplatingRouteLoader, _super);
function TemplatingRouteLoader(compositionEngine) {
var _this = _super.call(this) || this;
_this.compositionEngine = compositionEngine;
return _this;
}
- /**
- * Resolve a view model from a RouteConfig
- * Throws when there is neither "moduleId" nor "viewModel" property
- * @internal
- */
TemplatingRouteLoader.prototype.resolveViewModel = function (router, config) {
return new Promise(function (resolve, reject) {
var viewModel;
@@ -293,9 +229,6 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
viewModel = EmptyClass;
}
else {
- // this requires container of router has passes a certain point
- // where a view model has been setup on the container
- // it will fail in enhance scenario because no viewport has been registered
moduleId = aureliaPath.relativeToFile(moduleId, aureliaMetadata.Origin.get(router.container.viewModel.constructor).moduleId);
if (/\.html/i.test(moduleId)) {
viewModel = createDynamicClass(moduleId);
@@ -306,15 +239,9 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
}
return resolve(viewModel);
}
- // todo: add if ('viewModel' in config) to support static view model resolution
reject(new Error('Invalid route config. No "moduleId" found.'));
});
};
- /**
- * Create child container based on a router container
- * Also ensures that child router are properly constructed in the newly created child container
- * @internal
- */
TemplatingRouteLoader.prototype.createChildContainer = function (router) {
var childContainer = router.container.createChild();
childContainer.registerSingleton(RouterViewLocator);
@@ -325,10 +252,7 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
};
return childContainer;
};
- /**
- * Load corresponding component of a route config of a navigation instruction
- */
- TemplatingRouteLoader.prototype.loadRoute = function (router, config, _navInstruction) {
+ TemplatingRouteLoader.prototype.loadRoute = function (router, config, navInstruction) {
var _this = this;
return this
.resolveViewModel(router, config)
@@ -339,14 +263,12 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
router: router
}); });
};
- /**@internal */
TemplatingRouteLoader.inject = [aureliaTemplating.CompositionEngine];
return TemplatingRouteLoader;
}(aureliaRouter.RouteLoader));
-/**@internal exported for unit testing */
function createDynamicClass(moduleId) {
var name = /([^\/^\?]+)\.html/i.exec(moduleId)[1];
- var DynamicClass = /** @class */ (function () {
+ var DynamicClass = (function () {
function DynamicClass() {
}
DynamicClass.prototype.bind = function (bindingContext) {
@@ -359,17 +281,13 @@ function createDynamicClass(moduleId) {
return DynamicClass;
}
-var logger = LogManager.getLogger('route-href');
-/**
- * Helper custom attribute to help associate an element with a route by name
- */
-var RouteHref = /** @class */ (function () {
+var logger = LogManager__namespace.getLogger('route-href');
+var RouteHref = (function () {
function RouteHref(router, element) {
this.router = router;
this.element = element;
this.attribute = 'href';
}
- /*@internal */
RouteHref.inject = function () {
return [aureliaRouter.Router, aureliaPal.DOM.Element];
};
@@ -392,7 +310,6 @@ var RouteHref = /** @class */ (function () {
.ensureConfigured()
.then(function () {
if (!_this.isActive) {
- // returning null to avoid Bluebird warning
return null;
}
var element = _this.element;
@@ -403,16 +320,12 @@ var RouteHref = /** @class */ (function () {
else {
element.setAttribute(_this.attribute, href);
}
- // returning null to avoid Bluebird warning
return null;
})
.catch(function (reason) {
logger.error(reason);
});
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouteHref.$resource = {
type: 'attribute',
name: 'route-href',
@@ -420,7 +333,7 @@ var RouteHref = /** @class */ (function () {
{ name: 'route', changeHandler: 'processChange', primaryProperty: true },
{ name: 'params', changeHandler: 'processChange' },
'attribute'
- ] // type definition of Aurelia templating is wrong
+ ]
};
return RouteHref;
}());
@@ -435,6 +348,7 @@ function configure(config) {
exports.RouteHref = RouteHref;
exports.RouterView = RouterView;
+exports.RouterViewLocator = RouterViewLocator;
exports.TemplatingRouteLoader = TemplatingRouteLoader;
exports.configure = configure;
//# sourceMappingURL=aurelia-templating-router.js.map
diff --git a/dist/commonjs/aurelia-templating-router.js.map b/dist/commonjs/aurelia-templating-router.js.map
index c018b26..6889e16 100644
--- a/dist/commonjs/aurelia-templating-router.js.map
+++ b/dist/commonjs/aurelia-templating-router.js.map
@@ -1 +1 @@
-{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["import { Container } from 'aurelia-dependency-injection';\nimport { createOverrideContext, OverrideContext } from 'aurelia-binding';\nimport {\n ViewSlot,\n ViewLocator,\n BehaviorInstruction,\n CompositionTransaction,\n CompositionEngine,\n ShadowDOM,\n SwapStrategies,\n ResourceDescription,\n HtmlBehaviorResource,\n CompositionTransactionNotifier,\n View,\n CompositionTransactionOwnershipToken,\n Controller,\n ViewFactory,\n CompositionContext,\n IStaticResourceConfig,\n IStaticViewConfig\n} from 'aurelia-templating';\nimport {\n Router\n} from 'aurelia-router';\nimport { Origin } from 'aurelia-metadata';\nimport { DOM } from 'aurelia-pal';\nimport { IRouterViewViewPortInstruction, Constructable } from './interfaces';\n\nclass EmptyLayoutViewModel {\n\n}\n\n/**\n * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views\n */\nexport class RouterView {\n\n /**@internal */\n static inject() {\n return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n *\n * There is no view to compose by default in a router view\n * This custom element is responsible for composing its own view, based on current config\n */\n static $view: IStaticViewConfig = null;\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n name: 'router-view',\n bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context'] as any\n };\n\n /**\n * Swapping order when going to a new route. By default, supports 3 value: before, after, with\n * - before = new in -> old out\n * - after = old out -> new in\n * - with = new in + old out\n *\n * These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework\n * Can be extended there and used here\n */\n swapOrder?: string;\n\n /**\n * Layout view used for this router-view layout, if no layout-viewmodel specified\n */\n layoutView?: any;\n\n /**\n * Layout view model used as binding context for this router-view layout\n * Actual type would be {string | Constructable | object}\n */\n layoutViewModel?: any;\n\n /**\n * Layout model used to activate layout view model, if specified with `layoutViewModel`\n */\n layoutModel?: any;\n\n /**\n * Element associated with this custom element\n */\n readonly element: Element;\n\n /**\n * Current router associated with this \n */\n readonly router: Router;\n\n /**\n * Container at this level\n */\n container: Container;\n\n /**\n * @internal\n * the view slot for adding / removing Routing related views created dynamically\n */\n viewSlot: ViewSlot;\n\n /**\n * @internal\n * Used to mimic partially functionalities of CompositionEngine\n */\n viewLocator: ViewLocator;\n\n /**\n * @internal\n * View composed by the CompositionEngine, depends on layout / viewports/ moduleId / viewModel of routeconfig\n */\n view: View;\n\n /**\n * @internal\n * The view where this `` is placed in\n */\n owningView: View;\n\n /**\n * @internal\n * Composition Transaction of initial composition transaction, when this is created\n */\n compositionTransaction: CompositionTransaction;\n\n /**\n * @internal\n * CompositionEngine instance, responsible for composing view/view model during process changes phase of this \n */\n compositionEngine: CompositionEngine;\n\n /**\n * Composition transaction notifier instance. Created when this router-view composing its instruction\n * for the first time.\n * Null on 2nd time and after.\n * @internal\n */\n compositionTransactionNotifier: CompositionTransactionNotifier;\n\n /**\n * @internal\n */\n compositionTransactionOwnershipToken: CompositionTransactionOwnershipToken;\n\n /**\n * @internal\n */\n overrideContext: OverrideContext;\n\n constructor(\n element: Element,\n container: Container,\n viewSlot: ViewSlot,\n router: Router,\n viewLocator: ViewLocator,\n compositionTransaction: CompositionTransaction,\n compositionEngine: CompositionEngine\n ) {\n this.element = element;\n this.container = container;\n this.viewSlot = viewSlot;\n this.router = router;\n this.viewLocator = viewLocator;\n this.compositionTransaction = compositionTransaction;\n this.compositionEngine = compositionEngine;\n // add this to router view ports lookup based on name attribute\n // when this router is the root router-view\n // also trigger AppRouter registerViewPort extra flow\n this.router.registerViewPort(this, this.element.getAttribute('name'));\n\n // Each process its instruction as a composition transaction\n // there are differences between intial composition and subsequent compositions\n // also there are differences between root composition and child composition\n // mark the first composition transaction with a property initialComposition to distinguish it\n // when the root gets new instruction for the first time\n if (!('initialComposition' in compositionTransaction)) {\n compositionTransaction.initialComposition = true;\n this.compositionTransactionNotifier = compositionTransaction.enlist();\n }\n }\n\n created(owningView: View): void {\n this.owningView = owningView;\n }\n\n bind(bindingContext: any, overrideContext: OverrideContext): void {\n // router needs to get access to view model of current route parent\n // doing it in generic way via viewModel property on container\n this.container.viewModel = bindingContext;\n this.overrideContext = overrideContext;\n }\n\n /**\n * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline\n */\n process($viewPortInstruction: any, waitToSwap?: boolean): Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction = $viewPortInstruction as IRouterViewViewPortInstruction;\n const component = viewPortInstruction.component;\n const childContainer = component.childContainer;\n const viewModel = component.viewModel;\n const viewModelResource = component.viewModelResource as unknown as ResourceDescription;\n const metadata = viewModelResource.metadata;\n const config = component.router.currentInstruction.config;\n const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};\n\n (childContainer.get(RouterViewLocator) as RouterViewLocator)._notify(this);\n\n // layoutInstruction is our layout viewModel\n const layoutInstruction = {\n viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,\n view: viewPortConfig.layoutView || config.layoutView || this.layoutView,\n model: viewPortConfig.layoutModel || config.layoutModel || this.layoutModel,\n router: viewPortInstruction.component.router,\n childContainer: childContainer,\n viewSlot: this.viewSlot\n };\n\n // viewport will be a thin wrapper around composition engine\n // to process instruction/configuration from users\n // preparing all information related to a composition process\n // first by getting view strategy of a ViewPortComponent View\n const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);\n if (viewStrategy && component.view) {\n viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);\n }\n\n // using metadata of a custom element view model to load appropriate view-factory instance\n return metadata\n .load(childContainer, viewModelResource.value, null, viewStrategy, true)\n // for custom element, viewFactory typing is always ViewFactory\n // for custom attribute, it will be HtmlBehaviorResource\n .then((viewFactory: ViewFactory | HtmlBehaviorResource) => {\n // if this is not the first time that this is composing its instruction\n // try to capture ownership of the composition transaction\n // child will not be able to capture, since root typically captures\n // the ownership token\n if (!this.compositionTransactionNotifier) {\n this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();\n }\n\n if (layoutInstruction.viewModel || layoutInstruction.view) {\n viewPortInstruction.layoutInstruction = layoutInstruction;\n }\n\n const viewPortComponentBehaviorInstruction = BehaviorInstruction.dynamic(\n this.element,\n viewModel,\n viewFactory as ViewFactory\n );\n viewPortInstruction.controller = metadata.create(childContainer, viewPortComponentBehaviorInstruction);\n\n if (waitToSwap) {\n return null;\n }\n\n this.swap(viewPortInstruction);\n });\n }\n\n swap($viewPortInstruction: any): void | Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction: IRouterViewViewPortInstruction = $viewPortInstruction;\n const viewPortController = viewPortInstruction.controller;\n const layoutInstruction = viewPortInstruction.layoutInstruction;\n const previousView = this.view;\n\n // Final step of swapping a ViewPortComponent\n const work = () => {\n const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;\n const viewSlot = this.viewSlot;\n\n swapStrategy(\n viewSlot,\n previousView,\n () => Promise.resolve(viewSlot.add(this.view))\n ).then(() => {\n this._notify();\n });\n };\n\n // Ensure all users setups have been completed\n const ready = (owningView_or_layoutView: View) => {\n viewPortController.automate(this.overrideContext, owningView_or_layoutView);\n const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;\n // if this router-view is the root of a normal startup via aurelia.setRoot\n // attemp to take control of the transaction\n\n // if ownership can be taken\n // wait for transaction to complete before swapping\n if (transactionOwnerShipToken) {\n return transactionOwnerShipToken\n .waitForCompositionComplete()\n .then(() => {\n this.compositionTransactionOwnershipToken = null;\n return work();\n });\n }\n\n // otherwise, just swap\n return work();\n };\n\n // If there is layout instruction, new to compose layout before processing ViewPortComponent\n // layout controller/view/view-model is composed using composition engine APIs\n if (layoutInstruction) {\n if (!layoutInstruction.viewModel) {\n // createController chokes if there's no viewmodel, so create a dummy one\n // but avoid using a POJO as it creates unwanted metadata in Object constructor\n layoutInstruction.viewModel = new EmptyLayoutViewModel();\n }\n\n // using composition engine to create compose layout\n return this.compositionEngine\n // first create controller from layoutInstruction\n // and treat it as CompositionContext\n // then emulate slot projection with ViewPortComponent view\n .createController(layoutInstruction as CompositionContext)\n .then((layoutController: Controller) => {\n const layoutView = layoutController.view;\n ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);\n // when there is a layout\n // view hierarchy is: owner view -> layout view -> ViewPortComponent view\n layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);\n layoutView.children.push(viewPortController.view);\n return layoutView || layoutController;\n })\n .then((newView: View | Controller) => {\n this.view = newView as View;\n return ready(newView as View);\n });\n }\n\n // if there is no layout, then get ViewPortComponent view ready as view property\n // and process controller/swapping\n // when there is no layout\n // view hierarchy is: owner view -> ViewPortComponent view\n this.view = viewPortController.view;\n\n return ready(this.owningView);\n }\n\n /**\n * Notify composition transaction that this router has finished processing\n * Happens when this is the root router-view\n * @internal\n */\n _notify() {\n const notifier = this.compositionTransactionNotifier;\n if (notifier) {\n notifier.done();\n this.compositionTransactionNotifier = null;\n }\n }\n}\n\n/**\n* Locator which finds the nearest RouterView, relative to the current dependency injection container.\n*/\nexport class RouterViewLocator {\n\n /*@internal */\n promise: Promise;\n\n /*@internal */\n resolve: (val?: any) => void;\n\n /**\n * Creates an instance of the RouterViewLocator class.\n */\n constructor() {\n this.promise = new Promise((resolve) => this.resolve = resolve);\n }\n\n /**\n * Finds the nearest RouterView instance.\n * @returns A promise that will be resolved with the located RouterView instance.\n */\n findNearest(): Promise {\n return this.promise;\n }\n\n /**@internal */\n _notify(routerView: RouterView): void {\n this.resolve(routerView);\n }\n}\n","import { Origin } from 'aurelia-metadata';\nimport { relativeToFile } from 'aurelia-path';\nimport { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';\nimport { CompositionEngine, customElement, inlineView, useView, CompositionContext } from 'aurelia-templating';\nimport { RouterViewLocator } from './router-view';\nimport { Container } from 'aurelia-dependency-injection';\n\n/**@internal exported for unit testing */\nexport class EmptyClass { }\ninlineView('')(EmptyClass);\n\n/**\n * Default implementation of `RouteLoader` used for loading component based on a route config\n */\nexport class TemplatingRouteLoader extends RouteLoader {\n\n /**@internal */\n static inject = [CompositionEngine];\n\n /**@internal */\n compositionEngine: CompositionEngine;\n\n constructor(\n compositionEngine: CompositionEngine\n ) {\n super();\n this.compositionEngine = compositionEngine;\n }\n\n /**\n * Resolve a view model from a RouteConfig\n * Throws when there is neither \"moduleId\" nor \"viewModel\" property\n * @internal\n */\n resolveViewModel(router: Router, config: RouteConfig): Promise {\n return new Promise((resolve, reject) => {\n let viewModel: string | null | Function;\n if ('moduleId' in config) {\n let moduleId = config.moduleId;\n if (moduleId === null) {\n viewModel = EmptyClass;\n } else {\n // this requires container of router has passes a certain point\n // where a view model has been setup on the container\n // it will fail in enhance scenario because no viewport has been registered\n moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);\n if (/\\.html/i.test(moduleId)) {\n viewModel = createDynamicClass(moduleId);\n } else {\n viewModel = moduleId;\n }\n }\n return resolve(viewModel);\n }\n // todo: add if ('viewModel' in config) to support static view model resolution\n reject(new Error('Invalid route config. No \"moduleId\" found.'));\n });\n }\n\n /**\n * Create child container based on a router container\n * Also ensures that child router are properly constructed in the newly created child container\n * @internal\n */\n createChildContainer(router: Router): Container {\n const childContainer = router.container.createChild();\n\n childContainer.registerSingleton(RouterViewLocator);\n childContainer.getChildRouter = function() {\n let childRouter: Router;\n\n childContainer.registerHandler(\n Router,\n () => childRouter || (childRouter = router.createChild(childContainer))\n );\n\n return childContainer.get(Router);\n };\n return childContainer;\n }\n\n /**\n * Load corresponding component of a route config of a navigation instruction\n */\n loadRoute(router: Router, config: RouteConfig, _navInstruction: NavigationInstruction): Promise {\n return this\n .resolveViewModel(router, config)\n .then(viewModel => this.compositionEngine.ensureViewModel({\n viewModel: viewModel,\n childContainer: this.createChildContainer(router),\n view: config.view || config.viewStrategy,\n router: router\n } as CompositionContext));\n }\n}\n\n/**@internal exported for unit testing */\nexport function createDynamicClass(moduleId: string) {\n const name = /([^\\/^\\?]+)\\.html/i.exec(moduleId)[1];\n\n class DynamicClass {\n\n $parent: any;\n\n bind(bindingContext: any) {\n this.$parent = bindingContext;\n }\n }\n\n customElement(name)(DynamicClass);\n useView(moduleId)(DynamicClass);\n\n return DynamicClass;\n}\n","import { IStaticResourceConfig } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { DOM } from 'aurelia-pal';\nimport * as LogManager from 'aurelia-logging';\n\nconst logger = LogManager.getLogger('route-href');\n\n/**\n * Helper custom attribute to help associate an element with a route by name\n */\nexport class RouteHref {\n\n /*@internal */\n static inject() {\n return [Router, DOM.Element];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n type: 'attribute',\n name: 'route-href',\n bindables: [\n { name: 'route', changeHandler: 'processChange', primaryProperty: true },\n { name: 'params', changeHandler: 'processChange' },\n 'attribute'\n ] as any // type definition of Aurelia templating is wrong\n };\n\n /**\n * Current router of this attribute\n */\n readonly router: Router;\n\n /**\n * Element this attribute is associated with\n */\n readonly element: Element;\n\n /**@internal */\n isActive: boolean;\n\n /**\n * Name of the route this attribute refers to. This name should exist in the current router hierarchy\n */\n route: string;\n\n /**\n * Parameters of this attribute to generate URL.\n */\n params: Record;\n\n /**\n * Target property on a custom element if this attribute is put on a custom element\n * OR an attribute if this attribute is put on a normal element\n */\n attribute: string;\n\n constructor(\n router: Router,\n element: Element\n ) {\n this.router = router;\n this.element = element;\n this.attribute = 'href';\n }\n\n bind() {\n this.isActive = true;\n this.processChange();\n }\n\n unbind() {\n this.isActive = false;\n }\n\n attributeChanged(value: any, previous: any) {\n if (previous) {\n this.element.removeAttribute(previous);\n }\n\n return this.processChange();\n }\n\n processChange() {\n return this.router\n .ensureConfigured()\n .then((): null => {\n if (!this.isActive) {\n // returning null to avoid Bluebird warning\n return null;\n }\n const element = this.element as Element & { au: any };\n\n const href = this.router.generate(this.route, this.params);\n\n if (element.au.controller) {\n element.au.controller.viewModel[this.attribute] = href;\n } else {\n element.setAttribute(this.attribute, href);\n }\n\n // returning null to avoid Bluebird warning\n return null;\n })\n .catch((reason: any) => {\n logger.error(reason);\n });\n }\n}\n\n","import { Router, AppRouter, RouteLoader } from 'aurelia-router';\nimport { TemplatingRouteLoader } from './route-loader';\nimport { RouterView } from './router-view';\nimport { RouteHref } from './route-href';\nimport { IFrameworkConfiguration } from './interfaces';\n\nexport function configure(config: IFrameworkConfiguration) {\n config\n .singleton(RouteLoader, TemplatingRouteLoader)\n .singleton(Router, AppRouter)\n .globalResources(\n RouterView,\n RouteHref\n );\n\n config.container.registerAlias(Router, AppRouter);\n}\n\nexport {\n TemplatingRouteLoader,\n RouterView,\n RouteHref\n};\n"],"names":["DOM","Container","ViewSlot","Router","ViewLocator","CompositionTransaction","CompositionEngine","Origin","BehaviorInstruction","SwapStrategies","ShadowDOM","createOverrideContext","inlineView","tslib_1.__extends","relativeToFile","RouteLoader","customElement","useView","LogManager.getLogger","AppRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;IAAA;KAEC;IAAD,2BAAC;CAAA,IAAA;;;;AAKD;IAsHE,oBACE,OAAgB,EAChB,SAAoB,EACpB,QAAkB,EAClB,MAAc,EACd,WAAwB,EACxB,sBAA8C,EAC9C,iBAAoC;QAEpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;;;QAI3C,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE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urelia-templating-router.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null],"names":["DOM","Container","ViewSlot","Router","ViewLocator","CompositionTransaction","CompositionEngine","Origin","BehaviorInstruction","SwapStrategies","ShadowDOM","createOverrideContext","inlineView","relativeToFile","RouteLoader","customElement","useView","LogManager","AppRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,E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EAAEe,uBAAS,CAAC,CAAC;AACpD;;;;;;;;"}
\ No newline at end of file
diff --git a/dist/es2015/aurelia-templating-router.js b/dist/es2015/aurelia-templating-router.js
index c59d7be..a7311a5 100644
--- a/dist/es2015/aurelia-templating-router.js
+++ b/dist/es2015/aurelia-templating-router.js
@@ -5,13 +5,10 @@ import { ViewSlot, ViewLocator, CompositionTransaction, CompositionEngine, Behav
import { Container } from 'aurelia-dependency-injection';
import { createOverrideContext } from 'aurelia-binding';
import { DOM } from 'aurelia-pal';
-import { getLogger } from 'aurelia-logging';
+import * as LogManager from 'aurelia-logging';
class EmptyLayoutViewModel {
}
-/**
- * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
- */
class RouterView {
constructor(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {
this.element = element;
@@ -21,21 +18,12 @@ class RouterView {
this.viewLocator = viewLocator;
this.compositionTransaction = compositionTransaction;
this.compositionEngine = compositionEngine;
- // add this to router view ports lookup based on name attribute
- // when this router is the root router-view
- // also trigger AppRouter registerViewPort extra flow
this.router.registerViewPort(this, this.element.getAttribute('name'));
- // Each process its instruction as a composition transaction
- // there are differences between intial composition and subsequent compositions
- // also there are differences between root composition and child composition
- // mark the first composition transaction with a property initialComposition to distinguish it
- // when the root gets new instruction for the first time
if (!('initialComposition' in compositionTransaction)) {
compositionTransaction.initialComposition = true;
this.compositionTransactionNotifier = compositionTransaction.enlist();
}
}
- /**@internal */
static inject() {
return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];
}
@@ -43,16 +31,10 @@ class RouterView {
this.owningView = owningView;
}
bind(bindingContext, overrideContext) {
- // router needs to get access to view model of current route parent
- // doing it in generic way via viewModel property on container
this.container.viewModel = bindingContext;
this.overrideContext = overrideContext;
}
- /**
- * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline
- */
process($viewPortInstruction, waitToSwap) {
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
const viewPortInstruction = $viewPortInstruction;
const component = viewPortInstruction.component;
const childContainer = component.childContainer;
@@ -62,7 +44,6 @@ class RouterView {
const config = component.router.currentInstruction.config;
const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};
childContainer.get(RouterViewLocator)._notify(this);
- // layoutInstruction is our layout viewModel
const layoutInstruction = {
viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,
view: viewPortConfig.layoutView || config.layoutView || this.layoutView,
@@ -71,24 +52,13 @@ class RouterView {
childContainer: childContainer,
viewSlot: this.viewSlot
};
- // viewport will be a thin wrapper around composition engine
- // to process instruction/configuration from users
- // preparing all information related to a composition process
- // first by getting view strategy of a ViewPortComponent View
const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);
if (viewStrategy && component.view) {
viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);
}
- // using metadata of a custom element view model to load appropriate view-factory instance
return metadata
.load(childContainer, viewModelResource.value, null, viewStrategy, true)
- // for custom element, viewFactory typing is always ViewFactory
- // for custom attribute, it will be HtmlBehaviorResource
.then((viewFactory) => {
- // if this is not the first time that this is composing its instruction
- // try to capture ownership of the composition transaction
- // child will not be able to capture, since root typically captures
- // the ownership token
if (!this.compositionTransactionNotifier) {
this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();
}
@@ -104,12 +74,10 @@ class RouterView {
});
}
swap($viewPortInstruction) {
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
const viewPortInstruction = $viewPortInstruction;
const viewPortController = viewPortInstruction.controller;
const layoutInstruction = viewPortInstruction.layoutInstruction;
const previousView = this.view;
- // Final step of swapping a ViewPortComponent
const work = () => {
const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;
const viewSlot = this.viewSlot;
@@ -117,14 +85,9 @@ class RouterView {
this._notify();
});
};
- // Ensure all users setups have been completed
const ready = (owningView_or_layoutView) => {
viewPortController.automate(this.overrideContext, owningView_or_layoutView);
const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;
- // if this router-view is the root of a normal startup via aurelia.setRoot
- // attemp to take control of the transaction
- // if ownership can be taken
- // wait for transaction to complete before swapping
if (transactionOwnerShipToken) {
return transactionOwnerShipToken
.waitForCompositionComplete()
@@ -133,28 +96,17 @@ class RouterView {
return work();
});
}
- // otherwise, just swap
return work();
};
- // If there is layout instruction, new to compose layout before processing ViewPortComponent
- // layout controller/view/view-model is composed using composition engine APIs
if (layoutInstruction) {
if (!layoutInstruction.viewModel) {
- // createController chokes if there's no viewmodel, so create a dummy one
- // but avoid using a POJO as it creates unwanted metadata in Object constructor
layoutInstruction.viewModel = new EmptyLayoutViewModel();
}
- // using composition engine to create compose layout
return this.compositionEngine
- // first create controller from layoutInstruction
- // and treat it as CompositionContext
- // then emulate slot projection with ViewPortComponent view
.createController(layoutInstruction)
.then((layoutController) => {
const layoutView = layoutController.view;
ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);
- // when there is a layout
- // view hierarchy is: owner view -> layout view -> ViewPortComponent view
layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);
layoutView.children.push(viewPortController.view);
return layoutView || layoutController;
@@ -164,18 +116,9 @@ class RouterView {
return ready(newView);
});
}
- // if there is no layout, then get ViewPortComponent view ready as view property
- // and process controller/swapping
- // when there is no layout
- // view hierarchy is: owner view -> ViewPortComponent view
this.view = viewPortController.view;
return ready(this.owningView);
}
- /**
- * Notify composition transaction that this router has finished processing
- * Happens when this is the root router-view
- * @internal
- */
_notify() {
const notifier = this.compositionTransactionNotifier;
if (notifier) {
@@ -184,60 +127,31 @@ class RouterView {
}
}
}
-/**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- *
- * There is no view to compose by default in a router view
- * This custom element is responsible for composing its own view, based on current config
- */
RouterView.$view = null;
-/**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouterView.$resource = {
name: 'router-view',
bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context']
};
-/**
-* Locator which finds the nearest RouterView, relative to the current dependency injection container.
-*/
class RouterViewLocator {
- /**
- * Creates an instance of the RouterViewLocator class.
- */
constructor() {
this.promise = new Promise((resolve) => this.resolve = resolve);
}
- /**
- * Finds the nearest RouterView instance.
- * @returns A promise that will be resolved with the located RouterView instance.
- */
findNearest() {
return this.promise;
}
- /**@internal */
_notify(routerView) {
this.resolve(routerView);
}
}
-/**@internal exported for unit testing */
class EmptyClass {
}
inlineView('')(EmptyClass);
-/**
- * Default implementation of `RouteLoader` used for loading component based on a route config
- */
class TemplatingRouteLoader extends RouteLoader {
constructor(compositionEngine) {
super();
this.compositionEngine = compositionEngine;
}
- /**
- * Resolve a view model from a RouteConfig
- * Throws when there is neither "moduleId" nor "viewModel" property
- * @internal
- */
resolveViewModel(router, config) {
return new Promise((resolve, reject) => {
let viewModel;
@@ -247,9 +161,6 @@ class TemplatingRouteLoader extends RouteLoader {
viewModel = EmptyClass;
}
else {
- // this requires container of router has passes a certain point
- // where a view model has been setup on the container
- // it will fail in enhance scenario because no viewport has been registered
moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);
if (/\.html/i.test(moduleId)) {
viewModel = createDynamicClass(moduleId);
@@ -260,15 +171,9 @@ class TemplatingRouteLoader extends RouteLoader {
}
return resolve(viewModel);
}
- // todo: add if ('viewModel' in config) to support static view model resolution
reject(new Error('Invalid route config. No "moduleId" found.'));
});
}
- /**
- * Create child container based on a router container
- * Also ensures that child router are properly constructed in the newly created child container
- * @internal
- */
createChildContainer(router) {
const childContainer = router.container.createChild();
childContainer.registerSingleton(RouterViewLocator);
@@ -279,10 +184,7 @@ class TemplatingRouteLoader extends RouteLoader {
};
return childContainer;
}
- /**
- * Load corresponding component of a route config of a navigation instruction
- */
- loadRoute(router, config, _navInstruction) {
+ loadRoute(router, config, navInstruction) {
return this
.resolveViewModel(router, config)
.then(viewModel => this.compositionEngine.ensureViewModel({
@@ -293,9 +195,7 @@ class TemplatingRouteLoader extends RouteLoader {
}));
}
}
-/**@internal */
TemplatingRouteLoader.inject = [CompositionEngine];
-/**@internal exported for unit testing */
function createDynamicClass(moduleId) {
const name = /([^\/^\?]+)\.html/i.exec(moduleId)[1];
class DynamicClass {
@@ -308,17 +208,13 @@ function createDynamicClass(moduleId) {
return DynamicClass;
}
-const logger = getLogger('route-href');
-/**
- * Helper custom attribute to help associate an element with a route by name
- */
+const logger = LogManager.getLogger('route-href');
class RouteHref {
constructor(router, element) {
this.router = router;
this.element = element;
this.attribute = 'href';
}
- /*@internal */
static inject() {
return [Router, DOM.Element];
}
@@ -340,7 +236,6 @@ class RouteHref {
.ensureConfigured()
.then(() => {
if (!this.isActive) {
- // returning null to avoid Bluebird warning
return null;
}
const element = this.element;
@@ -351,7 +246,6 @@ class RouteHref {
else {
element.setAttribute(this.attribute, href);
}
- // returning null to avoid Bluebird warning
return null;
})
.catch((reason) => {
@@ -359,9 +253,6 @@ class RouteHref {
});
}
}
-/**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouteHref.$resource = {
type: 'attribute',
name: 'route-href',
@@ -369,7 +260,7 @@ RouteHref.$resource = {
{ name: 'route', changeHandler: 'processChange', primaryProperty: true },
{ name: 'params', changeHandler: 'processChange' },
'attribute'
- ] // type definition of Aurelia templating is wrong
+ ]
};
function configure(config) {
@@ -380,5 +271,5 @@ function configure(config) {
config.container.registerAlias(Router, AppRouter);
}
-export { RouteHref, RouterView, TemplatingRouteLoader, configure };
+export { RouteHref, RouterView, RouterViewLocator, TemplatingRouteLoader, configure };
//# sourceMappingURL=aurelia-templating-router.js.map
diff --git a/dist/es2015/aurelia-templating-router.js.map b/dist/es2015/aurelia-templating-router.js.map
index da06252..212861c 100644
--- a/dist/es2015/aurelia-templating-router.js.map
+++ b/dist/es2015/aurelia-templating-router.js.map
@@ -1 +1 @@
-{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["import { Container } from 'aurelia-dependency-injection';\nimport { createOverrideContext, OverrideContext } from 'aurelia-binding';\nimport {\n ViewSlot,\n ViewLocator,\n BehaviorInstruction,\n CompositionTransaction,\n CompositionEngine,\n ShadowDOM,\n SwapStrategies,\n ResourceDescription,\n HtmlBehaviorResource,\n CompositionTransactionNotifier,\n View,\n CompositionTransactionOwnershipToken,\n Controller,\n ViewFactory,\n CompositionContext,\n IStaticResourceConfig,\n IStaticViewConfig\n} from 'aurelia-templating';\nimport {\n Router\n} from 'aurelia-router';\nimport { Origin } from 'aurelia-metadata';\nimport { DOM } from 'aurelia-pal';\nimport { IRouterViewViewPortInstruction, Constructable } from './interfaces';\n\nclass EmptyLayoutViewModel {\n\n}\n\n/**\n * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views\n */\nexport class RouterView {\n\n /**@internal */\n static inject() {\n return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n *\n * There is no view to compose by default in a router view\n * This custom element is responsible for composing its own view, based on current config\n */\n static $view: IStaticViewConfig = null;\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n name: 'router-view',\n bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context'] as any\n };\n\n /**\n * Swapping order when going to a new route. By default, supports 3 value: before, after, with\n * - before = new in -> old out\n * - after = old out -> new in\n * - with = new in + old out\n *\n * These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework\n * Can be extended there and used here\n */\n swapOrder?: string;\n\n /**\n * Layout view used for this router-view layout, if no layout-viewmodel specified\n */\n layoutView?: any;\n\n /**\n * Layout view model used as binding context for this router-view layout\n * Actual type would be {string | Constructable | object}\n */\n layoutViewModel?: any;\n\n /**\n * Layout model used to activate layout view model, if specified with `layoutViewModel`\n */\n layoutModel?: any;\n\n /**\n * Element associated with this custom element\n */\n readonly element: Element;\n\n /**\n * Current router associated with this \n */\n readonly router: Router;\n\n /**\n * Container at this level\n */\n container: Container;\n\n /**\n * @internal\n * the view slot for adding / removing Routing related views created dynamically\n */\n viewSlot: ViewSlot;\n\n /**\n * @internal\n * Used to mimic partially functionalities of CompositionEngine\n */\n viewLocator: ViewLocator;\n\n /**\n * @internal\n * View composed by the CompositionEngine, depends on layout / viewports/ moduleId / viewModel of routeconfig\n */\n view: View;\n\n /**\n * @internal\n * The view where this `` is placed in\n */\n owningView: View;\n\n /**\n * @internal\n * Composition Transaction of initial composition transaction, when this is created\n */\n compositionTransaction: CompositionTransaction;\n\n /**\n * @internal\n * CompositionEngine instance, responsible for composing view/view model during process changes phase of this \n */\n compositionEngine: CompositionEngine;\n\n /**\n * Composition transaction notifier instance. Created when this router-view composing its instruction\n * for the first time.\n * Null on 2nd time and after.\n * @internal\n */\n compositionTransactionNotifier: CompositionTransactionNotifier;\n\n /**\n * @internal\n */\n compositionTransactionOwnershipToken: CompositionTransactionOwnershipToken;\n\n /**\n * @internal\n */\n overrideContext: OverrideContext;\n\n constructor(\n element: Element,\n container: Container,\n viewSlot: ViewSlot,\n router: Router,\n viewLocator: ViewLocator,\n compositionTransaction: CompositionTransaction,\n compositionEngine: CompositionEngine\n ) {\n this.element = element;\n this.container = container;\n this.viewSlot = viewSlot;\n this.router = router;\n this.viewLocator = viewLocator;\n this.compositionTransaction = compositionTransaction;\n this.compositionEngine = compositionEngine;\n // add this to router view ports lookup based on name attribute\n // when this router is the root router-view\n // also trigger AppRouter registerViewPort extra flow\n this.router.registerViewPort(this, this.element.getAttribute('name'));\n\n // Each process its instruction as a composition transaction\n // there are differences between intial composition and subsequent compositions\n // also there are differences between root composition and child composition\n // mark the first composition transaction with a property initialComposition to distinguish it\n // when the root gets new instruction for the first time\n if (!('initialComposition' in compositionTransaction)) {\n compositionTransaction.initialComposition = true;\n this.compositionTransactionNotifier = compositionTransaction.enlist();\n }\n }\n\n created(owningView: View): void {\n this.owningView = owningView;\n }\n\n bind(bindingContext: any, overrideContext: OverrideContext): void {\n // router needs to get access to view model of current route parent\n // doing it in generic way via viewModel property on container\n this.container.viewModel = bindingContext;\n this.overrideContext = overrideContext;\n }\n\n /**\n * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline\n */\n process($viewPortInstruction: any, waitToSwap?: boolean): Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction = $viewPortInstruction as IRouterViewViewPortInstruction;\n const component = viewPortInstruction.component;\n const childContainer = component.childContainer;\n const viewModel = component.viewModel;\n const viewModelResource = component.viewModelResource as unknown as ResourceDescription;\n const metadata = viewModelResource.metadata;\n const config = component.router.currentInstruction.config;\n const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};\n\n (childContainer.get(RouterViewLocator) as RouterViewLocator)._notify(this);\n\n // layoutInstruction is our layout viewModel\n const layoutInstruction = {\n viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,\n view: viewPortConfig.layoutView || config.layoutView || this.layoutView,\n model: viewPortConfig.layoutModel || config.layoutModel || this.layoutModel,\n router: viewPortInstruction.component.router,\n childContainer: childContainer,\n viewSlot: this.viewSlot\n };\n\n // viewport will be a thin wrapper around composition engine\n // to process instruction/configuration from users\n // preparing all information related to a composition process\n // first by getting view strategy of a ViewPortComponent View\n const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);\n if (viewStrategy && component.view) {\n viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);\n }\n\n // using metadata of a custom element view model to load appropriate view-factory instance\n return metadata\n .load(childContainer, viewModelResource.value, null, viewStrategy, true)\n // for custom element, viewFactory typing is always ViewFactory\n // for custom attribute, it will be HtmlBehaviorResource\n .then((viewFactory: ViewFactory | HtmlBehaviorResource) => {\n // if this is not the first time that this is composing its instruction\n // try to capture ownership of the composition transaction\n // child will not be able to capture, since root typically captures\n // the ownership token\n if (!this.compositionTransactionNotifier) {\n this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();\n }\n\n if (layoutInstruction.viewModel || layoutInstruction.view) {\n viewPortInstruction.layoutInstruction = layoutInstruction;\n }\n\n const viewPortComponentBehaviorInstruction = BehaviorInstruction.dynamic(\n this.element,\n viewModel,\n viewFactory as ViewFactory\n );\n viewPortInstruction.controller = metadata.create(childContainer, viewPortComponentBehaviorInstruction);\n\n if (waitToSwap) {\n return null;\n }\n\n this.swap(viewPortInstruction);\n });\n }\n\n swap($viewPortInstruction: any): void | Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction: IRouterViewViewPortInstruction = $viewPortInstruction;\n const viewPortController = viewPortInstruction.controller;\n const layoutInstruction = viewPortInstruction.layoutInstruction;\n const previousView = this.view;\n\n // Final step of swapping a ViewPortComponent\n const work = () => {\n const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;\n const viewSlot = this.viewSlot;\n\n swapStrategy(\n viewSlot,\n previousView,\n () => Promise.resolve(viewSlot.add(this.view))\n ).then(() => {\n this._notify();\n });\n };\n\n // Ensure all users setups have been completed\n const ready = (owningView_or_layoutView: View) => {\n viewPortController.automate(this.overrideContext, owningView_or_layoutView);\n const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;\n // if this router-view is the root of a normal startup via aurelia.setRoot\n // attemp to take control of the transaction\n\n // if ownership can be taken\n // wait for transaction to complete before swapping\n if (transactionOwnerShipToken) {\n return transactionOwnerShipToken\n .waitForCompositionComplete()\n .then(() => {\n this.compositionTransactionOwnershipToken = null;\n return work();\n });\n }\n\n // otherwise, just swap\n return work();\n };\n\n // If there is layout instruction, new to compose layout before processing ViewPortComponent\n // layout controller/view/view-model is composed using composition engine APIs\n if (layoutInstruction) {\n if (!layoutInstruction.viewModel) {\n // createController chokes if there's no viewmodel, so create a dummy one\n // but avoid using a POJO as it creates unwanted metadata in Object constructor\n layoutInstruction.viewModel = new EmptyLayoutViewModel();\n }\n\n // using composition engine to create compose layout\n return this.compositionEngine\n // first create controller from layoutInstruction\n // and treat it as CompositionContext\n // then emulate slot projection with ViewPortComponent view\n .createController(layoutInstruction as CompositionContext)\n .then((layoutController: Controller) => {\n const layoutView = layoutController.view;\n ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);\n // when there is a layout\n // view hierarchy is: owner view -> layout view -> ViewPortComponent view\n layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);\n layoutView.children.push(viewPortController.view);\n return layoutView || layoutController;\n })\n .then((newView: View | Controller) => {\n this.view = newView as View;\n return ready(newView as View);\n });\n }\n\n // if there is no layout, then get ViewPortComponent view ready as view property\n // and process controller/swapping\n // when there is no layout\n // view hierarchy is: owner view -> ViewPortComponent view\n this.view = viewPortController.view;\n\n return ready(this.owningView);\n }\n\n /**\n * Notify composition transaction that this router has finished processing\n * Happens when this is the root router-view\n * @internal\n */\n _notify() {\n const notifier = this.compositionTransactionNotifier;\n if (notifier) {\n notifier.done();\n this.compositionTransactionNotifier = null;\n }\n }\n}\n\n/**\n* Locator which finds the nearest RouterView, relative to the current dependency injection container.\n*/\nexport class RouterViewLocator {\n\n /*@internal */\n promise: Promise;\n\n /*@internal */\n resolve: (val?: any) => void;\n\n /**\n * Creates an instance of the RouterViewLocator class.\n */\n constructor() {\n this.promise = new Promise((resolve) => this.resolve = resolve);\n }\n\n /**\n * Finds the nearest RouterView instance.\n * @returns A promise that will be resolved with the located RouterView instance.\n */\n findNearest(): Promise {\n return this.promise;\n }\n\n /**@internal */\n _notify(routerView: RouterView): void {\n this.resolve(routerView);\n }\n}\n","import { Origin } from 'aurelia-metadata';\nimport { relativeToFile } from 'aurelia-path';\nimport { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';\nimport { CompositionEngine, customElement, inlineView, useView, CompositionContext } from 'aurelia-templating';\nimport { RouterViewLocator } from './router-view';\nimport { Container } from 'aurelia-dependency-injection';\n\n/**@internal exported for unit testing */\nexport class EmptyClass { }\ninlineView('')(EmptyClass);\n\n/**\n * Default implementation of `RouteLoader` used for loading component based on a route config\n */\nexport class TemplatingRouteLoader extends RouteLoader {\n\n /**@internal */\n static inject = [CompositionEngine];\n\n /**@internal */\n compositionEngine: CompositionEngine;\n\n constructor(\n compositionEngine: CompositionEngine\n ) {\n super();\n this.compositionEngine = compositionEngine;\n }\n\n /**\n * Resolve a view model from a RouteConfig\n * Throws when there is neither \"moduleId\" nor \"viewModel\" property\n * @internal\n */\n resolveViewModel(router: Router, config: RouteConfig): Promise {\n return new Promise((resolve, reject) => {\n let viewModel: string | null | Function;\n if ('moduleId' in config) {\n let moduleId = config.moduleId;\n if (moduleId === null) {\n viewModel = EmptyClass;\n } else {\n // this requires container of router has passes a certain point\n // where a view model has been setup on the container\n // it will fail in enhance scenario because no viewport has been registered\n moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);\n if (/\\.html/i.test(moduleId)) {\n viewModel = createDynamicClass(moduleId);\n } else {\n viewModel = moduleId;\n }\n }\n return resolve(viewModel);\n }\n // todo: add if ('viewModel' in config) to support static view model resolution\n reject(new Error('Invalid route config. No \"moduleId\" found.'));\n });\n }\n\n /**\n * Create child container based on a router container\n * Also ensures that child router are properly constructed in the newly created child container\n * @internal\n */\n createChildContainer(router: Router): Container {\n const childContainer = router.container.createChild();\n\n childContainer.registerSingleton(RouterViewLocator);\n childContainer.getChildRouter = function() {\n let childRouter: Router;\n\n childContainer.registerHandler(\n Router,\n () => childRouter || (childRouter = router.createChild(childContainer))\n );\n\n return childContainer.get(Router);\n };\n return childContainer;\n }\n\n /**\n * Load corresponding component of a route config of a navigation instruction\n */\n loadRoute(router: Router, config: RouteConfig, _navInstruction: NavigationInstruction): Promise {\n return this\n .resolveViewModel(router, config)\n .then(viewModel => this.compositionEngine.ensureViewModel({\n viewModel: viewModel,\n childContainer: this.createChildContainer(router),\n view: config.view || config.viewStrategy,\n router: router\n } as CompositionContext));\n }\n}\n\n/**@internal exported for unit testing */\nexport function createDynamicClass(moduleId: string) {\n const name = /([^\\/^\\?]+)\\.html/i.exec(moduleId)[1];\n\n class DynamicClass {\n\n $parent: any;\n\n bind(bindingContext: any) {\n this.$parent = bindingContext;\n }\n }\n\n customElement(name)(DynamicClass);\n useView(moduleId)(DynamicClass);\n\n return DynamicClass;\n}\n","import { IStaticResourceConfig } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { DOM } from 'aurelia-pal';\nimport * as LogManager from 'aurelia-logging';\n\nconst logger = LogManager.getLogger('route-href');\n\n/**\n * Helper custom attribute to help associate an element with a route by name\n */\nexport class RouteHref {\n\n /*@internal */\n static inject() {\n return [Router, DOM.Element];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n type: 'attribute',\n name: 'route-href',\n bindables: [\n { name: 'route', changeHandler: 'processChange', primaryProperty: true },\n { name: 'params', changeHandler: 'processChange' },\n 'attribute'\n ] as any // type definition of Aurelia templating is wrong\n };\n\n /**\n * Current router of this attribute\n */\n readonly router: Router;\n\n /**\n * Element this attribute is associated with\n */\n readonly element: Element;\n\n /**@internal */\n isActive: boolean;\n\n /**\n * Name of the route this attribute refers to. This name should exist in the current router hierarchy\n */\n route: string;\n\n /**\n * Parameters of this attribute to generate URL.\n */\n params: Record;\n\n /**\n * Target property on a custom element if this attribute is put on a custom element\n * OR an attribute if this attribute is put on a normal element\n */\n attribute: string;\n\n constructor(\n router: Router,\n element: Element\n ) {\n this.router = router;\n this.element = element;\n this.attribute = 'href';\n }\n\n bind() {\n this.isActive = true;\n this.processChange();\n }\n\n unbind() {\n this.isActive = false;\n }\n\n attributeChanged(value: any, previous: any) {\n if (previous) {\n this.element.removeAttribute(previous);\n }\n\n return this.processChange();\n }\n\n processChange() {\n return this.router\n .ensureConfigured()\n .then((): null => {\n if (!this.isActive) {\n // returning null to avoid Bluebird warning\n return null;\n }\n const element = this.element as Element & { au: any };\n\n const href = this.router.generate(this.route, this.params);\n\n if (element.au.controller) {\n element.au.controller.viewModel[this.attribute] = href;\n } else {\n element.setAttribute(this.attribute, href);\n }\n\n // returning null to avoid Bluebird warning\n return null;\n })\n .catch((reason: any) => {\n logger.error(reason);\n });\n }\n}\n\n","import { Router, AppRouter, RouteLoader } from 'aurelia-router';\nimport { TemplatingRouteLoader } from './route-loader';\nimport { RouterView } from './router-view';\nimport { RouteHref } from './route-href';\nimport { IFrameworkConfiguration } from './interfaces';\n\nexport function configure(config: IFrameworkConfiguration) {\n config\n .singleton(RouteLoader, TemplatingRouteLoader)\n .singleton(Router, AppRouter)\n .globalResources(\n RouterView,\n RouteHref\n );\n\n config.container.registerAlias(Router, AppRouter);\n}\n\nexport {\n TemplatingRouteLoader,\n RouterView,\n RouteHref\n};\n"],"names":["LogManager.getLogger"],"mappings":";;;;;;;;;AA4BA,MAAM,oBAAoB;CAEzB;;;;AAKD,MAAa,UAAU;IAsHrB,YACE,OAAgB,EAChB,SAAoB,EACpB,QAAkB,EAClB,MAAc,EACd,WAAwB,EACxB,sBAA8C,EAC9C,iBAAoC;QAEpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;;;;QAI3C,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;;;;;;QAOtE,IAAI,EAAE,oBAAoB,IAAI,sBAAsB,CAAC,EAAE;YACrD,sBAAsB,CAAC,kBAAkB,GAAG,IA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aACD,KAAK,CAAC,CAAC,MAAW;YACjB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SACtB,CAAC,CAAC;KACN;;;;;AAzFM,mBAAS,GAA0B;IACxC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE;QACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE;QAClD,WAAW;KACL;CACT,CAAC;;SCtBY,SAAS,CAAC,MAA+B;IACvD,MAAM;SACH,SAAS,CAAC,WAAW,EAAE,qBAAqB,CAAC;SAC7C,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;SAC5B,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;IAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnD;;;;"}
\ No newline at end of file
+{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":";;;;;;;;;AA4BA,MAAM,oBAAoB,CAAA;AAEzB,CAAA;MAKY,UAAU,CAAA;AAsHrB,IAAA,WAAA,CACE,OAAgB,EAChB,SAAoB,EACpB,QAAkB,EAClB,MAAc,EACd,WAAwB,EACxB,sBAA8C,EAC9C,iBAAoC,EAAA;AAEpC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,sBAAsB,G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OAAO,IAAI,CAAC;AACd,SAAC,CAAC;AACD,aAAA,KAAK,CAAC,CAAC,MAAW,KAAI;AACrB,YAAA,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACvB,SAAC,CAAC,CAAC;KACN;;AAzFM,SAAA,CAAA,SAAS,GAA0B;AACxC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE;AACxE,QAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE;QAClD,WAAW;AACL,KAAA;CACT;;ACtBG,SAAU,SAAS,CAAC,MAA+B,EAAA;IACvD,MAAM;AACH,SAAA,SAAS,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC7C,SAAA,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;AAC5B,SAAA,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;IAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACpD;;;;"}
\ No newline at end of file
diff --git a/dist/es2017/aurelia-templating-router.js b/dist/es2017/aurelia-templating-router.js
new file mode 100644
index 0000000..9118350
--- /dev/null
+++ b/dist/es2017/aurelia-templating-router.js
@@ -0,0 +1,275 @@
+import { Router, RouteLoader, AppRouter } from 'aurelia-router';
+import { Origin } from 'aurelia-metadata';
+import { relativeToFile } from 'aurelia-path';
+import { ViewSlot, ViewLocator, CompositionTransaction, CompositionEngine, BehaviorInstruction, ShadowDOM, SwapStrategies, inlineView, customElement, useView } from 'aurelia-templating';
+import { Container } from 'aurelia-dependency-injection';
+import { createOverrideContext } from 'aurelia-binding';
+import { DOM } from 'aurelia-pal';
+import * as LogManager from 'aurelia-logging';
+
+class EmptyLayoutViewModel {
+}
+class RouterView {
+ constructor(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {
+ this.element = element;
+ this.container = container;
+ this.viewSlot = viewSlot;
+ this.router = router;
+ this.viewLocator = viewLocator;
+ this.compositionTransaction = compositionTransaction;
+ this.compositionEngine = compositionEngine;
+ this.router.registerViewPort(this, this.element.getAttribute('name'));
+ if (!('initialComposition' in compositionTransaction)) {
+ compositionTransaction.initialComposition = true;
+ this.compositionTransactionNotifier = compositionTransaction.enlist();
+ }
+ }
+ static inject() {
+ return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];
+ }
+ created(owningView) {
+ this.owningView = owningView;
+ }
+ bind(bindingContext, overrideContext) {
+ this.container.viewModel = bindingContext;
+ this.overrideContext = overrideContext;
+ }
+ process($viewPortInstruction, waitToSwap) {
+ const viewPortInstruction = $viewPortInstruction;
+ const component = viewPortInstruction.component;
+ const childContainer = component.childContainer;
+ const viewModel = component.viewModel;
+ const viewModelResource = component.viewModelResource;
+ const metadata = viewModelResource.metadata;
+ const config = component.router.currentInstruction.config;
+ const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};
+ childContainer.get(RouterViewLocator)._notify(this);
+ const layoutInstruction = {
+ viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,
+ view: viewPortConfig.layoutView || config.layoutView || this.layoutView,
+ model: viewPortConfig.layoutModel || config.layoutModel || this.layoutModel,
+ router: viewPortInstruction.component.router,
+ childContainer: childContainer,
+ viewSlot: this.viewSlot
+ };
+ const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);
+ if (viewStrategy && component.view) {
+ viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);
+ }
+ return metadata
+ .load(childContainer, viewModelResource.value, null, viewStrategy, true)
+ .then((viewFactory) => {
+ if (!this.compositionTransactionNotifier) {
+ this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();
+ }
+ if (layoutInstruction.viewModel || layoutInstruction.view) {
+ viewPortInstruction.layoutInstruction = layoutInstruction;
+ }
+ const viewPortComponentBehaviorInstruction = BehaviorInstruction.dynamic(this.element, viewModel, viewFactory);
+ viewPortInstruction.controller = metadata.create(childContainer, viewPortComponentBehaviorInstruction);
+ if (waitToSwap) {
+ return null;
+ }
+ this.swap(viewPortInstruction);
+ });
+ }
+ swap($viewPortInstruction) {
+ const viewPortInstruction = $viewPortInstruction;
+ const viewPortController = viewPortInstruction.controller;
+ const layoutInstruction = viewPortInstruction.layoutInstruction;
+ const previousView = this.view;
+ const work = () => {
+ const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;
+ const viewSlot = this.viewSlot;
+ swapStrategy(viewSlot, previousView, () => Promise.resolve(viewSlot.add(this.view))).then(() => {
+ this._notify();
+ });
+ };
+ const ready = (owningView_or_layoutView) => {
+ viewPortController.automate(this.overrideContext, owningView_or_layoutView);
+ const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;
+ if (transactionOwnerShipToken) {
+ return transactionOwnerShipToken
+ .waitForCompositionComplete()
+ .then(() => {
+ this.compositionTransactionOwnershipToken = null;
+ return work();
+ });
+ }
+ return work();
+ };
+ if (layoutInstruction) {
+ if (!layoutInstruction.viewModel) {
+ layoutInstruction.viewModel = new EmptyLayoutViewModel();
+ }
+ return this.compositionEngine
+ .createController(layoutInstruction)
+ .then((layoutController) => {
+ const layoutView = layoutController.view;
+ ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);
+ layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);
+ layoutView.children.push(viewPortController.view);
+ return layoutView || layoutController;
+ })
+ .then((newView) => {
+ this.view = newView;
+ return ready(newView);
+ });
+ }
+ this.view = viewPortController.view;
+ return ready(this.owningView);
+ }
+ _notify() {
+ const notifier = this.compositionTransactionNotifier;
+ if (notifier) {
+ notifier.done();
+ this.compositionTransactionNotifier = null;
+ }
+ }
+}
+RouterView.$view = null;
+RouterView.$resource = {
+ name: 'router-view',
+ bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context']
+};
+class RouterViewLocator {
+ constructor() {
+ this.promise = new Promise((resolve) => this.resolve = resolve);
+ }
+ findNearest() {
+ return this.promise;
+ }
+ _notify(routerView) {
+ this.resolve(routerView);
+ }
+}
+
+class EmptyClass {
+}
+inlineView('')(EmptyClass);
+class TemplatingRouteLoader extends RouteLoader {
+ constructor(compositionEngine) {
+ super();
+ this.compositionEngine = compositionEngine;
+ }
+ resolveViewModel(router, config) {
+ return new Promise((resolve, reject) => {
+ let viewModel;
+ if ('moduleId' in config) {
+ let moduleId = config.moduleId;
+ if (moduleId === null) {
+ viewModel = EmptyClass;
+ }
+ else {
+ moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);
+ if (/\.html/i.test(moduleId)) {
+ viewModel = createDynamicClass(moduleId);
+ }
+ else {
+ viewModel = moduleId;
+ }
+ }
+ return resolve(viewModel);
+ }
+ reject(new Error('Invalid route config. No "moduleId" found.'));
+ });
+ }
+ createChildContainer(router) {
+ const childContainer = router.container.createChild();
+ childContainer.registerSingleton(RouterViewLocator);
+ childContainer.getChildRouter = function () {
+ let childRouter;
+ childContainer.registerHandler(Router, () => childRouter || (childRouter = router.createChild(childContainer)));
+ return childContainer.get(Router);
+ };
+ return childContainer;
+ }
+ loadRoute(router, config, navInstruction) {
+ return this
+ .resolveViewModel(router, config)
+ .then(viewModel => this.compositionEngine.ensureViewModel({
+ viewModel: viewModel,
+ childContainer: this.createChildContainer(router),
+ view: config.view || config.viewStrategy,
+ router: router
+ }));
+ }
+}
+TemplatingRouteLoader.inject = [CompositionEngine];
+function createDynamicClass(moduleId) {
+ const name = /([^\/^\?]+)\.html/i.exec(moduleId)[1];
+ class DynamicClass {
+ bind(bindingContext) {
+ this.$parent = bindingContext;
+ }
+ }
+ customElement(name)(DynamicClass);
+ useView(moduleId)(DynamicClass);
+ return DynamicClass;
+}
+
+const logger = LogManager.getLogger('route-href');
+class RouteHref {
+ constructor(router, element) {
+ this.router = router;
+ this.element = element;
+ this.attribute = 'href';
+ }
+ static inject() {
+ return [Router, DOM.Element];
+ }
+ bind() {
+ this.isActive = true;
+ this.processChange();
+ }
+ unbind() {
+ this.isActive = false;
+ }
+ attributeChanged(value, previous) {
+ if (previous) {
+ this.element.removeAttribute(previous);
+ }
+ return this.processChange();
+ }
+ processChange() {
+ return this.router
+ .ensureConfigured()
+ .then(() => {
+ if (!this.isActive) {
+ return null;
+ }
+ const element = this.element;
+ const href = this.router.generate(this.route, this.params);
+ if (element.au.controller) {
+ element.au.controller.viewModel[this.attribute] = href;
+ }
+ else {
+ element.setAttribute(this.attribute, href);
+ }
+ return null;
+ })
+ .catch((reason) => {
+ logger.error(reason);
+ });
+ }
+}
+RouteHref.$resource = {
+ type: 'attribute',
+ name: 'route-href',
+ bindables: [
+ { name: 'route', changeHandler: 'processChange', primaryProperty: true },
+ { name: 'params', changeHandler: 'processChange' },
+ 'attribute'
+ ]
+};
+
+function configure(config) {
+ config
+ .singleton(RouteLoader, TemplatingRouteLoader)
+ .singleton(Router, AppRouter)
+ .globalResources(RouterView, RouteHref);
+ config.container.registerAlias(Router, AppRouter);
+}
+
+export { RouteHref, RouterView, RouterViewLocator, TemplatingRouteLoader, configure };
+//# sourceMappingURL=aurelia-templating-router.js.map
diff --git a/dist/es2017/aurelia-templating-router.js.map b/dist/es2017/aurelia-templating-router.js.map
new file mode 100644
index 0000000..212861c
--- /dev/null
+++ b/dist/es2017/aurelia-templating-router.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":";;;;;;;;;AA4BA,MAAM,oBAAoB,CAAA;AAEzB,CAAA;MAKY,UAAU,CAAA;AAsHrB,IAAA,WAAA,CACE,OAAgB,EAChB,SAAoB,EACpB,QAAkB,EAClB,MAAc,EACd,WAA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K,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AAE3D,YAAA,IAAI,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE;AACzB,gBAAA,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;AACxD,aAAA;AAAM,iBAAA;gBACL,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5C,aAAA;AAGD,YAAA,OAAO,IAAI,CAAC;AACd,SAAC,CAAC;AACD,aAAA,KAAK,CAAC,CAAC,MAAW,KAAI;AACrB,YAAA,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACvB,SAAC,CAAC,CAAC;KACN;;AAzFM,SAAA,CAAA,SAAS,GAA0B;AACxC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE;AACxE,QAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE;QAClD,WAAW;AACL,KAAA;CACT;;ACtBG,SAAU,SAAS,CAAC,MAA+B,EAAA;IACvD,MAAM;AACH,SAAA,SAAS,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC7C,SAAA,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;AAC5B,SAAA,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;IAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACpD;;;;"}
\ No newline at end of file
diff --git a/dist/native-modules/aurelia-templating-router.js b/dist/native-modules/aurelia-templating-router.js
index 5287b95..f35f760 100644
--- a/dist/native-modules/aurelia-templating-router.js
+++ b/dist/native-modules/aurelia-templating-router.js
@@ -5,46 +5,45 @@ import { BehaviorInstruction, ShadowDOM, ViewSlot, ViewLocator, CompositionTrans
import { Container } from 'aurelia-dependency-injection';
import { createOverrideContext } from 'aurelia-binding';
import { DOM } from 'aurelia-pal';
-import { getLogger } from 'aurelia-logging';
+import * as LogManager from 'aurelia-logging';
/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
+Copyright (c) Microsoft Corporation.
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
-var EmptyLayoutViewModel = /** @class */ (function () {
+var EmptyLayoutViewModel = (function () {
function EmptyLayoutViewModel() {
}
return EmptyLayoutViewModel;
}());
-/**
- * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
- */
-var RouterView = /** @class */ (function () {
+var RouterView = (function () {
function RouterView(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {
this.element = element;
this.container = container;
@@ -53,21 +52,12 @@ var RouterView = /** @class */ (function () {
this.viewLocator = viewLocator;
this.compositionTransaction = compositionTransaction;
this.compositionEngine = compositionEngine;
- // add this to router view ports lookup based on name attribute
- // when this router is the root router-view
- // also trigger AppRouter registerViewPort extra flow
this.router.registerViewPort(this, this.element.getAttribute('name'));
- // Each process its instruction as a composition transaction
- // there are differences between intial composition and subsequent compositions
- // also there are differences between root composition and child composition
- // mark the first composition transaction with a property initialComposition to distinguish it
- // when the root gets new instruction for the first time
if (!('initialComposition' in compositionTransaction)) {
compositionTransaction.initialComposition = true;
this.compositionTransactionNotifier = compositionTransaction.enlist();
}
}
- /**@internal */
RouterView.inject = function () {
return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];
};
@@ -75,17 +65,11 @@ var RouterView = /** @class */ (function () {
this.owningView = owningView;
};
RouterView.prototype.bind = function (bindingContext, overrideContext) {
- // router needs to get access to view model of current route parent
- // doing it in generic way via viewModel property on container
this.container.viewModel = bindingContext;
this.overrideContext = overrideContext;
};
- /**
- * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline
- */
RouterView.prototype.process = function ($viewPortInstruction, waitToSwap) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var component = viewPortInstruction.component;
var childContainer = component.childContainer;
@@ -95,7 +79,6 @@ var RouterView = /** @class */ (function () {
var config = component.router.currentInstruction.config;
var viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};
childContainer.get(RouterViewLocator)._notify(this);
- // layoutInstruction is our layout viewModel
var layoutInstruction = {
viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,
view: viewPortConfig.layoutView || config.layoutView || this.layoutView,
@@ -104,24 +87,13 @@ var RouterView = /** @class */ (function () {
childContainer: childContainer,
viewSlot: this.viewSlot
};
- // viewport will be a thin wrapper around composition engine
- // to process instruction/configuration from users
- // preparing all information related to a composition process
- // first by getting view strategy of a ViewPortComponent View
var viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);
if (viewStrategy && component.view) {
viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);
}
- // using metadata of a custom element view model to load appropriate view-factory instance
return metadata
.load(childContainer, viewModelResource.value, null, viewStrategy, true)
- // for custom element, viewFactory typing is always ViewFactory
- // for custom attribute, it will be HtmlBehaviorResource
.then(function (viewFactory) {
- // if this is not the first time that this is composing its instruction
- // try to capture ownership of the composition transaction
- // child will not be able to capture, since root typically captures
- // the ownership token
if (!_this.compositionTransactionNotifier) {
_this.compositionTransactionOwnershipToken = _this.compositionTransaction.tryCapture();
}
@@ -138,12 +110,10 @@ var RouterView = /** @class */ (function () {
};
RouterView.prototype.swap = function ($viewPortInstruction) {
var _this = this;
- // have strong typings without exposing it in public typings, this is to ensure maximum backward compat
var viewPortInstruction = $viewPortInstruction;
var viewPortController = viewPortInstruction.controller;
var layoutInstruction = viewPortInstruction.layoutInstruction;
var previousView = this.view;
- // Final step of swapping a ViewPortComponent
var work = function () {
var swapStrategy = SwapStrategies[_this.swapOrder] || SwapStrategies.after;
var viewSlot = _this.viewSlot;
@@ -151,14 +121,9 @@ var RouterView = /** @class */ (function () {
_this._notify();
});
};
- // Ensure all users setups have been completed
var ready = function (owningView_or_layoutView) {
viewPortController.automate(_this.overrideContext, owningView_or_layoutView);
var transactionOwnerShipToken = _this.compositionTransactionOwnershipToken;
- // if this router-view is the root of a normal startup via aurelia.setRoot
- // attemp to take control of the transaction
- // if ownership can be taken
- // wait for transaction to complete before swapping
if (transactionOwnerShipToken) {
return transactionOwnerShipToken
.waitForCompositionComplete()
@@ -167,28 +132,17 @@ var RouterView = /** @class */ (function () {
return work();
});
}
- // otherwise, just swap
return work();
};
- // If there is layout instruction, new to compose layout before processing ViewPortComponent
- // layout controller/view/view-model is composed using composition engine APIs
if (layoutInstruction) {
if (!layoutInstruction.viewModel) {
- // createController chokes if there's no viewmodel, so create a dummy one
- // but avoid using a POJO as it creates unwanted metadata in Object constructor
layoutInstruction.viewModel = new EmptyLayoutViewModel();
}
- // using composition engine to create compose layout
return this.compositionEngine
- // first create controller from layoutInstruction
- // and treat it as CompositionContext
- // then emulate slot projection with ViewPortComponent view
.createController(layoutInstruction)
.then(function (layoutController) {
var layoutView = layoutController.view;
ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);
- // when there is a layout
- // view hierarchy is: owner view -> layout view -> ViewPortComponent view
layoutController.automate(createOverrideContext(layoutInstruction.viewModel), _this.owningView);
layoutView.children.push(viewPortController.view);
return layoutView || layoutController;
@@ -198,18 +152,9 @@ var RouterView = /** @class */ (function () {
return ready(newView);
});
}
- // if there is no layout, then get ViewPortComponent view ready as view property
- // and process controller/swapping
- // when there is no layout
- // view hierarchy is: owner view -> ViewPortComponent view
this.view = viewPortController.view;
return ready(this.owningView);
};
- /**
- * Notify composition transaction that this router has finished processing
- * Happens when this is the root router-view
- * @internal
- */
RouterView.prototype._notify = function () {
var notifier = this.compositionTransactionNotifier;
if (notifier) {
@@ -217,69 +162,40 @@ var RouterView = /** @class */ (function () {
this.compositionTransactionNotifier = null;
}
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- *
- * There is no view to compose by default in a router view
- * This custom element is responsible for composing its own view, based on current config
- */
RouterView.$view = null;
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouterView.$resource = {
name: 'router-view',
bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context']
};
return RouterView;
}());
-/**
-* Locator which finds the nearest RouterView, relative to the current dependency injection container.
-*/
-var RouterViewLocator = /** @class */ (function () {
- /**
- * Creates an instance of the RouterViewLocator class.
- */
+var RouterViewLocator = (function () {
function RouterViewLocator() {
var _this = this;
this.promise = new Promise(function (resolve) { return _this.resolve = resolve; });
}
- /**
- * Finds the nearest RouterView instance.
- * @returns A promise that will be resolved with the located RouterView instance.
- */
RouterViewLocator.prototype.findNearest = function () {
return this.promise;
};
- /**@internal */
RouterViewLocator.prototype._notify = function (routerView) {
this.resolve(routerView);
};
return RouterViewLocator;
}());
-/**@internal exported for unit testing */
-var EmptyClass = /** @class */ (function () {
+var EmptyClass = (function () {
function EmptyClass() {
}
return EmptyClass;
}());
inlineView('')(EmptyClass);
-/**
- * Default implementation of `RouteLoader` used for loading component based on a route config
- */
-var TemplatingRouteLoader = /** @class */ (function (_super) {
+var TemplatingRouteLoader = (function (_super) {
__extends(TemplatingRouteLoader, _super);
function TemplatingRouteLoader(compositionEngine) {
var _this = _super.call(this) || this;
_this.compositionEngine = compositionEngine;
return _this;
}
- /**
- * Resolve a view model from a RouteConfig
- * Throws when there is neither "moduleId" nor "viewModel" property
- * @internal
- */
TemplatingRouteLoader.prototype.resolveViewModel = function (router, config) {
return new Promise(function (resolve, reject) {
var viewModel;
@@ -289,9 +205,6 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
viewModel = EmptyClass;
}
else {
- // this requires container of router has passes a certain point
- // where a view model has been setup on the container
- // it will fail in enhance scenario because no viewport has been registered
moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);
if (/\.html/i.test(moduleId)) {
viewModel = createDynamicClass(moduleId);
@@ -302,15 +215,9 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
}
return resolve(viewModel);
}
- // todo: add if ('viewModel' in config) to support static view model resolution
reject(new Error('Invalid route config. No "moduleId" found.'));
});
};
- /**
- * Create child container based on a router container
- * Also ensures that child router are properly constructed in the newly created child container
- * @internal
- */
TemplatingRouteLoader.prototype.createChildContainer = function (router) {
var childContainer = router.container.createChild();
childContainer.registerSingleton(RouterViewLocator);
@@ -321,10 +228,7 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
};
return childContainer;
};
- /**
- * Load corresponding component of a route config of a navigation instruction
- */
- TemplatingRouteLoader.prototype.loadRoute = function (router, config, _navInstruction) {
+ TemplatingRouteLoader.prototype.loadRoute = function (router, config, navInstruction) {
var _this = this;
return this
.resolveViewModel(router, config)
@@ -335,14 +239,12 @@ var TemplatingRouteLoader = /** @class */ (function (_super) {
router: router
}); });
};
- /**@internal */
TemplatingRouteLoader.inject = [CompositionEngine];
return TemplatingRouteLoader;
}(RouteLoader));
-/**@internal exported for unit testing */
function createDynamicClass(moduleId) {
var name = /([^\/^\?]+)\.html/i.exec(moduleId)[1];
- var DynamicClass = /** @class */ (function () {
+ var DynamicClass = (function () {
function DynamicClass() {
}
DynamicClass.prototype.bind = function (bindingContext) {
@@ -355,17 +257,13 @@ function createDynamicClass(moduleId) {
return DynamicClass;
}
-var logger = getLogger('route-href');
-/**
- * Helper custom attribute to help associate an element with a route by name
- */
-var RouteHref = /** @class */ (function () {
+var logger = LogManager.getLogger('route-href');
+var RouteHref = (function () {
function RouteHref(router, element) {
this.router = router;
this.element = element;
this.attribute = 'href';
}
- /*@internal */
RouteHref.inject = function () {
return [Router, DOM.Element];
};
@@ -388,7 +286,6 @@ var RouteHref = /** @class */ (function () {
.ensureConfigured()
.then(function () {
if (!_this.isActive) {
- // returning null to avoid Bluebird warning
return null;
}
var element = _this.element;
@@ -399,16 +296,12 @@ var RouteHref = /** @class */ (function () {
else {
element.setAttribute(_this.attribute, href);
}
- // returning null to avoid Bluebird warning
return null;
})
.catch(function (reason) {
logger.error(reason);
});
};
- /**
- * @internal Actively avoid using decorator to reduce the amount of code generated
- */
RouteHref.$resource = {
type: 'attribute',
name: 'route-href',
@@ -416,7 +309,7 @@ var RouteHref = /** @class */ (function () {
{ name: 'route', changeHandler: 'processChange', primaryProperty: true },
{ name: 'params', changeHandler: 'processChange' },
'attribute'
- ] // type definition of Aurelia templating is wrong
+ ]
};
return RouteHref;
}());
@@ -429,5 +322,5 @@ function configure(config) {
config.container.registerAlias(Router, AppRouter);
}
-export { RouteHref, RouterView, TemplatingRouteLoader, configure };
+export { RouteHref, RouterView, RouterViewLocator, TemplatingRouteLoader, configure };
//# sourceMappingURL=aurelia-templating-router.js.map
diff --git a/dist/native-modules/aurelia-templating-router.js.map b/dist/native-modules/aurelia-templating-router.js.map
index 22a14ca..abcfe49 100644
--- a/dist/native-modules/aurelia-templating-router.js.map
+++ b/dist/native-modules/aurelia-templating-router.js.map
@@ -1 +1 @@
-{"version":3,"file":"aurelia-templating-router.js","sources":["../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["import { Container } from 'aurelia-dependency-injection';\nimport { createOverrideContext, OverrideContext } from 'aurelia-binding';\nimport {\n ViewSlot,\n ViewLocator,\n BehaviorInstruction,\n CompositionTransaction,\n CompositionEngine,\n ShadowDOM,\n SwapStrategies,\n ResourceDescription,\n HtmlBehaviorResource,\n CompositionTransactionNotifier,\n View,\n CompositionTransactionOwnershipToken,\n Controller,\n ViewFactory,\n CompositionContext,\n IStaticResourceConfig,\n IStaticViewConfig\n} from 'aurelia-templating';\nimport {\n Router\n} from 'aurelia-router';\nimport { Origin } from 'aurelia-metadata';\nimport { DOM } from 'aurelia-pal';\nimport { IRouterViewViewPortInstruction, Constructable } from './interfaces';\n\nclass EmptyLayoutViewModel {\n\n}\n\n/**\n * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views\n */\nexport class RouterView {\n\n /**@internal */\n static inject() {\n return [DOM.Element, Container, ViewSlot, Router, ViewLocator, CompositionTransaction, CompositionEngine];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n *\n * There is no view to compose by default in a router view\n * This custom element is responsible for composing its own view, based on current config\n */\n static $view: IStaticViewConfig = null;\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n name: 'router-view',\n bindables: ['swapOrder', 'layoutView', 'layoutViewModel', 'layoutModel', 'inherit-binding-context'] as any\n };\n\n /**\n * Swapping order when going to a new route. By default, supports 3 value: before, after, with\n * - before = new in -> old out\n * - after = old out -> new in\n * - with = new in + old out\n *\n * These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework\n * Can be extended there and used here\n */\n swapOrder?: string;\n\n /**\n * Layout view used for this router-view layout, if no layout-viewmodel specified\n */\n layoutView?: any;\n\n /**\n * Layout view model used as binding context for this router-view layout\n * Actual type would be {string | Constructable | object}\n */\n layoutViewModel?: any;\n\n /**\n * Layout model used to activate layout view model, if specified with `layoutViewModel`\n */\n layoutModel?: any;\n\n /**\n * Element associated with this custom element\n */\n readonly element: Element;\n\n /**\n * Current router associated with this \n */\n readonly router: Router;\n\n /**\n * Container at this level\n */\n container: Container;\n\n /**\n * @internal\n * the view slot for adding / removing Routing related views created dynamically\n */\n viewSlot: ViewSlot;\n\n /**\n * @internal\n * Used to mimic partially functionalities of CompositionEngine\n */\n viewLocator: ViewLocator;\n\n /**\n * @internal\n * View composed by the CompositionEngine, depends on layout / viewports/ moduleId / viewModel of routeconfig\n */\n view: View;\n\n /**\n * @internal\n * The view where this `` is placed in\n */\n owningView: View;\n\n /**\n * @internal\n * Composition Transaction of initial composition transaction, when this is created\n */\n compositionTransaction: CompositionTransaction;\n\n /**\n * @internal\n * CompositionEngine instance, responsible for composing view/view model during process changes phase of this \n */\n compositionEngine: CompositionEngine;\n\n /**\n * Composition transaction notifier instance. Created when this router-view composing its instruction\n * for the first time.\n * Null on 2nd time and after.\n * @internal\n */\n compositionTransactionNotifier: CompositionTransactionNotifier;\n\n /**\n * @internal\n */\n compositionTransactionOwnershipToken: CompositionTransactionOwnershipToken;\n\n /**\n * @internal\n */\n overrideContext: OverrideContext;\n\n constructor(\n element: Element,\n container: Container,\n viewSlot: ViewSlot,\n router: Router,\n viewLocator: ViewLocator,\n compositionTransaction: CompositionTransaction,\n compositionEngine: CompositionEngine\n ) {\n this.element = element;\n this.container = container;\n this.viewSlot = viewSlot;\n this.router = router;\n this.viewLocator = viewLocator;\n this.compositionTransaction = compositionTransaction;\n this.compositionEngine = compositionEngine;\n // add this to router view ports lookup based on name attribute\n // when this router is the root router-view\n // also trigger AppRouter registerViewPort extra flow\n this.router.registerViewPort(this, this.element.getAttribute('name'));\n\n // Each process its instruction as a composition transaction\n // there are differences between intial composition and subsequent compositions\n // also there are differences between root composition and child composition\n // mark the first composition transaction with a property initialComposition to distinguish it\n // when the root gets new instruction for the first time\n if (!('initialComposition' in compositionTransaction)) {\n compositionTransaction.initialComposition = true;\n this.compositionTransactionNotifier = compositionTransaction.enlist();\n }\n }\n\n created(owningView: View): void {\n this.owningView = owningView;\n }\n\n bind(bindingContext: any, overrideContext: OverrideContext): void {\n // router needs to get access to view model of current route parent\n // doing it in generic way via viewModel property on container\n this.container.viewModel = bindingContext;\n this.overrideContext = overrideContext;\n }\n\n /**\n * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline\n */\n process($viewPortInstruction: any, waitToSwap?: boolean): Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction = $viewPortInstruction as IRouterViewViewPortInstruction;\n const component = viewPortInstruction.component;\n const childContainer = component.childContainer;\n const viewModel = component.viewModel;\n const viewModelResource = component.viewModelResource as unknown as ResourceDescription;\n const metadata = viewModelResource.metadata;\n const config = component.router.currentInstruction.config;\n const viewPortConfig = config.viewPorts ? (config.viewPorts[viewPortInstruction.name] || {}) : {};\n\n (childContainer.get(RouterViewLocator) as RouterViewLocator)._notify(this);\n\n // layoutInstruction is our layout viewModel\n const layoutInstruction = {\n viewModel: viewPortConfig.layoutViewModel || config.layoutViewModel || this.layoutViewModel,\n view: viewPortConfig.layoutView || config.layoutView || this.layoutView,\n model: viewPortConfig.layoutModel || config.layoutModel || this.layoutModel,\n router: viewPortInstruction.component.router,\n childContainer: childContainer,\n viewSlot: this.viewSlot\n };\n\n // viewport will be a thin wrapper around composition engine\n // to process instruction/configuration from users\n // preparing all information related to a composition process\n // first by getting view strategy of a ViewPortComponent View\n const viewStrategy = this.viewLocator.getViewStrategy(component.view || viewModel);\n if (viewStrategy && component.view) {\n viewStrategy.makeRelativeTo(Origin.get(component.router.container.viewModel.constructor).moduleId);\n }\n\n // using metadata of a custom element view model to load appropriate view-factory instance\n return metadata\n .load(childContainer, viewModelResource.value, null, viewStrategy, true)\n // for custom element, viewFactory typing is always ViewFactory\n // for custom attribute, it will be HtmlBehaviorResource\n .then((viewFactory: ViewFactory | HtmlBehaviorResource) => {\n // if this is not the first time that this is composing its instruction\n // try to capture ownership of the composition transaction\n // child will not be able to capture, since root typically captures\n // the ownership token\n if (!this.compositionTransactionNotifier) {\n this.compositionTransactionOwnershipToken = this.compositionTransaction.tryCapture();\n }\n\n if (layoutInstruction.viewModel || layoutInstruction.view) {\n viewPortInstruction.layoutInstruction = layoutInstruction;\n }\n\n const viewPortComponentBehaviorInstruction = BehaviorInstruction.dynamic(\n this.element,\n viewModel,\n viewFactory as ViewFactory\n );\n viewPortInstruction.controller = metadata.create(childContainer, viewPortComponentBehaviorInstruction);\n\n if (waitToSwap) {\n return null;\n }\n\n this.swap(viewPortInstruction);\n });\n }\n\n swap($viewPortInstruction: any): void | Promise {\n // have strong typings without exposing it in public typings, this is to ensure maximum backward compat\n const viewPortInstruction: IRouterViewViewPortInstruction = $viewPortInstruction;\n const viewPortController = viewPortInstruction.controller;\n const layoutInstruction = viewPortInstruction.layoutInstruction;\n const previousView = this.view;\n\n // Final step of swapping a ViewPortComponent\n const work = () => {\n const swapStrategy = SwapStrategies[this.swapOrder] || SwapStrategies.after;\n const viewSlot = this.viewSlot;\n\n swapStrategy(\n viewSlot,\n previousView,\n () => Promise.resolve(viewSlot.add(this.view))\n ).then(() => {\n this._notify();\n });\n };\n\n // Ensure all users setups have been completed\n const ready = (owningView_or_layoutView: View) => {\n viewPortController.automate(this.overrideContext, owningView_or_layoutView);\n const transactionOwnerShipToken = this.compositionTransactionOwnershipToken;\n // if this router-view is the root of a normal startup via aurelia.setRoot\n // attemp to take control of the transaction\n\n // if ownership can be taken\n // wait for transaction to complete before swapping\n if (transactionOwnerShipToken) {\n return transactionOwnerShipToken\n .waitForCompositionComplete()\n .then(() => {\n this.compositionTransactionOwnershipToken = null;\n return work();\n });\n }\n\n // otherwise, just swap\n return work();\n };\n\n // If there is layout instruction, new to compose layout before processing ViewPortComponent\n // layout controller/view/view-model is composed using composition engine APIs\n if (layoutInstruction) {\n if (!layoutInstruction.viewModel) {\n // createController chokes if there's no viewmodel, so create a dummy one\n // but avoid using a POJO as it creates unwanted metadata in Object constructor\n layoutInstruction.viewModel = new EmptyLayoutViewModel();\n }\n\n // using composition engine to create compose layout\n return this.compositionEngine\n // first create controller from layoutInstruction\n // and treat it as CompositionContext\n // then emulate slot projection with ViewPortComponent view\n .createController(layoutInstruction as CompositionContext)\n .then((layoutController: Controller) => {\n const layoutView = layoutController.view;\n ShadowDOM.distributeView(viewPortController.view, layoutController.slots || layoutView.slots);\n // when there is a layout\n // view hierarchy is: owner view -> layout view -> ViewPortComponent view\n layoutController.automate(createOverrideContext(layoutInstruction.viewModel), this.owningView);\n layoutView.children.push(viewPortController.view);\n return layoutView || layoutController;\n })\n .then((newView: View | Controller) => {\n this.view = newView as View;\n return ready(newView as View);\n });\n }\n\n // if there is no layout, then get ViewPortComponent view ready as view property\n // and process controller/swapping\n // when there is no layout\n // view hierarchy is: owner view -> ViewPortComponent view\n this.view = viewPortController.view;\n\n return ready(this.owningView);\n }\n\n /**\n * Notify composition transaction that this router has finished processing\n * Happens when this is the root router-view\n * @internal\n */\n _notify() {\n const notifier = this.compositionTransactionNotifier;\n if (notifier) {\n notifier.done();\n this.compositionTransactionNotifier = null;\n }\n }\n}\n\n/**\n* Locator which finds the nearest RouterView, relative to the current dependency injection container.\n*/\nexport class RouterViewLocator {\n\n /*@internal */\n promise: Promise;\n\n /*@internal */\n resolve: (val?: any) => void;\n\n /**\n * Creates an instance of the RouterViewLocator class.\n */\n constructor() {\n this.promise = new Promise((resolve) => this.resolve = resolve);\n }\n\n /**\n * Finds the nearest RouterView instance.\n * @returns A promise that will be resolved with the located RouterView instance.\n */\n findNearest(): Promise {\n return this.promise;\n }\n\n /**@internal */\n _notify(routerView: RouterView): void {\n this.resolve(routerView);\n }\n}\n","import { Origin } from 'aurelia-metadata';\nimport { relativeToFile } from 'aurelia-path';\nimport { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';\nimport { CompositionEngine, customElement, inlineView, useView, CompositionContext } from 'aurelia-templating';\nimport { RouterViewLocator } from './router-view';\nimport { Container } from 'aurelia-dependency-injection';\n\n/**@internal exported for unit testing */\nexport class EmptyClass { }\ninlineView('')(EmptyClass);\n\n/**\n * Default implementation of `RouteLoader` used for loading component based on a route config\n */\nexport class TemplatingRouteLoader extends RouteLoader {\n\n /**@internal */\n static inject = [CompositionEngine];\n\n /**@internal */\n compositionEngine: CompositionEngine;\n\n constructor(\n compositionEngine: CompositionEngine\n ) {\n super();\n this.compositionEngine = compositionEngine;\n }\n\n /**\n * Resolve a view model from a RouteConfig\n * Throws when there is neither \"moduleId\" nor \"viewModel\" property\n * @internal\n */\n resolveViewModel(router: Router, config: RouteConfig): Promise {\n return new Promise((resolve, reject) => {\n let viewModel: string | null | Function;\n if ('moduleId' in config) {\n let moduleId = config.moduleId;\n if (moduleId === null) {\n viewModel = EmptyClass;\n } else {\n // this requires container of router has passes a certain point\n // where a view model has been setup on the container\n // it will fail in enhance scenario because no viewport has been registered\n moduleId = relativeToFile(moduleId, Origin.get(router.container.viewModel.constructor).moduleId);\n if (/\\.html/i.test(moduleId)) {\n viewModel = createDynamicClass(moduleId);\n } else {\n viewModel = moduleId;\n }\n }\n return resolve(viewModel);\n }\n // todo: add if ('viewModel' in config) to support static view model resolution\n reject(new Error('Invalid route config. No \"moduleId\" found.'));\n });\n }\n\n /**\n * Create child container based on a router container\n * Also ensures that child router are properly constructed in the newly created child container\n * @internal\n */\n createChildContainer(router: Router): Container {\n const childContainer = router.container.createChild();\n\n childContainer.registerSingleton(RouterViewLocator);\n childContainer.getChildRouter = function() {\n let childRouter: Router;\n\n childContainer.registerHandler(\n Router,\n () => childRouter || (childRouter = router.createChild(childContainer))\n );\n\n return childContainer.get(Router);\n };\n return childContainer;\n }\n\n /**\n * Load corresponding component of a route config of a navigation instruction\n */\n loadRoute(router: Router, config: RouteConfig, _navInstruction: NavigationInstruction): Promise {\n return this\n .resolveViewModel(router, config)\n .then(viewModel => this.compositionEngine.ensureViewModel({\n viewModel: viewModel,\n childContainer: this.createChildContainer(router),\n view: config.view || config.viewStrategy,\n router: router\n } as CompositionContext));\n }\n}\n\n/**@internal exported for unit testing */\nexport function createDynamicClass(moduleId: string) {\n const name = /([^\\/^\\?]+)\\.html/i.exec(moduleId)[1];\n\n class DynamicClass {\n\n $parent: any;\n\n bind(bindingContext: any) {\n this.$parent = bindingContext;\n }\n }\n\n customElement(name)(DynamicClass);\n useView(moduleId)(DynamicClass);\n\n return DynamicClass;\n}\n","import { IStaticResourceConfig } from 'aurelia-templating';\nimport { Router } from 'aurelia-router';\nimport { DOM } from 'aurelia-pal';\nimport * as LogManager from 'aurelia-logging';\n\nconst logger = LogManager.getLogger('route-href');\n\n/**\n * Helper custom attribute to help associate an element with a route by name\n */\nexport class RouteHref {\n\n /*@internal */\n static inject() {\n return [Router, DOM.Element];\n }\n\n /**\n * @internal Actively avoid using decorator to reduce the amount of code generated\n */\n static $resource: IStaticResourceConfig = {\n type: 'attribute',\n name: 'route-href',\n bindables: [\n { name: 'route', changeHandler: 'processChange', primaryProperty: true },\n { name: 'params', changeHandler: 'processChange' },\n 'attribute'\n ] as any // type definition of Aurelia templating is wrong\n };\n\n /**\n * Current router of this attribute\n */\n readonly router: Router;\n\n /**\n * Element this attribute is associated with\n */\n readonly element: Element;\n\n /**@internal */\n isActive: boolean;\n\n /**\n * Name of the route this attribute refers to. This name should exist in the current router hierarchy\n */\n route: string;\n\n /**\n * Parameters of this attribute to generate URL.\n */\n params: Record;\n\n /**\n * Target property on a custom element if this attribute is put on a custom element\n * OR an attribute if this attribute is put on a normal element\n */\n attribute: string;\n\n constructor(\n router: Router,\n element: Element\n ) {\n this.router = router;\n this.element = element;\n this.attribute = 'href';\n }\n\n bind() {\n this.isActive = true;\n this.processChange();\n }\n\n unbind() {\n this.isActive = false;\n }\n\n attributeChanged(value: any, previous: any) {\n if (previous) {\n this.element.removeAttribute(previous);\n }\n\n return this.processChange();\n }\n\n processChange() {\n return this.router\n .ensureConfigured()\n .then((): null => {\n if (!this.isActive) {\n // returning null to avoid Bluebird warning\n return null;\n }\n const element = this.element as Element & { au: any };\n\n const href = this.router.generate(this.route, this.params);\n\n if (element.au.controller) {\n element.au.controller.viewModel[this.attribute] = href;\n } else {\n element.setAttribute(this.attribute, href);\n }\n\n // returning null to avoid Bluebird warning\n return null;\n })\n .catch((reason: any) => {\n logger.error(reason);\n });\n }\n}\n\n","import { Router, AppRouter, RouteLoader } from 'aurelia-router';\nimport { TemplatingRouteLoader } from './route-loader';\nimport { RouterView } from './router-view';\nimport { RouteHref } from './route-href';\nimport { IFrameworkConfiguration } from './interfaces';\n\nexport function configure(config: IFrameworkConfiguration) {\n config\n .singleton(RouteLoader, TemplatingRouteLoader)\n .singleton(Router, AppRouter)\n .globalResources(\n RouterView,\n RouteHref\n );\n\n config.container.registerAlias(Router, AppRouter);\n}\n\nexport {\n TemplatingRouteLoader,\n RouterView,\n RouteHref\n};\n"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;QACxC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACT,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE;YACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE;YAClD,WAAW;SACL;KACT,CAAC;IAkFJ,gBAAC;CApGD;;SCJgB,SAAS,CAAC,MAA+B;IACvD,MAAM;SACH,SAAS,CAAC,WAAW,EAAE,qBAAqB,CAAC;SAC7C,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;SAC5B,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;IAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnD;;;;"}
\ No newline at end of file
+{"version":3,"file":"aurelia-templating-router.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/router-view.ts","../../src/route-loader.ts","../../src/route-href.ts","../../src/aurelia-templating-router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;AAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;AAClG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;AAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAA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WAAW;AACL,SAAA;KACT,CAAC;IAkFJ,OAAC,SAAA,CAAA;AAAA,CApGD,EAoGC;;ACxGK,SAAU,SAAS,CAAC,MAA+B,EAAA;IACvD,MAAM;AACH,SAAA,SAAS,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC7C,SAAA,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;AAC5B,SAAA,eAAe,CACd,UAAU,EACV,SAAS,CACV,CAAC;IAEJ,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACpD;;;;"}
\ No newline at end of file
diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md
index 5339f4c..5a37758 100644
--- a/doc/CHANGELOG.md
+++ b/doc/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## 1.5.0 (2022-04-12)
+
+
+### Features
+
+* **router-view:** export RouterViewLocator ([b4bc84a](https://github.com/aurelia/templating-router/commit/b4bc84ae267c081ca6bca56122c8a3f522d0b477)), closes [#127](https://github.com/aurelia/templating-router/issues/127)
+
+
# [1.4.0](https://github.com/aurelia/templating-router/compare/1.3.3...1.5.0) (2019-05-02)
diff --git a/doc/api.json b/doc/api.json
index 4938096..74f5cd6 100644
--- a/doc/api.json
+++ b/doc/api.json
@@ -1 +1 @@
-{"name":"aurelia-templating-router","children":[{"id":2,"name":"RouteHref","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":5,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":6,"name":"new RouteHref","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":7,"name":"router","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":8,"name":"element","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","name":"RouteHref","id":2}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":38,"character":23}]},{"id":13,"name":"attributeChanged","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":14,"name":"attributeChanged","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":15,"name":"value","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":16,"name":"previous","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":42,"character":18}]},{"id":9,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":10,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":40,"character":6}]},{"id":17,"name":"processChange","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"processChange","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":43,"character":15}]},{"id":11,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":12,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":41,"character":8}]},{"id":3,"name":"inject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":4,"name":"inject","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":38,"character":15}]}],"groups":[{"title":"Constructors","kind":512,"children":[5]},{"title":"Methods","kind":2048,"children":[13,9,17,11,3]}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":37,"character":30}]},{"id":19,"name":"RouterView","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":27,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":28,"name":"new RouterView","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":29,"name":"element","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":30,"name":"container","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":31,"name":"viewSlot","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":32,"name":"router","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":33,"name":"viewLocator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":34,"name":"compositionTransaction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":35,"name":"compositionEngine","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","name":"RouterView","id":19}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":51,"character":15}]},{"id":26,"name":"element","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-templating-router.d.ts","line":51,"character":9}],"type":{"type":"intrinsic","name":"any"}},{"id":25,"name":"layoutModel","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-templating-router.d.ts","line":50,"character":13}],"type":{"type":"intrinsic","name":"any"}},{"id":23,"name":"layoutView","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-templating-router.d.ts","line":48,"character":12}],"type":{"type":"intrinsic","name":"any"}},{"id":24,"name":"layoutViewModel","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-templating-router.d.ts","line":49,"character":17}],"type":{"type":"intrinsic","name":"any"}},{"id":22,"name":"swapOrder","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-templating-router.d.ts","line":47,"character":11}],"type":{"type":"intrinsic","name":"any"}},{"id":39,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":40,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":41,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":42,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":54,"character":6}]},{"id":36,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":37,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":38,"name":"owningView","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":53,"character":9}]},{"id":43,"name":"process","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":44,"name":"process","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":45,"name":"viewPortInstruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":46,"name":"waitToSwap","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":55,"character":9}]},{"id":47,"name":"swap","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":48,"name":"swap","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":49,"name":"viewPortInstruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":56,"character":6}]},{"id":20,"name":"inject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":21,"name":"inject","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"any"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":46,"character":15}]}],"groups":[{"title":"Constructors","kind":512,"children":[27]},{"title":"Properties","kind":1024,"children":[26,25,23,24,22]},{"title":"Methods","kind":2048,"children":[39,36,43,47,20]}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":45,"character":31}]},{"id":50,"name":"RouterViewLocator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Locator which finds the nearest RouterView, relative to the current dependency injection container."},"children":[{"id":51,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of the RouterViewLocator class."},"signatures":[{"id":52,"name":"new RouterViewLocator","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of the RouterViewLocator class."},"type":{"type":"reference","name":"RouterViewLocator","id":50}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":62,"character":40}]},{"id":53,"name":"findNearest","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":54,"name":"findNearest","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Finds the nearest RouterView instance.","returns":"A promise that will be resolved with the located RouterView instance.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"RouterView","id":19}]}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":73,"character":13}]}],"groups":[{"title":"Constructors","kind":512,"children":[51]},{"title":"Methods","kind":2048,"children":[53]}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":62,"character":38}]},{"id":55,"name":"TemplatingRouteLoader","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":56,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":57,"name":"new TemplatingRouteLoader","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":58,"name":"compositionEngine","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","name":"TemplatingRouteLoader","id":55}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":75,"character":64}]},{"id":59,"name":"loadRoute","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":60,"name":"loadRoute","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":61,"name":"router","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}},{"id":62,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"any"},"overwrites":{"type":"reference","name":"RouteLoader.loadRoute"}}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":77,"character":11}],"overwrites":{"type":"reference","name":"RouteLoader.loadRoute"}}],"groups":[{"title":"Constructors","kind":512,"children":[56]},{"title":"Methods","kind":2048,"children":[59]}],"sources":[{"fileName":"aurelia-templating-router.d.ts","line":75,"character":42}],"extendedTypes":[{"type":"reference","name":"RouteLoader"}]}],"groups":[{"title":"Classes","kind":128,"children":[2,19,50,55]}]}
\ No newline at end of file
+{"id":0,"name":"aurelia-templating-router","kind":1,"kindString":"Project","flags":{},"originalName":"","children":[{"id":83,"name":"RouteHref","kind":128,"kindString":"Class","flags":{},"comment":{"shortText":"Helper custom attribute to help associate an element with a route by name"},"children":[{"id":89,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"src/route-href.ts","line":60,"character":2}],"signatures":[{"id":90,"name":"new RouteHref","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":91,"name":"router","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}},{"id":92,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Element","package":"typescript","name":"Element"}}],"type":{"type":"reference","id":83,"name":"RouteHref"}}]},{"id":98,"name":"attribute","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Target property on a custom element if this attribute is put on a custom element\nOR an attribute if this attribute is put on a normal element"},"sources":[{"fileName":"src/route-href.ts","line":58,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":94,"name":"element","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"shortText":"Element this attribute is associated with"},"sources":[{"fileName":"src/route-href.ts","line":39,"character":11}],"type":{"type":"reference","qualifiedName":"Element","package":"typescript","name":"Element"}},{"id":97,"name":"params","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Parameters of this attribute to generate URL."},"sources":[{"fileName":"src/route-href.ts","line":52,"character":2}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"qualifiedName":"Record","package":"typescript","name":"Record"}},{"id":96,"name":"route","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Name of the route this attribute refers to. This name should exist in the current router hierarchy"},"sources":[{"fileName":"src/route-href.ts","line":47,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":93,"name":"router","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"shortText":"Current router of this attribute"},"sources":[{"fileName":"src/route-href.ts","line":34,"character":11}],"type":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}},{"id":103,"name":"attributeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/route-href.ts","line":78,"character":2}],"signatures":[{"id":104,"name":"attributeChanged","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":105,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":106,"name":"previous","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"id":99,"name":"bind","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/route-href.ts","line":69,"character":2}],"signatures":[{"id":100,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]},{"id":107,"name":"processChange","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/route-href.ts","line":86,"character":2}],"signatures":[{"id":108,"name":"processChange","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"id":101,"name":"unbind","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/route-href.ts","line":74,"character":2}],"signatures":[{"id":102,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]},{"id":84,"name":"inject","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"src/route-href.ts","line":14,"character":9}],"signatures":[{"id":85,"name":"inject","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reflection","declaration":{"id":86,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":87,"name":"prototype","kind":1024,"kindString":"Property","flags":{"isExternal":true},"sources":[{"fileName":"node_modules/typescript/lib/lib.dom.d.ts","line":4878,"character":4}],"type":{"type":"reference","qualifiedName":"Element","package":"typescript","name":"Element"}}],"groups":[{"title":"Properties","kind":1024,"children":[87]}]}},{"type":"query","queryType":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}}]}}}]}],"groups":[{"title":"Constructors","kind":512,"children":[89]},{"title":"Properties","kind":1024,"children":[98,94,97,96,93]},{"title":"Methods","kind":2048,"children":[103,99,107,101,84]}],"sources":[{"fileName":"src/route-href.ts","line":11,"character":13}]},{"id":22,"name":"RouterView","kind":128,"kindString":"Class","flags":{},"comment":{"shortText":"Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views"},"children":[{"id":29,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"src/router-view.ts","line":154,"character":2}],"signatures":[{"id":30,"name":"new RouterView","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":31,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Element","package":"typescript","name":"Element"}},{"id":32,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Container","package":"aurelia-dependency-injection","name":"Container"}},{"id":33,"name":"viewSlot","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"ViewSlot","package":"aurelia-templating","name":"ViewSlot"}},{"id":34,"name":"router","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}},{"id":35,"name":"viewLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"ViewLocator","package":"aurelia-templating","name":"ViewLocator"}},{"id":36,"name":"compositionTransaction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"CompositionTransaction","package":"aurelia-templating","name":"CompositionTransaction"}},{"id":37,"name":"compositionEngine","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"CompositionEngine","package":"aurelia-templating","name":"CompositionEngine"}}],"type":{"type":"reference","id":22,"name":"RouterView"}}]},{"id":44,"name":"container","kind":1024,"kindString":"Property","flags":{},"comment":{"shortText":"Container at this level"},"sources":[{"fileName":"src/router-view.ts","line":98,"character":2}],"type":{"type":"reference","qualifiedName":"Container","package":"aurelia-dependency-injection","name":"Container"}},{"id":42,"name":"element","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"shortText":"Element associated with this custom element"},"sources":[{"fileName":"src/router-view.ts","line":88,"character":11}],"type":{"type":"reference","qualifiedName":"Element","package":"typescript","name":"Element"}},{"id":41,"name":"layoutModel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"shortText":"Layout model used to activate layout view model, if specified with `layoutViewModel`"},"sources":[{"fileName":"src/router-view.ts","line":83,"character":2}],"type":{"type":"intrinsic","name":"any"}},{"id":39,"name":"layoutView","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"shortText":"Layout view used for this router-view layout, if no layout-viewmodel specified"},"sources":[{"fileName":"src/router-view.ts","line":72,"character":2}],"type":{"type":"intrinsic","name":"any"}},{"id":40,"name":"layoutViewModel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"shortText":"Layout view model used as binding context for this router-view layout\nActual type would be {string | Constructable | object}"},"sources":[{"fileName":"src/router-view.ts","line":78,"character":2}],"type":{"type":"intrinsic","name":"any"}},{"id":43,"name":"router","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"shortText":"Current router associated with this "},"sources":[{"fileName":"src/router-view.ts","line":93,"character":11}],"type":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}},{"id":38,"name":"swapOrder","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"shortText":"Swapping order when going to a new route. By default, supports 3 value: before, after, with\n- before = new in -> old out\n- after = old out -> new in\n- with = new in + old out","text":"These values are defined by swapStrategies export in aurelia-templating/ aurelia-framework\nCan be extended there and used here\n"},"sources":[{"fileName":"src/router-view.ts","line":67,"character":2}],"type":{"type":"union","types":[{"type":"literal","value":"before"},{"type":"literal","value":"after"},{"type":"literal","value":"with"}]}},{"id":57,"name":"bind","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/router-view.ts","line":190,"character":2}],"signatures":[{"id":58,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":59,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":60,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"OverrideContext","package":"aurelia-binding","name":"OverrideContext"}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":54,"name":"created","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/router-view.ts","line":186,"character":2}],"signatures":[{"id":55,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":56,"name":"owningView","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"View","package":"aurelia-templating","name":"View"}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":61,"name":"process","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/router-view.ts","line":200,"character":2}],"signatures":[{"id":62,"name":"process","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline"},"parameters":[{"id":63,"name":"$viewPortInstruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}},{"id":64,"name":"waitToSwap","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"id":65,"name":"swap","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/router-view.ts","line":265,"character":2}],"signatures":[{"id":66,"name":"swap","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":67,"name":"$viewPortInstruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}]}}]}],"groups":[{"title":"Constructors","kind":512,"children":[29]},{"title":"Properties","kind":1024,"children":[44,42,41,39,40,43,38]},{"title":"Methods","kind":2048,"children":[57,54,61,65]}],"sources":[{"fileName":"src/router-view.ts","line":36,"character":13}]},{"id":70,"name":"RouterViewLocator","kind":128,"kindString":"Class","flags":{},"comment":{"shortText":"Locator which finds the nearest RouterView, relative to the current dependency injection container."},"children":[{"id":71,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"src/router-view.ts","line":375,"character":2}],"signatures":[{"id":72,"name":"new RouterViewLocator","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of the RouterViewLocator class."},"type":{"type":"reference","id":70,"name":"RouterViewLocator"}}]},{"id":73,"name":"promise","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/router-view.ts","line":367,"character":2}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}},{"id":74,"name":"resolve","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"src/router-view.ts","line":370,"character":2}],"type":{"type":"reflection","declaration":{"id":75,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":76,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":77,"name":"val","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":78,"name":"findNearest","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/router-view.ts","line":383,"character":2}],"signatures":[{"id":79,"name":"findNearest","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Finds the nearest RouterView instance.","returns":"A promise that will be resolved with the located RouterView instance.\n"},"type":{"type":"reference","typeArguments":[{"type":"reference","id":22,"name":"RouterView"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[71]},{"title":"Properties","kind":1024,"children":[73,74]},{"title":"Methods","kind":2048,"children":[78]}],"sources":[{"fileName":"src/router-view.ts","line":364,"character":13}]},{"id":4,"name":"TemplatingRouteLoader","kind":128,"kindString":"Class","flags":{},"comment":{"shortText":"Default implementation of `RouteLoader` used for loading component based on a route config"},"children":[{"id":6,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"src/route-loader.ts","line":23,"character":2}],"signatures":[{"id":7,"name":"new TemplatingRouteLoader","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":8,"name":"compositionEngine","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"CompositionEngine","package":"aurelia-templating","name":"CompositionEngine"}}],"type":{"type":"reference","id":4,"name":"TemplatingRouteLoader"},"overwrites":{"type":"reference","name":"RouteLoader.constructor"}}],"overwrites":{"type":"reference","name":"RouteLoader.constructor"}},{"id":17,"name":"loadRoute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"src/route-loader.ts","line":86,"character":2}],"signatures":[{"id":18,"name":"loadRoute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Load corresponding component of a route config of a navigation instruction"},"parameters":[{"id":19,"name":"router","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"Router","package":"aurelia-router","name":"Router"}},{"id":20,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"RouteConfig","package":"aurelia-router","name":"RouteConfig"}},{"id":21,"name":"navInstruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","qualifiedName":"NavigationInstruction","package":"aurelia-router","name":"NavigationInstruction"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"},"overwrites":{"type":"reference","name":"RouteLoader.loadRoute"}}],"overwrites":{"type":"reference","name":"RouteLoader.loadRoute"}}],"groups":[{"title":"Constructors","kind":512,"children":[6]},{"title":"Methods","kind":2048,"children":[17]}],"sources":[{"fileName":"src/route-loader.ts","line":15,"character":13}],"extendedTypes":[{"type":"reference","qualifiedName":"RouteLoader","package":"aurelia-router","name":"RouteLoader"}]},{"id":1,"name":"configure","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"src/aurelia-templating-router.ts","line":7,"character":16}],"signatures":[{"id":2,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":3,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"IFrameworkConfiguration"}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Classes","kind":128,"children":[83,22,70,4]},{"title":"Functions","kind":64,"children":[1]}],"sources":[{"fileName":"src/aurelia-templating-router.ts","line":1,"character":0}]}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 178b1c1..3bf30d2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "aurelia-templating-router",
- "version": "1.4.0",
+ "version": "1.5.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "aurelia-templating-router",
- "version": "1.4.0",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"aurelia-binding": "^2.0.0",
diff --git a/package.json b/package.json
index 89e0bdf..7bcb46b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating-router",
- "version": "1.4.0",
+ "version": "1.5.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",