@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
|
@@ -15,123 +15,120 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
export class ViewService {
|
|
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
|
-
|
|
18
|
+
_ngViews: any[];
|
|
19
|
+
_viewConfigs: any[];
|
|
20
|
+
_viewConfigFactories: {};
|
|
21
|
+
_listeners: any[];
|
|
22
|
+
_pluginapi: {
|
|
23
|
+
_rootViewContext: any;
|
|
24
|
+
_viewConfigFactory: any;
|
|
25
|
+
_registeredUIView: (id: any) => undefined;
|
|
26
|
+
_registeredUIViews: () => any[];
|
|
27
|
+
_activeViewConfigs: () => any[];
|
|
28
|
+
_onSync: (listener: any) => () => any;
|
|
29
|
+
};
|
|
30
|
+
$get: (() => this)[];
|
|
31
|
+
_rootViewContext(context: any): any;
|
|
32
|
+
_rootContext: any;
|
|
33
|
+
_viewConfigFactory(viewType: any, factory: any): void;
|
|
34
|
+
createViewConfig(path: any, decl: any): any[];
|
|
35
|
+
/**
|
|
36
|
+
* Deactivates a ViewConfig.
|
|
37
|
+
*
|
|
38
|
+
* This function deactivates a `ViewConfig`.
|
|
39
|
+
* After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.
|
|
40
|
+
*
|
|
41
|
+
* @param viewConfig The ViewConfig view to deregister.
|
|
42
|
+
*/
|
|
43
|
+
deactivateViewConfig(viewConfig: any): void;
|
|
44
|
+
activateViewConfig(viewConfig: any): void;
|
|
45
|
+
sync(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Registers a `ui-view` component
|
|
48
|
+
*
|
|
49
|
+
* When a `ui-view` component is created, it uses this method to register itself.
|
|
50
|
+
* After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].
|
|
51
|
+
*
|
|
52
|
+
* Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,
|
|
53
|
+
* and what the view's state context is.
|
|
54
|
+
*
|
|
55
|
+
* Note: There is no corresponding `deregisterUIView`.
|
|
56
|
+
* A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.
|
|
57
|
+
*
|
|
58
|
+
* @param ngView The metadata for a UIView
|
|
59
|
+
* @return a de-registration function used when the view is destroyed.
|
|
60
|
+
*/
|
|
61
|
+
registerUIView(ngView: any): () => void;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the list of views currently available on the page, by fully-qualified name.
|
|
64
|
+
*
|
|
65
|
+
* @return {Array} Returns an array of fully-qualified view names.
|
|
66
|
+
*/
|
|
67
|
+
available(): any[];
|
|
68
|
+
/**
|
|
69
|
+
* Returns the list of views on the page containing loaded content.
|
|
70
|
+
*
|
|
71
|
+
* @return {Array} Returns an array of fully-qualified view names.
|
|
72
|
+
*/
|
|
73
|
+
active(): any[];
|
|
74
74
|
}
|
|
75
75
|
export namespace ViewService {
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
ngViewsByFqn: any,
|
|
135
|
-
ngView: any,
|
|
136
|
-
): (viewConfig: any) => boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Given a ui-view and a ViewConfig, determines if they "match".
|
|
78
|
+
*
|
|
79
|
+
* A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in
|
|
80
|
+
* the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.
|
|
81
|
+
*
|
|
82
|
+
* A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or
|
|
83
|
+
* can be a segmented ui-view path, describing a portion of a ui-view fqn.
|
|
84
|
+
*
|
|
85
|
+
* In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type
|
|
86
|
+
*
|
|
87
|
+
* If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:
|
|
88
|
+
* - the ui-view's name matches the ViewConfig's target name
|
|
89
|
+
* - the ui-view's context matches the ViewConfig's anchor
|
|
90
|
+
*
|
|
91
|
+
* If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:
|
|
92
|
+
* - There exists a parent ui-view where:
|
|
93
|
+
* - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name
|
|
94
|
+
* - the parent ui-view's context matches the ViewConfig's anchor
|
|
95
|
+
* - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn
|
|
96
|
+
*
|
|
97
|
+
* Example:
|
|
98
|
+
*
|
|
99
|
+
* DOM:
|
|
100
|
+
* <ui-view> <!-- created in the root context (name: "") -->
|
|
101
|
+
* <ui-view name="foo"> <!-- created in the context named: "A" -->
|
|
102
|
+
* <ui-view> <!-- created in the context named: "A.B" -->
|
|
103
|
+
* <ui-view name="bar"> <!-- created in the context named: "A.B.C" -->
|
|
104
|
+
* </ui-view>
|
|
105
|
+
* </ui-view>
|
|
106
|
+
* </ui-view>
|
|
107
|
+
* </ui-view>
|
|
108
|
+
*
|
|
109
|
+
* ngViews: [
|
|
110
|
+
* { fqn: "$default", creationContext: { name: "" } },
|
|
111
|
+
* { fqn: "$default.foo", creationContext: { name: "A" } },
|
|
112
|
+
* { fqn: "$default.foo.$default", creationContext: { name: "A.B" } }
|
|
113
|
+
* { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } }
|
|
114
|
+
* ]
|
|
115
|
+
*
|
|
116
|
+
* These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar":
|
|
117
|
+
*
|
|
118
|
+
* - ViewConfig1: { ngViewName: "bar", ngViewContextAnchor: "A.B.C" }
|
|
119
|
+
* - ViewConfig2: { ngViewName: "$default.bar", ngViewContextAnchor: "A.B" }
|
|
120
|
+
* - ViewConfig3: { ngViewName: "foo.$default.bar", ngViewContextAnchor: "A" }
|
|
121
|
+
* - ViewConfig4: { ngViewName: "$default.foo.$default.bar", ngViewContextAnchor: "" }
|
|
122
|
+
*
|
|
123
|
+
* Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because:
|
|
124
|
+
* - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ]
|
|
125
|
+
* - There exists a parent ui-view (which has fqn: "$default.foo") where:
|
|
126
|
+
* - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name
|
|
127
|
+
* - the parent ui-view's context "A" matches the ViewConfig's anchor context "A"
|
|
128
|
+
* - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match
|
|
129
|
+
* the tail of the ui-view's fqn "default.bar"
|
|
130
|
+
*
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
function matches(ngViewsByFqn: any, ngView: any): (viewConfig: any) => boolean;
|
|
137
134
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function $ViewScrollProvider(): void;
|
|
2
2
|
export class $ViewScrollProvider {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
useAnchorScroll: () => void;
|
|
4
|
+
$get: (string | (($anchorScroll: any, $timeout: any) => any))[];
|
|
5
5
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
export function AnchorScrollProvider(): void;
|
|
2
2
|
export class AnchorScrollProvider {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
| string
|
|
6
|
-
| ((
|
|
7
|
-
$location: angular.IRootScopeService,
|
|
8
|
-
$rootScope: any,
|
|
9
|
-
) => (hash: any) => void)
|
|
10
|
-
)[];
|
|
3
|
+
disableAutoScrolling: () => void;
|
|
4
|
+
$get: (string | (($location: angular.IRootScopeService, $rootScope: any) => (hash: any) => void))[];
|
|
11
5
|
}
|
|
@@ -1,150 +1,172 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Removes a trailing hash ('#') from the given URL if it exists.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} url
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function trimEmptyHash(url: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {function(string, string|null): any} UrlChangeListener
|
|
10
|
+
*/
|
|
2
11
|
/**
|
|
3
12
|
* @name $browser
|
|
4
|
-
* @requires $log
|
|
5
13
|
* @description
|
|
6
14
|
* This object has two goals:
|
|
7
15
|
*
|
|
8
16
|
* - hide all the global state in the browser caused by the window object
|
|
9
17
|
* - abstract away all the browser specific features and inconsistencies
|
|
10
18
|
*
|
|
19
|
+
*
|
|
11
20
|
*/
|
|
12
21
|
/**
|
|
13
|
-
* @param {
|
|
22
|
+
* @param {import('../core/task-tracker-factory').TaskTracker} taskTracker
|
|
14
23
|
*/
|
|
15
|
-
export function Browser(
|
|
24
|
+
export function Browser(taskTracker: import("../core/task-tracker-factory").TaskTracker): void;
|
|
16
25
|
export class Browser {
|
|
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
|
-
state?: object | undefined
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* @param {*} deferId Token returned by the `$browser.defer` function.
|
|
142
|
-
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
|
|
143
|
-
* canceled.
|
|
144
|
-
*/
|
|
145
|
-
cancel: (deferId: any) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {function(string, string|null): any} UrlChangeListener
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @name $browser
|
|
31
|
+
* @description
|
|
32
|
+
* This object has two goals:
|
|
33
|
+
*
|
|
34
|
+
* - hide all the global state in the browser caused by the window object
|
|
35
|
+
* - abstract away all the browser specific features and inconsistencies
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* @param {import('../core/task-tracker-factory').TaskTracker} taskTracker
|
|
41
|
+
*/
|
|
42
|
+
constructor(taskTracker: import("../core/task-tracker-factory").TaskTracker);
|
|
43
|
+
$$completeOutstandingRequest: (fn: any, taskType: any) => void;
|
|
44
|
+
$$incOutstandingRequestCount: (taskType: any) => void;
|
|
45
|
+
notifyWhenNoOutstandingRequests: (callback: any, taskType: any) => void;
|
|
46
|
+
/**
|
|
47
|
+
* @name $browser#url
|
|
48
|
+
*
|
|
49
|
+
* @description
|
|
50
|
+
* GETTER:
|
|
51
|
+
* Without any argument, this method just returns current value of `location.href` (with a
|
|
52
|
+
* trailing `#` stripped of if the hash is empty).
|
|
53
|
+
*
|
|
54
|
+
* SETTER:
|
|
55
|
+
* With at least one argument, this method sets url to new value.
|
|
56
|
+
* If html5 history api supported, `pushState`/`replaceState` is used, otherwise
|
|
57
|
+
* `location.href`/`location.replace` is used.
|
|
58
|
+
* Returns its own instance to allow chaining.
|
|
59
|
+
*
|
|
60
|
+
* NOTE: this api is intended for use only by the `$location` service. Please use the
|
|
61
|
+
* {@link ng.$location $location service} to change url.
|
|
62
|
+
*
|
|
63
|
+
* @param {string=} url New url (when used as setter)
|
|
64
|
+
* @param {boolean=} replace Should new url replace current history record?
|
|
65
|
+
* @param {object=} state State object to use with `pushState`/`replaceState`
|
|
66
|
+
*/
|
|
67
|
+
url: (url?: string | undefined, replace?: boolean | undefined, state?: object | undefined) => string | this;
|
|
68
|
+
/**
|
|
69
|
+
* @name $browser#state
|
|
70
|
+
*
|
|
71
|
+
* @description
|
|
72
|
+
* This method is a getter.
|
|
73
|
+
*
|
|
74
|
+
* Return history.state or null if history.state is undefined.
|
|
75
|
+
*
|
|
76
|
+
* @returns {object} state
|
|
77
|
+
*/
|
|
78
|
+
state: () => object;
|
|
79
|
+
/**
|
|
80
|
+
* @name $browser#onUrlChange
|
|
81
|
+
*
|
|
82
|
+
* @description
|
|
83
|
+
* Register callback function that will be called, when url changes.
|
|
84
|
+
*
|
|
85
|
+
* It's only called when the url is changed from outside of AngularJS:
|
|
86
|
+
* - user types different url into address bar
|
|
87
|
+
* - user clicks on history (forward/back) button
|
|
88
|
+
* - user clicks on a link
|
|
89
|
+
*
|
|
90
|
+
* It's not called when url is changed by $browser.url() method
|
|
91
|
+
*
|
|
92
|
+
* The listener gets called with new url as parameter.
|
|
93
|
+
*
|
|
94
|
+
* NOTE: this api is intended for use only by the $location service. Please use the
|
|
95
|
+
* {@link ng.$location $location service} to monitor url changes in AngularJS apps.
|
|
96
|
+
*
|
|
97
|
+
* @param {UrlChangeListener} callback Listener function to be called when url changes.
|
|
98
|
+
* @return {UrlChangeListener} Returns the registered listener fn - handy if the fn is anonymous.
|
|
99
|
+
*/
|
|
100
|
+
onUrlChange: (callback: UrlChangeListener) => UrlChangeListener;
|
|
101
|
+
/**
|
|
102
|
+
* Remove popstate and hashchange handler from window.
|
|
103
|
+
*
|
|
104
|
+
* NOTE: this api is intended for use only by $rootScope.
|
|
105
|
+
*/
|
|
106
|
+
$$applicationDestroyed: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Checks whether the url has changed outside of AngularJS.
|
|
109
|
+
* Needs to be exported to be able to check for changes that have been done in sync,
|
|
110
|
+
* as hashchange/popstate events fire in async.
|
|
111
|
+
*/
|
|
112
|
+
$$checkUrlChange: () => void;
|
|
113
|
+
/**
|
|
114
|
+
* @name $browser#baseHref
|
|
115
|
+
*
|
|
116
|
+
* @description
|
|
117
|
+
* Returns current <base href>
|
|
118
|
+
* (always relative - without domain)
|
|
119
|
+
*
|
|
120
|
+
* @returns {string} The current base href
|
|
121
|
+
*/
|
|
122
|
+
baseHref: () => string;
|
|
123
|
+
/**
|
|
124
|
+
* @name $browser#defer
|
|
125
|
+
* @param {function():any} fn A function, who's execution should be deferred.
|
|
126
|
+
* @param {number=} [delay=0] Number of milliseconds to defer the function execution.
|
|
127
|
+
* @param {string=} [taskType=DEFAULT_TASK_TYPE] The type of task that is deferred.
|
|
128
|
+
* @returns {*} DeferId that can be used to cancel the task via `$browser.cancel()`.
|
|
129
|
+
*
|
|
130
|
+
* @description
|
|
131
|
+
* Executes a fn asynchronously via `setTimeout(fn, delay)`.
|
|
132
|
+
*
|
|
133
|
+
* Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
|
|
134
|
+
* `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
|
|
135
|
+
* via `$browser.defer.flush()`.
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
defer: (fn: () => any, delay?: number | undefined, taskType?: string | undefined) => any;
|
|
139
|
+
/**
|
|
140
|
+
* @name $browser#cancel
|
|
141
|
+
*
|
|
142
|
+
* @description
|
|
143
|
+
* Cancels a deferred task identified with `deferId`.
|
|
144
|
+
*
|
|
145
|
+
* @param {number} deferId Token returned by the `$browser.defer` function.
|
|
146
|
+
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
|
|
147
|
+
* canceled.
|
|
148
|
+
*/
|
|
149
|
+
cancel: (deferId: number) => boolean;
|
|
146
150
|
}
|
|
147
|
-
|
|
151
|
+
/**
|
|
152
|
+
* @typedef {import('../index').angular.ServiceProvider} angular.BrowserProvider
|
|
153
|
+
* @description
|
|
154
|
+
* This object has two goals:
|
|
155
|
+
*
|
|
156
|
+
* - hide all the global state in the browser caused by the window object
|
|
157
|
+
* - abstract away all the browser specific features and inconsistencies
|
|
158
|
+
*
|
|
159
|
+
* Remove this in the future
|
|
160
|
+
*/
|
|
161
|
+
/**
|
|
162
|
+
* @constructor
|
|
163
|
+
* @this {angular.BrowserProvider}
|
|
164
|
+
*/
|
|
165
|
+
export function BrowserProvider(this: import("../index").angular.ServiceProvider): void;
|
|
148
166
|
export class BrowserProvider {
|
|
149
|
-
|
|
167
|
+
$get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
|
|
168
|
+
}
|
|
169
|
+
export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
|
|
170
|
+
export namespace angular {
|
|
171
|
+
type BrowserProvider = import("../index").angular.ServiceProvider;
|
|
150
172
|
}
|
|
@@ -67,30 +67,30 @@
|
|
|
67
67
|
*/
|
|
68
68
|
export function CacheFactoryProvider(): void;
|
|
69
69
|
export class CacheFactoryProvider {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
$get: () => {
|
|
71
|
+
(cacheId: string, options?: object | undefined): object;
|
|
72
|
+
/**
|
|
73
|
+
* @ngdoc method
|
|
74
|
+
* @name $cacheFactory#info
|
|
75
|
+
*
|
|
76
|
+
* @description
|
|
77
|
+
* Get information about all the caches that have been created
|
|
78
|
+
*
|
|
79
|
+
* @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
|
|
80
|
+
*/
|
|
81
|
+
info(): any;
|
|
82
|
+
/**
|
|
83
|
+
* @ngdoc method
|
|
84
|
+
* @name $cacheFactory#get
|
|
85
|
+
*
|
|
86
|
+
* @description
|
|
87
|
+
* Get access to a cache object by the `cacheId` used when it was created.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} cacheId Name or id of a cache to access.
|
|
90
|
+
* @returns {object} Cache object identified by the cacheId or undefined if no such cache.
|
|
91
|
+
*/
|
|
92
|
+
get(cacheId: string): object;
|
|
93
|
+
};
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* @name $templateCache
|
|
@@ -139,5 +139,5 @@ export class CacheFactoryProvider {
|
|
|
139
139
|
*/
|
|
140
140
|
export function TemplateCacheProvider(): void;
|
|
141
141
|
export class TemplateCacheProvider {
|
|
142
|
-
|
|
142
|
+
$get: (string | (($cacheFactory: any) => any))[];
|
|
143
143
|
}
|