@angular-wave/angular.ts 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +1 -1
- package/README.md +3 -3
- package/TODO.md +14 -0
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +2 -1
- package/package.json +1 -1
- package/src/animations/animate-css-driver.js +2 -2
- package/src/animations/animate-css.js +15 -6
- package/src/animations/animate-js.js +1 -1
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/shared.js +0 -14
- package/src/core/compile.js +6 -3
- package/src/core/q.js +9 -9
- package/src/core/sanitize-uri.js +1 -1
- package/src/core/sce.js +1 -1
- package/src/directive/if.js +0 -79
- package/src/directive/if.md +80 -0
- package/src/directive/include.js +0 -82
- package/src/directive/include.md +86 -0
- package/src/directive/repeat.js +0 -1
- package/src/loader.js +0 -1
- package/src/public.js +0 -2
- package/src/router/common/trace.js +1 -1
- package/src/router/directives/stateDirectives.js +16 -14
- package/src/router/directives/viewDirective.js +2 -2
- package/src/router/hooks/resolve.js +3 -4
- package/src/router/hooks/views.js +3 -2
- package/src/router/state/stateService.js +1 -2
- package/src/router/transition/interface.js +14 -14
- package/src/router/transition/rejectFactory.js +29 -20
- package/src/router/transition/transitionHook.js +5 -5
- package/src/router/url/urlMatcher.js +1 -2
- package/src/router/url/urlRule.js +1 -1
- package/src/router/url/urlRules.js +1 -1
- package/src/shared/common.js +0 -1
- package/test/module-test.html +44 -12
- package/test/router/services.spec.js +71 -0
- package/test/router/state-directives.spec.js +1208 -0
- package/types/angular.d.ts +132 -124
- package/types/index.d.ts +2350 -2187
- package/types/jqlite.d.ts +463 -418
- package/types/router/core/common/common.d.ts +70 -24
- package/types/router/core/common/coreservices.d.ts +30 -32
- package/types/router/core/common/glob.d.ts +9 -9
- package/types/router/core/common/hof.d.ts +12 -4
- package/types/router/core/common/index.d.ts +8 -8
- package/types/router/core/common/predicates.d.ts +1 -1
- package/types/router/core/common/queue.d.ts +13 -13
- package/types/router/core/common/safeConsole.d.ts +3 -3
- package/types/router/core/common/strings.d.ts +4 -2
- package/types/router/core/common/trace.d.ts +94 -82
- package/types/router/core/globals.d.ts +37 -37
- package/types/router/core/hooks/coreResolvables.d.ts +5 -3
- package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
- package/types/router/core/hooks/invalidTransition.d.ts +4 -2
- package/types/router/core/hooks/lazyLoad.d.ts +10 -5
- package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
- package/types/router/core/hooks/redirectTo.d.ts +4 -2
- package/types/router/core/hooks/resolve.d.ts +10 -4
- package/types/router/core/hooks/updateGlobals.d.ts +4 -2
- package/types/router/core/hooks/url.d.ts +4 -2
- package/types/router/core/hooks/views.d.ts +7 -3
- package/types/router/core/index.d.ts +11 -12
- package/types/router/core/interface.d.ts +83 -81
- package/types/router/core/params/index.d.ts +5 -5
- package/types/router/core/params/interface.d.ts +439 -439
- package/types/router/core/params/param.d.ts +72 -60
- package/types/router/core/params/paramType.d.ts +40 -40
- package/types/router/core/params/paramTypes.d.ts +169 -165
- package/types/router/core/params/stateParams.d.ts +13 -13
- package/types/router/core/path/index.d.ts +2 -2
- package/types/router/core/path/pathNode.d.ts +49 -49
- package/types/router/core/path/pathUtils.d.ts +100 -74
- package/types/router/core/resolve/index.d.ts +3 -3
- package/types/router/core/resolve/interface.d.ts +137 -137
- package/types/router/core/resolve/resolvable.d.ts +60 -54
- package/types/router/core/resolve/resolveContext.d.ts +84 -79
- package/types/router/core/router.d.ts +95 -86
- package/types/router/core/state/index.d.ts +8 -8
- package/types/router/core/state/interface.d.ts +667 -643
- package/types/router/core/state/stateBuilder.d.ts +41 -38
- package/types/router/core/state/stateMatcher.d.ts +11 -9
- package/types/router/core/state/stateObject.d.ts +154 -139
- package/types/router/core/state/stateQueueManager.d.ts +26 -21
- package/types/router/core/state/stateRegistry.d.ts +124 -121
- package/types/router/core/state/stateService.d.ts +380 -343
- package/types/router/core/state/targetState.d.ts +74 -69
- package/types/router/core/transition/hookBuilder.d.ts +34 -30
- package/types/router/core/transition/hookRegistry.d.ts +96 -74
- package/types/router/core/transition/index.d.ts +8 -8
- package/types/router/core/transition/interface.d.ts +652 -609
- package/types/router/core/transition/rejectFactory.d.ts +97 -97
- package/types/router/core/transition/transition.d.ts +565 -517
- package/types/router/core/transition/transitionEventType.d.ts +20 -11
- package/types/router/core/transition/transitionHook.d.ts +90 -82
- package/types/router/core/transition/transitionService.d.ts +228 -161
- package/types/router/core/url/index.d.ts +8 -8
- package/types/router/core/url/interface.d.ts +100 -87
- package/types/router/core/url/urlConfig.d.ts +130 -126
- package/types/router/core/url/urlMatcher.d.ts +132 -127
- package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
- package/types/router/core/url/urlRouter.d.ts +91 -75
- package/types/router/core/url/urlRule.d.ts +123 -100
- package/types/router/core/url/urlRules.d.ts +240 -232
- package/types/router/core/url/urlService.d.ts +201 -201
- package/types/router/core/view/index.d.ts +2 -2
- package/types/router/core/view/interface.d.ts +26 -26
- package/types/router/core/view/view.d.ts +152 -143
- package/types/router/directives/viewDirective.d.ts +12 -11
- package/types/router/index.d.ts +11 -12
- package/types/router/interface.d.ts +361 -351
- package/types/router/legacy/resolveService.d.ts +44 -40
- package/types/router/legacy/stateEvents.d.ts +1 -1
- package/types/router/locationServices.d.ts +45 -37
- package/types/router/services.d.ts +9 -9
- package/types/router/stateFilters.d.ts +3 -3
- package/types/router/stateProvider.d.ts +240 -235
- package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
- package/types/router/statebuilders/views.d.ts +35 -22
- package/types/router/templateFactory.d.ts +99 -79
- package/types/router/viewScroll.d.ts +7 -7
- package/src/directive/a.js +0 -37
- package/test/directive/a.spec.js +0 -192
- package/types/router/angular.d.ts +0 -1
- package/types/router/core/vanilla.d.ts +0 -1
- package/types/router/directives/stateDirectives.d.ts +0 -3
- package/types/router/injectables.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StateObject } from
|
|
2
|
-
import { StateMatcher } from
|
|
3
|
-
import { UrlMatcherFactory } from
|
|
4
|
-
import { Resolvable } from
|
|
1
|
+
import { StateObject } from "./stateObject";
|
|
2
|
+
import { StateMatcher } from "./stateMatcher";
|
|
3
|
+
import { UrlMatcherFactory } from "../url/urlMatcherFactory";
|
|
4
|
+
import { Resolvable } from "../resolve/resolvable";
|
|
5
5
|
/**
|
|
6
6
|
* A function that builds the final value for a specific field on a [[StateObject]].
|
|
7
7
|
*
|
|
@@ -12,7 +12,10 @@ import { Resolvable } from '../resolve/resolvable';
|
|
|
12
12
|
* @param state the _partially built_ [[StateObject]]. The [[StateDeclaration]] can be inspected via [[StateObject.self]]
|
|
13
13
|
* @param parent the previous builder function in the series.
|
|
14
14
|
*/
|
|
15
|
-
export declare type BuilderFunction = (
|
|
15
|
+
export declare type BuilderFunction = (
|
|
16
|
+
state: StateObject,
|
|
17
|
+
parent?: BuilderFunction,
|
|
18
|
+
) => any;
|
|
16
19
|
/**
|
|
17
20
|
* This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].
|
|
18
21
|
*
|
|
@@ -68,37 +71,37 @@ export declare function resolvablesBuilder(state: StateObject): Resolvable[];
|
|
|
68
71
|
* using the [[builder]] method.
|
|
69
72
|
*/
|
|
70
73
|
export declare class StateBuilder {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
74
|
+
private matcher;
|
|
75
|
+
/** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */
|
|
76
|
+
private builders;
|
|
77
|
+
constructor(matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory);
|
|
78
|
+
/**
|
|
79
|
+
* Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
|
|
80
|
+
* More than one BuilderFunction can be registered for a given property.
|
|
81
|
+
*
|
|
82
|
+
* The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
|
|
83
|
+
*
|
|
84
|
+
* @param property The name of the State property being registered for.
|
|
85
|
+
* @param fn The BuilderFunction which will be used to build the State property
|
|
86
|
+
* @returns a function which deregisters the BuilderFunction
|
|
87
|
+
*/
|
|
88
|
+
builder(property: string, fn: BuilderFunction): Function;
|
|
89
|
+
/**
|
|
90
|
+
* Gets the registered builder functions for a given property of [[StateObject]].
|
|
91
|
+
*
|
|
92
|
+
* @param property The name of the State property being registered for.
|
|
93
|
+
* @returns the registered builder(s).
|
|
94
|
+
* note: for backwards compatibility, this may be a single builder or an array of builders
|
|
95
|
+
*/
|
|
96
|
+
builder(property: string): BuilderFunction | BuilderFunction[];
|
|
97
|
+
/**
|
|
98
|
+
* Builds all of the properties on an essentially blank State object, returning a State object which has all its
|
|
99
|
+
* properties and API built.
|
|
100
|
+
*
|
|
101
|
+
* @param state an uninitialized State object
|
|
102
|
+
* @returns the built State object
|
|
103
|
+
*/
|
|
104
|
+
build(state: StateObject): StateObject;
|
|
105
|
+
parentName(state: StateObject): string;
|
|
106
|
+
name(state: StateObject): string;
|
|
104
107
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { StateOrName } from
|
|
2
|
-
import { StateObject } from
|
|
1
|
+
import { StateOrName } from "./interface";
|
|
2
|
+
import { StateObject } from "./stateObject";
|
|
3
3
|
export declare class StateMatcher {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
private _states;
|
|
5
|
+
constructor(_states: { [key: string]: StateObject });
|
|
6
|
+
isRelative(stateName: string): boolean;
|
|
7
|
+
find(
|
|
8
|
+
stateOrName: StateOrName,
|
|
9
|
+
base?: StateOrName,
|
|
10
|
+
matchGlob?: boolean,
|
|
11
|
+
): StateObject;
|
|
12
|
+
resolvePath(name: string, base: StateOrName): string;
|
|
11
13
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
StateDeclaration,
|
|
3
|
+
_ViewDeclaration,
|
|
4
|
+
_StateDeclaration,
|
|
5
|
+
LazyLoadResult,
|
|
6
|
+
} from "./interface";
|
|
7
|
+
import { Param } from "../params/param";
|
|
8
|
+
import { UrlMatcher } from "../url/urlMatcher";
|
|
9
|
+
import { Resolvable } from "../resolve/resolvable";
|
|
10
|
+
import { TransitionStateHookFn } from "../transition/interface";
|
|
11
|
+
import { TargetState } from "./targetState";
|
|
12
|
+
import { Transition } from "../transition/transition";
|
|
13
|
+
import { Glob } from "../common/glob";
|
|
9
14
|
/**
|
|
10
15
|
* Internal representation of a UI-Router state.
|
|
11
16
|
*
|
|
@@ -17,139 +22,149 @@ import { Glob } from '../common/glob';
|
|
|
17
22
|
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
18
23
|
*/
|
|
19
24
|
export declare class StateObject {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/** The parent [[StateObject]] */
|
|
26
|
+
parent: StateObject;
|
|
27
|
+
/** The name used to register the state */
|
|
28
|
+
name: string;
|
|
29
|
+
/** Prototypally inherits from [[StateDeclaration.abstract]] */
|
|
30
|
+
abstract: boolean;
|
|
31
|
+
/** Prototypally inherits from [[StateDeclaration.resolve]] */
|
|
32
|
+
resolve:
|
|
33
|
+
| {
|
|
28
34
|
[key: string]: string | any[] | Function;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
35
|
+
}
|
|
36
|
+
| any[];
|
|
37
|
+
/** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */
|
|
38
|
+
resolvables: Resolvable[];
|
|
39
|
+
/** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */
|
|
40
|
+
resolvePolicy: any;
|
|
41
|
+
/** A compiled URLMatcher which detects when the state's URL is matched */
|
|
42
|
+
url: UrlMatcher;
|
|
43
|
+
/** The parameters for the state, built from the URL and [[StateDeclaration.params]] */
|
|
44
|
+
params: {
|
|
45
|
+
[key: string]: Param;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The views for the state.
|
|
49
|
+
* Note: `@uirouter/core` does not register a builder for views.
|
|
50
|
+
* The framework specific code should register a `views` builder.
|
|
51
|
+
*/
|
|
52
|
+
views: {
|
|
53
|
+
[key: string]: _ViewDeclaration;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The original [[StateDeclaration]] used to build this [[StateObject]].
|
|
57
|
+
* Note: `this` object also prototypally inherits from the `self` declaration object.
|
|
58
|
+
*/
|
|
59
|
+
self: StateDeclaration;
|
|
60
|
+
/** The nearest parent [[StateObject]] which has a URL */
|
|
61
|
+
navigable: StateObject;
|
|
62
|
+
/** The parent [[StateObject]] objects from this state up to the root */
|
|
63
|
+
path: StateObject[];
|
|
64
|
+
/**
|
|
65
|
+
* Prototypally inherits from [[StateDeclaration.data]]
|
|
66
|
+
* Note: This is the only field on the [[StateDeclaration]] which is mutated.
|
|
67
|
+
* The definition object's `data` field is replaced with a new object
|
|
68
|
+
* which prototypally inherits from the parent state definition's `data` field.
|
|
69
|
+
*/
|
|
70
|
+
data: any;
|
|
71
|
+
/**
|
|
72
|
+
* An object containing the parent States' names as keys and
|
|
73
|
+
* true as their values.
|
|
74
|
+
*/
|
|
75
|
+
includes: {
|
|
76
|
+
[name: string]: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Prototypally inherits from [[StateDeclaration.onExit]] */
|
|
79
|
+
onExit: TransitionStateHookFn;
|
|
80
|
+
/** Prototypally inherits from [[StateDeclaration.onRetain]] */
|
|
81
|
+
onRetain: TransitionStateHookFn;
|
|
82
|
+
/** Prototypally inherits from [[StateDeclaration.onEnter]] */
|
|
83
|
+
onEnter: TransitionStateHookFn;
|
|
84
|
+
/** Prototypally inherits from [[StateDeclaration.lazyLoad]] */
|
|
85
|
+
lazyLoad: (
|
|
86
|
+
transition: Transition,
|
|
87
|
+
state: StateDeclaration,
|
|
88
|
+
) => Promise<LazyLoadResult>;
|
|
89
|
+
/** Prototypally inherits from [[StateDeclaration.redirectTo]] */
|
|
90
|
+
redirectTo:
|
|
91
|
+
| string
|
|
92
|
+
| (($transition$: Transition) => TargetState)
|
|
93
|
+
| {
|
|
81
94
|
state: string | StateDeclaration;
|
|
82
95
|
params: {
|
|
83
|
-
|
|
96
|
+
[key: string]: any;
|
|
84
97
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
98
|
+
};
|
|
99
|
+
/** @internal */
|
|
100
|
+
__stateObjectCache: {
|
|
101
|
+
/** Might be null */
|
|
102
|
+
nameGlob?: Glob;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Create a state object to put the private/internal implementation details onto.
|
|
106
|
+
* The object's prototype chain looks like:
|
|
107
|
+
* (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)
|
|
108
|
+
*
|
|
109
|
+
* @param stateDecl the user-supplied State Declaration
|
|
110
|
+
* @returns {StateObject} an internal State object
|
|
111
|
+
*/
|
|
112
|
+
static create(stateDecl: _StateDeclaration): StateObject;
|
|
113
|
+
/** Predicate which returns true if the object is an class with @State() decorator */
|
|
114
|
+
static isStateClass: (
|
|
115
|
+
stateDecl: _StateDeclaration,
|
|
116
|
+
) => stateDecl is new () => StateDeclaration;
|
|
117
|
+
/** Predicate which returns true if the object is a [[StateDeclaration]] object */
|
|
118
|
+
static isStateDeclaration: (obj: any) => obj is StateDeclaration;
|
|
119
|
+
/** Predicate which returns true if the object is an internal [[StateObject]] object */
|
|
120
|
+
static isState: (obj: any) => obj is StateObject;
|
|
121
|
+
/** @deprecated use State.create() */
|
|
122
|
+
constructor(config?: StateDeclaration);
|
|
123
|
+
/**
|
|
124
|
+
* Returns true if the provided parameter is the same state.
|
|
125
|
+
*
|
|
126
|
+
* Compares the identity of the state against the passed value, which is either an object
|
|
127
|
+
* reference to the actual `State` instance, the original definition object passed to
|
|
128
|
+
* `$stateProvider.state()`, or the fully-qualified name.
|
|
129
|
+
*
|
|
130
|
+
* @param ref Can be one of (a) a `State` instance, (b) an object that was passed
|
|
131
|
+
* into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.
|
|
132
|
+
* @returns Returns `true` if `ref` matches the current `State` instance.
|
|
133
|
+
*/
|
|
134
|
+
is(ref: StateObject | StateDeclaration | string): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated this does not properly handle dot notation
|
|
137
|
+
* @returns Returns a dot-separated name of the state.
|
|
138
|
+
*/
|
|
139
|
+
fqn(): string;
|
|
140
|
+
/**
|
|
141
|
+
* Returns the root node of this state's tree.
|
|
142
|
+
*
|
|
143
|
+
* @returns The root of this state's tree.
|
|
144
|
+
*/
|
|
145
|
+
root(): StateObject;
|
|
146
|
+
/**
|
|
147
|
+
* Gets the state's `Param` objects
|
|
148
|
+
*
|
|
149
|
+
* Gets the list of [[Param]] objects owned by the state.
|
|
150
|
+
* If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.
|
|
151
|
+
* If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object
|
|
152
|
+
*
|
|
153
|
+
* @param opts options
|
|
154
|
+
*/
|
|
155
|
+
parameters(opts?: { inherit?: boolean; matchingKeys?: any }): Param[];
|
|
156
|
+
/**
|
|
157
|
+
* Returns a single [[Param]] that is owned by the state
|
|
158
|
+
*
|
|
159
|
+
* If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.
|
|
160
|
+
* @param id the name of the [[Param]] to return
|
|
161
|
+
* @param opts options
|
|
162
|
+
*/
|
|
163
|
+
parameter(
|
|
164
|
+
id: string,
|
|
165
|
+
opts?: {
|
|
166
|
+
inherit?: boolean;
|
|
167
|
+
},
|
|
168
|
+
): Param;
|
|
169
|
+
toString(): string;
|
|
155
170
|
}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { _StateDeclaration } from
|
|
2
|
-
import { StateObject } from
|
|
3
|
-
import { StateBuilder } from
|
|
4
|
-
import { StateRegistryListener } from
|
|
5
|
-
import { Disposable } from
|
|
6
|
-
import { UIRouter } from
|
|
1
|
+
import { _StateDeclaration } from "./interface";
|
|
2
|
+
import { StateObject } from "./stateObject";
|
|
3
|
+
import { StateBuilder } from "./stateBuilder";
|
|
4
|
+
import { StateRegistryListener } from "./stateRegistry";
|
|
5
|
+
import { Disposable } from "../interface";
|
|
6
|
+
import { UIRouter } from "../router";
|
|
7
7
|
export declare class StateQueueManager implements Disposable {
|
|
8
|
-
|
|
8
|
+
private router;
|
|
9
|
+
states: {
|
|
10
|
+
[key: string]: StateObject;
|
|
11
|
+
};
|
|
12
|
+
builder: StateBuilder;
|
|
13
|
+
listeners: StateRegistryListener[];
|
|
14
|
+
queue: StateObject[];
|
|
15
|
+
constructor(
|
|
16
|
+
router: UIRouter,
|
|
9
17
|
states: {
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
builder: StateBuilder
|
|
13
|
-
listeners: StateRegistryListener[]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[key: string]: StateObject;
|
|
22
|
-
};
|
|
23
|
-
attachRoute(state: StateObject): void;
|
|
18
|
+
[key: string]: StateObject;
|
|
19
|
+
},
|
|
20
|
+
builder: StateBuilder,
|
|
21
|
+
listeners: StateRegistryListener[],
|
|
22
|
+
);
|
|
23
|
+
dispose(): void;
|
|
24
|
+
register(stateDecl: _StateDeclaration): StateObject;
|
|
25
|
+
flush(): {
|
|
26
|
+
[key: string]: StateObject;
|
|
27
|
+
};
|
|
28
|
+
attachRoute(state: StateObject): void;
|
|
24
29
|
}
|