@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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc provider
|
|
3
|
+
* @name $qProvider
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
*/
|
|
8
|
+
export function $QProvider(): void;
|
|
9
|
+
export class $QProvider {
|
|
10
|
+
$get: (string | (($rootScope: any, $exceptionHandler: any) => any))[];
|
|
11
|
+
/**
|
|
12
|
+
* @ngdoc method
|
|
13
|
+
* @name $qProvider#errorOnUnhandledRejections
|
|
14
|
+
* @kind function
|
|
15
|
+
*
|
|
16
|
+
* @description
|
|
17
|
+
* Retrieves or overrides whether to generate an error when a rejected promise is not handled.
|
|
18
|
+
* This feature is enabled by default.
|
|
19
|
+
*
|
|
20
|
+
* @param {boolean=} value Whether to generate an error when a rejected promise is not handled.
|
|
21
|
+
* @returns {boolean|ng.$qProvider} Current value when called without a new value or self for
|
|
22
|
+
* chaining otherwise.
|
|
23
|
+
*/
|
|
24
|
+
errorOnUnhandledRejections: (value?: boolean | undefined) => boolean | ng.$qProvider;
|
|
25
|
+
}
|
|
26
|
+
export function $$QProvider(): void;
|
|
27
|
+
export class $$QProvider {
|
|
28
|
+
$get: (string | (($browser: any, $exceptionHandler: any) => any))[];
|
|
29
|
+
errorOnUnhandledRejections: (value: any) => boolean | this;
|
|
30
|
+
}
|
|
31
|
+
export function markQExceptionHandled(q: any): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description
|
|
4
|
+
* Private service to sanitize uris for links and images. Used by $compile.
|
|
5
|
+
*/
|
|
6
|
+
export function SanitizeUriProvider(): void;
|
|
7
|
+
export class SanitizeUriProvider {
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
11
|
+
* urls during a[href] sanitization.
|
|
12
|
+
*
|
|
13
|
+
* The sanitization is a security measure aimed at prevent XSS attacks via HTML anchor links.
|
|
14
|
+
*
|
|
15
|
+
* Any url due to be assigned to an `a[href]` attribute via interpolation is marked as requiring
|
|
16
|
+
* the $sce.URL security context. When interpolation occurs a call is made to `$sce.trustAsUrl(url)`
|
|
17
|
+
* which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize the potentially malicious URL.
|
|
18
|
+
*
|
|
19
|
+
* If the URL matches the `aHrefSanitizationTrustedUrlList` regular expression, it is returned unchanged.
|
|
20
|
+
*
|
|
21
|
+
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
|
22
|
+
* to the DOM it is inactive and potentially malicious code will not be executed.
|
|
23
|
+
*
|
|
24
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
25
|
+
* @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
|
|
26
|
+
* chaining otherwise.
|
|
27
|
+
*/
|
|
28
|
+
aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
32
|
+
* urls during img[src] sanitization.
|
|
33
|
+
*
|
|
34
|
+
* The sanitization is a security measure aimed at prevent XSS attacks via HTML image src links.
|
|
35
|
+
*
|
|
36
|
+
* Any URL due to be assigned to an `img[src]` attribute via interpolation is marked as requiring
|
|
37
|
+
* the $sce.MEDIA_URL security context. When interpolation occurs a call is made to
|
|
38
|
+
* `$sce.trustAsMediaUrl(url)` which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize
|
|
39
|
+
* the potentially malicious URL.
|
|
40
|
+
*
|
|
41
|
+
* If the URL matches the `imgSrcSanitizationTrustedUrlList` regular expression, it is returned
|
|
42
|
+
* unchanged.
|
|
43
|
+
*
|
|
44
|
+
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
|
45
|
+
* to the DOM it is inactive and potentially malicious code will not be executed.
|
|
46
|
+
*
|
|
47
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
48
|
+
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
|
49
|
+
* chaining otherwise.
|
|
50
|
+
*/
|
|
51
|
+
imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.$compileProvider;
|
|
52
|
+
$get: () => (uri: any, isMediaUrl: any) => any;
|
|
53
|
+
}
|
|
@@ -91,76 +91,70 @@ export function adjustMatcher(matcher: any): any;
|
|
|
91
91
|
*/
|
|
92
92
|
export function $SceDelegateProvider(): void;
|
|
93
93
|
export class $SceDelegateProvider {
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
| string
|
|
155
|
-
| ((
|
|
156
|
-
$injector: any,
|
|
157
|
-
$$sanitizeUri: any,
|
|
158
|
-
) => {
|
|
94
|
+
SCE_CONTEXTS: {
|
|
95
|
+
HTML: string;
|
|
96
|
+
CSS: string;
|
|
97
|
+
MEDIA_URL: string;
|
|
98
|
+
URL: string;
|
|
99
|
+
RESOURCE_URL: string;
|
|
100
|
+
JS: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* @ngdoc method
|
|
104
|
+
* @name $sceDelegateProvider#trustedResourceUrlList
|
|
105
|
+
* @kind function
|
|
106
|
+
*
|
|
107
|
+
* @param {Array=} trustedResourceUrlList When provided, replaces the trustedResourceUrlList with
|
|
108
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
109
|
+
* further changes to the array are ignored.
|
|
110
|
+
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
111
|
+
* allowed in this array.
|
|
112
|
+
*
|
|
113
|
+
* @return {Array} The currently set trusted resource URL array.
|
|
114
|
+
*
|
|
115
|
+
* @description
|
|
116
|
+
* Sets/Gets the list trusted of resource URLs.
|
|
117
|
+
*
|
|
118
|
+
* The **default value** when no `trustedResourceUrlList` has been explicitly set is `['self']`
|
|
119
|
+
* allowing only same origin resource requests.
|
|
120
|
+
*
|
|
121
|
+
* <div class="alert alert-warning">
|
|
122
|
+
* **Note:** the default `trustedResourceUrlList` of 'self' is not recommended if your app shares
|
|
123
|
+
* its origin with other apps! It is a good idea to limit it to only your application's directory.
|
|
124
|
+
* </div>
|
|
125
|
+
*/
|
|
126
|
+
trustedResourceUrlList: (value: any, ...args: any[]) => any[];
|
|
127
|
+
/**
|
|
128
|
+
* @ngdoc method
|
|
129
|
+
* @name $sceDelegateProvider#bannedResourceUrlList
|
|
130
|
+
* @kind function
|
|
131
|
+
*
|
|
132
|
+
* @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
|
|
133
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
134
|
+
* further changes to the array are ignored.</p><p>
|
|
135
|
+
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
136
|
+
* allowed in this array.</p><p>
|
|
137
|
+
* The typical usage for the `bannedResourceUrlList` is to **block
|
|
138
|
+
* [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
|
|
139
|
+
* these would otherwise be trusted but actually return content from the redirected domain.
|
|
140
|
+
* </p><p>
|
|
141
|
+
* Finally, **the banned resource URL list overrides the trusted resource URL list** and has
|
|
142
|
+
* the final say.
|
|
143
|
+
*
|
|
144
|
+
* @return {Array} The currently set `bannedResourceUrlList` array.
|
|
145
|
+
*
|
|
146
|
+
* @description
|
|
147
|
+
* Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
|
|
148
|
+
*
|
|
149
|
+
* The **default value** when no trusted resource URL list has been explicitly set is the empty
|
|
150
|
+
* array (i.e. there is no `bannedResourceUrlList`.)
|
|
151
|
+
*/
|
|
152
|
+
bannedResourceUrlList: (value: any, ...args: any[]) => any[];
|
|
153
|
+
$get: (string | (($injector: any, $$sanitizeUri: any) => {
|
|
159
154
|
trustAs: (type: string, trustedValue: any) => any;
|
|
160
155
|
getTrusted: (type: string, maybeTrusted: any) => any;
|
|
161
156
|
valueOf: (maybeTrusted: any) => any;
|
|
162
|
-
|
|
163
|
-
)[];
|
|
157
|
+
}))[];
|
|
164
158
|
}
|
|
165
159
|
/**
|
|
166
160
|
* @ngdoc provider
|
|
@@ -408,25 +402,25 @@ export class $SceDelegateProvider {
|
|
|
408
402
|
*/
|
|
409
403
|
export function $SceProvider(): void;
|
|
410
404
|
export class $SceProvider {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
405
|
+
/**
|
|
406
|
+
* @ngdoc method
|
|
407
|
+
* @name $sceProvider#enabled
|
|
408
|
+
* @kind function
|
|
409
|
+
*
|
|
410
|
+
* @param {boolean=} value If provided, then enables/disables SCE application-wide.
|
|
411
|
+
* @return {boolean} True if SCE is enabled, false otherwise.
|
|
412
|
+
*
|
|
413
|
+
* @description
|
|
414
|
+
* Enables/disables SCE and returns the current value.
|
|
415
|
+
*/
|
|
416
|
+
enabled: (value?: boolean | undefined, ...args: any[]) => boolean;
|
|
417
|
+
$get: (string | (($parse: any, $sceDelegate: any) => any))[];
|
|
424
418
|
}
|
|
425
419
|
export namespace SCE_CONTEXTS {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
420
|
+
let HTML: string;
|
|
421
|
+
let CSS: string;
|
|
422
|
+
let MEDIA_URL: string;
|
|
423
|
+
let URL: string;
|
|
424
|
+
let RESOURCE_URL: string;
|
|
425
|
+
let JS: string;
|
|
432
426
|
}
|