@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
|
@@ -28,75 +28,70 @@
|
|
|
28
28
|
* or invalid (the state being targeted is not registered).
|
|
29
29
|
*/
|
|
30
30
|
export class TargetState {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_stateRegistry: any
|
|
47
|
-
_identifier: any
|
|
48
|
-
_params: any
|
|
49
|
-
_options: any
|
|
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
|
-
* @param options the new options to use
|
|
94
|
-
* @param replace When false (default) the new options will be merged with the current options.
|
|
95
|
-
* When true the options will be used instead of the current options.
|
|
96
|
-
*/
|
|
97
|
-
withOptions(options: any, replace?: boolean): TargetState;
|
|
31
|
+
/**
|
|
32
|
+
* The TargetState constructor
|
|
33
|
+
*
|
|
34
|
+
* Note: Do not construct a `TargetState` manually.
|
|
35
|
+
* To create a `TargetState`, use the [[StateService.target]] factory method.
|
|
36
|
+
*
|
|
37
|
+
* @param _stateRegistry The StateRegistry to use to look up the _definition
|
|
38
|
+
* @param _identifier An identifier for a state.
|
|
39
|
+
* Either a fully-qualified state name, or the object used to define the state.
|
|
40
|
+
* @param _params Parameters for the target state
|
|
41
|
+
* @param _options Transition options.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
constructor(_stateRegistry: any, _identifier: any, _params: any, _options: any);
|
|
46
|
+
_stateRegistry: any;
|
|
47
|
+
_identifier: any;
|
|
48
|
+
_params: any;
|
|
49
|
+
_options: any;
|
|
50
|
+
_definition: any;
|
|
51
|
+
/** The name of the state this object targets */
|
|
52
|
+
name(): any;
|
|
53
|
+
/** The identifier used when creating this TargetState */
|
|
54
|
+
identifier(): any;
|
|
55
|
+
/** The target parameter values */
|
|
56
|
+
params(): any;
|
|
57
|
+
/** The internal state object (if it was found) */
|
|
58
|
+
$state(): any;
|
|
59
|
+
/** The internal state declaration (if it was found) */
|
|
60
|
+
state(): any;
|
|
61
|
+
/** The target options */
|
|
62
|
+
options(): any;
|
|
63
|
+
/** True if the target state was found */
|
|
64
|
+
exists(): boolean;
|
|
65
|
+
/** True if the object is valid */
|
|
66
|
+
valid(): boolean;
|
|
67
|
+
/** If the object is invalid, returns the reason why */
|
|
68
|
+
error(): string;
|
|
69
|
+
toString(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Returns a copy of this TargetState which targets a different state.
|
|
72
|
+
* The new TargetState has the same parameter values and transition options.
|
|
73
|
+
*
|
|
74
|
+
* @param state The new state that should be targeted
|
|
75
|
+
*/
|
|
76
|
+
withState(state: any): TargetState;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a copy of this TargetState, using the specified parameter values.
|
|
79
|
+
*
|
|
80
|
+
* @param params the new parameter values to use
|
|
81
|
+
* @param replace When false (default) the new parameter values will be merged with the current values.
|
|
82
|
+
* When true the parameter values will be used instead of the current values.
|
|
83
|
+
*/
|
|
84
|
+
withParams(params: any, replace?: boolean): TargetState;
|
|
85
|
+
/**
|
|
86
|
+
* Returns a copy of this TargetState, using the specified Transition Options.
|
|
87
|
+
*
|
|
88
|
+
* @param options the new options to use
|
|
89
|
+
* @param replace When false (default) the new options will be merged with the current options.
|
|
90
|
+
* When true the options will be used instead of the current options.
|
|
91
|
+
*/
|
|
92
|
+
withOptions(options: any, replace?: boolean): TargetState;
|
|
98
93
|
}
|
|
99
94
|
export namespace TargetState {
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
/** Returns true if the object has a state property that might be a state or state name */
|
|
96
|
+
function isDef(obj: any): boolean;
|
|
102
97
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export function getNg1ViewConfigFactory(): (
|
|
2
|
-
path: any,
|
|
3
|
-
view: any,
|
|
4
|
-
) => Ng1ViewConfig[];
|
|
1
|
+
export function getNg1ViewConfigFactory(): (path: any, view: any) => Ng1ViewConfig[];
|
|
5
2
|
/**
|
|
6
3
|
* This is a [[StateBuilder.builder]] function for angular1 `views`.
|
|
7
4
|
*
|
|
@@ -14,37 +11,34 @@ export function getNg1ViewConfigFactory(): (
|
|
|
14
11
|
*/
|
|
15
12
|
export function ng1ViewsBuilder(state: any): {};
|
|
16
13
|
export class Ng1ViewConfig {
|
|
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
|
-
* @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.
|
|
48
|
-
*/
|
|
49
|
-
getController(context: any): Function | Promise<Function>;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes a view's name from a state.views configuration block.
|
|
16
|
+
*
|
|
17
|
+
* This should be used by a framework implementation to calculate the values for
|
|
18
|
+
* [[_ViewDeclaration.$ngViewName]] and [[_ViewDeclaration.$ngViewContextAnchor]].
|
|
19
|
+
*
|
|
20
|
+
* @param context the context object (state declaration) that the view belongs to
|
|
21
|
+
* @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]
|
|
22
|
+
*
|
|
23
|
+
* @returns the normalized ngViewName and ngViewContextAnchor that the view targets
|
|
24
|
+
*/
|
|
25
|
+
static normalizeUIViewTarget(context: any, rawViewName?: string): {
|
|
26
|
+
ngViewName: string;
|
|
27
|
+
ngViewContextAnchor: string;
|
|
28
|
+
};
|
|
29
|
+
constructor(path: any, viewDecl: any, factory: any);
|
|
30
|
+
path: any;
|
|
31
|
+
viewDecl: any;
|
|
32
|
+
factory: any;
|
|
33
|
+
/** @type {Number} */ $id: number;
|
|
34
|
+
loaded: boolean;
|
|
35
|
+
getTemplate: (ngView: any, context: any) => any;
|
|
36
|
+
load(): any;
|
|
37
|
+
controller: any;
|
|
38
|
+
/**
|
|
39
|
+
* Gets the controller for a view configuration.
|
|
40
|
+
*
|
|
41
|
+
* @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.
|
|
42
|
+
*/
|
|
43
|
+
getController(context: any): Function | Promise<Function>;
|
|
50
44
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export function $IsStateFilter($state: any): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
(state: any, params: any, options: any): any;
|
|
3
|
+
$stateful: boolean;
|
|
4
4
|
};
|
|
5
5
|
export namespace $IsStateFilter {
|
|
6
|
-
|
|
6
|
+
let $inject: string[];
|
|
7
7
|
}
|
|
8
8
|
export function $IncludedByStateFilter($state: any): {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
(state: any, params: any, options: any): any;
|
|
10
|
+
$stateful: boolean;
|
|
11
11
|
};
|
|
12
12
|
export namespace $IncludedByStateFilter {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
let $inject_1: string[];
|
|
14
|
+
export { $inject_1 as $inject };
|
|
15
15
|
}
|
|
@@ -15,109 +15,109 @@
|
|
|
15
15
|
* The `$stateProvider` provides interfaces to declare these states for your app.
|
|
16
16
|
*/
|
|
17
17
|
export class StateProvider {
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
18
|
+
constructor(stateRegistry: any, stateService: any);
|
|
19
|
+
stateRegistry: any;
|
|
20
|
+
stateService: any;
|
|
21
|
+
/**
|
|
22
|
+
* Decorates states when they are registered
|
|
23
|
+
*
|
|
24
|
+
* Allows you to extend (carefully) or override (at your own peril) the
|
|
25
|
+
* `stateBuilder` object used internally by [[StateRegistry]].
|
|
26
|
+
* This can be used to add custom functionality to ui-router,
|
|
27
|
+
* for example inferring templateUrl based on the state name.
|
|
28
|
+
*
|
|
29
|
+
* When passing only a name, it returns the current (original or decorated) builder
|
|
30
|
+
* function that matches `name`.
|
|
31
|
+
*
|
|
32
|
+
* The builder functions that can be decorated are listed below. Though not all
|
|
33
|
+
* necessarily have a good use case for decoration, that is up to you to decide.
|
|
34
|
+
*
|
|
35
|
+
* In addition, users can attach custom decorators, which will generate new
|
|
36
|
+
* properties within the state's internal definition. There is currently no clear
|
|
37
|
+
* use-case for this beyond accessing internal states (i.e. $state.$current),
|
|
38
|
+
* however, expect this to become increasingly relevant as we introduce additional
|
|
39
|
+
* meta-programming features.
|
|
40
|
+
*
|
|
41
|
+
* **Warning**: Decorators should not be interdependent because the order of
|
|
42
|
+
* execution of the builder functions in non-deterministic. Builder functions
|
|
43
|
+
* should only be dependent on the state definition object and super function.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* Existing builder functions and current return values:
|
|
47
|
+
*
|
|
48
|
+
* - **parent** `{object}` - returns the parent state object.
|
|
49
|
+
* - **data** `{object}` - returns state data, including any inherited data that is not
|
|
50
|
+
* overridden by own values (if any).
|
|
51
|
+
* - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}
|
|
52
|
+
* or `null`.
|
|
53
|
+
* - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
|
|
54
|
+
* navigable).
|
|
55
|
+
* - **params** `{object}` - returns an array of state params that are ensured to
|
|
56
|
+
* be a super-set of parent's params.
|
|
57
|
+
* - **views** `{object}` - returns a views object where each key is an absolute view
|
|
58
|
+
* name (i.e. "viewName@stateName") and each value is the config object
|
|
59
|
+
* (template, controller) for the view. Even when you don't use the views object
|
|
60
|
+
* explicitly on a state config, one is still created for you internally.
|
|
61
|
+
* So by decorating this builder function you have access to decorating template
|
|
62
|
+
* and controller properties.
|
|
63
|
+
* - **ownParams** `{object}` - returns an array of params that belong to the state,
|
|
64
|
+
* not including any params defined by ancestor states.
|
|
65
|
+
* - **path** `{string}` - returns the full path from the root down to this state.
|
|
66
|
+
* Needed for state activation.
|
|
67
|
+
* - **includes** `{object}` - returns an object that includes every state that
|
|
68
|
+
* would pass a `$state.includes()` test.
|
|
69
|
+
*
|
|
70
|
+
* #### Example:
|
|
71
|
+
* Override the internal 'views' builder with a function that takes the state
|
|
72
|
+
* definition, and a reference to the internal function being overridden:
|
|
73
|
+
* ```js
|
|
74
|
+
* $stateProvider.decorator('views', function (state, parent) {
|
|
75
|
+
* let result = {},
|
|
76
|
+
* views = parent(state);
|
|
77
|
+
*
|
|
78
|
+
* angular.forEach(views, function (config, name) {
|
|
79
|
+
* let autoName = (state.name + '.' + name).replace('.', '/');
|
|
80
|
+
* config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';
|
|
81
|
+
* result[name] = config;
|
|
82
|
+
* });
|
|
83
|
+
* return result;
|
|
84
|
+
* });
|
|
85
|
+
*
|
|
86
|
+
* $stateProvider.state('home', {
|
|
87
|
+
* views: {
|
|
88
|
+
* 'contact.list': { controller: 'ListController' },
|
|
89
|
+
* 'contact.item': { controller: 'ItemController' }
|
|
90
|
+
* }
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
*
|
|
95
|
+
* ```js
|
|
96
|
+
* // Auto-populates list and item views with /partials/home/contact/list.html,
|
|
97
|
+
* // and /partials/home/contact/item.html, respectively.
|
|
98
|
+
* $state.go('home');
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @param {string} name The name of the builder function to decorate.
|
|
102
|
+
* @param {object} func A function that is responsible for decorating the original
|
|
103
|
+
* builder function. The function receives two parameters:
|
|
104
|
+
*
|
|
105
|
+
* - `{object}` - state - The state config object.
|
|
106
|
+
* - `{object}` - super - The original builder function.
|
|
107
|
+
*
|
|
108
|
+
* @return {object} $stateProvider - $stateProvider instance
|
|
109
|
+
*/
|
|
110
|
+
decorator(name: string, func: object): object;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @param {angular.Ng1StateDeclaration} definition
|
|
114
|
+
* @returns {StateProvider}
|
|
115
|
+
*/
|
|
116
|
+
state(definition: angular.Ng1StateDeclaration): StateProvider;
|
|
117
|
+
/**
|
|
118
|
+
* Registers an invalid state handler
|
|
119
|
+
*
|
|
120
|
+
* This is a passthrough to [[StateService.onInvalid]] for ng1.
|
|
121
|
+
*/
|
|
122
|
+
onInvalid(callback: any): any;
|
|
123
123
|
}
|