1 | import { StateDeclaration, StateOrName, TargetStateDef } from './interface';
|
2 | import { TransitionOptions } from '../transition/interface';
|
3 | import { StateObject } from './stateObject';
|
4 | import { StateRegistry } from './stateRegistry';
|
5 | import { RawParams } from '../params';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare class TargetState {
|
36 | private _stateRegistry;
|
37 | private _identifier;
|
38 | private _definition;
|
39 | private _params;
|
40 | private _options;
|
41 |
|
42 | static isDef: (obj: any) => obj is TargetStateDef;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | constructor(_stateRegistry: StateRegistry, _identifier: StateOrName, _params?: RawParams, _options?: TransitionOptions);
|
58 | /** The name of the state this object targets */
|
59 | name(): string;
|
60 | /** The identifier used when creating this TargetState */
|
61 | identifier(): StateOrName;
|
62 | /** The target parameter values */
|
63 | params(): RawParams;
|
64 | /** The internal state object (if it was found) */
|
65 | $state(): StateObject;
|
66 | /** The internal state declaration (if it was found) */
|
67 | state(): StateDeclaration;
|
68 | /** The target options */
|
69 | options(): TransitionOptions;
|
70 | /** True if the target state was found */
|
71 | exists(): boolean;
|
72 | /** True if the object is valid */
|
73 | valid(): boolean;
|
74 | /** If the object is invalid, returns the reason why */
|
75 | error(): string;
|
76 | toString(): string;
|
77 | /**
|
78 | * Returns a copy of this TargetState which targets a different state.
|
79 | * The new TargetState has the same parameter values and transition options.
|
80 | *
|
81 | * @param state The new state that should be targeted
|
82 | */
|
83 | withState(state: StateOrName): TargetState;
|
84 | /**
|
85 | * Returns a copy of this TargetState, using the specified parameter values.
|
86 | *
|
87 | * @param params the new parameter values to use
|
88 | * @param replace When false (default) the new parameter values will be merged with the current values.
|
89 | * When true the parameter values will be used instead of the current values.
|
90 | */
|
91 | withParams(params: RawParams, replace?: boolean): TargetState;
|
92 | /**
|
93 | * Returns a copy of this TargetState, using the specified Transition Options.
|
94 | *
|
95 | * @param options the new options to use
|
96 | * @param replace When false (default) the new options will be merged with the current options.
|
97 | * When true the options will be used instead of the current options.
|
98 | */
|
99 | withOptions(options: TransitionOptions, replace?: boolean): TargetState;
|
100 | }
|