@angular-wave/angular.ts 0.14.1 → 0.14.3
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 +4 -3
- package/@types/animations/interface.d.ts +2 -2
- package/@types/animations/queue/animate-queue.d.ts +0 -1
- package/@types/animations/raf-scheduler.d.ts +3 -3
- package/@types/animations/runner/animate-runner.d.ts +9 -6
- package/@types/core/compile/attributes.d.ts +3 -6
- package/@types/core/compile/compile.d.ts +1 -1
- package/@types/core/compile/inteface.d.ts +13 -9
- package/@types/core/di/ng-module/ng-module.d.ts +8 -7
- package/@types/core/filter/filter.d.ts +1 -1
- package/@types/core/parse/ast/ast.d.ts +30 -39
- package/@types/core/parse/ast-type.d.ts +16 -16
- package/@types/core/parse/interpreter.d.ts +1 -26
- package/@types/core/parse/lexer/lexer.d.ts +19 -19
- package/@types/core/parse/parser/parser.d.ts +4 -9
- package/@types/core/scope/interface.d.ts +0 -6
- package/@types/namespace.d.ts +4 -13
- package/@types/router/common/trace.d.ts +5 -5
- package/@types/router/params/interface.d.ts +2 -2
- package/@types/router/params/param.d.ts +3 -3
- package/@types/router/transition/reject-factory.d.ts +5 -5
- package/@types/router/transition/transition-hook.d.ts +11 -23
- package/@types/services/cookie/cookie.d.ts +2 -2
- package/@types/services/http/http.d.ts +8 -7
- package/@types/services/pubsub/pubsub.d.ts +1 -2
- package/@types/services/rest/rest.d.ts +5 -5
- package/@types/services/sse/sse.d.ts +1 -1
- package/@types/shared/node.d.ts +8 -0
- package/@types/shared/noderef.d.ts +8 -11
- package/@types/shared/utils.d.ts +25 -36
- package/@types/shared/validate.d.ts +36 -0
- package/dist/angular-ts.esm.js +1061 -1094
- package/dist/angular-ts.umd.js +1061 -1094
- package/dist/angular-ts.umd.min.js +2 -1
- package/dist/angular-ts.umd.min.js.map +1 -0
- package/package.json +1 -1
package/@types/namespace.d.ts
CHANGED
|
@@ -108,15 +108,10 @@ declare global {
|
|
|
108
108
|
type NgModule = TNgModule;
|
|
109
109
|
type PubSubProvider = TPubSubProvider;
|
|
110
110
|
type CompositeLinkFn = TCompositeLinkFn;
|
|
111
|
-
type PublicLinkFn = TPublicLinkFn
|
|
112
|
-
pre: any;
|
|
113
|
-
post: any;
|
|
114
|
-
};
|
|
111
|
+
type PublicLinkFn = TPublicLinkFn;
|
|
115
112
|
type NodeLinkFn = TNodeLinkFn;
|
|
116
113
|
type NodeLinkFnCtx = TNodeLinkFnCtx;
|
|
117
|
-
type TranscludeFn = TTranscludeFn
|
|
118
|
-
$$slots: any;
|
|
119
|
-
};
|
|
114
|
+
type TranscludeFn = TTranscludeFn;
|
|
120
115
|
type BoundTranscludeFn = TBoundTranscludeFn;
|
|
121
116
|
type LinkFnMapping = TLinkFnMapping;
|
|
122
117
|
type AnchorScrollProvider = TAnchorScrollProvider;
|
|
@@ -132,9 +127,7 @@ declare global {
|
|
|
132
127
|
type CookieService = TCookieService;
|
|
133
128
|
type ExceptionHandlerService = TExceptionHandler;
|
|
134
129
|
type FilterFn = TFilterFn;
|
|
135
|
-
type FilterFactory = TFilterFactory
|
|
136
|
-
$$moduleName: string;
|
|
137
|
-
};
|
|
130
|
+
type FilterFactory = TFilterFactory;
|
|
138
131
|
type FilterService = TFilterService;
|
|
139
132
|
type HttpParamSerializerSerService = THttpParamSerializer;
|
|
140
133
|
type HttpService = THttpService;
|
|
@@ -163,9 +156,7 @@ declare global {
|
|
|
163
156
|
T extends
|
|
164
157
|
| ((...args: any[]) => any)
|
|
165
158
|
| (abstract new (...args: any[]) => any),
|
|
166
|
-
> = TInjectable<T
|
|
167
|
-
$$moduleName: string;
|
|
168
|
-
};
|
|
159
|
+
> = TInjectable<T>;
|
|
169
160
|
type StorageBackend = TStorageBackend;
|
|
170
161
|
type StorageType = TStorageType;
|
|
171
162
|
type StreamConnectionConfig = TStreamConnectionConfig;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type Category = number;
|
|
2
2
|
export namespace Category {
|
|
3
|
-
let
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
3
|
+
let _RESOLVE: number;
|
|
4
|
+
let _TRANSITION: number;
|
|
5
|
+
let _HOOK: number;
|
|
6
|
+
let _UIVIEW: number;
|
|
7
|
+
let _VIEWCONFIG: number;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Prints ng-router Transition trace information to the console.
|
|
@@ -381,7 +381,7 @@ export interface Replace {
|
|
|
381
381
|
* pattern: new RegExp("[0-9]+(?:-[0-9]+)*")
|
|
382
382
|
*
|
|
383
383
|
* // Ensure that the (decoded) object is an array, and that all its elements are numbers
|
|
384
|
-
* is: (obj) =>
|
|
384
|
+
* is: (obj) => isArray(obj) &&
|
|
385
385
|
* obj.reduce((acc, item) => acc && typeof item === 'number', true),
|
|
386
386
|
*
|
|
387
387
|
* // Compare two arrays of integers
|
|
@@ -514,7 +514,7 @@ export interface ParamTypeDefinition {
|
|
|
514
514
|
* input is an array of ints:
|
|
515
515
|
*
|
|
516
516
|
* ```
|
|
517
|
-
* is: (val) =>
|
|
517
|
+
* is: (val) => isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true)
|
|
518
518
|
* ```
|
|
519
519
|
*
|
|
520
520
|
* If your type decodes the URL parameter value to a custom string, check that the string matches
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type DefType = number;
|
|
2
2
|
export namespace DefType {
|
|
3
|
-
let
|
|
4
|
-
let
|
|
5
|
-
let
|
|
3
|
+
let _PATH: number;
|
|
4
|
+
let _SEARCH: number;
|
|
5
|
+
let _CONFIG: number;
|
|
6
6
|
}
|
|
7
7
|
export class Param {
|
|
8
8
|
static values(params: any, values?: {}): {};
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export type RejectType = number;
|
|
5
5
|
export namespace RejectType {
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
6
|
+
let _SUPERSEDED: number;
|
|
7
|
+
let _ABORTED: number;
|
|
8
|
+
let _INVALID: number;
|
|
9
|
+
let _IGNORED: number;
|
|
10
|
+
let _ERROR: number;
|
|
11
11
|
}
|
|
12
12
|
export class Rejection {
|
|
13
13
|
/** Returns a Rejection due to transition superseded */
|
|
@@ -2,33 +2,21 @@
|
|
|
2
2
|
* Enum representing the different phases of a transition hook.
|
|
3
3
|
*/
|
|
4
4
|
export type TransitionHookPhase = number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
CREATE: 0;
|
|
13
|
-
BEFORE: 1;
|
|
14
|
-
RUN: 2;
|
|
15
|
-
SUCCESS: 3;
|
|
16
|
-
ERROR: 4;
|
|
17
|
-
}>;
|
|
5
|
+
export namespace TransitionHookPhase {
|
|
6
|
+
let _CREATE: number;
|
|
7
|
+
let _BEFORE: number;
|
|
8
|
+
let _RUN: number;
|
|
9
|
+
let _SUCCESS: number;
|
|
10
|
+
let _ERROR: number;
|
|
11
|
+
}
|
|
18
12
|
/**
|
|
19
13
|
* Enum representing the scope in which a transition hook operates.
|
|
20
14
|
*/
|
|
21
15
|
export type TransitionHookScope = number;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* @enum {number}
|
|
27
|
-
*/
|
|
28
|
-
export const TransitionHookScope: Readonly<{
|
|
29
|
-
TRANSITION: 0;
|
|
30
|
-
STATE: 1;
|
|
31
|
-
}>;
|
|
16
|
+
export namespace TransitionHookScope {
|
|
17
|
+
let _TRANSITION: number;
|
|
18
|
+
let _STATE: number;
|
|
19
|
+
}
|
|
32
20
|
export class TransitionHook {
|
|
33
21
|
/**
|
|
34
22
|
* Chains together an array of TransitionHooks.
|
|
@@ -27,8 +27,8 @@ export class CookieService {
|
|
|
27
27
|
$exceptionHandler: ng.ExceptionHandlerService,
|
|
28
28
|
);
|
|
29
29
|
/** @type {ng.CookieOptions} */
|
|
30
|
-
|
|
31
|
-
$exceptionHandler: import("../exception/interface.ts").ExceptionHandler;
|
|
30
|
+
_defaults: ng.CookieOptions;
|
|
31
|
+
_$exceptionHandler: import("../exception/interface.ts").ExceptionHandler;
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves a raw cookie value.
|
|
34
34
|
*
|
|
@@ -171,10 +171,11 @@ export function http(
|
|
|
171
171
|
eventHandlers?: Record<string, EventListener>,
|
|
172
172
|
uploadEventHandlers?: Record<string, EventListener>,
|
|
173
173
|
): void;
|
|
174
|
-
export
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
export type Http = number;
|
|
175
|
+
export namespace Http {
|
|
176
|
+
let _OK: number;
|
|
177
|
+
let _MultipleChoices: number;
|
|
178
|
+
let _BadRequest: number;
|
|
179
|
+
let _NotFound: number;
|
|
180
|
+
let _ErrorMax: number;
|
|
181
|
+
}
|
|
@@ -10,7 +10,6 @@ export class PubSubProvider {
|
|
|
10
10
|
*/
|
|
11
11
|
eventBus: PubSub;
|
|
12
12
|
$get: any[];
|
|
13
|
-
$exceptionHandler: import("../exception/interface.ts").ExceptionHandler;
|
|
14
13
|
}
|
|
15
14
|
export class PubSub {
|
|
16
15
|
/** @private {Object<string, Array<{fn: Function, context: any}>>} */
|
|
@@ -18,7 +17,7 @@ export class PubSub {
|
|
|
18
17
|
/** @private */
|
|
19
18
|
private _disposed;
|
|
20
19
|
/** @type {ng.ExceptionHandlerService} */
|
|
21
|
-
$exceptionHandler: ng.ExceptionHandlerService;
|
|
20
|
+
_$exceptionHandler: ng.ExceptionHandlerService;
|
|
22
21
|
/**
|
|
23
22
|
* Set instance to initial state
|
|
24
23
|
*/
|
|
@@ -19,13 +19,13 @@ export class RestService<T, ID> {
|
|
|
19
19
|
options?: any,
|
|
20
20
|
);
|
|
21
21
|
/** @private */
|
|
22
|
-
private $http;
|
|
22
|
+
private _$http;
|
|
23
23
|
/** @private */
|
|
24
|
-
private
|
|
24
|
+
private _baseUrl;
|
|
25
25
|
/** @private */
|
|
26
|
-
private
|
|
26
|
+
private _entityClass;
|
|
27
27
|
/** @private */
|
|
28
|
-
private
|
|
28
|
+
private _options;
|
|
29
29
|
/**
|
|
30
30
|
* Build full URL from template and parameters
|
|
31
31
|
* @param {string} template
|
|
@@ -72,7 +72,7 @@ export class RestService<T, ID> {
|
|
|
72
72
|
*/
|
|
73
73
|
export class RestProvider {
|
|
74
74
|
/** @private @type {ng.RestDefinition<any>[]} */
|
|
75
|
-
private
|
|
75
|
+
private _definitions;
|
|
76
76
|
/**
|
|
77
77
|
* Register a REST resource at config phase
|
|
78
78
|
* @template T
|
|
@@ -9,7 +9,6 @@ export class NodeRef {
|
|
|
9
9
|
* @throws {Error} If the argument is invalid or cannot be wrapped properly.
|
|
10
10
|
*/
|
|
11
11
|
constructor(element: Node | Element | string | NodeList | Node[]);
|
|
12
|
-
initial: string | Node | NodeList | Node[];
|
|
13
12
|
/** @private @type {Node | ChildNode | null} */
|
|
14
13
|
private _node;
|
|
15
14
|
/** @private @type {Element | undefined} */
|
|
@@ -17,9 +16,7 @@ export class NodeRef {
|
|
|
17
16
|
/** @private @type {Array<Node>} a stable list on nodes */
|
|
18
17
|
private _nodes;
|
|
19
18
|
/** @type {boolean} */
|
|
20
|
-
|
|
21
|
-
/** @type {boolean} */
|
|
22
|
-
isList: boolean;
|
|
19
|
+
_isList: boolean;
|
|
23
20
|
/** @param {Element} el */
|
|
24
21
|
set element(el: Element);
|
|
25
22
|
/** @returns {Element} */
|
|
@@ -39,24 +36,24 @@ export class NodeRef {
|
|
|
39
36
|
/** @returns {number} */
|
|
40
37
|
get size(): number;
|
|
41
38
|
/** @returns {Element | Node | ChildNode} */
|
|
42
|
-
|
|
39
|
+
_getAny(): Element | Node | ChildNode;
|
|
43
40
|
/** @returns {Element | Array<Node> | Node | ChildNode} */
|
|
44
|
-
|
|
41
|
+
_getAll(): Element | Array<Node> | Node | ChildNode;
|
|
45
42
|
/** @returns {Array<Element> | Array<Node>} */
|
|
46
|
-
|
|
43
|
+
_collection(): Array<Element> | Array<Node>;
|
|
47
44
|
/**
|
|
48
45
|
* @param {number} index
|
|
49
46
|
* @returns {Element | Node | ChildNode}
|
|
50
47
|
*/
|
|
51
|
-
|
|
48
|
+
_getIndex(index: number): Element | Node | ChildNode;
|
|
52
49
|
/**
|
|
53
50
|
* @param {number} index
|
|
54
51
|
* @param {Element | Node | ChildNode} node
|
|
55
52
|
*/
|
|
56
|
-
|
|
53
|
+
_setIndex(index: number, node: Element | Node | ChildNode): void;
|
|
57
54
|
/**
|
|
58
55
|
* @returns {NodeRef}
|
|
59
56
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
_clone(): NodeRef;
|
|
58
|
+
_isElement(): boolean;
|
|
62
59
|
}
|
package/@types/shared/utils.d.ts
CHANGED
|
@@ -42,6 +42,14 @@ export function isUndefined(value: any): boolean;
|
|
|
42
42
|
* @returns {boolean} True if `value` is defined.
|
|
43
43
|
*/
|
|
44
44
|
export function isDefined(value: any): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Wrapper for minification
|
|
47
|
+
*
|
|
48
|
+
* @template T
|
|
49
|
+
* @param {any} array
|
|
50
|
+
* @returns {array is T[]} true if array is an Array
|
|
51
|
+
*/
|
|
52
|
+
export function isArray<T>(array: any): array is T[];
|
|
45
53
|
/**
|
|
46
54
|
* Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
|
|
47
55
|
* considered to be objects. Note that JavaScript arrays are objects.
|
|
@@ -431,39 +439,6 @@ export function shallowCopy(src: any, dst: any): any;
|
|
|
431
439
|
* @param {string} errorMsg
|
|
432
440
|
*/
|
|
433
441
|
export function assert(argument: boolean, errorMsg?: string): void;
|
|
434
|
-
/**
|
|
435
|
-
* Validate a value using a predicate function.
|
|
436
|
-
* Throws if the predicate returns false.
|
|
437
|
-
* IMPORTANT: use this function only for developper errors and not for user/data errors
|
|
438
|
-
*
|
|
439
|
-
* @param {ng.Validator} fn - Predicate validator function.
|
|
440
|
-
* @param {*} arg - The value to validate.
|
|
441
|
-
* @param {string} name - Parameter name (included in error message).
|
|
442
|
-
* @returns {*} The validated value.
|
|
443
|
-
* @throws {TypeError} If the value does not satisfy the validator.
|
|
444
|
-
*/
|
|
445
|
-
export function validate(fn: ng.Validator, arg: any, name: string): any;
|
|
446
|
-
/**
|
|
447
|
-
* @param {*} arg - The value to validate.
|
|
448
|
-
* @param {string} name - Parameter name (included in error message).
|
|
449
|
-
* @returns {*} The validated value.
|
|
450
|
-
* @throws {TypeError} If the value does not satisfy the validator.
|
|
451
|
-
*/
|
|
452
|
-
export function validateRequired(arg: any, name: string): any;
|
|
453
|
-
/**
|
|
454
|
-
* @param {*} arg - The value to validate.
|
|
455
|
-
* @param {string} name - Parameter name (included in error message).
|
|
456
|
-
* @returns {*} The validated value.
|
|
457
|
-
* @throws {TypeError} If the value does not satisfy the validator.
|
|
458
|
-
*/
|
|
459
|
-
export function validateArray(arg: any, name: string): any;
|
|
460
|
-
/**
|
|
461
|
-
* @param {*} arg - The value to validate.
|
|
462
|
-
* @param {string} name - Parameter name (included in error message).
|
|
463
|
-
* @returns {*} The validated value.
|
|
464
|
-
* @throws {TypeError} If the value does not satisfy the validator.
|
|
465
|
-
*/
|
|
466
|
-
export function validateIsString(arg: any, name: string): any;
|
|
467
442
|
/**
|
|
468
443
|
* Throw error if the argument is falsy.
|
|
469
444
|
*/
|
|
@@ -569,6 +544,23 @@ export function isObjectEmpty(obj: any | null | undefined): boolean;
|
|
|
569
544
|
* hasOwn({}, 'bar'); // false
|
|
570
545
|
*/
|
|
571
546
|
export function hasOwn(obj: object, key: string | number | symbol): boolean;
|
|
547
|
+
/**
|
|
548
|
+
* @param {Object} obj
|
|
549
|
+
* @returns {string[]}
|
|
550
|
+
*/
|
|
551
|
+
export function keys(obj: any): string[];
|
|
552
|
+
/**
|
|
553
|
+
* @template T
|
|
554
|
+
* @param {{ [s: string]: T; } | ArrayLike<T>} obj
|
|
555
|
+
* @returns {[string, T][]}
|
|
556
|
+
*/
|
|
557
|
+
export function entries<T>(
|
|
558
|
+
obj:
|
|
559
|
+
| {
|
|
560
|
+
[s: string]: T;
|
|
561
|
+
}
|
|
562
|
+
| ArrayLike<T>,
|
|
563
|
+
): [string, T][];
|
|
572
564
|
/**
|
|
573
565
|
* Wraps a function so it can only be called once.
|
|
574
566
|
* Subsequent calls do nothing and return undefined.
|
|
@@ -637,7 +629,4 @@ export function instantiateWasm(
|
|
|
637
629
|
*/
|
|
638
630
|
export function isArrowFunction(fn: any): boolean;
|
|
639
631
|
export const isProxySymbol: unique symbol;
|
|
640
|
-
export const BADARG: "badarg";
|
|
641
|
-
export const BADARGKEY: "badarg: key";
|
|
642
|
-
export const BADARGVALUE: "badarg: value";
|
|
643
632
|
export const ngAttrPrefixes: string[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate a value using a predicate function.
|
|
3
|
+
* Throws if the predicate returns false.
|
|
4
|
+
* IMPORTANT: use this function only for developper errors and not for user/data errors
|
|
5
|
+
*
|
|
6
|
+
* @param {ng.Validator} fn - Predicate validator function.
|
|
7
|
+
* @param {*} arg - The value to validate.
|
|
8
|
+
* @param {string} name - Parameter name (included in error message).
|
|
9
|
+
* @returns {*} The validated value.
|
|
10
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
11
|
+
*/
|
|
12
|
+
export function validate(fn: ng.Validator, arg: any, name: string): any;
|
|
13
|
+
/**
|
|
14
|
+
* @param {*} arg - The value to validate.
|
|
15
|
+
* @param {string} name - Parameter name (included in error message).
|
|
16
|
+
* @returns {*} The validated value.
|
|
17
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
18
|
+
*/
|
|
19
|
+
export function validateRequired(arg: any, name: string): any;
|
|
20
|
+
/**
|
|
21
|
+
* @param {*} arg - The value to validate.
|
|
22
|
+
* @param {string} name - Parameter name (included in error message).
|
|
23
|
+
* @returns {*} The validated value.
|
|
24
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
25
|
+
*/
|
|
26
|
+
export function validateArray(arg: any, name: string): any;
|
|
27
|
+
/**
|
|
28
|
+
* @param {*} arg - The value to validate.
|
|
29
|
+
* @param {string} name - Parameter name (included in error message).
|
|
30
|
+
* @returns {*} The validated value.
|
|
31
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
32
|
+
*/
|
|
33
|
+
export function validateIsString(arg: any, name: string): any;
|
|
34
|
+
export const BADARG: "badarg";
|
|
35
|
+
export const BADARGKEY: "badarg: key";
|
|
36
|
+
export const BADARGVALUE: "badarg: value";
|