@angular/forms 21.2.1 → 22.0.0-next.1
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/fesm2022/_validation_errors-chunk.mjs +1 -1
- package/fesm2022/forms.mjs +153 -147
- package/fesm2022/forms.mjs.map +1 -1
- package/fesm2022/signals-compat.mjs +1 -1
- package/fesm2022/signals-compat.mjs.map +1 -1
- package/fesm2022/signals.mjs +31 -10
- package/fesm2022/signals.mjs.map +1 -1
- package/package.json +5 -5
- package/resources/code-examples.db +0 -0
- package/types/_structure-chunk.d.ts +1 -1
- package/types/forms.d.ts +1 -1
- package/types/signals-compat.d.ts +1 -1
- package/types/signals.d.ts +10 -6
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/forms",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0-next.1",
|
|
4
4
|
"description": "Angular - directives and services for creating forms",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "^
|
|
8
|
+
"node": "^22.22.0 || >=24.13.1"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.3.0",
|
|
12
12
|
"@standard-schema/spec": "^1.0.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/core": "
|
|
16
|
-
"@angular/common": "
|
|
17
|
-
"@angular/platform-browser": "
|
|
15
|
+
"@angular/core": "22.0.0-next.1",
|
|
16
|
+
"@angular/common": "22.0.0-next.1",
|
|
17
|
+
"@angular/platform-browser": "22.0.0-next.1",
|
|
18
18
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
Binary file
|
package/types/forms.d.ts
CHANGED
package/types/signals.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v22.0.0-next.1
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Signal, ResourceRef, InputSignal, InputSignalWithTransform,
|
|
8
|
+
import { Signal, ResourceRef, InputSignal, InputSignalWithTransform, OutputRef, ModelSignal, WritableSignal } from '@angular/core';
|
|
9
9
|
import { PathKind, SchemaPath, SchemaPathRules, LogicFn, OneOrMany, ValidationError, FieldValidator, FieldContext, TreeValidationResult, TreeValidator, WithOptionalFieldTree, DisabledReason, Debouncer, FieldTree } from './_structure-chunk.js';
|
|
10
10
|
export { AsyncValidationResult, BaseNgValidationError, ChildFieldContext, CompatFieldState, CompatSchemaPath, EmailValidationError, FORM_FIELD, Field, FieldState, FormField, FormFieldBindingOptions, FormOptions, FormSubmitOptions, IgnoreUnknownProperties, ItemFieldContext, ItemType, MAX, MAX_LENGTH, MIN, MIN_LENGTH, MaxLengthValidationError, MaxValidationError, MaybeFieldTree, MaybeSchemaPathTree, MetadataKey, MetadataReducer, MetadataSetterType, MinLengthValidationError, MinValidationError, NativeInputParseError, NgValidationError, PATTERN, PatternValidationError, REQUIRED, ReadonlyArrayLike, RemoveStringIndexUnknownKey, RequiredValidationError, RootFieldContext, Schema, SchemaFn, SchemaOrSchemaFn, SchemaPathTree, SignalFormsConfig, StandardSchemaValidationError, Subfields, ValidationErrorOptions, ValidationResult, ValidationSuccess, Validator, WithField, WithFieldTree, WithOptionalField, WithoutField, WithoutFieldTree, apply, applyEach, applyWhen, applyWhenValue, createManagedMetadataKey, createMetadataKey, emailError, form, maxError, maxLengthError, metadata, minError, minLengthError, patternError, provideSignalFormsConfig, requiredError, schema, standardSchemaError, submit, validateStandardSchema, ɵNgFieldDirective } from './_structure-chunk.js';
|
|
11
11
|
import { HttpResourceRequest, HttpResourceOptions } from '@angular/common/http';
|
|
@@ -429,7 +429,7 @@ interface FormUiControl {
|
|
|
429
429
|
* An input to receive the touched status for the field. If implemented, the `Field` directive
|
|
430
430
|
* will automatically bind the touched status from the bound field to this input.
|
|
431
431
|
*/
|
|
432
|
-
readonly touched?:
|
|
432
|
+
readonly touched?: InputSignal<boolean> | InputSignalWithTransform<boolean, unknown>;
|
|
433
433
|
/**
|
|
434
434
|
* An input to receive the dirty status for the field. If implemented, the `Field` directive
|
|
435
435
|
* will automatically bind the dirty status from the bound field to this input.
|
|
@@ -470,6 +470,10 @@ interface FormUiControl {
|
|
|
470
470
|
* will automatically bind the value patterns from the bound field to this input.
|
|
471
471
|
*/
|
|
472
472
|
readonly pattern?: InputSignal<readonly RegExp[]> | InputSignalWithTransform<readonly RegExp[], unknown>;
|
|
473
|
+
/**
|
|
474
|
+
* An output to emit when the control is touched.
|
|
475
|
+
*/
|
|
476
|
+
readonly touch?: OutputRef<void>;
|
|
473
477
|
/**
|
|
474
478
|
* Focuses the UI control.
|
|
475
479
|
*
|
|
@@ -536,12 +540,12 @@ interface FormCheckboxControl extends FormUiControl {
|
|
|
536
540
|
* the field is touched, or the most recently debounced update resolves.
|
|
537
541
|
*
|
|
538
542
|
* @param path The target path to debounce.
|
|
539
|
-
* @param
|
|
540
|
-
* {@link Debouncer} function.
|
|
543
|
+
* @param config A debounce configuration, which can be either a debounce duration in milliseconds,
|
|
544
|
+
* `'blur'` to debounce until the field is blurred, or a custom {@link Debouncer} function.
|
|
541
545
|
*
|
|
542
546
|
* @experimental 21.0.0
|
|
543
547
|
*/
|
|
544
|
-
declare function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
|
|
548
|
+
declare function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config: number | 'blur' | Debouncer<TValue, TPathKind>): void;
|
|
545
549
|
|
|
546
550
|
/**
|
|
547
551
|
* Result of parsing a raw value into a model value.
|