1 | import type Vue from "nativescript-vue";
|
2 | import { NSVueRouterOptions, RouterServiceOptions, RouteOptions, ErrorCallback, Route, RouteBackCallback, RouteToCallback, NSVueRouterHistory } from "./typings/router-service";
|
3 | import { RouterGuardsService } from "./router-guards-service";
|
4 | import { AfterEachHookCallback, BeforeEachGuardCallback, BeforeResolveGuardCallback } from "./typings/router-guards-service";
|
5 | export declare class RouterService {
|
6 | readonly routes: Route[];
|
7 | history: NSVueRouterHistory;
|
8 | currentRoute: Route;
|
9 | isNavigating: boolean;
|
10 | newRoute: Route | null;
|
11 | routerGuardsService: RouterGuardsService;
|
12 | routeToCallback: RouteToCallback;
|
13 | routeBackCallback: RouteBackCallback;
|
14 | routeBackFallbackPath: string;
|
15 | protected logger: any;
|
16 | protected defaultOptions: RouteOptions;
|
17 | private vm;
|
18 | private frame;
|
19 | private errorCallbacks;
|
20 | constructor({ routes }: NSVueRouterOptions, { routeToCallback, routeBackCallback, routeBackFallbackPath, logger, frame, vm, }: RouterServiceOptions);
|
21 | push(route: Route | string, options?: RouteOptions): void;
|
22 | back(options?: RouteOptions, emptyRouteFallbackPath?: any): void;
|
23 | onError(callback: ErrorCallback): void;
|
24 | beforeEach(callback: BeforeEachGuardCallback): void;
|
25 | beforeResolve(callback: BeforeResolveGuardCallback): void;
|
26 | invokeBeforeResolve(): boolean;
|
27 | afterEach(callback: AfterEachHookCallback): void;
|
28 | invokeAfterEach(): void;
|
29 | updateVm(vm: Vue): void;
|
30 | getRoute(route: Route | string): Route | null;
|
31 | getCurrentRoute(): Route | null;
|
32 | setCurrentRoute(route: Route): void;
|
33 | getNewRoute(): Route | null;
|
34 | getPreviousRoute(): Route | null;
|
35 | setNavigationState(toggle: boolean): void;
|
36 | appendRouteHistory(routePath: string): void;
|
37 | clearRouteHistory(): void;
|
38 | private isRouteAvailable;
|
39 | private setNewRoute;
|
40 | private isValidRoute;
|
41 | private navigateTo;
|
42 | private navigateBack;
|
43 | private performContextAction;
|
44 | }
|