@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.
- package/@types/angular.d.ts +150 -0
- package/@types/animations/animate-cache.d.ts +50 -0
- package/@types/animations/animate-children-directive.d.ts +10 -0
- package/@types/animations/animate-css-driver.d.ts +18 -0
- package/@types/animations/animate-css.d.ts +18 -0
- package/@types/animations/animate-js-driver.d.ts +14 -0
- package/@types/animations/animate-js.d.ts +23 -0
- package/@types/animations/animate-queue.d.ts +28 -0
- package/@types/animations/animate-runner.d.ts +31 -0
- package/@types/animations/animate-swap.d.ts +9 -0
- package/@types/animations/animate.d.ts +450 -0
- package/@types/animations/animation.d.ts +14 -0
- package/@types/animations/interface.d.ts +17 -0
- package/@types/animations/raf-scheduler.d.ts +37 -0
- package/@types/animations/shared.d.ts +74 -0
- package/@types/core/compile/compile.d.ts +201 -0
- package/@types/core/controller/controller.d.ts +54 -0
- package/@types/core/di/injector.d.ts +22 -0
- package/@types/core/filter/filter.d.ts +23 -0
- package/@types/core/interpolate/interpolate.d.ts +38 -0
- package/@types/core/parse/ast/ast-node.d.ts +56 -0
- package/@types/core/parse/ast/ast.d.ts +164 -0
- package/@types/core/parse/lexer/lexer.d.ts +119 -0
- package/@types/core/parse/lexer/token.d.ts +17 -0
- package/@types/core/parse/parse.d.ts +33 -0
- package/@types/core/parse/parser/parser.d.ts +41 -0
- package/@types/core/sanitize/sanitize-uri.d.ts +40 -0
- package/@types/directive/aria/aria.d.ts +104 -0
- package/@types/directive/attrs/attrs.d.ts +8 -0
- package/@types/directive/bind/bind.d.ts +18 -0
- package/@types/directive/channel/channel.d.ts +10 -0
- package/@types/directive/class/class.d.ts +3 -0
- package/@types/directive/cloak/cloak.d.ts +4 -0
- package/@types/directive/controller/controller.d.ts +4 -0
- package/@types/directive/events/events.d.ts +21 -0
- package/@types/directive/form/form.d.ts +264 -0
- package/@types/directive/http/http.d.ts +46 -0
- package/@types/directive/if/if.d.ts +10 -0
- package/@types/directive/include/include.d.ts +28 -0
- package/@types/directive/init/init.d.ts +4 -0
- package/@types/directive/input/input.d.ts +70 -0
- package/@types/directive/messages/messages.d.ts +63 -0
- package/@types/directive/model/model.d.ts +515 -0
- package/@types/directive/model-options/model-options.d.ts +56 -0
- package/@types/directive/non-bindable/non-bindable.d.ts +4 -0
- package/@types/directive/observe/observe.d.ts +9 -0
- package/@types/directive/options/options.d.ts +13 -0
- package/@types/directive/ref/ref.d.ts +11 -0
- package/@types/directive/repeat/repeat.d.ts +11 -0
- package/@types/directive/script/script.d.ts +10 -0
- package/@types/directive/select/select.d.ts +15 -0
- package/@types/directive/setter/setter.d.ts +12 -0
- package/@types/directive/show-hide/show-hide.d.ts +19 -0
- package/@types/directive/style/style.d.ts +4 -0
- package/@types/directive/switch/switch.d.ts +18 -0
- package/@types/directive/transclude/transclude.d.ts +10 -0
- package/@types/directive/validators/validators.d.ts +149 -0
- package/@types/filters/filter.d.ts +4 -0
- package/@types/filters/filters.d.ts +38 -0
- package/@types/filters/limit-to.d.ts +4 -0
- package/@types/filters/order-by.d.ts +7 -0
- package/@types/index.d.ts +2 -0
- package/@types/interface.d.ts +5 -4
- package/@types/ng.d.ts +8 -0
- package/@types/router/common/trace.d.ts +66 -0
- package/@types/router/directives/state-directives.d.ts +46 -0
- package/@types/router/directives/view-directive.d.ts +138 -0
- package/@types/router/glob/glob.d.ts +81 -0
- package/@types/router/hooks/core-resolvables.d.ts +2 -0
- package/@types/router/hooks/ignored-transition.d.ts +1 -0
- package/@types/router/hooks/invalid-transition.d.ts +1 -0
- package/@types/router/hooks/lazy-load.d.ts +42 -0
- package/@types/router/hooks/on-enter-exit-retain.d.ts +3 -0
- package/@types/router/hooks/redirect-to.d.ts +4 -0
- package/@types/router/hooks/resolve.d.ts +4 -0
- package/@types/router/hooks/update-globals.d.ts +1 -0
- package/@types/router/hooks/url.d.ts +5 -0
- package/@types/router/hooks/views.d.ts +5 -0
- package/@types/router/params/interface.d.ts +606 -0
- package/@types/router/params/param-factory.d.ts +16 -0
- package/@types/router/params/param-type.d.ts +59 -0
- package/@types/router/params/param.d.ts +71 -0
- package/@types/router/params/state-params.d.ts +12 -0
- package/@types/router/path/path-node.d.ts +38 -0
- package/@types/router/path/path-utils.d.ts +88 -0
- package/@types/router/resolve/interface.d.ts +200 -0
- package/@types/router/resolve/resolvable.d.ts +50 -0
- package/@types/router/resolve/resolve-context.d.ts +93 -0
- package/@types/router/router.d.ts +47 -0
- package/@types/router/state/interface.d.ts +983 -0
- package/@types/router/state/state-builder.d.ts +95 -0
- package/@types/router/state/state-matcher.d.ts +7 -0
- package/@types/router/state/state-object.d.ts +83 -0
- package/@types/router/state/state-queue-manager.d.ts +29 -0
- package/@types/router/state/state-registry.d.ts +133 -0
- package/@types/router/state/state-service.d.ts +425 -0
- package/@types/router/state/target-state.d.ts +102 -0
- package/@types/router/state/views.d.ts +58 -0
- package/@types/router/state-filters.d.ts +39 -0
- package/@types/router/template-factory.d.ts +117 -0
- package/@types/router/transition/hook-builder.d.ts +45 -0
- package/@types/router/transition/hook-registry.d.ts +102 -0
- package/@types/router/transition/interface.d.ts +880 -0
- package/@types/router/transition/reject-factory.d.ts +43 -0
- package/@types/router/transition/transition-event-type.d.ts +24 -0
- package/@types/router/transition/transition-hook.d.ts +86 -0
- package/@types/router/transition/transition-service.d.ts +116 -0
- package/@types/router/transition/transition.d.ts +331 -0
- package/@types/router/url/url-config.d.ts +99 -0
- package/@types/router/url/url-matcher.d.ts +174 -0
- package/@types/router/url/url-rule.d.ts +161 -0
- package/@types/router/url/url-rules.d.ts +249 -0
- package/@types/router/url/url-service.d.ts +254 -0
- package/@types/router/view/interface.d.ts +44 -0
- package/@types/router/view/view.d.ts +149 -0
- package/@types/router/view-scroll.d.ts +10 -0
- package/@types/services/anchor-scroll.d.ts +25 -0
- package/@types/services/cookie-reader.d.ts +4 -0
- package/@types/services/http/http.d.ts +134 -0
- package/@types/services/http-backend/http-backend.d.ts +58 -0
- package/@types/services/sce/sce.d.ts +238 -0
- package/@types/services/template-request.d.ts +55 -0
- package/@types/shared/common.d.ts +197 -0
- package/@types/shared/hof.d.ts +108 -0
- package/@types/shared/predicates.d.ts +17 -0
- package/@types/shared/queue.d.ts +64 -0
- package/@types/shared/strings.d.ts +58 -0
- package/dist/angular-ts.esm.js +2 -3
- package/dist/angular-ts.umd.js +2 -3
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/package.json +1 -1
- package/src/interface.ts +5 -4
- package/src/services/pubsub/pubsub.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef BindingTuple
|
|
3
|
+
* @property {string} name
|
|
4
|
+
* @property {string} type
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Service which manages loading of templates from a ViewConfig.
|
|
8
|
+
*/
|
|
9
|
+
export class TemplateFactoryProvider {
|
|
10
|
+
/** @type {boolean} */
|
|
11
|
+
_useHttp: boolean;
|
|
12
|
+
$get: (
|
|
13
|
+
| string
|
|
14
|
+
| ((
|
|
15
|
+
$http: any,
|
|
16
|
+
$templateCache: import("../services/template-cache/interface.ts").TemplateCache,
|
|
17
|
+
$templateRequest: any,
|
|
18
|
+
$injector: import("../core/di/internal-injector.js").InjectorService,
|
|
19
|
+
) => this)
|
|
20
|
+
)[];
|
|
21
|
+
$templateRequest: any;
|
|
22
|
+
$http: any;
|
|
23
|
+
$templateCache: import("../interface.ts").TemplateCache;
|
|
24
|
+
$injector: import("../core/di/internal-injector.js").InjectorService;
|
|
25
|
+
/**
|
|
26
|
+
* Forces the provider to use $http service directly
|
|
27
|
+
* @param {boolean} value
|
|
28
|
+
*/
|
|
29
|
+
useHttpService(value: boolean): void;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a template from a configuration object.
|
|
32
|
+
*
|
|
33
|
+
* @param config Configuration object for which to load a template.
|
|
34
|
+
* The following properties are search in the specified order, and the first one
|
|
35
|
+
* that is defined is used to create the template:
|
|
36
|
+
*
|
|
37
|
+
* @param {any} config
|
|
38
|
+
* @param {any} params Parameters to pass to the template function.
|
|
39
|
+
* @param {import("./resolve/resolve-context.js").ResolveContext} context The resolve context associated with the template's view
|
|
40
|
+
*
|
|
41
|
+
* @return {string|object} The template html as a string, or a promise for
|
|
42
|
+
* that string,or `null` if no template is configured.
|
|
43
|
+
*/
|
|
44
|
+
fromConfig(
|
|
45
|
+
config: any,
|
|
46
|
+
params: any,
|
|
47
|
+
context: import("./resolve/resolve-context.js").ResolveContext,
|
|
48
|
+
): string | object;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a template from a string or a function returning a string.
|
|
51
|
+
*
|
|
52
|
+
* @param {string | Function} template html template as a string or function that returns an html template as a string.
|
|
53
|
+
* @param {any} [params] Parameters to pass to the template function.
|
|
54
|
+
*
|
|
55
|
+
* @return {string|object} The template html as a string, or a promise for that
|
|
56
|
+
* string.
|
|
57
|
+
*/
|
|
58
|
+
fromString(template: string | Function, params?: any): string | object;
|
|
59
|
+
/**
|
|
60
|
+
* Loads a template from the a URL via `$http` and `$templateCache`.
|
|
61
|
+
*
|
|
62
|
+
* @param {string|Function} url url of the template to load, or a function
|
|
63
|
+
* that returns a url.
|
|
64
|
+
* @param {Object} params Parameters to pass to the url function.
|
|
65
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
66
|
+
* for that string.
|
|
67
|
+
*/
|
|
68
|
+
fromUrl(url: string | Function, params: any): string | Promise<string>;
|
|
69
|
+
/**
|
|
70
|
+
* Creates a template by invoking an injectable provider function.
|
|
71
|
+
*
|
|
72
|
+
* @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
|
|
73
|
+
* @param {Function} params a function used to invoke the template provider
|
|
74
|
+
* @param {import("./resolve/resolve-context.js").ResolveContext} context
|
|
75
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
76
|
+
* for that string.
|
|
77
|
+
*/
|
|
78
|
+
fromProvider(
|
|
79
|
+
provider: import("../interface.ts").Injectable,
|
|
80
|
+
params: Function,
|
|
81
|
+
context: import("./resolve/resolve-context.js").ResolveContext,
|
|
82
|
+
): string | Promise<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a component's template by invoking an injectable provider function.
|
|
85
|
+
*
|
|
86
|
+
* @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
|
|
87
|
+
* @return {Promise<any>} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
88
|
+
*/
|
|
89
|
+
fromComponentProvider(
|
|
90
|
+
provider: import("../interface.ts").Injectable,
|
|
91
|
+
context: any,
|
|
92
|
+
): Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a template from a component's name
|
|
95
|
+
*
|
|
96
|
+
* This implements route-to-component.
|
|
97
|
+
* It works by retrieving the component (directive) metadata from the injector.
|
|
98
|
+
* It analyses the component's bindings, then constructs a template that instantiates the component.
|
|
99
|
+
* The template wires input and output bindings to resolves or from the parent component.
|
|
100
|
+
*
|
|
101
|
+
* @param {any} ngView {object} The parent ng-view (for binding outputs to callbacks)
|
|
102
|
+
* @param {import("./resolve/resolve-context.js").ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
|
|
103
|
+
* @param {string} component {string} Component's name in camel case.
|
|
104
|
+
* @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
|
|
105
|
+
* @return {string} The template as a string: "<component-name input1='$resolve.foo'></component-name>".
|
|
106
|
+
*/
|
|
107
|
+
makeComponentTemplate(
|
|
108
|
+
ngView: any,
|
|
109
|
+
context: import("./resolve/resolve-context.js").ResolveContext,
|
|
110
|
+
component: string,
|
|
111
|
+
bindings?: any,
|
|
112
|
+
): string;
|
|
113
|
+
}
|
|
114
|
+
export type BindingTuple = {
|
|
115
|
+
name: string;
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class returns applicable TransitionHooks for a specific Transition instance.
|
|
3
|
+
*
|
|
4
|
+
* Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.
|
|
5
|
+
* myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is
|
|
6
|
+
* determined by the type of hook)
|
|
7
|
+
*
|
|
8
|
+
* The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.
|
|
9
|
+
*
|
|
10
|
+
* The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder
|
|
11
|
+
* instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private
|
|
12
|
+
* in the Transition class, so we must also provide the Transition's _treeChanges)
|
|
13
|
+
*/
|
|
14
|
+
export class HookBuilder {
|
|
15
|
+
constructor(transition: any);
|
|
16
|
+
transition: any;
|
|
17
|
+
/**
|
|
18
|
+
* @param {TransitionHookPhase} phase
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
buildHooksForPhase(phase: TransitionHookPhase): any;
|
|
22
|
+
/**
|
|
23
|
+
* Returns an array of newly built TransitionHook objects.
|
|
24
|
+
*
|
|
25
|
+
* - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].
|
|
26
|
+
* - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)
|
|
27
|
+
* - For each of the [[PathNode]]s, creates a TransitionHook
|
|
28
|
+
*
|
|
29
|
+
* @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
|
|
30
|
+
*/
|
|
31
|
+
buildHooks(hookType: any): any;
|
|
32
|
+
/**
|
|
33
|
+
* Finds all RegisteredHooks from:
|
|
34
|
+
* - The Transition object instance hook registry
|
|
35
|
+
* - The TransitionService ($transitions) global hook registry
|
|
36
|
+
*
|
|
37
|
+
* which matched:
|
|
38
|
+
* - the eventType
|
|
39
|
+
* - the matchCriteria (to, from, exiting, retained, entering)
|
|
40
|
+
*
|
|
41
|
+
* @returns an array of matched [[RegisteredHook]]s
|
|
42
|
+
*/
|
|
43
|
+
getMatchingHooks(hookType: any, treeChanges: any, transition: any): any;
|
|
44
|
+
}
|
|
45
|
+
import { TransitionHookPhase } from "./interface.js";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if the given state matches the matchCriteria
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*
|
|
6
|
+
* @param state a State Object to test against
|
|
7
|
+
* @param criterion
|
|
8
|
+
* - If a string, matchState uses the string as a glob-matcher against the state name
|
|
9
|
+
* - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name
|
|
10
|
+
* and returns a positive match if any of the globs match.
|
|
11
|
+
* - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
|
|
12
|
+
* @returns {boolean}
|
|
13
|
+
*/
|
|
14
|
+
export function matchState(
|
|
15
|
+
state: any,
|
|
16
|
+
criterion: any,
|
|
17
|
+
transition: any,
|
|
18
|
+
): boolean;
|
|
19
|
+
/** Return a registration function of the requested type. */
|
|
20
|
+
export function makeEvent(
|
|
21
|
+
registry: any,
|
|
22
|
+
transitionService: any,
|
|
23
|
+
eventType: any,
|
|
24
|
+
): (matchObject: any, callback: any, options?: {}) => any;
|
|
25
|
+
/**
|
|
26
|
+
* The registration data for a registered transition hook
|
|
27
|
+
*/
|
|
28
|
+
export class RegisteredHook {
|
|
29
|
+
constructor(
|
|
30
|
+
tranSvc: any,
|
|
31
|
+
eventType: any,
|
|
32
|
+
callback: any,
|
|
33
|
+
matchCriteria: any,
|
|
34
|
+
removeHookFromRegistry: any,
|
|
35
|
+
options?: {},
|
|
36
|
+
);
|
|
37
|
+
tranSvc: any;
|
|
38
|
+
eventType: any;
|
|
39
|
+
callback: any;
|
|
40
|
+
matchCriteria: any;
|
|
41
|
+
removeHookFromRegistry: any;
|
|
42
|
+
invokeCount: number;
|
|
43
|
+
_deregistered: boolean;
|
|
44
|
+
priority: any;
|
|
45
|
+
bind: any;
|
|
46
|
+
invokeLimit: any;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the matching [[PathNode]]s
|
|
49
|
+
*
|
|
50
|
+
* Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing
|
|
51
|
+
* the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.
|
|
52
|
+
*
|
|
53
|
+
* Returning `null` is significant to distinguish between the default
|
|
54
|
+
* "match-all criterion value" of `true` compared to a `() => true` function,
|
|
55
|
+
* when the nodes is an empty array.
|
|
56
|
+
*
|
|
57
|
+
* This is useful to allow a transition match criteria of `entering: true`
|
|
58
|
+
* to still match a transition, even when `entering === []`. Contrast that
|
|
59
|
+
* with `entering: (state) => true` which only matches when a state is actually
|
|
60
|
+
* being entered.
|
|
61
|
+
*/
|
|
62
|
+
_matchingNodes(nodes: any, criterion: any, transition: any): any;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the default match criteria (all `true`)
|
|
65
|
+
*
|
|
66
|
+
* Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:
|
|
67
|
+
*
|
|
68
|
+
* ```js
|
|
69
|
+
* {
|
|
70
|
+
* to: true,
|
|
71
|
+
* from: true,
|
|
72
|
+
* entering: true,
|
|
73
|
+
* exiting: true,
|
|
74
|
+
* retained: true,
|
|
75
|
+
* }
|
|
76
|
+
*/
|
|
77
|
+
_getDefaultMatchCriteria(): any;
|
|
78
|
+
/**
|
|
79
|
+
* Gets matching nodes as [[IMatchingNodes]]
|
|
80
|
+
*
|
|
81
|
+
* Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:
|
|
82
|
+
*
|
|
83
|
+
* ```js
|
|
84
|
+
* let matches: IMatchingNodes = {
|
|
85
|
+
* to: _matchingNodes([tail(treeChanges.to)], mc.to),
|
|
86
|
+
* from: _matchingNodes([tail(treeChanges.from)], mc.from),
|
|
87
|
+
* exiting: _matchingNodes(treeChanges.exiting, mc.exiting),
|
|
88
|
+
* retained: _matchingNodes(treeChanges.retained, mc.retained),
|
|
89
|
+
* entering: _matchingNodes(treeChanges.entering, mc.entering),
|
|
90
|
+
* };
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
_getMatchingNodes(treeChanges: any, transition: any): any;
|
|
94
|
+
/**
|
|
95
|
+
* Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]
|
|
96
|
+
*
|
|
97
|
+
* @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values
|
|
98
|
+
* are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)
|
|
99
|
+
*/
|
|
100
|
+
matches(treeChanges: any, transition: any): any;
|
|
101
|
+
deregister(): void;
|
|
102
|
+
}
|