@angular/forms 18.0.0-next.5 → 18.0.0-next.6
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/esm2022/src/directives/abstract_control_directive.mjs +2 -2
- package/esm2022/src/directives/abstract_form_group_directive.mjs +4 -4
- package/esm2022/src/directives/checkbox_value_accessor.mjs +6 -6
- package/esm2022/src/directives/control_container.mjs +1 -1
- package/esm2022/src/directives/control_value_accessor.mjs +7 -7
- package/esm2022/src/directives/default_value_accessor.mjs +9 -9
- package/esm2022/src/directives/form_interface.mjs +1 -1
- package/esm2022/src/directives/ng_control.mjs +1 -1
- package/esm2022/src/directives/ng_control_status.mjs +8 -8
- package/esm2022/src/directives/ng_form.mjs +11 -13
- package/esm2022/src/directives/ng_model.mjs +9 -9
- package/esm2022/src/directives/ng_model_group.mjs +8 -7
- package/esm2022/src/directives/ng_no_validate_directive.mjs +4 -4
- package/esm2022/src/directives/number_value_accessor.mjs +7 -7
- package/esm2022/src/directives/radio_control_value_accessor.mjs +17 -15
- package/esm2022/src/directives/range_value_accessor.mjs +8 -8
- package/esm2022/src/directives/reactive_directives/form_control_directive.mjs +7 -7
- package/esm2022/src/directives/reactive_directives/form_control_name.mjs +8 -8
- package/esm2022/src/directives/reactive_directives/form_group_directive.mjs +9 -9
- package/esm2022/src/directives/reactive_directives/form_group_name.mjs +13 -12
- package/esm2022/src/directives/reactive_errors.mjs +13 -4
- package/esm2022/src/directives/select_control_value_accessor.mjs +11 -11
- package/esm2022/src/directives/select_multiple_control_value_accessor.mjs +11 -11
- package/esm2022/src/directives/shared.mjs +5 -2
- package/esm2022/src/directives/template_driven_errors.mjs +2 -2
- package/esm2022/src/directives/validators.mjs +46 -46
- package/esm2022/src/directives.mjs +18 -12
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/form_builder.mjs +21 -18
- package/esm2022/src/form_providers.mjs +22 -20
- package/esm2022/src/forms.mjs +9 -9
- package/esm2022/src/model/abstract_model.mjs +13 -12
- package/esm2022/src/model/form_array.mjs +6 -6
- package/esm2022/src/model/form_control.mjs +13 -9
- package/esm2022/src/model/form_group.mjs +20 -14
- package/esm2022/src/validators.mjs +25 -23
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/forms.mjs +290 -252
- package/fesm2022/forms.mjs.map +1 -1
- package/index.d.ts +12 -18
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.6
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -601,7 +601,7 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
601
601
|
*
|
|
602
602
|
* This signature for get supports strings and `const` arrays (`.get(['foo', 'bar'] as const)`).
|
|
603
603
|
*/
|
|
604
|
-
get<P extends string |
|
|
604
|
+
get<P extends string | readonly (string | number)[]>(path: P): AbstractControl<ɵGetProperty<TRawValue, P>> | null;
|
|
605
605
|
/**
|
|
606
606
|
* Retrieves a child control given the control's name or path.
|
|
607
607
|
*
|
|
@@ -1178,7 +1178,11 @@ export declare const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
|
|
|
1178
1178
|
*
|
|
1179
1179
|
* @publicApi
|
|
1180
1180
|
*/
|
|
1181
|
-
export declare type ControlConfig<T> = [
|
|
1181
|
+
export declare type ControlConfig<T> = [
|
|
1182
|
+
T | FormControlState<T>,
|
|
1183
|
+
(ValidatorFn | ValidatorFn[])?,
|
|
1184
|
+
(AsyncValidatorFn | AsyncValidatorFn[])?
|
|
1185
|
+
];
|
|
1182
1186
|
|
|
1183
1187
|
/**
|
|
1184
1188
|
* @description
|
|
@@ -5195,14 +5199,7 @@ export declare const VERSION: Version;
|
|
|
5195
5199
|
/**
|
|
5196
5200
|
* CoerceStrArrToNumArr accepts an array of strings, and converts any numeric string to a number.
|
|
5197
5201
|
*/
|
|
5198
|
-
export declare type ɵCoerceStrArrToNumArr<S> = S extends [infer Head, ...infer Tail] ? Head extends `${number}` ? [
|
|
5199
|
-
number,
|
|
5200
|
-
...ɵCoerceStrArrToNumArr<Tail>
|
|
5201
|
-
] : [
|
|
5202
|
-
Head,
|
|
5203
|
-
...ɵCoerceStrArrToNumArr<Tail>
|
|
5204
|
-
] : [
|
|
5205
|
-
];
|
|
5202
|
+
export declare type ɵCoerceStrArrToNumArr<S> = S extends [infer Head, ...infer Tail] ? Head extends `${number}` ? [number, ...ɵCoerceStrArrToNumArr<Tail>] : [Head, ...ɵCoerceStrArrToNumArr<Tail>] : [];
|
|
5206
5203
|
|
|
5207
5204
|
/**
|
|
5208
5205
|
* FormBuilder accepts values in various container shapes, as well as raw values.
|
|
@@ -5350,13 +5347,12 @@ export declare class ɵInternalFormsSharedModule {
|
|
|
5350
5347
|
static ɵinj: i0.ɵɵInjectorDeclaration<ɵInternalFormsSharedModule>;
|
|
5351
5348
|
}
|
|
5352
5349
|
|
|
5353
|
-
declare type ɵIsAny<T, Y, N> = 0 extends
|
|
5350
|
+
declare type ɵIsAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
5354
5351
|
|
|
5355
5352
|
/**
|
|
5356
5353
|
* Navigate takes a type T and an array K, and returns the type of T[K[0]][K[1]][K[2]]...
|
|
5357
5354
|
*/
|
|
5358
|
-
export declare type ɵNavigate<T, K extends
|
|
5359
|
-
] extends Tail ? T[Head] : (ɵNavigate<T[Head], Tail>) : any) : never) : any) : any;
|
|
5355
|
+
export declare type ɵNavigate<T, K extends Array<string | number>> = T extends object ? K extends [infer Head, ...infer Tail] ? Head extends keyof T ? Tail extends (string | number)[] ? [] extends Tail ? T[Head] : ɵNavigate<T[Head], Tail> : any : never : any : any;
|
|
5360
5356
|
|
|
5361
5357
|
/**
|
|
5362
5358
|
* @description
|
|
@@ -5453,14 +5449,12 @@ export declare type ɵOptionalKeys<T> = {
|
|
|
5453
5449
|
*
|
|
5454
5450
|
* **Internal: not for public use.**
|
|
5455
5451
|
*/
|
|
5456
|
-
export declare type ɵRawValue<T extends AbstractControl | undefined> = T extends AbstractControl<any, any> ?
|
|
5452
|
+
export declare type ɵRawValue<T extends AbstractControl | undefined> = T extends AbstractControl<any, any> ? T['setValue'] extends (v: infer R) => void ? R : never : never;
|
|
5457
5453
|
|
|
5458
5454
|
/**
|
|
5459
5455
|
* Tokenize splits a string literal S by a delimiter D.
|
|
5460
5456
|
*/
|
|
5461
|
-
export declare type ɵTokenize<S extends string, D extends string> = string extends S ? string[] : S extends `${infer T}${D}${infer U}` ? [T, ...ɵTokenize<U, D>] : [
|
|
5462
|
-
S
|
|
5463
|
-
];
|
|
5457
|
+
export declare type ɵTokenize<S extends string, D extends string> = string extends S ? string[] : S extends `${infer T}${D}${infer U}` ? [T, ...ɵTokenize<U, D>] : [S];
|
|
5464
5458
|
|
|
5465
5459
|
/**
|
|
5466
5460
|
* `TypedOrUntyped` allows one of two different types to be selected, depending on whether the Forms
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/forms",
|
|
3
|
-
"version": "18.0.0-next.
|
|
3
|
+
"version": "18.0.0-next.6",
|
|
4
4
|
"description": "Angular - directives and services for creating forms",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@angular/core": "18.0.0-next.
|
|
15
|
-
"@angular/common": "18.0.0-next.
|
|
16
|
-
"@angular/platform-browser": "18.0.0-next.
|
|
14
|
+
"@angular/core": "18.0.0-next.6",
|
|
15
|
+
"@angular/common": "18.0.0-next.6",
|
|
16
|
+
"@angular/platform-browser": "18.0.0-next.6",
|
|
17
17
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|