@angular-wave/angular.ts 0.9.1 → 0.9.3

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 (134) hide show
  1. package/@types/angular.d.ts +150 -0
  2. package/@types/animations/animate-cache.d.ts +50 -0
  3. package/@types/animations/animate-children-directive.d.ts +10 -0
  4. package/@types/animations/animate-css-driver.d.ts +18 -0
  5. package/@types/animations/animate-css.d.ts +18 -0
  6. package/@types/animations/animate-js-driver.d.ts +14 -0
  7. package/@types/animations/animate-js.d.ts +23 -0
  8. package/@types/animations/animate-queue.d.ts +28 -0
  9. package/@types/animations/animate-runner.d.ts +31 -0
  10. package/@types/animations/animate-swap.d.ts +9 -0
  11. package/@types/animations/animate.d.ts +450 -0
  12. package/@types/animations/animation.d.ts +14 -0
  13. package/@types/animations/interface.d.ts +17 -0
  14. package/@types/animations/raf-scheduler.d.ts +37 -0
  15. package/@types/animations/shared.d.ts +74 -0
  16. package/@types/core/compile/compile.d.ts +201 -0
  17. package/@types/core/controller/controller.d.ts +54 -0
  18. package/@types/core/di/injector.d.ts +22 -0
  19. package/@types/core/filter/filter.d.ts +23 -0
  20. package/@types/core/interpolate/interpolate.d.ts +38 -0
  21. package/@types/core/parse/ast/ast-node.d.ts +56 -0
  22. package/@types/core/parse/ast/ast.d.ts +164 -0
  23. package/@types/core/parse/lexer/lexer.d.ts +119 -0
  24. package/@types/core/parse/lexer/token.d.ts +17 -0
  25. package/@types/core/parse/parse.d.ts +33 -0
  26. package/@types/core/parse/parser/parser.d.ts +41 -0
  27. package/@types/core/sanitize/sanitize-uri.d.ts +40 -0
  28. package/@types/directive/aria/aria.d.ts +104 -0
  29. package/@types/directive/attrs/attrs.d.ts +8 -0
  30. package/@types/directive/bind/bind.d.ts +18 -0
  31. package/@types/directive/channel/channel.d.ts +10 -0
  32. package/@types/directive/class/class.d.ts +3 -0
  33. package/@types/directive/cloak/cloak.d.ts +4 -0
  34. package/@types/directive/controller/controller.d.ts +4 -0
  35. package/@types/directive/events/events.d.ts +21 -0
  36. package/@types/directive/form/form.d.ts +264 -0
  37. package/@types/directive/http/http.d.ts +46 -0
  38. package/@types/directive/if/if.d.ts +10 -0
  39. package/@types/directive/include/include.d.ts +28 -0
  40. package/@types/directive/init/init.d.ts +4 -0
  41. package/@types/directive/input/input.d.ts +70 -0
  42. package/@types/directive/messages/messages.d.ts +63 -0
  43. package/@types/directive/model/model.d.ts +515 -0
  44. package/@types/directive/model-options/model-options.d.ts +56 -0
  45. package/@types/directive/non-bindable/non-bindable.d.ts +4 -0
  46. package/@types/directive/observe/observe.d.ts +9 -0
  47. package/@types/directive/options/options.d.ts +13 -0
  48. package/@types/directive/ref/ref.d.ts +11 -0
  49. package/@types/directive/repeat/repeat.d.ts +11 -0
  50. package/@types/directive/script/script.d.ts +10 -0
  51. package/@types/directive/select/select.d.ts +15 -0
  52. package/@types/directive/setter/setter.d.ts +12 -0
  53. package/@types/directive/show-hide/show-hide.d.ts +19 -0
  54. package/@types/directive/style/style.d.ts +4 -0
  55. package/@types/directive/switch/switch.d.ts +18 -0
  56. package/@types/directive/transclude/transclude.d.ts +10 -0
  57. package/@types/directive/validators/validators.d.ts +149 -0
  58. package/@types/filters/filter.d.ts +4 -0
  59. package/@types/filters/filters.d.ts +38 -0
  60. package/@types/filters/limit-to.d.ts +4 -0
  61. package/@types/filters/order-by.d.ts +7 -0
  62. package/@types/index.d.ts +2 -0
  63. package/@types/interface.d.ts +5 -4
  64. package/@types/ng.d.ts +8 -0
  65. package/@types/router/common/trace.d.ts +66 -0
  66. package/@types/router/directives/state-directives.d.ts +46 -0
  67. package/@types/router/directives/view-directive.d.ts +138 -0
  68. package/@types/router/glob/glob.d.ts +81 -0
  69. package/@types/router/hooks/core-resolvables.d.ts +2 -0
  70. package/@types/router/hooks/ignored-transition.d.ts +1 -0
  71. package/@types/router/hooks/invalid-transition.d.ts +1 -0
  72. package/@types/router/hooks/lazy-load.d.ts +42 -0
  73. package/@types/router/hooks/on-enter-exit-retain.d.ts +3 -0
  74. package/@types/router/hooks/redirect-to.d.ts +4 -0
  75. package/@types/router/hooks/resolve.d.ts +4 -0
  76. package/@types/router/hooks/update-globals.d.ts +1 -0
  77. package/@types/router/hooks/url.d.ts +5 -0
  78. package/@types/router/hooks/views.d.ts +5 -0
  79. package/@types/router/params/interface.d.ts +606 -0
  80. package/@types/router/params/param-factory.d.ts +16 -0
  81. package/@types/router/params/param-type.d.ts +59 -0
  82. package/@types/router/params/param.d.ts +71 -0
  83. package/@types/router/params/state-params.d.ts +12 -0
  84. package/@types/router/path/path-node.d.ts +38 -0
  85. package/@types/router/path/path-utils.d.ts +88 -0
  86. package/@types/router/resolve/interface.d.ts +200 -0
  87. package/@types/router/resolve/resolvable.d.ts +50 -0
  88. package/@types/router/resolve/resolve-context.d.ts +93 -0
  89. package/@types/router/router.d.ts +47 -0
  90. package/@types/router/state/interface.d.ts +983 -0
  91. package/@types/router/state/state-builder.d.ts +95 -0
  92. package/@types/router/state/state-matcher.d.ts +7 -0
  93. package/@types/router/state/state-object.d.ts +83 -0
  94. package/@types/router/state/state-queue-manager.d.ts +29 -0
  95. package/@types/router/state/state-registry.d.ts +133 -0
  96. package/@types/router/state/state-service.d.ts +425 -0
  97. package/@types/router/state/target-state.d.ts +102 -0
  98. package/@types/router/state/views.d.ts +58 -0
  99. package/@types/router/state-filters.d.ts +39 -0
  100. package/@types/router/template-factory.d.ts +117 -0
  101. package/@types/router/transition/hook-builder.d.ts +45 -0
  102. package/@types/router/transition/hook-registry.d.ts +102 -0
  103. package/@types/router/transition/interface.d.ts +880 -0
  104. package/@types/router/transition/reject-factory.d.ts +43 -0
  105. package/@types/router/transition/transition-event-type.d.ts +24 -0
  106. package/@types/router/transition/transition-hook.d.ts +86 -0
  107. package/@types/router/transition/transition-service.d.ts +116 -0
  108. package/@types/router/transition/transition.d.ts +331 -0
  109. package/@types/router/url/url-config.d.ts +99 -0
  110. package/@types/router/url/url-matcher.d.ts +174 -0
  111. package/@types/router/url/url-rule.d.ts +161 -0
  112. package/@types/router/url/url-rules.d.ts +249 -0
  113. package/@types/router/url/url-service.d.ts +254 -0
  114. package/@types/router/view/interface.d.ts +44 -0
  115. package/@types/router/view/view.d.ts +149 -0
  116. package/@types/router/view-scroll.d.ts +10 -0
  117. package/@types/services/anchor-scroll.d.ts +25 -0
  118. package/@types/services/cookie-reader.d.ts +4 -0
  119. package/@types/services/http/http.d.ts +134 -0
  120. package/@types/services/http-backend/http-backend.d.ts +58 -0
  121. package/@types/services/sce/sce.d.ts +238 -0
  122. package/@types/services/template-request.d.ts +55 -0
  123. package/@types/shared/common.d.ts +197 -0
  124. package/@types/shared/hof.d.ts +108 -0
  125. package/@types/shared/predicates.d.ts +17 -0
  126. package/@types/shared/queue.d.ts +64 -0
  127. package/@types/shared/strings.d.ts +58 -0
  128. package/dist/angular-ts.esm.js +2 -3
  129. package/dist/angular-ts.umd.js +2 -3
  130. package/dist/angular-ts.umd.min.js +1 -1
  131. package/docs/layouts/shortcodes/version.html +1 -1
  132. package/package.json +1 -1
  133. package/src/interface.ts +5 -4
  134. package/src/services/pubsub/pubsub.js +0 -1
@@ -0,0 +1,95 @@
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 {};
@@ -0,0 +1,7 @@
1
+ export class StateMatcher {
2
+ constructor(_states: any);
3
+ _states: any;
4
+ isRelative(stateName: any): boolean;
5
+ find(stateOrName: any, base: any, matchGlob?: boolean): any;
6
+ resolvePath(name: any, base: any): string;
7
+ }
@@ -0,0 +1,83 @@
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";
@@ -0,0 +1,29 @@
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";
@@ -0,0 +1,133 @@
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
+ $get: (string | (($injector: any) => StateRegistryProvider))[];
31
+ /**
32
+ * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
33
+ * `onRetain` callback hooks on a [[StateDeclaration]].
34
+ *
35
+ * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
36
+ * ensures that those hooks are injectable for @uirouter/angularjs (ng1).
37
+ *
38
+ * @internalapi
39
+ */
40
+ getStateHookBuilder(
41
+ hookName: any,
42
+ ): (stateObject: any) => (trans: any, state: any) => any;
43
+ /**
44
+ * @private
45
+ */
46
+ private registerRoot;
47
+ _root: import("./state-object.js").StateObject;
48
+ /**
49
+ * Listen for a State Registry events
50
+ *
51
+ * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.
52
+ *
53
+ * #### Example:
54
+ * ```js
55
+ * let allStates = registry.get();
56
+ *
57
+ * // Later, invoke deregisterFn() to remove the listener
58
+ * let deregisterFn = registry.onStatesChanged((event, states) => {
59
+ * switch(event) {
60
+ * case: 'registered':
61
+ * states.forEach(state => allStates.push(state));
62
+ * break;
63
+ * case: 'deregistered':
64
+ * states.forEach(state => {
65
+ * let idx = allStates.indexOf(state);
66
+ * if (idx !== -1) allStates.splice(idx, 1);
67
+ * });
68
+ * break;
69
+ * }
70
+ * });
71
+ * ```
72
+ *
73
+ * @param listener a callback function invoked when the registered states changes.
74
+ * The function receives two parameters, `event` and `state`.
75
+ * See [[StateRegistryListener]]
76
+ * @return a function that deregisters the listener
77
+ */
78
+ onStatesChanged(listener: any): any;
79
+ /**
80
+ * Gets the implicit root state
81
+ *
82
+ * Gets the root of the state tree.
83
+ * The root state is implicitly created by ng-router.
84
+ * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
85
+ *
86
+ * @return the root [[StateObject]]
87
+ */
88
+ root(): import("./state-object.js").StateObject;
89
+ /**
90
+ * Adds a state to the registry
91
+ *
92
+ * Registers a [[StateDeclaration]] or queues it for registration.
93
+ *
94
+ * Note: a state will be queued if the state's parent isn't yet registered.
95
+ *
96
+ * @param stateDefinition the definition of the state to register.
97
+ * @returns the internal [[StateObject]] object.
98
+ * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).
99
+ * If the state was only queued, then the object is not fully built.
100
+ */
101
+ register(stateDefinition: any): import("./state-object.js").StateObject;
102
+ _deregisterTree(state: any): any[];
103
+ /**
104
+ * Removes a state from the registry
105
+ *
106
+ * This removes a state from the registry.
107
+ * If the state has children, they are are also removed from the registry.
108
+ *
109
+ * @param stateOrName the state's name or object representation
110
+ * @returns {import('./state-object').StateObject[]} a list of removed states
111
+ */
112
+ deregister(stateOrName: any): any[];
113
+ get(stateOrName: any, base: any, ...args: any[]): any;
114
+ /**
115
+ * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
116
+ * More than one BuilderFunction can be registered for a given property.
117
+ *
118
+ * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
119
+ *
120
+ * @param property The name of the State property being registered for.
121
+ * @param builderFunction The BuilderFunction which will be used to build the State property
122
+ * @returns a function which deregisters the BuilderFunction
123
+ */
124
+ decorator(property: any, builderFunction: any): any;
125
+ }
126
+ export function getLocals(ctx: any): any;
127
+ /**
128
+ * }
129
+ */
130
+ export type ServiceProvider = import("../../interface.ts").ServiceProvider;
131
+ import { StateMatcher } from "./state-matcher.js";
132
+ import { StateBuilder } from "./state-builder.js";
133
+ import { StateQueueManager } from "./state-queue-manager.js";