@angular/forms
Advanced tools
| /** | ||
| * @license Angular v22.0.0-next.0 | ||
| * @license Angular v22.0.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v22.0.0-next.0 | ||
| * @license Angular v22.0.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
+30
-9
| /** | ||
| * @license Angular v22.0.0-next.0 | ||
| * @license Angular v22.0.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -454,8 +454,20 @@ * License: MIT | ||
| function debounce(path, durationOrDebouncer) { | ||
| function debounce(path, config) { | ||
| assertPathIsCurrent(path); | ||
| const pathNode = FieldPathNode.unwrapFieldPath(path); | ||
| const debouncer = typeof durationOrDebouncer === 'function' ? durationOrDebouncer : durationOrDebouncer > 0 ? debounceForDuration(durationOrDebouncer) : immediate; | ||
| const debouncer = normalizeDebouncer(config); | ||
| pathNode.builder.addMetadataRule(DEBOUNCER, () => debouncer); | ||
| } | ||
| function normalizeDebouncer(debouncer) { | ||
| if (typeof debouncer === 'function') { | ||
| return debouncer; | ||
| } | ||
| if (debouncer === 'blur') { | ||
| return debounceUntilBlur(); | ||
| } | ||
| if (debouncer > 0) { | ||
| return debounceForDuration(debouncer); | ||
| } | ||
| return immediate; | ||
| } | ||
| function debounceForDuration(durationInMilliseconds) { | ||
@@ -479,2 +491,11 @@ return (_context, abortSignal) => { | ||
| } | ||
| function debounceUntilBlur() { | ||
| return (_context, abortSignal) => { | ||
| return new Promise(resolve => { | ||
| abortSignal.addEventListener('abort', () => resolve(), { | ||
| once: true | ||
| }); | ||
| }); | ||
| }; | ||
| } | ||
| function immediate() {} | ||
@@ -1035,3 +1056,3 @@ | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| ngImport: i0, | ||
@@ -1044,3 +1065,3 @@ type: FormField, | ||
| minVersion: "17.1.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| type: FormField, | ||
@@ -1077,3 +1098,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| ngImport: i0, | ||
@@ -1123,3 +1144,3 @@ type: FormField, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| ngImport: i0, | ||
@@ -1132,3 +1153,3 @@ type: FormRoot, | ||
| minVersion: "17.1.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| type: FormRoot, | ||
@@ -1159,3 +1180,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.0", | ||
| version: "22.0.0-next.1", | ||
| ngImport: i0, | ||
@@ -1162,0 +1183,0 @@ type: FormRoot, |
+4
-4
| { | ||
| "name": "@angular/forms", | ||
| "version": "22.0.0-next.0", | ||
| "version": "22.0.0-next.1", | ||
| "description": "Angular - directives and services for creating forms", | ||
@@ -15,5 +15,5 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/core": "22.0.0-next.0", | ||
| "@angular/common": "22.0.0-next.0", | ||
| "@angular/platform-browser": "22.0.0-next.0", | ||
| "@angular/core": "22.0.0-next.1", | ||
| "@angular/common": "22.0.0-next.1", | ||
| "@angular/platform-browser": "22.0.0-next.1", | ||
| "rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -20,0 +20,0 @@ }, |
| /** | ||
| * @license Angular v22.0.0-next.0 | ||
| * @license Angular v22.0.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v22.0.0-next.0 | ||
| * @license Angular v22.0.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -543,8 +543,8 @@ * License: MIT | ||
| * @param path The target path to debounce. | ||
| * @param durationOrDebouncer Either a debounce duration in milliseconds, or a custom | ||
| * {@link Debouncer} function. | ||
| * @param config A debounce configuration, which can be either a debounce duration in milliseconds, | ||
| * `'blur'` to debounce until the field is blurred, or a custom {@link Debouncer} function. | ||
| * | ||
| * @experimental 21.0.0 | ||
| */ | ||
| declare function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, durationOrDebouncer: number | Debouncer<TValue, TPathKind>): void; | ||
| declare function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config: number | 'blur' | Debouncer<TValue, TPathKind>): void; | ||
@@ -551,0 +551,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1576898
0.12%16780
0.13%83
1.22%