UNPKG

@versatiledatakit/shared

Version:

Versatile Data Kit Shared library enables reusability of shared features like: NgRx Redux, Error Handlers, Utils, Generic Components, etc.

71 lines (70 loc) 1.91 kB
import { NavigationExtras } from '@angular/router'; import { BaseAction, BaseActionWithPayload } from '../../../ngrx/actions'; /** * ** Action Identifier for Router Navigate. */ export declare const ROUTER_NAVIGATE = "[router] Navigate"; /** * ** Action Identifier for Location Go. * * */ export declare const LOCATION_GO = "[location] Go"; /** * ** Action Identifier for Location Back. */ export declare const LOCATION_BACK = "[location] Back"; /** * ** Action Identifier for Location Forward. */ export declare const LOCATION_FORWARD = "[location] Forward"; export interface NavigatePayload { commands: any[]; extras?: NavigationExtras; } /** * ** Navigate Action instruct subscribers that they should navigate to given path. */ export declare class RouterNavigate extends BaseActionWithPayload<NavigatePayload> { constructor(payload: NavigatePayload); /** * ** Factory method. */ static of(payload: NavigatePayload): RouterNavigate; } export interface GoPayload { path: string; query?: string; state?: any; } /** * ** Location Go Action instruct subscribers that they should navigate using Location. */ export declare class LocationGo extends BaseActionWithPayload<GoPayload> { constructor(payload: GoPayload); /** * ** Factory method. */ static of(payload: GoPayload): LocationGo; } /** * ** Back Action instruct subscribers to pop history Backward. */ export declare class LocationBack extends BaseAction { constructor(); /** * ** Factory method. */ static of(): LocationBack; } /** * ** Forward Action instruct subscribers to go Forward. */ export declare class LocationForward extends BaseAction { constructor(); /** * ** Factory method. */ static of(): LocationForward; } export declare type NavigationActions = RouterNavigate | LocationGo | LocationBack | LocationForward;