@angular-wave/angular.ts 0.0.37 → 0.0.39
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/Makefile +6 -5
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +1 -1
- package/package.json +2 -4
- package/rollup.config.js +5 -1
- package/src/binding.spec.js +4 -4
- package/src/core/location/location.js +1 -1
- package/src/core/scope/scope.js +4 -7
- package/src/exts/aria/aria.html +1 -4
- package/src/exts/messages/messages.html +1 -4
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- package/src/router/directives/directives.test.js +19 -0
- package/src/router/directives/state-directives.html +21 -0
- package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
- package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
- package/src/router/directives/view-directives.html +21 -0
- package/src/router/router.html +22 -0
- package/src/router/router.test.js +11 -0
- package/src/router/services.spec.js +2 -2
- package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
- package/src/router/state/state.html +22 -0
- package/src/router/{state.spec.js → state/state.spec.js} +1 -1
- package/src/router/state/state.test.js +11 -0
- package/src/router/state-filter.spec.js +2 -2
- package/src/router/template-factory.spec.js +4 -4
- package/src/router/url/url.html +18 -0
- package/src/router/url/url.test.js +11 -0
- package/src/router/view/view.html +18 -0
- package/src/router/{view.spec.js → view/view.spec.js} +1 -1
- package/src/router/view/view.test.js +11 -0
- package/src/router/view-hook.spec.js +4 -4
- package/src/router/view-scroll.spec.js +4 -4
- package/src/services/http/http.html +22 -0
- package/src/services/http/http.test.js +11 -0
- package/src/services/http-backend/http-backend.html +21 -0
- package/src/services/http-backend/http-backend.js +1 -1
- package/src/services/http-backend/http-backend.spec.js +1 -1
- package/src/services/http-backend/http-backend.test.js +11 -0
- package/src/shared/common.spec.js +4 -4
- package/src/shared/hof.spec.js +1 -1
- package/src/shared/min-err.spec.js +2 -2
- package/src/shared/shared.html +22 -0
- package/src/shared/shared.test.js +11 -0
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.spec.js +1 -1
- package/src/src.html +22 -0
- package/src/src.test.js +10 -0
- package/tsconfig.json +1 -1
- package/tsconfig.types.json +11 -0
- package/types/animations/animate-cache.d.ts +7 -7
- package/types/animations/animate-children-directive.d.ts +3 -6
- package/types/animations/animate-swap.d.ts +7 -16
- package/types/animations/animation.d.ts +2 -11
- package/types/animations/raf-scheduler.d.ts +3 -3
- package/types/animations/shared.d.ts +8 -23
- package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
- package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
- package/types/core/compile/compile.d.ts +173 -0
- package/types/core/controller/controller.d.ts +32 -0
- package/types/core/exception-handler.d.ts +1 -1
- package/types/core/filter/filter.d.ts +9 -0
- package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
- package/types/core/interval/interval-factory.d.ts +4 -0
- package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
- package/types/core/location/location.d.ts +209 -0
- package/types/core/pubsub/pubsub.d.ts +156 -0
- package/types/core/q/q.d.ts +31 -0
- package/types/core/sanitize/sanitize-uri.d.ts +53 -0
- package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
- package/types/core/scope/scope.d.ts +727 -0
- package/types/core/task-tracker-factory.d.ts +29 -29
- package/types/core/timeout/timeout.d.ts +20 -0
- package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
- package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
- package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
- package/types/directive/controller/controller.d.ts +6 -0
- package/types/directive/events/events.d.ts +5 -0
- package/types/directive/form/form.d.ts +200 -0
- package/types/directive/if/if.d.ts +8 -0
- package/types/directive/include/include.d.ts +14 -0
- package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
- package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
- package/types/directive/options/options.d.ts +9 -0
- package/types/directive/ref/ref.d.ts +5 -0
- package/types/directive/repeat/repeat.d.ts +8 -0
- package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
- package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
- package/types/directive/switch/switch.d.ts +17 -0
- package/types/directive/transclude/transclude.d.ts +4 -0
- package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
- package/types/filters/filters.d.ts +10 -16
- package/types/filters/order-by.d.ts +2 -4
- package/types/index.d.ts +117 -0
- package/types/injector.d.ts +12 -0
- package/types/public.d.ts +5 -0
- package/types/router/common/coreservices.d.ts +2 -2
- package/types/router/common/glob.d.ts +9 -9
- package/types/router/common/queue.d.ts +13 -13
- package/types/router/common/trace.d.ts +43 -43
- package/types/router/directives/view-directive.d.ts +13 -32
- package/types/router/globals.d.ts +20 -20
- package/types/router/hooks/lazy-load.d.ts +2 -11
- package/types/router/hooks/redirect-to.d.ts +1 -4
- package/types/router/hooks/url.d.ts +1 -5
- package/types/router/hooks/views.d.ts +1 -4
- package/types/router/params/param-factory.d.ts +5 -5
- package/types/router/params/param-type.d.ts +35 -35
- package/types/router/params/param-types.d.ts +11 -11
- package/types/router/params/param.d.ts +38 -38
- package/types/router/params/state-params.d.ts +10 -10
- package/types/router/path/path-node.d.ts +34 -34
- package/types/router/path/path-utils.d.ts +73 -77
- package/types/router/resolve/resolvable.d.ts +32 -32
- package/types/router/resolve/resolve-context.d.ts +84 -84
- package/types/router/services.d.ts +4 -9
- package/types/router/state/state-builder.d.ts +27 -27
- package/types/router/state/state-matcher.d.ts +5 -5
- package/types/router/state/state-object.d.ts +58 -58
- package/types/router/state/state-queue-manager.d.ts +10 -16
- package/types/router/state/state-registry.d.ts +100 -107
- package/types/router/state/state-service.d.ts +411 -411
- package/types/router/state/target-state.d.ts +64 -69
- package/types/router/state/views.d.ts +31 -37
- package/types/router/state-filters.d.ts +7 -7
- package/types/router/state-provider.d.ts +105 -105
- package/types/router/template-factory.d.ts +83 -112
- package/types/router/transition/hook-builder.d.ts +25 -25
- package/types/router/transition/hook-registry.d.ts +68 -83
- package/types/router/transition/interface.d.ts +7 -7
- package/types/router/transition/reject-factory.d.ts +34 -34
- package/types/router/transition/transition-event-type.d.ts +9 -18
- package/types/router/transition/transition-hook.d.ts +77 -82
- package/types/router/transition/transition-service.d.ts +82 -99
- package/types/router/transition/transition.d.ts +369 -377
- package/types/router/url/url-config.d.ts +84 -84
- package/types/router/url/url-matcher.d.ts +115 -119
- package/types/router/url/url-rule.d.ts +114 -124
- package/types/router/url/url-rules.d.ts +217 -217
- package/types/router/url/url-service.d.ts +264 -269
- package/types/router/view/view.d.ts +114 -117
- package/types/router/view-scroll.d.ts +2 -2
- package/types/services/anchor-scroll.d.ts +2 -8
- package/types/services/browser.d.ts +122 -130
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +2 -2
- package/types/services/http/http.d.ts +145 -0
- package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
- package/types/services/log.d.ts +49 -49
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -19
- package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
- package/types/shared/hof.d.ts +1 -1
- package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +7 -24
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +2 -221
- package/types/core/compile.d.ts +0 -206
- package/types/core/controller.d.ts +0 -42
- package/types/core/filter.d.ts +0 -9
- package/types/core/interval-factory.d.ts +0 -21
- package/types/core/location.d.ts +0 -234
- package/types/core/pubsub.d.ts +0 -164
- package/types/core/q.d.ts +0 -33
- package/types/core/root-scope.d.ts +0 -754
- package/types/core/sanitize-uri.d.ts +0 -57
- package/types/core/timeout.d.ts +0 -31
- package/types/directive/controller.d.ts +0 -6
- package/types/directive/events.d.ts +0 -12
- package/types/directive/form.d.ts +0 -230
- package/types/directive/if.d.ts +0 -17
- package/types/directive/include.d.ts +0 -33
- package/types/directive/options.d.ts +0 -16
- package/types/directive/ref.d.ts +0 -11
- package/types/directive/repeat.d.ts +0 -23
- package/types/directive/switch.d.ts +0 -23
- package/types/directive/transclude.d.ts +0 -15
- package/types/services/http.d.ts +0 -157
- /package/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
- /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
- /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
- /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
- /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
- /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
- /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
- /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
- /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
- /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
|
@@ -7,118 +7,89 @@
|
|
|
7
7
|
* Service which manages loading of templates from a ViewConfig.
|
|
8
8
|
*/
|
|
9
9
|
export class TemplateFactory {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @param {angular.IInjectable} provider Function to invoke via `locals`
|
|
92
|
-
* @param {Function} injectFn a function used to invoke the template provider
|
|
93
|
-
* @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
94
|
-
*/
|
|
95
|
-
fromComponentProvider(
|
|
96
|
-
provider: angular.IInjectable,
|
|
97
|
-
params: any,
|
|
98
|
-
context: any,
|
|
99
|
-
): string;
|
|
100
|
-
/**
|
|
101
|
-
* Creates a template from a component's name
|
|
102
|
-
*
|
|
103
|
-
* This implements route-to-component.
|
|
104
|
-
* It works by retrieving the component (directive) metadata from the injector.
|
|
105
|
-
* It analyses the component's bindings, then constructs a template that instantiates the component.
|
|
106
|
-
* The template wires input and output bindings to resolves or from the parent component.
|
|
107
|
-
*
|
|
108
|
-
* @param {angular.IAugmentedJQuery} ngView {object} The parent ui-view (for binding outputs to callbacks)
|
|
109
|
-
* @param {angular.ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
|
|
110
|
-
* @param {string} component {string} Component's name in camel case.
|
|
111
|
-
* @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
|
|
112
|
-
* @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
113
|
-
*/
|
|
114
|
-
makeComponentTemplate(
|
|
115
|
-
ngView: angular.IAugmentedJQuery,
|
|
116
|
-
context: angular.ResolveContext,
|
|
117
|
-
component: string,
|
|
118
|
-
bindings?: any,
|
|
119
|
-
): string;
|
|
10
|
+
/** @type {boolean} */
|
|
11
|
+
_useHttp: boolean;
|
|
12
|
+
$get: (string | (($http: angular.IHttpService, $templateCache: angular.ITemplateCacheService, $templateRequest: angular.ITemplateRequestService, $q: angular.IQService, $injector: angular.auto.IInjectorService) => this))[];
|
|
13
|
+
$templateRequest: angular.ITemplateRequestService;
|
|
14
|
+
$http: angular.IHttpService;
|
|
15
|
+
$templateCache: angular.ITemplateCacheService;
|
|
16
|
+
$q: angular.IQService;
|
|
17
|
+
$injector: angular.auto.IInjectorService;
|
|
18
|
+
/**
|
|
19
|
+
* Forces the provider to use $http service directly
|
|
20
|
+
* @param {boolean} value
|
|
21
|
+
*/
|
|
22
|
+
useHttpService(value: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a template from a configuration object.
|
|
25
|
+
*
|
|
26
|
+
* @param config Configuration object for which to load a template.
|
|
27
|
+
* The following properties are search in the specified order, and the first one
|
|
28
|
+
* that is defined is used to create the template:
|
|
29
|
+
*
|
|
30
|
+
* @param {angular.Ng1ViewDeclaration} config
|
|
31
|
+
* @param {any} params Parameters to pass to the template function.
|
|
32
|
+
* @param {angular.ResolveContext} context The resolve context associated with the template's view
|
|
33
|
+
*
|
|
34
|
+
* @return {string|object} The template html as a string, or a promise for
|
|
35
|
+
* that string,or `null` if no template is configured.
|
|
36
|
+
*/
|
|
37
|
+
fromConfig(config: angular.Ng1ViewDeclaration, params: any, context: angular.ResolveContext): string | object;
|
|
38
|
+
/**
|
|
39
|
+
* Creates a template from a string or a function returning a string.
|
|
40
|
+
*
|
|
41
|
+
* @param {string | Function} template html template as a string or function that returns an html template as a string.
|
|
42
|
+
* @param {angular.RawParams} [params] Parameters to pass to the template function.
|
|
43
|
+
*
|
|
44
|
+
* @return {string|object} The template html as a string, or a promise for that
|
|
45
|
+
* string.
|
|
46
|
+
*/
|
|
47
|
+
fromString(template: string | Function, params?: angular.RawParams): string | object;
|
|
48
|
+
/**
|
|
49
|
+
* Loads a template from the a URL via `$http` and `$templateCache`.
|
|
50
|
+
*
|
|
51
|
+
* @param {string|Function} url url of the template to load, or a function
|
|
52
|
+
* that returns a url.
|
|
53
|
+
* @param {Object} params Parameters to pass to the url function.
|
|
54
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
55
|
+
* for that string.
|
|
56
|
+
*/
|
|
57
|
+
fromUrl(url: string | Function, params: any): string | Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a template by invoking an injectable provider function.
|
|
60
|
+
*
|
|
61
|
+
* @param {angular.IInjectable} provider Function to invoke via `locals`
|
|
62
|
+
* @param {Function} injectFn a function used to invoke the template provider
|
|
63
|
+
* @param {angular.ResolveContext} context
|
|
64
|
+
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
65
|
+
* for that string.
|
|
66
|
+
*/
|
|
67
|
+
fromProvider(provider: angular.IInjectable, params: any, context: angular.ResolveContext): string | Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Creates a component's template by invoking an injectable provider function.
|
|
70
|
+
*
|
|
71
|
+
* @param {angular.IInjectable} provider Function to invoke via `locals`
|
|
72
|
+
* @param {Function} injectFn a function used to invoke the template provider
|
|
73
|
+
* @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
74
|
+
*/
|
|
75
|
+
fromComponentProvider(provider: angular.IInjectable, params: any, context: any): string;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a template from a component's name
|
|
78
|
+
*
|
|
79
|
+
* This implements route-to-component.
|
|
80
|
+
* It works by retrieving the component (directive) metadata from the injector.
|
|
81
|
+
* It analyses the component's bindings, then constructs a template that instantiates the component.
|
|
82
|
+
* The template wires input and output bindings to resolves or from the parent component.
|
|
83
|
+
*
|
|
84
|
+
* @param {angular.IAugmentedJQuery} ngView {object} The parent ui-view (for binding outputs to callbacks)
|
|
85
|
+
* @param {angular.ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
|
|
86
|
+
* @param {string} component {string} Component's name in camel case.
|
|
87
|
+
* @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
|
|
88
|
+
* @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
89
|
+
*/
|
|
90
|
+
makeComponentTemplate(ngView: angular.IAugmentedJQuery, context: angular.ResolveContext, component: string, bindings?: any): string;
|
|
120
91
|
}
|
|
121
92
|
export type BindingTuple = {
|
|
122
|
-
|
|
123
|
-
|
|
93
|
+
name: string;
|
|
94
|
+
type: string;
|
|
124
95
|
};
|
|
@@ -12,29 +12,29 @@
|
|
|
12
12
|
* in the Transition class, so we must also provide the Transition's _treeChanges)
|
|
13
13
|
*/
|
|
14
14
|
export class HookBuilder {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
constructor(transition: any);
|
|
16
|
+
transition: any;
|
|
17
|
+
buildHooksForPhase(phase: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Returns an array of newly built TransitionHook objects.
|
|
20
|
+
*
|
|
21
|
+
* - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].
|
|
22
|
+
* - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)
|
|
23
|
+
* - For each of the [[PathNode]]s, creates a TransitionHook
|
|
24
|
+
*
|
|
25
|
+
* @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
|
|
26
|
+
*/
|
|
27
|
+
buildHooks(hookType: any): any;
|
|
28
|
+
/**
|
|
29
|
+
* Finds all RegisteredHooks from:
|
|
30
|
+
* - The Transition object instance hook registry
|
|
31
|
+
* - The TransitionService ($transitions) global hook registry
|
|
32
|
+
*
|
|
33
|
+
* which matched:
|
|
34
|
+
* - the eventType
|
|
35
|
+
* - the matchCriteria (to, from, exiting, retained, entering)
|
|
36
|
+
*
|
|
37
|
+
* @returns an array of matched [[RegisteredHook]]s
|
|
38
|
+
*/
|
|
39
|
+
getMatchingHooks(hookType: any, treeChanges: any, transition: any): any;
|
|
40
40
|
}
|
|
@@ -11,92 +11,77 @@
|
|
|
11
11
|
* - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
|
|
12
12
|
* @returns {boolean}
|
|
13
13
|
*/
|
|
14
|
-
export function matchState(
|
|
15
|
-
state: any,
|
|
16
|
-
criterion: any,
|
|
17
|
-
transition: any,
|
|
18
|
-
): boolean;
|
|
14
|
+
export function matchState(state: any, criterion: any, transition: any): boolean;
|
|
19
15
|
/** 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;
|
|
16
|
+
export function makeEvent(registry: any, transitionService: any, eventType: any): (matchObject: any, callback: any, options?: {}) => any;
|
|
25
17
|
/**
|
|
26
18
|
* The registration data for a registered transition hook
|
|
27
19
|
*/
|
|
28
20
|
export class RegisteredHook {
|
|
29
|
-
|
|
30
|
-
tranSvc: any
|
|
31
|
-
eventType: any
|
|
32
|
-
callback: any
|
|
33
|
-
matchCriteria: any
|
|
34
|
-
removeHookFromRegistry: any
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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;
|
|
21
|
+
constructor(tranSvc: any, eventType: any, callback: any, matchCriteria: any, removeHookFromRegistry: any, options?: {});
|
|
22
|
+
tranSvc: any;
|
|
23
|
+
eventType: any;
|
|
24
|
+
callback: any;
|
|
25
|
+
matchCriteria: any;
|
|
26
|
+
removeHookFromRegistry: any;
|
|
27
|
+
invokeCount: number;
|
|
28
|
+
_deregistered: boolean;
|
|
29
|
+
priority: any;
|
|
30
|
+
bind: any;
|
|
31
|
+
invokeLimit: any;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the matching [[PathNode]]s
|
|
34
|
+
*
|
|
35
|
+
* Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing
|
|
36
|
+
* the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.
|
|
37
|
+
*
|
|
38
|
+
* Returning `null` is significant to distinguish between the default
|
|
39
|
+
* "match-all criterion value" of `true` compared to a `() => true` function,
|
|
40
|
+
* when the nodes is an empty array.
|
|
41
|
+
*
|
|
42
|
+
* This is useful to allow a transition match criteria of `entering: true`
|
|
43
|
+
* to still match a transition, even when `entering === []`. Contrast that
|
|
44
|
+
* with `entering: (state) => true` which only matches when a state is actually
|
|
45
|
+
* being entered.
|
|
46
|
+
*/
|
|
47
|
+
_matchingNodes(nodes: any, criterion: any, transition: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the default match criteria (all `true`)
|
|
50
|
+
*
|
|
51
|
+
* Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:
|
|
52
|
+
*
|
|
53
|
+
* ```js
|
|
54
|
+
* {
|
|
55
|
+
* to: true,
|
|
56
|
+
* from: true,
|
|
57
|
+
* entering: true,
|
|
58
|
+
* exiting: true,
|
|
59
|
+
* retained: true,
|
|
60
|
+
* }
|
|
61
|
+
*/
|
|
62
|
+
_getDefaultMatchCriteria(): any;
|
|
63
|
+
/**
|
|
64
|
+
* Gets matching nodes as [[IMatchingNodes]]
|
|
65
|
+
*
|
|
66
|
+
* Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:
|
|
67
|
+
*
|
|
68
|
+
* ```js
|
|
69
|
+
* let matches: IMatchingNodes = {
|
|
70
|
+
* to: _matchingNodes([tail(treeChanges.to)], mc.to),
|
|
71
|
+
* from: _matchingNodes([tail(treeChanges.from)], mc.from),
|
|
72
|
+
* exiting: _matchingNodes(treeChanges.exiting, mc.exiting),
|
|
73
|
+
* retained: _matchingNodes(treeChanges.retained, mc.retained),
|
|
74
|
+
* entering: _matchingNodes(treeChanges.entering, mc.entering),
|
|
75
|
+
* };
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
_getMatchingNodes(treeChanges: any, transition: any): any;
|
|
79
|
+
/**
|
|
80
|
+
* Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]
|
|
81
|
+
*
|
|
82
|
+
* @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values
|
|
83
|
+
* are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)
|
|
84
|
+
*/
|
|
85
|
+
matches(treeChanges: any, transition: any): any;
|
|
86
|
+
deregister(): void;
|
|
102
87
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export namespace TransitionHookPhase {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
let CREATE: number;
|
|
3
|
+
let BEFORE: number;
|
|
4
|
+
let RUN: number;
|
|
5
|
+
let SUCCESS: number;
|
|
6
|
+
let ERROR: number;
|
|
7
7
|
}
|
|
8
8
|
export namespace TransitionHookScope {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
let TRANSITION: number;
|
|
10
|
+
let STATE: number;
|
|
11
11
|
}
|
|
@@ -3,40 +3,40 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export type RejectType = number;
|
|
5
5
|
export namespace RejectType {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
let SUPERSEDED: number;
|
|
7
|
+
let ABORTED: number;
|
|
8
|
+
let INVALID: number;
|
|
9
|
+
let IGNORED: number;
|
|
10
|
+
let ERROR: number;
|
|
11
11
|
}
|
|
12
12
|
export class Rejection {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
/** Returns a Rejection due to transition superseded */
|
|
14
|
+
static superseded(detail: any, options: any): Rejection;
|
|
15
|
+
/** Returns a Rejection due to redirected transition */
|
|
16
|
+
static redirected(detail: any): Rejection;
|
|
17
|
+
/** Returns a Rejection due to invalid transition */
|
|
18
|
+
static invalid(detail: any): Rejection;
|
|
19
|
+
/** Returns a Rejection due to ignored transition */
|
|
20
|
+
static ignored(detail: any): Rejection;
|
|
21
|
+
/** Returns a Rejection due to aborted transition */
|
|
22
|
+
static aborted(detail: any): Rejection;
|
|
23
|
+
/** Returns a Rejection due to aborted transition */
|
|
24
|
+
static errored(detail: any): Rejection;
|
|
25
|
+
/**
|
|
26
|
+
* Returns a Rejection
|
|
27
|
+
*
|
|
28
|
+
* Normalizes a value as a Rejection.
|
|
29
|
+
* If the value is already a Rejection, returns it.
|
|
30
|
+
* Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).
|
|
31
|
+
*
|
|
32
|
+
* @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.
|
|
33
|
+
*/
|
|
34
|
+
static normalize(detail: any): any;
|
|
35
|
+
constructor(type: any, message: any, detail: any);
|
|
36
|
+
$id: number;
|
|
37
|
+
type: any;
|
|
38
|
+
message: any;
|
|
39
|
+
detail: any;
|
|
40
|
+
toString(): string;
|
|
41
|
+
toPromise(): any;
|
|
42
42
|
}
|
|
@@ -3,22 +3,13 @@
|
|
|
3
3
|
* Plugins can define custom hook types, such as sticky states does for `onInactive`.
|
|
4
4
|
*/
|
|
5
5
|
export class TransitionEventType {
|
|
6
|
-
|
|
7
|
-
name: any
|
|
8
|
-
hookPhase: any
|
|
9
|
-
hookOrder: any
|
|
10
|
-
criteriaMatchPath: any
|
|
11
|
-
reverseSort
|
|
12
|
-
getResultHandler
|
|
13
|
-
getErrorHandler
|
|
14
|
-
synchronous
|
|
15
|
-
);
|
|
16
|
-
name: any;
|
|
17
|
-
hookPhase: any;
|
|
18
|
-
hookOrder: any;
|
|
19
|
-
criteriaMatchPath: any;
|
|
20
|
-
reverseSort: boolean;
|
|
21
|
-
getResultHandler: (hook: any) => (result: any) => any;
|
|
22
|
-
getErrorHandler: () => (error: any) => any;
|
|
23
|
-
synchronous: boolean;
|
|
6
|
+
constructor(name: any, hookPhase: any, hookOrder: any, criteriaMatchPath: any, reverseSort?: boolean, getResultHandler?: (hook: any) => (result: any) => any, getErrorHandler?: () => (error: any) => any, synchronous?: boolean);
|
|
7
|
+
name: any;
|
|
8
|
+
hookPhase: any;
|
|
9
|
+
hookOrder: any;
|
|
10
|
+
criteriaMatchPath: any;
|
|
11
|
+
reverseSort: boolean;
|
|
12
|
+
getResultHandler: (hook: any) => (result: any) => any;
|
|
13
|
+
getErrorHandler: () => (error: any) => any;
|
|
14
|
+
synchronous: boolean;
|
|
24
15
|
}
|