@angular/forms
Advanced tools
| /** | ||
| * @license Angular v22.0.0-next.10 | ||
| * @license Angular v22.0.0-next.11 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -578,3 +578,3 @@ * License: MIT | ||
| } | ||
| return Math.min(acc, item); | ||
| return item < acc ? item : acc; | ||
| }, | ||
@@ -586,7 +586,7 @@ getInitial: () => undefined | ||
| return { | ||
| reduce: (prev, next) => { | ||
| if (prev === undefined || next === undefined) { | ||
| return prev ?? next; | ||
| reduce: (acc, item) => { | ||
| if (acc === undefined || item === undefined) { | ||
| return acc ?? item; | ||
| } | ||
| return Math.max(prev, next); | ||
| return item > acc ? item : acc; | ||
| }, | ||
@@ -633,5 +633,12 @@ getInitial: () => undefined | ||
| } | ||
| function createLimitSelectionKey() { | ||
| return createMetadataKey(); | ||
| } | ||
| const REQUIRED = createMetadataKey(MetadataReducer.or()); | ||
| const MIN = createMetadataKey(MetadataReducer.max()); | ||
| const MAX = createMetadataKey(MetadataReducer.min()); | ||
| const MIN = createLimitSelectionKey(); | ||
| const MIN_DATE = createMetadataKey(MetadataReducer.max()); | ||
| const MIN_NUMBER = createMetadataKey(MetadataReducer.max()); | ||
| const MAX = createLimitSelectionKey(); | ||
| const MAX_DATE = createMetadataKey(MetadataReducer.min()); | ||
| const MAX_NUMBER = createMetadataKey(MetadataReducer.min()); | ||
| const MIN_LENGTH = createMetadataKey(MetadataReducer.max()); | ||
@@ -641,2 +648,12 @@ const MAX_LENGTH = createMetadataKey(MetadataReducer.min()); | ||
| function shallowArrayEquals(a, b) { | ||
| if (a === b) return true; | ||
| if (!a || !b) return false; | ||
| if (a.length !== b.length) return false; | ||
| for (let i = 0; i < a.length; i++) { | ||
| if (!Object.is(a[i], b[i])) return false; | ||
| } | ||
| return true; | ||
| } | ||
| function calculateValidationSelfStatus(state) { | ||
@@ -661,5 +678,8 @@ if (state.errors().length > 0) { | ||
| return [...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context), ...(this.node.structure.parent?.validationState.rawSyncTreeErrors() ?? [])]; | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "rawSyncTreeErrors" | ||
| }] : [])); | ||
| }, { | ||
| ...(ngDevMode ? { | ||
| debugName: "rawSyncTreeErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| syncErrors = computed(() => { | ||
@@ -670,5 +690,8 @@ if (this.shouldSkipValidation()) { | ||
| return [...this.node.logicNode.logic.syncErrors.compute(this.node.context), ...this.syncTreeErrors(), ...normalizeErrors(this.node.submitState.submissionErrors())]; | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "syncErrors" | ||
| }] : [])); | ||
| }, { | ||
| ...(ngDevMode ? { | ||
| debugName: "syncErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| syncValid = computed(() => { | ||
@@ -682,5 +705,8 @@ if (this.shouldSkipValidation()) { | ||
| }] : [])); | ||
| syncTreeErrors = computed(() => this.rawSyncTreeErrors().filter(err => err.fieldTree === this.node.fieldTree), ...(ngDevMode ? [{ | ||
| debugName: "syncTreeErrors" | ||
| }] : [])); | ||
| syncTreeErrors = computed(() => this.rawSyncTreeErrors().filter(err => err.fieldTree === this.node.fieldTree), { | ||
| ...(ngDevMode ? { | ||
| debugName: "syncTreeErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| rawAsyncErrors = computed(() => { | ||
@@ -691,5 +717,8 @@ if (this.shouldSkipValidation()) { | ||
| return [...this.node.logicNode.logic.asyncErrors.compute(this.node.context), ...(this.node.structure.parent?.validationState.rawAsyncErrors() ?? [])]; | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "rawAsyncErrors" | ||
| }] : [])); | ||
| }, { | ||
| ...(ngDevMode ? { | ||
| debugName: "rawAsyncErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| asyncErrors = computed(() => { | ||
@@ -700,11 +729,20 @@ if (this.shouldSkipValidation()) { | ||
| return this.rawAsyncErrors().filter(err => err === 'pending' || err.fieldTree === this.node.fieldTree); | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "asyncErrors" | ||
| }] : [])); | ||
| parseErrors = computed(() => this.node.formFieldBindings().flatMap(field => field.parseErrors()), ...(ngDevMode ? [{ | ||
| debugName: "parseErrors" | ||
| }] : [])); | ||
| errors = computed(() => [...this.parseErrors(), ...this.syncErrors(), ...this.asyncErrors().filter(err => err !== 'pending')], ...(ngDevMode ? [{ | ||
| debugName: "errors" | ||
| }] : [])); | ||
| }, { | ||
| ...(ngDevMode ? { | ||
| debugName: "asyncErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| parseErrors = computed(() => this.node.formFieldBindings().flatMap(field => field.parseErrors()), { | ||
| ...(ngDevMode ? { | ||
| debugName: "parseErrors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| errors = computed(() => [...this.parseErrors(), ...this.syncErrors(), ...this.asyncErrors().filter(err => err !== 'pending')], { | ||
| ...(ngDevMode ? { | ||
| debugName: "errors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| errorSummary = computed(() => { | ||
@@ -716,5 +754,8 @@ const errors = this.node.structure.reduceChildren(this.errors(), (child, result) => [...result, ...child.errorSummary()]); | ||
| return errors; | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "errorSummary" | ||
| }] : [])); | ||
| }, { | ||
| ...(ngDevMode ? { | ||
| debugName: "errorSummary" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| pending = computed(() => this.node.structure.reduceChildren(this.asyncErrors().includes('pending'), (child, value) => value || child.validationState.asyncErrors().includes('pending')), ...(ngDevMode ? [{ | ||
@@ -745,3 +786,3 @@ debugName: "pending" | ||
| }] : [])); | ||
| shouldSkipValidation = computed(() => this.node.hidden() || this.node.disabled() || this.node.readonly(), ...(ngDevMode ? [{ | ||
| shouldSkipValidation = computed(() => this.node.hidden() || this.node.disabled() || this.node.readonly() || this.node.structure.isOrphaned(), ...(ngDevMode ? [{ | ||
| debugName: "shouldSkipValidation" | ||
@@ -945,2 +986,5 @@ }] : [])); | ||
| read.set = value => { | ||
| if (Object.is(untracked(read), value)) { | ||
| return; | ||
| } | ||
| source.update(current => valueForWrite(current, value, prop())); | ||
@@ -967,2 +1011,6 @@ }; | ||
| const ORPHAN_TOKEN = Symbol(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ORPHAN_TOKEN' : ''); | ||
| const FALSE_SIGNAL = computed(() => false, ...(ngDevMode ? [{ | ||
| debugName: "FALSE_SIGNAL" | ||
| }] : [])); | ||
| class FieldNodeStructure { | ||
@@ -995,2 +1043,9 @@ logic; | ||
| } | ||
| materializedChildren() { | ||
| const map = this.childrenMap(); | ||
| if (map === undefined) { | ||
| return []; | ||
| } | ||
| return Array.from(map.byPropertyKey.values()).map(child => child.node); | ||
| } | ||
| _areChildrenMaterialized() { | ||
@@ -1033,34 +1088,56 @@ return untracked(this.childrenMap) !== undefined; | ||
| } | ||
| createKeyInParent(options, identityInParent, initialKeyInParent) { | ||
| if (options.kind === 'root') { | ||
| return ROOT_KEY_IN_PARENT; | ||
| createKeyOrOrphanSignals(kind, identityInParent, initialKeyInParent) { | ||
| if (kind === 'root') { | ||
| return { | ||
| keyInParent: ROOT_KEY_IN_PARENT, | ||
| isOrphaned: FALSE_SIGNAL | ||
| }; | ||
| } | ||
| if (identityInParent === undefined) { | ||
| const key = initialKeyInParent; | ||
| return computed(() => { | ||
| if (this.parent.structure.getChild(key) !== this.node) { | ||
| throw new _RuntimeError(-1902, ngDevMode && `Orphan field, looking for property '${key}' of ${getDebugName(this.parent)}`); | ||
| const parent = this.parent; | ||
| let lastKnownKey = initialKeyInParent; | ||
| const keyOrOrphan = computed(() => { | ||
| if (parent.structure.isOrphaned()) { | ||
| return ORPHAN_TOKEN; | ||
| } | ||
| const map = parent.structure.childrenMap(); | ||
| if (!map) { | ||
| return ORPHAN_TOKEN; | ||
| } | ||
| const lastKnownChild = map.byPropertyKey.get(lastKnownKey); | ||
| if (lastKnownChild && lastKnownChild.node === this.node) { | ||
| return lastKnownKey; | ||
| } | ||
| if (identityInParent === undefined) { | ||
| return ORPHAN_TOKEN; | ||
| } else { | ||
| for (const [key, child] of map.byPropertyKey) { | ||
| if (child.node === this.node) { | ||
| return lastKnownKey = key; | ||
| } | ||
| } | ||
| return key; | ||
| }); | ||
| } else { | ||
| let lastKnownKey = initialKeyInParent; | ||
| return computed(() => { | ||
| const parentValue = this.parent.structure.value(); | ||
| if (!isArray(parentValue)) { | ||
| throw new _RuntimeError(1903, ngDevMode && `Orphan field, expected ${getDebugName(this.parent)} to be an array`); | ||
| return ORPHAN_TOKEN; | ||
| } | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "keyOrOrphan" | ||
| }] : [])); | ||
| const isOrphaned = computed(() => keyOrOrphan() === ORPHAN_TOKEN, ...(ngDevMode ? [{ | ||
| debugName: "isOrphaned" | ||
| }] : [])); | ||
| const keyInParent = computed(() => { | ||
| const key = keyOrOrphan(); | ||
| if (key === ORPHAN_TOKEN) { | ||
| if (identityInParent === undefined) { | ||
| throw new _RuntimeError(-1902, ngDevMode && `Orphan field, looking for property '${initialKeyInParent}' of ${getDebugName(parent)}`); | ||
| } else { | ||
| throw new _RuntimeError(1904, ngDevMode && `Orphan field, can't find element in array ${getDebugName(parent)}`); | ||
| } | ||
| const data = parentValue[lastKnownKey]; | ||
| if (isObject(data) && data.hasOwnProperty(this.parent.structure.identitySymbol) && data[this.parent.structure.identitySymbol] === identityInParent) { | ||
| return lastKnownKey; | ||
| } | ||
| for (let i = 0; i < parentValue.length; i++) { | ||
| const data = parentValue[i]; | ||
| if (isObject(data) && data.hasOwnProperty(this.parent.structure.identitySymbol) && data[this.parent.structure.identitySymbol] === identityInParent) { | ||
| return lastKnownKey = i.toString(); | ||
| } | ||
| } | ||
| throw new _RuntimeError(1904, ngDevMode && `Orphan field, can't find element in array ${getDebugName(this.parent)}`); | ||
| }); | ||
| } | ||
| } | ||
| return key; | ||
| }, ...(ngDevMode ? [{ | ||
| debugName: "keyInParent" | ||
| }] : [])); | ||
| return { | ||
| keyInParent, | ||
| isOrphaned | ||
| }; | ||
| } | ||
@@ -1157,2 +1234,3 @@ createChildrenMap() { | ||
| } | ||
| isOrphaned = FALSE_SIGNAL; | ||
| childrenMap; | ||
@@ -1174,2 +1252,3 @@ constructor(node, logic, fieldManager, value, createChildNode) { | ||
| childrenMap; | ||
| isOrphaned; | ||
| get fieldManager() { | ||
@@ -1183,11 +1262,5 @@ return this.root.structure.fieldManager; | ||
| this.root = this.parent.structure.root; | ||
| this.keyInParent = this.createKeyInParent({ | ||
| kind: 'child', | ||
| parent, | ||
| pathNode: undefined, | ||
| logic, | ||
| initialKeyInParent, | ||
| identityInParent, | ||
| fieldAdapter: undefined | ||
| }, identityInParent, initialKeyInParent); | ||
| const signals = this.createKeyOrOrphanSignals('child', identityInParent, initialKeyInParent); | ||
| this.isOrphaned = signals.isOrphaned; | ||
| this.keyInParent = signals.keyInParent; | ||
| this.pathKeys = computed(() => [...parent.structure.pathKeys(), this.keyInParent()], ...(ngDevMode ? [{ | ||
@@ -1379,3 +1452,4 @@ debugName: "pathKeys" | ||
| get max() { | ||
| return this.metadata(MAX); | ||
| const maxKey = this.metadata(MAX)?.(); | ||
| return maxKey ? this.metadata(maxKey) : undefined; | ||
| } | ||
@@ -1386,3 +1460,4 @@ get maxLength() { | ||
| get min() { | ||
| return this.metadata(MIN); | ||
| const minKey = this.metadata(MIN)?.(); | ||
| return minKey ? this.metadata(minKey) : undefined; | ||
| } | ||
@@ -1408,2 +1483,5 @@ get minLength() { | ||
| markAsTouched(options) { | ||
| if (this.structure.isOrphaned()) { | ||
| return; | ||
| } | ||
| untracked(() => { | ||
@@ -1415,2 +1493,5 @@ this.markAsTouchedInternal(options); | ||
| markAsTouchedInternal(options) { | ||
| if (this.structure.isOrphaned()) { | ||
| return; | ||
| } | ||
| if (this.validationState.shouldSkipValidation()) { | ||
@@ -1440,8 +1521,13 @@ return; | ||
| _reset(value) { | ||
| this.pendingSync()?.abort(); | ||
| if (value !== undefined) { | ||
| this.value.set(value); | ||
| } | ||
| this.controlValue.rawSet(this.value()); | ||
| this.nodeState.markAsUntouched(); | ||
| this.nodeState.markAsPristine(); | ||
| for (const child of this.structure.children()) { | ||
| for (const binding of this.formFieldBindings()) { | ||
| binding.reset(); | ||
| } | ||
| for (const child of this.structure.materializedChildren()) { | ||
| child._reset(); | ||
@@ -1466,16 +1552,12 @@ } | ||
| controlValueSignal() { | ||
| const controlValue = linkedSignal(this.value, ...(ngDevMode ? [{ | ||
| debugName: "controlValue" | ||
| }] : [])); | ||
| const { | ||
| set, | ||
| update | ||
| } = controlValue; | ||
| const controlValue = linkedSignal(this.value); | ||
| controlValue.rawSet = controlValue.set; | ||
| controlValue.set = newValue => { | ||
| set(newValue); | ||
| controlValue.rawSet(newValue); | ||
| this.markAsDirty(); | ||
| this.debounceSync(); | ||
| }; | ||
| const rawUpdate = controlValue.update; | ||
| controlValue.update = updateFn => { | ||
| update(updateFn); | ||
| rawUpdate(updateFn); | ||
| this.markAsDirty(); | ||
@@ -1512,2 +1594,5 @@ this.debounceSync(); | ||
| } | ||
| if (this.structure.isOrphaned()) { | ||
| return; | ||
| } | ||
| this.sync(); | ||
@@ -1593,5 +1678,8 @@ } | ||
| }] : [])); | ||
| disabledReasons = computed(() => [...(this.node.structure.parent?.nodeState.disabledReasons() ?? []), ...this.node.logicNode.logic.disabledReasons.compute(this.node.context)], ...(ngDevMode ? [{ | ||
| debugName: "disabledReasons" | ||
| }] : [])); | ||
| disabledReasons = computed(() => [...(this.node.structure.parent?.nodeState.disabledReasons() ?? []), ...this.node.logicNode.logic.disabledReasons.compute(this.node.context)], { | ||
| ...(ngDevMode ? { | ||
| debugName: "disabledReasons" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| disabled = computed(() => !!this.disabledReasons().length, ...(ngDevMode ? [{ | ||
@@ -1743,2 +1831,5 @@ debugName: "disabled" | ||
| const node = untracked(form); | ||
| if (untracked(node.submitState.submitting)) { | ||
| return false; | ||
| } | ||
| const field = options === undefined ? node.structure.root.fieldProxy : form; | ||
@@ -1857,3 +1948,3 @@ const detail = { | ||
| export { BasicFieldAdapter, CompatValidationError, DEBOUNCER, FieldNode, FieldNodeState, FieldNodeStructure, FieldPathNode, IS_ASYNC_VALIDATION_RESOURCE, MAX, MAX_LENGTH, MIN, MIN_LENGTH, MetadataKey, MetadataReducer, PATTERN, REQUIRED, addDefaultField, apply, applyEach, applyWhen, applyWhenValue, assertPathIsCurrent, calculateValidationSelfStatus, createManagedMetadataKey, createMetadataKey, extractNestedReactiveErrors, form, getInjectorFromOptions, isArray, isObject, metadata, normalizeFormArgs, reactiveErrorsToSignalErrors, schema, signalErrorsToValidationErrors, submit }; | ||
| export { BasicFieldAdapter, CompatValidationError, DEBOUNCER, FieldNode, FieldNodeState, FieldNodeStructure, FieldPathNode, IS_ASYNC_VALIDATION_RESOURCE, MAX, MAX_DATE, MAX_LENGTH, MAX_NUMBER, MIN, MIN_DATE, MIN_LENGTH, MIN_NUMBER, MetadataKey, MetadataReducer, PATTERN, REQUIRED, addDefaultField, apply, applyEach, applyWhen, applyWhenValue, assertPathIsCurrent, calculateValidationSelfStatus, createLimitSelectionKey, createManagedMetadataKey, createMetadataKey, extractNestedReactiveErrors, form, getInjectorFromOptions, isArray, isObject, metadata, normalizeFormArgs, reactiveErrorsToSignalErrors, schema, shallowArrayEquals, signalErrorsToValidationErrors, submit }; | ||
| //# sourceMappingURL=_validation_errors-chunk.mjs.map |
| /** | ||
| * @license Angular v22.0.0-next.10 | ||
| * @license Angular v22.0.0-next.11 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -134,2 +134,3 @@ * License: MIT | ||
| fieldManager; | ||
| isOrphaned; | ||
| constructor(node, options) { | ||
@@ -145,3 +146,5 @@ super(options.logic, node, () => { | ||
| const initialKeyInParent = options.kind === 'child' ? options.initialKeyInParent : undefined; | ||
| this.keyInParent = this.createKeyInParent(options, identityInParent, initialKeyInParent); | ||
| const signals = this.createKeyOrOrphanSignals(options.kind, identityInParent, initialKeyInParent); | ||
| this.keyInParent = signals.keyInParent; | ||
| this.isOrphaned = signals.isOrphaned; | ||
| this.pathKeys = computed(() => this.parent ? [...this.parent.structure.pathKeys(), this.keyInParent()] : [], ...(ngDevMode ? [{ | ||
@@ -148,0 +151,0 @@ debugName: "pathKeys" |
+267
-62
| /** | ||
| * @license Angular v22.0.0-next.10 | ||
| * @license Angular v22.0.0-next.11 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -8,6 +8,6 @@ * License: MIT | ||
| import * as i0 from '@angular/core'; | ||
| import { InjectionToken, debounced, resource, ɵisPromise as _isPromise, linkedSignal, inject, ɵRuntimeError as _RuntimeError, untracked, signal, computed, CSP_NONCE, PLATFORM_ID, Injectable, forwardRef, input, Renderer2, DestroyRef, Injector, ElementRef, afterRenderEffect, effect, ɵformatRuntimeError as _formatRuntimeError, Directive } from '@angular/core'; | ||
| import { ɵFORM_FIELD_PARSE_ERRORS as _FORM_FIELD_PARSE_ERRORS, Validators, ɵsetNativeDomProperty as _setNativeDomProperty, NG_VALIDATORS, ɵisNativeFormElement as _isNativeFormElement, ɵisTextualFormElement as _isTextualFormElement, NG_VALUE_ACCESSOR, ɵselectValueAccessor as _selectValueAccessor, ɵisNumericFormElement as _isNumericFormElement, NgControl } from '@angular/forms'; | ||
| import { assertPathIsCurrent, FieldPathNode, addDefaultField, metadata, createMetadataKey, MAX, MAX_LENGTH, MIN, MIN_LENGTH, PATTERN, REQUIRED, createManagedMetadataKey, IS_ASYNC_VALIDATION_RESOURCE, DEBOUNCER, signalErrorsToValidationErrors, reactiveErrorsToSignalErrors, submit } from './_validation_errors-chunk.mjs'; | ||
| export { MetadataKey, MetadataReducer, apply, applyEach, applyWhen, applyWhenValue, form, schema } from './_validation_errors-chunk.mjs'; | ||
| import { InjectionToken, debounced, computed, ɵchain as _chain, resource, ɵisPromise as _isPromise, linkedSignal, inject, ɵRuntimeError as _RuntimeError, untracked, signal, CSP_NONCE, PLATFORM_ID, Injectable, forwardRef, input, Renderer2, DestroyRef, Injector, ElementRef, afterRenderEffect, effect, ɵformatRuntimeError as _formatRuntimeError, Directive } from '@angular/core'; | ||
| import { ɵFORM_CONTROL_INTEGRATION as _FORM_CONTROL_INTEGRATION, Validators, ɵsetNativeDomProperty as _setNativeDomProperty, NG_VALIDATORS, ɵisNativeFormElement as _isNativeFormElement, ɵisTextualFormElement as _isTextualFormElement, NG_VALUE_ACCESSOR, ɵselectValueAccessor as _selectValueAccessor, ɵelementAcceptsMinMax as _elementAcceptsMinMax, NgControl } from '@angular/forms'; | ||
| import { assertPathIsCurrent, FieldPathNode, addDefaultField, createMetadataKey, metadata, MAX_NUMBER, MAX, MAX_DATE, MAX_LENGTH, MIN_NUMBER, MIN, MIN_DATE, MIN_LENGTH, PATTERN, REQUIRED, createManagedMetadataKey, IS_ASYNC_VALIDATION_RESOURCE, DEBOUNCER, signalErrorsToValidationErrors, reactiveErrorsToSignalErrors, shallowArrayEquals, submit } from './_validation_errors-chunk.mjs'; | ||
| export { MetadataKey, MetadataReducer, apply, applyEach, applyWhen, applyWhenValue, createLimitSelectionKey, form, schema } from './_validation_errors-chunk.mjs'; | ||
| import { DOCUMENT, isPlatformBrowser } from '@angular/common'; | ||
@@ -26,5 +26,11 @@ import { httpResource } from '@angular/common/http'; | ||
| function disabled(path, logic) { | ||
| function disabled(path, configOrLogic) { | ||
| assertPathIsCurrent(path); | ||
| const pathNode = FieldPathNode.unwrapFieldPath(path); | ||
| let logic; | ||
| if (typeof configOrLogic === 'function' || typeof configOrLogic === 'string') { | ||
| logic = configOrLogic; | ||
| } else { | ||
| logic = configOrLogic?.when; | ||
| } | ||
| pathNode.builder.addDisabledReasonRule(ctx => { | ||
@@ -49,11 +55,20 @@ let result = true; | ||
| function hidden(path, logic) { | ||
| function hidden(path, configOrLogic) { | ||
| assertPathIsCurrent(path); | ||
| const pathNode = FieldPathNode.unwrapFieldPath(path); | ||
| const logic = typeof configOrLogic === 'function' ? configOrLogic : configOrLogic.when; | ||
| pathNode.builder.addHiddenRule(logic); | ||
| } | ||
| function readonly(path, logic = () => true) { | ||
| function readonly(path, configOrLogic) { | ||
| assertPathIsCurrent(path); | ||
| const pathNode = FieldPathNode.unwrapFieldPath(path); | ||
| let logic; | ||
| if (typeof configOrLogic === 'object' && configOrLogic !== null && 'when' in configOrLogic) { | ||
| logic = configOrLogic.when ?? (() => true); | ||
| } else if (typeof configOrLogic === 'function') { | ||
| logic = configOrLogic; | ||
| } else { | ||
| logic = () => true; | ||
| } | ||
| pathNode.builder.addReadonlyRule(logic); | ||
@@ -99,5 +114,11 @@ } | ||
| } | ||
| function minDateError(minDate, options) { | ||
| return new MinDateValidationError(minDate, options); | ||
| } | ||
| function maxError(max, options) { | ||
| return new MaxValidationError(max, options); | ||
| } | ||
| function maxDateError(maxDate, options) { | ||
| return new MaxDateValidationError(maxDate, options); | ||
| } | ||
| function minLengthError(minLength, options) { | ||
@@ -137,2 +158,10 @@ return new MinLengthValidationError(minLength, options); | ||
| } | ||
| class MinDateValidationError extends BaseNgValidationError { | ||
| minDate; | ||
| kind = 'minDate'; | ||
| constructor(minDate, options) { | ||
| super(options); | ||
| this.minDate = minDate; | ||
| } | ||
| } | ||
| class MaxValidationError extends BaseNgValidationError { | ||
@@ -146,2 +175,10 @@ max; | ||
| } | ||
| class MaxDateValidationError extends BaseNgValidationError { | ||
| maxDate; | ||
| kind = 'maxDate'; | ||
| constructor(maxDate, options) { | ||
| super(options); | ||
| this.maxDate = maxDate; | ||
| } | ||
| } | ||
| class MinLengthValidationError extends BaseNgValidationError { | ||
@@ -182,2 +219,5 @@ minLength; | ||
| validate(path, ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| if (isEmpty(ctx.value())) { | ||
@@ -200,8 +240,16 @@ return undefined; | ||
| function max(path, maxValue, config) { | ||
| const MAX_MEMO = metadata(path, createMetadataKey(), ctx => typeof maxValue === 'number' ? maxValue : maxValue(ctx)); | ||
| metadata(path, MAX, ({ | ||
| const MAX_MEMO = createMetadataKey(); | ||
| metadata(path, MAX_MEMO, ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof maxValue === 'function' ? maxValue(ctx) : maxValue; | ||
| }); | ||
| metadata(path, MAX_NUMBER, ({ | ||
| state | ||
| }) => state.metadata(MAX_MEMO)()); | ||
| metadata(path, MAX, () => MAX_NUMBER); | ||
| validate(path, ctx => { | ||
| if (isEmpty(ctx.value())) { | ||
| const value = ctx.value(); | ||
| if (value === null || Number.isNaN(value)) { | ||
| return undefined; | ||
@@ -213,5 +261,3 @@ } | ||
| } | ||
| const value = ctx.value(); | ||
| const numValue = !value && value !== 0 ? NaN : Number(value); | ||
| if (numValue > max) { | ||
| if (value > max) { | ||
| if (config?.error) { | ||
@@ -229,4 +275,43 @@ return getOption(config.error, ctx); | ||
| function maxDate(path, maxDateValue, config) { | ||
| const MAX_MEMO = createMetadataKey(); | ||
| metadata(path, MAX_MEMO, ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof maxDateValue === 'function' ? maxDateValue(ctx) : maxDateValue; | ||
| }); | ||
| metadata(path, MAX_DATE, ({ | ||
| state | ||
| }) => state.metadata(MAX_MEMO)()); | ||
| metadata(path, MAX, () => MAX_DATE); | ||
| validate(path, ctx => { | ||
| const value = ctx.value(); | ||
| if (value === null || Number.isNaN(value.getTime())) { | ||
| return undefined; | ||
| } | ||
| const max = ctx.state.metadata(MAX_MEMO)(); | ||
| if (max === undefined || Number.isNaN(max.getTime())) { | ||
| return undefined; | ||
| } | ||
| if (value > max) { | ||
| if (config?.error) { | ||
| return getOption(config.error, ctx); | ||
| } else { | ||
| return maxDateError(max, { | ||
| message: getOption(config?.message, ctx) | ||
| }); | ||
| } | ||
| } | ||
| return undefined; | ||
| }); | ||
| } | ||
| function maxLength(path, maxLength, config) { | ||
| const MAX_LENGTH_MEMO = metadata(path, createMetadataKey(), ctx => typeof maxLength === 'number' ? maxLength : maxLength(ctx)); | ||
| const MAX_LENGTH_MEMO = metadata(path, createMetadataKey(), ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof maxLength === 'number' ? maxLength : maxLength(ctx); | ||
| }); | ||
| metadata(path, MAX_LENGTH, ({ | ||
@@ -257,8 +342,16 @@ state | ||
| function min(path, minValue, config) { | ||
| const MIN_MEMO = metadata(path, createMetadataKey(), ctx => typeof minValue === 'number' ? minValue : minValue(ctx)); | ||
| metadata(path, MIN, ({ | ||
| const MIN_MEMO = createMetadataKey(); | ||
| metadata(path, MIN_MEMO, ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof minValue === 'function' ? minValue(ctx) : minValue; | ||
| }); | ||
| metadata(path, MIN_NUMBER, ({ | ||
| state | ||
| }) => state.metadata(MIN_MEMO)()); | ||
| metadata(path, MIN, () => MIN_NUMBER); | ||
| validate(path, ctx => { | ||
| if (isEmpty(ctx.value())) { | ||
| const value = ctx.value(); | ||
| if (value === null || Number.isNaN(value)) { | ||
| return undefined; | ||
@@ -270,5 +363,3 @@ } | ||
| } | ||
| const value = ctx.value(); | ||
| const numValue = !value && value !== 0 ? NaN : Number(value); | ||
| if (numValue < min) { | ||
| if (value < min) { | ||
| if (config?.error) { | ||
@@ -286,4 +377,43 @@ return getOption(config.error, ctx); | ||
| function minDate(path, minDateValue, config) { | ||
| const MIN_MEMO = createMetadataKey(); | ||
| metadata(path, MIN_MEMO, ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof minDateValue === 'function' ? minDateValue(ctx) : minDateValue; | ||
| }); | ||
| metadata(path, MIN_DATE, ({ | ||
| state | ||
| }) => state.metadata(MIN_MEMO)()); | ||
| metadata(path, MIN, () => MIN_DATE); | ||
| validate(path, ctx => { | ||
| const value = ctx.value(); | ||
| if (value === null || Number.isNaN(value.getTime())) { | ||
| return undefined; | ||
| } | ||
| const min = ctx.state.metadata(MIN_MEMO)(); | ||
| if (min === undefined || Number.isNaN(min.getTime())) { | ||
| return undefined; | ||
| } | ||
| if (value < min) { | ||
| if (config?.error) { | ||
| return getOption(config.error, ctx); | ||
| } else { | ||
| return minDateError(min, { | ||
| message: getOption(config?.message, ctx) | ||
| }); | ||
| } | ||
| } | ||
| return undefined; | ||
| }); | ||
| } | ||
| function minLength(path, minLength, config) { | ||
| const MIN_LENGTH_MEMO = metadata(path, createMetadataKey(), ctx => typeof minLength === 'number' ? minLength : minLength(ctx)); | ||
| const MIN_LENGTH_MEMO = metadata(path, createMetadataKey(), ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return typeof minLength === 'number' ? minLength : minLength(ctx); | ||
| }); | ||
| metadata(path, MIN_LENGTH, ({ | ||
@@ -314,3 +444,8 @@ state | ||
| function pattern(path, pattern, config) { | ||
| const PATTERN_MEMO = metadata(path, createMetadataKey(), ctx => pattern instanceof RegExp ? pattern : pattern(ctx)); | ||
| const PATTERN_MEMO = metadata(path, createMetadataKey(), ctx => { | ||
| if (config?.when && !config.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return pattern instanceof RegExp ? pattern : pattern(ctx); | ||
| }); | ||
| metadata(path, PATTERN, ({ | ||
@@ -365,3 +500,6 @@ state | ||
| const debouncedResource = debounced(() => params(), opts.debounce); | ||
| return opts.factory(debouncedResource.value); | ||
| const wrappedParams = computed(() => _chain(debouncedResource), ...(ngDevMode ? [{ | ||
| debugName: "wrappedParams" | ||
| }] : [])); | ||
| return opts.factory(wrappedParams); | ||
| } | ||
@@ -377,2 +515,5 @@ return opts.factory(params); | ||
| } | ||
| if (opts.when && !opts.when(ctx)) { | ||
| return undefined; | ||
| } | ||
| return opts.params(ctx); | ||
@@ -475,3 +616,4 @@ }); | ||
| onSuccess: opts.onSuccess, | ||
| onError: opts.onError | ||
| onError: opts.onError, | ||
| when: opts.when | ||
| }); | ||
@@ -543,5 +685,9 @@ } | ||
| }; | ||
| const reset = () => { | ||
| errors.set([]); | ||
| }; | ||
| return { | ||
| errors: errors.asReadonly(), | ||
| setRawValue | ||
| setRawValue, | ||
| reset | ||
| }; | ||
@@ -556,9 +702,2 @@ } | ||
| const parser = createParser(value, value.set, parse); | ||
| const formFieldParseErrors = inject(_FORM_FIELD_PARSE_ERRORS, { | ||
| self: true, | ||
| optional: true | ||
| }); | ||
| if (formFieldParseErrors) { | ||
| formFieldParseErrors.set(parser.errors); | ||
| } | ||
| const rawValue = linkedSignal(() => format(value()), ...(ngDevMode ? [{ | ||
@@ -570,2 +709,14 @@ debugName: "rawValue" | ||
| const originalSet = result.set.bind(result); | ||
| const integration = inject(_FORM_CONTROL_INTEGRATION, { | ||
| self: true, | ||
| optional: true | ||
| }); | ||
| if (integration) { | ||
| integration.setParseErrors(parser.errors); | ||
| integration.onReset = resetValue => { | ||
| parser.reset(); | ||
| const modelValue = resetValue !== undefined ? resetValue : value(); | ||
| originalSet(format(modelValue)); | ||
| }; | ||
| } | ||
| result.set = newRawValue => { | ||
@@ -803,2 +954,17 @@ parser.setRawValue(newRawValue); | ||
| } | ||
| function formatDateForInput(date, type) { | ||
| const year = date.getUTCFullYear(); | ||
| const month = String(date.getUTCMonth() + 1).padStart(2, '0'); | ||
| if (type === 'month') { | ||
| return `${year}-${month}`; | ||
| } | ||
| const day = String(date.getUTCDate()).padStart(2, '0'); | ||
| return `${year}-${month}-${day}`; | ||
| } | ||
| function formatDateForMinMax(name, value, type) { | ||
| if (value instanceof Date && (name === 'min' || name === 'max') && (type === 'date' || type === 'month')) { | ||
| return formatDateForInput(value, type); | ||
| } | ||
| return value; | ||
| } | ||
@@ -826,3 +992,4 @@ function customControlCreate(host, parent) { | ||
| if (parent.elementAcceptsNativeProperty(name) && !host.customControlHasInput(name)) { | ||
| _setNativeDomProperty(parent.renderer, parent.nativeFormElement, name, value); | ||
| const domValue = formatDateForMinMax(name, value, parent.nativeFormElement.type); | ||
| _setNativeDomProperty(parent.renderer, parent.nativeFormElement, name, domValue); | ||
| } | ||
@@ -869,3 +1036,9 @@ } | ||
| } | ||
| parent.registerAsBinding(); | ||
| parent.registerAsBinding({ | ||
| reset: () => { | ||
| const value = parent.state().value(); | ||
| bindings['controlValue'] = value; | ||
| untracked(() => parent.controlValueAccessor.writeValue(value)); | ||
| } | ||
| }); | ||
| return () => { | ||
@@ -937,2 +1110,8 @@ const fieldState = parent.state(); | ||
| parseErrorsSource.set(parser.errors); | ||
| parent.onReset = () => { | ||
| parser.reset(); | ||
| const value = parent.state().value(); | ||
| bindings['controlValue'] = value; | ||
| setNativeControlValue(input, value); | ||
| }; | ||
| host.listenToDom('input', () => parser.setRawValue(undefined)); | ||
@@ -955,6 +1134,2 @@ host.listenToDom('blur', () => parent.state().markAsTouched()); | ||
| const state = parent.state(); | ||
| const controlValue = state.controlValue(); | ||
| if (bindingUpdated(bindings, 'controlValue', controlValue)) { | ||
| setNativeControlValue(input, controlValue); | ||
| } | ||
| for (const name of CONTROL_BINDING_NAMES) { | ||
@@ -965,6 +1140,11 @@ const value = readFieldStateBindingValue(state, name); | ||
| if (parent.elementAcceptsNativeProperty(name)) { | ||
| _setNativeDomProperty(parent.renderer, input, name, value); | ||
| const domValue = formatDateForMinMax(name, value, input.type); | ||
| _setNativeDomProperty(parent.renderer, input, name, domValue); | ||
| } | ||
| } | ||
| } | ||
| const controlValue = state.controlValue(); | ||
| if (bindingUpdated(bindings, 'controlValue', controlValue)) { | ||
| setNativeControlValue(input, controlValue); | ||
| } | ||
| updateMode = true; | ||
@@ -977,3 +1157,3 @@ }; | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -986,3 +1166,3 @@ type: InputValidityMonitor, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -996,3 +1176,3 @@ type: InputValidityMonitor, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1060,3 +1240,3 @@ type: InputValidityMonitor, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1069,3 +1249,3 @@ type: AnimationInputValidityMonitor, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1077,3 +1257,3 @@ type: AnimationInputValidityMonitor | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1104,3 +1284,3 @@ type: AnimationInputValidityMonitor, | ||
| elementAcceptsTextualValues = _isTextualFormElement(this.element); | ||
| _elementAcceptsNumericValues; | ||
| _elementAcceptsMinMax; | ||
| nativeFormElement = this.elementIsNativeFormElement ? this.element : undefined; | ||
@@ -1130,6 +1310,20 @@ focuser = options => this.element.focus(options); | ||
| }] : [])); | ||
| errors = computed(() => this.state().errors().filter(err => !err.formField || err.formField === this), ...(ngDevMode ? [{ | ||
| debugName: "errors" | ||
| }] : [])); | ||
| errors = computed(() => this.state().errors().filter(err => !err.formField || err.formField === this), { | ||
| ...(ngDevMode ? { | ||
| debugName: "errors" | ||
| } : {}), | ||
| equal: shallowArrayEquals | ||
| }); | ||
| isFieldBinding = false; | ||
| resetter = () => {}; | ||
| parseErrorsResetCallback; | ||
| setParseErrors(source) { | ||
| this.parseErrorsSource.set(source); | ||
| } | ||
| set onReset(callback) { | ||
| this.parseErrorsResetCallback = callback; | ||
| } | ||
| get onReset() { | ||
| return this.parseErrorsResetCallback; | ||
| } | ||
| get controlValueAccessor() { | ||
@@ -1167,2 +1361,6 @@ if (!this.controlValueAccessors || this.controlValueAccessors.length === 0) { | ||
| } | ||
| reset() { | ||
| this.resetter(); | ||
| this.parseErrorsResetCallback?.(this.state().value()); | ||
| } | ||
| registerAsBinding(bindingOptions) { | ||
@@ -1177,2 +1375,5 @@ if (this.isFieldBinding) { | ||
| } | ||
| if (bindingOptions?.reset) { | ||
| this.resetter = () => bindingOptions.reset(); | ||
| } | ||
| effect(onCleanup => { | ||
@@ -1222,3 +1423,3 @@ const fieldNode = this.state(); | ||
| case 'max': | ||
| return this._elementAcceptsNumericValues ??= _isNumericFormElement(this.element); | ||
| return this._elementAcceptsMinMax ??= _elementAcceptsMinMax(this.element); | ||
| case 'minLength': | ||
@@ -1238,3 +1439,3 @@ case 'maxLength': | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1247,3 +1448,3 @@ type: FormField, | ||
| minVersion: "17.1.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| type: FormField, | ||
@@ -1268,4 +1469,6 @@ isStandalone: true, | ||
| }, { | ||
| provide: _FORM_FIELD_PARSE_ERRORS, | ||
| useFactory: () => inject(FormField).parseErrorsSource | ||
| provide: _FORM_CONTROL_INTEGRATION, | ||
| useFactory: () => inject(FORM_FIELD, { | ||
| self: true | ||
| }) | ||
| }], | ||
@@ -1281,3 +1484,3 @@ exportAs: ["formField"], | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1297,4 +1500,6 @@ type: FormField, | ||
| }, { | ||
| provide: _FORM_FIELD_PARSE_ERRORS, | ||
| useFactory: () => inject(FormField).parseErrorsSource | ||
| provide: _FORM_CONTROL_INTEGRATION, | ||
| useFactory: () => inject(FORM_FIELD, { | ||
| self: true | ||
| }) | ||
| }] | ||
@@ -1334,3 +1539,3 @@ }] | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1343,3 +1548,3 @@ type: FormRoot, | ||
| minVersion: "17.1.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| type: FormRoot, | ||
@@ -1370,3 +1575,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "22.0.0-next.10", | ||
| version: "22.0.0-next.11", | ||
| ngImport: i0, | ||
@@ -1396,3 +1601,3 @@ type: FormRoot, | ||
| export { BaseNgValidationError, EmailValidationError, FORM_FIELD, FormField, FormRoot, IS_ASYNC_VALIDATION_RESOURCE, MAX, MAX_LENGTH, MIN, MIN_LENGTH, MaxLengthValidationError, MaxValidationError, MinLengthValidationError, MinValidationError, NativeInputParseError, NgValidationError, PATTERN, PatternValidationError, REQUIRED, RequiredValidationError, StandardSchemaValidationError, createManagedMetadataKey, createMetadataKey, debounce, disabled, email, emailError, hidden, max, maxError, maxLength, maxLengthError, metadata, min, minError, minLength, minLengthError, pattern, patternError, provideSignalFormsConfig, readonly, required, requiredError, standardSchemaError, submit, transformedValue, validate, validateAsync, validateHttp, validateStandardSchema, validateTree, ɵNgFieldDirective }; | ||
| export { BaseNgValidationError, EmailValidationError, FORM_FIELD, FormField, FormRoot, IS_ASYNC_VALIDATION_RESOURCE, MAX, MAX_DATE, MAX_LENGTH, MAX_NUMBER, MIN, MIN_DATE, MIN_LENGTH, MIN_NUMBER, MaxDateValidationError, MaxLengthValidationError, MaxValidationError, MinDateValidationError, MinLengthValidationError, MinValidationError, NativeInputParseError, NgValidationError, PATTERN, PatternValidationError, REQUIRED, RequiredValidationError, StandardSchemaValidationError, createManagedMetadataKey, createMetadataKey, debounce, disabled, email, emailError, hidden, max, maxDate, maxDateError, maxError, maxLength, maxLengthError, metadata, min, minDate, minDateError, minError, minLength, minLengthError, pattern, patternError, provideSignalFormsConfig, readonly, required, requiredError, standardSchemaError, submit, transformedValue, validate, validateAsync, validateHttp, validateStandardSchema, validateTree, ɵNgFieldDirective }; | ||
| //# sourceMappingURL=signals.mjs.map |
+5
-5
| { | ||
| "name": "@angular/forms", | ||
| "version": "22.0.0-next.10", | ||
| "version": "22.0.0-next.11", | ||
| "description": "Angular - directives and services for creating forms", | ||
@@ -8,3 +8,3 @@ "author": "angular", | ||
| "engines": { | ||
| "node": "^22.22.0 || >=24.13.1" | ||
| "node": "^22.22.0 || ^24.13.1 || >=26.0.0" | ||
| }, | ||
@@ -17,5 +17,5 @@ "dependencies": { | ||
| "peerDependencies": { | ||
| "@angular/core": "22.0.0-next.10", | ||
| "@angular/common": "22.0.0-next.10", | ||
| "@angular/platform-browser": "22.0.0-next.10", | ||
| "@angular/core": "22.0.0-next.11", | ||
| "@angular/common": "22.0.0-next.11", | ||
| "@angular/platform-browser": "22.0.0-next.11", | ||
| "rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -22,0 +22,0 @@ }, |
| /** | ||
| * @license Angular v22.0.0-next.10 | ||
| * @license Angular v22.0.0-next.11 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -16,3 +16,3 @@ * License: MIT | ||
| * @category interop | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -47,3 +47,3 @@ type CompatFormOptions<TModel> = Omit<FormOptions<TModel>, 'adapter'>; | ||
| * @category interop | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -81,3 +81,3 @@ declare function compatForm<TModel>(model: WritableSignal<TModel>): FieldTree<TModel>; | ||
| * @category interop | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -114,3 +114,3 @@ declare function compatForm<TModel>(model: WritableSignal<TModel>, schemaOrOptions: SchemaOrSchemaFn<TModel> | CompatFormOptions<TModel>): FieldTree<TModel>; | ||
| * @category interop | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -131,3 +131,3 @@ declare function compatForm<TModel>(model: WritableSignal<TModel>, schema: SchemaOrSchemaFn<TModel>, options: CompatFormOptions<TModel>): FieldTree<TModel>; | ||
| * Used for the result of `extractValue` when filtering is applied. | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -143,3 +143,3 @@ type DeepPartial<T> = (T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? { | ||
| * @category interop | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -161,3 +161,3 @@ interface ExtractFilter { | ||
| * @category interop | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -176,3 +176,3 @@ declare function extractValue<T>(field: FieldTree<T>): RawValue<T>; | ||
| * @category interop | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -184,3 +184,3 @@ declare function extractValue<T>(field: FieldTree<T>, filter: ExtractFilter): DeepPartial<RawValue<T>>; | ||
| * | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| * @category interop | ||
@@ -205,3 +205,3 @@ */ | ||
| * | ||
| * @experimental 21.0.1 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -248,3 +248,3 @@ declare const NG_STATUS_CLASSES: SignalFormsConfig['classes']; | ||
| * | ||
| * @experimental | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -251,0 +251,0 @@ declare class SignalFormControl<T> extends AbstractControl { |
+122
-40
| /** | ||
| * @license Angular v22.0.0-next.10 | ||
| * @license Angular v22.0.0-next.11 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -10,3 +10,3 @@ * License: MIT | ||
| import { PathKind, SchemaPath, SchemaPathRules, LogicFn, OneOrMany, ValidationError, FieldValidator, FieldContext, TreeValidationResult, TreeValidator, WithOptionalFieldTree, DisabledReason, Debouncer, FieldTree } from './_structure-chunk.js'; | ||
| export { AsyncValidationResult, BaseNgValidationError, ChildFieldContext, CompatFieldState, CompatSchemaPath, EmailValidationError, FORM_FIELD, Field, FieldState, FieldStateByMode, FormField, FormFieldBinding, FormFieldBindingOptions, FormOptions, FormSubmitOptions, IS_ASYNC_VALIDATION_RESOURCE, IgnoreUnknownProperties, ItemFieldContext, ItemType, MAX, MAX_LENGTH, MIN, MIN_LENGTH, MarkAsTouchedOptions, MaxLengthValidationError, MaxValidationError, MaybeFieldTree, MaybeSchemaPathTree, MetadataKey, MetadataReducer, MetadataSetterType, MinLengthValidationError, MinValidationError, NativeInputParseError, NgValidationError, PATTERN, PatternValidationError, REQUIRED, ReadonlyArrayLike, ReadonlyCompatFieldState, ReadonlyFieldState, ReadonlyFieldTree, RemoveStringIndexUnknownKey, RequiredValidationError, RootFieldContext, Schema, SchemaFn, SchemaOrSchemaFn, SchemaPathTree, SignalFormsConfig, StandardSchemaValidationError, Subfields, ValidationErrorOptions, ValidationResult, ValidationSuccess, Validator, WithFieldTree, 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'; | ||
| export { AsyncValidationResult, BaseNgValidationError, ChildFieldContext, CompatFieldState, CompatSchemaPath, EmailValidationError, FORM_FIELD, Field, FieldState, FieldStateByMode, FormField, FormFieldBinding, FormFieldBindingOptions, FormOptions, FormSubmitOptions, IS_ASYNC_VALIDATION_RESOURCE, IgnoreUnknownProperties, ItemFieldContext, ItemType, LimitKey, LimitSelectionKey, MAX, MAX_DATE, MAX_LENGTH, MAX_NUMBER, MIN, MIN_DATE, MIN_LENGTH, MIN_NUMBER, MarkAsTouchedOptions, MaxDateValidationError, MaxLengthValidationError, MaxValidationError, MaybeFieldTree, MaybeSchemaPathTree, MetadataKey, MetadataReducer, MetadataSetterType, MinDateValidationError, MinLengthValidationError, MinValidationError, NativeInputParseError, NgValidationError, PATTERN, PatternValidationError, REQUIRED, ReadonlyArrayLike, ReadonlyCompatFieldState, ReadonlyFieldState, ReadonlyFieldTree, RemoveStringIndexUnknownKey, RequiredValidationError, RootFieldContext, Schema, SchemaFn, SchemaOrSchemaFn, SchemaPathTree, SignalFormsConfig, StandardSchemaValidationError, Subfields, ValidationErrorOptions, ValidationResult, ValidationSuccess, Validator, WithFieldTree, WithoutFieldTree, apply, applyEach, applyWhen, applyWhenValue, createLimitSelectionKey, createManagedMetadataKey, createMetadataKey, emailError, form, maxDateError, maxError, maxLengthError, metadata, minDateError, minError, minLengthError, patternError, provideSignalFormsConfig, requiredError, schema, standardSchemaError, submit, validateStandardSchema, ɵNgFieldDirective } from './_structure-chunk.js'; | ||
| import { HttpResourceRequest, HttpResourceOptions } from '@angular/common/http'; | ||
@@ -21,4 +21,5 @@ import '@angular/forms'; | ||
| * @param path The target path to add the disabled logic to. | ||
| * @param logic A reactive function that returns `true` (or a string reason) when the field is disabled, | ||
| * and `false` when it is not disabled. | ||
| * @param config Optional configuration object. | ||
| * - `when`: A reactive function that returns `true` (or a string reason) when the field is disabled, | ||
| * and `false` when it is not disabled. Can also be a static string reason. | ||
| * @template TValue The type of value stored in the field the logic is bound to. | ||
@@ -28,4 +29,12 @@ * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array) | ||
| * @category logic | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| declare function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config?: { | ||
| when?: string | NoInfer<LogicFn<TValue, boolean | string, TPathKind>>; | ||
| }): void; | ||
| /** | ||
| * Adds logic to a field to conditionally disable it. | ||
| * | ||
| * @deprecated Passing a function or string directly to `disabled` is deprecated. Use `{ when: ... }` instead. | ||
| */ | ||
| declare function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, logic?: string | NoInfer<LogicFn<TValue, boolean | string, TPathKind>>): void; | ||
@@ -46,3 +55,4 @@ | ||
| * @param path The target path to add the hidden logic to. | ||
| * @param logic A reactive function that returns `true` when the field is hidden. | ||
| * @param config Options object containing the `when` condition. | ||
| * - `when`: A reactive function that returns `true` when the field is hidden. | ||
| * @template TValue The type of value stored in the field the logic is bound to. | ||
@@ -52,4 +62,12 @@ * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array) | ||
| * @category logic | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| declare function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config: { | ||
| when: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| }): void; | ||
| /** | ||
| * Adds logic to a field to conditionally hide it. | ||
| * | ||
| * @deprecated Passing a function directly to `hidden` is deprecated. Use `{ when: ... }` instead. | ||
| */ | ||
| declare function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, logic: NoInfer<LogicFn<TValue, boolean, TPathKind>>): void; | ||
@@ -62,3 +80,4 @@ | ||
| * @param path The target path to make readonly. | ||
| * @param logic A reactive function that returns `true` when the field is readonly. | ||
| * @param config Optional configuration object. | ||
| * - `when`: A reactive function that returns `true` when the field is readonly. | ||
| * @template TValue The type of value stored in the field the logic is bound to. | ||
@@ -68,4 +87,12 @@ * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array) | ||
| * @category logic | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| declare function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config?: { | ||
| when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| }): void; | ||
| /** | ||
| * Adds logic to a field to conditionally make it readonly. | ||
| * | ||
| * @deprecated Passing a function directly to `readonly` is deprecated. Use `{ when: ... }` instead. | ||
| */ | ||
| declare function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, logic?: NoInfer<LogicFn<TValue, boolean, TPathKind>>): void; | ||
@@ -84,2 +111,4 @@ | ||
| error?: never; | ||
| /** A function that receives the `FieldContext` and returns true if the validator should be applied. */ | ||
| when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| } | { | ||
@@ -92,2 +121,4 @@ /** | ||
| message?: never; | ||
| /** A function that receives the `FieldContext` and returns true if the validator should be applied. */ | ||
| when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| }; | ||
@@ -107,3 +138,3 @@ | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -116,2 +147,3 @@ declare function email<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: BaseValidatorConfig<string, TPathKind>): void; | ||
| * This function can only be called on number paths. | ||
| * This function can only be called on number paths. | ||
| * In addition to binding a validator, this function adds `MAX` property to the field. | ||
@@ -128,7 +160,26 @@ * | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| declare function max<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<number | string | null, SchemaPathRules.Supported, TPathKind>, maxValue: number | LogicFn<number | string | null, number | undefined, TPathKind>, config?: BaseValidatorConfig<number | string | null, TPathKind>): void; | ||
| declare function max<TValue extends number | null, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, maxValue: number | LogicFn<TValue, number | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| /** | ||
| * Binds a validator to the given path that requires the value to be less than or equal to the | ||
| * given `maxDate`. | ||
| * This function can only be called on date paths. | ||
| * In addition to binding a validator, this function adds `MAX` property to the field. | ||
| * | ||
| * @param path Path of the field to validate | ||
| * @param maxDate The maximum date, or a LogicFn that returns the maximum date. | ||
| * @param config Optional, allows providing any of the following options: | ||
| * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.max(maxDate)` | ||
| * or a function that receives the `FieldContext` and returns custom validation error(s). | ||
| * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array) | ||
| * | ||
| * @see [Signal Form Max Validation](guide/forms/signals/validation#min-and-max) | ||
| * @category validation | ||
| * @experimental 22.0.0 | ||
| */ | ||
| declare function maxDate<TValue extends Date | null, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, maxDateValue: Date | LogicFn<TValue, Date | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| /** | ||
| * Binds a validator to the given path that requires the length of the value to be less than or | ||
@@ -149,3 +200,3 @@ * equal to the given `maxLength`. | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -158,2 +209,3 @@ declare function maxLength<TValue extends ValueWithLengthOrSize, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, maxLength: number | LogicFn<TValue, number | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| * This function can only be called on number paths. | ||
| * This function can only be called on number paths. | ||
| * In addition to binding a validator, this function adds `MIN` property to the field. | ||
@@ -170,7 +222,26 @@ * | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| declare function min<TValue extends number | string | null, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, minValue: number | LogicFn<TValue, number | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| declare function min<TValue extends number | null, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, minValue: number | LogicFn<TValue, number | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| /** | ||
| * Binds a validator to the given path that requires the value to be greater than or equal to | ||
| * the given `minDate`. | ||
| * This function can only be called on date paths. | ||
| * In addition to binding a validator, this function adds `MIN` property to the field. | ||
| * | ||
| * @param path Path of the field to validate | ||
| * @param minDate The minimum date, or a LogicFn that returns the minimum date. | ||
| * @param config Optional, allows providing any of the following options: | ||
| * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.min(minDate)` | ||
| * or a function that receives the `FieldContext` and returns custom validation error(s). | ||
| * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array) | ||
| * | ||
| * @see [Signal Form Min Validation](guide/forms/signals/validation#min-and-max) | ||
| * @category validation | ||
| * @experimental 22.0.0 | ||
| */ | ||
| declare function minDate<TValue extends Date | null, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, minDateValue: Date | LogicFn<TValue, Date | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| /** | ||
| * Binds a validator to the given path that requires the length of the value to be greater than or | ||
@@ -191,3 +262,3 @@ * equal to the given `minLength`. | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -210,3 +281,3 @@ declare function minLength<TValue extends ValueWithLengthOrSize, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, minLength: number | LogicFn<TValue, number | undefined, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind>): void; | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -231,3 +302,3 @@ declare function pattern<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, pattern: RegExp | LogicFn<string | undefined, RegExp | undefined, TPathKind>, config?: BaseValidatorConfig<string, TPathKind>): void; | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -247,3 +318,3 @@ declare function required<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config?: BaseValidatorConfig<TValue, TPathKind> & { | ||
| * @category logic | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -266,3 +337,3 @@ declare function validate<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, logic: NoInfer<FieldValidator<TValue, TPathKind>>): void; | ||
| * | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -280,3 +351,3 @@ type MapToErrorsFn<TValue, TResult, TPathKind extends PathKind = PathKind.Root> = (result: TResult, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult; | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -322,2 +393,6 @@ interface AsyncValidatorOptions<TValue, TParams, TResult, TPathKind extends PathKind = PathKind.Root> { | ||
| readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>; | ||
| /** | ||
| * A function that receives the field context and returns true if the async validation should be run. | ||
| */ | ||
| readonly when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| } | ||
@@ -337,3 +412,3 @@ /** | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -351,3 +426,3 @@ declare function validateAsync<TValue, TParams, TResult, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, opts: AsyncValidatorOptions<TValue, TParams, TResult, TPathKind>): void; | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -389,2 +464,6 @@ interface HttpValidatorOptions<TValue, TResult, TPathKind extends PathKind = PathKind.Root> { | ||
| readonly debounce?: DebounceTimer<string | HttpResourceRequest | undefined>; | ||
| /** | ||
| * A function that receives the field context and returns true if the async validation should be run. | ||
| */ | ||
| readonly when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>; | ||
| } | ||
@@ -403,3 +482,3 @@ /** | ||
| * @category validation | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -418,3 +497,3 @@ declare function validateHttp<TValue, TResult = unknown, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, opts: HttpValidatorOptions<TValue, TResult, TPathKind>): void; | ||
| * @category logic | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -427,5 +506,5 @@ declare function validateTree<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, logic: NoInfer<TreeValidator<TValue, TPathKind>>): void; | ||
| * @category control | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| interface FormUiControl { | ||
| interface FormUiControl<TValue> { | ||
| /** | ||
@@ -490,3 +569,3 @@ * An input to receive the errors for the field. If implemented, the `Field` directive will | ||
| */ | ||
| readonly min?: InputSignal<number | undefined> | InputSignalWithTransform<number | undefined, unknown>; | ||
| readonly min?: InputSignal<NonNullable<TValue> | undefined> | InputSignalWithTransform<NonNullable<TValue> | undefined, unknown>; | ||
| /** | ||
@@ -501,3 +580,3 @@ * An input to receive the min length for the field. If implemented, the `Field` directive will | ||
| */ | ||
| readonly max?: InputSignal<number | undefined> | InputSignalWithTransform<number | undefined, unknown>; | ||
| readonly max?: InputSignal<NonNullable<TValue> | undefined> | InputSignalWithTransform<NonNullable<TValue> | undefined, unknown>; | ||
| /** | ||
@@ -524,2 +603,6 @@ * An input to receive the max length for the field. If implemented, the `Field` directive will | ||
| focus?(options?: FocusOptions): void; | ||
| /** | ||
| * Resets the UI control to its pristine state. | ||
| */ | ||
| reset?(): void; | ||
| } | ||
@@ -537,5 +620,5 @@ /** | ||
| * @category control | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| interface FormValueControl<TValue> extends FormUiControl { | ||
| interface FormValueControl<TValue> extends FormUiControl<TValue> { | ||
| /** | ||
@@ -562,5 +645,5 @@ * The value is the only required property in this contract. A component that wants to integrate | ||
| * @category control | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
| interface FormCheckboxControl extends FormUiControl { | ||
| interface FormCheckboxControl extends FormUiControl<boolean> { | ||
| /** | ||
@@ -589,3 +672,3 @@ * The checked is the only required property in this contract. A component that wants to integrate | ||
| * | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -610,3 +693,3 @@ declare function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config: number | 'blur' | Debouncer<TValue, TPathKind>): void; | ||
| * | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -632,3 +715,3 @@ interface TransformedValueOptions<TValue, TRaw> { | ||
| * @category control | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -660,3 +743,3 @@ interface TransformedValueSignal<TRaw> extends WritableSignal<TRaw> { | ||
| * @returns A `TransformedValueSignal` representing the raw value with parse error tracking. | ||
| * @experimental 21.2.0 | ||
| * @publicApi 22.0 | ||
| * | ||
@@ -704,4 +787,3 @@ * @example | ||
| * | ||
| * @publicApi | ||
| * @experimental 21.0.0 | ||
| * @publicApi 22.0 | ||
| */ | ||
@@ -715,3 +797,3 @@ declare class FormRoot<T> { | ||
| export { Debouncer, DisabledReason, FieldContext, FieldTree, FieldValidator, FormRoot, LogicFn, OneOrMany, PathKind, SchemaPath, SchemaPathRules, TreeValidationResult, TreeValidator, ValidationError, WithOptionalFieldTree, debounce, disabled, email, hidden, max, maxLength, min, minLength, pattern, readonly, required, transformedValue, validate, validateAsync, validateHttp, validateTree }; | ||
| export { Debouncer, DisabledReason, FieldContext, FieldTree, FieldValidator, FormRoot, LogicFn, OneOrMany, PathKind, SchemaPath, SchemaPathRules, TreeValidationResult, TreeValidator, ValidationError, WithOptionalFieldTree, debounce, disabled, email, hidden, max, maxDate, maxLength, min, minDate, minLength, pattern, readonly, required, transformedValue, validate, validateAsync, validateHttp, validateTree }; | ||
| export type { AsyncValidatorOptions, FormCheckboxControl, FormUiControl, FormValueControl, HttpValidatorOptions, MapToErrorsFn, ParseResult, TransformedValueOptions, TransformedValueSignal }; |
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 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
1730581
3.15%18247
3.1%93
4.49%