@angular-wave/angular.ts 0.15.2 → 0.16.0
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/animations/interface.d.ts +4 -0
- package/@types/animations/runner/animate-runner.d.ts +2 -1
- package/@types/animations/shared.d.ts +100 -44
- package/@types/core/compile/attributes.d.ts +34 -18
- package/@types/core/compile/compile.d.ts +4 -5
- package/@types/core/controller/interface.d.ts +1 -1
- package/@types/core/di/di.d.ts +0 -10
- package/@types/core/di/interface.d.ts +28 -0
- package/@types/core/di/internal-injector.d.ts +28 -19
- package/@types/core/di/ng-module/ng-module.d.ts +35 -4
- package/@types/core/interpolate/interpolate.d.ts +1 -1
- package/@types/core/parse/ast/ast.d.ts +6 -12
- package/@types/core/parse/ast-type.d.ts +1 -1
- package/@types/core/parse/interface.d.ts +8 -40
- package/@types/core/parse/interpreter.d.ts +4 -3
- package/@types/core/parse/lexer/lexer.d.ts +2 -30
- package/@types/core/parse/parse.d.ts +1 -34
- package/@types/core/parse/parser/parser.d.ts +2 -13
- package/@types/core/sanitize/sanitize-uri.d.ts +2 -2
- package/@types/core/scope/interface.d.ts +1 -0
- package/@types/core/scope/scope.d.ts +10 -5
- package/@types/directive/form/form.d.ts +8 -40
- package/@types/directive/model/model.d.ts +34 -30
- package/@types/directive/model-options/model-options.d.ts +1 -2
- package/@types/directive/validators/validators.d.ts +5 -7
- package/@types/filters/order-by.d.ts +2 -1
- package/@types/interface.d.ts +3 -2
- package/@types/namespace.d.ts +18 -2
- package/@types/router/state/state-object.d.ts +2 -2
- package/@types/router/state/state-service.d.ts +1 -0
- package/@types/router/template-factory.d.ts +4 -5
- package/@types/router/transition/reject-factory.d.ts +32 -9
- package/@types/router/transition/transition-event-type.d.ts +2 -2
- package/@types/router/transition/transition-hook.d.ts +5 -2
- package/@types/router/transition/transition-service.d.ts +2 -2
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/router/view/view.d.ts +4 -4
- package/@types/services/http/http.d.ts +1 -1
- package/@types/services/pubsub/pubsub.d.ts +2 -2
- package/@types/services/sce/interface.d.ts +8 -0
- package/@types/services/sce/sce.d.ts +10 -7
- package/@types/services/sse/interface.d.ts +5 -20
- package/@types/services/storage/storage.d.ts +2 -2
- package/@types/services/stream/interface.d.ts +1 -0
- package/@types/services/stream/stream.d.ts +1 -1
- package/@types/services/template-request/template-request.d.ts +0 -1
- package/@types/services/websocket/interface.d.ts +16 -0
- package/@types/services/websocket/websocket.d.ts +20 -0
- package/@types/shared/common.d.ts +48 -27
- package/@types/shared/constants.d.ts +2 -8
- package/@types/shared/dom.d.ts +33 -19
- package/@types/shared/utils.d.ts +8 -8
- package/README.md +15 -7
- package/dist/angular-ts.esm.js +4257 -4325
- package/dist/angular-ts.umd.js +4257 -4325
- 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/core/di/inteface.d.ts +0 -11
- /package/@types/core/compile/{inteface.d.ts → interface.d.ts} +0 -0
|
@@ -7,10 +7,11 @@ export const PURITY_ABSOLUTE: 1;
|
|
|
7
7
|
export const PURITY_RELATIVE: 2;
|
|
8
8
|
export class ASTInterpreter {
|
|
9
9
|
/**
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {ng.FilterService} $filter
|
|
11
11
|
*/
|
|
12
|
-
constructor($filter:
|
|
13
|
-
|
|
12
|
+
constructor($filter: ng.FilterService);
|
|
13
|
+
/** @type {ng.FilterService} */
|
|
14
|
+
_$filter: ng.FilterService;
|
|
14
15
|
/**
|
|
15
16
|
* Compiles the AST into a function.
|
|
16
17
|
* @param {import("./ast/ast.js").ASTNode} ast - The AST to compile.
|
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} LexerOptions
|
|
3
|
-
* @property {(ch: string, codePoint: number) => boolean} [isIdentifierStart] - Custom function to determine if a character is a valid identifier start.
|
|
4
|
-
* @property {(ch: string, codePoint: number) => boolean} [isIdentifierContinue] - Custom function to determine if a character is a valid identifier continuation.
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* Represents a lexer that tokenizes input text. The Lexer takes the original expression string and returns an array of tokens parsed from that string.
|
|
8
3
|
* For example, the string "a + b" would result in tokens for a, +, and b.
|
|
9
4
|
*/
|
|
10
5
|
export class Lexer {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @param {LexerOptions} options - Lexer options.
|
|
14
|
-
*/
|
|
15
|
-
constructor(options: LexerOptions);
|
|
16
|
-
/** @type {LexerOptions} */
|
|
17
|
-
_options: LexerOptions;
|
|
6
|
+
_text: string;
|
|
7
|
+
_index: number;
|
|
18
8
|
/**
|
|
19
9
|
* Tokenizes the input text.
|
|
20
10
|
* @param {string} text Input text to lex.
|
|
21
11
|
* @returns {Array<Token>} Array of tokens.
|
|
22
12
|
*/
|
|
23
13
|
_lex(text: string): Array<Token>;
|
|
24
|
-
_text: string;
|
|
25
|
-
_index: number;
|
|
26
14
|
/** @type {Array<Token>} */
|
|
27
15
|
_tokens: Array<Token>;
|
|
28
16
|
/**
|
|
@@ -62,12 +50,6 @@ export class Lexer {
|
|
|
62
50
|
* @returns {boolean} True if character is a valid identifier continuation, false otherwise.
|
|
63
51
|
*/
|
|
64
52
|
_isIdentifierContinue(ch: string): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Converts a character to its Unicode code point.
|
|
67
|
-
* @param {string} ch Character to convert.
|
|
68
|
-
* @returns {number} Unicode code point.
|
|
69
|
-
*/
|
|
70
|
-
_codePointAt(ch: string): number;
|
|
71
53
|
/**
|
|
72
54
|
* Peeks at the next multicharacter sequence in the text.
|
|
73
55
|
* @returns {string} Next multicharacter sequence.
|
|
@@ -107,13 +89,3 @@ export class Lexer {
|
|
|
107
89
|
_handleUnicodeEscape(): string;
|
|
108
90
|
}
|
|
109
91
|
export type Token = import("./token.ts").Token;
|
|
110
|
-
export type LexerOptions = {
|
|
111
|
-
/**
|
|
112
|
-
* - Custom function to determine if a character is a valid identifier start.
|
|
113
|
-
*/
|
|
114
|
-
isIdentifierStart?: (ch: string, codePoint: number) => boolean;
|
|
115
|
-
/**
|
|
116
|
-
* - Custom function to determine if a character is a valid identifier continuation.
|
|
117
|
-
*/
|
|
118
|
-
isIdentifierContinue?: (ch: string, codePoint: number) => boolean;
|
|
119
|
-
};
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
export function constantWatchDelegate(
|
|
2
|
-
scope: any,
|
|
3
|
-
listener: any,
|
|
4
|
-
objectEquality: any,
|
|
5
|
-
parsedExpression: any,
|
|
6
|
-
): any;
|
|
7
1
|
export class ParseProvider {
|
|
8
|
-
|
|
9
|
-
* Allows defining the set of characters that are allowed in AngularTS expressions. The function
|
|
10
|
-
* `identifierStart` will get called to know if a given character is a valid character to be the
|
|
11
|
-
* first character for an identifier. The function `identifierContinue` will get called to know if
|
|
12
|
-
* a given character is a valid character to be a follow-up identifier character. The functions
|
|
13
|
-
* `identifierStart` and `identifierContinue` will receive as arguments the single character to be
|
|
14
|
-
* identifier and the character code point. These arguments will be `string` and `numeric`. Keep in
|
|
15
|
-
* mind that the `string` parameter can be two characters long depending on the character
|
|
16
|
-
* representation. It is expected for the function to return `true` or `false`, whether that
|
|
17
|
-
* character is allowed or not.
|
|
18
|
-
*
|
|
19
|
-
* Since this function will be called extensively, keep the implementation of these functions fast,
|
|
20
|
-
* as the performance of these functions have a direct impact on the expressions parsing speed.
|
|
21
|
-
*
|
|
22
|
-
* @param {function(any):boolean} [identifierStart] The function that will decide whether the given character is
|
|
23
|
-
* a valid identifier start character.
|
|
24
|
-
* @param {function(any):boolean} [identifierContinue] The function that will decide whether the given character is
|
|
25
|
-
* a valid identifier continue character.
|
|
26
|
-
* @returns {ParseProvider}
|
|
27
|
-
*/
|
|
28
|
-
setIdentifierFns: (
|
|
29
|
-
identifierStart?: (arg0: any) => boolean,
|
|
30
|
-
identifierContinue?: (arg0: any) => boolean,
|
|
31
|
-
) => ParseProvider;
|
|
32
|
-
$get: (
|
|
33
|
-
| string
|
|
34
|
-
| (($filter: (any: any) => any) => import("./interface.ts").ParseService)
|
|
35
|
-
)[];
|
|
2
|
+
$get: (string | (($filter: ng.FilterService) => ng.ParseService))[];
|
|
36
3
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} ParsedAST
|
|
3
|
-
* @property {import("../ast/ast-node.d.ts").ASTNode} ast - AST representation of expression
|
|
4
|
-
*/
|
|
5
1
|
/**
|
|
6
2
|
* @constructor
|
|
7
3
|
*/
|
|
@@ -9,11 +5,11 @@ export class Parser {
|
|
|
9
5
|
/**
|
|
10
6
|
*
|
|
11
7
|
* @param {import('../lexer/lexer.js').Lexer} lexer
|
|
12
|
-
* @param {
|
|
8
|
+
* @param {ng.FilterService} $filter
|
|
13
9
|
*/
|
|
14
10
|
constructor(
|
|
15
11
|
lexer: import("../lexer/lexer.js").Lexer,
|
|
16
|
-
$filter:
|
|
12
|
+
$filter: ng.FilterService,
|
|
17
13
|
);
|
|
18
14
|
/** @type {AST} */
|
|
19
15
|
_ast: AST;
|
|
@@ -24,13 +20,6 @@ export class Parser {
|
|
|
24
20
|
* @returns {import("../interface.ts").CompiledExpression}
|
|
25
21
|
*/
|
|
26
22
|
_parse(exp: string): import("../interface.ts").CompiledExpression;
|
|
27
|
-
#private;
|
|
28
23
|
}
|
|
29
|
-
export type ParsedAST = {
|
|
30
|
-
/**
|
|
31
|
-
* - AST representation of expression
|
|
32
|
-
*/
|
|
33
|
-
ast: import("../ast/ast-node.d.ts").ASTNode;
|
|
34
|
-
};
|
|
35
24
|
import { AST } from "../ast/ast.js";
|
|
36
25
|
import { ASTInterpreter } from "../interpreter.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider */
|
|
2
2
|
/**
|
|
3
3
|
* Private service to sanitize uris for links and images. Used by $compile.
|
|
4
|
-
* @
|
|
4
|
+
* @extends {ServiceProvider}
|
|
5
5
|
*/
|
|
6
|
-
export class SanitizeUriProvider
|
|
6
|
+
export class SanitizeUriProvider {
|
|
7
7
|
/**
|
|
8
8
|
* @private
|
|
9
9
|
* @type {RegExp}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CompiledExpression } from "../parse/interface.ts";
|
|
2
2
|
export type ListenerFn = (newValue?: any, originalTarget?: object) => void;
|
|
3
|
+
export type NonScope = string[] | boolean | undefined;
|
|
3
4
|
export interface Listener {
|
|
4
5
|
originalTarget: any;
|
|
5
6
|
listenerFn: ListenerFn;
|
|
@@ -3,20 +3,24 @@
|
|
|
3
3
|
* Creates a deep proxy for the target object, intercepting property changes
|
|
4
4
|
* and recursively applying proxies to nested objects.
|
|
5
5
|
*
|
|
6
|
-
* @param {Object} target - The object to be wrapped in a proxy.
|
|
6
|
+
* @param {Object & {$nonscope?: import("./interface.ts").NonScope} & Record<string, any>} target - The object to be wrapped in a proxy.
|
|
7
7
|
* @param {Scope} [context] - The context for the handler, used to track listeners.
|
|
8
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(
|
|
11
|
+
export function createScope(
|
|
12
|
+
target?: any & {
|
|
13
|
+
$nonscope?: import("./interface.ts").NonScope;
|
|
14
|
+
} & Record<string, any>,
|
|
15
|
+
context?: Scope,
|
|
16
|
+
): Scope | any;
|
|
12
17
|
/**
|
|
13
|
-
* @ignore
|
|
14
18
|
* Checks if a target should be excluded from scope observability
|
|
15
19
|
* @param {any} target
|
|
16
20
|
* @returns {boolean}
|
|
17
21
|
*/
|
|
18
22
|
export function isNonScope(target: any): boolean;
|
|
19
|
-
/** @ignore @type {Function[]}*/
|
|
23
|
+
/** @ignore @type {Function[]} */
|
|
20
24
|
export const $postUpdateQueue: Function[];
|
|
21
25
|
export class RootScopeProvider {
|
|
22
26
|
rootScope: any;
|
|
@@ -80,7 +84,8 @@ export class Scope {
|
|
|
80
84
|
private _scheduled;
|
|
81
85
|
$scopename: any;
|
|
82
86
|
/** @private */
|
|
83
|
-
|
|
87
|
+
/** @type {Record<any, any>} */
|
|
88
|
+
propertyMap: Record<any, any>;
|
|
84
89
|
/**
|
|
85
90
|
* Intercepts and handles property assignments on the target object. If a new value is
|
|
86
91
|
* an object, it will be recursively proxied.
|
|
@@ -62,7 +62,7 @@ export const PENDING_CLASS: "ng-pending";
|
|
|
62
62
|
* - `week`
|
|
63
63
|
* - `month`
|
|
64
64
|
*
|
|
65
|
-
*
|
|
65
|
+
*
|
|
66
66
|
* `FormController` keeps track of all its controls and nested forms as well as the state of them,
|
|
67
67
|
* such as being valid/invalid or dirty/pristine.
|
|
68
68
|
*
|
|
@@ -101,13 +101,13 @@ export class FormController {
|
|
|
101
101
|
$invalid: boolean;
|
|
102
102
|
$submitted: boolean;
|
|
103
103
|
/** @type {FormController|Object} */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
_parentForm: FormController | any;
|
|
105
|
+
_element: Element;
|
|
106
|
+
_animate: import("../../animations/interface.ts").AnimateService;
|
|
107
107
|
$error: {};
|
|
108
|
-
|
|
108
|
+
_success: {};
|
|
109
109
|
$pending: any;
|
|
110
|
-
|
|
110
|
+
_classCache: {};
|
|
111
111
|
$target: {};
|
|
112
112
|
/**
|
|
113
113
|
* Rollback all form controls pending updates to the `$modelValue`.
|
|
@@ -237,41 +237,9 @@ export class FormController {
|
|
|
237
237
|
}
|
|
238
238
|
export const formDirective: (
|
|
239
239
|
| string
|
|
240
|
-
| (($parse:
|
|
241
|
-
name: string;
|
|
242
|
-
restrict: string;
|
|
243
|
-
require: string[];
|
|
244
|
-
controller: typeof FormController;
|
|
245
|
-
compile: (
|
|
246
|
-
formElement: any,
|
|
247
|
-
attr: any,
|
|
248
|
-
) => {
|
|
249
|
-
pre: (
|
|
250
|
-
scope: any,
|
|
251
|
-
formElementParam: any,
|
|
252
|
-
attrParam: any,
|
|
253
|
-
ctrls: any,
|
|
254
|
-
) => void;
|
|
255
|
-
};
|
|
256
|
-
})
|
|
240
|
+
| (($parse: ng.ParseService) => ng.Directive)
|
|
257
241
|
)[];
|
|
258
242
|
export const ngFormDirective: (
|
|
259
243
|
| string
|
|
260
|
-
| (($parse:
|
|
261
|
-
name: string;
|
|
262
|
-
restrict: string;
|
|
263
|
-
require: string[];
|
|
264
|
-
controller: typeof FormController;
|
|
265
|
-
compile: (
|
|
266
|
-
formElement: any,
|
|
267
|
-
attr: any,
|
|
268
|
-
) => {
|
|
269
|
-
pre: (
|
|
270
|
-
scope: any,
|
|
271
|
-
formElementParam: any,
|
|
272
|
-
attrParam: any,
|
|
273
|
-
ctrls: any,
|
|
274
|
-
) => void;
|
|
275
|
-
};
|
|
276
|
-
})
|
|
244
|
+
| (($parse: ng.ParseService) => ng.Directive)
|
|
277
245
|
)[];
|
|
@@ -71,7 +71,7 @@ export class NgModelController {
|
|
|
71
71
|
/** @type {any} The value in the model that the control is bound to. */
|
|
72
72
|
$modelValue: any;
|
|
73
73
|
/** @type {any} */
|
|
74
|
-
|
|
74
|
+
_rawModelValue: any;
|
|
75
75
|
/** @type {import("./interface.ts").ModelValidators} */
|
|
76
76
|
$validators: import("./interface.ts").ModelValidators;
|
|
77
77
|
/** @type {import("./interface.ts").AsyncModelValidators} */
|
|
@@ -95,10 +95,10 @@ export class NgModelController {
|
|
|
95
95
|
/** @type {boolean} */
|
|
96
96
|
$invalid: boolean;
|
|
97
97
|
$error: {};
|
|
98
|
-
|
|
98
|
+
_success: {};
|
|
99
99
|
$pending: any;
|
|
100
100
|
$name: string;
|
|
101
|
-
|
|
101
|
+
_parentForm: {
|
|
102
102
|
$nonscope: boolean;
|
|
103
103
|
$addControl: Function;
|
|
104
104
|
$getControls: () => any[];
|
|
@@ -113,7 +113,7 @@ export class NgModelController {
|
|
|
113
113
|
_setSubmitted: Function;
|
|
114
114
|
};
|
|
115
115
|
$options: {
|
|
116
|
-
|
|
116
|
+
_options: import("../model-options/model-options.js").ModelOptionsConfig;
|
|
117
117
|
getOption(name: string):
|
|
118
118
|
| string
|
|
119
119
|
| boolean
|
|
@@ -123,8 +123,8 @@ export class NgModelController {
|
|
|
123
123
|
};
|
|
124
124
|
createChild(options: ModelOptionsConfig): /*elided*/ any;
|
|
125
125
|
};
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
_updateEvents: string;
|
|
127
|
+
_updateEventHandler(ev: any): void;
|
|
128
128
|
_parsedNgModel: import("../../core/parse/interface.ts").CompiledExpression;
|
|
129
129
|
_parsedNgModelAssign: (context: any, value: any) => any;
|
|
130
130
|
/**
|
|
@@ -135,26 +135,26 @@ export class NgModelController {
|
|
|
135
135
|
| import("../../core/parse/interface.ts").CompiledExpression
|
|
136
136
|
| ((arg0: ng.Scope) => any);
|
|
137
137
|
_ngModelSet: (context: any, value: any) => any;
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
_pendingDebounce: number;
|
|
139
|
+
_parserValid: boolean;
|
|
140
140
|
/** @type {string} */
|
|
141
|
-
|
|
141
|
+
_parserName: string;
|
|
142
142
|
/** @type {number} */
|
|
143
|
-
|
|
143
|
+
_currentValidationRunId: number;
|
|
144
144
|
/** @type {ng.Scope} */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
_scope: ng.Scope;
|
|
146
|
+
_attr: ng.Attributes;
|
|
147
|
+
_element: Element;
|
|
148
|
+
_animate: import("../../animations/interface.ts").AnimateService;
|
|
149
|
+
_parse: import("../../core/parse/interface.ts").ParseService;
|
|
150
|
+
_exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
|
|
151
|
+
_hasNativeValidators: boolean;
|
|
152
|
+
_classCache: {};
|
|
153
|
+
_eventRemovers: Set<any>;
|
|
154
154
|
set(object: any, property: any): void;
|
|
155
155
|
unset(object: any, property: any): void;
|
|
156
156
|
$setValidity(validationErrorKey: any, state: any): void;
|
|
157
|
-
|
|
157
|
+
_initGetterSetters(): void;
|
|
158
158
|
/**
|
|
159
159
|
* Called when the view needs to be updated. It is expected that the user of the ng-model
|
|
160
160
|
* directive will implement this method.
|
|
@@ -187,7 +187,7 @@ export class NgModelController {
|
|
|
187
187
|
* @returns {boolean} True if `value` is "empty".
|
|
188
188
|
*/
|
|
189
189
|
$isEmpty(value: any): boolean;
|
|
190
|
-
|
|
190
|
+
_updateEmptyClasses(value: any): void;
|
|
191
191
|
/**
|
|
192
192
|
* Sets the control to its pristine state.
|
|
193
193
|
*
|
|
@@ -316,7 +316,7 @@ export class NgModelController {
|
|
|
316
316
|
* `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
|
|
317
317
|
*/
|
|
318
318
|
$validate(): void;
|
|
319
|
-
|
|
319
|
+
_runValidators(modelValue: any, viewValue: any, doneCallback: any): void;
|
|
320
320
|
/**
|
|
321
321
|
* Commit a pending update to the `$modelValue`.
|
|
322
322
|
*
|
|
@@ -325,9 +325,9 @@ export class NgModelController {
|
|
|
325
325
|
* usually handles calling this in response to input events.
|
|
326
326
|
*/
|
|
327
327
|
$commitViewValue(): void;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
328
|
+
_lastCommittedViewValue: any;
|
|
329
|
+
_parseAndValidate(): void;
|
|
330
|
+
_writeModelToScope(): void;
|
|
331
331
|
/**
|
|
332
332
|
* Update the view value.
|
|
333
333
|
*
|
|
@@ -376,7 +376,7 @@ export class NgModelController {
|
|
|
376
376
|
* @param {string} [trigger] Event that triggered the update.
|
|
377
377
|
*/
|
|
378
378
|
$setViewValue(value: any, trigger?: string): void;
|
|
379
|
-
|
|
379
|
+
_debounceViewValueCommit(trigger: any): void;
|
|
380
380
|
/**
|
|
381
381
|
*
|
|
382
382
|
* Override the current model options settings programmatically.
|
|
@@ -513,11 +513,15 @@ export class NgModelController {
|
|
|
513
513
|
/**
|
|
514
514
|
* This method is called internally to run the $formatters on the $modelValue
|
|
515
515
|
*/
|
|
516
|
-
|
|
516
|
+
_format(): any;
|
|
517
517
|
/**
|
|
518
|
+
* @ignore
|
|
518
519
|
* This method is called internally when the bound scope value changes.
|
|
519
520
|
*/
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
_setModelValue(modelValue: any): void;
|
|
522
|
+
/**
|
|
523
|
+
* @ignore
|
|
524
|
+
*/
|
|
525
|
+
_removeAllEventListeners(): void;
|
|
526
|
+
_setUpdateOnEvents(): void;
|
|
523
527
|
}
|
|
@@ -27,7 +27,6 @@ export type ModelOptionsConfig = {
|
|
|
27
27
|
updateOnDefault?: boolean;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* @description
|
|
31
30
|
* A container for the options set by the {@link ngModelOptions} directive
|
|
32
31
|
*/
|
|
33
32
|
declare class ModelOptions {
|
|
@@ -37,7 +36,7 @@ declare class ModelOptions {
|
|
|
37
36
|
*/
|
|
38
37
|
constructor(options: ModelOptionsConfig);
|
|
39
38
|
/** @type {ModelOptionsConfig} */
|
|
40
|
-
|
|
39
|
+
_options: ModelOptionsConfig;
|
|
41
40
|
/**
|
|
42
41
|
* Returns the value of the given option
|
|
43
42
|
* @param {string} name the name of the option to retrieve
|
|
@@ -32,7 +32,7 @@ export const requiredDirective: (
|
|
|
32
32
|
* parsable into a `RegExp`, or a `RegExp` literal. See above for
|
|
33
33
|
* more details.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
*
|
|
37
37
|
* ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
38
38
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -68,16 +68,14 @@ export const requiredDirective: (
|
|
|
68
68
|
*/
|
|
69
69
|
export const patternDirective: (
|
|
70
70
|
| string
|
|
71
|
-
| ((
|
|
72
|
-
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
73
|
-
) => ng.Directive)
|
|
71
|
+
| (($parse: ng.ParseService) => ng.Directive)
|
|
74
72
|
)[];
|
|
75
73
|
/**
|
|
76
74
|
* @param {string} ngMaxlength AngularTS expression that must evaluate to a `Number` or `String`
|
|
77
75
|
* parsable into a `Number`. Used as value for the `maxlength`
|
|
78
76
|
* {@link ngModel.NgModelController#$validators validator}.
|
|
79
77
|
*
|
|
80
|
-
*
|
|
78
|
+
*
|
|
81
79
|
*
|
|
82
80
|
* ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
83
81
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -112,7 +110,7 @@ export const maxlengthDirective: (
|
|
|
112
110
|
* parsable into a `Number`. Used as value for the `minlength`
|
|
113
111
|
* {@link ngModel.NgModelController#$validators validator}.
|
|
114
112
|
*
|
|
115
|
-
*
|
|
113
|
+
*
|
|
116
114
|
*
|
|
117
115
|
* ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.
|
|
118
116
|
* It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.
|
|
@@ -139,7 +137,7 @@ export const maxlengthDirective: (
|
|
|
139
137
|
*/
|
|
140
138
|
export const minlengthDirective: (
|
|
141
139
|
| string
|
|
142
|
-
| (($parse:
|
|
140
|
+
| (($parse: ng.ParseService) => {
|
|
143
141
|
restrict: string;
|
|
144
142
|
require: string;
|
|
145
143
|
link(scope: any, elm: any, attr: any, ctrl: any): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @param {ng.ParseService} $parse
|
|
2
3
|
* @returns {ng.FilterFn}
|
|
3
4
|
*/
|
|
4
|
-
export function orderByFilter($parse:
|
|
5
|
+
export function orderByFilter($parse: ng.ParseService): ng.FilterFn;
|
|
5
6
|
export namespace orderByFilter {
|
|
6
7
|
let $inject: string[];
|
|
7
8
|
}
|
package/@types/interface.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const PublicInjectionTokens: {
|
|
|
44
44
|
readonly $url: "$url";
|
|
45
45
|
readonly $view: "$view";
|
|
46
46
|
readonly $window: "$window";
|
|
47
|
+
readonly $websocket: "$websocket";
|
|
47
48
|
readonly $provide: "$provide";
|
|
48
49
|
readonly $injector: "$injector";
|
|
49
50
|
readonly $compileProvider: "$compileProvider";
|
|
@@ -429,9 +430,9 @@ export interface Directive<TController = any> {
|
|
|
429
430
|
templateUrl?: string | ((element: Element, attrs: Attributes) => string);
|
|
430
431
|
/** Enables transclusion or configures named slots */
|
|
431
432
|
transclude?: boolean | string | Record<string, string>;
|
|
432
|
-
/** Internal hook for directive compilation state */
|
|
433
|
-
$$addStateInfo?: (...args: any[]) => any;
|
|
434
433
|
count?: number;
|
|
434
|
+
/** Internal hook for directive compilation state */
|
|
435
|
+
_addStateInfo?: (...args: any[]) => any;
|
|
435
436
|
}
|
|
436
437
|
export type DirectiveFactoryFn = (
|
|
437
438
|
...args: any[]
|
package/@types/namespace.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { angular } from "./index.js";
|
|
|
2
2
|
import { Angular as TAngular } from "./angular.js";
|
|
3
3
|
import { Attributes as TAttributes } from "./core/compile/attributes.js";
|
|
4
4
|
import { Scope as TScope } from "./core/scope/scope.js";
|
|
5
|
+
import { ProviderCache as TProviderCache } from "./core/di/interface.ts";
|
|
5
6
|
import {
|
|
6
7
|
ListenerFn as TListenerFn,
|
|
7
8
|
Listener as TListener,
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
PubSub as TPubSub,
|
|
47
48
|
} from "./services/pubsub/pubsub.js";
|
|
48
49
|
import {
|
|
50
|
+
AnnotatedFactory as TAnnotatedFactory,
|
|
49
51
|
Directive as TDirective,
|
|
50
52
|
DirectiveFactory as TDirectiveFactory,
|
|
51
53
|
AnnotatedDirectiveFactory as TAnnotatedDirectiveFactory,
|
|
@@ -73,14 +75,17 @@ import {
|
|
|
73
75
|
TranscludeFn as TTranscludeFn,
|
|
74
76
|
LinkFnMapping as TLinkFnMapping,
|
|
75
77
|
CompositeLinkFn as TCompositeLinkFn,
|
|
76
|
-
} from "./core/compile/
|
|
78
|
+
} from "./core/compile/interface.ts";
|
|
77
79
|
import {
|
|
78
80
|
WorkerConnection as TWorkerConnection,
|
|
79
81
|
WorkerConfig as TWorkerConfig,
|
|
80
82
|
} from "./directive/worker/interface.ts";
|
|
81
83
|
import { Provider as TProvideService } from "./interface.ts";
|
|
82
84
|
import { Location as TLocationService } from "./services/location/location.js";
|
|
83
|
-
import {
|
|
85
|
+
import {
|
|
86
|
+
AnimateService as TAnimateService,
|
|
87
|
+
AnimationOptions as TAnimationOptions,
|
|
88
|
+
} from "./animations/interface.ts";
|
|
84
89
|
import {
|
|
85
90
|
StorageBackend as TStorageBackend,
|
|
86
91
|
StorageType as TStorageType,
|
|
@@ -116,9 +121,14 @@ import {
|
|
|
116
121
|
SCEService as TSCEService,
|
|
117
122
|
SCEDelegateService as TSCEDelegateService,
|
|
118
123
|
} from "./services/sce/interface.ts";
|
|
124
|
+
import {
|
|
125
|
+
WebSocketConfig as TWebSocketConfig,
|
|
126
|
+
WebSocketService as TWebSocketService,
|
|
127
|
+
} from "./services/websocket/interface.ts";
|
|
119
128
|
declare global {
|
|
120
129
|
interface Function {
|
|
121
130
|
$inject?: readonly string[] | undefined;
|
|
131
|
+
$nonscope?: readonly string[] | boolean | undefined;
|
|
122
132
|
}
|
|
123
133
|
interface Window {
|
|
124
134
|
angular: TAngular;
|
|
@@ -185,6 +195,7 @@ declare global {
|
|
|
185
195
|
type UrlService = TUrlService;
|
|
186
196
|
type ViewService = TViewService;
|
|
187
197
|
type ViewScrollService = TViewScrollService;
|
|
198
|
+
type AnimationOptions = TAnimationOptions;
|
|
188
199
|
type ErrorHandlingConfig = TErrorHandlingConfig;
|
|
189
200
|
type ListenerFn = TListenerFn;
|
|
190
201
|
type Listener = TListener;
|
|
@@ -198,6 +209,8 @@ declare global {
|
|
|
198
209
|
| ((...args: any[]) => any)
|
|
199
210
|
| (abstract new (...args: any[]) => any),
|
|
200
211
|
> = TInjectable<T>;
|
|
212
|
+
type AnnotatedFactory<T extends (...args: any[]) => any> =
|
|
213
|
+
TAnnotatedFactory<T>;
|
|
201
214
|
type StorageBackend = TStorageBackend;
|
|
202
215
|
type StorageType = TStorageType;
|
|
203
216
|
type StreamConnectionConfig = TStreamConnectionConfig;
|
|
@@ -220,5 +233,8 @@ declare global {
|
|
|
220
233
|
type ScopeEvent = TScopeEvent;
|
|
221
234
|
type RequestShortcutConfig = TRequestShortcutConfig;
|
|
222
235
|
type HttpProviderDefaults = THttpProviderDefaults;
|
|
236
|
+
type ProviderCache = TProviderCache;
|
|
237
|
+
type WebSocketConfig = TWebSocketConfig;
|
|
238
|
+
type WebSocketService = TWebSocketService;
|
|
223
239
|
}
|
|
224
240
|
}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
9
9
|
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
10
|
-
* @
|
|
10
|
+
* @extends {ng.StateDeclaration}
|
|
11
11
|
*/
|
|
12
|
-
export class StateObject
|
|
12
|
+
export class StateObject {
|
|
13
13
|
/**
|
|
14
14
|
* @param {import('./interface.ts').StateDeclaration} config
|
|
15
15
|
*/
|
|
@@ -14,11 +14,11 @@ export class TemplateFactoryProvider {
|
|
|
14
14
|
| ((
|
|
15
15
|
$http: ng.HttpService,
|
|
16
16
|
$templateCache: ng.TemplateCacheService,
|
|
17
|
-
$templateRequest:
|
|
17
|
+
$templateRequest: ng.TemplateRequestService,
|
|
18
18
|
$injector: import("../core/di/internal-injector.js").InjectorService,
|
|
19
19
|
) => this)
|
|
20
20
|
)[];
|
|
21
|
-
$templateRequest:
|
|
21
|
+
$templateRequest: import("../services/template-request/interface.ts").TemplateRequestService;
|
|
22
22
|
$http: import("../services/http/interface.ts").HttpService;
|
|
23
23
|
$templateCache: ng.TemplateCacheService;
|
|
24
24
|
$injector: import("../core/di/internal-injector.js").InjectorService;
|
|
@@ -62,10 +62,9 @@ export class TemplateFactoryProvider {
|
|
|
62
62
|
* @param {string|Function} url url of the template to load, or a function
|
|
63
63
|
* that returns a url.
|
|
64
64
|
* @param {Object} params Parameters to pass to the url function.
|
|
65
|
-
* @return {
|
|
66
|
-
* for that string.
|
|
65
|
+
* @return {Promise<string>}
|
|
67
66
|
*/
|
|
68
|
-
fromUrl(url: string | Function, params: any):
|
|
67
|
+
fromUrl(url: string | Function, params: any): Promise<string>;
|
|
69
68
|
/**
|
|
70
69
|
* Creates a template by invoking an injectable provider function.
|
|
71
70
|
*
|