@angular-wave/angular.ts 0.9.0 → 0.9.1
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/@types/core/scope/scope.d.ts +1 -4
- package/@types/interface.d.ts +17 -3
- package/@types/shared/interface.d.ts +17 -0
- package/@types/shared/utils.d.ts +4 -19
- package/dist/angular-ts.esm.js +29 -152
- package/dist/angular-ts.umd.js +29 -152
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/main.js +2 -2
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/Location.html +20 -20
- package/docs/static/typedoc/classes/LocationProvider.html +5 -5
- package/docs/static/typedoc/classes/LogProvider.html +3 -3
- package/docs/static/typedoc/classes/PubSub.html +21 -21
- package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
- package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Controller.html +6 -6
- package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +18 -18
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
- package/docs/static/typedoc/interfaces/HttpService.html +21 -21
- package/docs/static/typedoc/interfaces/LogService.html +6 -6
- package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
- package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Provider.html +17 -17
- package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
- package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +1 -1
- package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapModeType.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
- package/docs/static/typedoc/variables/SwapMode.html +10 -10
- package/legacy.d.ts +0 -82
- package/package.json +2 -2
- package/src/animations/animate-js.js +2 -1
- package/src/animations/animate-queue.js +7 -6
- package/src/core/scope/scope.js +8 -10
- package/src/directive/http/form-router-test.html +44 -0
- package/src/directive/options/options-example.html +7 -3
- package/src/directive/options/options.js +1 -0
- package/src/directive/options/options.spec.js +117 -170
- package/src/interface.ts +20 -3
- package/src/router/directives/view-directive.js +0 -1
- package/src/router/resolve/resolve-context.js +0 -19
- package/src/router/state/state-registry.js +3 -10
- package/src/router/state/state-service.js +5 -5
- package/src/router/transition/transition.js +1 -86
- package/src/router/view-hook.spec.js +1 -1
- package/src/shared/interface.ts +19 -0
- package/src/shared/utils.js +3 -12
- package/tsconfig.types.json +2 -2
- package/@types/angular.d.ts +0 -150
- package/@types/animations/animate-cache.d.ts +0 -50
- package/@types/animations/animate-children-directive.d.ts +0 -10
- package/@types/animations/animate-css-driver.d.ts +0 -18
- package/@types/animations/animate-css.d.ts +0 -18
- package/@types/animations/animate-js-driver.d.ts +0 -14
- package/@types/animations/animate-js.d.ts +0 -23
- package/@types/animations/animate-queue.d.ts +0 -28
- package/@types/animations/animate-runner.d.ts +0 -31
- package/@types/animations/animate-swap.d.ts +0 -9
- package/@types/animations/animate.d.ts +0 -450
- package/@types/animations/animation.d.ts +0 -14
- package/@types/animations/interface.d.ts +0 -17
- package/@types/animations/raf-scheduler.d.ts +0 -37
- package/@types/animations/shared.d.ts +0 -74
- package/@types/core/compile/compile.d.ts +0 -201
- package/@types/core/controller/controller.d.ts +0 -54
- package/@types/core/di/injector.d.ts +0 -22
- package/@types/core/filter/filter.d.ts +0 -23
- package/@types/core/interpolate/interpolate.d.ts +0 -38
- package/@types/core/parse/ast/ast-node.d.ts +0 -56
- package/@types/core/parse/ast/ast.d.ts +0 -164
- package/@types/core/parse/lexer/lexer.d.ts +0 -119
- package/@types/core/parse/lexer/token.d.ts +0 -17
- package/@types/core/parse/parse.d.ts +0 -33
- package/@types/core/parse/parser/parser.d.ts +0 -41
- package/@types/core/sanitize/interface.d.ts +0 -10
- package/@types/core/sanitize/sanitize-uri.d.ts +0 -40
- package/@types/directive/aria/aria.d.ts +0 -104
- package/@types/directive/attrs/attrs.d.ts +0 -8
- package/@types/directive/bind/bind.d.ts +0 -18
- package/@types/directive/channel/channel.d.ts +0 -10
- package/@types/directive/class/class.d.ts +0 -3
- package/@types/directive/cloak/cloak.d.ts +0 -4
- package/@types/directive/controller/controller.d.ts +0 -4
- package/@types/directive/events/events.d.ts +0 -21
- package/@types/directive/form/form.d.ts +0 -264
- package/@types/directive/http/http.d.ts +0 -46
- package/@types/directive/if/if.d.ts +0 -10
- package/@types/directive/include/include.d.ts +0 -28
- package/@types/directive/init/init.d.ts +0 -4
- package/@types/directive/input/input.d.ts +0 -70
- package/@types/directive/messages/messages.d.ts +0 -63
- package/@types/directive/model/model.d.ts +0 -515
- package/@types/directive/model-options/model-options.d.ts +0 -56
- package/@types/directive/non-bindable/non-bindable.d.ts +0 -4
- package/@types/directive/observe/observe.d.ts +0 -9
- package/@types/directive/options/options.d.ts +0 -13
- package/@types/directive/ref/ref.d.ts +0 -11
- package/@types/directive/repeat/repeat.d.ts +0 -11
- package/@types/directive/script/script.d.ts +0 -10
- package/@types/directive/select/select.d.ts +0 -15
- package/@types/directive/setter/setter.d.ts +0 -12
- package/@types/directive/show-hide/show-hide.d.ts +0 -19
- package/@types/directive/style/style.d.ts +0 -4
- package/@types/directive/switch/switch.d.ts +0 -18
- package/@types/directive/transclude/transclude.d.ts +0 -10
- package/@types/directive/validators/validators.d.ts +0 -149
- package/@types/filters/filter.d.ts +0 -4
- package/@types/filters/filters.d.ts +0 -38
- package/@types/filters/limit-to.d.ts +0 -4
- package/@types/filters/order-by.d.ts +0 -7
- package/@types/index.d.ts +0 -2
- package/@types/ng.d.ts +0 -8
- package/@types/router/common/trace.d.ts +0 -66
- package/@types/router/directives/state-directives.d.ts +0 -46
- package/@types/router/directives/view-directive.d.ts +0 -138
- package/@types/router/glob/glob.d.ts +0 -81
- package/@types/router/hooks/core-resolvables.d.ts +0 -2
- package/@types/router/hooks/ignored-transition.d.ts +0 -1
- package/@types/router/hooks/invalid-transition.d.ts +0 -1
- package/@types/router/hooks/lazy-load.d.ts +0 -42
- package/@types/router/hooks/on-enter-exit-retain.d.ts +0 -3
- package/@types/router/hooks/redirect-to.d.ts +0 -4
- package/@types/router/hooks/resolve.d.ts +0 -4
- package/@types/router/hooks/update-globals.d.ts +0 -1
- package/@types/router/hooks/url.d.ts +0 -5
- package/@types/router/hooks/views.d.ts +0 -5
- package/@types/router/params/interface.d.ts +0 -606
- package/@types/router/params/param-factory.d.ts +0 -16
- package/@types/router/params/param-type.d.ts +0 -59
- package/@types/router/params/param-types.d.ts +0 -36
- package/@types/router/params/param.d.ts +0 -71
- package/@types/router/params/state-params.d.ts +0 -12
- package/@types/router/path/path-node.d.ts +0 -38
- package/@types/router/path/path-utils.d.ts +0 -88
- package/@types/router/resolve/interface.d.ts +0 -200
- package/@types/router/resolve/resolvable.d.ts +0 -50
- package/@types/router/resolve/resolve-context.d.ts +0 -102
- package/@types/router/router.d.ts +0 -47
- package/@types/router/state/interface.d.ts +0 -983
- package/@types/router/state/state-builder.d.ts +0 -95
- package/@types/router/state/state-matcher.d.ts +0 -7
- package/@types/router/state/state-object.d.ts +0 -83
- package/@types/router/state/state-queue-manager.d.ts +0 -29
- package/@types/router/state/state-registry.d.ts +0 -134
- package/@types/router/state/state-service.d.ts +0 -419
- package/@types/router/state/target-state.d.ts +0 -102
- package/@types/router/state/views.d.ts +0 -58
- package/@types/router/state-filters.d.ts +0 -39
- package/@types/router/template-factory.d.ts +0 -117
- package/@types/router/transition/hook-builder.d.ts +0 -45
- package/@types/router/transition/hook-registry.d.ts +0 -102
- package/@types/router/transition/interface.d.ts +0 -880
- package/@types/router/transition/reject-factory.d.ts +0 -43
- package/@types/router/transition/transition-event-type.d.ts +0 -24
- package/@types/router/transition/transition-hook.d.ts +0 -86
- package/@types/router/transition/transition-service.d.ts +0 -116
- package/@types/router/transition/transition.d.ts +0 -396
- package/@types/router/url/url-config.d.ts +0 -99
- package/@types/router/url/url-matcher.d.ts +0 -174
- package/@types/router/url/url-rule.d.ts +0 -161
- package/@types/router/url/url-rules.d.ts +0 -249
- package/@types/router/url/url-service.d.ts +0 -254
- package/@types/router/view/interface.d.ts +0 -44
- package/@types/router/view/view.d.ts +0 -149
- package/@types/router/view-scroll.d.ts +0 -10
- package/@types/services/anchor-scroll.d.ts +0 -25
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http/http.d.ts +0 -134
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/sce/sce.d.ts +0 -238
- package/@types/services/template-request.d.ts +0 -55
- package/@types/shared/common.d.ts +0 -197
- package/@types/shared/hof.d.ts +0 -108
- package/@types/shared/predicates.d.ts +0 -17
- package/@types/shared/queue.d.ts +0 -64
- package/@types/shared/strings.d.ts +0 -58
- package/@types/shared/test-utils.d.ts +0 -18
- package/docs/static/typedoc/classes/NgModule.html +0 -32
- package/src/router/params/README.md +0 -8
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].
|
|
3
|
-
*
|
|
4
|
-
* When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
|
|
5
|
-
* validates the `resolve` property and converts it to a [[Resolvable]] array.
|
|
6
|
-
*
|
|
7
|
-
* resolve: input value can be:
|
|
8
|
-
*
|
|
9
|
-
* {
|
|
10
|
-
* // analyzed but not injected
|
|
11
|
-
* myFooResolve: function() { return "myFooData"; },
|
|
12
|
-
*
|
|
13
|
-
* // function.toString() parsed, "DependencyName" dep as string (not min-safe)
|
|
14
|
-
* myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },
|
|
15
|
-
*
|
|
16
|
-
* // Array split; "DependencyName" dep as string
|
|
17
|
-
* myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() },
|
|
18
|
-
*
|
|
19
|
-
* // Array split; DependencyType dep as token (compared using ===)
|
|
20
|
-
* myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },
|
|
21
|
-
*
|
|
22
|
-
* // val.$inject used as deps
|
|
23
|
-
* // where:
|
|
24
|
-
* // corgeResolve.$inject = ["DependencyName"];
|
|
25
|
-
* // function corgeResolve(dep) { dep.fetchSometingAsPromise() }
|
|
26
|
-
* // then "DependencyName" dep as string
|
|
27
|
-
* myCorgeResolve: corgeResolve,
|
|
28
|
-
*
|
|
29
|
-
* // inject service by name
|
|
30
|
-
* // When a string is found, desugar creating a resolve that injects the named service
|
|
31
|
-
* myGraultResolve: "SomeService"
|
|
32
|
-
* }
|
|
33
|
-
*
|
|
34
|
-
* or:
|
|
35
|
-
*
|
|
36
|
-
* [
|
|
37
|
-
* new Resolvable("myFooResolve", function() { return "myFooData" }),
|
|
38
|
-
* new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]),
|
|
39
|
-
* { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] }
|
|
40
|
-
* ]
|
|
41
|
-
*/
|
|
42
|
-
export function resolvablesBuilder(state: any): any[];
|
|
43
|
-
/**
|
|
44
|
-
* A internal global service
|
|
45
|
-
*
|
|
46
|
-
* StateBuilder is a factory for the internal [[StateObject]] objects.
|
|
47
|
-
*
|
|
48
|
-
* When you register a state with the [[StateRegistry]], you register a plain old javascript object which
|
|
49
|
-
* conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding
|
|
50
|
-
* [[StateObject]] object, which has an API and is used internally.
|
|
51
|
-
*
|
|
52
|
-
* Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function
|
|
53
|
-
* using the [[builder]] method.
|
|
54
|
-
*/
|
|
55
|
-
export class StateBuilder {
|
|
56
|
-
/**
|
|
57
|
-
* @param {import('./state-matcher.js').StateMatcher} matcher
|
|
58
|
-
* @param urlService
|
|
59
|
-
*/
|
|
60
|
-
constructor(
|
|
61
|
-
matcher: import("./state-matcher.js").StateMatcher,
|
|
62
|
-
urlService: any,
|
|
63
|
-
);
|
|
64
|
-
matcher: import("./state-matcher.js").StateMatcher;
|
|
65
|
-
$injector: any;
|
|
66
|
-
builders: {
|
|
67
|
-
name: ((state: any) => any)[];
|
|
68
|
-
self: (typeof selfBuilder)[];
|
|
69
|
-
parent: ((state: any) => any)[];
|
|
70
|
-
data: (typeof dataBuilder)[];
|
|
71
|
-
url: ((stateObject: any) => any)[];
|
|
72
|
-
navigable: ((state: any) => any)[];
|
|
73
|
-
params: ((state: any) => any)[];
|
|
74
|
-
views: any[];
|
|
75
|
-
path: (typeof pathBuilder)[];
|
|
76
|
-
includes: (typeof includesBuilder)[];
|
|
77
|
-
resolvables: (typeof resolvablesBuilder)[];
|
|
78
|
-
};
|
|
79
|
-
builder(name: any, fn: any): any;
|
|
80
|
-
/**
|
|
81
|
-
* Builds all of the properties on an essentially blank State object, returning a State object which has all its
|
|
82
|
-
* properties and API built.
|
|
83
|
-
*
|
|
84
|
-
* @param state an uninitialized State object
|
|
85
|
-
* @returns the built State object
|
|
86
|
-
*/
|
|
87
|
-
build(state: any): any;
|
|
88
|
-
parentName(state: any): any;
|
|
89
|
-
name(state: any): any;
|
|
90
|
-
}
|
|
91
|
-
declare function selfBuilder(state: any): any;
|
|
92
|
-
declare function dataBuilder(state: any): any;
|
|
93
|
-
declare function pathBuilder(state: any): any;
|
|
94
|
-
declare function includesBuilder(state: any): any;
|
|
95
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/** @typedef {import('./interface.js').StateDeclaration} StateDeclaration */
|
|
2
|
-
/**
|
|
3
|
-
* Internal representation of a ng-router state.
|
|
4
|
-
*
|
|
5
|
-
* Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
|
|
6
|
-
*
|
|
7
|
-
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.
|
|
8
|
-
*
|
|
9
|
-
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
10
|
-
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
11
|
-
* @implements {StateDeclaration}
|
|
12
|
-
*/
|
|
13
|
-
export class StateObject implements StateDeclaration {
|
|
14
|
-
/**
|
|
15
|
-
* @param {import('./interface.js').StateDeclaration} config
|
|
16
|
-
*/
|
|
17
|
-
constructor(config: import("./interface.js").StateDeclaration);
|
|
18
|
-
name: any;
|
|
19
|
-
navigable: any;
|
|
20
|
-
/** @type {?StateObject} */
|
|
21
|
-
parent: StateObject | null;
|
|
22
|
-
params: any;
|
|
23
|
-
url: any;
|
|
24
|
-
includes: any;
|
|
25
|
-
$$state: () => this;
|
|
26
|
-
/**
|
|
27
|
-
* @type {import('./interface.js').StateDeclaration}
|
|
28
|
-
*/
|
|
29
|
-
self: import("./interface.js").StateDeclaration;
|
|
30
|
-
__stateObjectCache: {
|
|
31
|
-
nameGlob: Glob;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Returns true if the provided parameter is the same state.
|
|
35
|
-
*
|
|
36
|
-
* Compares the identity of the state against the passed value, which is either an object
|
|
37
|
-
* reference to the actual `State` instance, the original definition object passed to
|
|
38
|
-
* `$stateProvider.state()`, or the fully-qualified name.
|
|
39
|
-
*
|
|
40
|
-
* @param ref Can be one of (a) a `State` instance, (b) an object that was passed
|
|
41
|
-
* into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.
|
|
42
|
-
* @returns Returns `true` if `ref` matches the current `State` instance.
|
|
43
|
-
*/
|
|
44
|
-
is(ref: any): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated this does not properly handle dot notation
|
|
47
|
-
* @returns Returns a dot-separated name of the state.
|
|
48
|
-
*/
|
|
49
|
-
fqn(): any;
|
|
50
|
-
/**
|
|
51
|
-
* Returns the root node of this state's tree.
|
|
52
|
-
*
|
|
53
|
-
* @returns The root of this state's tree.
|
|
54
|
-
*/
|
|
55
|
-
root(): any;
|
|
56
|
-
/**
|
|
57
|
-
* Gets the state's `Param` objects
|
|
58
|
-
*
|
|
59
|
-
* Gets the list of [[Param]] objects owned by the state.
|
|
60
|
-
* If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.
|
|
61
|
-
* If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object
|
|
62
|
-
*
|
|
63
|
-
* @param opts options
|
|
64
|
-
*/
|
|
65
|
-
parameters(opts: any): any;
|
|
66
|
-
/**
|
|
67
|
-
* Returns a single [[Param]] that is owned by the state
|
|
68
|
-
*
|
|
69
|
-
* If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.
|
|
70
|
-
* @param id the name of the [[Param]] to return
|
|
71
|
-
* @param opts options
|
|
72
|
-
*/
|
|
73
|
-
parameter(id: any, opts?: {}): any;
|
|
74
|
-
toString(): any;
|
|
75
|
-
}
|
|
76
|
-
export namespace StateObject {
|
|
77
|
-
/** Predicate which returns true if the object is a [[StateDeclaration]] object */
|
|
78
|
-
function isStateDeclaration(obj: any): boolean;
|
|
79
|
-
/** Predicate which returns true if the object is an internal [[StateObject]] object */
|
|
80
|
-
function isState(obj: any): boolean;
|
|
81
|
-
}
|
|
82
|
-
export type StateDeclaration = import("./interface.js").StateDeclaration;
|
|
83
|
-
import { Glob } from "../glob/glob.js";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export class StateQueueManager {
|
|
2
|
-
/**
|
|
3
|
-
* @param {import("./state-registry.js").StateRegistryProvider} stateRegistry
|
|
4
|
-
* @param {*} urlServiceRules
|
|
5
|
-
* @param {*} states
|
|
6
|
-
* @param {*} builder
|
|
7
|
-
* @param {*} listeners
|
|
8
|
-
*/
|
|
9
|
-
constructor(
|
|
10
|
-
stateRegistry: import("./state-registry.js").StateRegistryProvider,
|
|
11
|
-
urlServiceRules: any,
|
|
12
|
-
states: any,
|
|
13
|
-
builder: any,
|
|
14
|
-
listeners: any,
|
|
15
|
-
);
|
|
16
|
-
stateRegistry: import("./state-registry.js").StateRegistryProvider;
|
|
17
|
-
urlServiceRules: any;
|
|
18
|
-
states: any;
|
|
19
|
-
builder: any;
|
|
20
|
-
listeners: any;
|
|
21
|
-
/**
|
|
22
|
-
* @type {Array<StateObject>}
|
|
23
|
-
*/
|
|
24
|
-
queue: Array<StateObject>;
|
|
25
|
-
register(stateDecl: any): StateObject;
|
|
26
|
-
flush(): any;
|
|
27
|
-
attachRoute(state: any): void;
|
|
28
|
-
}
|
|
29
|
-
import { StateObject } from "./state-object.js";
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider } */
|
|
2
|
-
/**
|
|
3
|
-
* A registry for all of the application's [[StateDeclaration]]s
|
|
4
|
-
*
|
|
5
|
-
* This API is found at `$stateRegistry` ([[UIRouter.stateRegistry]])
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export class StateRegistryProvider {
|
|
9
|
-
static $inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* @param urlService
|
|
12
|
-
* @param stateService
|
|
13
|
-
* @param {import('../router.js').Router} globals
|
|
14
|
-
* @param viewService
|
|
15
|
-
*/
|
|
16
|
-
constructor(
|
|
17
|
-
urlService: any,
|
|
18
|
-
stateService: any,
|
|
19
|
-
globals: import("../router.js").Router,
|
|
20
|
-
viewService: any,
|
|
21
|
-
);
|
|
22
|
-
states: {};
|
|
23
|
-
urlService: any;
|
|
24
|
-
urlServiceRules: any;
|
|
25
|
-
$injector: any;
|
|
26
|
-
listeners: any[];
|
|
27
|
-
matcher: StateMatcher;
|
|
28
|
-
builder: StateBuilder;
|
|
29
|
-
stateQueue: StateQueueManager;
|
|
30
|
-
/** @type {import('../../interface.ts').AnnotatedFactory} */
|
|
31
|
-
$get: import("../../interface.ts").AnnotatedFactory;
|
|
32
|
-
/**
|
|
33
|
-
* This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
|
|
34
|
-
* `onRetain` callback hooks on a [[StateDeclaration]].
|
|
35
|
-
*
|
|
36
|
-
* When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
|
|
37
|
-
* ensures that those hooks are injectable for @uirouter/angularjs (ng1).
|
|
38
|
-
*
|
|
39
|
-
* @internalapi
|
|
40
|
-
*/
|
|
41
|
-
getStateHookBuilder(
|
|
42
|
-
hookName: any,
|
|
43
|
-
): (stateObject: any) => (trans: any, state: any) => any;
|
|
44
|
-
/**
|
|
45
|
-
* @private
|
|
46
|
-
*/
|
|
47
|
-
private registerRoot;
|
|
48
|
-
_root: import("./state-object.js").StateObject;
|
|
49
|
-
/**
|
|
50
|
-
* Listen for a State Registry events
|
|
51
|
-
*
|
|
52
|
-
* Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.
|
|
53
|
-
*
|
|
54
|
-
* #### Example:
|
|
55
|
-
* ```js
|
|
56
|
-
* let allStates = registry.get();
|
|
57
|
-
*
|
|
58
|
-
* // Later, invoke deregisterFn() to remove the listener
|
|
59
|
-
* let deregisterFn = registry.onStatesChanged((event, states) => {
|
|
60
|
-
* switch(event) {
|
|
61
|
-
* case: 'registered':
|
|
62
|
-
* states.forEach(state => allStates.push(state));
|
|
63
|
-
* break;
|
|
64
|
-
* case: 'deregistered':
|
|
65
|
-
* states.forEach(state => {
|
|
66
|
-
* let idx = allStates.indexOf(state);
|
|
67
|
-
* if (idx !== -1) allStates.splice(idx, 1);
|
|
68
|
-
* });
|
|
69
|
-
* break;
|
|
70
|
-
* }
|
|
71
|
-
* });
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* @param listener a callback function invoked when the registered states changes.
|
|
75
|
-
* The function receives two parameters, `event` and `state`.
|
|
76
|
-
* See [[StateRegistryListener]]
|
|
77
|
-
* @return a function that deregisters the listener
|
|
78
|
-
*/
|
|
79
|
-
onStatesChanged(listener: any): any;
|
|
80
|
-
/**
|
|
81
|
-
* Gets the implicit root state
|
|
82
|
-
*
|
|
83
|
-
* Gets the root of the state tree.
|
|
84
|
-
* The root state is implicitly created by ng-router.
|
|
85
|
-
* Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
|
|
86
|
-
*
|
|
87
|
-
* @return the root [[StateObject]]
|
|
88
|
-
*/
|
|
89
|
-
root(): import("./state-object.js").StateObject;
|
|
90
|
-
/**
|
|
91
|
-
* Adds a state to the registry
|
|
92
|
-
*
|
|
93
|
-
* Registers a [[StateDeclaration]] or queues it for registration.
|
|
94
|
-
*
|
|
95
|
-
* Note: a state will be queued if the state's parent isn't yet registered.
|
|
96
|
-
*
|
|
97
|
-
* @param stateDefinition the definition of the state to register.
|
|
98
|
-
* @returns the internal [[StateObject]] object.
|
|
99
|
-
* If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).
|
|
100
|
-
* If the state was only queued, then the object is not fully built.
|
|
101
|
-
*/
|
|
102
|
-
register(stateDefinition: any): import("./state-object.js").StateObject;
|
|
103
|
-
_deregisterTree(state: any): any[];
|
|
104
|
-
/**
|
|
105
|
-
* Removes a state from the registry
|
|
106
|
-
*
|
|
107
|
-
* This removes a state from the registry.
|
|
108
|
-
* If the state has children, they are are also removed from the registry.
|
|
109
|
-
*
|
|
110
|
-
* @param stateOrName the state's name or object representation
|
|
111
|
-
* @returns {import('./state-object').StateObject[]} a list of removed states
|
|
112
|
-
*/
|
|
113
|
-
deregister(stateOrName: any): any[];
|
|
114
|
-
get(stateOrName: any, base: any, ...args: any[]): any;
|
|
115
|
-
/**
|
|
116
|
-
* Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
|
|
117
|
-
* More than one BuilderFunction can be registered for a given property.
|
|
118
|
-
*
|
|
119
|
-
* The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
|
|
120
|
-
*
|
|
121
|
-
* @param property The name of the State property being registered for.
|
|
122
|
-
* @param builderFunction The BuilderFunction which will be used to build the State property
|
|
123
|
-
* @returns a function which deregisters the BuilderFunction
|
|
124
|
-
*/
|
|
125
|
-
decorator(property: any, builderFunction: any): any;
|
|
126
|
-
}
|
|
127
|
-
export function getLocals(ctx: any): any;
|
|
128
|
-
/**
|
|
129
|
-
* }
|
|
130
|
-
*/
|
|
131
|
-
export type ServiceProvider = import("../../interface.ts").ServiceProvider;
|
|
132
|
-
import { StateMatcher } from "./state-matcher.js";
|
|
133
|
-
import { StateBuilder } from "./state-builder.js";
|
|
134
|
-
import { StateQueueManager } from "./state-queue-manager.js";
|