@angular-wave/angular.ts 0.0.38 → 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/core/scope/scope.js +4 -7
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- 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/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,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
|
@@ -7,57 +7,57 @@
|
|
|
7
7
|
* Use the `$logProvider` to configure how the application logs messages
|
|
8
8
|
*/
|
|
9
9
|
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(): {
|
|
10
|
+
debug: boolean;
|
|
22
11
|
/**
|
|
23
12
|
* @ngdoc method
|
|
24
|
-
* @name $
|
|
25
|
-
*
|
|
13
|
+
* @name $logProvider#debugEnabled
|
|
26
14
|
* @description
|
|
27
|
-
*
|
|
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
|
|
28
17
|
*/
|
|
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
|
-
|
|
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;
|
|
30
|
+
/**
|
|
31
|
+
* @ngdoc method
|
|
32
|
+
* @name $log#info
|
|
33
|
+
*
|
|
34
|
+
* @description
|
|
35
|
+
* Write an information message
|
|
36
|
+
*/
|
|
37
|
+
info: (...args: any[]) => any;
|
|
38
|
+
/**
|
|
39
|
+
* @ngdoc method
|
|
40
|
+
* @name $log#warn
|
|
41
|
+
*
|
|
42
|
+
* @description
|
|
43
|
+
* Write a warning message
|
|
44
|
+
*/
|
|
45
|
+
warn: (...args: any[]) => any;
|
|
46
|
+
/**
|
|
47
|
+
* @ngdoc method
|
|
48
|
+
* @name $log#error
|
|
49
|
+
*
|
|
50
|
+
* @description
|
|
51
|
+
* Write an error message
|
|
52
|
+
*/
|
|
53
|
+
error: (...args: any[]) => any;
|
|
54
|
+
/**
|
|
55
|
+
* @ngdoc method
|
|
56
|
+
* @name $log#debug
|
|
57
|
+
*
|
|
58
|
+
* @description
|
|
59
|
+
* Write a debug message
|
|
60
|
+
*/
|
|
61
|
+
debug: (...args: any[]) => void;
|
|
62
|
+
};
|
|
63
63
|
}
|
|
@@ -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: any, $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
|
@@ -55,13 +55,7 @@ export function identity(x: any): any;
|
|
|
55
55
|
* @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
|
|
56
56
|
* @param latebind If true, the binding of the function is delayed until the first time it's invoked
|
|
57
57
|
*/
|
|
58
|
-
export function createProxyFunctions(
|
|
59
|
-
source: any,
|
|
60
|
-
target: any,
|
|
61
|
-
bind: any,
|
|
62
|
-
fnNames: any,
|
|
63
|
-
latebind?: boolean,
|
|
64
|
-
): any;
|
|
58
|
+
export function createProxyFunctions(source: any, target: any, bind: any, fnNames: any, latebind?: boolean): any;
|
|
65
59
|
/**
|
|
66
60
|
* prototypal inheritance helper.
|
|
67
61
|
* Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
|
|
@@ -131,10 +125,7 @@ export function map(collection: any, callback: any, target: any): any;
|
|
|
131
125
|
* Mostly just for [[flattenR]] and [[uniqR]]
|
|
132
126
|
*/
|
|
133
127
|
export function pushR(arr: any, obj: any): any;
|
|
134
|
-
export function assertFn(
|
|
135
|
-
predicateOrMap: any,
|
|
136
|
-
errMsg?: string,
|
|
137
|
-
): (obj: any) => any;
|
|
128
|
+
export function assertFn(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
138
129
|
/**
|
|
139
130
|
* Given two or more parallel arrays, returns an array of tuples where
|
|
140
131
|
* each tuple is composed of [ a[i], b[i], ... z[i] ]
|
|
@@ -203,14 +194,8 @@ export function flattenR(memo: any, elem: any): any;
|
|
|
203
194
|
export function uniqR(acc: any, token: any): any;
|
|
204
195
|
export function unnest(arr: any): any;
|
|
205
196
|
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;
|
|
197
|
+
export function assertPredicate(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
198
|
+
export function assertMap(predicateOrMap: any, errMsg?: string): (obj: any) => any;
|
|
214
199
|
export function pairs(obj: any): any[][];
|
|
215
200
|
export function silenceUncaughtInPromise(promise: any): any;
|
|
216
201
|
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)
|
|
@@ -19,17 +19,17 @@ export function isTextNode(html: string): boolean;
|
|
|
19
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
|
|
@@ -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>;
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -224,20 +224,14 @@ export function snakeCase(name: any, separator: any): any;
|
|
|
224
224
|
* @param {Object=} context Object to become context (`this`) for the iterator function.
|
|
225
225
|
* @returns {Object|Array} Reference to `obj`.
|
|
226
226
|
*/
|
|
227
|
-
export function forEach(
|
|
228
|
-
obj: any | any[],
|
|
229
|
-
iterator: Function,
|
|
230
|
-
context?: any | undefined,
|
|
231
|
-
): any | any[];
|
|
227
|
+
export function forEach(obj: any | any[], iterator: Function, context?: any | undefined): any | any[];
|
|
232
228
|
export function forEachSorted(obj: any, iterator: any, context: any): string[];
|
|
233
229
|
/**
|
|
234
230
|
* when using forEach the params are value, key, but it is often useful to have key, value.
|
|
235
231
|
* @param {function(string, *)} iteratorFn
|
|
236
232
|
* @returns {function(*, string)}
|
|
237
233
|
*/
|
|
238
|
-
export function reverseParams(
|
|
239
|
-
iteratorFn: (arg0: string, arg1: any) => any,
|
|
240
|
-
): (arg0: any, arg1: string) => any;
|
|
234
|
+
export function reverseParams(iteratorFn: (arg0: string, arg1: any) => any): (arg0: any, arg1: string) => any;
|
|
241
235
|
/**
|
|
242
236
|
* Set or clear the hashkey for an object.
|
|
243
237
|
* @param obj object
|
|
@@ -360,7 +354,7 @@ export function includes(array: any, obj: any): boolean;
|
|
|
360
354
|
* @param {T} value - The value to remove.
|
|
361
355
|
* @returns {number} - The index of the removed value, or -1 if the value was not found.
|
|
362
356
|
*/
|
|
363
|
-
export function arrayRemove<T>(array: T
|
|
357
|
+
export function arrayRemove<T>(array: Array<T>, value: T): number;
|
|
364
358
|
export function simpleCompare(a: any, b: any): boolean;
|
|
365
359
|
/**
|
|
366
360
|
* @module angular
|
|
@@ -500,10 +494,7 @@ export function bind(context: any, fn: any, ...args: any[]): Function;
|
|
|
500
494
|
*
|
|
501
495
|
* See https://github.com/angular/angular.js/pull/14221 for more information.
|
|
502
496
|
*/
|
|
503
|
-
export function toJson(
|
|
504
|
-
obj: any | any[] | Date | string | number | boolean,
|
|
505
|
-
pretty?: boolean | number,
|
|
506
|
-
): string | undefined;
|
|
497
|
+
export function toJson(obj: any | any[] | Date | string | number | boolean, pretty?: boolean | number): string | undefined;
|
|
507
498
|
/**
|
|
508
499
|
* @module angular
|
|
509
500
|
* @function fromJson
|
|
@@ -517,18 +508,14 @@ export function toJson(
|
|
|
517
508
|
export function fromJson(json: string): any | any[] | string | number;
|
|
518
509
|
export function timezoneToOffset(timezone: any, fallback: any): any;
|
|
519
510
|
export function addDateMinutes(date: any, minutes: any): Date;
|
|
520
|
-
export function convertTimezoneToLocal(
|
|
521
|
-
date: any,
|
|
522
|
-
timezone: any,
|
|
523
|
-
reverse: any,
|
|
524
|
-
): Date;
|
|
511
|
+
export function convertTimezoneToLocal(date: any, timezone: any, reverse: any): Date;
|
|
525
512
|
/**
|
|
526
513
|
* Parses an escaped url query string into key-value pairs.
|
|
527
514
|
* @param {string} keyValue
|
|
528
515
|
* @returns {Object.<string,boolean|Array>}
|
|
529
516
|
*/
|
|
530
517
|
export function parseKeyValue(keyValue: string): {
|
|
531
|
-
|
|
518
|
+
[x: string]: boolean | any[];
|
|
532
519
|
};
|
|
533
520
|
export function toKeyValue(obj: any): string;
|
|
534
521
|
/**
|
|
@@ -573,11 +560,7 @@ export function shallowCopy(src: any, dst: any): any;
|
|
|
573
560
|
* throw error if the argument is falsy.
|
|
574
561
|
*/
|
|
575
562
|
export function assertArg(arg: any, name: any, reason: any): any;
|
|
576
|
-
export function assertArgFn(
|
|
577
|
-
arg: any,
|
|
578
|
-
name: any,
|
|
579
|
-
acceptArrayAnnotation: any,
|
|
580
|
-
): any;
|
|
563
|
+
export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): any;
|
|
581
564
|
export function minErr(module: any): (...args: any[]) => Error;
|
|
582
565
|
export function toDebugString(obj: any): any;
|
|
583
566
|
/**
|