├── .jshintrc ├── .npmignore ├── doc ├── api.json └── CHANGELOG.md ├── .gitignore ├── favicon.ico ├── .settings ├── settings.json └── tasks.json ├── src ├── app │ ├── nav-bar.ts │ ├── app.html │ ├── animation-main.ts │ ├── flickr.html │ ├── child-router.ts │ ├── welcome.ts │ ├── child-router.html │ ├── flickr.ts │ ├── app.ts │ ├── welcome.html │ └── nav-bar.html └── test │ ├── e2e │ ├── skeleton.po.ts │ ├── welcome.po.ts │ └── demo.spec.ts │ └── unit │ ├── flickr.spec.ts │ ├── app.spec.ts │ └── child-router.spec.ts ├── gulpfile.js ├── dts ├── aurelia │ ├── aurelia-bootstrapper.d.ts │ ├── aurelia-history.d.ts │ ├── aurelia-path.d.ts │ ├── aurelia-skeleton-plugin.d.ts │ ├── aurelia-loader-default.d.ts │ ├── aurelia-logging-console.d.ts │ ├── aurelia-event-aggregator.d.ts │ ├── aurelia-task-queue.d.ts │ ├── aurelia-animator-css.d.ts │ ├── aurelia-history-browser.d.ts │ ├── aurelia-loader.d.ts │ ├── aurelia-skeleton-navigation.d.ts │ ├── aurelia-templating-router.d.ts │ ├── aurelia-app-contacts.d.ts │ ├── aurelia-templating-binding.d.ts │ ├── aurelia-metadata.d.ts │ ├── aurelia-logging.d.ts │ ├── aurelia-route-recognizer.d.ts │ ├── aurelia-templating-resources.d.ts │ ├── aurelia-framework.d.ts │ ├── aurelia-router.d.ts │ ├── aurelia-http-client.d.ts │ ├── aurelia-dependency-injection.d.ts │ ├── aurelia-templating.d.ts │ └── aurelia-binding.d.ts ├── aurelia-protractor.d.ts ├── es6-promise.d.ts └── jasmine.d.ts ├── .editorconfig ├── tsconfig.json ├── CONTRIBUTING.md ├── protractor.conf.js ├── index.html ├── LICENSE ├── karma.conf.js ├── aurelia.protractor.js ├── package.json ├── styles └── styles.css ├── README.md └── config.js /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esnext": true 3 | } 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea -------------------------------------------------------------------------------- /doc/api.json: -------------------------------------------------------------------------------- 1 | {"classes":[],"methods":[],"properties":[],"events":[]} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | jspm_packages 3 | bower_components 4 | .idea 5 | .DS_STORE 6 | /dist 7 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Enrapt/aurelia-skeleton-navigation-gulp-typescript/HEAD/favicon.ico -------------------------------------------------------------------------------- /.settings/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | } -------------------------------------------------------------------------------- /src/app/nav-bar.ts: -------------------------------------------------------------------------------- 1 | import {bindable} from 'aurelia-framework'; 2 | 3 | export class NavBar { 4 | @bindable router = null 5 | } 6 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | // all gulp tasks are located in the ./build/tasks directory 2 | // gulp configuration is in files in ./build directory 3 | require('require-dir')('build/tasks'); 4 | -------------------------------------------------------------------------------- /src/app/app.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/app/animation-main.ts: -------------------------------------------------------------------------------- 1 | export function configure(aurelia) { 2 | aurelia.use 3 | .standardConfiguration() 4 | .developmentLogging() 5 | .plugin('aurelia-animator-css'); 6 | 7 | aurelia.start().then(a => a.setRoot()); 8 | } 9 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-bootstrapper.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-bootstrapper/index' { 2 | export function bootstrap(configure: any): Promise<{}>; 3 | 4 | } 5 | declare module 'aurelia-bootstrapper' { 6 | export * from 'aurelia-bootstrapper/index'; 7 | } 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /dts/aurelia/aurelia-history.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-history/index' { 2 | export class History { 3 | activate(): void; 4 | deactivate(): void; 5 | navigate(): void; 6 | navigateBack(): void; 7 | } 8 | 9 | } 10 | declare module 'aurelia-history' { 11 | export * from 'aurelia-history/index'; 12 | } 13 | -------------------------------------------------------------------------------- /src/test/e2e/skeleton.po.ts: -------------------------------------------------------------------------------- 1 | export class PageObject_Skeleton { 2 | 3 | constructor() { 4 | 5 | } 6 | 7 | getCurrentPageTitle() { 8 | return browser.getTitle(); 9 | } 10 | 11 | navigateTo(href) { 12 | element(by.css('a[href="' + href + '"]')).click(); 13 | return browser.waitForHttpDone(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-path.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-path/index' { 2 | export function relativeToFile(name: any, file: any): any; 3 | export function join(path1: any, path2: any): any; 4 | export function buildQueryString(a: any, traditional?: any): string; 5 | 6 | } 7 | declare module 'aurelia-path' { 8 | export * from 'aurelia-path/index'; 9 | } 10 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-skeleton-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-skeleton-plugin/hello-world' { 2 | export class HelloWorld { 3 | } 4 | 5 | } 6 | declare module 'aurelia-skeleton-plugin/index' { 7 | export function configure(aurelia: any): void; 8 | 9 | } 10 | declare module 'aurelia-skeleton-plugin' { 11 | export * from 'aurelia-skeleton-plugin/index'; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/flickr.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.5.1", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "module": "amd", 6 | "declaration": false, 7 | "noImplicitAny": false, 8 | "removeComments": false, 9 | "noLib": true, 10 | "emitDecoratorMetadata": true 11 | }, 12 | "filesGlob": [ 13 | "./**/*.ts", 14 | "!./node_modules/**/*.ts" 15 | ] 16 | } -------------------------------------------------------------------------------- /dts/aurelia/aurelia-loader-default.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-loader-default/index' { 2 | import { Loader } from 'aurelia-loader'; 3 | export class DefaultLoader extends Loader { 4 | moduleRegistry: any; 5 | constructor(); 6 | loadModule(id: any): any; 7 | loadAllModules(ids: any): Promise; 8 | loadTemplate(url: any): any; 9 | } 10 | 11 | } 12 | declare module 'aurelia-loader-default' { 13 | export * from 'aurelia-loader-default/index'; 14 | } 15 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-logging-console.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-logging-console/index' { 2 | export class ConsoleAppender { 3 | constructor(); 4 | debug(logger: any, message: any, ...rest: any[]): void; 5 | info(logger: any, message: any, ...rest: any[]): void; 6 | warn(logger: any, message: any, ...rest: any[]): void; 7 | error(logger: any, message: any, ...rest: any[]): void; 8 | } 9 | 10 | } 11 | declare module 'aurelia-logging-console' { 12 | export * from 'aurelia-logging-console/index'; 13 | } 14 | -------------------------------------------------------------------------------- /src/app/child-router.ts: -------------------------------------------------------------------------------- 1 | import {Router} from 'aurelia-router'; 2 | 3 | export class ChildRouter { 4 | 5 | router: Router; 6 | 7 | configureRouter(config, router: Router) { 8 | config.map([ 9 | { route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }, 10 | { route: 'flickr', moduleId: './flickr', nav: true }, 11 | { route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' } 12 | ]); 13 | 14 | this.router = router; 15 | } 16 | heading = 'Child Router'; 17 | }; 18 | -------------------------------------------------------------------------------- /src/app/welcome.ts: -------------------------------------------------------------------------------- 1 | import {computedFrom} from 'aurelia-framework'; 2 | 3 | export class Welcome { 4 | 5 | heading = 'Welcome to the Aurelia Navigation App!'; 6 | firstName = 'John'; 7 | lastName = 'Doe'; 8 | 9 | @computedFrom('firstName', 'lastName') get fullName() { 10 | return `${this.firstName} ${this.lastName}`; 11 | } 12 | 13 | welcome() { 14 | alert(`Welcome, ${this.fullName}!`); 15 | } 16 | 17 | } 18 | 19 | export class UpperValueConverter { 20 | toView(value) { 21 | return value && value.toUpperCase(); 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/app/child-router.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-event-aggregator.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-event-aggregator/index' { 2 | export class EventAggregator { 3 | eventLookup: any; 4 | messageHandlers: any; 5 | constructor(); 6 | publish(event: any, data: any): void; 7 | subscribe(event: any, callback: any): () => void; 8 | subscribeOnce(event: any, callback: any): () => void; 9 | } 10 | export function includeEventsIn(obj: any): EventAggregator; 11 | export function configure(aurelia: any): void; 12 | 13 | } 14 | declare module 'aurelia-event-aggregator' { 15 | export * from 'aurelia-event-aggregator/index'; 16 | } 17 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-task-queue.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-task-queue/index' { 2 | export class TaskQueue { 3 | microTaskQueue: any; 4 | microTaskQueueCapacity: any; 5 | taskQueue: any; 6 | requestFlushMicroTaskQueue: any; 7 | requestFlushTaskQueue: any; 8 | constructor(); 9 | queueMicroTask(task: any): void; 10 | queueTask(task: any): void; 11 | flushTaskQueue(): void; 12 | flushMicroTaskQueue(): void; 13 | onError(error: any, task: any): void; 14 | } 15 | 16 | } 17 | declare module 'aurelia-task-queue' { 18 | export * from 'aurelia-task-queue/index'; 19 | } 20 | -------------------------------------------------------------------------------- /src/app/flickr.ts: -------------------------------------------------------------------------------- 1 | import {autoinject} from 'aurelia-framework'; 2 | import {HttpClient} from 'aurelia-http-client'; 3 | 4 | @autoinject 5 | export class Flickr{ 6 | constructor(public http: HttpClient){ 7 | } 8 | heading = 'Flickr'; 9 | images = []; 10 | url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json'; 11 | 12 | activate(){ 13 | return this.http.jsonp(this.url).then(response => { 14 | this.images = response.content.items; 15 | }); 16 | } 17 | 18 | canDeactivate(){ 19 | return confirm('Are you sure you want to leave?'); 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /src/app/app.ts: -------------------------------------------------------------------------------- 1 | import 'bootstrap'; 2 | import 'bootstrap/css/bootstrap.css!'; 3 | import {Router} from 'aurelia-router'; 4 | 5 | export class App { 6 | 7 | router: Router; 8 | 9 | configureRouter(config, router: Router) { 10 | 11 | config.title = 'Aurelia'; 12 | config.map([ 13 | { route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }, 14 | { route: 'flickr', moduleId: './flickr', nav: true }, 15 | { route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' } 16 | ]); 17 | 18 | this.router = router; 19 | 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading [our contributing guidelines](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). The contributing document will provide you with all the information you need to get started. Once you have read that, you will need to also [sign our CLA](http://goo.gl/forms/dI8QDDSyKR) before we can accept a Pull Request from you. More information on the process is included in the [contributor's guide](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). 4 | -------------------------------------------------------------------------------- /.settings/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "gulp", 4 | "isShellCommand": true, 5 | "args": [ 6 | "--no-color" 7 | ], 8 | "tasks": [ 9 | { 10 | "taskName": "build", 11 | "args": [], 12 | "isBuildCommand": true, 13 | "isWatching": false, 14 | "problemMatcher": [ 15 | "$lessCompile", 16 | "$tsc", 17 | "$jshint" 18 | ] 19 | }, 20 | { 21 | "taskName": "test", 22 | "args": [], 23 | "isTestCommand": true 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /protractor.conf.js: -------------------------------------------------------------------------------- 1 | // An example configuration file. 2 | exports.config = { 3 | directConnect: true, 4 | 5 | // Capabilities to be passed to the webdriver instance. 6 | capabilities: { 7 | 'browserName': 'chrome' 8 | }, 9 | 10 | //seleniumAddress: 'http://0.0.0.0:4444', 11 | // add proper version number 12 | seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar', 13 | specs: ['specs/e2e/dist/*.js'], 14 | 15 | plugins: [{ 16 | path: 'aurelia.protractor.js' 17 | }], 18 | 19 | 20 | // Options to be passed to Jasmine-node. 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /src/app/welcome.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /dts/aurelia-protractor.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for Aurelia Protractor extensions 2 | // Project: https://github.com/aurelia/skeleton-navigation 3 | // Definitions by: Enrapt , Kirill Grishin 4 | 5 | /// 6 | /// 7 | 8 | // Extend existing interfaces with additional functionality from Aurelia Protractor Extender (aurelia.protractor.js) 9 | 10 | declare module protractor { 11 | 12 | interface IBrowser extends protractor.Protractor { 13 | loadAndWaitForAureliaPage(url: string): protractor.Protractor; 14 | waitForHttpDone(): Promise; 15 | } 16 | 17 | } 18 | 19 | declare module webdriver { 20 | 21 | interface ILocatorStrategy { 22 | valueBind(bindTarget: string): webdriver.Locator; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Aurelia 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Aurelia Navigation Skeleton
12 | 13 |
14 | 15 | 16 | 17 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-animator-css.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-animator-css/animator' { 2 | export class CssAnimator { 3 | animationStack: any; 4 | constructor(); 5 | addMultipleEventListener(el: any, s: any, fn: any, b: any): void; 6 | addAnimationToStack(animId: any): void; 7 | removeAnimationFromStack(animId: any): void; 8 | getElementAnimationDelay(element: any): number; 9 | move(): Promise; 10 | enter(element: any): Promise<{}>; 11 | leave(element: any): Promise<{}>; 12 | removeClass(element: any, className: any): Promise<{}>; 13 | addClass(element: any, className: any): Promise<{}>; 14 | } 15 | 16 | } 17 | declare module 'aurelia-animator-css/index' { 18 | export { CssAnimator } from 'aurelia-animator-css/animator'; 19 | export function configure(aurelia: any): void; 20 | 21 | } 22 | declare module 'aurelia-animator-css' { 23 | export * from 'aurelia-animator-css/index'; 24 | } 25 | -------------------------------------------------------------------------------- /src/test/e2e/welcome.po.ts: -------------------------------------------------------------------------------- 1 | export class PageObject_Welcome { 2 | 3 | constructor() { 4 | 5 | } 6 | 7 | getGreeting() { 8 | return element(by.tagName('h2')).getText(); 9 | } 10 | 11 | setFirstname(value) { 12 | var el = element(by.valueBind('firstName')); 13 | el.clear(); 14 | return el.sendKeys(value); 15 | } 16 | 17 | setLastname(value) { 18 | var el = element(by.valueBind('lastName')); 19 | el.clear(); 20 | return el.sendKeys(value); 21 | } 22 | 23 | getFullname() { 24 | return element(by.css('.help-block')).getText(); 25 | } 26 | 27 | pressSubmitButton() { 28 | return element(by.css('button[type="submit"]')).click(); 29 | } 30 | 31 | openAlertDialog() { 32 | return browser.wait(() => { 33 | this.pressSubmitButton(); 34 | 35 | return browser.switchTo().alert().then( 36 | // use alert.accept instead of alert.dismiss which results in a browser crash 37 | function(alert) { alert.accept(); return true; }, 38 | function() { return false; } 39 | ); 40 | }, 2000); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-history-browser.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-history-browser/index' { 2 | import { History } from 'aurelia-history'; 3 | export class BrowserHistory extends History { 4 | interval: any; 5 | active: any; 6 | previousFragment: any; 7 | location: any; 8 | history: any; 9 | root: any; 10 | options: any; 11 | fragment: any; 12 | iframe: any; 13 | private _checkUrlCallback; 14 | private _hasPushState; 15 | private _wantsHashChange; 16 | private _wantsPushState; 17 | private _checkUrlInterval; 18 | constructor(); 19 | getHash(window?: any): any; 20 | getFragment(fragment?: any, forcePushState?: any): any; 21 | activate(options?: any): any; 22 | deactivate(): void; 23 | checkUrl(): boolean; 24 | loadUrl(fragmentOverride?: any): any; 25 | navigate(fragment?: any, options?: any): any; 26 | navigateBack(): void; 27 | } 28 | export function configure(aurelia: any): void; 29 | 30 | } 31 | declare module 'aurelia-history-browser' { 32 | export * from 'aurelia-history-browser/index'; 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Durandal Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /src/test/unit/flickr.spec.ts: -------------------------------------------------------------------------------- 1 | import {HttpClient} from 'aurelia-http-client'; 2 | import {Flickr} from '../../app/flickr'; 3 | 4 | class HttpStub extends HttpClient { 5 | itemStub; 6 | url; 7 | jsonp(url) { 8 | var response = this.itemStub; 9 | this.url = url; 10 | return new Promise((resolve) => { 11 | resolve({ content: { items: response } }); 12 | }) 13 | } 14 | } 15 | 16 | describe('the Flickr module', () => { 17 | 18 | it('sets jsonp response to images', (done) => { 19 | var http = new HttpStub(), 20 | sut = new Flickr(http), 21 | itemStubs = [1], 22 | itemFake = [2]; 23 | 24 | http.itemStub = itemStubs; 25 | sut.activate().then(() => { 26 | expect(sut.images).toBe(itemStubs); 27 | expect(sut.images).not.toBe(itemFake); 28 | done(); 29 | }); 30 | }); 31 | 32 | it('calls confirm on canDeactivate', () => { 33 | var http = new HttpStub(), 34 | sut = new Flickr(http), 35 | global = jasmine.getGlobal(); 36 | spyOn(global, "confirm"); 37 | sut.canDeactivate(); 38 | expect(global.confirm).toHaveBeenCalled(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /src/app/nav-bar.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /src/test/unit/app.spec.ts: -------------------------------------------------------------------------------- 1 | import {App} from '../../app/app'; 2 | import {Router} from 'aurelia-router'; 3 | 4 | class RouterStub extends Router{ 5 | routes; 6 | configure(handler) { 7 | handler(this); 8 | return this; 9 | } 10 | map(routes) { 11 | this.routes = routes; 12 | } 13 | } 14 | 15 | describe('the App module', () => { 16 | var sut 17 | , mockedRouter; 18 | 19 | beforeEach(() => { 20 | mockedRouter = new RouterStub(null, null); 21 | sut = new App(); 22 | sut.configureRouter(mockedRouter, mockedRouter); 23 | }); 24 | 25 | it('contains a router property', () => { 26 | expect(sut.router).toBeDefined(); 27 | }); 28 | 29 | it('configures the router title', () => { 30 | expect(sut.router.title).toEqual('Aurelia'); 31 | }); 32 | 33 | it('should have a welcome route', () => { 34 | expect(sut.router.routes).toContain({ route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }); 35 | }); 36 | 37 | it('should have a flickr route', () => { 38 | expect(sut.router.routes).toContain({ route: 'flickr', moduleId: './flickr', nav: true }); 39 | }); 40 | 41 | it('should have a child router route', () => { 42 | expect(sut.router.routes).toContain({ route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' }); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /src/test/unit/child-router.spec.ts: -------------------------------------------------------------------------------- 1 | import {ChildRouter} from '../../app/child-router'; 2 | import {Router} from 'aurelia-router'; 3 | 4 | class RouterStub extends Router { 5 | routes; 6 | configure(handler) { 7 | handler(this); 8 | return this; 9 | } 10 | map(routes) { 11 | this.routes = routes; 12 | } 13 | } 14 | 15 | describe('the Child Router module', () => { 16 | var sut 17 | , mockedRouter; 18 | 19 | beforeEach(() => { 20 | mockedRouter = new RouterStub(null, null); 21 | sut = new ChildRouter(); 22 | sut.configureRouter(mockedRouter, mockedRouter); 23 | }); 24 | 25 | it('contains a router property', () => { 26 | expect(sut.router).toBeDefined(); 27 | }); 28 | 29 | it('configures the heading', () => { 30 | expect(sut.heading).toEqual('Child Router'); 31 | }); 32 | 33 | it('should have a welcome route', () => { 34 | expect(sut.router.routes).toContain({ route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' }); 35 | }); 36 | 37 | it('should have a flickr route', () => { 38 | expect(sut.router.routes).toContain({ route: 'flickr', moduleId: './flickr', nav: true }); 39 | }); 40 | 41 | it('should have a child router route', () => { 42 | expect(sut.router.routes).toContain({ route: 'child-router', moduleId: './child-router', nav: true, title:'Child Router' }); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-loader.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-loader/template-registry-entry' { 2 | export class TemplateDependency { 3 | src: any; 4 | name: any; 5 | constructor(src: any, name: any); 6 | } 7 | export class TemplateRegistryEntry { 8 | id: any; 9 | template: any; 10 | dependencies: any; 11 | resources: any; 12 | factory: any; 13 | constructor(id: any); 14 | templateIsLoaded: boolean; 15 | isReady: boolean; 16 | setTemplate(template: any): void; 17 | setResources(resources: any): void; 18 | setFactory(factory: any): void; 19 | } 20 | 21 | } 22 | declare module 'aurelia-loader/loader' { 23 | export class Loader { 24 | templateRegistry: any; 25 | constructor(); 26 | loadModule(id: any): void; 27 | loadAllModules(ids: any): void; 28 | loadTemplate(url: any): void; 29 | getOrCreateTemplateRegistryEntry(id: any): any; 30 | importDocument(url: any): Promise<{}>; 31 | importTemplate(url: any): Promise; 32 | findTemplate(doc: any, url: any): any; 33 | } 34 | 35 | } 36 | declare module 'aurelia-loader/index' { 37 | export { TemplateRegistryEntry, TemplateDependency } from 'aurelia-loader/template-registry-entry'; 38 | export { Loader } from 'aurelia-loader/loader'; 39 | 40 | } 41 | declare module 'aurelia-loader' { 42 | export * from 'aurelia-loader/index'; 43 | } 44 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-skeleton-navigation.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-skeleton-navigation/animation-main' { 2 | export function configure(aurelia: any): void; 3 | 4 | } 5 | declare module 'aurelia-skeleton-navigation/app' { 6 | import { Router } from 'aurelia-router'; 7 | export class App { 8 | router: Router; 9 | configureRouter(config: any, router: any): void; 10 | } 11 | 12 | } 13 | declare module 'aurelia-skeleton-navigation/child-router' { 14 | import { Router } from 'aurelia-router'; 15 | export class ChildRouter { 16 | router: Router; 17 | configureRouter(config: any, router: any): void; 18 | } 19 | 20 | } 21 | declare module 'aurelia-skeleton-navigation/flickr' { 22 | export class Flickr { 23 | heading: string; 24 | images: any[]; 25 | http: any; 26 | url: string; 27 | constructor(http: any); 28 | activate(): any; 29 | canDeactivate(): boolean; 30 | } 31 | 32 | } 33 | declare module 'aurelia-skeleton-navigation/nav-bar' { 34 | export class NavBar { 35 | router: any; 36 | } 37 | 38 | } 39 | declare module 'aurelia-skeleton-navigation/welcome' { 40 | export class Welcome { 41 | heading: string; 42 | firstName: string; 43 | lastName: string; 44 | fullName: string; 45 | welcome(): void; 46 | } 47 | export class UpperValueConverter { 48 | toView(value: any): any; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/test/e2e/demo.spec.ts: -------------------------------------------------------------------------------- 1 | import { PageObject_Welcome } from './welcome.po'; 2 | import { PageObject_Skeleton } from './skeleton.po'; 3 | 4 | describe('aurelia skeleton app', function() { 5 | var po_welcome, 6 | po_skeleton; 7 | 8 | beforeEach( () => { 9 | po_skeleton = new PageObject_Skeleton(); 10 | po_welcome = new PageObject_Welcome(); 11 | 12 | browser.loadAndWaitForAureliaPage("http://localhost:9000"); 13 | }); 14 | 15 | it('should load the page and display the initial page title', () => { 16 | expect(po_skeleton.getCurrentPageTitle()).toBe('Welcome | Aurelia'); 17 | }); 18 | 19 | it('should display greeting', () => { 20 | expect(po_welcome.getGreeting()).toBe('Welcome to the Aurelia Navigation App!'); 21 | }); 22 | 23 | it('should automatically write down the fullname', () => { 24 | po_welcome.setFirstname('Rob'); 25 | po_welcome.setLastname('Eisenberg'); 26 | 27 | // For now there is a timing issue with the binding. 28 | // Until resolved we will use a short sleep to overcome the issue. 29 | browser.sleep(200); 30 | expect(po_welcome.getFullname()).toBe('ROB EISENBERG'); 31 | }); 32 | 33 | it('should show alert message when clicking submit button', () => { 34 | expect(po_welcome.openAlertDialog()).toBe(true); 35 | }); 36 | 37 | it('should navigate to flickr page', () => { 38 | po_skeleton.navigateTo('#/flickr'); 39 | expect(po_skeleton.getCurrentPageTitle()).toBe('Flickr | Aurelia'); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-templating-router.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-templating-router/route-loader' { 2 | import { RouteLoader } from 'aurelia-router'; 3 | export class TemplatingRouteLoader extends RouteLoader { 4 | compositionEngine: any; 5 | constructor(compositionEngine: any); 6 | loadRoute(router: any, config: any): any; 7 | } 8 | 9 | } 10 | declare module 'aurelia-templating-router/router-view' { 11 | export class RouterView { 12 | element: any; 13 | container: any; 14 | viewSlot: any; 15 | router: any; 16 | view: any; 17 | constructor(element: any, container: any, viewSlot: any, router: any); 18 | bind(executionContext: any): void; 19 | process(viewPortInstruction: any, waitToSwap: any): any; 20 | swap(viewPortInstruction: any): void; 21 | } 22 | 23 | } 24 | declare module 'aurelia-templating-router/route-href' { 25 | export class RouteHref { 26 | router: any; 27 | element: any; 28 | route: any; 29 | params: any; 30 | attribute: any; 31 | constructor(router: any, element: any); 32 | bind(): void; 33 | attributeChanged(value: any, previous: any): void; 34 | processChange(): void; 35 | } 36 | 37 | } 38 | declare module 'aurelia-templating-router/index' { 39 | export function configure(aurelia: any): void; 40 | export { TemplatingRouteLoader } from 'aurelia-templating-router/route-loader'; 41 | export { RouterView } from 'aurelia-templating-router/router-view'; 42 | export { RouteHref } from 'aurelia-templating-router/route-href'; 43 | 44 | } 45 | declare module 'aurelia-templating-router' { 46 | export * from 'aurelia-templating-router/index'; 47 | } 48 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['jspm', 'jasmine'], 14 | 15 | jspm: { 16 | // Edit this to your needs 17 | loadFiles: ['dist/test/**/*.js'], 18 | serveFiles: ['dist/app/**/*.js'] 19 | }, 20 | 21 | 22 | // list of files / patterns to load in the browser 23 | files: [], 24 | 25 | 26 | // list of files to exclude 27 | exclude: [ 28 | ], 29 | 30 | // test results reporter to use 31 | // possible values: 'dots', 'progress' 32 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 33 | reporters: ['progress'], 34 | 35 | 36 | // web server port 37 | port: 9876, 38 | 39 | 40 | // enable / disable colors in the output (reporters and logs) 41 | colors: true, 42 | 43 | 44 | // level of logging 45 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 46 | logLevel: config.LOG_INFO, 47 | 48 | 49 | // enable / disable watching file and executing tests whenever any file changes 50 | autoWatch: true, 51 | 52 | 53 | // start these browsers 54 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 55 | browsers: ['Chrome'], 56 | 57 | 58 | // Continuous Integration mode 59 | // if true, Karma captures browsers, runs the tests and exits 60 | singleRun: false 61 | }); 62 | }; 63 | -------------------------------------------------------------------------------- /aurelia.protractor.js: -------------------------------------------------------------------------------- 1 | /* Aurelia Protractor Plugin */ 2 | function addValueBindLocator() { 3 | by.addLocator('valueBind', function (bindingModel, opt_parentElement) { 4 | var using = opt_parentElement || document; 5 | var matches = using.querySelectorAll('*[value\\.bind="' + bindingModel +'"]'); 6 | var result; 7 | 8 | if (matches.length === 0) { 9 | result = null; 10 | } else if (matches.length === 1) { 11 | result = matches[0]; 12 | } else { 13 | result = matches; 14 | } 15 | 16 | return result; 17 | }); 18 | } 19 | 20 | function loadAndWaitForAureliaPage(pageUrl) { 21 | browser.get(pageUrl); 22 | return browser.executeAsyncScript( 23 | 'var cb = arguments[arguments.length - 1];' + 24 | 'document.addEventListener("aurelia-composed", function (e) {' + 25 | ' cb("Aurelia App composed")' + 26 | '}, false);' 27 | ).then(function(result){ 28 | console.log(result); 29 | return result; 30 | }); 31 | } 32 | 33 | function waitForHttpDone() { 34 | return browser.executeAsyncScript( 35 | 'var cb = arguments[arguments.length - 1];' + 36 | 'document.addEventListener("aurelia-http-client-requests-drained", function (e) {' + 37 | ' cb(true)' + 38 | '}, false);' 39 | ).then(function(result){ 40 | return result; 41 | }); 42 | } 43 | 44 | /* Plugin hooks */ 45 | exports.setup = function(config) { 46 | // Ignore the default Angular synchronization helpers 47 | browser.ignoreSynchronization = true; 48 | 49 | // add the aurelia specific valueBind locator 50 | addValueBindLocator(); 51 | 52 | // attach a new way to browser.get a page and wait for Aurelia to complete loading 53 | browser.loadAndWaitForAureliaPage = loadAndWaitForAureliaPage; 54 | 55 | // wait for all http requests to finish 56 | browser.waitForHttpDone = waitForHttpDone; 57 | }; 58 | 59 | exports.teardown = function(config) {}; 60 | exports.postResults = function(config) {}; 61 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-app-contacts.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-app-contacts/web-api' { 2 | export class WebAPI { 3 | isRequesting: any; 4 | getContactList(): Promise<{}>; 5 | getContactDetails(id: any): Promise<{}>; 6 | saveContact(contact: any): Promise<{}>; 7 | } 8 | 9 | } 10 | declare module 'aurelia-app-contacts/app' { 11 | import { Router } from 'aurelia-router'; 12 | import { WebAPI } from 'aurelia-app-contacts/web-api'; 13 | export class App { 14 | static inject: typeof WebAPI[]; 15 | router: Router; 16 | api: any; 17 | constructor(api: any); 18 | configureRouter(config: any, router: any): void; 19 | } 20 | 21 | } 22 | declare module 'aurelia-app-contacts/messages' { 23 | export class ContactUpdated { 24 | contact: any; 25 | constructor(contact: any); 26 | } 27 | export class ContactViewed { 28 | contact: any; 29 | constructor(contact: any); 30 | } 31 | 32 | } 33 | declare module 'aurelia-app-contacts/utility' { 34 | export function areEqual(obj1: any, obj2: any): boolean; 35 | 36 | } 37 | declare module 'aurelia-app-contacts/contact-detail' { 38 | export class ContactDetail { 39 | static inject: any[]; 40 | api: any; 41 | ea: any; 42 | contact: any; 43 | originalContact: any; 44 | constructor(api: any, ea: any); 45 | activate(params: any, config: any): any; 46 | canSave: boolean; 47 | save(): void; 48 | canDeactivate(): boolean; 49 | } 50 | 51 | } 52 | declare module 'aurelia-app-contacts/contact-list' { 53 | export class ContactList { 54 | static inject: any[]; 55 | api: any; 56 | contacts: any; 57 | selectedId: any; 58 | constructor(api: any, ea: any); 59 | created(): void; 60 | select(contact: any): boolean; 61 | } 62 | 63 | } 64 | declare module 'aurelia-app-contacts/loading-indicator' { 65 | export class LoadingIndicator { 66 | loading: boolean; 67 | loadingChanged(newValue: any): void; 68 | } 69 | 70 | } 71 | declare module 'aurelia-app-contacts/no-selection' { 72 | export class NoSelection { 73 | message: any; 74 | constructor(); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aurelia-skeleton-navigation", 3 | "version": "0.13.0", 4 | "description": "A starter kit for building a standard navigation-style app with Aurelia.", 5 | "keywords": [ 6 | "aurelia", 7 | "navigation", 8 | "skeleton" 9 | ], 10 | "homepage": "http://aurelia.io", 11 | "bugs": { 12 | "url": "https://github.com/aurelia/skeleton-navigation/issues" 13 | }, 14 | "license": "MIT", 15 | "author": "Rob Eisenberg (http://robeisenberg.com/)", 16 | "main": "dist/commonjs/index.js", 17 | "repository": { 18 | "type": "git", 19 | "url": "http://github.com/aurelia/skeleton-navigation" 20 | }, 21 | "devDependencies": { 22 | "aurelia-tools": "^0.1.3", 23 | "browser-sync": "^1.8.1", 24 | "conventional-changelog": "0.0.11", 25 | "del": "^1.1.0", 26 | "gulp": "^3.8.10", 27 | "gulp-bump": "^0.1.11", 28 | "gulp-changed": "^1.1.0", 29 | "gulp-jshint": "^1.9.0", 30 | "gulp-plumber": "^0.6.6", 31 | "gulp-protractor": "^0.0.12", 32 | "gulp-sourcemaps": "^1.3.0", 33 | "gulp-yuidoc": "^0.1.2", 34 | "jasmine-core": "^2.1.3", 35 | "jshint-stylish": "^1.0.0", 36 | "karma": "^0.12.28", 37 | "karma-chrome-launcher": "^0.1.7", 38 | "karma-jasmine": "^0.3.5", 39 | "karma-jspm": "^1.1.4", 40 | "object.assign": "^1.0.3", 41 | "require-dir": "^0.1.0", 42 | "run-sequence": "^1.0.2", 43 | "vinyl-paths": "^1.0.0", 44 | "yargs": "^2.1.1", 45 | "gulp-typescript": "*", 46 | "karma-typescript-preprocessor": "0.0.16", 47 | "typescript": "1.5.0-beta" 48 | }, 49 | "jspm": { 50 | "dependencies": { 51 | "aurelia-animator-css": "github:aurelia/animator-css@^0.2.0", 52 | "aurelia-bootstrapper": "github:aurelia/bootstrapper@^0.12.0", 53 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.7.0", 54 | "aurelia-framework": "github:aurelia/framework@^0.11.0", 55 | "aurelia-http-client": "github:aurelia/http-client@^0.8.0", 56 | "aurelia-router": "github:aurelia/router@^0.8.0", 57 | "bootstrap": "github:twbs/bootstrap@^3.3.4", 58 | "css": "github:systemjs/plugin-css@^0.1.9", 59 | "font-awesome": "npm:font-awesome@^4.3.0" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-templating-binding.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-templating-binding/syntax-interpreter' { 2 | export class SyntaxInterpreter { 3 | static inject(): any[]; 4 | parser: any; 5 | observerLocator: any; 6 | eventManager: any; 7 | attributeMap: any; 8 | language: any; 9 | constructor(parser: any, observerLocator: any, eventManager: any); 10 | interpret(resources: any, element: any, info: any, existingInstruction: any): any; 11 | handleUnknownCommand(resources: any, element: any, info: any, existingInstruction: any): any; 12 | determineDefaultBindingMode(element: any, attrName: any): any; 13 | bind(resources: any, element: any, info: any, existingInstruction: any): any; 14 | trigger(resources: any, element: any, info: any): any; 15 | delegate(resources: any, element: any, info: any): any; 16 | call(resources: any, element: any, info: any, existingInstruction: any): any; 17 | options(resources: any, element: any, info: any, existingInstruction: any): any; 18 | } 19 | 20 | } 21 | declare module 'aurelia-templating-binding/binding-language' { 22 | import { BindingLanguage } from 'aurelia-templating'; 23 | export class TemplatingBindingLanguage extends BindingLanguage { 24 | static inject(): any[]; 25 | parser: any; 26 | observerLocator: any; 27 | syntaxInterpreter: any; 28 | emptyStringExpression: any; 29 | attributeMap: any; 30 | constructor(parser: any, observerLocator: any, syntaxInterpreter: any); 31 | inspectAttribute(resources: any, attrName: any, attrValue: any): any; 32 | createAttributeInstruction(resources: any, element: any, info: any, existingInstruction: any): any; 33 | parseText(resources: any, value: any): InterpolationBindingExpression; 34 | parseContent(resources: any, attrName: any, attrValue: any): InterpolationBindingExpression; 35 | } 36 | export class InterpolationBindingExpression { 37 | observerLocator: any; 38 | targetProperty: any; 39 | parts: any; 40 | mode: any; 41 | valueConverterLookupFunction: any; 42 | attribute: any; 43 | discrete: any; 44 | constructor(observerLocator: any, targetProperty: any, parts: any, mode: any, valueConverterLookupFunction: any, attribute: any); 45 | createBinding(target: any): any; 46 | } 47 | 48 | } 49 | declare module 'aurelia-templating-binding/index' { 50 | export function configure(aurelia: any): void; 51 | export { TemplatingBindingLanguage } from 'aurelia-templating-binding/binding-language'; 52 | export { SyntaxInterpreter } from 'aurelia-templating-binding/syntax-interpreter'; 53 | 54 | } 55 | declare module 'aurelia-templating-binding' { 56 | export * from 'aurelia-templating-binding/index'; 57 | } 58 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-metadata.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-metadata/metadata' { 2 | /** 3 | * Provides helpers for working with metadata. 4 | * 5 | * @class Metadata 6 | * @static 7 | */ 8 | export var Metadata: { 9 | resource: string; 10 | paramTypes: string; 11 | properties: string; 12 | get(metadataKey: any, target: any, propertyKey?: any): any; 13 | getOwn(metadataKey: any, target: any, propertyKey?: any): any; 14 | getOrCreateOwn(metadataKey: any, Type: any, target: any, propertyKey?: any): any; 15 | }; 16 | 17 | } 18 | declare module 'aurelia-metadata/decorator-applicator' { 19 | export class DecoratorApplicator { 20 | private _first; 21 | private _second; 22 | private _third; 23 | private _rest; 24 | constructor(); 25 | decorator(decorator: any): DecoratorApplicator; 26 | _decorate(target: any): void; 27 | } 28 | 29 | } 30 | declare module 'aurelia-metadata/decorators' { 31 | export var Decorators: { 32 | configure: { 33 | parameterizedDecorator(name: any, decorator: any): void; 34 | simpleDecorator(name: any, decorator: any): void; 35 | }; 36 | }; 37 | 38 | } 39 | declare module 'aurelia-metadata/origin' { 40 | /** 41 | * A metadata annotation that describes the origin module of the function to which it's attached. 42 | * 43 | * @class Origin 44 | * @constructor 45 | * @param {string} moduleId The origin module id. 46 | * @param {string} moduleMember The name of the export in the origin module. 47 | */ 48 | export class Origin { 49 | moduleId: any; 50 | moduleMember: any; 51 | constructor(moduleId: any, moduleMember?: any); 52 | /** 53 | * Get the Origin annotation for the specified function. 54 | * 55 | * @method get 56 | * @static 57 | * @param {Function} fn The function to inspect for Origin metadata. 58 | * @return {Origin} Returns the Origin metadata. 59 | */ 60 | static get(fn: any): {}; 61 | /** 62 | * Set the Origin annotation for the specified function. 63 | * 64 | * @method set 65 | * @static 66 | * @param {Function} fn The function to set the Origin metadata on. 67 | * @param {origin} fn The Origin metadata to store on the function. 68 | * @return {Origin} Returns the Origin metadata. 69 | */ 70 | static set(fn: any, origin: any): void; 71 | } 72 | 73 | } 74 | declare module 'aurelia-metadata/index' { 75 | /** 76 | * Utilities for reading and writing the metadata of JavaScript functions. 77 | * 78 | * @module metadata 79 | */ 80 | export { Origin } from 'aurelia-metadata/origin'; 81 | export { Metadata } from 'aurelia-metadata/metadata'; 82 | export { Decorators } from 'aurelia-metadata/decorators'; 83 | 84 | } 85 | declare module 'aurelia-metadata' { 86 | export * from 'aurelia-metadata/index'; 87 | } 88 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-logging.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-logging/index' { 2 | /** 3 | * This library is part of the Aurelia platform and contains a minimal but effective logging mechanism 4 | * with support for log levels and pluggable log appenders. 5 | * 6 | * @module logging 7 | */ 8 | /** 9 | * Creates an instance of Error that aggregates and preserves an innerError. 10 | * 11 | * @class AggregateError 12 | * @constructor 13 | */ 14 | export function AggregateError(msg: any, inner: any, skipIfAlreadyAggregate?: any): any; 15 | /** 16 | * Enum specifying the levels of the logger 17 | * 18 | * @property levels 19 | * @type Enum 20 | * @for export 21 | */ 22 | export var levels: { 23 | none: number; 24 | error: number; 25 | warn: number; 26 | info: number; 27 | debug: number; 28 | }; 29 | /** 30 | * Gets an instance of a logger by the Id used when creating. 31 | * 32 | * @method getLogger 33 | * @param {string} id The id of the logger you wish to get an instance of. 34 | * @return {Logger} The instance of the logger, or creates a new logger if none exists for that Id. 35 | * @for export 36 | */ 37 | export function getLogger(id: any): any; 38 | /** 39 | * Adds an appender capable of processing logs and channeling them to an output. 40 | * 41 | * @method addAppender 42 | * @param {Object} appender An appender instance to begin processing logs with. 43 | * @for export 44 | */ 45 | export function addAppender(appender: any): void; 46 | /** 47 | * Sets the level of the logging for the application loggers 48 | * 49 | * @method setLevel 50 | * @param {Number} level Matches an enum specifying the level of logging. 51 | * @for export 52 | */ 53 | export function setLevel(level: any): void; 54 | /** 55 | * The logger is essentially responsible for having log statements that appear during debugging but are squelched 56 | * when using the build tools, depending on the log level that is set. The available levels are - 57 | * 1. none 58 | * 2. error 59 | * 3. warn 60 | * 4. info 61 | * 5. debug 62 | * 63 | * You cannot instantiate the logger directly - you must use the getLogger method instead. 64 | * 65 | * @class Logger 66 | * @constructor 67 | */ 68 | export class Logger { 69 | id: any; 70 | constructor(id: any, key: any); 71 | /** 72 | * Logs a debug message. 73 | * 74 | * @method debug 75 | * @param {string} message The message to log 76 | */ 77 | debug(): void; 78 | /** 79 | * Logs info. 80 | * 81 | * @method info 82 | * @param {string} message The message to log 83 | */ 84 | info(): void; 85 | /** 86 | * Logs a warning. 87 | * 88 | * @method warn 89 | * @param {string} message The message to log 90 | */ 91 | warn(): void; 92 | /** 93 | * Logs an error. 94 | * 95 | * @method error 96 | * @param {string} message The message to log 97 | */ 98 | error(): void; 99 | } 100 | 101 | } 102 | declare module 'aurelia-logging' { 103 | export * from 'aurelia-logging/index'; 104 | } 105 | -------------------------------------------------------------------------------- /dts/es6-promise.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for es6-promise 2 | // Project: https://github.com/jakearchibald/ES6-Promise 3 | // Definitions by: François de Campredon , vvakame 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | interface Thenable { 7 | then(onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; 8 | } 9 | 10 | declare class Promise implements Thenable { 11 | /** 12 | * If you call resolve in the body of the callback passed to the constructor, 13 | * your promise is fulfilled with result object passed to resolve. 14 | * If you call reject your promise is rejected with the object passed to resolve. 15 | * For consistency and debugging (eg stack traces), obj should be an instanceof Error. 16 | * Any errors thrown in the constructor callback will be implicitly passed to reject(). 17 | */ 18 | constructor(callback: (resolve : (value?: R | Thenable) => void, reject: (error?: any) => void) => void); 19 | 20 | /** 21 | * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. 22 | * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. 23 | * Both callbacks have a single parameter , the fulfillment value or rejection reason. 24 | * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. 25 | * If an error is thrown in the callback, the returned promise rejects with that error. 26 | * 27 | * @param onFulfilled called when/if "promise" resolves 28 | * @param onRejected called when/if "promise" rejects 29 | */ 30 | then(onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Promise; 31 | 32 | /** 33 | * Sugar for promise.then(undefined, onRejected) 34 | * 35 | * @param onRejected called when/if "promise" rejects 36 | */ 37 | catch(onRejected?: (error: any) => U | Thenable): Promise; 38 | } 39 | 40 | declare module Promise { 41 | /** 42 | * Make a new promise from the thenable. 43 | * A thenable is promise-like in as far as it has a "then" method. 44 | */ 45 | function resolve(value?: R | Thenable): Promise; 46 | 47 | /** 48 | * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error 49 | */ 50 | function reject(error: any): Promise; 51 | 52 | /** 53 | * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects. 54 | * the array passed to all can be a mixture of promise-like objects and other objects. 55 | * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value. 56 | */ 57 | function all(promises: (R | Thenable)[]): Promise; 58 | 59 | /** 60 | * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects. 61 | */ 62 | function race(promises: (R | Thenable)[]): Promise; 63 | } 64 | 65 | declare module 'es6-promise' { 66 | var foo: typeof Promise; // Temp variable to reference Promise in local context 67 | module rsvp { 68 | export var Promise: typeof foo; 69 | } 70 | export = rsvp; 71 | } 72 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-route-recognizer.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-route-recognizer/state' { 2 | export class State { 3 | charSpec: any; 4 | nextStates: any; 5 | constructor(charSpec?: any); 6 | get(charSpec: any): any; 7 | put(charSpec: any): any; 8 | match(ch: any): any[]; 9 | } 10 | 11 | } 12 | declare module 'aurelia-route-recognizer/segments' { 13 | export class StaticSegment { 14 | string: any; 15 | constructor(string: any); 16 | eachChar(callback: any): void; 17 | regex(): any; 18 | generate(): any; 19 | } 20 | export class DynamicSegment { 21 | name: any; 22 | constructor(name: any); 23 | eachChar(callback: any): void; 24 | regex(): string; 25 | generate(params: any, consumed: any): any; 26 | } 27 | export class StarSegment { 28 | name: any; 29 | constructor(name: any); 30 | eachChar(callback: any): void; 31 | regex(): string; 32 | generate(params: any, consumed: any): any; 33 | } 34 | export class EpsilonSegment { 35 | eachChar(): void; 36 | regex(): string; 37 | generate(): string; 38 | } 39 | 40 | } 41 | declare module 'aurelia-route-recognizer/index' { 42 | /** 43 | * Class that parses route patterns and matches path strings. 44 | * 45 | * @class RouteRecognizer 46 | * @constructor 47 | */ 48 | export class RouteRecognizer { 49 | rootState: any; 50 | names: any; 51 | constructor(); 52 | /** 53 | * Parse a route pattern and add it to the collection of recognized routes. 54 | * 55 | * @method add 56 | * @param {Object} route The route to add. 57 | */ 58 | add(route: any): any; 59 | /** 60 | * Retrieve the handlers registered for the named route. 61 | * 62 | * @method handlersFor 63 | * @param {String} name The name of the route. 64 | * @return {Array} The handlers. 65 | */ 66 | handlersFor(name: any): any[]; 67 | /** 68 | * Check if this RouteRecognizer recognizes a named route. 69 | * 70 | * @method hasRoute 71 | * @param {String} name The name of the route. 72 | * @return {Boolean} True if the named route is recognized. 73 | */ 74 | hasRoute(name: any): boolean; 75 | /** 76 | * Generate a path and query string from a route name and params object. 77 | * 78 | * @method generate 79 | * @param {String} name The name of the route. 80 | * @param {Object} params The route params to use when populating the pattern. 81 | * Properties not required by the pattern will be appended to the query string. 82 | * @return {String} The generated absolute path and query string. 83 | */ 84 | generate(name: any, params: any): string; 85 | /** 86 | * Generate a query string from an object. 87 | * 88 | * @method generateQueryString 89 | * @param {Object} params Object containing the keys and values to be used. 90 | * @return {String} The generated query string, including leading '?'. 91 | */ 92 | generateQueryString(params: any): string; 93 | /** 94 | * Parse a query string. 95 | * 96 | * @method parseQueryString 97 | * @param {String} The query string to parse. 98 | * @return {Object} Object with keys and values mapped from the query string. 99 | */ 100 | parseQueryString(queryString: any): {}; 101 | /** 102 | * Match a path string against registered route patterns. 103 | * 104 | * @method recognize 105 | * @param {String} path The path to attempt to match. 106 | * @return {Array} Array of objects containing `handler`, `params`, and 107 | * `isDynanic` values for the matched route(s), or undefined if no match 108 | * was found. 109 | */ 110 | recognize(path: any): RecognizeResults; 111 | } 112 | export class RecognizeResults { 113 | splice: any; 114 | slice: any; 115 | push: any; 116 | length: any; 117 | queryParams: any; 118 | constructor(queryParams: any); 119 | } 120 | 121 | } 122 | declare module 'aurelia-route-recognizer' { 123 | export * from 'aurelia-route-recognizer/index'; 124 | } 125 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-templating-resources.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-templating-resources/compose' { 2 | export class Compose { 3 | container: any; 4 | compositionEngine: any; 5 | viewSlot: any; 6 | viewResources: any; 7 | executionContext: any; 8 | currentViewModel: any; 9 | view: any; 10 | viewModel: any; 11 | model: any; 12 | constructor(container: any, compositionEngine: any, viewSlot: any, viewResources: any); 13 | bind(executionContext: any): void; 14 | modelChanged(newValue: any, oldValue: any): void; 15 | viewChanged(newValue: any, oldValue: any): void; 16 | viewModelChanged(newValue: any, oldValue: any): void; 17 | } 18 | 19 | } 20 | declare module 'aurelia-templating-resources/global-behavior' { 21 | export class GlobalBehavior { 22 | element: any; 23 | handler: any; 24 | aureliaCommand: any; 25 | aureliaAttrName: any; 26 | static handlers: any; 27 | static createSettingsFromBehavior: any; 28 | static jQueryPlugins: any; 29 | constructor(element: any); 30 | bind(): void; 31 | attached(): void; 32 | detached(): void; 33 | unbind(): void; 34 | } 35 | 36 | } 37 | declare module 'aurelia-templating-resources/if' { 38 | export class If { 39 | viewFactory: any; 40 | viewSlot: any; 41 | showing: any; 42 | view: any; 43 | constructor(viewFactory: any, viewSlot: any); 44 | valueChanged(newValue: any): void; 45 | } 46 | 47 | } 48 | declare module 'aurelia-templating-resources/with' { 49 | export class With { 50 | viewFactory: any; 51 | viewSlot: any; 52 | view: any; 53 | constructor(viewFactory: any, viewSlot: any); 54 | valueChanged(newValue: any): void; 55 | } 56 | 57 | } 58 | declare module 'aurelia-templating-resources/repeat' { 59 | export class Repeat { 60 | viewFactory: any; 61 | viewSlot: any; 62 | observerLocator: any; 63 | local: any; 64 | key: any; 65 | value: any; 66 | items: any; 67 | executionContext: any; 68 | oldItems: any; 69 | disposeSubscription: any; 70 | lastBoundItems: any; 71 | constructor(viewFactory: any, viewSlot: any, observerLocator: any); 72 | bind(executionContext: any): void; 73 | unbind(): void; 74 | itemsChanged(): void; 75 | processItems(): void; 76 | processArrayItems(items: any): void; 77 | processMapEntries(items: any): void; 78 | createBaseExecutionContext(data: any): any; 79 | createBaseExecutionKvpContext(key: any, value: any): any; 80 | createFullExecutionContext(data: any, index: any, length: any): any; 81 | createFullExecutionKvpContext(key: any, value: any, index: any, length: any): any; 82 | updateExecutionContext(context: any, index: any, length: any): any; 83 | handleSplices(array: any, splices: any): void; 84 | handleMapChangeRecords(map: any, records: any): void; 85 | getViewIndexByKey(key: any): any; 86 | } 87 | 88 | } 89 | declare module 'aurelia-templating-resources/show' { 90 | export class Show { 91 | element: any; 92 | constructor(element: any); 93 | valueChanged(newValue: any): void; 94 | } 95 | 96 | } 97 | declare module 'aurelia-templating-resources/sanitize-html' { 98 | export class SanitizeHtmlValueConverter { 99 | static defaultSanitizer(untrustedMarkup: any): any; 100 | sanitizer: any; 101 | constructor(); 102 | toView(untrustedMarkup: any): any; 103 | } 104 | 105 | } 106 | declare module 'aurelia-templating-resources/index' { 107 | export function configure(aurelia: any): void; 108 | export { Compose } from 'aurelia-templating-resources/compose'; 109 | export { If } from 'aurelia-templating-resources/if'; 110 | export { With } from 'aurelia-templating-resources/with'; 111 | export { Repeat } from 'aurelia-templating-resources/repeat'; 112 | export { Show } from 'aurelia-templating-resources/show'; 113 | export { GlobalBehavior } from 'aurelia-templating-resources/global-behavior'; 114 | export { SanitizeHtmlValueConverter } from 'aurelia-templating-resources/sanitize-html'; 115 | 116 | } 117 | declare module 'aurelia-templating-resources' { 118 | export * from 'aurelia-templating-resources/index'; 119 | } 120 | -------------------------------------------------------------------------------- /styles/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .splash { 6 | text-align: center; 7 | margin: 10% 0 0 0; 8 | box-sizing: border-box; 9 | } 10 | 11 | .splash .message { 12 | font-size: 72px; 13 | line-height: 72px; 14 | text-shadow: rgba(0, 0, 0, 0.5) 0 0 15px; 15 | text-transform: uppercase; 16 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 17 | } 18 | 19 | .splash .fa-spinner { 20 | text-align: center; 21 | display: inline-block; 22 | font-size: 72px; 23 | margin-top: 50px; 24 | } 25 | 26 | .page-host { 27 | position: absolute; 28 | left: 0; 29 | right: 0; 30 | top: 50px; 31 | bottom: 0; 32 | overflow-x: hidden; 33 | overflow-y: auto; 34 | } 35 | 36 | section { 37 | margin: 0 20px; 38 | } 39 | 40 | .navbar-nav li.loader { 41 | margin: 12px 24px 0 6px; 42 | } 43 | 44 | .pictureDetail { 45 | max-width: 425px; 46 | } 47 | 48 | /* animate page transitions */ 49 | section.au-enter-active { 50 | -webkit-animation: fadeInRight 1s; 51 | animation: fadeInRight 1s; 52 | } 53 | 54 | /* animate flickr image entry */ 55 | div.au-stagger { 56 | /* 200ms will be applied between each successive enter operation */ 57 | -webkit-animation-delay:100ms; 58 | animation-delay:100ms; 59 | } 60 | 61 | .flickr-img.au-enter { 62 | opacity: 0!important; 63 | } 64 | 65 | .flickr-img.au-enter-active { 66 | opacity: 1!important; 67 | -webkit-animation: bounce 1s; 68 | animation: bounce 1s; 69 | } 70 | 71 | .flickr-img > a > img { 72 | width: 260px; 73 | height: 180px; 74 | } 75 | 76 | 77 | /* animation definitions */ 78 | @-webkit-keyframes fadeInRight { 79 | 0% { 80 | opacity: 0; 81 | -webkit-transform: translate3d(100%, 0, 0); 82 | transform: translate3d(100%, 0, 0) 83 | } 84 | 100% { 85 | opacity: 1; 86 | -webkit-transform: none; 87 | transform: none 88 | } 89 | } 90 | @keyframes fadeInRight { 91 | 0% { 92 | opacity: 0; 93 | -webkit-transform: translate3d(100%, 0, 0); 94 | -ms-transform: translate3d(100%, 0, 0); 95 | transform: translate3d(100%, 0, 0) 96 | } 97 | 100% { 98 | opacity: 1; 99 | -webkit-transform: none; 100 | -ms-transform: none; 101 | transform: none 102 | } 103 | } 104 | 105 | 106 | @-webkit-keyframes bounce { 107 | 0%, 100%, 20%, 53%, 80% { 108 | -webkit-transition-timing-function: cubic-bezier(0.215, .61, .355, 1); 109 | transition-timing-function: cubic-bezier(0.215, .61, .355, 1); 110 | -webkit-transform: translate3d(0, 0, 0); 111 | transform: translate3d(0, 0, 0) 112 | } 113 | 40%, 114 | 43% { 115 | -webkit-transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 116 | transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 117 | -webkit-transform: translate3d(0, -30px, 0); 118 | transform: translate3d(0, -30px, 0) 119 | } 120 | 70% { 121 | -webkit-transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 122 | transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 123 | -webkit-transform: translate3d(0, -15px, 0); 124 | transform: translate3d(0, -15px, 0) 125 | } 126 | 90% { 127 | -webkit-transform: translate3d(0, -4px, 0); 128 | transform: translate3d(0, -4px, 0) 129 | } 130 | } 131 | @keyframes bounce { 132 | 0%, 100%, 20%, 53%, 80% { 133 | -webkit-transition-timing-function: cubic-bezier(0.215, .61, .355, 1); 134 | transition-timing-function: cubic-bezier(0.215, .61, .355, 1); 135 | -webkit-transform: translate3d(0, 0, 0); 136 | -ms-transform: translate3d(0, 0, 0); 137 | transform: translate3d(0, 0, 0) 138 | } 139 | 40%, 140 | 43% { 141 | -webkit-transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 142 | transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 143 | -webkit-transform: translate3d(0, -30px, 0); 144 | -ms-transform: translate3d(0, -30px, 0); 145 | transform: translate3d(0, -30px, 0) 146 | } 147 | 70% { 148 | -webkit-transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 149 | transition-timing-function: cubic-bezier(0.755, .050, .855, .060); 150 | -webkit-transform: translate3d(0, -15px, 0); 151 | -ms-transform: translate3d(0, -15px, 0); 152 | transform: translate3d(0, -15px, 0) 153 | } 154 | 90% { 155 | -webkit-transform: translate3d(0, -4px, 0); 156 | -ms-transform: translate3d(0, -4px, 0); 157 | transform: translate3d(0, -4px, 0) 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-framework.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-framework/plugins' { 2 | /** 3 | * Manages loading and configuring plugins. 4 | * 5 | * @class Plugins 6 | * @constructor 7 | * @param {Aurelia} aurelia An instance of Aurelia. 8 | */ 9 | export class Plugins { 10 | aurelia: any; 11 | info: any; 12 | processed: any; 13 | constructor(aurelia: any); 14 | /** 15 | * Configures a plugin before Aurelia starts. 16 | * 17 | * @method plugin 18 | * @param {moduleId} moduleId The ID of the module to configure. 19 | * @param {config} config The configuration for the specified module. 20 | * @return {Plugins} Returns the current Plugins instance. 21 | */ 22 | plugin(moduleId: any, config: any): Plugins; 23 | _process(): any; 24 | } 25 | 26 | } 27 | declare module 'aurelia-framework/aurelia' { 28 | /** 29 | * The framework core that provides the main Aurelia object. 30 | * 31 | * @class Aurelia 32 | * @constructor 33 | * @param {Loader} loader The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use a defaultLoader. 34 | * @param {Container} container The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty container. 35 | * @param {ResourceRegistry} resources The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry. 36 | */ 37 | export class Aurelia { 38 | loader: any; 39 | container: any; 40 | resources: any; 41 | use: any; 42 | resourcesToLoad: any; 43 | currentPluginId: any; 44 | started: any; 45 | host: any; 46 | root: any; 47 | constructor(loader?: any, container?: any, resources?: any); 48 | /** 49 | * Adds an existing object to the framework's dependency injection container. 50 | * 51 | * @method withInstance 52 | * @param {Class} type The object type of the dependency that the framework will inject. 53 | * @param {Object} instance The existing instance of the dependency that the framework will inject. 54 | * @return {Aurelia} Returns the current Aurelia instance. 55 | */ 56 | withInstance(type: any, instance: any): Aurelia; 57 | /** 58 | * Adds a singleton to the framework's dependency injection container. 59 | * 60 | * @method withSingleton 61 | * @param {Class} type The object type of the dependency that the framework will inject. 62 | * @param {Object} implementation The constructor function of the dependency that the framework will inject. 63 | * @return {Aurelia} Returns the current Aurelia instance. 64 | */ 65 | withSingleton(type: any, implementation: any): Aurelia; 66 | /** 67 | * Adds globally available view resources to be imported into the Aurelia framework. 68 | * 69 | * @method globalizeResources 70 | * @param {Object|Array} resources The relative module id to the resource. (Relative to the plugin's installer.) 71 | * @return {Aurelia} Returns the current Aurelia instance. 72 | */ 73 | globalizeResources(resources: any): Aurelia; 74 | /** 75 | * Renames a global resource that was imported. 76 | * 77 | * @method renameGlobalResource 78 | * @param {String} resourcePath The path to the resource. 79 | * @param {String} newName The new name. 80 | * @return {Aurelia} Returns the current Aurelia instance. 81 | */ 82 | renameGlobalResource(resourcePath: any, newName: any): Aurelia; 83 | /** 84 | * Loads plugins, then resources, and then starts the Aurelia instance. 85 | * 86 | * @method start 87 | * @return {Aurelia} Returns the started Aurelia instance. 88 | */ 89 | start(): any; 90 | /** 91 | * Instantiates the root view-model and view and add them to the DOM. 92 | * 93 | * @method withSingleton 94 | * @param {Object} root The root view-model to load upon bootstrap. 95 | * @param {string|Object} applicationHost The DOM object that Aurelia will attach to. 96 | * @return {Aurelia} Returns the current Aurelia instance. 97 | */ 98 | setRoot(root?: string, applicationHost?: any): any; 99 | } 100 | 101 | } 102 | declare module 'aurelia-framework/index' { 103 | /** 104 | * The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform. 105 | * 106 | * @module framework 107 | */ 108 | export { Aurelia } from 'aurelia-framework/aurelia'; 109 | export * from 'aurelia-dependency-injection'; 110 | export * from 'aurelia-binding'; 111 | export * from 'aurelia-metadata'; 112 | export * from 'aurelia-templating'; 113 | export * from 'aurelia-loader'; 114 | export * from 'aurelia-task-queue'; 115 | export var LogManager: any; 116 | 117 | } 118 | declare module 'aurelia-framework' { 119 | export * from 'aurelia-framework/index'; 120 | } 121 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-router.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-router/navigation-commands' { 2 | /** 3 | * Determines if the provided object is a navigation command. 4 | * A navigation command is anything with a navigate method. 5 | * @param {object} obj The item to check. 6 | * @return {boolean} 7 | */ 8 | export function isNavigationCommand(obj: any): boolean; 9 | /** 10 | * Used during the activation lifecycle to cause a redirect. 11 | * 12 | * @class Redirect 13 | * @constructor 14 | * @param {String} url The url to redirect to. 15 | */ 16 | export class Redirect { 17 | url: any; 18 | options: any; 19 | shouldContinueProcessing: any; 20 | router: any; 21 | constructor(url: any, options?: any); 22 | /** 23 | * Called by the activation system to set the child router. 24 | * 25 | * @method setRouter 26 | * @param {Router} router 27 | */ 28 | setRouter(router: any): void; 29 | /** 30 | * Called by the navigation pipeline to navigate. 31 | * 32 | * @method navigate 33 | * @param {Router} appRouter - a router which should redirect 34 | */ 35 | navigate(appRouter: any): void; 36 | } 37 | 38 | } 39 | declare module 'aurelia-router/navigation-plan' { 40 | export const activationStrategy: { 41 | noChange: string; 42 | invokeLifecycle: string; 43 | replace: string; 44 | }; 45 | export function buildNavigationPlan(navigationContext: any, forceLifecycleMinimum?: any): Promise<{}>; 46 | export class BuildNavigationPlanStep { 47 | run(navigationContext: any, next: any): any; 48 | } 49 | 50 | } 51 | declare module 'aurelia-router/util' { 52 | export function processPotential(obj: any, resolve: any, reject: any): any; 53 | 54 | } 55 | declare module 'aurelia-router/activation' { 56 | export var affirmations: string[]; 57 | export class CanDeactivatePreviousStep { 58 | run(navigationContext: any, next: any): any; 59 | } 60 | export class CanActivateNextStep { 61 | run(navigationContext: any, next: any): any; 62 | } 63 | export class DeactivatePreviousStep { 64 | run(navigationContext: any, next: any): any; 65 | } 66 | export class ActivateNextStep { 67 | run(navigationContext: any, next: any): any; 68 | } 69 | 70 | } 71 | declare module 'aurelia-router/navigation-context' { 72 | export class NavigationContext { 73 | router: any; 74 | nextInstruction: any; 75 | currentInstruction: any; 76 | prevInstruction: any; 77 | plan: any; 78 | constructor(router: any, nextInstruction: any); 79 | getAllContexts(acc?: any[]): any[]; 80 | nextInstructions: any[]; 81 | currentInstructions: any[]; 82 | prevInstructions: any[]; 83 | commitChanges(waitToSwap: any): Promise; 84 | buildTitle(separator?: string): any; 85 | } 86 | export class CommitChangesStep { 87 | run(navigationContext: any, next: any): any; 88 | } 89 | 90 | } 91 | declare module 'aurelia-router/navigation-instruction' { 92 | export class NavigationInstruction { 93 | fragment: any; 94 | queryString: any; 95 | params: any; 96 | queryParams: any; 97 | config: any; 98 | lifecycleArgs: any; 99 | viewPortInstructions: any; 100 | constructor(fragment: any, queryString: any, params: any, queryParams: any, config: any, parentInstruction: any); 101 | addViewPortInstruction(viewPortName: any, strategy: any, moduleId: any, component: any): { 102 | name: any; 103 | strategy: any; 104 | moduleId: any; 105 | component: any; 106 | childRouter: any; 107 | lifecycleArgs: any; 108 | }; 109 | getWildCardName(): any; 110 | getWildcardPath(): any; 111 | getBaseUrl(): any; 112 | } 113 | 114 | } 115 | declare module 'aurelia-router/route-filters' { 116 | export class RouteFilterContainer { 117 | static inject(): any[]; 118 | container: any; 119 | filters: any; 120 | filterCache: any; 121 | constructor(container: any); 122 | addStep(name: any, step: any, index?: number): void; 123 | getFilterSteps(name: any): any; 124 | } 125 | export function createRouteFilterStep(name: any): any; 126 | 127 | } 128 | declare module 'aurelia-router/router-configuration' { 129 | export class RouterConfiguration { 130 | instructions: any; 131 | options: any; 132 | pipelineSteps: any; 133 | title: any; 134 | unknownRouteConfig: any; 135 | constructor(); 136 | addPipelineStep(name: any, step: any): void; 137 | map(route: any, config?: any): RouterConfiguration; 138 | mapRoute(config: any): RouterConfiguration; 139 | mapUnknownRoutes(config: any): RouterConfiguration; 140 | exportToRouter(router: any): void; 141 | configureRoute(router: any, config: any, navModel?: any): void; 142 | ensureDefaultsForRouteConfig(config: any): void; 143 | deriveName(config: any): any; 144 | deriveRoute(config: any): any; 145 | deriveTitle(config: any): any; 146 | deriveModuleId(config: any): any; 147 | } 148 | 149 | } 150 | declare module 'aurelia-router/router' { 151 | import { NavigationContext } from 'aurelia-router/navigation-context'; 152 | export class Router { 153 | container: any; 154 | history: any; 155 | viewPorts: any; 156 | baseUrl: any; 157 | isConfigured: any; 158 | parent: any; 159 | navigation: any; 160 | recognizer: any; 161 | childRecognizer: any; 162 | catchAllHandler: any; 163 | routes: any; 164 | fallbackOrder: any; 165 | isNavigating: any; 166 | constructor(container: any, history: any); 167 | isRoot: boolean; 168 | registerViewPort(viewPort: any, name: any): void; 169 | refreshBaseUrl(): void; 170 | refreshNavigation(): void; 171 | configure(callbackOrConfig: any): Router; 172 | createRootedPath(fragment: any): any; 173 | navigate(fragment: any, options: any): any; 174 | navigateToRoute(route: any, params: any, options: any): any; 175 | navigateBack(): void; 176 | createChild(container: any): Router; 177 | createNavigationInstruction(url?: string, parentInstruction?: any): Promise; 178 | createNavigationContext(instruction: any): NavigationContext; 179 | generate(name: any, params: any): any; 180 | addRoute(config: any, navModel?: any): void; 181 | hasRoute(name: any): boolean; 182 | hasOwnRoute(name: any): any; 183 | handleUnknownRoutes(config: any): void; 184 | reset(): void; 185 | } 186 | 187 | } 188 | declare module 'aurelia-router/pipeline' { 189 | export const pipelineStatus: { 190 | completed: string; 191 | cancelled: string; 192 | rejected: string; 193 | running: string; 194 | }; 195 | export class Pipeline { 196 | steps: any; 197 | constructor(); 198 | withStep(step: any): Pipeline; 199 | run(ctx: any): any; 200 | } 201 | 202 | } 203 | declare module 'aurelia-router/route-loading' { 204 | export class RouteLoader { 205 | loadRoute(router: any, config: any): void; 206 | } 207 | export class LoadRouteStep { 208 | static inject(): typeof RouteLoader[]; 209 | routeLoader: any; 210 | constructor(routeLoader: any); 211 | run(navigationContext: any, next: any): Promise<{}>; 212 | } 213 | export function loadNewRoute(routeLoader: any, navigationContext: any): Promise<{}[]>; 214 | 215 | } 216 | declare module 'aurelia-router/pipeline-provider' { 217 | import { Pipeline } from 'aurelia-router/pipeline'; 218 | export class PipelineProvider { 219 | static inject(): any[]; 220 | container: any; 221 | steps: any; 222 | constructor(container: any); 223 | createPipeline(navigationContext: any): Pipeline; 224 | } 225 | 226 | } 227 | declare module 'aurelia-router/app-router' { 228 | import { Router } from 'aurelia-router/router'; 229 | export class AppRouter extends Router { 230 | static inject(): any[]; 231 | pipelineProvider: any; 232 | events: any; 233 | history: any; 234 | queue: any; 235 | isNavigating: any; 236 | isActive: any; 237 | container: any; 238 | options: any; 239 | constructor(container: any, history: any, pipelineProvider: any, events: any); 240 | isRoot: boolean; 241 | loadUrl(url: any): any; 242 | queueInstruction(instruction: any): Promise<{}>; 243 | dequeueInstruction(): void; 244 | registerViewPort(viewPort: any, name: any): Promise; 245 | activate(options?: any): void; 246 | deactivate(): void; 247 | reset(): void; 248 | } 249 | 250 | } 251 | declare module 'aurelia-router/index' { 252 | export { Router } from 'aurelia-router/router'; 253 | export { AppRouter } from 'aurelia-router/app-router'; 254 | export { PipelineProvider } from 'aurelia-router/pipeline-provider'; 255 | export { Redirect } from 'aurelia-router/navigation-commands'; 256 | export { RouteLoader } from 'aurelia-router/route-loading'; 257 | export { RouterConfiguration } from 'aurelia-router/router-configuration'; 258 | export { activationStrategy } from 'aurelia-router/navigation-plan'; 259 | export { RouteFilterContainer, createRouteFilterStep } from 'aurelia-router/route-filters'; 260 | 261 | } 262 | declare module 'aurelia-router' { 263 | export * from 'aurelia-router/index'; 264 | } 265 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-http-client.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-http-client/headers' { 2 | export class Headers { 3 | headers: any; 4 | constructor(headers?: {}); 5 | add(key: any, value: any): void; 6 | get(key: any): any; 7 | clear(): void; 8 | configureXHR(xhr: any): void; 9 | /** 10 | * XmlHttpRequest's getAllResponseHeaders() method returns a string of response 11 | * headers according to the format described here: 12 | * http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders-method 13 | * This method parses that string into a user-friendly key/value pair object. 14 | */ 15 | static parse(headerStr: any): Headers; 16 | } 17 | 18 | } 19 | declare module 'aurelia-http-client/http-response-message' { 20 | export class HttpResponseMessage { 21 | requestMessage: any; 22 | statusCode: any; 23 | response: any; 24 | isSuccess: any; 25 | statusText: any; 26 | reviver: any; 27 | mimeType: any; 28 | responseType: any; 29 | headers: any; 30 | private _content; 31 | constructor(requestMessage: any, xhr: any, responseType: any, reviver?: any); 32 | content: any; 33 | } 34 | /** 35 | * MimeTypes mapped to responseTypes 36 | * 37 | * @type {Object} 38 | */ 39 | export var mimeTypes: { 40 | "text/html": string; 41 | "text/javascript": string; 42 | "application/javascript": string; 43 | "text/json": string; 44 | "application/json": string; 45 | "application/rss+xml": string; 46 | "application/atom+xml": string; 47 | "application/xhtml+xml": string; 48 | "text/markdown": string; 49 | "text/xml": string; 50 | "text/mathml": string; 51 | "application/xml": string; 52 | "text/yml": string; 53 | "text/csv": string; 54 | "text/css": string; 55 | "text/less": string; 56 | "text/stylus": string; 57 | "text/scss": string; 58 | "text/sass": string; 59 | "text/plain": string; 60 | }; 61 | 62 | } 63 | declare module 'aurelia-http-client/request-message-processor' { 64 | export class RequestMessageProcessor { 65 | XHRType: any; 66 | transformers: any; 67 | xhr: any; 68 | constructor(xhrType: any, transformers: any); 69 | abort(): void; 70 | process(client: any, message: any): Promise<{}>; 71 | } 72 | 73 | } 74 | declare module 'aurelia-http-client/transformers' { 75 | export function timeoutTransformer(client: any, processor: any, message: any, xhr: any): void; 76 | export function callbackParameterNameTransformer(client: any, processor: any, message: any, xhr: any): void; 77 | export function credentialsTransformer(client: any, processor: any, message: any, xhr: any): void; 78 | export function progressTransformer(client: any, processor: any, message: any, xhr: any): void; 79 | export function responseTypeTransformer(client: any, processor: any, message: any, xhr: any): void; 80 | export function headerTransformer(client: any, processor: any, message: any, xhr: any): void; 81 | export function contentTransformer(client: any, processor: any, message: any, xhr: any): void; 82 | 83 | } 84 | declare module 'aurelia-http-client/http-request-message' { 85 | import { RequestMessageProcessor } from 'aurelia-http-client/request-message-processor'; 86 | export class HttpRequestMessage { 87 | method: any; 88 | uri: any; 89 | content: any; 90 | headers: any; 91 | responseType: any; 92 | constructor(method?: any, uri?: any, content?: any, headers?: any); 93 | } 94 | export function createHttpRequestMessageProcessor(): RequestMessageProcessor; 95 | 96 | } 97 | declare module 'aurelia-http-client/jsonp-request-message' { 98 | import { RequestMessageProcessor } from 'aurelia-http-client/request-message-processor'; 99 | export class JSONPRequestMessage { 100 | method: any; 101 | uri: any; 102 | content: any; 103 | headers: any; 104 | responseType: any; 105 | callbackParameterName: any; 106 | constructor(uri?: any, callbackParameterName?: any); 107 | } 108 | export function createJSONPRequestMessageProcessor(): RequestMessageProcessor; 109 | 110 | } 111 | declare module 'aurelia-http-client/request-builder' { 112 | /** 113 | * A builder class allowing fluent composition of HTTP requests. 114 | * 115 | * @class RequestBuilder 116 | * @constructor 117 | */ 118 | export class RequestBuilder { 119 | client: any; 120 | transformers: any; 121 | useJsonp: any; 122 | constructor(client: any); 123 | /** 124 | * Adds a user-defined request transformer to the RequestBuilder. 125 | * 126 | * @method addHelper 127 | * @param {String} name The name of the helper to add. 128 | * @param {Function} fn The helper function. 129 | * @chainable 130 | */ 131 | static addHelper(name: any, fn: any): void; 132 | /** 133 | * Sends the request. 134 | * 135 | * @method send 136 | * @return {Promise} A cancellable promise object. 137 | */ 138 | send(): any; 139 | } 140 | 141 | } 142 | declare module 'aurelia-http-client/http-client' { 143 | import { RequestBuilder } from 'aurelia-http-client/request-builder'; 144 | /** 145 | * The main HTTP client object. 146 | * 147 | * @class HttpClient 148 | * @constructor 149 | */ 150 | export class HttpClient { 151 | requestTransformers: any; 152 | requestProcessorFactories: any; 153 | pendingRequests: any; 154 | isRequesting: any; 155 | constructor(); 156 | /** 157 | * Configure this HttpClient with default settings to be used by all requests. 158 | * 159 | * @method configure 160 | * @param {Function} fn A function that takes a RequestBuilder as an argument. 161 | * @chainable 162 | */ 163 | configure(fn: any): HttpClient; 164 | /** 165 | * Returns a new RequestBuilder for this HttpClient instance that can be used to build and send HTTP requests. 166 | * 167 | * @method createRequest 168 | * @param uri The target URI. 169 | * @type RequestBuilder 170 | */ 171 | createRequest(uri: any): RequestBuilder; 172 | /** 173 | * Sends a message using the underlying networking stack. 174 | * 175 | * @method send 176 | * @param message A configured HttpRequestMessage or JSONPRequestMessage. 177 | * @param {Array} transformers A collection of transformers to apply to the HTTP request. 178 | * @return {Promise} A cancellable promise object. 179 | */ 180 | send(message: any, transformers: any): any; 181 | /** 182 | * Sends an HTTP DELETE request. 183 | * 184 | * @method delete 185 | * @param {String} uri The target URI. 186 | * @return {Promise} A cancellable promise object. 187 | */ 188 | delete(uri: any): any; 189 | /** 190 | * Sends an HTTP GET request. 191 | * 192 | * @method get 193 | * @param {String} uri The target URI. 194 | * @return {Promise} A cancellable promise object. 195 | */ 196 | get(uri: any): any; 197 | /** 198 | * Sends an HTTP HEAD request. 199 | * 200 | * @method head 201 | * @param {String} uri The target URI. 202 | * @return {Promise} A cancellable promise object. 203 | */ 204 | head(uri: any): any; 205 | /** 206 | * Sends a JSONP request. 207 | * 208 | * @method jsonp 209 | * @param {String} uri The target URI. 210 | * @return {Promise} A cancellable promise object. 211 | */ 212 | jsonp(uri: any, callbackParameterName?: string): any; 213 | /** 214 | * Sends an HTTP OPTIONS request. 215 | * 216 | * @method options 217 | * @param {String} uri The target URI. 218 | * @return {Promise} A cancellable promise object. 219 | */ 220 | options(uri: any): any; 221 | /** 222 | * Sends an HTTP PUT request. 223 | * 224 | * @method put 225 | * @param {String} uri The target URI. 226 | * @param {Object} uri The request payload. 227 | * @return {Promise} A cancellable promise object. 228 | */ 229 | put(uri: any, content: any): any; 230 | /** 231 | * Sends an HTTP PATCH request. 232 | * 233 | * @method patch 234 | * @param {String} uri The target URI. 235 | * @param {Object} uri The request payload. 236 | * @return {Promise} A cancellable promise object. 237 | */ 238 | patch(uri: any, content: any): any; 239 | /** 240 | * Sends an HTTP POST request. 241 | * 242 | * @method post 243 | * @param {String} uri The target URI. 244 | * @param {Object} uri The request payload. 245 | * @return {Promise} A cancellable promise object. 246 | */ 247 | post(uri: any, content: any): any; 248 | } 249 | 250 | } 251 | declare module 'aurelia-http-client/index' { 252 | /** 253 | * An extensible HTTP client provided by Aurelia. 254 | * 255 | * @module HttpClient 256 | */ 257 | export { HttpClient } from 'aurelia-http-client/http-client'; 258 | export { HttpRequestMessage } from 'aurelia-http-client/http-request-message'; 259 | export { HttpResponseMessage, mimeTypes } from 'aurelia-http-client/http-response-message'; 260 | export { JSONPRequestMessage } from 'aurelia-http-client/jsonp-request-message'; 261 | export { Headers } from 'aurelia-http-client/headers'; 262 | export { RequestBuilder } from 'aurelia-http-client/request-builder'; 263 | 264 | } 265 | declare module 'aurelia-http-client' { 266 | export * from 'aurelia-http-client/index'; 267 | } 268 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aurelia-skeleton-navigation 2 | 3 | [![ZenHub](https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)](https://zenhub.io) 4 | [![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 5 | 6 | This is a TypeScript implementation of navigation skeleton of the [Aurelia](http://www.aurelia.io/) platform. It sets up a standard navigation-style app using gulp to compile your TypeScript code with [gulp-typescript plugin](https://www.npmjs.com/package/gulp-typescript). Karma/Jasmine testing is also configured. 7 | 8 | This repository does not require Visual Studio to run. 9 | 10 | > To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to [join us on Gitter](https://gitter.im/aurelia/discuss). If you would like to have deeper insight into our development process, please install the [ZenHub](https://zenhub.io) Chrome Extension and visit any of our repository's boards. You can get an overview of all Aurelia work by visiting [the framework board](https://github.com/aurelia/framework#boards). 11 | 12 | ## Notes regarding conversion of original skeleton application from ES6 to TypeScript 13 | 14 | 0. **For those who have previous version (0.10.#) installed, it is recommended to make clean install of npm and jspm packages to force update of TS compiler and some other libraties.** 15 | 1. Structure of folders was changed in order to let TypeScript compiler, System.js and Karma runner to reference all files correctly. 16 | 2. All dependencies to Babel were removed, instead [gulp-typescript plugin](https://www.npmjs.com/package/gulp-typescript) is used. 17 | 3. Original skeleton navigation [extends](https://github.com/aurelia/skeleton-navigation/blob/master/aurelia.protractor.js) Protractor / WebDriver, so we have added appropriate d.ts file to cover this extended functionality (dts/aurelia-protractor.d.ts). 18 | 4. `gulp tdd` task was updated to enable watching and recompiling of both main and test sources and re-running karma when a change occurs. Note: you will need to use `gulp tdd` command instead of `karma start` if you want your TypeScript files to be watched. 19 | 5. `gulp e2e` command was also updated to include TypeScript compilation step (of only e2e test sources). 20 | 21 | Copyrights on the definition files are respective of each contributor listed at the beginning of each definition file. Special thanks to [Mike Graham](https://github.com/cmichaelgraham) for his [Aurelia typings](https://github.com/cmichaelgraham/aurelia-typescript-atom/tree/master/skel-nav-ts/typings/aurelia). 22 | 23 | ## Running The App 24 | 25 | To run the app, follow these steps. 26 | 27 | 1. Ensure that [NodeJS](http://nodejs.org/) is installed. This provides the platform on which the build tooling runs. 28 | 2. From the project folder, execute the following command: 29 | 30 | ```shell 31 | npm install 32 | ``` 33 | 3. Ensure that [Gulp](http://gulpjs.com/) is installed. If you need to install it, use the following command: 34 | 35 | ```shell 36 | npm install -g gulp 37 | ``` 38 | 4. Ensure that [jspm](http://jspm.io/) is installed. If you need to install it, use the following command: 39 | 40 | ```shell 41 | npm install -g jspm 42 | ``` 43 | > **Note:** jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing `jspm registry config github` and following the prompts. 44 | 5. Install the client-side dependencies with jspm: 45 | 46 | ```shell 47 | jspm install -y 48 | ``` 49 | >**Note:** Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing `npm install -g unzip` and then re-running `jspm install`. 50 | 6. To run the app, execute the following command: 51 | 52 | ```shell 53 | gulp watch 54 | ``` 55 | 7. Browse to [http://localhost:9000](http://localhost:9000) to see the app. You can make changes in the code found under `src` and the browser should auto-refresh itself as you save files. 56 | 57 | > Note: At present there is a bug in the HTMLImports polyfill which only occurs on IE. We have submitted a pull request to the team with the fix. In the mean time, if you want to test on IE, you can work around the issue by explicitly adding a script tag before you load system.js. The script tag should look something like this (be sure to confirm the version number): 58 | 59 | ```html 60 | 61 | ``` 62 | 63 | ## Running The Unit Tests 64 | 65 | To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps: 66 | 67 | 1. Install Aurelia libs for test visibility: 68 | 69 | ```shell 70 | jspm install aurelia-framework 71 | jspm install aurelia-http-client 72 | jspm install aurelia-router 73 | ``` 74 | 2. You can now run the tests once with this command. This command does TypeScript sources compilation (both main and test) and executes tests. The test commands are set up with Gulp in mind, so it is not required to have global installation of Karma: 75 | 76 | ```shell 77 | gulp test 78 | ``` 79 | Or if you want to do it TDD style use the following command. This command watches both main and test sources for change and when it detects one it automatically recompiles sources and runs tests again. 80 | 81 | ```shell 82 | gulp tdd 83 | ``` 84 | 85 | ## Running The E2E Tests 86 | 87 | Integration tests are performed with [Protractor](http://angular.github.io/protractor/#/). 88 | 89 | 1. Place your E2E-Tests into the folder ```src/test/e2e``` 90 | 2. Install the necessary webdriver 91 | 92 | ```shell 93 | gulp webdriver_update 94 | ``` 95 | 96 | 3. Configure the path to the webdriver by opening the file ```protractor.conf.js``` and adjusting the ```seleniumServerJar``` property. Typically its only needed to adjust the version number. 97 | 98 | 4. Make sure your app runs and is accessible 99 | 100 | ```shell 101 | gulp watch 102 | ``` 103 | 104 | 5. In another console run the E2E-Tests 105 | 106 | ```shell 107 | gulp e2e 108 | ``` 109 | # 日本語バージョン 110 | 111 | このリポジトリは、TypeScriptで実装された [Aurelia](http://www.aurelia.io/) プラットフォームの基礎のナビゲーションサンプルです。[gulp-typescript プラグイン](https://www.npmjs.com/package/gulp-typescript)を利用して、TypeScriptソースをコンパイルするgulpタスクが設定してあります。Karma/Jasmineによるunit testタスクやProtractorによるe2e testタスクも設定してあります。 112 | 113 | このリポジトリのコードはVisual Studioに依存していません。 114 | 115 | > [Aurelia](http://www.aurelia.io/)の最新情報は、 [オフィシャルブログ](http://blog.duderandal.io/)までお願いします。質問等があれば、専用の[Gitterチャンネル](https://gitter.im/aurelia/discuss) でお訪ねください。 116 | 117 | ## ES6からTypeScriptへの変換に関するメモ 118 | 119 | 0. **このリポジトリの前のバージョンをインストールしている方は、npm や jspm のクリーンインストールするのをお勧めします。TSコンパイラや他のライブラリの更新させる必要があるためです。** 120 | 1. TypeScriptのコンパイラやSystem.jsやKarmaがファイルを正しく参照できるために、ディレクトリ構成が変更されている。 121 | 2. Babelの依存個所は全てなくなっている。 122 | 3. もともとのサンプルはProtractor / WebDriverの機能を[拡張している](https://github.com/aurelia/skeleton-navigation/blob/master/aurelia.protractor.js) ので、コンパイルエラーにならないようにd.ts(dts/aurelia-protractor.d.ts)が追加されている。 123 | 4. `gulp tdd`タスクがTypescriptのメインとテストのソースを監視し、変更があったときに再コンパイルし、テストが実施されるように対応してある。 124 | 5. `gulp e2e`タスクもe2eテストのソースのコンパイルステップが含まれるように更新されている。 125 | 126 | TypeScript型定義ファイルの著作権については各d.tsファイルの先頭に記述されています。[Aureliaの型の定義](https://github.com/cmichaelgraham/aurelia-typescript-atom/tree/master/skel-nav-ts/typings/aurelia)を提供してくださった[Mike Graham](https://github.com/cmichaelgraham)に殊に感謝します。 127 | 128 | ## アプリケーションの起動方法 129 | 130 | アプリケーションを起動するのに、以下のステップを実施してください。 131 | 132 | 1. [NodeJS](http://nodejs.org/)が必要なので、まだインストールされていなければ、インストールしてください。NodeJSはビルドツールが動くための環境を提供しているものです。 133 | 2. プロジェクトのルートから以下のコマンドを実施してください。 134 | 135 | ```shell 136 | npm install 137 | ``` 138 | 3. [Gulp](http://gulpjs.com/)が必要なので、まだインストールされていなければ、以下のコマンドでインストールしてください。 139 | 140 | ```shell 141 | npm install -g gulp 142 | ``` 143 | 4. [jspm](http://jspm.io/)が必要なので、まだインストールされていなければ、以下のコマンドでインストールしてください。 144 | 145 | ```shell 146 | npm install -g jspm 147 | ``` 148 | > **注意** jspmはsemverに対応したパッケージをインストールするために、GitHubに対してリクエストを送信しているが、未認証のリクエスト数に対して制限がかけられています。この制限による問題をさけるために、自分のGitHubユーザー情報をjspmに設定するのがおすすめです。まずはこの`jspm registry config github`を実行してから、表示される指示に従って設定してください。 149 | 150 | 5. jspmを利用して、クライアントのライブラリをインストールします。 151 | 152 | ```shell 153 | jspm install -y 154 | ``` 155 | >**注意** Windowsユーザーは、"unknown command unzip"エラーが発生する場合、`npm install -g unzip`コマンドを実施してから、再度`jspm install`を実施してください。 156 | 157 | 6. アプリケーションをスタートするのに、以下のコマンドを実施してください。 158 | 159 | ```shell 160 | gulp watch 161 | ``` 162 | 7. ブラウザで[http://localhost:9000](http://localhost:9000)を開いてください。`src/app`の配下のファイルを更新すると、自動的にコンパイルされ、ブラウザの画面も更新されます。 163 | 164 | > 注意:今のところでは、HTMLImports ポリフィルにIEだけで発生するバグがあります。Aureliaチームがこのバグを修正するプルリクエストを出していますが、改修されるまで以下のように直接スクリプトタグを追加して、回避してください(バージョンだけに注意してください)。 165 | 166 | ```html 167 | 168 | ``` 169 | 170 | ## ユニットテストの実施方法 171 | 172 | ユニットテストを実施するのに、ライブラリのインストールをするのに、まずは上記のステップを完成してください。その後に以下のステップを実施してください。 173 | 174 | 1. ユニットテストから各ライブラリを参照するために、以下のように個別でインストールしてください。 175 | 176 | ```shell 177 | jspm install aurelia-framework 178 | jspm install aurelia-http-client 179 | jspm install aurelia-router 180 | ``` 181 | 2. テストを一回だけ実施したい場合、以下のコマンドを使ってください。このコマンドは、両方メインとテストのTypescriptのソースをコンパイルしてから、テスト実施します。テストはGulpから実施されることが想定されているので、Karmaのグローバルのインストールは不要です。 182 | 183 | ```shell 184 | gulp test 185 | ``` 186 | 継続的にテストを実施する場合、以下のコマンドを使ってください。両方メインとテストのTypeScriptのソースに変更があったときに、自動的に再コンパイルされ、テストが実施されます。 187 | 188 | ```shell 189 | gulp tdd 190 | ``` 191 | 192 | ## E2E(End-To-End)テストの実施方法 193 | 194 | 結合テストは[Protractor](http://angular.github.io/protractor/#/)を利用しています。 195 | 196 | 1. E2Eテストのソースを```src/test/e2e```に配置してください。 197 | 2. WebDriverをインストールしてください。 198 | 199 | ```shell 200 | gulp webdriver_update 201 | ``` 202 | 203 | 3. `protractor.conf.js`でWebDriverへのパスと`seleniumServerJar`プロパティを調整してください。基本的に、バージョンの調整だけが必要です。 204 | 205 | 4. アプリケーションを起動します。 206 | 207 | ```shell 208 | gulp watch 209 | ``` 210 | 211 | 5. 別なコンソールのウィンドウでE2Eテストを実施します。このコマンドでE2Eテストのソースがコンパイルされてから、テストが実施されます。 212 | 213 | ```shell 214 | gulp e2e 215 | ``` 216 | -------------------------------------------------------------------------------- /doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.13.0 (2015-05-01) 2 | 3 | 4 | #### Bug Fixes 5 | 6 | * **all:** update to latest router usage ([1bb373f7](http://github.com/aurelia/skeleton-navigation/commit/1bb373f73e224f084ac8b3bc330aeffb5d9bf5f0)) 7 | * **anim:** Remove welcome class animation ([a68fc9d4](http://github.com/aurelia/skeleton-navigation/commit/a68fc9d41f866aacccb1cc1b567b18af58141d1b)) 8 | * **build:** use relative path for source maps. resolve #66 ([aaf3cc9a](http://github.com/aurelia/skeleton-navigation/commit/aaf3cc9a67f86275a94666ab328f2ca74a7f7c52)) 9 | * **flickr:** remove inline styles ([612e0ea6](http://github.com/aurelia/skeleton-navigation/commit/612e0ea67e4bf13685644ff5055f5e36ffc7ad07)) 10 | * **index:** add the viewport meta tag to ensure proper rendering and touch zooming ([0ecf0b9e](http://github.com/aurelia/skeleton-navigation/commit/0ecf0b9ea97245492bd9224dfb8cc9b940f254d1)) 11 | * **navbar:** automatically collapse the navigation menu on click ([28f3c6fa](http://github.com/aurelia/skeleton-navigation/commit/28f3c6faf1fa3d1533f6470b273bacea7ed76eb7)) 12 | * **package:** update dependencies ([dfe57813](http://github.com/aurelia/skeleton-navigation/commit/dfe57813459d012c05affa6c09acb568854c07e3)) 13 | 14 | 15 | #### Features 16 | 17 | * **anim:** Add animation example ([675d15a1](http://github.com/aurelia/skeleton-navigation/commit/675d15a153c399f524070e7cb468caae3230febe)) 18 | 19 | 20 | ## 0.12.0 (2015-04-09) 21 | 22 | 23 | #### Bug Fixes 24 | 25 | * **readme:** More info about E2E workflow ([f9b360ee](http://github.com/aurelia/skeleton-navigation/commit/f9b360ee3211b896b5b9970520bcd37dc79c2918)) 26 | * **test:** workaround for issue with jspm karma plugin ([7bf90b7e](http://github.com/aurelia/skeleton-navigation/commit/7bf90b7ef78b4375760e94c394a8f2ec0870e43e)) 27 | * **tests:** Update routes in unit tests ([fb2c02b6](http://github.com/aurelia/skeleton-navigation/commit/fb2c02b6e3dd5ba219b307bedd5be9b999c21116)) 28 | 29 | 30 | #### Features 31 | 32 | * **all:** new decorators and behavior model implemented ([e5445795](http://github.com/aurelia/skeleton-navigation/commit/e54457951a17b3f29d47555a299f9aaa06e59349)) 33 | 34 | 35 | ## 0.11.0 (2015-03-25) 36 | 37 | 38 | #### Bug Fixes 39 | 40 | * **all:** update to latest framework versions ([86378200](http://github.com/aurelia/skeleton-navigation/commit/8637820009f7bf4f4b2a08b2abaf2fae9bb2811d)) 41 | 42 | 43 | ### 0.10.2 (2015-02-28) 44 | 45 | 46 | #### Bug Fixes 47 | 48 | * **package:** update dependencies ([3a8cfc33](http://github.com/aurelia/skeleton-navigation/commit/3a8cfc33cb41e29d4199a94b43198cf62a3a1ceb)) 49 | 50 | 51 | ### 0.10.1 (2015-02-28) 52 | 53 | 54 | #### Bug Fixes 55 | 56 | * **child-router:** correct class name ([93f9bfc9](http://github.com/aurelia/skeleton-navigation/commit/93f9bfc9076a7e950d667d50c9ac75e9efb3e1f5)) 57 | * **e2e:** 58 | * remove iit in dist ([dd644b1f](http://github.com/aurelia/skeleton-navigation/commit/dd644b1f926fca5c0a59cf1a662fb246456aa9ae)) 59 | * remove iit ([340fc90d](http://github.com/aurelia/skeleton-navigation/commit/340fc90d3a558e6a5f1aed83f7d2c1080447bc33)) 60 | * **package:** update dependencies ([42b6ebbd](http://github.com/aurelia/skeleton-navigation/commit/42b6ebbd571f61d82ef7334b518dba4259559f2a)) 61 | 62 | 63 | #### Features 64 | 65 | * **e2e:** add protractor plugin, add waitMethods ([d24c5a0d](http://github.com/aurelia/skeleton-navigation/commit/d24c5a0d606c6da1c30cf54a56ca5d3e086749cb)) 66 | 67 | 68 | ## 0.10.0 (2015-02-12) 69 | 70 | 71 | #### Bug Fixes 72 | 73 | * **index:** properly load bootstrap ([c1735fdb](http://github.com/aurelia/skeleton-navigation/commit/c1735fdbd064e69567b90358dfcc5eff0fdeab37)) 74 | 75 | 76 | ### 0.9.5 (2015-02-06) 77 | 78 | 79 | #### Bug Fixes 80 | 81 | * **build:** 82 | * include root attribute on path for source maps ([e3fc2d5a](http://github.com/aurelia/skeleton-navigation/commit/e3fc2d5a26f354c2afbd2c1e1e45b96fe5d92657), closes [#26](http://github.com/aurelia/skeleton-navigation/issues/26)) 83 | * add source maps; remove sourceFileName from compiler options ([1733c4ad](http://github.com/aurelia/skeleton-navigation/commit/1733c4ad032747ecb868b420a5d6f23e9dab12ae)) 84 | * **package:** update dependencies ([025154f3](http://github.com/aurelia/skeleton-navigation/commit/025154f3c9fc9d99b6ca00bfd94d9ffc8249df5c)) 85 | * **test:** removing single it execution ([31866dc3](http://github.com/aurelia/skeleton-navigation/commit/31866dc3038fe2c1b51531620a13b88c8e3ff766)) 86 | 87 | 88 | #### Features 89 | 90 | * **e2e:** add protractor locator and e2e PO test ([2509836e](http://github.com/aurelia/skeleton-navigation/commit/2509836e8406745e55c8d3d897f8a2b7f1bb1c56)) 91 | 92 | 93 | ### 0.9.4 (2015-02-03) 94 | 95 | 96 | #### Bug Fixes 97 | 98 | * **index:** per systemjs recommendation, remove error binding ([e30cefac](http://github.com/aurelia/skeleton-navigation/commit/e30cefac419f88911a4c18085ffd59d05047e254)) 99 | * **package:** add missing depdency ([c3718827](http://github.com/aurelia/skeleton-navigation/commit/c37188278816f1c540e8b038a8dfed60dfeb0d9c)) 100 | 101 | 102 | #### Features 103 | 104 | * **gulpfile:** adds protractor configuration and gulpfile tasks for E2E-Testing ([821f4868](http://github.com/aurelia/skeleton-navigation/commit/821f4868a5d4b4ba62cc12cece943cd55ed3142f)) 105 | * **tools:** Added build-dev-env task to skeleton-navigation ([4c145095](http://github.com/aurelia/skeleton-navigation/commit/4c1450956cf1e8804ddd660beeba77546e14287f)) 106 | 107 | 108 | ### 0.9.3 (2015-01-25) 109 | 110 | 111 | #### Bug Fixes 112 | 113 | * **package:** update dependencies ([0f221d2d](http://github.com/aurelia/skeleton-navigation/commit/0f221d2d8cb79ba40b745c92d0fa64d27bfd0dbf)) 114 | 115 | 116 | ### 0.9.2 (2015-01-25) 117 | 118 | 119 | #### Bug Fixes 120 | 121 | * **gulpfile:** bug in browser sync for style content ([342a2612](http://github.com/aurelia/skeleton-navigation/commit/342a26121cf5988d73847ed02d022d13e325d5f2)) 122 | 123 | 124 | ### 0.9.1 (2015-01-24) 125 | 126 | 127 | #### Bug Fixes 128 | 129 | * **package:** 130 | * update dependencies ([d05fb6c9](http://github.com/aurelia/skeleton-navigation/commit/d05fb6c9a4148e85165e8b8594b3de9e344e85d6)) 131 | * update dependencies ([da130f4f](http://github.com/aurelia/skeleton-navigation/commit/da130f4f2919c8330f455e1b9f175d693aacf43c)) 132 | * update dependencies ([ab85bc86](http://github.com/aurelia/skeleton-navigation/commit/ab85bc865cb1607f13cb7d5b3a55f37903e61785)) 133 | 134 | 135 | #### Features 136 | 137 | * **package:** update dependencies ([86b1dd90](http://github.com/aurelia/skeleton-navigation/commit/86b1dd908206abfdca2a8f89cc246f54e761bdbd)) 138 | * **welcome:** add sample local value converter ([9a2c2aa6](http://github.com/aurelia/skeleton-navigation/commit/9a2c2aa6f7fa9f5a5666aa0c19163bf49cbcc5fc)) 139 | 140 | 141 | ## 0.9.0 (2015-01-22) 142 | 143 | 144 | #### Bug Fixes 145 | 146 | * **all:** 147 | * update dependencies and links to latest ([8863e7b7](http://github.com/aurelia/skeleton-navigation/commit/8863e7b7d07e87430b0f495cd25923e401698bc9)) 148 | * update to latest version of metadata and view import ([2467e6c8](http://github.com/aurelia/skeleton-navigation/commit/2467e6c8361fc848b45ab6d92b180edf4d4bcdb5)) 149 | * **build:** improve watch functionality ([8496a78d](http://github.com/aurelia/skeleton-navigation/commit/8496a78def478bd2c53217c9e70db1d272a935ea)) 150 | * **package:** update dependencies ([2957e94d](http://github.com/aurelia/skeleton-navigation/commit/2957e94d84988207c2553395e8e0a1c943a65a16)) 151 | 152 | 153 | #### Features 154 | 155 | * **all:** update to new fluent metadata ([18382913](http://github.com/aurelia/skeleton-navigation/commit/183829132bce3f754377bf2d720a288b71ef4b64)) 156 | * **index:** add splash screen ([88e3e6f9](http://github.com/aurelia/skeleton-navigation/commit/88e3e6f956575c18fb37e72cd51e7bfac33f6941)) 157 | 158 | 159 | ## 0.8.0 (2015-01-12) 160 | 161 | 162 | #### Bug Fixes 163 | 164 | * **package:** update Aurelia dependencies ([44083541](http://github.com/aurelia/skeleton-navigation/commit/440835418d78b5d99278ec4f2fbc04beb79ff98f)) 165 | 166 | 167 | #### Features 168 | 169 | * **build:** update watch task to include style files ([ddf6c789](http://github.com/aurelia/skeleton-navigation/commit/ddf6c789c84ac267bdf4865f19a3339d7ee66253)) 170 | 171 | 172 | ### 0.7.2 (2015-01-07) 173 | 174 | 175 | #### Bug Fixes 176 | 177 | * **welcome:** typo in the last name label ([05e72aaa](http://github.com/aurelia/skeleton-navigation/commit/05e72aaaee2a8c58943f7b9e85eb59307a85f35d)) 178 | 179 | 180 | ### 0.7.1 (2015-01-07) 181 | 182 | * updates to the readme to help clarify issues around authentication and usage on windows 183 | 184 | ## 0.7.0 (2015-01-07) 185 | 186 | 187 | #### Bug Fixes 188 | 189 | * **package:** update dependencies to latest ([c11ffa0d](http://github.com/aurelia/skeleton-navigation/commit/c11ffa0d980c6058dbff6d0a16fadd27040f7214)) 190 | 191 | 192 | ## 0.6.0 (2015-01-06) 193 | 194 | 195 | #### Features 196 | 197 | * **build:** update compiler and switch to register module format ([921d6ab8](http://github.com/aurelia/skeleton-navigation/commit/921d6ab8a523fce6a410f7333650eef9dc5e8abc)) 198 | 199 | 200 | ## 0.5.0 (2014-12-22) 201 | 202 | 203 | #### Bug Fixes 204 | 205 | * **config:** update the jspm config ([9ceaa0c2](http://github.com/aurelia/skeleton-navigation/commit/9ceaa0c2af5374461d183993036984cf048261d8)) 206 | * **package:** update dependencies to latest versions ([b5cff606](http://github.com/aurelia/skeleton-navigation/commit/b5cff606059dff0ad47e78cc6ba4325d646015a5)) 207 | 208 | 209 | #### Features 210 | 211 | * **build:** add browser sync ([fe2d2fa7](http://github.com/aurelia/skeleton-navigation/commit/fe2d2fa7c10a4748cab6c86e326465e6a8327ef4)) 212 | 213 | 214 | ### 0.4.2 (2014-12-18) 215 | 216 | 217 | #### Bug Fixes 218 | 219 | * **package:** update bootstrapper to latest version ([e1d00037](http://github.com/aurelia/skeleton-navigation/commit/e1d000377c782b1bfc9c8fce0d247afb0b8702d1)) 220 | 221 | 222 | ### 0.4.1 (2014-12-18) 223 | 224 | 225 | #### Bug Fixes 226 | 227 | * **package:** update dependencies to latest versions ([275a693d](http://github.com/aurelia/skeleton-navigation/commit/275a693dcbbeec189847f97881b40d25e3b693d4)) 228 | 229 | 230 | ## 0.4.0 (2014-12-17) 231 | 232 | 233 | #### Bug Fixes 234 | 235 | * **package:** update dependencies to latest versions ([77986163](http://github.com/aurelia/skeleton-navigation/commit/779861632b7e48152ce7bed9d0316e90fda2482d)) 236 | * **package:** update dependencies to latest versions ([4f1661dc](http://github.com/aurelia/skeleton-navigation/commit/4f1661dceafe93c8c117133bd07b9edb243b913e)) 237 | 238 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | "paths": { 3 | "*": "*.js", 4 | "github:*": "jspm_packages/github/*.js", 5 | "npm:*": "jspm_packages/npm/*.js", 6 | "aurelia-skeleton-navigation/*": "dist/app/*.js" 7 | } 8 | }); 9 | 10 | System.config({ 11 | "map": { 12 | "aurelia-animator-css": "github:aurelia/animator-css@0.2.0", 13 | "aurelia-bootstrapper": "github:aurelia/bootstrapper@0.12.0", 14 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 15 | "aurelia-framework": "github:aurelia/framework@0.11.0", 16 | "aurelia-http-client": "github:aurelia/http-client@0.8.0", 17 | "aurelia-router": "github:aurelia/router@0.8.0", 18 | "babel": "npm:babel-core@5.1.13", 19 | "babel-runtime": "npm:babel-runtime@5.1.13", 20 | "bootstrap": "github:twbs/bootstrap@3.3.4", 21 | "core-js": "npm:core-js@0.9.6", 22 | "css": "github:systemjs/plugin-css@0.1.10", 23 | "font-awesome": "npm:font-awesome@4.3.0", 24 | "traceur": "github:jmcriffey/bower-traceur@0.0.88", 25 | "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.88", 26 | "github:aurelia/animator-css@0.2.0": { 27 | "aurelia-templating": "github:aurelia/templating@0.11.2" 28 | }, 29 | "github:aurelia/binding@0.6.1": { 30 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 31 | "aurelia-metadata": "github:aurelia/metadata@0.5.0", 32 | "aurelia-task-queue": "github:aurelia/task-queue@0.4.0", 33 | "core-js": "npm:core-js@0.9.6" 34 | }, 35 | "github:aurelia/bootstrapper@0.12.0": { 36 | "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.4.0", 37 | "aurelia-framework": "github:aurelia/framework@0.11.0", 38 | "aurelia-history": "github:aurelia/history@0.4.0", 39 | "aurelia-history-browser": "github:aurelia/history-browser@0.4.0", 40 | "aurelia-loader-default": "github:aurelia/loader-default@0.7.0", 41 | "aurelia-logging-console": "github:aurelia/logging-console@0.4.0", 42 | "aurelia-router": "github:aurelia/router@0.8.0", 43 | "aurelia-templating": "github:aurelia/templating@0.11.2", 44 | "aurelia-templating-binding": "github:aurelia/templating-binding@0.11.0", 45 | "aurelia-templating-resources": "github:aurelia/templating-resources@0.11.1", 46 | "aurelia-templating-router": "github:aurelia/templating-router@0.12.0", 47 | "core-js": "npm:core-js@0.9.6" 48 | }, 49 | "github:aurelia/dependency-injection@0.7.1": { 50 | "aurelia-logging": "github:aurelia/logging@0.4.0", 51 | "aurelia-metadata": "github:aurelia/metadata@0.5.0", 52 | "core-js": "npm:core-js@0.9.6" 53 | }, 54 | "github:aurelia/framework@0.11.0": { 55 | "aurelia-binding": "github:aurelia/binding@0.6.1", 56 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 57 | "aurelia-loader": "github:aurelia/loader@0.6.0", 58 | "aurelia-logging": "github:aurelia/logging@0.4.0", 59 | "aurelia-metadata": "github:aurelia/metadata@0.5.0", 60 | "aurelia-path": "github:aurelia/path@0.6.1", 61 | "aurelia-task-queue": "github:aurelia/task-queue@0.4.0", 62 | "aurelia-templating": "github:aurelia/templating@0.11.2", 63 | "core-js": "npm:core-js@0.9.6" 64 | }, 65 | "github:aurelia/history-browser@0.4.0": { 66 | "aurelia-history": "github:aurelia/history@0.4.0", 67 | "core-js": "npm:core-js@0.9.6" 68 | }, 69 | "github:aurelia/http-client@0.8.0": { 70 | "aurelia-path": "github:aurelia/path@0.6.1", 71 | "core-js": "npm:core-js@0.9.6" 72 | }, 73 | "github:aurelia/loader-default@0.7.0": { 74 | "aurelia-loader": "github:aurelia/loader@0.6.0", 75 | "aurelia-metadata": "github:aurelia/metadata@0.5.0" 76 | }, 77 | "github:aurelia/loader@0.6.0": { 78 | "aurelia-html-template-element": "github:aurelia/html-template-element@0.2.0", 79 | "aurelia-path": "github:aurelia/path@0.6.1", 80 | "core-js": "npm:core-js@0.9.6", 81 | "webcomponentsjs": "github:webcomponents/webcomponentsjs@0.6.1" 82 | }, 83 | "github:aurelia/metadata@0.5.0": { 84 | "core-js": "npm:core-js@0.9.6" 85 | }, 86 | "github:aurelia/route-recognizer@0.4.0": { 87 | "core-js": "npm:core-js@0.9.6" 88 | }, 89 | "github:aurelia/router@0.8.0": { 90 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 91 | "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.4.0", 92 | "aurelia-history": "github:aurelia/history@0.4.0", 93 | "aurelia-path": "github:aurelia/path@0.6.1", 94 | "aurelia-route-recognizer": "github:aurelia/route-recognizer@0.4.0", 95 | "core-js": "npm:core-js@0.9.6" 96 | }, 97 | "github:aurelia/templating-binding@0.11.0": { 98 | "aurelia-binding": "github:aurelia/binding@0.6.1", 99 | "aurelia-logging": "github:aurelia/logging@0.4.0", 100 | "aurelia-templating": "github:aurelia/templating@0.11.2" 101 | }, 102 | "github:aurelia/templating-resources@0.11.1": { 103 | "aurelia-binding": "github:aurelia/binding@0.6.1", 104 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 105 | "aurelia-logging": "github:aurelia/logging@0.4.0", 106 | "aurelia-task-queue": "github:aurelia/task-queue@0.4.0", 107 | "aurelia-templating": "github:aurelia/templating@0.11.2", 108 | "core-js": "npm:core-js@0.9.6" 109 | }, 110 | "github:aurelia/templating-router@0.12.0": { 111 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 112 | "aurelia-metadata": "github:aurelia/metadata@0.5.0", 113 | "aurelia-path": "github:aurelia/path@0.6.1", 114 | "aurelia-router": "github:aurelia/router@0.8.0", 115 | "aurelia-templating": "github:aurelia/templating@0.11.2" 116 | }, 117 | "github:aurelia/templating@0.11.2": { 118 | "aurelia-binding": "github:aurelia/binding@0.6.1", 119 | "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.7.1", 120 | "aurelia-html-template-element": "github:aurelia/html-template-element@0.2.0", 121 | "aurelia-loader": "github:aurelia/loader@0.6.0", 122 | "aurelia-logging": "github:aurelia/logging@0.4.0", 123 | "aurelia-metadata": "github:aurelia/metadata@0.5.0", 124 | "aurelia-path": "github:aurelia/path@0.6.1", 125 | "aurelia-task-queue": "github:aurelia/task-queue@0.4.0", 126 | "core-js": "npm:core-js@0.9.6" 127 | }, 128 | "github:jspm/nodelibs-assert@0.1.0": { 129 | "assert": "npm:assert@1.3.0" 130 | }, 131 | "github:jspm/nodelibs-buffer@0.1.0": { 132 | "buffer": "npm:buffer@3.2.2" 133 | }, 134 | "github:jspm/nodelibs-events@0.1.0": { 135 | "events-browserify": "npm:events-browserify@0.0.1" 136 | }, 137 | "github:jspm/nodelibs-http@1.7.1": { 138 | "Base64": "npm:Base64@0.2.1", 139 | "events": "github:jspm/nodelibs-events@0.1.0", 140 | "inherits": "npm:inherits@2.0.1", 141 | "stream": "github:jspm/nodelibs-stream@0.1.0", 142 | "url": "github:jspm/nodelibs-url@0.1.0", 143 | "util": "github:jspm/nodelibs-util@0.1.0" 144 | }, 145 | "github:jspm/nodelibs-https@0.1.0": { 146 | "https-browserify": "npm:https-browserify@0.0.0" 147 | }, 148 | "github:jspm/nodelibs-os@0.1.0": { 149 | "os-browserify": "npm:os-browserify@0.1.2" 150 | }, 151 | "github:jspm/nodelibs-path@0.1.0": { 152 | "path-browserify": "npm:path-browserify@0.0.0" 153 | }, 154 | "github:jspm/nodelibs-process@0.1.1": { 155 | "process": "npm:process@0.10.1" 156 | }, 157 | "github:jspm/nodelibs-stream@0.1.0": { 158 | "stream-browserify": "npm:stream-browserify@1.0.0" 159 | }, 160 | "github:jspm/nodelibs-url@0.1.0": { 161 | "url": "npm:url@0.10.3" 162 | }, 163 | "github:jspm/nodelibs-util@0.1.0": { 164 | "util": "npm:util@0.10.3" 165 | }, 166 | "github:systemjs/plugin-css@0.1.10": { 167 | "clean-css": "npm:clean-css@3.1.9", 168 | "fs": "github:jspm/nodelibs-fs@0.1.2", 169 | "path": "github:jspm/nodelibs-path@0.1.0" 170 | }, 171 | "github:twbs/bootstrap@3.3.4": { 172 | "jquery": "github:components/jquery@2.1.3" 173 | }, 174 | "npm:amdefine@0.1.0": { 175 | "fs": "github:jspm/nodelibs-fs@0.1.2", 176 | "module": "github:jspm/nodelibs-module@0.1.0", 177 | "path": "github:jspm/nodelibs-path@0.1.0", 178 | "process": "github:jspm/nodelibs-process@0.1.1" 179 | }, 180 | "npm:assert@1.3.0": { 181 | "util": "npm:util@0.10.3" 182 | }, 183 | "npm:buffer@3.2.2": { 184 | "base64-js": "npm:base64-js@0.0.8", 185 | "ieee754": "npm:ieee754@1.1.5", 186 | "is-array": "npm:is-array@1.0.1" 187 | }, 188 | "npm:clean-css@3.1.9": { 189 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 190 | "commander": "npm:commander@2.6.0", 191 | "fs": "github:jspm/nodelibs-fs@0.1.2", 192 | "http": "github:jspm/nodelibs-http@1.7.1", 193 | "https": "github:jspm/nodelibs-https@0.1.0", 194 | "os": "github:jspm/nodelibs-os@0.1.0", 195 | "path": "github:jspm/nodelibs-path@0.1.0", 196 | "process": "github:jspm/nodelibs-process@0.1.1", 197 | "source-map": "npm:source-map@0.1.43", 198 | "url": "github:jspm/nodelibs-url@0.1.0", 199 | "util": "github:jspm/nodelibs-util@0.1.0" 200 | }, 201 | "npm:commander@2.6.0": { 202 | "child_process": "github:jspm/nodelibs-child_process@0.1.0", 203 | "events": "github:jspm/nodelibs-events@0.1.0", 204 | "path": "github:jspm/nodelibs-path@0.1.0", 205 | "process": "github:jspm/nodelibs-process@0.1.1" 206 | }, 207 | "npm:core-js@0.9.6": { 208 | "process": "github:jspm/nodelibs-process@0.1.1" 209 | }, 210 | "npm:core-util-is@1.0.1": { 211 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 212 | }, 213 | "npm:events-browserify@0.0.1": { 214 | "process": "github:jspm/nodelibs-process@0.1.1" 215 | }, 216 | "npm:font-awesome@4.3.0": { 217 | "css": "github:systemjs/plugin-css@0.1.10" 218 | }, 219 | "npm:https-browserify@0.0.0": { 220 | "http": "github:jspm/nodelibs-http@1.7.1" 221 | }, 222 | "npm:inherits@2.0.1": { 223 | "util": "github:jspm/nodelibs-util@0.1.0" 224 | }, 225 | "npm:os-browserify@0.1.2": { 226 | "os": "github:jspm/nodelibs-os@0.1.0" 227 | }, 228 | "npm:path-browserify@0.0.0": { 229 | "process": "github:jspm/nodelibs-process@0.1.1" 230 | }, 231 | "npm:punycode@1.3.2": { 232 | "process": "github:jspm/nodelibs-process@0.1.1" 233 | }, 234 | "npm:readable-stream@1.1.13": { 235 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 236 | "core-util-is": "npm:core-util-is@1.0.1", 237 | "events": "github:jspm/nodelibs-events@0.1.0", 238 | "inherits": "npm:inherits@2.0.1", 239 | "isarray": "npm:isarray@0.0.1", 240 | "process": "github:jspm/nodelibs-process@0.1.1", 241 | "stream": "github:jspm/nodelibs-stream@0.1.0", 242 | "stream-browserify": "npm:stream-browserify@1.0.0", 243 | "string_decoder": "npm:string_decoder@0.10.31", 244 | "util": "github:jspm/nodelibs-util@0.1.0" 245 | }, 246 | "npm:source-map@0.1.43": { 247 | "amdefine": "npm:amdefine@0.1.0", 248 | "fs": "github:jspm/nodelibs-fs@0.1.2", 249 | "path": "github:jspm/nodelibs-path@0.1.0", 250 | "process": "github:jspm/nodelibs-process@0.1.1" 251 | }, 252 | "npm:stream-browserify@1.0.0": { 253 | "events": "github:jspm/nodelibs-events@0.1.0", 254 | "inherits": "npm:inherits@2.0.1", 255 | "readable-stream": "npm:readable-stream@1.1.13" 256 | }, 257 | "npm:string_decoder@0.10.31": { 258 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 259 | }, 260 | "npm:url@0.10.3": { 261 | "assert": "github:jspm/nodelibs-assert@0.1.0", 262 | "punycode": "npm:punycode@1.3.2", 263 | "querystring": "npm:querystring@0.2.0", 264 | "util": "github:jspm/nodelibs-util@0.1.0" 265 | }, 266 | "npm:util@0.10.3": { 267 | "inherits": "npm:inherits@2.0.1", 268 | "process": "github:jspm/nodelibs-process@0.1.1" 269 | } 270 | } 271 | }); 272 | 273 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-dependency-injection.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-dependency-injection/metadata' { 2 | /** 3 | * Used to allow functions/classes to indicate that they should be registered as transients with the container. 4 | * 5 | * @class TransientRegistration 6 | * @constructor 7 | * @param {Object} [key] The key to register as. 8 | */ 9 | export class TransientRegistration { 10 | key: any; 11 | constructor(key: any); 12 | /** 13 | * Called by the container to register the annotated function/class as transient. 14 | * 15 | * @method register 16 | * @param {Container} container The container to register with. 17 | * @param {Object} key The key to register as. 18 | * @param {Object} fn The function to register (target of the annotation). 19 | */ 20 | register(container: any, key: any, fn: any): void; 21 | } 22 | /** 23 | * Used to allow functions/classes to indicate that they should be registered as singletons with the container. 24 | * 25 | * @class SingletonRegistration 26 | * @constructor 27 | * @param {Object} [key] The key to register as. 28 | */ 29 | export class SingletonRegistration { 30 | registerInChild: any; 31 | key: any; 32 | constructor(keyOrRegisterInChild: any, registerInChild?: boolean); 33 | /** 34 | * Called by the container to register the annotated function/class as a singleton. 35 | * 36 | * @method register 37 | * @param {Container} container The container to register with. 38 | * @param {Object} key The key to register as. 39 | * @param {Object} fn The function to register (target of the annotation). 40 | */ 41 | register(container: any, key: any, fn: any): void; 42 | } 43 | /** 44 | * An abstract resolver used to allow functions/classes to specify custom dependency resolution logic. 45 | * 46 | * @class Resolver 47 | * @constructor 48 | */ 49 | export class Resolver { 50 | /** 51 | * Called by the container to allow custom resolution of dependencies for a function/class. 52 | * 53 | * @method get 54 | * @param {Container} container The container to resolve from. 55 | * @return {Object} Returns the resolved object. 56 | */ 57 | get(container: any): void; 58 | } 59 | /** 60 | * Used to allow functions/classes to specify lazy resolution logic. 61 | * 62 | * @class Lazy 63 | * @constructor 64 | * @extends Resolver 65 | * @param {Object} key The key to lazily resolve. 66 | */ 67 | export class Lazy extends Resolver { 68 | key: any; 69 | constructor(key: any); 70 | /** 71 | * Called by the container to lazily resolve the dependency into a lazy locator function. 72 | * 73 | * @method get 74 | * @param {Container} container The container to resolve from. 75 | * @return {Function} Returns a function which can be invoked at a later time to obtain the actual dependency. 76 | */ 77 | get(container: any): () => any; 78 | /** 79 | * Creates a Lazy Resolver for the supplied key. 80 | * 81 | * @method of 82 | * @static 83 | * @param {Object} key The key to lazily resolve. 84 | * @return {Lazy} Returns an insance of Lazy for the key. 85 | */ 86 | static of(key: any): Lazy; 87 | } 88 | /** 89 | * Used to allow functions/classes to specify resolution of all matches to a key. 90 | * 91 | * @class All 92 | * @constructor 93 | * @extends Resolver 94 | * @param {Object} key The key to lazily resolve all matches for. 95 | */ 96 | export class All extends Resolver { 97 | key: any; 98 | constructor(key: any); 99 | /** 100 | * Called by the container to resolve all matching dependencies as an array of instances. 101 | * 102 | * @method get 103 | * @param {Container} container The container to resolve from. 104 | * @return {Object[]} Returns an array of all matching instances. 105 | */ 106 | get(container: any): any; 107 | /** 108 | * Creates an All Resolver for the supplied key. 109 | * 110 | * @method of 111 | * @static 112 | * @param {Object} key The key to resolve all instances for. 113 | * @return {All} Returns an insance of All for the key. 114 | */ 115 | static of(key: any): All; 116 | } 117 | /** 118 | * Used to allow functions/classes to specify an optional dependency, which will be resolved only if already registred with the container. 119 | * 120 | * @class Optional 121 | * @constructor 122 | * @extends Resolver 123 | * @param {Object} key The key to optionally resolve for. 124 | * @param {Boolean} [checkParent=false] Indicates whether or not the parent container hierarchy should be checked. 125 | */ 126 | export class Optional extends Resolver { 127 | key: any; 128 | checkParent: any; 129 | constructor(key: any, checkParent?: boolean); 130 | /** 131 | * Called by the container to provide optional resolution of the key. 132 | * 133 | * @method get 134 | * @param {Container} container The container to resolve from. 135 | * @return {Object} Returns the instance if found; otherwise null. 136 | */ 137 | get(container: any): any; 138 | /** 139 | * Creates an Optional Resolver for the supplied key. 140 | * 141 | * @method of 142 | * @static 143 | * @param {Object} key The key to optionally resolve for. 144 | * @param {Boolean} [checkParent=false] Indicates whether or not the parent container hierarchy should be checked. 145 | * @return {Optional} Returns an insance of Optional for the key. 146 | */ 147 | static of(key: any, checkParent?: boolean): Optional; 148 | } 149 | /** 150 | * Used to inject the dependency from the parent container instead of the current one. 151 | * 152 | * @class Parent 153 | * @constructor 154 | * @extends Resolver 155 | * @param {Object} key The key to resolve from the parent container. 156 | */ 157 | export class Parent extends Resolver { 158 | key: any; 159 | constructor(key: any); 160 | /** 161 | * Called by the container to load the dependency from the parent container 162 | * 163 | * @method get 164 | * @param {Container} container The container to resolve the parent from. 165 | * @return {Function} Returns the matching instance from the parent container 166 | */ 167 | get(container: any): any; 168 | /** 169 | * Creates a Parent Resolver for the supplied key. 170 | * 171 | * @method of 172 | * @static 173 | * @param {Object} key The key to resolve. 174 | * @return {Parent} Returns an insance of Parent for the key. 175 | */ 176 | static of(key: any): Parent; 177 | } 178 | /** 179 | * Used to instantiate a class. 180 | * 181 | * @class ClassActivator 182 | * @constructor 183 | */ 184 | export class ClassActivator { 185 | static instance: ClassActivator; 186 | invoke(fn: any, args: any): any; 187 | } 188 | /** 189 | * Used to invoke a factory method. 190 | * 191 | * @class FactoryActivator 192 | * @constructor 193 | */ 194 | export class FactoryActivator { 195 | static instance: FactoryActivator; 196 | invoke(fn: any, args: any): any; 197 | } 198 | 199 | } 200 | declare module 'aurelia-dependency-injection/container' { 201 | export var emptyParameters: any[]; 202 | /** 203 | * A lightweight, extensible dependency injection container. 204 | * 205 | * @class Container 206 | * @constructor 207 | */ 208 | export class Container { 209 | constructionInfo: any; 210 | entries: any; 211 | root: any; 212 | locateParameterInfoElsewhere: any; 213 | parent: any; 214 | constructor(constructionInfo?: any); 215 | /** 216 | * Adds an additional location to search for constructor parameter type info. 217 | * 218 | * @method addParameterInfoLocator 219 | * @param {Function} locator Configures a locator function to use when searching for parameter info. It should return undefined if no parameter info is found. 220 | */ 221 | addParameterInfoLocator(locator: any): void; 222 | /** 223 | * Registers an existing object instance with the container. 224 | * 225 | * @method registerInstance 226 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 227 | * @param {Object} instance The instance that will be resolved when the key is matched. 228 | */ 229 | registerInstance(key: any, instance: any): void; 230 | /** 231 | * Registers a type (constructor function) such that the container returns a new instance for each request. 232 | * 233 | * @method registerTransient 234 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 235 | * @param {Function} [fn] The constructor function to use when the dependency needs to be instantiated. 236 | */ 237 | registerTransient(key: any, fn: any): void; 238 | /** 239 | * Registers a type (constructor function) such that the container always returns the same instance for each request. 240 | * 241 | * @method registerSingleton 242 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 243 | * @param {Function} [fn] The constructor function to use when the dependency needs to be instantiated. 244 | */ 245 | registerSingleton(key: any, fn: any): void; 246 | /** 247 | * Registers a type (constructor function) by inspecting its registration annotations. If none are found, then the default singleton registration is used. 248 | * 249 | * @method autoRegister 250 | * @param {Function} fn The constructor function to use when the dependency needs to be instantiated. 251 | * @param {Object} [key] The key that identifies the dependency at resolution time; usually a constructor function. 252 | */ 253 | autoRegister(fn: any, key?: any): void; 254 | /** 255 | * Registers an array of types (constructor functions) by inspecting their registration annotations. If none are found, then the default singleton registration is used. 256 | * 257 | * @method autoRegisterAll 258 | * @param {Function[]} fns The constructor function to use when the dependency needs to be instantiated. 259 | */ 260 | autoRegisterAll(fns: any): void; 261 | /** 262 | * Registers a custom resolution function such that the container calls this function for each request to obtain the instance. 263 | * 264 | * @method registerHandler 265 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 266 | * @param {Function} handler The resolution function to use when the dependency is needed. It will be passed one arguement, the container instance that is invoking it. 267 | */ 268 | registerHandler(key: any, handler: any): void; 269 | /** 270 | * Unregisters based on key. 271 | * 272 | * @method unregister 273 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 274 | */ 275 | unregister(key: any): void; 276 | /** 277 | * Resolves a single instance based on the provided key. 278 | * 279 | * @method get 280 | * @param {Object} key The key that identifies the object to resolve. 281 | * @return {Object} Returns the resolved instance. 282 | */ 283 | get(key: any): any; 284 | /** 285 | * Resolves all instance registered under the provided key. 286 | * 287 | * @method getAll 288 | * @param {Object} key The key that identifies the objects to resolve. 289 | * @return {Object[]} Returns an array of the resolved instances. 290 | */ 291 | getAll(key: any): any; 292 | /** 293 | * Inspects the container to determine if a particular key has been registred. 294 | * 295 | * @method hasHandler 296 | * @param {Object} key The key that identifies the dependency at resolution time; usually a constructor function. 297 | * @param {Boolean} [checkParent=false] Indicates whether or not to check the parent container hierarchy. 298 | * @return {Boolean} Returns true if the key has been registred; false otherwise. 299 | */ 300 | hasHandler(key: any, checkParent?: boolean): any; 301 | /** 302 | * Creates a new dependency injection container whose parent is the current container. 303 | * 304 | * @method createChild 305 | * @return {Container} Returns a new container instance parented to this. 306 | */ 307 | createChild(): Container; 308 | /** 309 | * Invokes a function, recursively resolving its dependencies. 310 | * 311 | * @method invoke 312 | * @param {Function} fn The function to invoke with the auto-resolved dependencies. 313 | * @return {Object} Returns the instance resulting from calling the function. 314 | */ 315 | invoke(fn: any): any; 316 | getOrCreateEntry(key: any): any; 317 | getOrCreateConstructionInfo(fn: any): any; 318 | createConstructionInfo(fn: any): any; 319 | } 320 | 321 | } 322 | declare module 'aurelia-dependency-injection/index' { 323 | export { TransientRegistration, SingletonRegistration, Resolver, Lazy, All, Optional, Parent, ClassActivator, FactoryActivator } from 'aurelia-dependency-injection/metadata'; 324 | export { Container } from 'aurelia-dependency-injection/container'; 325 | export function autoinject(target: any): any; 326 | export function inject(...rest: any[]): (target: any) => void; 327 | export function registration(value: any): (target: any) => void; 328 | export function transient(key: any): (target: any) => void; 329 | export function singleton(keyOrRegisterInChild: any, registerInChild?: boolean): (target: any) => void; 330 | export function instanceActivator(value: any): (target: any) => void; 331 | export function factory(): (target: any) => void; 332 | 333 | } 334 | declare module 'aurelia-dependency-injection' { 335 | export * from 'aurelia-dependency-injection/index'; 336 | } 337 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-templating.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-templating/animator' { 2 | export class Animator { 3 | static instance: any; 4 | static configureDefault(container: any, animatorInstance?: any): void; 5 | move(): Promise; 6 | enter(element: any): Promise; 7 | leave(element: any): Promise; 8 | removeClass(element: any, className: any): Promise; 9 | addClass(element: any, className: any): Promise; 10 | } 11 | 12 | } 13 | declare module 'aurelia-templating/behavior-instance' { 14 | export class BehaviorInstance { 15 | behavior: any; 16 | executionContext: any; 17 | isAttached: any; 18 | boundProperties: any; 19 | view: any; 20 | constructor(behavior: any, executionContext: any, instruction: any); 21 | created(context: any): void; 22 | bind(context: any): void; 23 | unbind(): void; 24 | attached(): void; 25 | detached(): void; 26 | } 27 | 28 | } 29 | declare module 'aurelia-templating/util' { 30 | export function hyphenate(name: any): any; 31 | 32 | } 33 | declare module 'aurelia-templating/bindable-property' { 34 | export class BindableProperty { 35 | name: any; 36 | attribute: any; 37 | defaultBindingMode: any; 38 | owner: any; 39 | changeHandler: any; 40 | hasOptions: any; 41 | isDynamic: any; 42 | defaultValue: any; 43 | constructor(nameOrConfig: any); 44 | registerWith(target: any, behavior: any): void; 45 | defineOn(target: any, behavior: any): void; 46 | createObserver(executionContext: any): any; 47 | initialize(executionContext: any, observerLookup: any, attributes: any, behaviorHandlesBind: any, boundProperties: any): void; 48 | createDynamicProperty(executionContext: any, observerLookup: any, behaviorHandlesBind: any, name: any, attribute: any, boundProperties: any): void; 49 | } 50 | 51 | } 52 | declare module 'aurelia-templating/binding-language' { 53 | export class BindingLanguage { 54 | inspectAttribute(resources: any, attrName: any, attrValue: any): void; 55 | createAttributeInstruction(resources: any, element: any, info: any, existingInstruction: any): void; 56 | parseText(resources: any, value: any): void; 57 | } 58 | 59 | } 60 | declare module 'aurelia-templating/children' { 61 | export class ChildObserver { 62 | selector: any; 63 | changeHandler: any; 64 | property: any; 65 | constructor(property: any, changeHandler: any, selector: any); 66 | createBinding(target: any, behavior: any): ChildObserverBinder; 67 | } 68 | export class ChildObserverBinder { 69 | selector: any; 70 | target: any; 71 | property: any; 72 | behavior: any; 73 | changeHandler: any; 74 | observer: any; 75 | constructor(selector: any, target: any, property: any, behavior: any, changeHandler: any); 76 | bind(source: any): void; 77 | unbind(): void; 78 | onChange(mutations: any): void; 79 | } 80 | 81 | } 82 | declare module 'aurelia-templating/view-strategy' { 83 | export class ViewStrategy { 84 | static metadataKey: string; 85 | makeRelativeTo(baseUrl: any): void; 86 | static normalize(value: any): any; 87 | static getDefault(target: any): any; 88 | } 89 | export class UseViewStrategy extends ViewStrategy { 90 | path: any; 91 | absolutePath: any; 92 | moduleId: any; 93 | constructor(path: any); 94 | loadViewFactory(viewEngine: any, options: any): any; 95 | makeRelativeTo(file: any): void; 96 | } 97 | export class ConventionalViewStrategy extends ViewStrategy { 98 | moduleId: any; 99 | viewUrl: any; 100 | constructor(moduleId: any); 101 | loadViewFactory(viewEngine: any, options: any): any; 102 | static convertModuleIdToViewUrl(moduleId: any): string; 103 | } 104 | export class NoViewStrategy extends ViewStrategy { 105 | loadViewFactory(): Promise; 106 | } 107 | export class TemplateRegistryViewStrategy extends ViewStrategy { 108 | moduleId: any; 109 | registryEntry: any; 110 | constructor(moduleId: any, registryEntry: any); 111 | loadViewFactory(viewEngine: any, options: any): any; 112 | } 113 | 114 | } 115 | declare module 'aurelia-templating/resource-registry' { 116 | export class ResourceRegistry { 117 | attributes: any; 118 | elements: any; 119 | valueConverters: any; 120 | attributeMap: any; 121 | baseResourceUrl: any; 122 | constructor(); 123 | registerElement(tagName: any, behavior: any): void; 124 | getElement(tagName: any): any; 125 | registerAttribute(attribute: any, behavior: any, knownAttribute: any): void; 126 | getAttribute(attribute: any): any; 127 | registerValueConverter(name: any, valueConverter: any): void; 128 | getValueConverter(name: any): any; 129 | } 130 | export class ViewResources extends ResourceRegistry { 131 | parent: any; 132 | viewUrl: any; 133 | valueConverterLookupFunction: any; 134 | constructor(parent: any, viewUrl: any); 135 | relativeToView(path: any): any; 136 | getElement(tagName: any): any; 137 | mapAttribute(attribute: any): any; 138 | getAttribute(attribute: any): any; 139 | getValueConverter(name: any): any; 140 | } 141 | 142 | } 143 | declare module 'aurelia-templating/view' { 144 | export class View { 145 | fragment: any; 146 | behaviors: any; 147 | bindings: any; 148 | children: any; 149 | systemControlled: any; 150 | contentSelectors: any; 151 | firstChild: any; 152 | lastChild: any; 153 | isBound: any; 154 | isAttached: any; 155 | executionContext: any; 156 | owner: any; 157 | constructor(fragment: any, behaviors: any, bindings: any, children: any, systemControlled: any, contentSelectors: any); 158 | created(executionContext: any): void; 159 | bind(executionContext: any, systemUpdate: any): void; 160 | addBinding(binding: any): void; 161 | unbind(): void; 162 | insertNodesBefore(refNode: any): void; 163 | appendNodesTo(parent: any): void; 164 | removeNodes(): void; 165 | attached(): void; 166 | detached(): void; 167 | } 168 | 169 | } 170 | declare module 'aurelia-templating/content-selector' { 171 | export class ContentSelector { 172 | static applySelectors(view: any, contentSelectors: any, callback: any): void; 173 | anchor: any; 174 | selector: any; 175 | all: any; 176 | groups: any; 177 | constructor(anchor: any, selector: any); 178 | copyForViewSlot(): ContentSelector; 179 | matches(node: any): any; 180 | add(group: any): void; 181 | insert(index: any, group: any): void; 182 | removeAt(index: any, fragment: any): void; 183 | } 184 | 185 | } 186 | declare module 'aurelia-templating/view-slot' { 187 | export class ViewSlot { 188 | anchor: any; 189 | viewAddMethod: any; 190 | executionContext: any; 191 | animator: any; 192 | children: any; 193 | isBound: any; 194 | isAttached: any; 195 | contentSelectors: any; 196 | constructor(anchor: any, anchorIsContainer: any, executionContext?: any, animator?: any); 197 | transformChildNodesIntoView(): void; 198 | bind(executionContext: any): void; 199 | unbind(): void; 200 | add(view: any): void; 201 | insert(index: any, view: any): void; 202 | remove(view: any): void; 203 | removeAt(index: any): any; 204 | removeAll(): Promise; 205 | swap(view: any): void; 206 | attached(): void; 207 | detached(): void; 208 | installContentSelectors(contentSelectors: any): void; 209 | contentSelectorAdd(view: any): void; 210 | contentSelectorInsert(index: any, view: any): void; 211 | contentSelectorRemove(view: any): void; 212 | contentSelectorRemoveAt(index: any): any; 213 | contentSelectorRemoveAll(): any; 214 | } 215 | 216 | } 217 | declare module 'aurelia-templating/view-factory' { 218 | export class BoundViewFactory { 219 | parentContainer: any; 220 | viewFactory: any; 221 | executionContext: any; 222 | factoryOptions: any; 223 | constructor(parentContainer: any, viewFactory: any, executionContext: any); 224 | create(executionContext: any): any; 225 | } 226 | export class ViewFactory { 227 | template: any; 228 | instructions: any; 229 | resources: any; 230 | constructor(template: any, instructions: any, resources: any); 231 | create(container: any, executionContext: any, options?: { 232 | systemControlled: boolean; 233 | suppressBind: boolean; 234 | }): any; 235 | } 236 | 237 | } 238 | declare module 'aurelia-templating/view-compiler' { 239 | import { ViewFactory } from 'aurelia-templating/view-factory'; 240 | import { BindingLanguage } from 'aurelia-templating/binding-language'; 241 | export class ViewCompiler { 242 | bindingLanguage: any; 243 | static inject(): typeof BindingLanguage[]; 244 | constructor(bindingLanguage: any); 245 | compile(templateOrFragment: any, resources: any, options?: any): ViewFactory; 246 | compileNode(node: any, resources: any, instructions: any, parentNode: any, parentInjectorId: any, targetLightDOM: any): any; 247 | compileElement(node: any, resources: any, instructions: any, parentNode: any, parentInjectorId: any, targetLightDOM: any): any; 248 | } 249 | 250 | } 251 | declare module 'aurelia-templating/html-behavior' { 252 | export class HtmlBehaviorResource { 253 | elementName: any; 254 | attributeName: any; 255 | liftsContent: any; 256 | targetShadowDOM: any; 257 | skipContentProcessing: any; 258 | usesShadowDOM: any; 259 | childExpression: any; 260 | hasDynamicOptions: any; 261 | properties: any; 262 | attributes: any; 263 | observerLocator: any; 264 | taskQueue: any; 265 | target: any; 266 | handlesCreated: any; 267 | handlesBind: any; 268 | handlesUnbind: any; 269 | handlesAttached: any; 270 | handlesDetached: any; 271 | apiName: any; 272 | viewStrategy: any; 273 | viewFactory: any; 274 | constructor(); 275 | static convention(name: any, existing?: any): any; 276 | analyze(container: any, target: any): void; 277 | load(container: any, target: any, viewStrategy?: any, transientView?: any): any; 278 | register(registry: any, name: any): void; 279 | compile(compiler: any, resources: any, node: any, instruction: any, parentNode: any): any; 280 | create(container: any, instruction?: any, element?: any, bindings?: any): any; 281 | ensurePropertiesDefined(instance: any, lookup: any): void; 282 | } 283 | 284 | } 285 | declare module 'aurelia-templating/module-analyzer' { 286 | export class ModuleAnalyzer { 287 | cache: any; 288 | constructor(); 289 | getAnalysis(moduleId: any): any; 290 | analyze(moduleId: any, moduleInstance: any, viewModelMember: any): any; 291 | } 292 | 293 | } 294 | declare module 'aurelia-templating/view-engine' { 295 | export class ViewEngine { 296 | static inject(): any[]; 297 | loader: any; 298 | container: any; 299 | viewCompiler: any; 300 | moduleAnalyzer: any; 301 | appResources: any; 302 | constructor(loader: any, container: any, viewCompiler: any, moduleAnalyzer: any, appResources: any); 303 | loadViewFactory(urlOrRegistryEntry: any, compileOptions: any, associatedModuleId: any): any; 304 | loadTemplateResources(viewRegistryEntry: any, associatedModuleId: any): any; 305 | importViewModelResource(moduleImport: any, moduleMember: any): any; 306 | importViewResources(moduleIds: any, names: any, resources: any, associatedModuleId: any): any; 307 | } 308 | 309 | } 310 | declare module 'aurelia-templating/composition-engine' { 311 | import { ViewEngine } from 'aurelia-templating/view-engine'; 312 | export class CompositionEngine { 313 | static inject(): typeof ViewEngine[]; 314 | viewEngine: any; 315 | constructor(viewEngine: any); 316 | activate(instruction: any): any; 317 | createBehaviorAndSwap(instruction: any): any; 318 | createBehavior(instruction: any): any; 319 | createViewModel(instruction: any): any; 320 | compose(instruction: any): any; 321 | } 322 | 323 | } 324 | declare module 'aurelia-templating/element-config' { 325 | export class ElementConfigResource { 326 | load(container: any, target: any): Promise; 327 | register(): void; 328 | } 329 | 330 | } 331 | declare module 'aurelia-templating/decorators' { 332 | export function behavior(override: any): (target: any) => void; 333 | export function customElement(name: any): (target: any) => void; 334 | export function customAttribute(name: any): (target: any) => void; 335 | export function templateController(target?: any): any; 336 | export function bindable(nameOrConfigOrTarget: any, key?: any, descriptor?: any): any; 337 | export function dynamicOptions(target?: any): any; 338 | export function syncChildren(property: any, changeHandler: any, selector: any): (target: any) => void; 339 | export function useShadowDOM(target: any): void | ((target: any) => void); 340 | export function skipContentProcessing(target: any): void | ((target: any) => void); 341 | export function viewStrategy(strategy: any): (target: any) => void; 342 | export function useView(path: any): (target: any) => void; 343 | export function noView(target?: any): any; 344 | export function elementConfig(target: any): void | ((target: any) => void); 345 | 346 | } 347 | declare module 'aurelia-templating/index' { 348 | export { HtmlBehaviorResource } from 'aurelia-templating/html-behavior'; 349 | export { BindableProperty } from 'aurelia-templating/bindable-property'; 350 | export { ResourceRegistry, ViewResources } from 'aurelia-templating/resource-registry'; 351 | export { ChildObserver } from 'aurelia-templating/children'; 352 | export { ElementConfigResource } from 'aurelia-templating/element-config'; 353 | export { ViewStrategy, UseViewStrategy, ConventionalViewStrategy, NoViewStrategy } from 'aurelia-templating/view-strategy'; 354 | export { ViewCompiler } from 'aurelia-templating/view-compiler'; 355 | export { ViewEngine } from 'aurelia-templating/view-engine'; 356 | export { ViewFactory, BoundViewFactory } from 'aurelia-templating/view-factory'; 357 | export { ViewSlot } from 'aurelia-templating/view-slot'; 358 | export { BindingLanguage } from 'aurelia-templating/binding-language'; 359 | export { CompositionEngine } from 'aurelia-templating/composition-engine'; 360 | export { Animator } from 'aurelia-templating/animator'; 361 | export * from 'aurelia-templating/decorators'; 362 | 363 | } 364 | declare module 'aurelia-templating' { 365 | export * from 'aurelia-templating/index'; 366 | } 367 | -------------------------------------------------------------------------------- /dts/jasmine.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for Jasmine 2.1 2 | // Project: http://jasmine.github.io/ 3 | // Definitions by: Boris Yankov , Theodore Brown , David Pärsson 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | 7 | // For ddescribe / iit use : https://github.com/borisyankov/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts 8 | 9 | declare function describe(description: string, specDefinitions: () => void): void; 10 | declare function fdescribe(description: string, specDefinitions: () => void): void; 11 | declare function xdescribe(description: string, specDefinitions: () => void): void; 12 | 13 | declare function it(expectation: string, assertion?: () => void): void; 14 | declare function it(expectation: string, assertion?: (done: () => void) => void): void; 15 | declare function fit(expectation: string, assertion?: () => void): void; 16 | declare function fit(expectation: string, assertion?: (done: () => void) => void): void; 17 | declare function xit(expectation: string, assertion?: () => void): void; 18 | declare function xit(expectation: string, assertion?: (done: () => void) => void): void; 19 | 20 | /** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */ 21 | declare function pending(): void; 22 | 23 | declare function beforeEach(action: () => void): void; 24 | declare function beforeEach(action: (done: () => void) => void): void; 25 | declare function afterEach(action: () => void): void; 26 | declare function afterEach(action: (done: () => void) => void): void; 27 | 28 | declare function beforeAll(action: () => void): void; 29 | declare function beforeAll(action: (done: () => void) => void): void; 30 | declare function afterAll(action: () => void): void; 31 | declare function afterAll(action: (done: () => void) => void): void; 32 | 33 | declare function expect(spy: Function): jasmine.Matchers; 34 | declare function expect(actual: any): jasmine.Matchers; 35 | 36 | declare function fail(e?: any): void; 37 | 38 | declare function spyOn(object: any, method: string): jasmine.Spy; 39 | 40 | declare function runs(asyncMethod: Function): void; 41 | declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void; 42 | declare function waits(timeout?: number): void; 43 | 44 | declare module jasmine { 45 | 46 | var clock: () => Clock; 47 | 48 | function any(aclass: any): Any; 49 | function objectContaining(sample: any): ObjectContaining; 50 | function createSpy(name: string, originalFn?: Function): Spy; 51 | function createSpyObj(baseName: string, methodNames: any[]): any; 52 | function createSpyObj(baseName: string, methodNames: any[]): T; 53 | function pp(value: any): string; 54 | function getEnv(): Env; 55 | function addMatchers(matchers: any): Any; 56 | function getGlobal(): { confirm: Function }; 57 | 58 | interface Any { 59 | 60 | new (expectedClass: any): any; 61 | 62 | jasmineMatches(other: any): boolean; 63 | jasmineToString(): string; 64 | } 65 | 66 | interface ObjectContaining { 67 | new (sample: any): any; 68 | 69 | jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; 70 | jasmineToString(): string; 71 | } 72 | 73 | interface Block { 74 | 75 | new (env: Env, func: SpecFunction, spec: Spec): any; 76 | 77 | execute(onComplete: () => void): void; 78 | } 79 | 80 | interface WaitsBlock extends Block { 81 | new (env: Env, timeout: number, spec: Spec): any; 82 | } 83 | 84 | interface WaitsForBlock extends Block { 85 | new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any; 86 | } 87 | 88 | interface Clock { 89 | install(): void; 90 | uninstall(): void; 91 | /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */ 92 | tick(ms: number): void; 93 | } 94 | 95 | interface Env { 96 | setTimeout: any; 97 | clearTimeout: void; 98 | setInterval: any; 99 | clearInterval: void; 100 | updateInterval: number; 101 | 102 | currentSpec: Spec; 103 | 104 | matchersClass: Matchers; 105 | 106 | version(): any; 107 | versionString(): string; 108 | nextSpecId(): number; 109 | addReporter(reporter: Reporter): void; 110 | execute(): void; 111 | describe(description: string, specDefinitions: () => void): Suite; 112 | // ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these 113 | beforeEach(beforeEachFunction: () => void): void; 114 | beforeAll(beforeAllFunction: () => void): void; 115 | currentRunner(): Runner; 116 | afterEach(afterEachFunction: () => void): void; 117 | afterAll(afterAllFunction: () => void): void; 118 | xdescribe(desc: string, specDefinitions: () => void): XSuite; 119 | it(description: string, func: () => void): Spec; 120 | // iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these 121 | xit(desc: string, func: () => void): XSpec; 122 | compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean; 123 | compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean; 124 | equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean; 125 | contains_(haystack: any, needle: any): boolean; 126 | addEqualityTester(equalityTester: (a: any, b: any, env: Env, mismatchKeys: string[], mismatchValues: string[]) => boolean): void; 127 | specFilter(spec: Spec): boolean; 128 | } 129 | 130 | interface FakeTimer { 131 | 132 | new (): any; 133 | 134 | reset(): void; 135 | tick(millis: number): void; 136 | runFunctionsWithinRange(oldMillis: number, nowMillis: number): void; 137 | scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void; 138 | } 139 | 140 | interface HtmlReporter { 141 | new (): any; 142 | } 143 | 144 | interface HtmlSpecFilter { 145 | new (): any; 146 | } 147 | 148 | interface Result { 149 | type: string; 150 | } 151 | 152 | interface NestedResults extends Result { 153 | description: string; 154 | 155 | totalCount: number; 156 | passedCount: number; 157 | failedCount: number; 158 | 159 | skipped: boolean; 160 | 161 | rollupCounts(result: NestedResults): void; 162 | log(values: any): void; 163 | getItems(): Result[]; 164 | addResult(result: Result): void; 165 | passed(): boolean; 166 | } 167 | 168 | interface MessageResult extends Result { 169 | values: any; 170 | trace: Trace; 171 | } 172 | 173 | interface ExpectationResult extends Result { 174 | matcherName: string; 175 | passed(): boolean; 176 | expected: any; 177 | actual: any; 178 | message: string; 179 | trace: Trace; 180 | } 181 | 182 | interface Trace { 183 | name: string; 184 | message: string; 185 | stack: any; 186 | } 187 | 188 | interface PrettyPrinter { 189 | 190 | new (): any; 191 | 192 | format(value: any): void; 193 | iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void; 194 | emitScalar(value: any): void; 195 | emitString(value: string): void; 196 | emitArray(array: any[]): void; 197 | emitObject(obj: any): void; 198 | append(value: any): void; 199 | } 200 | 201 | interface StringPrettyPrinter extends PrettyPrinter { 202 | } 203 | 204 | interface Queue { 205 | 206 | new (env: any): any; 207 | 208 | env: Env; 209 | ensured: boolean[]; 210 | blocks: Block[]; 211 | running: boolean; 212 | index: number; 213 | offset: number; 214 | abort: boolean; 215 | 216 | addBefore(block: Block, ensure?: boolean): void; 217 | add(block: any, ensure?: boolean): void; 218 | insertNext(block: any, ensure?: boolean): void; 219 | start(onComplete?: () => void): void; 220 | isRunning(): boolean; 221 | next_(): void; 222 | results(): NestedResults; 223 | } 224 | 225 | interface Matchers { 226 | 227 | new (env: Env, actual: any, spec: Env, isNot?: boolean): any; 228 | 229 | env: Env; 230 | actual: any; 231 | spec: Env; 232 | isNot?: boolean; 233 | message(): any; 234 | 235 | toBe(expected: any): boolean; 236 | toEqual(expected: any): boolean; 237 | toMatch(expected: any): boolean; 238 | toBeDefined(): boolean; 239 | toBeUndefined(): boolean; 240 | toBeNull(): boolean; 241 | toBeNaN(): boolean; 242 | toBeTruthy(): boolean; 243 | toBeFalsy(): boolean; 244 | toHaveBeenCalled(): boolean; 245 | toHaveBeenCalledWith(...params: any[]): boolean; 246 | toContain(expected: any): boolean; 247 | toBeLessThan(expected: any): boolean; 248 | toBeGreaterThan(expected: any): boolean; 249 | toBeCloseTo(expected: any, precision: any): boolean; 250 | toContainHtml(expected: string): boolean; 251 | toContainText(expected: string): boolean; 252 | toThrow(expected?: any): boolean; 253 | toThrowError(expected?: any): boolean; 254 | not: Matchers; 255 | 256 | Any: Any; 257 | } 258 | 259 | interface Reporter { 260 | reportRunnerStarting(runner: Runner): void; 261 | reportRunnerResults(runner: Runner): void; 262 | reportSuiteResults(suite: Suite): void; 263 | reportSpecStarting(spec: Spec): void; 264 | reportSpecResults(spec: Spec): void; 265 | log(str: string): void; 266 | } 267 | 268 | interface MultiReporter extends Reporter { 269 | addReporter(reporter: Reporter): void; 270 | } 271 | 272 | interface Runner { 273 | 274 | new (env: Env): any; 275 | 276 | execute(): void; 277 | beforeEach(beforeEachFunction: SpecFunction): void; 278 | afterEach(afterEachFunction: SpecFunction): void; 279 | beforeAll(beforeAllFunction: SpecFunction): void; 280 | afterAll(afterAllFunction: SpecFunction): void; 281 | finishCallback(): void; 282 | addSuite(suite: Suite): void; 283 | add(block: Block): void; 284 | specs(): Spec[]; 285 | suites(): Suite[]; 286 | topLevelSuites(): Suite[]; 287 | results(): NestedResults; 288 | } 289 | 290 | interface SpecFunction { 291 | (spec?: Spec): void; 292 | } 293 | 294 | interface SuiteOrSpec { 295 | id: number; 296 | env: Env; 297 | description: string; 298 | queue: Queue; 299 | } 300 | 301 | interface Spec extends SuiteOrSpec { 302 | 303 | new (env: Env, suite: Suite, description: string): any; 304 | 305 | suite: Suite; 306 | 307 | afterCallbacks: SpecFunction[]; 308 | spies_: Spy[]; 309 | 310 | results_: NestedResults; 311 | matchersClass: Matchers; 312 | 313 | getFullName(): string; 314 | results(): NestedResults; 315 | log(arguments: any): any; 316 | runs(func: SpecFunction): Spec; 317 | addToQueue(block: Block): void; 318 | addMatcherResult(result: Result): void; 319 | expect(actual: any): any; 320 | waits(timeout: number): Spec; 321 | waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec; 322 | fail(e?: any): void; 323 | getMatchersClass_(): Matchers; 324 | addMatchers(matchersPrototype: any): void; 325 | finishCallback(): void; 326 | finish(onComplete?: () => void): void; 327 | after(doAfter: SpecFunction): void; 328 | execute(onComplete?: () => void): any; 329 | addBeforesAndAftersToQueue(): void; 330 | explodes(): void; 331 | spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; 332 | removeAllSpies(): void; 333 | } 334 | 335 | interface XSpec { 336 | id: number; 337 | runs(): void; 338 | } 339 | 340 | interface Suite extends SuiteOrSpec { 341 | 342 | new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any; 343 | 344 | parentSuite: Suite; 345 | 346 | getFullName(): string; 347 | finish(onComplete?: () => void): void; 348 | beforeEach(beforeEachFunction: SpecFunction): void; 349 | afterEach(afterEachFunction: SpecFunction): void; 350 | beforeAll(beforeAllFunction: SpecFunction): void; 351 | afterAll(afterAllFunction: SpecFunction): void; 352 | results(): NestedResults; 353 | add(suiteOrSpec: SuiteOrSpec): void; 354 | specs(): Spec[]; 355 | suites(): Suite[]; 356 | children(): any[]; 357 | execute(onComplete?: () => void): void; 358 | } 359 | 360 | interface XSuite { 361 | execute(): void; 362 | } 363 | 364 | interface Spy { 365 | (...params: any[]): any; 366 | 367 | identity: string; 368 | and: SpyAnd; 369 | calls: Calls; 370 | mostRecentCall: { args: any[]; }; 371 | argsForCall: any[]; 372 | wasCalled: boolean; 373 | callCount: number; 374 | } 375 | 376 | interface SpyAnd { 377 | /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */ 378 | callThrough(): Spy; 379 | /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */ 380 | returnValue(val: any): void; 381 | /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ 382 | callFake(fn: Function): Spy; 383 | /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ 384 | throwError(msg: string): void; 385 | /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ 386 | stub(): Spy; 387 | } 388 | 389 | interface Calls { 390 | /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/ 391 | any(): boolean; 392 | /** By chaining the spy with calls.count(), will return the number of times the spy was called **/ 393 | count(): number; 394 | /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/ 395 | argsFor(index: number): any[]; 396 | /** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/ 397 | allArgs(): any[]; 398 | /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/ 399 | all(): any; 400 | /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/ 401 | mostRecent(): any; 402 | /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/ 403 | first(): any; 404 | /** By chaining the spy with calls.reset(), will clears all tracking for a spy **/ 405 | reset(): void; 406 | } 407 | 408 | interface Util { 409 | inherit(childClass: Function, parentClass: Function): any; 410 | formatException(e: any): any; 411 | htmlEscape(str: string): string; 412 | argsToArray(args: any): any; 413 | extend(destination: any, source: any): any; 414 | } 415 | 416 | interface JsApiReporter extends Reporter { 417 | 418 | started: boolean; 419 | finished: boolean; 420 | result: any; 421 | messages: any; 422 | 423 | new (): any; 424 | 425 | suites(): Suite[]; 426 | summarize_(suiteOrSpec: SuiteOrSpec): any; 427 | results(): any; 428 | resultsForSpec(specId: any): any; 429 | log(str: any): any; 430 | resultsForSpecs(specIds: any): any; 431 | summarizeResult_(result: any): any; 432 | } 433 | 434 | interface Jasmine { 435 | Spec: Spec; 436 | clock: Clock; 437 | util: Util; 438 | } 439 | 440 | export var HtmlReporter: HtmlReporter; 441 | export var HtmlSpecFilter: HtmlSpecFilter; 442 | export var DEFAULT_TIMEOUT_INTERVAL: number; 443 | } 444 | -------------------------------------------------------------------------------- /dts/aurelia/aurelia-binding.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'aurelia-binding/access-keyed-observer' { 2 | export class AccessKeyedObserver { 3 | objectInfo: any; 4 | keyInfo: any; 5 | evaluate: any; 6 | observerLocator: any; 7 | disposeKey: any; 8 | disposeObject: any; 9 | disposeProperty: any; 10 | callback: any; 11 | constructor(objectInfo: any, keyInfo: any, observerLocator: any, evaluate: any); 12 | updatePropertySubscription(object: any, key: any): void; 13 | objectOrKeyChanged(object: any, key?: any): void; 14 | subscribe(callback: any): () => void; 15 | notify(): void; 16 | dispose(): void; 17 | } 18 | 19 | } 20 | declare module 'aurelia-binding/array-change-records' { 21 | export function calcSplices(current: any, currentStart: any, currentEnd: any, old: any, oldStart: any, oldEnd: any): any; 22 | export function projectArraySplices(array: any, changeRecords: any): any[]; 23 | 24 | } 25 | declare module 'aurelia-binding/environment' { 26 | export var hasObjectObserve: boolean; 27 | export var hasArrayObserve: boolean; 28 | 29 | } 30 | declare module 'aurelia-binding/map-change-records' { 31 | export function getChangeRecords(map: any): any[]; 32 | 33 | } 34 | declare module 'aurelia-binding/collection-observation' { 35 | export class ModifyCollectionObserver { 36 | taskQueue: any; 37 | queued: any; 38 | callbacks: any; 39 | changeRecords: any; 40 | oldCollection: any; 41 | collection: any; 42 | lengthPropertyName: any; 43 | lengthObserver: any; 44 | array: any; 45 | constructor(taskQueue: any, collection: any); 46 | subscribe(callback: any): () => void; 47 | addChangeRecord(changeRecord: any): void; 48 | reset(oldCollection: any): void; 49 | getLengthObserver(): any; 50 | call(): void; 51 | } 52 | export class CollectionLengthObserver { 53 | collection: any; 54 | callbacks: any; 55 | lengthPropertyName: any; 56 | currentValue: any; 57 | constructor(collection: any); 58 | getValue(): any; 59 | setValue(newValue: any): void; 60 | subscribe(callback: any): () => void; 61 | call(newValue: any): void; 62 | } 63 | 64 | } 65 | declare module 'aurelia-binding/array-observation' { 66 | export function getArrayObserver(taskQueue: any, array: any): any; 67 | 68 | } 69 | declare module 'aurelia-binding/path-observer' { 70 | export class PathObserver { 71 | leftObserver: any; 72 | disposeLeft: any; 73 | rightObserver: any; 74 | disposeRight: any; 75 | callback: any; 76 | constructor(leftObserver: any, getRightObserver: any, value: any); 77 | updateRight(observer: any): any; 78 | subscribe(callback: any): () => void; 79 | notify(newValue: any): void; 80 | dispose(): void; 81 | } 82 | 83 | } 84 | declare module 'aurelia-binding/composite-observer' { 85 | export class CompositeObserver { 86 | subscriptions: any; 87 | evaluate: any; 88 | callback: any; 89 | constructor(observers: any, evaluate: any); 90 | subscribe(callback: any): () => void; 91 | notify(newValue: any): void; 92 | dispose(): void; 93 | } 94 | 95 | } 96 | declare module 'aurelia-binding/ast' { 97 | import { AccessKeyedObserver } from 'aurelia-binding/access-keyed-observer'; 98 | export class Expression { 99 | isChain: any; 100 | isAssignable: any; 101 | constructor(); 102 | evaluate(): void; 103 | assign(): void; 104 | toString(): string; 105 | } 106 | export class Chain extends Expression { 107 | expressions: any; 108 | constructor(expressions: any); 109 | evaluate(scope?: any, valueConverters?: any): any; 110 | accept(visitor: any): void; 111 | } 112 | export class ValueConverter extends Expression { 113 | expression: any; 114 | name: any; 115 | args: any; 116 | allArgs: any; 117 | constructor(expression: any, name: any, args: any, allArgs: any); 118 | evaluate(scope?: any, valueConverters?: any): any; 119 | assign(scope?: any, value?: any, valueConverters?: any): any; 120 | accept(visitor: any): void; 121 | connect(binding: any, scope: any): { 122 | value: any; 123 | observer: any; 124 | }; 125 | } 126 | export class Assign extends Expression { 127 | target: any; 128 | value: any; 129 | constructor(target: any, value: any); 130 | evaluate(scope?: any, valueConverters?: any): any; 131 | accept(vistor: any): void; 132 | connect(binding: any, scope: any): { 133 | value: any; 134 | }; 135 | } 136 | export class Conditional extends Expression { 137 | condition: any; 138 | yes: any; 139 | no: any; 140 | constructor(condition: any, yes: any, no: any); 141 | evaluate(scope?: any, valueConverters?: any): any; 142 | accept(visitor: any): void; 143 | connect(binding: any, scope: any): { 144 | value: any; 145 | observer: any; 146 | }; 147 | } 148 | export class AccessScope extends Expression { 149 | name: any; 150 | isAssignable: any; 151 | constructor(name: any); 152 | evaluate(scope?: any, valueConverters?: any): any; 153 | assign(scope?: any, value?: any): any; 154 | accept(visitor: any): void; 155 | connect(binding: any, scope: any): { 156 | value: any; 157 | observer: any; 158 | }; 159 | } 160 | export class AccessMember extends Expression { 161 | object: any; 162 | name: any; 163 | isAssignable: any; 164 | constructor(object: any, name: any); 165 | evaluate(scope?: any, valueConverters?: any): any; 166 | assign(scope?: any, value?: any): any; 167 | accept(visitor: any): void; 168 | connect(binding: any, scope: any): { 169 | value: any; 170 | observer: any; 171 | }; 172 | } 173 | export class AccessKeyed extends Expression { 174 | object: any; 175 | key: any; 176 | isAssignable: any; 177 | constructor(object: any, key: any); 178 | evaluate(scope?: any, valueConverters?: any): any; 179 | assign(scope?: any, value?: any): any; 180 | accept(visitor: any): void; 181 | connect(binding: any, scope: any): { 182 | value: any; 183 | observer: AccessKeyedObserver; 184 | }; 185 | } 186 | export class CallScope extends Expression { 187 | name: any; 188 | args: any; 189 | constructor(name: any, args: any); 190 | evaluate(scope?: any, valueConverters?: any, args?: any): any; 191 | accept(visitor: any): void; 192 | connect(binding: any, scope: any): { 193 | value: any; 194 | observer: any; 195 | }; 196 | } 197 | export class CallMember extends Expression { 198 | object: any; 199 | name: any; 200 | args: any; 201 | constructor(object: any, name: any, args: any); 202 | evaluate(scope?: any, valueConverters?: any, args?: any): any; 203 | accept(visitor: any): void; 204 | connect(binding: any, scope: any): { 205 | value: any; 206 | observer: any; 207 | }; 208 | } 209 | export class CallFunction extends Expression { 210 | func: any; 211 | args: any; 212 | constructor(func: any, args: any); 213 | evaluate(scope?: any, valueConverters?: any, args?: any): any; 214 | accept(visitor: any): void; 215 | connect(binding: any, scope: any): { 216 | value: any; 217 | observer: any; 218 | }; 219 | } 220 | export class Binary extends Expression { 221 | operation: any; 222 | left: any; 223 | right: any; 224 | constructor(operation: any, left: any, right: any); 225 | evaluate(scope?: any, valueConverters?: any): any; 226 | accept(visitor: any): void; 227 | connect(binding: any, scope: any): { 228 | value: any; 229 | observer: any; 230 | }; 231 | } 232 | export class PrefixNot extends Expression { 233 | operation: any; 234 | expression: any; 235 | constructor(operation: any, expression: any); 236 | evaluate(scope?: any, valueConverters?: any): boolean; 237 | accept(visitor: any): void; 238 | connect(binding: any, scope: any): { 239 | value: boolean; 240 | observer: any; 241 | }; 242 | } 243 | export class LiteralPrimitive extends Expression { 244 | value: any; 245 | constructor(value: any); 246 | evaluate(scope?: any, valueConverters?: any): any; 247 | accept(visitor: any): void; 248 | connect(binding: any, scope: any): { 249 | value: any; 250 | }; 251 | } 252 | export class LiteralString extends Expression { 253 | value: any; 254 | constructor(value: any); 255 | evaluate(scope?: any, valueConverters?: any): any; 256 | accept(visitor: any): void; 257 | connect(binding: any, scope: any): { 258 | value: any; 259 | }; 260 | } 261 | export class LiteralArray extends Expression { 262 | elements: any; 263 | constructor(elements: any); 264 | evaluate(scope?: any, valueConverters?: any): any[]; 265 | accept(visitor: any): void; 266 | connect(binding: any, scope: any): { 267 | value: any[]; 268 | observer: any; 269 | }; 270 | } 271 | export class LiteralObject extends Expression { 272 | keys: any; 273 | values: any; 274 | constructor(keys: any, values: any); 275 | evaluate(scope?: any, valueConverters?: any): {}; 276 | accept(visitor: any): void; 277 | connect(binding: any, scope: any): { 278 | value: {}; 279 | observer: any; 280 | }; 281 | } 282 | export class Unparser { 283 | buffer: any; 284 | constructor(buffer: any); 285 | static unparse(expression: any): string; 286 | write(text: any): void; 287 | writeArgs(args: any): void; 288 | visitChain(chain: any): void; 289 | visitValueConverter(converter: any): void; 290 | visitAssign(assign: any): void; 291 | visitConditional(conditional: any): void; 292 | visitAccessScope(access: any): void; 293 | visitAccessMember(access: any): void; 294 | visitAccessKeyed(access: any): void; 295 | visitCallScope(call: any): void; 296 | visitCallFunction(call: any): void; 297 | visitCallMember(call: any): void; 298 | visitPrefix(prefix: any): void; 299 | visitBinary(binary: any): void; 300 | visitLiteralPrimitive(literal: any): void; 301 | visitLiteralArray(literal: any): void; 302 | visitLiteralObject(literal: any): void; 303 | visitLiteralString(literal: any): void; 304 | } 305 | 306 | } 307 | declare module 'aurelia-binding/binding-modes' { 308 | export const bindingMode: { 309 | oneTime: number; 310 | oneWay: number; 311 | twoWay: number; 312 | }; 313 | 314 | } 315 | declare module 'aurelia-binding/binding-expression' { 316 | export class BindingExpression { 317 | observerLocator: any; 318 | targetProperty: any; 319 | sourceExpression: any; 320 | mode: any; 321 | valueConverterLookupFunction: any; 322 | attribute: any; 323 | discrete: any; 324 | constructor(observerLocator: any, targetProperty: any, sourceExpression: any, mode: any, valueConverterLookupFunction: any, attribute?: any); 325 | createBinding(target: any): any; 326 | } 327 | 328 | } 329 | declare module 'aurelia-binding/call-expression' { 330 | export class CallExpression { 331 | observerLocator: any; 332 | targetProperty: any; 333 | sourceExpression: any; 334 | valueConverterLookupFunction: any; 335 | constructor(observerLocator: any, targetProperty: any, sourceExpression: any, valueConverterLookupFunction: any); 336 | createBinding(target: any): any; 337 | } 338 | 339 | } 340 | declare module 'aurelia-binding/computed-observation' { 341 | export class ComputedPropertyObserver { 342 | obj: any; 343 | propertyName: any; 344 | descriptor: any; 345 | observerLocator: any; 346 | callbacks: any; 347 | oldValue: any; 348 | subscriptions: any; 349 | constructor(obj: any, propertyName: any, descriptor: any, observerLocator: any); 350 | getValue(): any; 351 | setValue(newValue: any): void; 352 | trigger(newValue: any, oldValue: any): void; 353 | evaluate(): void; 354 | subscribe(callback: any): () => void; 355 | } 356 | export function hasDeclaredDependencies(descriptor: any): any; 357 | export function declarePropertyDependencies(ctor: any, propertyName: any, dependencies: any): void; 358 | 359 | } 360 | declare module 'aurelia-binding/dirty-checking' { 361 | export class DirtyChecker { 362 | tracked: any; 363 | checkDelay: any; 364 | constructor(); 365 | addProperty(property: any): void; 366 | removeProperty(property: any): void; 367 | scheduleDirtyCheck(): void; 368 | check(): void; 369 | } 370 | export class DirtyCheckProperty { 371 | dirtyChecker: any; 372 | obj: any; 373 | propertyName: any; 374 | callbacks: any; 375 | isSVG: any; 376 | oldValue: any; 377 | tracking: any; 378 | newValue: any; 379 | constructor(dirtyChecker: any, obj: any, propertyName: any); 380 | getValue(): any; 381 | setValue(newValue: any): void; 382 | call(): void; 383 | isDirty(): boolean; 384 | beginTracking(): void; 385 | endTracking(): void; 386 | subscribe(callback: any): () => void; 387 | } 388 | 389 | } 390 | declare module 'aurelia-binding/element-observation' { 391 | export class XLinkAttributeObserver { 392 | element: any; 393 | propertyName: any; 394 | attributeName: any; 395 | constructor(element: any, propertyName: any, attributeName: any); 396 | getValue(): any; 397 | setValue(newValue: any): any; 398 | subscribe(callback: any): void; 399 | } 400 | export class DataAttributeObserver { 401 | element: any; 402 | propertyName: any; 403 | constructor(element: any, propertyName: any); 404 | getValue(): any; 405 | setValue(newValue: any): any; 406 | subscribe(callback: any): void; 407 | } 408 | export class StyleObserver { 409 | element: any; 410 | propertyName: any; 411 | constructor(element: any, propertyName: any); 412 | getValue(): any; 413 | setValue(newValue: any): void; 414 | subscribe(callback: any): void; 415 | flattenCss(object: any): string; 416 | } 417 | export class ValueAttributeObserver { 418 | element: any; 419 | propertyName: any; 420 | handler: any; 421 | callbacks: any; 422 | oldValue: any; 423 | disposeHandler: any; 424 | constructor(element: any, propertyName: any, handler: any); 425 | getValue(): any; 426 | setValue(newValue: any): void; 427 | call(): void; 428 | subscribe(callback: any): any; 429 | unsubscribe(callback: any): void; 430 | } 431 | export class SelectValueObserver { 432 | element: any; 433 | handler: any; 434 | observerLocator: any; 435 | value: any; 436 | arraySubscription: any; 437 | initialSync: any; 438 | oldValue: any; 439 | callbacks: any; 440 | disposeHandler: any; 441 | domObserver: any; 442 | constructor(element: any, handler: any, observerLocator: any); 443 | getValue(): any; 444 | setValue(newValue: any): void; 445 | synchronizeOptions(): void; 446 | synchronizeValue(): void; 447 | call(): void; 448 | subscribe(callback: any): any; 449 | unsubscribe(callback: any): void; 450 | bind(): void; 451 | unbind(): void; 452 | } 453 | export class CheckedObserver { 454 | element: any; 455 | handler: any; 456 | observerLocator: any; 457 | value: any; 458 | arraySubscription: any; 459 | initialSync: any; 460 | oldValue: any; 461 | callbacks: any; 462 | disposeHandler: any; 463 | constructor(element: any, handler: any, observerLocator: any); 464 | getValue(): any; 465 | setValue(newValue: any): void; 466 | synchronizeElement(): void; 467 | synchronizeValue(): void; 468 | call(): void; 469 | subscribe(callback: any): any; 470 | unsubscribe(callback: any): void; 471 | unbind(): void; 472 | } 473 | 474 | } 475 | declare module 'aurelia-binding/event-manager' { 476 | export class EventManager { 477 | elementHandlerLookup: any; 478 | eventStrategyLookup: any; 479 | defaultEventStrategy: any; 480 | constructor(); 481 | registerElementConfig(config: any): void; 482 | registerElementPropertyConfig(tagName: any, propertyName: any, events: any): void; 483 | registerElementHandler(tagName: any, handler: any): void; 484 | registerEventStrategy(eventName: any, strategy: any): void; 485 | getElementHandler(target: any, propertyName: any): any; 486 | addEventListener(target: any, targetEvent: any, callback: any, delegate: any): any; 487 | } 488 | 489 | } 490 | declare module 'aurelia-binding/value-converter' { 491 | export class ValueConverterResource { 492 | name: any; 493 | instance: any; 494 | constructor(name?: any); 495 | static convention(name: any): ValueConverterResource; 496 | analyze(container: any, target: any): void; 497 | register(registry: any, name: any): void; 498 | load(container: any, target: any): Promise; 499 | } 500 | 501 | } 502 | declare module 'aurelia-binding/property-observation' { 503 | export class SetterObserver { 504 | taskQueue: any; 505 | obj: any; 506 | propertyName: any; 507 | callbacks: any; 508 | queued: any; 509 | observing: any; 510 | currentValue: any; 511 | oldValue: any; 512 | constructor(taskQueue: any, obj: any, propertyName: any); 513 | getValue(): any; 514 | setValue(newValue: any): void; 515 | getterValue(): any; 516 | setterValue(newValue: any): void; 517 | call(): void; 518 | subscribe(callback: any): () => void; 519 | convertProperty(): void; 520 | } 521 | export class OoObjectObserver { 522 | obj: any; 523 | observers: any; 524 | observerLocator: any; 525 | observing: any; 526 | constructor(obj: any, observerLocator: any); 527 | subscribe(propertyObserver: any, callback: any): () => void; 528 | getObserver(propertyName: any, descriptor: any): any; 529 | handleChanges(changeRecords: any): void; 530 | } 531 | export class OoPropertyObserver { 532 | owner: any; 533 | obj: any; 534 | propertyName: any; 535 | callbacks: any; 536 | constructor(owner: any, obj: any, propertyName: any); 537 | getValue(): any; 538 | setValue(newValue: any): void; 539 | trigger(newValue: any, oldValue: any): void; 540 | subscribe(callback: any): any; 541 | } 542 | export class UndefinedPropertyObserver { 543 | owner: any; 544 | obj: any; 545 | propertyName: any; 546 | callbackMap: any; 547 | callbacks: any; 548 | actual: any; 549 | subscription: any; 550 | constructor(owner: any, obj: any, propertyName: any); 551 | getValue(): any; 552 | setValue(newValue: any): void; 553 | trigger(newValue: any, oldValue: any): void; 554 | getObserver(): void; 555 | subscribe(callback: any): any; 556 | } 557 | 558 | } 559 | declare module 'aurelia-binding/observer-locator' { 560 | export class ObserverLocator { 561 | taskQueue: any; 562 | eventManager: any; 563 | dirtyChecker: any; 564 | observationAdapters: any; 565 | static inject(): any[]; 566 | constructor(taskQueue: any, eventManager: any, dirtyChecker: any, observationAdapters: any); 567 | getObserversLookup(obj: any): any; 568 | getObserver(obj: any, propertyName: any): any; 569 | getObservationAdapter(obj: any, propertyName: any, descriptor: any): any; 570 | createPropertyObserver(obj: any, propertyName: any): any; 571 | getArrayObserver(array: any): any; 572 | getMapObserver(map: any): any; 573 | } 574 | export class ObjectObservationAdapter { 575 | handlesProperty(object: any, propertyName: any, descriptor: any): void; 576 | getObserver(object: any, propertyName: any, descriptor: any): void; 577 | } 578 | 579 | } 580 | declare module 'aurelia-binding/lexer' { 581 | export class Token { 582 | index: any; 583 | text: any; 584 | opKey: any; 585 | key: any; 586 | value: any; 587 | constructor(index: any, text: any); 588 | withOp(op: any): Token; 589 | withGetterSetter(key: any): Token; 590 | withValue(value: any): Token; 591 | toString(): string; 592 | } 593 | export class Lexer { 594 | lex(text: any): any[]; 595 | } 596 | export class Scanner { 597 | input: any; 598 | length: any; 599 | peek: any; 600 | index: any; 601 | constructor(input: any); 602 | scanToken(): any; 603 | scanCharacter(start: any, text: any): Token; 604 | scanOperator(start: any, text: any): Token; 605 | scanComplexOperator(start: any, code: any, one: any, two: any): Token; 606 | scanIdentifier(): Token; 607 | scanNumber(start: any): Token; 608 | scanString(): Token; 609 | advance(): void; 610 | error(message: any, offset?: number): void; 611 | } 612 | 613 | } 614 | declare module 'aurelia-binding/parser' { 615 | import { AccessScope, LiteralObject } from 'aurelia-binding/ast'; 616 | export class Parser { 617 | cache: any; 618 | lexer: any; 619 | constructor(); 620 | parse(input: any): any; 621 | } 622 | export class ParserImplementation { 623 | index: any; 624 | input: any; 625 | tokens: any; 626 | constructor(lexer: any, input: any); 627 | peek: any; 628 | parseChain(): any; 629 | parseValueConverter(): any; 630 | parseExpression(): any; 631 | parseConditional(): any; 632 | parseLogicalOr(): any; 633 | parseLogicalAnd(): any; 634 | parseEquality(): any; 635 | parseRelational(): any; 636 | parseAdditive(): any; 637 | parseMultiplicative(): any; 638 | parsePrefix(): any; 639 | parseAccessOrCallMember(): any; 640 | parsePrimary(): any; 641 | parseAccessOrCallScope(): AccessScope; 642 | parseObject(): LiteralObject; 643 | parseExpressionList(terminator: any): any[]; 644 | optional(text: any): boolean; 645 | expect(text: any): void; 646 | advance(): void; 647 | error(message: any): void; 648 | } 649 | 650 | } 651 | declare module 'aurelia-binding/listener-expression' { 652 | export class ListenerExpression { 653 | eventManager: any; 654 | targetEvent: any; 655 | sourceExpression: any; 656 | delegate: any; 657 | discrete: any; 658 | preventDefault: any; 659 | constructor(eventManager: any, targetEvent: any, sourceExpression: any, delegate: any, preventDefault: any); 660 | createBinding(target: any): any; 661 | } 662 | 663 | } 664 | declare module 'aurelia-binding/name-expression' { 665 | export class NameExpression { 666 | property: any; 667 | discrete: any; 668 | mode: any; 669 | constructor(name: any, mode: any); 670 | createBinding(target: any): any; 671 | } 672 | 673 | } 674 | declare module 'aurelia-binding/index' { 675 | export { EventManager } from 'aurelia-binding/event-manager'; 676 | export { ObserverLocator, ObjectObservationAdapter } from 'aurelia-binding/observer-locator'; 677 | export { ValueConverterResource } from 'aurelia-binding/value-converter'; 678 | export { calcSplices } from 'aurelia-binding/array-change-records'; 679 | export * from 'aurelia-binding/binding-modes'; 680 | export { Parser } from 'aurelia-binding/parser'; 681 | export { BindingExpression } from 'aurelia-binding/binding-expression'; 682 | export { ListenerExpression } from 'aurelia-binding/listener-expression'; 683 | export { NameExpression } from 'aurelia-binding/name-expression'; 684 | export { CallExpression } from 'aurelia-binding/call-expression'; 685 | export { DirtyChecker } from 'aurelia-binding/dirty-checking'; 686 | export { getChangeRecords } from 'aurelia-binding/map-change-records'; 687 | export { ComputedPropertyObserver, declarePropertyDependencies } from 'aurelia-binding/computed-observation'; 688 | export function valueConverter(nameOrTarget: any): (target: any) => void; 689 | export function computedFrom(...rest: any[]): (target: any, key: any, descriptor: any) => any; 690 | 691 | } 692 | declare module 'aurelia-binding' { 693 | export * from 'aurelia-binding/index'; 694 | } 695 | --------------------------------------------------------------------------------