@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
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export function $$CookieReader($document: any): any;
|
|
11
11
|
export namespace $$CookieReader {
|
|
12
|
-
|
|
12
|
+
let $inject: string[];
|
|
13
13
|
}
|
|
14
14
|
export function CookieReaderProvider(): void;
|
|
15
15
|
export class CookieReaderProvider {
|
|
16
|
-
|
|
16
|
+
$get: typeof $$CookieReader;
|
|
17
17
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
* @name $document
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @typedef {import('../index').angular.ServiceProvider} angular.DocumentProvider
|
|
6
3
|
* @description
|
|
7
|
-
* A {@link angular.element jQuery or
|
|
4
|
+
* A {@link angular.element jQuery or JQLite} wrapper for the browser's `window.document` object.
|
|
8
5
|
*
|
|
9
6
|
* @example
|
|
10
7
|
<example module="documentExample" name="document">
|
|
@@ -23,16 +20,23 @@
|
|
|
23
20
|
</file>
|
|
24
21
|
</example>
|
|
25
22
|
*/
|
|
26
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @constructor
|
|
25
|
+
* @this {angular.DocumentProvider}
|
|
26
|
+
*/
|
|
27
|
+
export function $DocumentProvider(this: import("../index").angular.ServiceProvider): void;
|
|
27
28
|
export class $DocumentProvider {
|
|
28
|
-
|
|
29
|
+
$get: () => any;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* @private
|
|
32
33
|
*
|
|
33
|
-
|
|
34
|
+
* Listens for document visibility change and makes the current status accessible.
|
|
34
35
|
*/
|
|
35
36
|
export function $$IsDocumentHiddenProvider(): void;
|
|
36
37
|
export class $$IsDocumentHiddenProvider {
|
|
37
|
-
|
|
38
|
+
$get: (string | (($document: import("../shared/jqlite/jqlite").JQLite, $rootScope: import("../core/scope/scope").Scope) => () => boolean))[];
|
|
39
|
+
}
|
|
40
|
+
export namespace angular {
|
|
41
|
+
type DocumentProvider = import("../index").angular.ServiceProvider;
|
|
38
42
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export function $HttpParamSerializerProvider(): void;
|
|
2
|
+
export class $HttpParamSerializerProvider {
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc service
|
|
5
|
+
* @name $httpParamSerializer
|
|
6
|
+
* @description
|
|
7
|
+
*
|
|
8
|
+
* Default {@link $http `$http`} params serializer that converts objects to strings
|
|
9
|
+
* according to the following rules:
|
|
10
|
+
*
|
|
11
|
+
* * `{'foo': 'bar'}` results in `foo=bar`
|
|
12
|
+
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
|
|
13
|
+
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
|
|
14
|
+
* * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
|
|
15
|
+
*
|
|
16
|
+
* Note that serializer will sort the request parameters alphabetically.
|
|
17
|
+
*/
|
|
18
|
+
$get: () => (params: any) => string;
|
|
19
|
+
}
|
|
20
|
+
export function $HttpParamSerializerJQLikeProvider(): void;
|
|
21
|
+
export class $HttpParamSerializerJQLikeProvider {
|
|
22
|
+
/**
|
|
23
|
+
* @ngdoc service
|
|
24
|
+
* @name $httpParamSerializerJQLike
|
|
25
|
+
*
|
|
26
|
+
* @description
|
|
27
|
+
*
|
|
28
|
+
* Alternative {@link $http `$http`} params serializer that follows
|
|
29
|
+
* jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
|
|
30
|
+
* The serializer will also sort the params alphabetically.
|
|
31
|
+
*
|
|
32
|
+
* To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
|
|
33
|
+
*
|
|
34
|
+
* ```js
|
|
35
|
+
* $http({
|
|
36
|
+
* url: myUrl,
|
|
37
|
+
* method: 'GET',
|
|
38
|
+
* params: myParams,
|
|
39
|
+
* paramSerializer: '$httpParamSerializerJQLike'
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* It is also possible to set it as the default `paramSerializer` in the
|
|
44
|
+
* {@link $httpProvider#defaults `$httpProvider`}.
|
|
45
|
+
*
|
|
46
|
+
* Additionally, you can inject the serializer and use it explicitly, for example to serialize
|
|
47
|
+
* form data for submission:
|
|
48
|
+
*
|
|
49
|
+
* ```js
|
|
50
|
+
* .controller(function($http, $httpParamSerializerJQLike) {
|
|
51
|
+
* //...
|
|
52
|
+
*
|
|
53
|
+
* $http({
|
|
54
|
+
* url: myUrl,
|
|
55
|
+
* method: 'POST',
|
|
56
|
+
* data: $httpParamSerializerJQLike(myData),
|
|
57
|
+
* headers: {
|
|
58
|
+
* 'Content-Type': 'application/x-www-form-urlencoded'
|
|
59
|
+
* }
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
$get: () => (params: any) => string;
|
|
67
|
+
}
|
|
68
|
+
export function defaultHttpResponseTransform(data: any, headers: any): any;
|
|
69
|
+
/**
|
|
70
|
+
* @ngdoc provider
|
|
71
|
+
* @name $httpProvider
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* @description
|
|
75
|
+
* Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
|
|
76
|
+
*/
|
|
77
|
+
export function $HttpProvider(): void;
|
|
78
|
+
export class $HttpProvider {
|
|
79
|
+
defaults: {
|
|
80
|
+
transformResponse: (typeof defaultHttpResponseTransform)[];
|
|
81
|
+
transformRequest: ((d: any) => any)[];
|
|
82
|
+
headers: {
|
|
83
|
+
common: {
|
|
84
|
+
Accept: string;
|
|
85
|
+
};
|
|
86
|
+
post: any;
|
|
87
|
+
put: any;
|
|
88
|
+
patch: any;
|
|
89
|
+
};
|
|
90
|
+
xsrfCookieName: string;
|
|
91
|
+
xsrfHeaderName: string;
|
|
92
|
+
paramSerializer: string;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @ngdoc method
|
|
96
|
+
* @name $httpProvider#useApplyAsync
|
|
97
|
+
* @description
|
|
98
|
+
*
|
|
99
|
+
* Configure $http service to combine processing of multiple http responses received at around
|
|
100
|
+
* the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
|
|
101
|
+
* significant performance improvement for bigger applications that make many HTTP requests
|
|
102
|
+
* concurrently (common during application bootstrap).
|
|
103
|
+
*
|
|
104
|
+
* Defaults to false. If no value is specified, returns the current configured value.
|
|
105
|
+
*
|
|
106
|
+
* @param {boolean=} value If true, when requests are loaded, they will schedule a deferred
|
|
107
|
+
* "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window
|
|
108
|
+
* to load and share the same digest cycle.
|
|
109
|
+
*
|
|
110
|
+
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
|
|
111
|
+
* otherwise, returns the current configured value.
|
|
112
|
+
*/
|
|
113
|
+
useApplyAsync: (value?: boolean | undefined) => boolean | any;
|
|
114
|
+
interceptors: any[];
|
|
115
|
+
xsrfTrustedOrigins: any[];
|
|
116
|
+
$get: (string | (($browser: any, $httpBackend: any, $$cookieReader: any, $cacheFactory: any, $rootScope: any, $q: any, $injector: any, $sce: any) => {
|
|
117
|
+
(requestConfig: any): HttpPromise;
|
|
118
|
+
pendingRequests: any[];
|
|
119
|
+
/**
|
|
120
|
+
* @ngdoc property
|
|
121
|
+
* @name $http#defaults
|
|
122
|
+
*
|
|
123
|
+
* @description
|
|
124
|
+
* Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
|
|
125
|
+
* default headers, withCredentials as well as request and response transformations.
|
|
126
|
+
*
|
|
127
|
+
* See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
|
|
128
|
+
*/
|
|
129
|
+
defaults: {
|
|
130
|
+
transformResponse: (typeof defaultHttpResponseTransform)[];
|
|
131
|
+
transformRequest: ((d: any) => any)[];
|
|
132
|
+
headers: {
|
|
133
|
+
common: {
|
|
134
|
+
Accept: string;
|
|
135
|
+
};
|
|
136
|
+
post: any;
|
|
137
|
+
put: any;
|
|
138
|
+
patch: any;
|
|
139
|
+
};
|
|
140
|
+
xsrfCookieName: string;
|
|
141
|
+
xsrfHeaderName: string;
|
|
142
|
+
paramSerializer: string;
|
|
143
|
+
};
|
|
144
|
+
}))[];
|
|
145
|
+
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export function $xhrFactoryProvider(): void;
|
|
24
24
|
export class $xhrFactoryProvider {
|
|
25
|
-
|
|
25
|
+
$get: () => () => XMLHttpRequest;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* @ngdoc service
|
|
@@ -41,38 +41,6 @@ export class $xhrFactoryProvider {
|
|
|
41
41
|
*/
|
|
42
42
|
export function $HttpBackendProvider(): void;
|
|
43
43
|
export class $HttpBackendProvider {
|
|
44
|
-
|
|
45
|
-
| string
|
|
46
|
-
| ((
|
|
47
|
-
$browser: any,
|
|
48
|
-
$xhrFactory: any,
|
|
49
|
-
) => (
|
|
50
|
-
method: any,
|
|
51
|
-
url: any,
|
|
52
|
-
post: any,
|
|
53
|
-
callback: any,
|
|
54
|
-
headers: any,
|
|
55
|
-
timeout: any,
|
|
56
|
-
withCredentials: any,
|
|
57
|
-
responseType: any,
|
|
58
|
-
eventHandlers: any,
|
|
59
|
-
uploadEventHandlers: any,
|
|
60
|
-
) => void)
|
|
61
|
-
)[];
|
|
44
|
+
$get: (string | (($browser: any, $xhrFactory: any) => (method: any, url: any, post: any, callback: any, headers: any, timeout: any, withCredentials: any, responseType: any, eventHandlers: any, uploadEventHandlers: any) => void))[];
|
|
62
45
|
}
|
|
63
|
-
export function createHttpBackend(
|
|
64
|
-
$browser: any,
|
|
65
|
-
createXhr: any,
|
|
66
|
-
$browserDefer: any,
|
|
67
|
-
): (
|
|
68
|
-
method: any,
|
|
69
|
-
url: any,
|
|
70
|
-
post: any,
|
|
71
|
-
callback: any,
|
|
72
|
-
headers: any,
|
|
73
|
-
timeout: any,
|
|
74
|
-
withCredentials: any,
|
|
75
|
-
responseType: any,
|
|
76
|
-
eventHandlers: any,
|
|
77
|
-
uploadEventHandlers: any,
|
|
78
|
-
) => void;
|
|
46
|
+
export function createHttpBackend($browser: any, createXhr: any, $browserDefer: any): (method: any, url: any, post: any, callback: any, headers: any, timeout: any, withCredentials: any, responseType: any, eventHandlers: any, uploadEventHandlers: any) => void;
|
package/types/services/log.d.ts
CHANGED
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @typedef {(...args: any[]) => void} LogCall
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} angular.LogService
|
|
6
|
+
* @property {LogCall} debug - Log a debug messages
|
|
7
|
+
* @property {LogCall} error - Log a error message
|
|
8
|
+
* @property {LogCall} info - Log a info message
|
|
9
|
+
* @property {LogCall} log - Log a general message
|
|
10
|
+
* @property {LogCall} warn - Log a warning message
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type {angular.LogService}
|
|
14
|
+
*/
|
|
15
|
+
export let LogService: angular.LogService;
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {import('../index').ServiceProvider} angular.LogProvider
|
|
18
|
+
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
19
|
+
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
3
22
|
* @name $logProvider
|
|
4
|
-
* @type {
|
|
23
|
+
* @type {angular.LogProvider}
|
|
5
24
|
*
|
|
6
25
|
* @description
|
|
7
26
|
* Use the `$logProvider` to configure how the application logs messages
|
|
8
27
|
*/
|
|
9
28
|
export class $LogProvider {
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @ngdoc method
|
|
13
|
-
* @name $logProvider#debugEnabled
|
|
14
|
-
* @description
|
|
15
|
-
* @param {boolean=} flag enable or disable debug level messages
|
|
16
|
-
* @returns {*} current value if used as getter or itself (chaining) if used as setter
|
|
17
|
-
*/
|
|
18
|
-
debugEnabled(flag?: boolean | undefined): any;
|
|
19
|
-
formatError(arg: any): any;
|
|
20
|
-
consoleLog(type: any): (...args: any[]) => any;
|
|
21
|
-
$get(): {
|
|
22
|
-
/**
|
|
23
|
-
* @ngdoc method
|
|
24
|
-
* @name $log#log
|
|
25
|
-
*
|
|
26
|
-
* @description
|
|
27
|
-
* Write a log message
|
|
28
|
-
*/
|
|
29
|
-
log: (...args: any[]) => any;
|
|
29
|
+
debug: boolean;
|
|
30
30
|
/**
|
|
31
|
-
* @
|
|
32
|
-
* @name $log#info
|
|
33
|
-
*
|
|
31
|
+
* @name $logProvider#debugEnabled
|
|
34
32
|
* @description
|
|
35
|
-
*
|
|
33
|
+
* @param {boolean=} flag enable or disable debug level messages
|
|
34
|
+
* @returns {*} current value if used as getter or itself (chaining) if used as setter
|
|
36
35
|
*/
|
|
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
|
-
|
|
36
|
+
debugEnabled(flag?: boolean | undefined): any;
|
|
37
|
+
formatError(arg: any): any;
|
|
38
|
+
consoleLog(type: any): (...args: any[]) => any;
|
|
39
|
+
$get(): angular.LogService;
|
|
40
|
+
}
|
|
41
|
+
export type LogCall = (...args: any[]) => void;
|
|
42
|
+
export namespace angular {
|
|
43
|
+
type LogService = {
|
|
44
|
+
/**
|
|
45
|
+
* - Log a debug messages
|
|
46
|
+
*/
|
|
47
|
+
debug: LogCall;
|
|
48
|
+
/**
|
|
49
|
+
* - Log a error message
|
|
50
|
+
*/
|
|
51
|
+
error: LogCall;
|
|
52
|
+
/**
|
|
53
|
+
* - Log a info message
|
|
54
|
+
*/
|
|
55
|
+
info: LogCall;
|
|
56
|
+
/**
|
|
57
|
+
* - Log a general message
|
|
58
|
+
*/
|
|
59
|
+
log: LogCall;
|
|
60
|
+
/**
|
|
61
|
+
* - Log a warning message
|
|
62
|
+
*/
|
|
63
|
+
warn: LogCall;
|
|
64
|
+
};
|
|
65
|
+
type LogProvider = any;
|
|
63
66
|
}
|
|
@@ -11,59 +11,50 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export function TemplateRequestProvider(this: any): void;
|
|
13
13
|
export class TemplateRequestProvider {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| string
|
|
58
|
-
| ((
|
|
59
|
-
$exceptionHandler: any,
|
|
60
|
-
$templateCache: any,
|
|
61
|
-
$http: any,
|
|
62
|
-
$q: any,
|
|
63
|
-
$sce: any,
|
|
64
|
-
) => {
|
|
14
|
+
/**
|
|
15
|
+
* @ngdoc method
|
|
16
|
+
* @name $templateRequestProvider#httpOptions
|
|
17
|
+
* @description
|
|
18
|
+
* The options to be passed to the {@link $http} service when making the request.
|
|
19
|
+
* You can use this to override options such as the "Accept" header for template requests.
|
|
20
|
+
*
|
|
21
|
+
* The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the
|
|
22
|
+
* options if not overridden here.
|
|
23
|
+
*
|
|
24
|
+
* @param {string=} value new value for the {@link $http} options.
|
|
25
|
+
* @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.
|
|
26
|
+
*/
|
|
27
|
+
httpOptions: (val: any) => string | (Window & typeof globalThis);
|
|
28
|
+
/**
|
|
29
|
+
* @ngdoc service
|
|
30
|
+
* @name $templateRequest
|
|
31
|
+
*
|
|
32
|
+
* @description
|
|
33
|
+
* The `$templateRequest` service runs security checks then downloads the provided template using
|
|
34
|
+
* `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
|
|
35
|
+
* fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
|
|
36
|
+
* exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
|
|
37
|
+
* contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
|
|
38
|
+
* when `tpl` is of type string and `$templateCache` has the matching entry.
|
|
39
|
+
*
|
|
40
|
+
* If you want to pass custom options to the `$http` service, such as setting the Accept header you
|
|
41
|
+
* can configure this via {@link $templateRequestProvider#httpOptions}.
|
|
42
|
+
*
|
|
43
|
+
* `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such
|
|
44
|
+
* as {@link ngInclude} to download and cache templates.
|
|
45
|
+
*
|
|
46
|
+
* 3rd party modules should use `$templateRequest` if their services or directives are loading
|
|
47
|
+
* templates.
|
|
48
|
+
*
|
|
49
|
+
* @param {string|TrustedResourceUrl} tpl The HTTP request template URL
|
|
50
|
+
* @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
|
|
51
|
+
*
|
|
52
|
+
* @return {Promise} a promise for the HTTP response data of the given URL.
|
|
53
|
+
*
|
|
54
|
+
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
|
|
55
|
+
*/
|
|
56
|
+
$get: (string | (($exceptionHandler: import("../core/exception-handler").angular.ErrorHandler, $templateCache: any, $http: any, $q: any, $sce: any) => {
|
|
65
57
|
(tpl: any, ignoreRequestError: any): any;
|
|
66
58
|
totalPendingRequests: number;
|
|
67
|
-
|
|
68
|
-
)[];
|
|
59
|
+
}))[];
|
|
69
60
|
}
|
package/types/shared/common.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export function identity(x: any): any;
|
|
2
1
|
/**
|
|
3
2
|
* Builds proxy functions on the `to` object which pass through to the `from` object.
|
|
4
3
|
*
|
|
@@ -55,13 +54,7 @@ export function identity(x: any): any;
|
|
|
55
54
|
* @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
|
|
56
55
|
* @param latebind If true, the binding of the function is delayed until the first time it's invoked
|
|
57
56
|
*/
|
|
58
|
-
export function createProxyFunctions(
|
|
59
|
-
source: any,
|
|
60
|
-
target: any,
|
|
61
|
-
bind: any,
|
|
62
|
-
fnNames: any,
|
|
63
|
-
latebind?: boolean,
|
|
64
|
-
): any;
|
|
57
|
+
export function createProxyFunctions(source: any, target: any, bind: any, fnNames: any, latebind?: boolean): any;
|
|
65
58
|
/**
|
|
66
59
|
* prototypal inheritance helper.
|
|
67
60
|
* Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
|
|
@@ -131,10 +124,7 @@ export function map(collection: any, callback: any, target: any): any;
|
|
|
131
124
|
* Mostly just for [[flattenR]] and [[uniqR]]
|
|
132
125
|
*/
|
|
133
126
|
export function pushR(arr: any, obj: any): any;
|
|
134
|
-
export function assertFn(
|
|
135
|
-
predicateOrMap: any,
|
|
136
|
-
errMsg?: string,
|
|
137
|
-
): (obj: any) => any;
|
|
127
|
+
export function assertFn(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
138
128
|
/**
|
|
139
129
|
* Given two or more parallel arrays, returns an array of tuples where
|
|
140
130
|
* each tuple is composed of [ a[i], b[i], ... z[i] ]
|
|
@@ -203,14 +193,8 @@ export function flattenR(memo: any, elem: any): any;
|
|
|
203
193
|
export function uniqR(acc: any, token: any): any;
|
|
204
194
|
export function unnest(arr: any): any;
|
|
205
195
|
export function flatten(arr: any): any;
|
|
206
|
-
export function assertPredicate(
|
|
207
|
-
|
|
208
|
-
errMsg?: string,
|
|
209
|
-
): (obj: any) => any;
|
|
210
|
-
export function assertMap(
|
|
211
|
-
predicateOrMap: any,
|
|
212
|
-
errMsg?: string,
|
|
213
|
-
): (obj: any) => any;
|
|
196
|
+
export function assertPredicate(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
197
|
+
export function assertMap(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
214
198
|
export function pairs(obj: any): any[][];
|
|
215
199
|
export function silenceUncaughtInPromise(promise: any): any;
|
|
216
200
|
export function silentRejection(error: any): any;
|
|
@@ -9,10 +9,10 @@ export const NOT_EMPTY_CLASS: "ng-not-empty";
|
|
|
9
9
|
export const PREFIX_REGEXP: RegExp;
|
|
10
10
|
export const SPECIAL_CHARS_REGEXP: RegExp;
|
|
11
11
|
export namespace ALIASED_ATTR {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
let ngMinlength: string;
|
|
13
|
+
let ngMaxlength: string;
|
|
14
|
+
let ngMin: string;
|
|
15
|
+
let ngMax: string;
|
|
16
|
+
let ngPattern: string;
|
|
17
|
+
let ngStep: string;
|
|
18
18
|
}
|
package/types/shared/hof.d.ts
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* @param fn
|
|
47
47
|
* @returns {*|function(): (*|any)}
|
|
48
48
|
*/
|
|
49
|
-
export function curry(fn: any): any | (() => any | any);
|
|
49
|
+
export function curry(fn: any): any | (() => (any | any));
|
|
50
50
|
/**
|
|
51
51
|
* Given a varargs list of functions, returns a function that composes the argument functions, right-to-left
|
|
52
52
|
* given: f(x), g(x), h(x)
|
|
@@ -16,20 +16,20 @@ export function snakeToCamel(name: string): string;
|
|
|
16
16
|
* @returns {boolean}
|
|
17
17
|
*/
|
|
18
18
|
export function isTextNode(html: string): boolean;
|
|
19
|
-
export function
|
|
19
|
+
export function JQLiteBuildFragment(html: any, context: any): any;
|
|
20
20
|
export function JQLite(element: any): any;
|
|
21
21
|
export class JQLite {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
constructor(element: any);
|
|
23
|
+
ready: typeof JQLiteReady;
|
|
24
|
+
toString(): string;
|
|
25
|
+
eq(index: any): any;
|
|
26
|
+
length: number;
|
|
27
|
+
push: (...items: undefined[]) => number;
|
|
28
|
+
sort: (compareFn?: (a: undefined, b: undefined) => number) => undefined[];
|
|
29
|
+
splice: {
|
|
30
|
+
(start: number, deleteCount?: number): undefined[];
|
|
31
|
+
(start: number, deleteCount: number, ...items: undefined[]): undefined[];
|
|
32
|
+
};
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* @param {Element} element
|
|
@@ -37,9 +37,9 @@ export class JQLite {
|
|
|
37
37
|
* @returns {void}
|
|
38
38
|
*/
|
|
39
39
|
export function dealoc(element: Element, onlyDescendants?: boolean): void;
|
|
40
|
-
export function
|
|
40
|
+
export function JQLiteRemove(element: any, keepData: any): void;
|
|
41
41
|
export function getBooleanAttrName(element: any, name: any): any;
|
|
42
|
-
export function
|
|
42
|
+
export function JQLiteCleanData(nodes: any): void;
|
|
43
43
|
/**
|
|
44
44
|
* @param {string} elementStr
|
|
45
45
|
* @returns {string} Returns the string representation of the element.
|
|
@@ -48,10 +48,9 @@ export function startingTag(elementStr: string): string;
|
|
|
48
48
|
/**
|
|
49
49
|
* Return the DOM siblings between the first and last node in the given array.
|
|
50
50
|
* @param {Array} nodes An array-like object
|
|
51
|
-
* @returns {Array} the inputted object or a
|
|
51
|
+
* @returns {Array} the inputted object or a JQLite collection containing the nodes
|
|
52
52
|
*/
|
|
53
53
|
export function getBlockNodes(nodes: any[]): any[];
|
|
54
|
-
export const jqLite: typeof JQLite;
|
|
55
54
|
export const BOOLEAN_ATTR: {};
|
|
56
|
-
declare function
|
|
55
|
+
declare function JQLiteReady(fn: any): void;
|
|
57
56
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {HTMLElement} element
|
|
3
|
+
* @param {string} event
|
|
4
|
+
*/
|
|
5
|
+
export function browserTrigger(element: HTMLElement, event: string): void;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param {number} t milliseconds to wait
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export function wait(t: number): Promise<any>;
|