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