1 |
|
2 |
|
3 | import { OverrideContext } from 'aurelia-binding';
|
4 | import { Container } from 'aurelia-dependency-injection';
|
5 | import { NavigationInstruction, RouteConfig, RouteLoader, Router } from 'aurelia-router';
|
6 | import { CompositionEngine, CompositionTransaction, View, ViewLocator, ViewSlot } from 'aurelia-templating';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class TemplatingRouteLoader extends RouteLoader {
|
12 | constructor(compositionEngine: CompositionEngine);
|
13 | /**
|
14 | * Load corresponding component of a route config of a navigation instruction
|
15 | */
|
16 | loadRoute(router: Router, config: RouteConfig, navInstruction: NavigationInstruction): Promise<any>;
|
17 | }
|
18 | /**
|
19 | * Implementation of Aurelia Router ViewPort. Responsible for loading route, composing and swapping routes views
|
20 | */
|
21 | export declare class RouterView {
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | swapOrder?: "before" | "after" | "with";
|
32 | |
33 |
|
34 |
|
35 | layoutView?: any;
|
36 | |
37 |
|
38 |
|
39 |
|
40 | layoutViewModel?: any;
|
41 | |
42 |
|
43 |
|
44 | layoutModel?: any;
|
45 | |
46 |
|
47 |
|
48 | readonly element: Element;
|
49 | |
50 |
|
51 |
|
52 | readonly router: Router;
|
53 | |
54 |
|
55 |
|
56 | container: Container;
|
57 | constructor(element: Element, container: Container, viewSlot: ViewSlot, router: Router, viewLocator: ViewLocator, compositionTransaction: CompositionTransaction, compositionEngine: CompositionEngine);
|
58 | created(owningView: View): void;
|
59 | bind(bindingContext: any, overrideContext: OverrideContext): void;
|
60 | /**
|
61 | * Implementation of `aurelia-router` ViewPort interface, responsible for templating related part in routing Pipeline
|
62 | */
|
63 | process($viewPortInstruction: any, waitToSwap?: boolean): Promise<void>;
|
64 | swap($viewPortInstruction: any): void | Promise<void>;
|
65 | }
|
66 | /**
|
67 | * Locator which finds the nearest RouterView, relative to the current dependency injection container.
|
68 | */
|
69 | export declare class RouterViewLocator {
|
70 | |
71 |
|
72 |
|
73 | constructor();
|
74 | /**
|
75 | * Finds the nearest RouterView instance.
|
76 | * @returns A promise that will be resolved with the located RouterView instance.
|
77 | */
|
78 | findNearest(): Promise<RouterView>;
|
79 | }
|
80 | /**
|
81 | * Helper custom attribute to help associate an element with a route by name
|
82 | */
|
83 | export declare class RouteHref {
|
84 | |
85 |
|
86 |
|
87 | readonly router: Router;
|
88 | |
89 |
|
90 |
|
91 | readonly element: Element;
|
92 | |
93 |
|
94 |
|
95 | route: string;
|
96 | |
97 |
|
98 |
|
99 | params: Record<string, any>;
|
100 | |
101 |
|
102 |
|
103 |
|
104 | attribute: string;
|
105 | constructor(router: Router, element: Element);
|
106 | bind(): void;
|
107 | unbind(): void;
|
108 | attributeChanged(value: any, previous: any): Promise<void>;
|
109 | processChange(): Promise<void>;
|
110 | }
|
111 | export interface IFrameworkConfiguration {
|
112 | container: Container;
|
113 | singleton(...args: any[]): this;
|
114 | globalResources(...args: any[]): this;
|
115 | }
|
116 | export declare function configure(config: IFrameworkConfiguration): void;
|
117 |
|
118 | export {};
|