@angular-wave/angular.ts 0.15.1 → 0.15.2
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/@types/angular.d.ts +3 -0
- package/@types/core/scope/scope.d.ts +16 -24
- package/@types/directive/input/input.d.ts +8 -40
- package/@types/directive/show-hide/show-hide.d.ts +2 -1
- package/@types/namespace.d.ts +7 -1
- package/@types/services/http/interface.d.ts +0 -7
- package/@types/services/template-request/interface.d.ts +2 -9
- package/@types/services/template-request/template-request.d.ts +7 -40
- package/@types/shared/utils.d.ts +0 -10
- package/dist/angular-ts.esm.js +189 -635
- package/dist/angular-ts.umd.js +189 -635
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular-ts.umd.min.js.gz +0 -0
- package/dist/angular-ts.umd.min.js.map +1 -1
- package/package.json +1 -1
package/@types/angular.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @param {Object} target - The object to be wrapped in a proxy.
|
|
7
7
|
* @param {Scope} [context] - The context for the handler, used to track listeners.
|
|
8
|
-
* @returns {Scope} - A proxy that intercepts operations on the target object,
|
|
8
|
+
* @returns {Scope|Object} - A proxy that intercepts operations on the target object,
|
|
9
9
|
* or the original value if the target is not an object.
|
|
10
10
|
*/
|
|
11
|
-
export function createScope(target?: any, context?: Scope): Scope;
|
|
11
|
+
export function createScope(target?: any, context?: Scope): Scope | any;
|
|
12
12
|
/**
|
|
13
13
|
* @ignore
|
|
14
14
|
* Checks if a target should be excluded from scope observability
|
|
@@ -19,13 +19,13 @@ export function isNonScope(target: any): boolean;
|
|
|
19
19
|
/** @ignore @type {Function[]}*/
|
|
20
20
|
export const $postUpdateQueue: Function[];
|
|
21
21
|
export class RootScopeProvider {
|
|
22
|
-
rootScope:
|
|
22
|
+
rootScope: any;
|
|
23
23
|
$get: (
|
|
24
24
|
| string
|
|
25
25
|
| ((
|
|
26
26
|
exceptionHandler: ng.ExceptionHandlerService,
|
|
27
27
|
parse: ng.ParseService,
|
|
28
|
-
) =>
|
|
28
|
+
) => any)
|
|
29
29
|
)[];
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -45,22 +45,14 @@ export class Scope {
|
|
|
45
45
|
context: Scope;
|
|
46
46
|
/** @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners */
|
|
47
47
|
watchers: Map<string, Array<import("./interface.ts").Listener>>;
|
|
48
|
-
/** @type {Map<String, Function[]>} Event listeners */
|
|
49
|
-
|
|
50
|
-
/** @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners from other proxies */
|
|
51
|
-
|
|
52
|
-
/** @type {Set<Proxy<ng.Scope>>} */
|
|
53
|
-
|
|
54
|
-
/** @type {WeakMap<Object, Array<string>>} */
|
|
55
|
-
|
|
56
|
-
/** @type {Map<Function, {oldValue: any, fn: Function}>} */
|
|
57
|
-
functionListeners: Map<
|
|
58
|
-
Function,
|
|
59
|
-
{
|
|
60
|
-
oldValue: any;
|
|
61
|
-
fn: Function;
|
|
62
|
-
}
|
|
63
|
-
>;
|
|
48
|
+
/** @private @type {Map<String, Function[]>} Event listeners */
|
|
49
|
+
private _listeners;
|
|
50
|
+
/** @private @type {Map<string, Array<import('./interface.ts').Listener>>} Watch listeners from other proxies */
|
|
51
|
+
private _foreignListeners;
|
|
52
|
+
/** @private @type {Set<Proxy<ng.Scope>>} */
|
|
53
|
+
private _foreignProxies;
|
|
54
|
+
/** @private @type {WeakMap<Object, Array<string>>} */
|
|
55
|
+
private _objectListeners;
|
|
64
56
|
/** @type {Proxy<Scope>} Current proxy being operated on */
|
|
65
57
|
$proxy: ProxyConstructor;
|
|
66
58
|
/** @type {Scope} The actual proxy */
|
|
@@ -82,10 +74,10 @@ export class Scope {
|
|
|
82
74
|
*/
|
|
83
75
|
$root: Scope;
|
|
84
76
|
$parent: Scope;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
/** @ignore @type {boolean} */
|
|
78
|
+
_destroyed: boolean;
|
|
79
|
+
/** @private @type {import("./interface.ts").Listener[]} A list of scheduled Event listeners */
|
|
80
|
+
private _scheduled;
|
|
89
81
|
$scopename: any;
|
|
90
82
|
/** @private */
|
|
91
83
|
private propertyMap;
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export function
|
|
7
|
-
type: any,
|
|
8
|
-
regexp: any,
|
|
9
|
-
parseDate: any,
|
|
10
|
-
): (
|
|
11
|
-
scope: any,
|
|
12
|
-
element: any,
|
|
13
|
-
attr: any,
|
|
14
|
-
ctrl: any,
|
|
15
|
-
$filter: any,
|
|
16
|
-
$parse: any,
|
|
17
|
-
) => void;
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} type
|
|
3
|
+
* @param {RegExp} regexp
|
|
4
|
+
* @returns {*}
|
|
5
|
+
*/
|
|
6
|
+
export function createStringDateInputType(type: string, regexp: RegExp): any;
|
|
18
7
|
export function badInputChecker(
|
|
19
8
|
scope: any,
|
|
20
9
|
element: any,
|
|
@@ -35,7 +24,6 @@ export function numberInputType(
|
|
|
35
24
|
element: any,
|
|
36
25
|
attr: any,
|
|
37
26
|
ctrl: any,
|
|
38
|
-
$filter: any,
|
|
39
27
|
$parse: any,
|
|
40
28
|
): void;
|
|
41
29
|
export function rangeInputType(
|
|
@@ -45,41 +33,21 @@ export function rangeInputType(
|
|
|
45
33
|
ctrl: any,
|
|
46
34
|
): void;
|
|
47
35
|
/**
|
|
48
|
-
* @param {ng.FilterFactory} $filter
|
|
49
36
|
* @param {ng.ParseService} $parse
|
|
50
37
|
* @returns {ng.Directive}
|
|
51
38
|
*/
|
|
52
|
-
export function inputDirective(
|
|
53
|
-
$filter: ng.FilterFactory,
|
|
54
|
-
$parse: ng.ParseService,
|
|
55
|
-
): ng.Directive;
|
|
39
|
+
export function inputDirective($parse: ng.ParseService): ng.Directive;
|
|
56
40
|
export namespace inputDirective {
|
|
57
41
|
let $inject: string[];
|
|
58
42
|
}
|
|
59
43
|
/**
|
|
60
44
|
* @returns {ng.Directive}
|
|
61
45
|
*/
|
|
62
|
-
export function
|
|
46
|
+
export function hiddenInputDirective(): ng.Directive;
|
|
63
47
|
/**
|
|
64
48
|
* @returns {ng.Directive}
|
|
65
49
|
*/
|
|
66
50
|
export function ngValueDirective(): ng.Directive;
|
|
67
|
-
/**
|
|
68
|
-
* @param {Date} date
|
|
69
|
-
* @param {any} timezone
|
|
70
|
-
* @param {undefined} [reverse]
|
|
71
|
-
*/
|
|
72
|
-
export function convertTimezoneToLocal(
|
|
73
|
-
date: Date,
|
|
74
|
-
timezone: any,
|
|
75
|
-
reverse?: undefined,
|
|
76
|
-
): Date;
|
|
77
|
-
/**
|
|
78
|
-
* @param {any} timezone
|
|
79
|
-
* @param {number} [fallback]
|
|
80
|
-
* @returns {number}
|
|
81
|
-
*/
|
|
82
|
-
export function timezoneToOffset(timezone: any, fallback?: number): number;
|
|
83
51
|
export const ISO_DATE_REGEXP: RegExp;
|
|
84
52
|
export const URL_REGEXP: RegExp;
|
|
85
53
|
export const EMAIL_REGEXP: RegExp;
|
|
@@ -7,9 +7,10 @@ export namespace ngShowDirective {
|
|
|
7
7
|
let $inject: string[];
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
+
* @param {ng.AnimateService} $animate
|
|
10
11
|
* @returns {ng.Directive}
|
|
11
12
|
*/
|
|
12
|
-
export function ngHideDirective($animate:
|
|
13
|
+
export function ngHideDirective($animate: ng.AnimateService): ng.Directive;
|
|
13
14
|
export namespace ngHideDirective {
|
|
14
15
|
let $inject_1: string[];
|
|
15
16
|
export { $inject_1 as $inject };
|
package/@types/namespace.d.ts
CHANGED
|
@@ -20,7 +20,11 @@ import { ExceptionHandler as TExceptionHandler } from "./services/exception/inte
|
|
|
20
20
|
import { ExceptionHandlerProvider as TExceptionHandlerProvider } from "./services/exception/exception.js";
|
|
21
21
|
import { ParseService as TParseService } from "./core/parse/interface.ts";
|
|
22
22
|
import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
HttpParamSerializer as THttpParamSerializer,
|
|
25
|
+
HttpProviderDefaults as THttpProviderDefaults,
|
|
26
|
+
RequestShortcutConfig as TRequestShortcutConfig,
|
|
27
|
+
} from "./services/http/interface.ts";
|
|
24
28
|
import { HttpParamSerializerProvider as THttpParamSerializerProvider } from "./services/http/http.js";
|
|
25
29
|
import {
|
|
26
30
|
FilterFactory as TFilterFactory,
|
|
@@ -214,5 +218,7 @@ declare global {
|
|
|
214
218
|
type AnchorScrollObject = TAnchorScrollObject;
|
|
215
219
|
type InjectionTokens = typeof PublicInjectionTokens;
|
|
216
220
|
type ScopeEvent = TScopeEvent;
|
|
221
|
+
type RequestShortcutConfig = TRequestShortcutConfig;
|
|
222
|
+
type HttpProviderDefaults = THttpProviderDefaults;
|
|
217
223
|
}
|
|
218
224
|
}
|
|
@@ -176,13 +176,6 @@ export interface HttpService {
|
|
|
176
176
|
* @param config Optional configuration object
|
|
177
177
|
*/
|
|
178
178
|
head<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
179
|
-
/**
|
|
180
|
-
* Shortcut method to perform JSONP request.
|
|
181
|
-
*
|
|
182
|
-
* @param url Relative or absolute URL specifying the destination of the request
|
|
183
|
-
* @param config Optional configuration object
|
|
184
|
-
*/
|
|
185
|
-
jsonp<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
186
179
|
/**
|
|
187
180
|
* Shortcut method to perform POST request.
|
|
188
181
|
*
|
|
@@ -7,16 +7,9 @@ export interface TemplateRequestService {
|
|
|
7
7
|
* empty then a $compile error will be thrown (unless
|
|
8
8
|
* {ignoreRequestError} is set to true).
|
|
9
9
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param ignoreRequestError Whether or not to ignore the exception
|
|
12
|
-
* when the request fails or the template is
|
|
13
|
-
* empty.
|
|
10
|
+
* @param templateUrl The template URL.
|
|
14
11
|
*
|
|
15
12
|
* @return A promise whose value is the template content.
|
|
16
13
|
*/
|
|
17
|
-
(
|
|
18
|
-
/**
|
|
19
|
-
* total amount of pending template requests being downloaded.
|
|
20
|
-
*/
|
|
21
|
-
totalPendingRequests: number;
|
|
14
|
+
(templateUrl: string): Promise<string>;
|
|
22
15
|
}
|
|
@@ -1,52 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provider for the `$templateRequest` service.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Fetches templates via HTTP and caches them in `$templateCache`.
|
|
5
|
+
* Templates are assumed trusted. This provider allows configuring
|
|
6
|
+
* per-request `$http` options such as headers, timeout, or transform functions.
|
|
6
7
|
*/
|
|
7
|
-
export function TemplateRequestProvider(): void;
|
|
8
8
|
export class TemplateRequestProvider {
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the
|
|
13
|
-
* options if not overridden here.
|
|
14
|
-
*
|
|
15
|
-
* @param {string=} val new value for the {@link $http} options.
|
|
16
|
-
* @returns {string|TemplateRequestProvider} Returns the {@link $http} options when used as getter and self if used as setter.
|
|
17
|
-
*/
|
|
18
|
-
httpOptions: (val?: string | undefined) => string | TemplateRequestProvider;
|
|
19
|
-
/**
|
|
20
|
-
* The `$templateRequest` service runs security checks then downloads the provided template using
|
|
21
|
-
* `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
|
|
22
|
-
* fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
|
|
23
|
-
* exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
|
|
24
|
-
* contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
|
|
25
|
-
* when `tpl` is of type string and `$templateCache` has the matching entry.
|
|
26
|
-
*
|
|
27
|
-
* If you want to pass custom options to the `$http` service, such as setting the Accept header you
|
|
28
|
-
* can configure this via {@link $templateRequestProvider#httpOptions}.
|
|
29
|
-
*
|
|
30
|
-
* `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such
|
|
31
|
-
* as {@link ngInclude} to download and cache templates.
|
|
32
|
-
*
|
|
33
|
-
* 3rd party modules should use `$templateRequest` if their services or directives are loading
|
|
34
|
-
* templates.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} tpl The HTTP request template URL
|
|
37
|
-
* @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
|
|
38
|
-
*
|
|
39
|
-
* @return {Promise} a promise for the HTTP response data of the given URL.
|
|
40
|
-
*
|
|
41
|
-
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
|
|
42
|
-
*/
|
|
9
|
+
/** @type {ng.RequestShortcutConfig|undefined} */
|
|
10
|
+
httpOptions: ng.RequestShortcutConfig | undefined;
|
|
11
|
+
/** @returns {Array} DI tokens for Angular.ts injection */
|
|
43
12
|
$get: (
|
|
44
13
|
| string
|
|
45
14
|
| ((
|
|
46
|
-
$exceptionHandler: ng.ExceptionHandlerService,
|
|
47
15
|
$templateCache: ng.TemplateCacheService,
|
|
48
16
|
$http: ng.HttpService,
|
|
49
|
-
$sce: any,
|
|
50
17
|
) => ng.TemplateRequestService)
|
|
51
18
|
)[];
|
|
52
19
|
}
|
package/@types/shared/utils.d.ts
CHANGED
|
@@ -195,16 +195,6 @@ export function isBoolean(value: any): boolean;
|
|
|
195
195
|
* @returns {boolean}
|
|
196
196
|
*/
|
|
197
197
|
export function isPromiseLike(obj: any): boolean;
|
|
198
|
-
/**
|
|
199
|
-
* @param {*} value
|
|
200
|
-
* @returns {boolean}
|
|
201
|
-
*/
|
|
202
|
-
export function isTypedArray(value: any): boolean;
|
|
203
|
-
/**
|
|
204
|
-
* @param {*} obj
|
|
205
|
-
* @returns {boolean}
|
|
206
|
-
*/
|
|
207
|
-
export function isArrayBuffer(obj: any): boolean;
|
|
208
198
|
/**
|
|
209
199
|
* @param {*} value
|
|
210
200
|
* @returns {string | *}
|