@angular-wave/angular.ts 0.0.60 → 0.0.62

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/README.md +1 -1
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +2 -1
  5. package/src/angular.spec.js +2 -2
  6. package/src/core/parser/parse.js +14 -0
  7. package/src/core/parser/parse.spec.js +7 -5
  8. package/src/core/parser/parser.js +1 -1
  9. package/src/core/q/q.js +46 -289
  10. package/src/core/q/q.md +229 -0
  11. package/src/core/sanitize/sanitize-uri.js +2 -3
  12. package/src/core/scope/scope.js +18 -8
  13. package/src/directive/if/if.js +6 -1
  14. package/src/filters/limit-to.js +5 -2
  15. package/src/filters/order-by.js +1 -2
  16. package/src/index.js +1 -1
  17. package/src/loader.js +1 -55
  18. package/src/router/params/param-type.js +2 -1
  19. package/src/router/state/views.js +3 -0
  20. package/src/router/state-provider.js +1 -1
  21. package/src/router/transition/reject-factory.js +1 -0
  22. package/src/router/url/url-rule.js +1 -1
  23. package/src/router/url/url-service.js +4 -4
  24. package/src/router/url/url-service.spec.js +4 -3
  25. package/src/services/http/http.js +7 -5
  26. package/src/services/template-request.js +2 -7
  27. package/src/shared/common.js +1 -1
  28. package/src/shared/utils.js +2 -11
  29. package/src/types.js +9 -1
  30. package/types/core/parser/parse.d.ts +3 -4
  31. package/types/core/parser/parser.d.ts +1 -1
  32. package/types/core/q/q.d.ts +2 -2
  33. package/types/core/sanitize/sanitize-uri.d.ts +4 -5
  34. package/types/core/scope/scope.d.ts +19 -7
  35. package/types/index.d.ts +5 -1
  36. package/types/loader.d.ts +0 -52
  37. package/types/router/params/param-type.d.ts +2 -1
  38. package/types/router/state/views.d.ts +2 -0
  39. package/types/router/state-provider.d.ts +1 -1
  40. package/types/router/transition/reject-factory.d.ts +1 -0
  41. package/types/router/url/url-rule.d.ts +0 -1
  42. package/types/router/url/url-service.d.ts +7 -7
  43. package/types/services/template-request.d.ts +4 -9
  44. package/types/shared/utils.d.ts +1 -7
  45. package/types/types.d.ts +6 -1
  46. package/types-back/README.md +0 -2
  47. package/types-back/angular.d.ts +0 -146
  48. package/types-back/index.d.ts +0 -2126
  49. package/types-back/jqlite.d.ts +0 -374
  50. package/types-back/router/core/common/common.d.ts +0 -416
  51. package/types-back/router/core/common/coreservices.d.ts +0 -77
  52. package/types-back/router/core/common/glob.d.ts +0 -60
  53. package/types-back/router/core/common/hof.d.ts +0 -168
  54. package/types-back/router/core/common/index.d.ts +0 -8
  55. package/types-back/router/core/common/predicates.d.ts +0 -25
  56. package/types-back/router/core/common/queue.d.ts +0 -15
  57. package/types-back/router/core/common/safeConsole.d.ts +0 -5
  58. package/types-back/router/core/common/strings.d.ts +0 -66
  59. package/types-back/router/core/common/trace.d.ts +0 -126
  60. package/types-back/router/core/globals.d.ts +0 -43
  61. package/types-back/router/core/hooks/coreResolvables.d.ts +0 -6
  62. package/types-back/router/core/hooks/ignoredTransition.d.ts +0 -4
  63. package/types-back/router/core/hooks/invalidTransition.d.ts +0 -4
  64. package/types-back/router/core/hooks/lazyLoad.d.ts +0 -17
  65. package/types-back/router/core/hooks/onEnterExitRetain.d.ts +0 -10
  66. package/types-back/router/core/hooks/redirectTo.d.ts +0 -4
  67. package/types-back/router/core/hooks/resolve.d.ts +0 -11
  68. package/types-back/router/core/hooks/updateGlobals.d.ts +0 -4
  69. package/types-back/router/core/hooks/url.d.ts +0 -4
  70. package/types-back/router/core/hooks/views.d.ts +0 -7
  71. package/types-back/router/core/index.d.ts +0 -11
  72. package/types-back/router/core/interface.d.ts +0 -91
  73. package/types-back/router/core/params/index.d.ts +0 -12
  74. package/types-back/router/core/params/interface.d.ts +0 -606
  75. package/types-back/router/core/params/param.d.ts +0 -77
  76. package/types-back/router/core/params/paramType.d.ts +0 -65
  77. package/types-back/router/core/params/paramTypes.d.ts +0 -193
  78. package/types-back/router/core/params/stateParams.d.ts +0 -15
  79. package/types-back/router/core/path/index.d.ts +0 -2
  80. package/types-back/router/core/path/pathNode.d.ts +0 -60
  81. package/types-back/router/core/path/pathUtils.d.ts +0 -105
  82. package/types-back/router/core/resolve/index.d.ts +0 -3
  83. package/types-back/router/core/resolve/interface.d.ts +0 -210
  84. package/types-back/router/core/resolve/resolvable.d.ts +0 -75
  85. package/types-back/router/core/resolve/resolveContext.d.ts +0 -97
  86. package/types-back/router/core/router.d.ts +0 -57
  87. package/types-back/router/core/state/index.d.ts +0 -28
  88. package/types-back/router/core/state/interface.d.ts +0 -732
  89. package/types-back/router/core/state/stateBuilder.d.ts +0 -107
  90. package/types-back/router/core/state/stateMatcher.d.ts +0 -13
  91. package/types-back/router/core/state/stateObject.d.ts +0 -170
  92. package/types-back/router/core/state/stateQueueManager.d.ts +0 -27
  93. package/types-back/router/core/state/stateRegistry.d.ts +0 -138
  94. package/types-back/router/core/state/stateService.d.ts +0 -386
  95. package/types-back/router/core/state/targetState.d.ts +0 -105
  96. package/types-back/router/core/transition/hookBuilder.d.ts +0 -49
  97. package/types-back/router/core/transition/hookRegistry.d.ts +0 -115
  98. package/types-back/router/core/transition/index.d.ts +0 -20
  99. package/types-back/router/core/transition/interface.d.ts +0 -862
  100. package/types-back/router/core/transition/rejectFactory.d.ts +0 -103
  101. package/types-back/router/core/transition/transition.d.ts +0 -575
  102. package/types-back/router/core/transition/transitionEventType.d.ts +0 -26
  103. package/types-back/router/core/transition/transitionHook.d.ts +0 -96
  104. package/types-back/router/core/transition/transitionService.d.ts +0 -253
  105. package/types-back/router/core/url/index.d.ts +0 -8
  106. package/types-back/router/core/url/interface.d.ts +0 -169
  107. package/types-back/router/core/url/urlConfig.d.ts +0 -144
  108. package/types-back/router/core/url/urlMatcher.d.ts +0 -185
  109. package/types-back/router/core/url/urlMatcherFactory.d.ts +0 -56
  110. package/types-back/router/core/url/urlRouter.d.ts +0 -101
  111. package/types-back/router/core/url/urlRule.d.ts +0 -143
  112. package/types-back/router/core/url/urlRules.d.ts +0 -251
  113. package/types-back/router/core/url/urlService.d.ts +0 -205
  114. package/types-back/router/core/view/index.d.ts +0 -2
  115. package/types-back/router/core/view/interface.d.ts +0 -46
  116. package/types-back/router/core/view/view.d.ts +0 -176
  117. package/types-back/router/directives/viewDirective.d.ts +0 -144
  118. package/types-back/router/index.d.ts +0 -17
  119. package/types-back/router/interface.d.ts +0 -500
  120. package/types-back/router/legacy/resolveService.d.ts +0 -47
  121. package/types-back/router/legacy/stateEvents.d.ts +0 -124
  122. package/types-back/router/services.d.ts +0 -15
  123. package/types-back/router/stateFilters.d.ts +0 -10
  124. package/types-back/router/stateProvider.d.ts +0 -258
  125. package/types-back/router/statebuilders/onEnterExitRetain.d.ts +0 -13
  126. package/types-back/router/statebuilders/views.d.ts +0 -53
  127. package/types-back/router/templateFactory.d.ts +0 -104
  128. package/types-back/router/viewScroll.d.ts +0 -9
@@ -1,107 +0,0 @@
1
- import { StateObject } from "./stateObject";
2
- import { StateMatcher } from "./stateMatcher";
3
- import { UrlMatcherFactory } from "../url/urlMatcherFactory";
4
- import { Resolvable } from "../resolve/resolvable";
5
- /**
6
- * A function that builds the final value for a specific field on a [[StateObject]].
7
- *
8
- * A series of builder functions for a given field are chained together.
9
- * The final value returned from the chain of builders is applied to the built [[StateObject]].
10
- * Builder functions should call the [[parent]] function either first or last depending on the desired composition behavior.
11
- *
12
- * @param state the _partially built_ [[StateObject]]. The [[StateDeclaration]] can be inspected via [[StateObject.self]]
13
- * @param parent the previous builder function in the series.
14
- */
15
- export declare type BuilderFunction = (
16
- state: StateObject,
17
- parent?: BuilderFunction,
18
- ) => any;
19
- /**
20
- * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].
21
- *
22
- * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
23
- * validates the `resolve` property and converts it to a [[Resolvable]] array.
24
- *
25
- * resolve: input value can be:
26
- *
27
- * {
28
- * // analyzed but not injected
29
- * myFooResolve: function() { return "myFooData"; },
30
- *
31
- * // function.toString() parsed, "DependencyName" dep as string (not min-safe)
32
- * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },
33
- *
34
- * // Array split; "DependencyName" dep as string
35
- * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() },
36
- *
37
- * // Array split; DependencyType dep as token (compared using ===)
38
- * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },
39
- *
40
- * // val.$inject used as deps
41
- * // where:
42
- * // corgeResolve.$inject = ["DependencyName"];
43
- * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }
44
- * // then "DependencyName" dep as string
45
- * myCorgeResolve: corgeResolve,
46
- *
47
- * // inject service by name
48
- * // When a string is found, desugar creating a resolve that injects the named service
49
- * myGraultResolve: "SomeService"
50
- * }
51
- *
52
- * or:
53
- *
54
- * [
55
- * new Resolvable("myFooResolve", function() { return "myFooData" }),
56
- * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]),
57
- * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] }
58
- * ]
59
- */
60
- export declare function resolvablesBuilder(state: StateObject): Resolvable[];
61
- /**
62
- * A internal global service
63
- *
64
- * StateBuilder is a factory for the internal [[StateObject]] objects.
65
- *
66
- * When you register a state with the [[StateRegistry]], you register a plain old javascript object which
67
- * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding
68
- * [[StateObject]] object, which has an API and is used internally.
69
- *
70
- * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function
71
- * using the [[builder]] method.
72
- */
73
- export declare class StateBuilder {
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;
107
- }
@@ -1,13 +0,0 @@
1
- import { StateOrName } from "./interface";
2
- import { StateObject } from "./stateObject";
3
- export declare class StateMatcher {
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;
13
- }
@@ -1,170 +0,0 @@
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";
14
- /**
15
- * Internal representation of a Router state.
16
- *
17
- * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
18
- *
19
- * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.
20
- *
21
- * This class prototypally inherits from the corresponding [[StateDeclaration]].
22
- * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
23
- */
24
- export declare class StateObject {
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
- | {
34
- [key: string]: string | any[] | Function;
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
- | {
94
- state: string | StateDeclaration;
95
- params: {
96
- [key: string]: any;
97
- };
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;
170
- }
@@ -1,27 +0,0 @@
1
- import { _StateDeclaration } from "./interface";
2
- import { StateObject } from "./stateObject";
3
- import { StateBuilder } from "./stateBuilder";
4
- import { StateRegistryListener } from "./stateRegistry";
5
- import { Router } from "../router";
6
- export declare class StateQueueManager {
7
- private router;
8
- states: {
9
- [key: string]: StateObject;
10
- };
11
- builder: StateBuilder;
12
- listeners: StateRegistryListener[];
13
- queue: StateObject[];
14
- constructor(
15
- router: Router,
16
- states: {
17
- [key: string]: StateObject;
18
- },
19
- builder: StateBuilder,
20
- listeners: StateRegistryListener[],
21
- );
22
- register(stateDecl: _StateDeclaration): StateObject;
23
- flush(): {
24
- [key: string]: StateObject;
25
- };
26
- attachRoute(state: StateObject): void;
27
- }
@@ -1,138 +0,0 @@
1
- import { StateObject } from "./stateObject";
2
- import { StateMatcher } from "./stateMatcher";
3
- import { StateQueueManager } from "./stateQueueManager";
4
- import { StateDeclaration, _StateDeclaration } from "./interface";
5
- import { BuilderFunction } from "./stateBuilder";
6
- import { StateOrName } from "./interface";
7
- import { Router } from "../router";
8
- /**
9
- * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].
10
- *
11
- * This callback receives two parameters:
12
- *
13
- * @param event a string; either "registered" or "deregistered"
14
- * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).
15
- */
16
- export declare type StateRegistryListener = (
17
- event: "registered" | "deregistered",
18
- states: StateDeclaration[],
19
- ) => void;
20
- /**
21
- * A registry for all of the application's [[StateDeclaration]]s
22
- *
23
- * This API is found at `router.stateRegistry` ([[Router.stateRegistry]])
24
- */
25
- export declare class StateRegistry {
26
- init($injector: any): void;
27
- private router;
28
- private _root;
29
- private states;
30
- /** @internal */
31
- matcher: StateMatcher;
32
- private builder;
33
- /** @internal */
34
- stateQueue: StateQueueManager;
35
- /** @internal */
36
- listeners: StateRegistryListener[];
37
- /** @internal */
38
- constructor(router: Router);
39
- /** @internal */
40
- private _registerRoot;
41
- /**
42
- * Listen for a State Registry events
43
- *
44
- * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.
45
- *
46
- * #### Example:
47
- * ```js
48
- * let allStates = registry.get();
49
- *
50
- * // Later, invoke deregisterFn() to remove the listener
51
- * let deregisterFn = registry.onStatesChanged((event, states) => {
52
- * switch(event) {
53
- * case: 'registered':
54
- * states.forEach(state => allStates.push(state));
55
- * break;
56
- * case: 'deregistered':
57
- * states.forEach(state => {
58
- * let idx = allStates.indexOf(state);
59
- * if (idx !== -1) allStates.splice(idx, 1);
60
- * });
61
- * break;
62
- * }
63
- * });
64
- * ```
65
- *
66
- * @param listener a callback function invoked when the registered states changes.
67
- * The function receives two parameters, `event` and `state`.
68
- * See [[StateRegistryListener]]
69
- * @return a function that deregisters the listener
70
- */
71
- onStatesChanged(listener: StateRegistryListener): () => void;
72
- /**
73
- * Gets the implicit root state
74
- *
75
- * Gets the root of the state tree.
76
- * The root state is implicitly created by Router.
77
- * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
78
- *
79
- * @return the root [[StateObject]]
80
- */
81
- root(): StateObject;
82
- /**
83
- * Adds a state to the registry
84
- *
85
- * Registers a [[StateDeclaration]] or queues it for registration.
86
- *
87
- * Note: a state will be queued if the state's parent isn't yet registered.
88
- *
89
- * @param stateDefinition the definition of the state to register.
90
- * @returns the internal [[StateObject]] object.
91
- * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).
92
- * If the state was only queued, then the object is not fully built.
93
- */
94
- register(stateDefinition: _StateDeclaration): StateObject;
95
- /** @internal */
96
- private _deregisterTree;
97
- /**
98
- * Removes a state from the registry
99
- *
100
- * This removes a state from the registry.
101
- * If the state has children, they are are also removed from the registry.
102
- *
103
- * @param stateOrName the state's name or object representation
104
- * @returns {StateObject[]} a list of removed states
105
- */
106
- deregister(stateOrName: StateOrName): StateObject[];
107
- /**
108
- * Gets all registered states
109
- *
110
- * Calling this method with no arguments will return a list of all the states that are currently registered.
111
- * Note: this does not return states that are *queued* but not yet registered.
112
- *
113
- * @return a list of [[StateDeclaration]]s
114
- */
115
- get(): StateDeclaration[];
116
- /**
117
- * Gets a registered state
118
- *
119
- * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.
120
- * Note: this does not return states that are *queued* but not yet registered.
121
- *
122
- * @param stateOrName either the name of a state, or a state object.
123
- * @param base the base state to use when stateOrName is relative.
124
- * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.
125
- */
126
- get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;
127
- /**
128
- * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
129
- * More than one BuilderFunction can be registered for a given property.
130
- *
131
- * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
132
- *
133
- * @param property The name of the State property being registered for.
134
- * @param builderFunction The BuilderFunction which will be used to build the State property
135
- * @returns a function which deregisters the BuilderFunction
136
- */
137
- decorator(property: string, builderFunction: BuilderFunction): Function;
138
- }