@angular-wave/angular.ts 0.0.38 → 0.0.40
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 +8 -5
- package/README.md +1 -1
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +2 -1
- package/package.json +2 -4
- package/rollup.config.js +11 -2
- package/src/angular.spec.js +25 -26
- package/src/animations/animate-css-driver.js +3 -3
- package/src/animations/animate-queue.js +7 -7
- package/src/animations/animation.js +2 -2
- package/src/animations/shared.js +6 -6
- package/src/binding.spec.js +7 -7
- package/src/core/animate/animate.js +5 -5
- package/src/core/animate/animate.spec.js +31 -31
- package/src/core/cache/cache-factory.html +18 -0
- package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
- package/src/core/compile/compile.js +31 -25
- package/src/core/compile/compile.md +2 -2
- package/src/core/cookie-reader.spec.js +2 -2
- package/src/core/core.html +22 -0
- package/src/core/core.test.js +12 -0
- package/src/core/document.spec.js +4 -4
- package/src/core/exception-handler.js +30 -23
- package/src/core/interpolate/interpolate.js +7 -0
- package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
- package/src/core/location/location.js +2 -2
- package/src/core/location/location.spec.js +17 -17
- package/src/core/location/location.test.js +12 -0
- package/src/core/on.spec.js +3 -3
- package/src/core/parser/parse.html +18 -0
- package/src/core/parser/parse.spec.js +1 -1
- package/src/core/parser/parse.test.js +12 -0
- package/src/core/prop.spec.js +3 -4
- package/src/core/pubsub/pubsub.html +18 -0
- package/src/core/pubsub/pubsub.spec.js +1 -1
- package/src/core/pubsub/pubsub.test.js +12 -0
- package/src/core/q/q.html +18 -0
- package/src/core/q/q.js +33 -0
- package/src/core/q/q.test.js +0 -0
- package/src/core/root-element.spec.js +4 -4
- package/src/core/sanitize/sanitize-uri.spec.js +1 -1
- package/src/core/sanitize/sanitize-uri.test.js +12 -0
- package/src/core/sanitize/sanitize.html +21 -0
- package/src/core/sce/sce.html +18 -0
- package/src/core/sce/sce.spec.js +2 -1
- package/src/core/sce/sce.test.js +12 -0
- package/src/core/scope/scope.html +18 -0
- package/src/core/scope/scope.js +5 -8
- package/src/core/scope/scope.spec.js +1 -1
- package/src/core/scope/scope.test.js +12 -0
- package/src/core/task-tracker-factory.js +9 -11
- package/src/core/timeout/timeout.html +18 -0
- package/src/core/timeout/timeout.js +9 -0
- package/src/core/timeout/timeout.spec.js +2 -2
- package/src/core/timeout/timout.test.js +12 -0
- package/src/core/url-utils/url-utils.html +18 -0
- package/src/core/url-utils/url-utils.spec.js +4 -2
- package/src/core/url-utils/url-utils.test.js +12 -0
- package/src/directive/attrs/attrs.spec.js +1 -2
- package/src/directive/attrs/boolean.spec.js +1 -2
- package/src/directive/attrs/element-style.spec.js +6 -7
- package/src/directive/attrs/src.spec.js +1 -2
- package/src/directive/bind/bind.spec.js +1 -2
- package/src/directive/class/class.spec.js +15 -16
- package/src/directive/cloak/cloak.spec.js +3 -4
- package/src/directive/controller/controller.spec.js +4 -5
- package/src/directive/events/click.spec.js +1 -2
- package/src/directive/events/event.spec.js +1 -1
- package/src/directive/events/events.js +7 -0
- package/src/directive/form/form.spec.js +17 -17
- package/src/directive/if/if.spec.js +2 -2
- package/src/directive/include/include.js +2 -2
- package/src/directive/include/include.spec.js +32 -32
- package/src/directive/init/init.spec.js +2 -3
- package/src/directive/input/input.spec.js +3 -3
- package/src/directive/list/list.spec.js +1 -2
- package/src/directive/model/model.js +13 -0
- package/src/directive/model/model.spec.js +4 -5
- package/src/directive/model-options/model-options.spec.js +3 -3
- package/src/directive/non-bindable/non-bindable.spec.js +1 -2
- package/src/directive/options/options.js +5 -5
- package/src/directive/options/options.spec.js +13 -13
- package/src/directive/ref/href.spec.js +1 -2
- package/src/directive/repeat/repeat.spec.js +12 -12
- package/src/directive/script/script.spec.js +2 -3
- package/src/directive/select/select.js +6 -6
- package/src/directive/select/select.spec.js +5 -5
- package/src/directive/show-hide/show-hide.spec.js +12 -13
- package/src/directive/style/style.spec.js +3 -4
- package/src/directive/switch/switch.spec.js +2 -3
- package/src/directive/validators/validators.spec.js +1 -1
- package/src/exts/aria/aria.spec.js +1 -2
- package/src/exts/messages/messages.spec.js +5 -5
- package/src/filters/filter.spec.js +5 -5
- package/src/filters/filters.html +21 -0
- package/src/filters/filters.spec.js +3 -3
- package/src/filters/filters.test.js +12 -0
- package/src/filters/limit-to.md +1 -1
- package/src/filters/limit-to.spec.js +4 -4
- package/src/filters/order-by.spec.js +2 -2
- package/src/index.js +462 -1
- package/src/loader.js +62 -17
- package/src/public.js +6 -2
- package/src/router/directives/state-directives.spec.js +90 -90
- package/src/router/directives/view-directive.js +2 -2
- package/src/router/directives/view-directive.spec.js +9 -9
- package/src/router/state/state.spec.js +2 -4
- package/src/router/template-factory.spec.js +2 -2
- package/src/router/transition/hook-registry.js +2 -2
- package/src/router/view/view.spec.js +1 -1
- package/src/services/browser.js +56 -39
- package/src/services/document.js +16 -13
- package/src/services/log.js +39 -43
- package/src/services/template-request.js +9 -0
- package/src/shared/common.js +0 -3
- package/src/shared/jqlite/jqlite.js +83 -89
- package/src/shared/jqlite/jqlite.spec.js +218 -222
- package/src/shared/strings.js +2 -2
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.js +8 -11
- 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 +9 -24
- 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 +9 -42
- 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 +65 -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 +45 -38
- package/types/core/timeout/timeout.d.ts +29 -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} +281 -280
- 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 +702 -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 +157 -135
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +13 -9
- 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 +55 -52
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -20
- 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} +16 -17
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +29 -46
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +3 -296
- 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/core/cache/{cache-factor.spec.js → cache-factory.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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function createInjector(modulesToLoad: any, strictDi: any): {
|
|
2
|
+
invoke: (fn: any, self: any, locals: any, serviceName: any) => any;
|
|
3
|
+
instantiate: (Type: any, locals: any, serviceName: any) => any;
|
|
4
|
+
get: (serviceName: any, caller: any) => any;
|
|
5
|
+
annotate: typeof annotate;
|
|
6
|
+
has: (name: any) => any;
|
|
7
|
+
};
|
|
8
|
+
export namespace createInjector {
|
|
9
|
+
export { annotate as $$annotate };
|
|
10
|
+
}
|
|
11
|
+
declare function annotate(fn: any, strictDi: any, name: any): any;
|
|
12
|
+
export {};
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
* @packageDocumentation
|
|
49
49
|
*/
|
|
50
50
|
export class Glob {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
/** Returns true if the string has glob-like characters in it */
|
|
52
|
+
static is(text: any): boolean;
|
|
53
|
+
/** Returns a glob from the string, or null if the string isn't Glob-like */
|
|
54
|
+
static fromString(text: any): Glob;
|
|
55
|
+
constructor(text: any);
|
|
56
|
+
text: any;
|
|
57
|
+
glob: any;
|
|
58
|
+
regexp: RegExp;
|
|
59
|
+
matches(name: any): boolean;
|
|
60
60
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export class Queue {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
constructor(_items?: any[], _limit?: any);
|
|
3
|
+
_items: any[];
|
|
4
|
+
_limit: any;
|
|
5
|
+
_evictListeners: any[];
|
|
6
|
+
onEvict: any;
|
|
7
|
+
enqueue(item: any): any;
|
|
8
|
+
evict(): any;
|
|
9
|
+
dequeue(): any;
|
|
10
|
+
clear(): any[];
|
|
11
|
+
size(): number;
|
|
12
|
+
remove(item: any): any;
|
|
13
|
+
peekTail(): any;
|
|
14
|
+
peekHead(): any;
|
|
15
15
|
}
|
|
@@ -2,49 +2,49 @@
|
|
|
2
2
|
* Prints ng-router Transition trace information to the console.
|
|
3
3
|
*/
|
|
4
4
|
export class Trace {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
5
|
+
_enabled: {};
|
|
6
|
+
approximateDigests: number;
|
|
7
|
+
_set(enabled: any, categories: any): void;
|
|
8
|
+
enable(...categories: any[]): void;
|
|
9
|
+
disable(...categories: any[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the enabled stateus of a [[Category]]
|
|
12
|
+
*
|
|
13
|
+
* ```js
|
|
14
|
+
* trace.enabled("VIEWCONFIG"); // true or false
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @returns boolean true if the category is enabled
|
|
18
|
+
*/
|
|
19
|
+
enabled(category: any): boolean;
|
|
20
|
+
/** @internal called by ui-router code */
|
|
21
|
+
traceTransitionStart(trans: any): void;
|
|
22
|
+
/** @internal called by ui-router code */
|
|
23
|
+
traceTransitionIgnored(trans: any): void;
|
|
24
|
+
/** @internal called by ui-router code */
|
|
25
|
+
traceHookInvocation(step: any, trans: any, options: any): void;
|
|
26
|
+
/** @internal called by ui-router code */
|
|
27
|
+
traceHookResult(hookResult: any, trans: any): void;
|
|
28
|
+
/** @internal called by ui-router code */
|
|
29
|
+
traceResolvePath(path: any, when: any, trans: any): void;
|
|
30
|
+
/** @internal called by ui-router code */
|
|
31
|
+
traceResolvableResolved(resolvable: any, trans: any): void;
|
|
32
|
+
/** @internal called by ui-router code */
|
|
33
|
+
traceError(reason: any, trans: any): void;
|
|
34
|
+
/** @internal called by ui-router code */
|
|
35
|
+
traceSuccess(finalState: any, trans: any): void;
|
|
36
|
+
/** @internal called by ui-router code */
|
|
37
|
+
traceUIViewEvent(event: any, viewData: any, extra?: string): void;
|
|
38
|
+
/** @internal called by ui-router code */
|
|
39
|
+
traceUIViewConfigUpdated(viewData: any, context: any): void;
|
|
40
|
+
/** @internal called by ui-router code */
|
|
41
|
+
traceUIViewFill(viewData: any, html: any): void;
|
|
42
|
+
/** @internal called by ui-router code */
|
|
43
|
+
traceViewSync(pairs: any): void;
|
|
44
|
+
/** @internal called by ui-router code */
|
|
45
|
+
traceViewServiceEvent(event: any, viewConfig: any): void;
|
|
46
|
+
/** @internal called by ui-router code */
|
|
47
|
+
traceViewServiceUIViewEvent(event: any, viewData: any): void;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* The [[Trace]] singleton
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
export function $ViewDirectiveFill(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$view: any,
|
|
6
|
-
$q: any,
|
|
7
|
-
): {
|
|
8
|
-
restrict: string;
|
|
9
|
-
priority: number;
|
|
10
|
-
compile: (tElement: any) => (scope: any, $element: any) => void;
|
|
1
|
+
export function $ViewDirectiveFill($compile: any, $controller: any, $transitions: any, $view: any, $q: any): {
|
|
2
|
+
restrict: string;
|
|
3
|
+
priority: number;
|
|
4
|
+
compile: (tElement: any) => (scope: any, $element: any) => void;
|
|
11
5
|
};
|
|
12
6
|
export namespace $ViewDirectiveFill {
|
|
13
|
-
|
|
7
|
+
let $inject: string[];
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
10
|
* `ui-view`: A viewport directive which is filled in by a view from the active state.
|
|
@@ -137,24 +131,11 @@ export namespace $ViewDirectiveFill {
|
|
|
137
131
|
* });
|
|
138
132
|
* ```
|
|
139
133
|
*/
|
|
140
|
-
export let ngView: (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
) => {
|
|
149
|
-
count: number;
|
|
150
|
-
restrict: string;
|
|
151
|
-
terminal: boolean;
|
|
152
|
-
priority: number;
|
|
153
|
-
transclude: string;
|
|
154
|
-
compile: (
|
|
155
|
-
tElement: any,
|
|
156
|
-
tAttrs: any,
|
|
157
|
-
$transclude: any,
|
|
158
|
-
) => (scope: any, $element: any, attrs: any) => void;
|
|
159
|
-
})
|
|
160
|
-
)[];
|
|
134
|
+
export let ngView: (string | (($view: any, $animate: any, $ngViewScroll: any, $interpolate: any, $q: any) => {
|
|
135
|
+
count: number;
|
|
136
|
+
restrict: string;
|
|
137
|
+
terminal: boolean;
|
|
138
|
+
priority: number;
|
|
139
|
+
transclude: string;
|
|
140
|
+
compile: (tElement: any, tAttrs: any, $transclude: any) => (scope: any, $element: any, attrs: any) => void;
|
|
141
|
+
}))[];
|
|
@@ -5,26 +5,26 @@
|
|
|
5
5
|
* params, current transition, etc.
|
|
6
6
|
*/
|
|
7
7
|
export class UIRouterGlobals {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Current parameter values
|
|
10
|
+
*
|
|
11
|
+
* The parameter values from the latest successful transition
|
|
12
|
+
* @type {StateParams}
|
|
13
|
+
*/
|
|
14
|
+
params: StateParams;
|
|
15
|
+
/**
|
|
16
|
+
* @type {Number}
|
|
17
|
+
*/
|
|
18
|
+
lastStartedTransitionId: number;
|
|
19
|
+
/**
|
|
20
|
+
* @type {Queue}
|
|
21
|
+
*/
|
|
22
|
+
transitionHistory: Queue;
|
|
23
|
+
/**
|
|
24
|
+
* @type {Queue}
|
|
25
|
+
*/
|
|
26
|
+
successfulTransitions: Queue;
|
|
27
|
+
$get: (() => this)[];
|
|
28
28
|
}
|
|
29
29
|
import { StateParams } from "./params/state-params";
|
|
30
30
|
import { Queue } from "./common/queue";
|
|
@@ -22,12 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* See [[StateDeclaration.lazyLoad]]
|
|
24
24
|
*/
|
|
25
|
-
export function registerLazyLoadHook(
|
|
26
|
-
transitionService: any,
|
|
27
|
-
stateService: any,
|
|
28
|
-
urlService: any,
|
|
29
|
-
stateRegistry: any,
|
|
30
|
-
): any;
|
|
25
|
+
export function registerLazyLoadHook(transitionService: any, stateService: any, urlService: any, stateRegistry: any): any;
|
|
31
26
|
/**
|
|
32
27
|
* Invokes a state's lazy load function
|
|
33
28
|
*
|
|
@@ -35,8 +30,4 @@ export function registerLazyLoadHook(
|
|
|
35
30
|
* @param state the state to lazy load
|
|
36
31
|
* @returns A promise for the lazy load result
|
|
37
32
|
*/
|
|
38
|
-
export function lazyLoadState(
|
|
39
|
-
transition: any,
|
|
40
|
-
state: any,
|
|
41
|
-
stateRegistry: any,
|
|
42
|
-
): any;
|
|
33
|
+
export function lazyLoadState(transition: any, state: any, stateRegistry: any): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class ParamFactory {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
constructor(urlServiceConfig: any);
|
|
3
|
+
urlServiceConfig: any;
|
|
4
|
+
fromConfig(id: any, type: any, state: any): Param;
|
|
5
|
+
fromPath(id: any, type: any, state: any): Param;
|
|
6
|
+
fromSearch(id: any, type: any, state: any): Param;
|
|
7
7
|
}
|
|
8
8
|
import { Param } from "../params/param";
|
|
@@ -22,44 +22,44 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export class ParamType {
|
|
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
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @param def A configuration object which contains the custom type definition. The object's
|
|
27
|
+
* properties will override the default methods and/or pattern in `ParamType`'s public interface.
|
|
28
|
+
* @returns a new ParamType object
|
|
29
|
+
*/
|
|
30
|
+
constructor(def: any);
|
|
31
|
+
/** @inheritdoc */
|
|
32
|
+
pattern: RegExp;
|
|
33
|
+
/** @inheritdoc */
|
|
34
|
+
inherit: boolean;
|
|
35
|
+
/** @inheritdoc */
|
|
36
|
+
is(val: any, key: any): boolean;
|
|
37
|
+
/** @inheritdoc */
|
|
38
|
+
encode(val: any, key: any): any;
|
|
39
|
+
/** @inheritdoc */
|
|
40
|
+
decode(val: any, key: any): any;
|
|
41
|
+
/** @inheritdoc */
|
|
42
|
+
equals(a: any, b: any): boolean;
|
|
43
|
+
$subPattern(): string;
|
|
44
|
+
toString(): string;
|
|
45
|
+
/** Given an encoded string, or a decoded object, returns a decoded object */
|
|
46
|
+
$normalize(val: any): any;
|
|
47
|
+
/**
|
|
48
|
+
* Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.
|
|
49
|
+
* e.g.:
|
|
50
|
+
* - urlmatcher pattern "/path?{queryParam[]:int}"
|
|
51
|
+
* - url: "/path?queryParam=1&queryParam=2
|
|
52
|
+
* - $stateParams.queryParam will be [1, 2]
|
|
53
|
+
* if `mode` is "auto", then
|
|
54
|
+
* - url: "/path?queryParam=1 will create $stateParams.queryParam: 1
|
|
55
|
+
* - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]
|
|
56
|
+
*/
|
|
57
|
+
$asArray(mode: any, isSearch: any): ArrayType;
|
|
58
58
|
}
|
|
59
59
|
/** Wraps up a `ParamType` object to handle array values. */
|
|
60
60
|
declare function ArrayType(type: any, mode: any): void;
|
|
61
61
|
declare class ArrayType {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
/** Wraps up a `ParamType` object to handle array values. */
|
|
63
|
+
constructor(type: any, mode: any);
|
|
64
64
|
}
|
|
65
65
|
export {};
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export class ParamTypes {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
enqueue: boolean;
|
|
26
|
+
typeQueue: any[];
|
|
27
|
+
defaultTypes: {};
|
|
28
|
+
types: any;
|
|
29
|
+
/**
|
|
30
|
+
* Registers a parameter type
|
|
31
|
+
*
|
|
32
|
+
* End users should call [[UrlMatcherFactory.type]], which delegates to this method.
|
|
33
|
+
*/
|
|
34
|
+
type(name: any, definition: any, definitionFn: any): any;
|
|
35
|
+
_flushTypeQueue(): void;
|
|
36
36
|
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
export class Param {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
2
|
+
static values(params: any, values?: {}): {};
|
|
3
|
+
/**
|
|
4
|
+
* Finds [[Param]] objects which have different param values
|
|
5
|
+
*
|
|
6
|
+
* Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects
|
|
7
|
+
*
|
|
8
|
+
* @param params: The list of Param objects to filter
|
|
9
|
+
* @param values1: The first set of parameter values
|
|
10
|
+
* @param values2: the second set of parameter values
|
|
11
|
+
*
|
|
12
|
+
* @returns any Param objects whose values were different between values1 and values2
|
|
13
|
+
*/
|
|
14
|
+
static changed(params: any, values1?: {}, values2?: {}): any;
|
|
15
|
+
/**
|
|
16
|
+
* Checks if two param value objects are equal (for a set of [[Param]] objects)
|
|
17
|
+
*
|
|
18
|
+
* @param params The list of [[Param]] objects to check
|
|
19
|
+
* @param values1 The first set of param values
|
|
20
|
+
* @param values2 The second set of param values
|
|
21
|
+
*
|
|
22
|
+
* @returns true if the param values in values1 and values2 are equal
|
|
23
|
+
*/
|
|
24
|
+
static equals(params: any, values1?: {}, values2?: {}): boolean;
|
|
25
|
+
/** Returns true if a the parameter values are valid, according to the Param definitions */
|
|
26
|
+
static validates(params: any, values?: {}): any;
|
|
27
|
+
constructor(id: any, type: any, location: any, urlConfig: any, state: any);
|
|
28
|
+
isDefaultValue(value: any): any;
|
|
29
|
+
/**
|
|
30
|
+
* [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
|
|
31
|
+
* default value, which may be the result of an injectable function.
|
|
32
|
+
*/
|
|
33
|
+
value(value: any): any;
|
|
34
|
+
_defaultValueCache: {
|
|
35
|
+
defaultValue: any;
|
|
36
|
+
};
|
|
37
|
+
isSearch(): boolean;
|
|
38
|
+
validates(value: any): boolean;
|
|
39
|
+
toString(): string;
|
|
40
40
|
}
|
|
41
41
|
export var DefType: any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export class StateParams {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
constructor(params?: {});
|
|
3
|
+
/**
|
|
4
|
+
* Merges a set of parameters with all parameters inherited between the common parents of the
|
|
5
|
+
* current state and a given destination state.
|
|
6
|
+
*
|
|
7
|
+
* @param {Object} newParams The set of parameters which will be composited with inherited params.
|
|
8
|
+
* @param {Object} $current Internal definition of object representing the current state.
|
|
9
|
+
* @param {Object} $to Internal definition of object representing state to transition to.
|
|
10
|
+
*/
|
|
11
|
+
$inherit(newParams: any, $current: any, $to: any): any;
|
|
12
12
|
}
|
|
@@ -6,40 +6,40 @@
|
|
|
6
6
|
* The stateful information includes parameter values and resolve data.
|
|
7
7
|
*/
|
|
8
8
|
export class PathNode {
|
|
9
|
-
|
|
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
|
-
|
|
9
|
+
constructor(stateOrNode: any);
|
|
10
|
+
state: any;
|
|
11
|
+
paramSchema: any;
|
|
12
|
+
paramValues: any;
|
|
13
|
+
resolvables: any;
|
|
14
|
+
views: any;
|
|
15
|
+
clone(): PathNode;
|
|
16
|
+
/** Sets [[paramValues]] for the node, from the values of an object hash */
|
|
17
|
+
applyRawParams(params: any): this;
|
|
18
|
+
/** Gets a specific [[Param]] metadata that belongs to the node */
|
|
19
|
+
parameter(name: any): undefined;
|
|
20
|
+
/**
|
|
21
|
+
* @returns true if the state and parameter values for another PathNode are
|
|
22
|
+
* equal to the state and param values for this PathNode
|
|
23
|
+
*/
|
|
24
|
+
equals(node: any, paramsFn: any): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Finds Params with different parameter values on another PathNode.
|
|
27
|
+
*
|
|
28
|
+
* Given another node (of the same state), finds the parameter values which differ.
|
|
29
|
+
* Returns the [[Param]] (schema objects) whose parameter values differ.
|
|
30
|
+
*
|
|
31
|
+
* Given another node for a different state, returns `false`
|
|
32
|
+
*
|
|
33
|
+
* @param node The node to compare to
|
|
34
|
+
* @param paramsFn A function that returns which parameters should be compared.
|
|
35
|
+
* @returns The [[Param]]s which differ, or null if the two nodes are for different states
|
|
36
|
+
*/
|
|
37
|
+
diff(node: any, paramsFn: any): any;
|
|
38
38
|
}
|
|
39
39
|
export namespace PathNode {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Returns a clone of the PathNode
|
|
42
|
+
* @deprecated use instance method `node.clone()`
|
|
43
|
+
*/
|
|
44
|
+
function clone(node: any): any;
|
|
45
45
|
}
|