1 line
152 KiB
Plaintext
1 line
152 KiB
Plaintext
{"version":3,"file":"signals.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/field/di.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/di.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/disabled.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/hidden.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/readonly.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/util.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validation_errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/email.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max_length.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min_length.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/pattern.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/required.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_async.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_tree.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/standard_schema.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_http.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/debounce.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/parse_errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/util/parser.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/transformed_value.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/controls/interop_ng_control.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/bindings.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/native.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/control_custom.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/control_cva.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/select.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/control_native.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/form_field_directive.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/directive/ng_signal_form.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {SignalFormsConfig} from '../api/di';\n\n/** Injection token for the signal forms configuration. */\nexport const SIGNAL_FORMS_CONFIG = new InjectionToken<SignalFormsConfig>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'SIGNAL_FORMS_CONFIG' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Provider} from '@angular/core';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FormField} from '../directive/form_field_directive';\n\n/**\n * Configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport interface SignalFormsConfig {\n /** A map of CSS class names to predicate functions that determine when to apply them. */\n classes?: {[className: string]: (state: FormField<unknown>) => boolean};\n}\n\n/**\n * Provides configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport function provideSignalFormsConfig(config: SignalFormsConfig): Provider[] {\n return [{provide: SIGNAL_FORMS_CONFIG, useValue: config}];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {FieldContext, LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally disable it. A disabled field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to add the disabled logic to.\n * @param logic A reactive function that returns `true` (or a string reason) when the field is disabled,\n * and `false` when it is not disabled.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic?: string | NoInfer<LogicFn<TValue, boolean | string, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addDisabledReasonRule((ctx) => {\n let result: boolean | string = true;\n if (typeof logic === 'string') {\n result = logic;\n } else if (logic) {\n result = logic(ctx as FieldContext<TValue, TPathKind>);\n }\n if (typeof result === 'string') {\n return {fieldTree: ctx.fieldTree, message: result};\n }\n return result ? {fieldTree: ctx.fieldTree} : undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally hide it. A hidden field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * If a field may be hidden it is recommended to guard it with an `@if` in the template:\n * ```\n * @if (!email().hidden()) {\n * <label for=\"email\">Email</label>\n * <input id=\"email\" type=\"email\" [control]=\"email\" />\n * }\n * ```\n *\n * @param path The target path to add the hidden logic to.\n * @param logic A reactive function that returns `true` when the field is hidden.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addHiddenRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally make it readonly. A readonly field does not contribute to\n * the validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to make readonly.\n * @param logic A reactive function that returns `true` when the field is readonly.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>> = () => true,\n) {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addReadonlyRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, OneOrMany, PathKind, type FieldContext} from '../../types';\nimport {ValidationError} from './validation_errors';\n\n/** Represents a value that has a length or size, such as an array or string, or set. */\nexport type ValueWithLengthOrSize = {length: number} | {size: number};\n\n/** Common options available on the standard validators. */\nexport type BaseValidatorConfig<TValue, TPathKind extends PathKind = PathKind.Root> =\n | {\n /** A user-facing error message to include with the error. */\n message?: string | LogicFn<TValue, string, TPathKind>;\n error?: never;\n }\n | {\n /**\n * Custom validation error(s) to report instead of the default,\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n */\n error?: OneOrMany<ValidationError> | LogicFn<TValue, OneOrMany<ValidationError>, TPathKind>;\n message?: never;\n };\n\n/** Gets the length or size of the given value. */\nexport function getLengthOrSize(value: ValueWithLengthOrSize) {\n const v = value as {length: number; size: number};\n return typeof v.length === 'number' ? v.length : v.size;\n}\n\n/**\n * Gets the value for an option that may be either a static value or a logic function that produces\n * the option value.\n *\n * @param opt The option from BaseValidatorConfig.\n * @param ctx The current FieldContext.\n * @returns The value for the option.\n */\nexport function getOption<TOption, TValue, TPathKind extends PathKind = PathKind.Root>(\n opt: Exclude<TOption, Function> | LogicFn<TValue, TOption, TPathKind> | undefined,\n ctx: FieldContext<TValue, TPathKind>,\n): TOption | undefined {\n return opt instanceof Function ? opt(ctx) : opt;\n}\n\n/**\n * Checks if the given value is considered empty. Empty values are: null, undefined, '', false, NaN.\n */\nexport function isEmpty(value: unknown): boolean {\n if (typeof value === 'number') {\n return isNaN(value);\n }\n return value === '' || value === false || value == null;\n}\n\n/**\n * Normalizes validation errors (which can be a single error, an array of errors, or undefined)\n * into a list of errors.\n */\nexport function normalizeErrors<T>(error: OneOrMany<T> | undefined): readonly T[] {\n if (error === undefined) {\n return [];\n }\n if (Array.isArray(error)) {\n return error as readonly T[];\n }\n return [error as T];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {\n FieldContext,\n FieldValidator,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `Validator` that returns the current validation errors.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validate<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<FieldValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncErrorRule((ctx) => {\n return addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree);\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {FormField} from '../../../directive/form_field_directive';\nimport type {FieldTree} from '../../types';\nimport type {StandardSchemaValidationError} from './standard_schema';\n\n/**\n * Options used to create a `ValidationError`.\n */\nexport interface ValidationErrorOptions {\n /** Human readable error message. */\n message?: string;\n}\n\n/**\n * A type that requires the given type `T` to have a `field` property.\n * @template T The type to add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithFieldTree<T> = T & {fieldTree: FieldTree<unknown>};\n/** @deprecated Use `WithFieldTree` instead */\nexport type WithField<T> = WithFieldTree<T>;\n\n/**\n * A type that allows the given type `T` to optionally have a `field` property.\n * @template T The type to optionally add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithOptionalFieldTree<T> = Omit<T, 'fieldTree'> & {fieldTree?: FieldTree<unknown>};\n/** @deprecated Use `WithOptionalFieldTree` instead */\nexport type WithOptionalField<T> = WithOptionalFieldTree<T>;\n\n/**\n * A type that ensures the given type `T` does not have a `field` property.\n * @template T The type to remove the `field` from.\n *\n * @experimental 21.0.0\n */\nexport type WithoutFieldTree<T> = T & {fieldTree: never};\n/** @deprecated Use `WithoutFieldTree` instead */\nexport type WithoutField<T> = WithoutFieldTree<T>;\n\n/**\n * Create a required error associated with the target field\n * @param options The validation error options\n *\n * @experimental 21.0.0\n */\nexport function requiredError(\n options: WithFieldTree<ValidationErrorOptions>,\n): RequiredValidationError;\n/**\n * Create a required error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithoutFieldTree<RequiredValidationError>;\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<RequiredValidationError> {\n return new RequiredValidationError(options);\n}\n\n/**\n * Create a min value error associated with the target field\n * @param min The min value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MinValidationError;\n/**\n * Create a min value error\n * @param min The min value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MinValidationError>;\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MinValidationError> {\n return new MinValidationError(min, options);\n}\n\n/**\n * Create a max value error associated with the target field\n * @param max The max value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MaxValidationError;\n/**\n * Create a max value error\n * @param max The max value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MaxValidationError>;\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MaxValidationError> {\n return new MaxValidationError(max, options);\n}\n\n/**\n * Create a minLength error associated with the target field\n * @param minLength The minLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MinLengthValidationError;\n/**\n * Create a minLength error\n * @param minLength The minLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MinLengthValidationError>;\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MinLengthValidationError> {\n return new MinLengthValidationError(minLength, options);\n}\n\n/**\n * Create a maxLength error associated with the target field\n * @param maxLength The maxLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MaxLengthValidationError;\n/**\n * Create a maxLength error\n * @param maxLength The maxLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MaxLengthValidationError>;\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MaxLengthValidationError> {\n return new MaxLengthValidationError(maxLength, options);\n}\n\n/**\n * Create a pattern matching error associated with the target field\n * @param pattern The violated pattern\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options: WithFieldTree<ValidationErrorOptions>,\n): PatternValidationError;\n/**\n * Create a pattern matching error\n * @param pattern The violated pattern\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<PatternValidationError>;\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<PatternValidationError> {\n return new PatternValidationError(pattern, options);\n}\n\n/**\n * Create an email format error associated with the target field\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(options: WithFieldTree<ValidationErrorOptions>): EmailValidationError;\n/**\n * Create an email format error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(\n options?: ValidationErrorOptions,\n): WithoutFieldTree<EmailValidationError>;\nexport function emailError(\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<EmailValidationError> {\n return new EmailValidationError(options);\n}\n\n/**\n * Common interface for all validation errors.\n *\n * This can be returned from validators.\n *\n * It's also used by the creation functions to create an instance\n * (e.g. `requiredError`, `minError`, etc.).\n *\n * @see [Signal Form Validation](guide/forms/signals/validation)\n * @see [Signal Form Validation Errors](guide/forms/signals/validation#validation-errors)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface ValidationError {\n /** Identifies the kind of error. */\n readonly kind: string;\n /** Human readable error message. */\n readonly message?: string;\n}\n\nexport declare namespace ValidationError {\n /**\n * Validation error with an associated field tree.\n *\n * This is returned from field state, e.g., catField.errors() would be of a list of errors with\n * `field: catField` bound to state.\n */\n export interface WithFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree: FieldTree<unknown>;\n readonly formField?: FormField<unknown>;\n }\n /** @deprecated Use `ValidationError.WithFieldTree` instead */\n export type WithField = WithFieldTree;\n\n /**\n * Validation error with an associated field tree and specific form field binding.\n */\n export interface WithFormField extends WithFieldTree {\n readonly formField: FormField<unknown>;\n }\n\n /**\n * Validation error with optional field.\n *\n * This is generally used in places where the result might have a field.\n * e.g., as a result of a `validateTree`, or when handling form submission.\n */\n export interface WithOptionalFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: FieldTree<unknown>;\n }\n /** @deprecated Use `ValidationError.WithOptionalFieldTree` instead */\n export type WithOptionalField = WithOptionalFieldTree;\n\n /**\n * Validation error with no field.\n *\n * This is used to strongly enforce that fields are not allowed in validation result.\n */\n export interface WithoutFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: never;\n readonly formField?: never;\n }\n /** @deprecated Use `ValidationError.WithoutFieldTree` instead */\n export type WithoutField = WithoutFieldTree;\n}\n\n/**\n * Internal version of `NgValidationError`, we create this separately so we can change its type on\n * the exported version to a type union of the possible sub-classes.\n *\n * @experimental 21.0.0\n */\nexport abstract class BaseNgValidationError implements ValidationError {\n /** Brand the class to avoid Typescript structural matching */\n private __brand = undefined;\n\n /** Identifies the kind of error. */\n readonly kind: string = '';\n\n /** The field associated with this error. */\n readonly fieldTree!: FieldTree<unknown>;\n\n /** Human readable error message. */\n readonly message?: string;\n\n constructor(options?: ValidationErrorOptions) {\n if (options) {\n Object.assign(this, options);\n }\n }\n}\n\n/**\n * An error used to indicate that a required field is empty.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class RequiredValidationError extends BaseNgValidationError {\n override readonly kind = 'required';\n}\n\n/**\n * An error used to indicate that a value is lower than the minimum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinValidationError extends BaseNgValidationError {\n override readonly kind = 'min';\n\n constructor(\n readonly min: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is higher than the maximum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxValidationError extends BaseNgValidationError {\n override readonly kind = 'max';\n\n constructor(\n readonly max: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is shorter than the minimum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinLengthValidationError extends BaseNgValidationError {\n override readonly kind = 'minLength';\n\n constructor(\n readonly minLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is longer than the maximum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxLengthValidationError extends BaseNgValidationError {\n override readonly kind = 'maxLength';\n\n constructor(\n readonly maxLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value does not match the required pattern.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class PatternValidationError extends BaseNgValidationError {\n override readonly kind = 'pattern';\n\n constructor(\n readonly pattern: RegExp,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is not a valid email.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class EmailValidationError extends BaseNgValidationError {\n override readonly kind = 'email';\n}\n\n/**\n * An error used to indicate that a value entered in a native input does not parse.\n *\n * @category validation\n * @experimental 21.2.0\n */\nexport class NativeInputParseError extends BaseNgValidationError {\n override readonly kind = 'parse';\n}\n\n/**\n * The base class for all built-in, non-custom errors. This class can be used to check if an error\n * is one of the standard kinds, allowing you to switch on the kind to further narrow the type.\n *\n * @example\n * ```ts\n * const f = form(...);\n * for (const e of form().errors()) {\n * if (e instanceof NgValidationError) {\n * switch(e.kind) {\n * case 'required':\n * console.log('This is required!');\n * break;\n * case 'min':\n * console.log(`Must be at least ${e.min}`);\n * break;\n * ...\n * }\n * }\n * }\n * ```\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport const NgValidationError: abstract new () => NgValidationError = BaseNgValidationError as any;\nexport type NgValidationError =\n | RequiredValidationError\n | MinValidationError\n | MaxValidationError\n | MinLengthValidationError\n | MaxLengthValidationError\n | PatternValidationError\n | EmailValidationError\n | StandardSchemaValidationError\n | NativeInputParseError;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {emailError} from './validation_errors';\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * Binds a validator to the given path that requires the value to match the standard email format.\n * This function can only be called on string paths.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.email()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Email Validation](guide/forms/signals/validation#email)\n * @category validation\n * @experimental 21.0.0\n */\nexport function email<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n if (!EMAIL_REGEXP.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return emailError({message: getOption(config?.message, ctx)});\n }\n }\n\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX, metadata} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {maxError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be less than or equal to the\n * given `maxValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MAX` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxValue The maximum value, or a LogicFn that returns the maximum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.max(maxValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function max<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<number | string | null, SchemaPathRules.Supported, TPathKind>,\n maxValue: number | LogicFn<number | string | null, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<number | string | null, TPathKind>,\n) {\n const MAX_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxValue === 'number' ? maxValue : maxValue(ctx),\n );\n metadata(path, MAX, ({state}) => state.metadata(MAX_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const max = ctx.state.metadata(MAX_MEMO)!();\n if (max === undefined || Number.isNaN(max)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue > max) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxError(max, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX_LENGTH, metadata} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {maxLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be less than or\n * equal to the given `maxLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MAX_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxLength The maximum length, or a LogicFn that returns the maximum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.maxLength(maxLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n maxLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MAX_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxLength === 'number' ? maxLength : maxLength(ctx),\n );\n metadata(path, MAX_LENGTH, ({state}) => state.metadata(MAX_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const maxLength = ctx.state.metadata(MAX_LENGTH_MEMO)!();\n if (maxLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) > maxLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxLengthError(maxLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {minError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be greater than or equal to\n * the given `minValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MIN` property to the field.\n *\n * @param path Path of the field to validate\n * @param minValue The minimum value, or a LogicFn that returns the minimum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.min(minValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function min<\n TValue extends number | string | null,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minValue: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minValue === 'number' ? minValue : minValue(ctx),\n );\n metadata(path, MIN, ({state}) => state.metadata(MIN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const min = ctx.state.metadata(MIN_MEMO)!();\n if (min === undefined || Number.isNaN(min)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue < min) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minError(min, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN_LENGTH} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {minLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be greater than or\n * equal to the given `minLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MIN_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param minLength The minimum length, or a LogicFn that returns the minimum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.minLength(minLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minLength === 'number' ? minLength : minLength(ctx),\n );\n metadata(path, MIN_LENGTH, ({state}) => state.metadata(MIN_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const minLength = ctx.state.metadata(MIN_LENGTH_MEMO)!();\n if (minLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) < minLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minLengthError(minLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, PATTERN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {patternError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to match a specific regex pattern.\n * This function can only be called on string paths.\n * In addition to binding a validator, this function adds `PATTERN` property to the field.\n *\n * @param path Path of the field to validate\n * @param pattern The RegExp pattern to match, or a LogicFn that returns the RegExp pattern.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.pattern(pattern)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Pattern Validation](guide/forms/signals/validation#pattern)\n * @category validation\n * @experimental 21.0.0\n */\nexport function pattern<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n pattern: RegExp | LogicFn<string | undefined, RegExp | undefined, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n const PATTERN_MEMO = metadata(path, createMetadataKey<RegExp | undefined>(), (ctx) =>\n pattern instanceof RegExp ? pattern : pattern(ctx),\n );\n metadata(path, PATTERN, ({state}) => state.metadata(PATTERN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const pattern = ctx.state.metadata(PATTERN_MEMO)!();\n if (pattern === undefined) {\n return undefined;\n }\n if (!pattern.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return patternError(pattern, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, REQUIRED} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {requiredError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be non-empty.\n * This function can only be called on any type of path.\n * In addition to binding a validator, this function adds `REQUIRED` property to the field.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `message`: A user-facing message for the error.\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.required()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * - `when`: A function that receives the `FieldContext` and returns true if the field is required\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Required Validation](guide/forms/signals/validation#required)\n * @category validation\n * @experimental 21.0.0\n */\nexport function required<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind> & {\n when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;\n },\n): void {\n const REQUIRED_MEMO = metadata(path, createMetadataKey<boolean>(), (ctx) =>\n config?.when ? config.when(ctx) : true,\n );\n metadata(path, REQUIRED, ({state}) => state.metadata(REQUIRED_MEMO)!()!);\n validate(path, (ctx) => {\n if (ctx.state.metadata(REQUIRED_MEMO)!() && isEmpty(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return requiredError({message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ResourceRef, Signal} from '@angular/core';\nimport {FieldNode} from '../../../field/node';\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport {\n FieldContext,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n TreeValidationResult,\n} from '../../types';\nimport {createManagedMetadataKey, metadata} from '../metadata';\n\n/**\n * A function that takes the result of an async operation and the current field context, and maps it\n * to a list of validation errors.\n *\n * @param result The result of the async operation.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the result of the async operation.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the async operation\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @experimental 21.0.0\n */\nexport type MapToErrorsFn<TValue, TResult, TPathKind extends PathKind = PathKind.Root> = (\n result: TResult,\n ctx: FieldContext<TValue, TPathKind>,\n) => TreeValidationResult;\n\n/**\n * Options that indicate how to create a resource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface AsyncValidatorOptions<\n TValue,\n TParams,\n TResult,\n TPathKind extends PathKind = PathKind.Root,\n> {\n /**\n * A function that receives the field context and returns the params for the resource.\n *\n * @param ctx The field context for the field being validated.\n * @returns The params for the resource.\n */\n readonly params: (ctx: FieldContext<TValue, TPathKind>) => TParams;\n\n /**\n * A function that receives the resource params and returns a resource of the given params.\n * The given params should be used as is to create the resource.\n * The forms system will report the params as `undefined` when this validation doesn't need to be run.\n *\n * @param params The params to use for constructing the resource\n * @returns A reference to the constructed resource.\n */\n readonly factory: (params: Signal<TParams | undefined>) => ResourceRef<TResult | undefined>;\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * A function that takes the resource result, and the current field context and maps it to a list\n * of validation errors.\n *\n * @param result The resource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the resource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on a resource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The async validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateAsync<TValue, TParams, TResult, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: AsyncValidatorOptions<TValue, TParams, TResult, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n\n const RESOURCE = createManagedMetadataKey<ReturnType<typeof opts.factory>, TParams | undefined>(\n opts.factory,\n );\n metadata(path, RESOURCE, (ctx) => {\n const node = ctx.stateOf(path) as FieldNode;\n const validationState = node.validationState;\n if (validationState.shouldSkipValidation() || !validationState.syncValid()) {\n return undefined;\n }\n return opts.params(ctx);\n });\n\n pathNode.builder.addAsyncErrorRule((ctx) => {\n const res = ctx.state.metadata(RESOURCE)!;\n let errors;\n switch (res.status()) {\n case 'idle':\n return undefined;\n case 'loading':\n case 'reloading':\n return 'pending';\n case 'resolved':\n case 'local':\n if (!res.hasValue()) {\n return undefined;\n }\n errors = opts.onSuccess(res.value()!, ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n case 'error':\n errors = opts.onError(res.error(), ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n }\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {FieldContext, PathKind, SchemaPath, SchemaPathRules, TreeValidator} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field or any of its child fields has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `TreeValidator` that returns the current validation errors.\n * Errors returned by the validator may specify a target field to indicate an error on a child field.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validateTree<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<TreeValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncTreeErrorRule((ctx) =>\n addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {resource, ɵisPromise} from '@angular/core';\nimport type {StandardSchemaV1} from '@standard-schema/spec';\nimport {addDefaultField} from '../../../field/validation';\nimport type {FieldTree, LogicFn, SchemaPath, SchemaPathTree} from '../../types';\nimport {createMetadataKey, metadata} from '../metadata';\nimport {validateAsync} from './validate_async';\nimport {validateTree} from './validate_tree';\nimport {\n BaseNgValidationError,\n type ValidationErrorOptions,\n type WithFieldTree,\n type WithOptionalFieldTree,\n type WithoutFieldTree,\n} from './validation_errors';\n\n/**\n * Utility type that removes a string index key when its value is `unknown`,\n * i.e. `{[key: string]: unknown}`. It allows specific string keys to pass through, even if their\n * value is `unknown`, e.g. `{key: unknown}`.\n *\n * @experimental 21.0.0\n */\nexport type RemoveStringIndexUnknownKey<K, V> = string extends K\n ? unknown extends V\n ? never\n : K\n : K;\n\n/**\n * Utility type that recursively ignores unknown string index properties on the given object.\n * We use this on the `TSchema` type in `validateStandardSchema` in order to accommodate Zod's\n * `looseObject` which includes `{[key: string]: unknown}` as part of the type.\n *\n * @experimental 21.0.0\n */\nexport type IgnoreUnknownProperties<T> =\n T extends Record<PropertyKey, unknown>\n ? {\n [K in keyof T as RemoveStringIndexUnknownKey<K, T[K]>]: IgnoreUnknownProperties<T[K]>;\n }\n : T;\n\n/**\n * Validates a field using a `StandardSchemaV1` compatible validator (e.g. a Zod validator).\n *\n * See https://github.com/standard-schema/standard-schema for more about standard schema.\n *\n * @param path The `FieldPath` to the field to validate.\n * @param schema The standard schema compatible validator to use for validation, or a LogicFn that returns the schema.\n * @template TSchema The type validated by the schema. This may be either the full `TValue` type,\n * or a partial of it.\n * @template TValue The type of value stored in the field being validated.\n *\n * @see [Signal Form Schema Validation](guide/forms/signals/validation#integration-with-schema-validation-libraries)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateStandardSchema<TSchema, TModel extends IgnoreUnknownProperties<TSchema>>(\n path: SchemaPath<TModel> & SchemaPathTree<TModel>,\n schema: StandardSchemaV1<TSchema> | LogicFn<TModel, StandardSchemaV1<unknown> | undefined>,\n) {\n // We create both a sync and async validator because the standard schema validator can return\n // either a sync result or a Promise, and we need to handle both cases. The sync validator\n // handles the sync result, and the async validator handles the Promise.\n // We memoize the result of the validation function here, so that it is only run once for both\n // validators, it can then be passed through both sync & async validation.\n type Result = StandardSchemaV1.Result<TSchema> | Promise<StandardSchemaV1.Result<TSchema>>;\n const VALIDATOR_MEMO = metadata(\n path as SchemaPath<TModel>,\n createMetadataKey<Result | undefined>(),\n (ctx) => {\n const resolvedSchema = typeof schema === 'function' ? schema(ctx) : schema;\n return resolvedSchema\n ? (resolvedSchema['~standard'].validate(ctx.value()) as Result)\n : undefined;\n },\n );\n\n validateTree<TModel>(path, ({state, fieldTreeOf}) => {\n // Skip sync validation if the result is a Promise or undefined.\n const result = state.metadata(VALIDATOR_MEMO)!();\n if (!result || ɵisPromise(result)) {\n return [];\n }\n return (\n result?.issues?.map((issue) =>\n standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue),\n ) ?? []\n );\n });\n\n validateAsync<\n TModel,\n Promise<StandardSchemaV1.Result<TSchema>> | undefined,\n readonly StandardSchemaV1.Issue[]\n >(path, {\n params: ({state}) => {\n // Skip async validation if the result is *not* a Promise.\n const result = state.metadata(VALIDATOR_MEMO)!();\n return result && ɵisPromise(result) ? result : undefined;\n },\n factory: (params) => {\n return resource({\n params,\n loader: async ({params}) => (await params)?.issues ?? [],\n });\n },\n onSuccess: (issues, {fieldTreeOf}) => {\n return issues.map((issue) => standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue));\n },\n onError: () => {},\n });\n}\n\n/**\n * Create a standard schema issue error associated with the target field\n * @param issue The standard schema issue\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options: WithFieldTree<ValidationErrorOptions>,\n): StandardSchemaValidationError;\n/**\n * Create a standard schema issue error\n * @param issue The standard schema issue\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<StandardSchemaValidationError>;\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<StandardSchemaValidationError> {\n return new StandardSchemaValidationError(issue, options);\n}\n\n/**\n * Converts a `StandardSchemaV1.Issue` to a `FormTreeError`.\n *\n * @param fieldTree The root field to which the issue's path is relative.\n * @param issue The `StandardSchemaV1.Issue` to convert.\n * @returns A `ValidationError` representing the issue.\n */\nfunction standardIssueToFormTreeError(\n fieldTree: FieldTree<unknown>,\n issue: StandardSchemaV1.Issue,\n): StandardSchemaValidationError {\n let target = fieldTree as FieldTree<Record<PropertyKey, unknown>>;\n for (const pathPart of issue.path ?? []) {\n const pathKey = typeof pathPart === 'object' ? pathPart.key : pathPart;\n target = target[pathKey] as FieldTree<Record<PropertyKey, unknown>>;\n }\n return addDefaultField(standardSchemaError(issue, {message: issue.message}), target);\n}\n\n/**\n * An error used to indicate an issue validating against a standard schema.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class StandardSchemaValidationError extends BaseNgValidationError {\n override readonly kind = 'standardSchema';\n\n constructor(\n readonly issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {httpResource, HttpResourceOptions, HttpResourceRequest} from '@angular/common/http';\nimport {Signal} from '@angular/core';\nimport {\n FieldContext,\n SchemaPath,\n PathKind,\n TreeValidationResult,\n SchemaPathRules,\n} from '../../types';\nimport {MapToErrorsFn, validateAsync} from './validate_async';\n\n/**\n * Options that indicate how to create an httpResource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport interface HttpValidatorOptions<TValue, TResult, TPathKind extends PathKind = PathKind.Root> {\n /**\n * A function that receives the field context and returns the url or request for the httpResource.\n * If given a URL, the underlying httpResource will perform an HTTP GET on it.\n *\n * @param ctx The field context for the field being validated.\n * @returns The URL or request for creating the httpResource.\n */\n readonly request:\n | ((ctx: FieldContext<TValue, TPathKind>) => string | undefined)\n | ((ctx: FieldContext<TValue, TPathKind>) => HttpResourceRequest | undefined);\n\n /**\n * A function that takes the httpResource result, and the current field context and maps it to a\n * list of validation errors.\n *\n * @param result The httpResource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the httpResource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * The options to use when creating the httpResource.\n */\n readonly options?: HttpResourceOptions<TResult, unknown>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on an httpResource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The http validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateHttp<TValue, TResult = unknown, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: HttpValidatorOptions<TValue, TResult, TPathKind>,\n) {\n validateAsync(path, {\n params: opts.request,\n factory: (request: Signal<any>) => httpResource(request, opts.options),\n onSuccess: opts.onSuccess,\n onError: opts.onError,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DEBOUNCER} from '../../field/debounce';\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {Debouncer, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Configures the frequency at which a form field is updated by UI events.\n *\n * When this rule is applied, updates from the UI to the form model will be delayed until either\n * the field is touched, or the most recently debounced update resolves.\n *\n * @param path The target path to debounce.\n * @param durationOrDebouncer Either a debounce duration in milliseconds, or a custom\n * {@link Debouncer} function.\n *\n * @experimental 21.0.0\n */\nexport function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n durationOrDebouncer: number | Debouncer<TValue, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n const debouncer =\n typeof durationOrDebouncer === 'function'\n ? durationOrDebouncer\n : durationOrDebouncer > 0\n ? debounceForDuration(durationOrDebouncer)\n : immediate;\n pathNode.builder.addMetadataRule(DEBOUNCER, () => debouncer);\n}\n\nfunction debounceForDuration(durationInMilliseconds: number): Debouncer<unknown> {\n return (_context, abortSignal) => {\n return new Promise((resolve) => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const onAbort = () => {\n clearTimeout(timeoutId);\n resolve();\n };\n\n timeoutId = setTimeout(() => {\n abortSignal.removeEventListener('abort', onAbort);\n resolve();\n }, durationInMilliseconds);\n\n abortSignal.addEventListener('abort', onAbort, {once: true});\n });\n };\n}\n\nfunction immediate() {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken, type Signal, type WritableSignal} from '@angular/core';\nimport type {ValidationError} from '../api/rules';\n\n/**\n * DI token that provides a writable signal that controls can use to set the signal of parse errors\n * for the `FormField` directive. Used internally by `transformedValue`.\n *\n * @experimental 21.2.0\n */\nexport const FORM_FIELD_PARSE_ERRORS = new InjectionToken<\n WritableSignal<Signal<readonly ValidationError.WithoutFieldTree[]> | undefined>\n>(typeof ngDevMode !== 'undefined' && ngDevMode ? 'FORM_FIELD_PARSE_ERRORS' : '');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Signal, linkedSignal} from '@angular/core';\nimport type {ValidationError} from '../api/rules';\nimport {normalizeErrors} from '../api/rules/validation/util';\nimport type {ParseResult} from '../api/transformed_value';\n\n/**\n * An object that handles parsing raw UI values into model values.\n */\nexport interface Parser<TRaw> {\n /**\n * Errors encountered during the last parse attempt.\n */\n errors: Signal<readonly ValidationError.WithoutFieldTree[]>;\n /**\n * Parses the given raw value and updates the underlying model value if successful.\n */\n setRawValue: (rawValue: TRaw) => void;\n}\n\n/**\n * Creates a {@link Parser} that synchronizes a raw value with an underlying model value.\n *\n * @param getValue Function to get the current model value.\n * @param setValue Function to update the model value.\n * @param parse Function to parse the raw value into a {@link ParseResult}.\n * @returns A {@link Parser} instance.\n */\nexport function createParser<TValue, TRaw>(\n getValue: () => TValue,\n setValue: (value: TValue) => void,\n parse: (raw: TRaw) => ParseResult<TValue>,\n): Parser<TRaw> {\n const errors = linkedSignal({\n source: getValue,\n computation: () => [] as readonly ValidationError.WithoutFieldTree[],\n });\n\n const setRawValue = (rawValue: TRaw) => {\n const result = parse(rawValue);\n errors.set(normalizeErrors(result.error));\n if (result.value !== undefined) {\n setValue(result.value);\n }\n // `errors` is a linked signal sourced from the model value; write parse errors after\n // model updates so `{value, errors}` results do not get reset by the recomputation.\n errors.set(normalizeErrors(result.error));\n };\n\n return {errors: errors.asReadonly(), setRawValue};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n inject,\n linkedSignal,\n type ModelSignal,\n type Signal,\n type WritableSignal,\n} from '@angular/core';\nimport {FORM_FIELD_PARSE_ERRORS} from '../directive/parse_errors';\nimport {createParser} from '../util/parser';\nimport type {ValidationError} from './rules';\nimport type {OneOrMany} from './types';\n\n/**\n * Result of parsing a raw value into a model value.\n */\nexport interface ParseResult<TValue> {\n /**\n * The parsed value. If omitted, the model is not updated.\n */\n readonly value?: TValue;\n /**\n * Errors encountered during parsing, if any.\n */\n readonly error?: OneOrMany<ValidationError.WithoutFieldTree>;\n}\n\n/**\n * Options for `transformedValue`.\n *\n * @experimental 21.2.0\n */\nexport interface TransformedValueOptions<TValue, TRaw> {\n /**\n * Parse the raw value into the model value.\n *\n * Should return an object containing the parsed result, which may contain:\n * - `value`: The parsed model value. If `undefined`, the model will not be updated.\n * - `error`: Any parse errors encountered. If `undefined`, no errors are reported.\n */\n parse: (rawValue: TRaw) => ParseResult<TValue>;\n\n /**\n * Format the model value into the raw value.\n */\n format: (value: TValue) => TRaw;\n}\n\n/**\n * A writable signal representing a \"raw\" UI value that is synchronized with a model signal\n * via parse/format transformations.\n *\n * @category control\n * @experimental 21.2.0\n */\nexport interface TransformedValueSignal<TRaw> extends WritableSignal<TRaw> {\n /**\n * The current parse errors resulting from the last transformation.\n */\n readonly parseErrors: Signal<readonly ValidationError.WithoutFieldTree[]>;\n}\n\n/**\n * Creates a writable signal representing a \"raw\" UI value that is transformed to/from a model\n * value via `parse` and `format` functions.\n *\n * This utility simplifies the creation of custom form controls that parse a user-facing value\n * representation into an underlying model value. For example, a numeric input that displays and\n * accepts string values but stores a number.\n *\n * Parse errors are exposed via the returned signal’s `parseErrors()` property.\n * When `transformedValue` is used within a Signal Forms field context, parse errors are also\n * reported to the nearest field automatically. When no field context is present, no automatic\n * reporting occurs and `parseErrors` can be consumed directly.\n *\n * Note: `parse` may return both a `value` and an `error`. Returning `value` updates the model;\n * omitting it leaves the model unchanged.\n *\n * @param value The model signal to synchronize with.\n * @param options Configuration including `parse` and `format` functions.\n * @returns A `TransformedValueSignal` representing the raw value with parse error tracking.\n * @experimental 21.2.0\n *\n * @example\n * ```ts\n * @Component({\n * selector: 'number-input',\n * template: `<input [value]=\"rawValue()\" (input)=\"rawValue.set($event.target.value)\" />`,\n * })\n * export class NumberInput implements FormValueControl<number | null> {\n * readonly value = model.required<number | null>();\n *\n * protected readonly rawValue = transformedValue(this.value, {\n * parse: (val) => {\n * if (val === '') return {value: null};\n * const num = Number(val);\n * if (Number.isNaN(num)) {\n * return {error: {kind: 'parse', message: `${val} is not numeric`}};\n * }\n * return {value: num};\n * },\n * format: (val) => val?.toString() ?? '',\n * });\n * }\n * ```\n */\nexport function transformedValue<TValue, TRaw>(\n value: ModelSignal<TValue>,\n options: TransformedValueOptions<TValue, TRaw>,\n): TransformedValueSignal<TRaw> {\n const {parse, format} = options;\n const parser = createParser(value, value.set, parse);\n\n // Wire up the parse errors from the parser to the form field.\n const formFieldParseErrors = inject(FORM_FIELD_PARSE_ERRORS, {self: true, optional: true});\n if (formFieldParseErrors) {\n formFieldParseErrors.set(parser.errors);\n }\n\n // Create the result signal with overridden set/update and a `parseErrors` property.\n const rawValue = linkedSignal(() => format(value()));\n const result = rawValue as WritableSignal<TRaw> & {\n parseErrors: Signal<readonly ValidationError.WithoutFieldTree[]>;\n };\n result.parseErrors = parser.errors;\n const originalSet = result.set.bind(result);\n\n // Notify the parser when `set` or `update` is called on the raw value\n result.set = (newRawValue: TRaw) => {\n parser.setRawValue(newRawValue);\n originalSet(newRawValue);\n };\n result.update = (updateFn: (value: TRaw) => TRaw) => {\n result.set(updateFn(rawValue()));\n };\n\n return result;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {RuntimeErrorCode} from '../errors';\nimport {signalErrorsToValidationErrors} from '../compat/validation_errors';\n\nimport {\n ControlValueAccessor,\n Validators,\n type AbstractControl,\n type FormControlStatus,\n type ValidationErrors,\n type ValidatorFn,\n} from '@angular/forms';\nimport type {FieldState} from '../api/types';\n\n// TODO: Also consider supporting (if possible):\n// - hasError\n// - getError\n// - reset\n// - name\n// - path\n// - markAs[Touched,Dirty,etc.]\n\n/**\n * Represents a combination of `NgControl` and `AbstractControl`.\n *\n * Note: We have this separate interface, rather than implementing the relevant parts of the two\n * controls with something like `InteropNgControl implements Pick<NgControl, ...>, Pick<AbstractControl, ...>`\n * because it confuses the internal JS minifier which can cause collisions in field names.\n */\ninterface CombinedControl {\n value: any;\n valid: boolean;\n invalid: boolean;\n touched: boolean;\n untouched: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: ValidationErrors | null;\n pristine: boolean;\n dirty: boolean;\n status: FormControlStatus;\n control: AbstractControl<any, any>;\n valueAccessor: ControlValueAccessor | null;\n hasValidator(validator: ValidatorFn): boolean;\n updateValueAndValidity(): void;\n}\n\n/**\n * A fake version of `NgControl` provided by the `Field` directive. This allows interoperability\n * with a wider range of components designed to work with reactive forms, in particular ones that\n * inject the `NgControl`. The interop control does not implement *all* properties and methods of\n * the real `NgControl`, but does implement some of the most commonly used ones that have a clear\n * equivalent in signal forms.\n */\nexport class InteropNgControl implements CombinedControl {\n constructor(protected field: () => FieldState<unknown>) {}\n\n readonly control: AbstractControl<any, any> = this as unknown as AbstractControl<any, any>;\n\n get value(): any {\n return this.field().value();\n }\n\n get valid(): boolean {\n return this.field().valid();\n }\n\n get invalid(): boolean {\n return this.field().invalid();\n }\n\n get pending(): boolean | null {\n return this.field().pending();\n }\n\n get disabled(): boolean {\n return this.field().disabled();\n }\n\n get enabled(): boolean {\n return !this.field().disabled();\n }\n\n get errors(): ValidationErrors | null {\n return signalErrorsToValidationErrors(this.field().errors());\n }\n\n get pristine(): boolean {\n return !this.field().dirty();\n }\n\n get dirty(): boolean {\n return this.field().dirty();\n }\n\n get touched(): boolean {\n return this.field().touched();\n }\n\n get untouched(): boolean {\n return !this.field().touched();\n }\n\n get status(): FormControlStatus {\n if (this.field().disabled()) {\n return 'DISABLED';\n }\n if (this.field().valid()) {\n return 'VALID';\n }\n if (this.field().invalid()) {\n return 'INVALID';\n }\n if (this.field().pending()) {\n return 'PENDING';\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNKNOWN_STATUS,\n ngDevMode && 'Unknown form control status',\n );\n }\n\n valueAccessor: ControlValueAccessor | null = null;\n\n hasValidator(validator: ValidatorFn): boolean {\n // This addresses a common case where users look for the presence of `Validators.required` to\n // determine whether or not to show a required \"*\" indicator in the UI.\n if (validator === Validators.required) {\n return this.field().required();\n }\n return false;\n }\n\n updateValueAndValidity() {\n // No-op since value and validity are always up to date in signal forms.\n // We offer this method so that reactive forms code attempting to call it doesn't error.\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {FieldState} from '../api/types';\n\n/**\n * Branded type for the public name of an input we bind on control components or DOM elements.\n */\nexport type ControlBindingKey = string & {__brand: 'ControlBindingKey'};\n\n/**\n * A map of field state properties to control binding name.\n *\n * This excludes `controlValue` whose corresponding control binding name differs between control\n * types.\n *\n * The control binding name can be used for inputs or attributes (since DOM attributes are case\n * insensitive).\n */\nconst FIELD_STATE_KEY_TO_CONTROL_BINDING = {\n disabled: 'disabled' as ControlBindingKey,\n disabledReasons: 'disabledReasons' as ControlBindingKey,\n dirty: 'dirty' as ControlBindingKey,\n errors: 'errors' as ControlBindingKey,\n hidden: 'hidden' as ControlBindingKey,\n invalid: 'invalid' as ControlBindingKey,\n max: 'max' as ControlBindingKey,\n maxLength: 'maxLength' as ControlBindingKey,\n min: 'min' as ControlBindingKey,\n minLength: 'minLength' as ControlBindingKey,\n name: 'name' as ControlBindingKey,\n pattern: 'pattern' as ControlBindingKey,\n pending: 'pending' as ControlBindingKey,\n readonly: 'readonly' as ControlBindingKey,\n required: 'required' as ControlBindingKey,\n touched: 'touched' as ControlBindingKey,\n} as const satisfies {[K in keyof FieldState<unknown>]?: ControlBindingKey};\n\n/**\n * Inverts `FIELD_STATE_KEY_TO_CONTROL_BINDING` to look up the minified name of the corresponding\n * field state property from its control binding name.\n */\nconst CONTROL_BINDING_TO_FIELD_STATE_KEY = /* @__PURE__ */ (() => {\n const map = {} as Record<ControlBindingKey, keyof typeof FIELD_STATE_KEY_TO_CONTROL_BINDING>;\n for (const key of Object.keys(FIELD_STATE_KEY_TO_CONTROL_BINDING) as Array<\n keyof typeof FIELD_STATE_KEY_TO_CONTROL_BINDING\n >) {\n map[FIELD_STATE_KEY_TO_CONTROL_BINDING[key]] = key;\n }\n return map;\n})();\n\nexport function readFieldStateBindingValue(\n fieldState: FieldState<unknown>,\n key: ControlBindingKey,\n): unknown {\n const property = CONTROL_BINDING_TO_FIELD_STATE_KEY[key];\n return fieldState[property]?.();\n}\n\n/** The keys of {@link FIELD_STATE_KEY_TO_CONTROL_BINDING} */\nexport const CONTROL_BINDING_NAMES = /* @__PURE__ */ (() =>\n Object.values(FIELD_STATE_KEY_TO_CONTROL_BINDING))() as Array<ControlBindingKey>;\n\nexport function createBindings<TKey extends string>(): {[K in TKey]?: unknown} {\n return {};\n}\n\nexport function bindingUpdated<TKey extends string>(\n bindings: {[K in TKey]?: unknown},\n key: TKey,\n value: unknown,\n) {\n if (bindings[key] !== value) {\n bindings[key] = value;\n return true;\n }\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Renderer2, untracked} from '@angular/core';\nimport {NativeInputParseError, WithoutFieldTree} from '../api/rules';\nimport type {ParseResult} from '../api/transformed_value';\n\n/**\n * Supported native control element types.\n *\n * The `type` property of a {@link HTMLTextAreaElement} should always be 'textarea', but the\n * TypeScript DOM API type definition lacks this detail, so we include it here.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/type\n */\nexport type NativeFormControl =\n | HTMLInputElement\n | HTMLSelectElement\n | (HTMLTextAreaElement & {type: 'textarea'});\n\nexport function isNativeFormElement(element: HTMLElement): element is NativeFormControl {\n return (\n element.tagName === 'INPUT' || element.tagName === 'SELECT' || element.tagName === 'TEXTAREA'\n );\n}\n\nexport function isNumericFormElement(element: HTMLElement): boolean {\n if (element.tagName !== 'INPUT') {\n return false;\n }\n\n const type = (element as HTMLInputElement).type;\n return (\n type === 'date' ||\n type === 'datetime-local' ||\n type === 'month' ||\n type === 'number' ||\n type === 'range' ||\n type === 'time' ||\n type === 'week'\n );\n}\n\nexport function isTextualFormElement(element: HTMLElement): boolean {\n return element.tagName === 'INPUT' || element.tagName === 'TEXTAREA';\n}\n\n/**\n * Returns the value from a native control element.\n *\n * @param element The native control element.\n * @param currentValue A function that returns the current value from the control's corresponding\n * field state.\n *\n * The type of the returned value depends on the `type` property of the control, and will attempt to\n * match the current value's type. For example, the value of `<input type=\"number\">` can be read as\n * a `string` or a `number`. If the current value is a `number`, then this will return a `number`.\n * Otherwise, this will return the value as a `string`.\n */\nexport function getNativeControlValue(\n element: NativeFormControl,\n currentValue: () => unknown,\n): ParseResult<unknown> {\n let modelValue: unknown;\n\n if (element.validity.badInput) {\n return {\n error: new NativeInputParseError() as WithoutFieldTree<NativeInputParseError>,\n };\n }\n\n // Special cases for specific input types.\n switch (element.type) {\n case 'checkbox':\n return {value: element.checked};\n case 'number':\n case 'range':\n case 'datetime-local':\n // We can read a `number` or a `string` from this input type. Prefer whichever is consistent\n // with the current type.\n modelValue = untracked(currentValue);\n if (typeof modelValue === 'number' || modelValue === null) {\n return {value: element.value === '' ? null : element.valueAsNumber};\n }\n break;\n case 'date':\n case 'month':\n case 'time':\n case 'week':\n // We can read a `Date | null`, `number`, or `string` from this input type. Prefer whichever\n // is consistent with the current type.\n modelValue = untracked(currentValue);\n if (modelValue === null || modelValue instanceof Date) {\n return {value: element.valueAsDate};\n } else if (typeof modelValue === 'number') {\n return {value: element.valueAsNumber};\n }\n break;\n }\n\n // Default to reading the value as a string.\n return {value: element.value};\n}\n\n/**\n * Sets a native control element's value.\n *\n * @param element The native control element.\n * @param value The new value to set.\n */\nexport function setNativeControlValue(element: NativeFormControl, value: unknown) {\n // Special cases for specific input types.\n switch (element.type) {\n case 'checkbox':\n element.checked = value as boolean;\n return;\n case 'radio':\n // Although HTML behavior is to clear the input already, we do this just in case. It seems\n // like it might be necessary in certain environments (e.g. Domino).\n element.checked = value === element.value;\n return;\n case 'number':\n case 'range':\n case 'datetime-local':\n // This input type can receive a `number` or a `string`.\n if (typeof value === 'number') {\n setNativeNumberControlValue(element, value);\n return;\n } else if (value === null) {\n element.value = '';\n return;\n }\n break;\n case 'date':\n case 'month':\n case 'time':\n case 'week':\n // This input type can receive a `Date | null` or a `number` or a `string`.\n if (value === null || value instanceof Date) {\n element.valueAsDate = value;\n return;\n } else if (typeof value === 'number') {\n setNativeNumberControlValue(element, value);\n return;\n }\n }\n\n // Default to setting the value as a string.\n element.value = value as string;\n}\n\n/** Writes a value to a native <input type=\"number\">. */\nexport function setNativeNumberControlValue(element: HTMLInputElement, value: number) {\n // Writing `NaN` causes a warning in the console, so we instead write `''`.\n // This allows the user to safely use `NaN` as a number value that means \"clear the input\".\n if (isNaN(value)) {\n element.value = '';\n } else {\n element.valueAsNumber = value;\n }\n}\n\n/**\n * Updates the native DOM property on the given node.\n *\n * @param key The control binding key (identifies the property type, e.g. disabled, required).\n * @param name The DOM attribute/property name.\n * @param value The new value for the property.\n */\nexport function setNativeDomProperty(\n renderer: Renderer2,\n element: NativeFormControl,\n name: 'name' | 'disabled' | 'required' | 'readonly' | 'min' | 'max' | 'minLength' | 'maxLength',\n value: string | number | undefined,\n) {\n switch (name) {\n case 'name':\n renderer.setAttribute(element, name, value as string);\n break;\n case 'disabled':\n case 'readonly':\n case 'required':\n if (value) {\n renderer.setAttribute(element, name, '');\n } else {\n renderer.removeAttribute(element, name);\n }\n break;\n case 'max':\n case 'min':\n case 'minLength':\n case 'maxLength':\n if (value !== undefined) {\n renderer.setAttribute(element, name, value.toString());\n } else {\n renderer.removeAttribute(element, name);\n }\n break;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ɵControlDirectiveHost as ControlDirectiveHost} from '@angular/core';\nimport type {FormField} from './form_field_directive';\nimport {\n bindingUpdated,\n CONTROL_BINDING_NAMES,\n type ControlBindingKey,\n createBindings,\n readFieldStateBindingValue,\n} from './bindings';\nimport {setNativeDomProperty} from './native';\nimport {FormUiControl} from '../api/control';\n\nexport function customControlCreate(\n host: ControlDirectiveHost,\n parent: FormField<unknown>,\n): () => void {\n host.listenToCustomControlModel((value) => parent.state().controlValue.set(value));\n host.listenToCustomControlOutput('touchedChange', () => parent.state().markAsTouched());\n\n parent.registerAsBinding(host.customControl as FormUiControl);\n\n const bindings = createBindings<ControlBindingKey | 'controlValue'>();\n return () => {\n const state = parent.state();\n // Bind custom form control model ('value' or 'checked').\n const controlValue = state.controlValue();\n if (bindingUpdated(bindings, 'controlValue', controlValue)) {\n host.setCustomControlModelInput(controlValue);\n }\n\n // Bind remaining field state properties.\n for (const name of CONTROL_BINDING_NAMES) {\n let value: unknown;\n if (name === 'errors') {\n value = parent.errors();\n } else {\n value = readFieldStateBindingValue(state, name);\n }\n if (bindingUpdated(bindings, name, value)) {\n host.setInputOnDirectives(name, value);\n\n // If the host node is a native control, we can bind field state properties to native\n // properties for any that weren't defined as inputs on the custom control.\n if (parent.elementAcceptsNativeProperty(name) && !host.customControlHasInput(name)) {\n setNativeDomProperty(\n parent.renderer,\n parent.nativeFormElement!,\n name,\n value as string | number | undefined,\n );\n }\n }\n }\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {untracked, type ɵControlDirectiveHost as ControlDirectiveHost} from '@angular/core';\nimport {\n bindingUpdated,\n CONTROL_BINDING_NAMES,\n type ControlBindingKey,\n createBindings,\n readFieldStateBindingValue,\n} from './bindings';\nimport {setNativeDomProperty} from './native';\nimport type {FormField} from './form_field_directive';\n\nexport function cvaControlCreate(\n host: ControlDirectiveHost,\n parent: FormField<unknown>,\n): () => void {\n parent.controlValueAccessor!.registerOnChange((value: unknown) =>\n parent.state().controlValue.set(value as any),\n );\n parent.controlValueAccessor!.registerOnTouched(() => parent.state().markAsTouched());\n parent.registerAsBinding();\n\n const bindings = createBindings<ControlBindingKey | 'controlValue'>();\n return () => {\n const fieldState = parent.state();\n const value = fieldState.value();\n if (bindingUpdated(bindings, 'controlValue', value)) {\n // We don't know if the interop control has underlying signals, so we must use `untracked` to\n // prevent writing to a signal in a reactive context.\n untracked(() => parent.controlValueAccessor!.writeValue(value));\n }\n\n for (const name of CONTROL_BINDING_NAMES) {\n const value = readFieldStateBindingValue(fieldState, name);\n if (bindingUpdated(bindings, name, value)) {\n const propertyWasSet = host.setInputOnDirectives(name, value);\n if (name === 'disabled' && parent.controlValueAccessor!.setDisabledState) {\n untracked(() => parent.controlValueAccessor!.setDisabledState!(value as boolean));\n } else if (!propertyWasSet && parent.elementAcceptsNativeProperty(name)) {\n // Fall back to native DOM properties.\n setNativeDomProperty(\n parent.renderer,\n parent.nativeFormElement,\n name,\n value as string | number | undefined,\n );\n }\n }\n }\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {DestroyRef} from '@angular/core';\n\n/**\n * Creates a `MutationObserver` to observe changes to the available `<option>`s for this select.\n *\n * @param select The native `<select>` element to observe.\n * @param lView The `LView` that contains the native form control.\n * @param tNode The `TNode` of the native form control.\n * @return The newly created `MutationObserver`.\n */\nexport function observeSelectMutations(\n select: HTMLSelectElement,\n onMutation: () => void,\n destroyRef: DestroyRef,\n): void {\n if (typeof MutationObserver !== 'function') {\n // Observing mutations is best-effort.\n return;\n }\n\n const observer = new MutationObserver((mutations) => {\n if (mutations.some((m) => isRelevantSelectMutation(m))) {\n onMutation();\n }\n });\n observer.observe(select, {\n attributes: true,\n attributeFilter: ['value'],\n // We watch the character data, because an `<option>` with no explicit `value` property set uses\n // its text content as its value.\n // (See https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/value)\n characterData: true,\n childList: true,\n subtree: true,\n });\n destroyRef.onDestroy(() => observer.disconnect());\n}\n\n/**\n * Checks if a given mutation record is relevant for resyncing a <select>.\n * In general its relevant if:\n * - Non comment content of the select changed\n * - The value attribute of an option changed.\n */\nfunction isRelevantSelectMutation(mutation: MutationRecord) {\n // Consider changes that may add / remove options, or change their text content.\n if (mutation.type === 'childList' || mutation.type === 'characterData') {\n // If the target element is a comment it's not relevant.\n if (mutation.target instanceof Comment) {\n return false;\n }\n // Otherwise if any non-comment nodes were added / removed it is relevant.\n for (const node of mutation.addedNodes) {\n if (!(node instanceof Comment)) {\n return true;\n }\n }\n for (const node of mutation.removedNodes) {\n if (!(node instanceof Comment)) {\n return true;\n }\n }\n // Otherwise it's not relevant.\n return false;\n }\n // If the value attribute of an option changed, it's relevant.\n if (mutation.type === 'attributes' && mutation.target instanceof HTMLOptionElement) {\n return true;\n }\n // Everything else is not relevant.\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {\n type ɵControlDirectiveHost as ControlDirectiveHost,\n type Signal,\n type WritableSignal,\n} from '@angular/core';\nimport type {ValidationError} from '../api/rules';\nimport {createParser} from '../util/parser';\nimport {\n bindingUpdated,\n CONTROL_BINDING_NAMES,\n createBindings,\n readFieldStateBindingValue,\n type ControlBindingKey,\n} from './bindings';\nimport type {FormField} from './form_field_directive';\nimport {getNativeControlValue, setNativeControlValue, setNativeDomProperty} from './native';\nimport {observeSelectMutations} from './select';\n\nexport function nativeControlCreate(\n host: ControlDirectiveHost,\n parent: FormField<unknown>,\n parseErrorsSource: WritableSignal<\n Signal<readonly ValidationError.WithoutFieldTree[]> | undefined\n >,\n): () => void {\n let updateMode = false;\n const input = parent.nativeFormElement;\n\n // TODO: (perf) ok to always create this?\n const parser = createParser(\n // Read from the model value\n () => parent.state().value(),\n // Write to the buffered \"control value\"\n (rawValue: unknown) => parent.state().controlValue.set(rawValue),\n // Our parse function doesn't care about the raw value that gets passed in,\n // It just reads the newly parsed value directly off the input element.\n () => getNativeControlValue(input, parent.state().value),\n );\n\n parseErrorsSource.set(parser.errors);\n // Pass undefined as the raw value since the parse function doesn't care about it.\n host.listenToDom('input', () => parser.setRawValue(undefined));\n host.listenToDom('blur', () => parent.state().markAsTouched());\n\n parent.registerAsBinding();\n\n // The native `<select>` tracks its `value` by keeping track of the selected `<option>`.\n // Therefore if we set the value to an arbitrary string *before* the corresponding option has been\n // created, the `<select>` will ignore it.\n //\n // This means that we need to know when an `<option>` is created, destroyed, or has its `value`\n // changed so that we can re-sync the `<select>` to the field state's value. We implement this\n // using a `MutationObserver` that we create to observe `<option>` changes.\n if (input.tagName === 'SELECT') {\n observeSelectMutations(\n input as HTMLSelectElement,\n () => {\n // It's not legal to access `parent.state()` until update mode has run, but\n // `observeSelectMutations` may fire earlier. It's okay to ignore these early notifications\n // because we'll write `input.value` in that first update pass anyway.\n if (!updateMode) {\n return;\n }\n input.value = parent.state().controlValue() as string;\n },\n parent.destroyRef,\n );\n }\n\n const bindings = createBindings<ControlBindingKey | 'controlValue'>();\n\n return () => {\n const state = parent.state();\n const controlValue = state.controlValue();\n if (bindingUpdated(bindings, 'controlValue', controlValue)) {\n setNativeControlValue(input, controlValue);\n }\n\n for (const name of CONTROL_BINDING_NAMES) {\n const value = readFieldStateBindingValue(state, name);\n if (bindingUpdated(bindings, name, value)) {\n host.setInputOnDirectives(name, value);\n if (parent.elementAcceptsNativeProperty(name)) {\n setNativeDomProperty(parent.renderer, input, name, value as string | number | undefined);\n }\n }\n }\n\n updateMode = true;\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n computed,\n type ɵControlDirectiveHost as ControlDirectiveHost,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n ɵformatRuntimeError as formatRuntimeError,\n inject,\n InjectionToken,\n Injector,\n input,\n Renderer2,\n ɵRuntimeError as RuntimeError,\n type Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {type ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\nimport {type ValidationError} from '../api/rules';\nimport type {Field} from '../api/types';\nimport {InteropNgControl} from '../controls/interop_ng_control';\nimport {RuntimeErrorCode} from '../errors';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FieldNode} from '../field/node';\nimport {bindingUpdated, type ControlBindingKey, createBindings} from './bindings';\nimport {customControlCreate} from './control_custom';\nimport {cvaControlCreate} from './control_cva';\nimport {nativeControlCreate} from './control_native';\nimport {\n isNativeFormElement,\n isNumericFormElement,\n isTextualFormElement,\n type NativeFormControl,\n} from './native';\nimport {FORM_FIELD_PARSE_ERRORS} from './parse_errors';\n\nexport const ɵNgFieldDirective: unique symbol = Symbol();\n\nexport interface FormFieldBindingOptions {\n /**\n * Focuses the binding.\n *\n * If not specified, Signal Forms will attempt to focus the host element of the `FormField` when\n * asked to focus this binding.\n */\n readonly focus?: (focusOptions?: FocusOptions) => void;\n}\n\n/**\n * Lightweight DI token provided by the {@link FormField} directive.\n *\n * @category control\n * @experimental 21.0.0\n */\nexport const FORM_FIELD = new InjectionToken<FormField<unknown>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'FORM_FIELD' : '',\n);\n\n/**\n * Binds a form `FieldTree` to a UI control that edits it. A UI control can be one of several things:\n * 1. A native HTML input or textarea\n * 2. A signal forms custom control that implements `FormValueControl` or `FormCheckboxControl`\n * 3. A component that provides a `ControlValueAccessor`. This should only be used for backwards\n * compatibility with reactive forms. Prefer options (1) and (2).\n *\n * This directive has several responsibilities:\n * 1. Two-way binds the field state's value with the UI control's value\n * 2. Binds additional forms related state on the field state to the UI control (disabled, required, etc.)\n * 3. Relays relevant events on the control to the field state (e.g. marks touched on blur)\n * 4. Provides a fake `NgControl` that implements a subset of the features available on the\n * reactive forms `NgControl`. This is provided to improve interoperability with controls\n * designed to work with reactive forms. It should not be used by controls written for signal\n * forms.\n *\n * @category control\n * @experimental 21.0.0\n */\n@Directive({\n selector: '[formField]',\n exportAs: 'formField',\n providers: [\n {provide: FORM_FIELD, useExisting: FormField},\n {provide: NgControl, useFactory: () => inject(FormField).interopNgControl},\n {\n provide: FORM_FIELD_PARSE_ERRORS,\n useFactory: () => inject(FormField).parseErrorsSource,\n },\n ],\n})\nexport class FormField<T> {\n readonly field = input.required<Field<T>>({alias: 'formField'});\n\n /** @internal */\n readonly renderer = inject(Renderer2);\n\n /** @internal */\n readonly destroyRef = inject(DestroyRef);\n\n /**\n * `FieldState` for the currently bound field.\n */\n readonly state = computed(() => this.field()());\n\n /**\n * The node injector for the element this field binding.\n */\n readonly injector = inject(Injector);\n\n /**\n * The DOM element hosting this field binding.\n */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n // Compute some helper booleans about the type of element we're sitting on.\n private readonly elementIsNativeFormElement = isNativeFormElement(this.element);\n private readonly elementAcceptsNumericValues = isNumericFormElement(this.element);\n private readonly elementAcceptsTextualValues = isTextualFormElement(this.element);\n\n /**\n * Utility that casts `this.element` to `NativeFormControl` to avoid repeated type guards. Only\n * safe to access when `elementIsNativeFormElement` is true.\n *\n * @internal\n */\n readonly nativeFormElement: NativeFormControl = (this.elementIsNativeFormElement\n ? this.element\n : undefined) as NativeFormControl;\n\n /**\n * Current focus implementation, set by `registerAsBinding`.\n */\n private focuser = (options?: FocusOptions) => this.element.focus(options);\n\n /** Any `ControlValueAccessor` instances provided on the host element. */\n private readonly controlValueAccessors = inject(NG_VALUE_ACCESSOR, {optional: true, self: true});\n\n private readonly config = inject(SIGNAL_FORMS_CONFIG, {optional: true});\n\n private readonly parseErrorsSource = signal<\n Signal<readonly ValidationError.WithoutFieldTree[]> | undefined\n >(undefined);\n\n /** A lazily instantiated fake `NgControl`. */\n private _interopNgControl: InteropNgControl | undefined;\n\n /** Lazily instantiates a fake `NgControl` for this form field. */\n protected get interopNgControl(): InteropNgControl {\n return (this._interopNgControl ??= new InteropNgControl(this.state));\n }\n\n /** @internal */\n readonly parseErrors = computed<ValidationError.WithFormField[]>(\n () =>\n this.parseErrorsSource()?.().map((err) => ({\n ...err,\n fieldTree: untracked(this.state).fieldTree,\n formField: this as FormField<unknown>,\n })) ?? [],\n );\n\n /** Errors associated with this form field. */\n readonly errors = computed(() =>\n this.state()\n .errors()\n .filter((err) => !err.formField || err.formField === this),\n );\n\n /** Whether this `FormField` has been registered as a binding on its associated `FieldState`. */\n private isFieldBinding = false;\n\n /**\n * A `ControlValueAccessor`, if configured, for the host component.\n *\n * @internal\n */\n get controlValueAccessor(): ControlValueAccessor | undefined {\n return this.controlValueAccessors?.[0] ?? this.interopNgControl?.valueAccessor ?? undefined;\n }\n\n /**\n * Creates an `afterRenderEffect` that applies the configured class bindings to the host element\n * if needed.\n */\n private installClassBindingEffect(): void {\n const classes = Object.entries(this.config?.classes ?? {}).map(\n ([className, computation]) =>\n [className, computed(() => computation(this as FormField<unknown>))] as const,\n );\n if (classes.length === 0) {\n return;\n }\n\n // If we have class bindings to apply, set up an afterRenderEffect to apply them.\n const bindings = createBindings<string>();\n afterRenderEffect(\n {\n write: () => {\n for (const [className, computation] of classes) {\n const active = computation();\n if (bindingUpdated(bindings, className, active)) {\n if (active) {\n this.renderer.addClass(this.element, className);\n } else {\n this.renderer.removeClass(this.element, className);\n }\n }\n }\n },\n },\n {injector: this.injector},\n );\n }\n\n /**\n * Focuses this field binding.\n *\n * By default, this will focus the host DOM element. However, custom `FormUiControl`s can\n * implement custom focusing behavior.\n */\n focus(options?: FocusOptions): void {\n this.focuser(options);\n }\n\n /**\n * Registers this `FormField` as a binding on its associated `FieldState`.\n *\n * This method should be called at most once for a given `FormField`. A `FormField` placed on a\n * custom control (`FormUiControl`) automatically registers that custom control as a binding.\n */\n registerAsBinding(bindingOptions?: FormFieldBindingOptions): void {\n if (this.isFieldBinding) {\n throw new RuntimeError(\n RuntimeErrorCode.BINDING_ALREADY_REGISTERED,\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n 'FormField already registered as a binding',\n );\n }\n this.isFieldBinding = true;\n\n this.installClassBindingEffect();\n\n if (bindingOptions?.focus) {\n this.focuser = (focusOptions?: FocusOptions) => bindingOptions.focus!(focusOptions);\n }\n\n // Register this control on the field state it is currently bound to. We do this at the end of\n // initialization so that it only runs if we are actually syncing with this control\n // (as opposed to just passing the field state through to its `formField` input).\n effect(\n (onCleanup) => {\n const fieldNode = this.state() as unknown as FieldNode;\n fieldNode.nodeState.formFieldBindings.update((controls) => [\n ...controls,\n this as FormField<unknown>,\n ]);\n onCleanup(() => {\n fieldNode.nodeState.formFieldBindings.update((controls) =>\n controls.filter((c) => c !== this),\n );\n });\n },\n {injector: this.injector},\n );\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n effect(\n () => {\n const fieldNode = this.state() as unknown as FieldNode;\n if (fieldNode.hidden()) {\n const path = fieldNode.structure.pathKeys().join('.') || '<root>';\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.RENDERED_HIDDEN_FIELD,\n `Field '${path}' is hidden but is being rendered. ` +\n `Hidden fields should be removed from the DOM using @if.`,\n ),\n );\n }\n },\n {injector: this.injector},\n );\n }\n }\n\n /**\n * The presence of this symbol tells the template type-checker that this directive is a control\n * directive and should be type-checked as such. We don't use the `ɵngControlCreate` method below\n * as it's marked internal and removed from the public API. A symbol is used instead to avoid\n * polluting the public API with the marker.\n */\n readonly [ɵNgFieldDirective]!: true;\n\n /**\n * Internal control directive creation lifecycle hook.\n *\n * The presence of this method tells the compiler to install `ɵɵControlFeature`, which will\n * cause this directive to be recognized as a control directive by the `ɵcontrolCreate` and\n * `ɵcontrol` instructions.\n *\n * @internal */\n ɵngControlCreate(host: ControlDirectiveHost<'formField'>): void {\n if (host.hasPassThrough) {\n return;\n }\n\n if (this.controlValueAccessor) {\n this.ɵngControlUpdate = cvaControlCreate(host, this as FormField<unknown>);\n } else if (host.customControl) {\n this.ɵngControlUpdate = customControlCreate(host, this as FormField<unknown>);\n } else if (this.elementIsNativeFormElement) {\n this.ɵngControlUpdate = nativeControlCreate(\n host,\n this as FormField<unknown>,\n this.parseErrorsSource,\n );\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_FIELD_DIRECTIVE_HOST,\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n `${host.descriptor} is an invalid [formField] directive host. The host must be a native form control ` +\n `(such as <input>', '<select>', or '<textarea>') or a custom form control with a 'value' or ` +\n `'checked' model.`,\n );\n }\n }\n\n /** @internal */\n ɵngControlUpdate: (() => void) | undefined;\n\n /** @internal */\n elementAcceptsNativeProperty<K extends ControlBindingKey>(\n key: K,\n ): key is K &\n ('min' | 'max' | 'minLength' | 'maxLength' | 'disabled' | 'required' | 'readonly' | 'name') {\n if (!this.elementIsNativeFormElement) {\n return false;\n }\n\n switch (key) {\n case 'min':\n case 'max':\n return this.elementAcceptsNumericValues;\n case 'minLength':\n case 'maxLength':\n return this.elementAcceptsTextualValues;\n case 'disabled':\n case 'required':\n case 'readonly':\n case 'name':\n return true;\n default:\n return false;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive, input} from '@angular/core';\n\nimport {submit} from '../api/structure';\nimport {FieldTree} from '../api/types';\n\n/**\n * A directive that binds a `FieldTree` to a `<form>` element.\n *\n * It automatically:\n * 1. Sets `novalidate` on the form element to disable browser validation.\n * 2. Listens for the `submit` event, prevents the default behavior, and calls `submit()` on the\n * `FieldTree`.\n *\n * @usageNotes\n *\n * ```html\n * <form [formRoot]=\"myFieldTree\">\n * ...\n * </form>\n * ```\n *\n * @publicApi\n * @experimental 21.0.0\n */\n@Directive({\n selector: 'form[formRoot]',\n host: {\n 'novalidate': '',\n '(submit)': 'onSubmit($event)',\n },\n})\nexport class FormRoot<T> {\n readonly fieldTree = input.required<FieldTree<T>>({alias: 'formRoot'});\n\n protected onSubmit(event: Event): void {\n event.preventDefault();\n submit(this.fieldTree());\n }\n}\n"],"names":["SIGNAL_FORMS_CONFIG","InjectionToken","ngDevMode","provideSignalFormsConfig","config","provide","useValue","disabled","path","logic","assertPathIsCurrent","pathNode","FieldPathNode","unwrapFieldPath","builder","addDisabledReasonRule","ctx","result","fieldTree","message","undefined","hidden","addHiddenRule","readonly","addReadonlyRule","getLengthOrSize","value","v","length","size","getOption","opt","Function","isEmpty","isNaN","normalizeErrors","error","Array","isArray","validate","addSyncErrorRule","addDefaultField","requiredError","options","RequiredValidationError","minError","min","MinValidationError","maxError","max","MaxValidationError","minLengthError","minLength","MinLengthValidationError","maxLengthError","maxLength","MaxLengthValidationError","patternError","pattern","PatternValidationError","emailError","EmailValidationError","BaseNgValidationError","__brand","kind","constructor","Object","assign","NativeInputParseError","NgValidationError","EMAIL_REGEXP","email","test","maxValue","MAX_MEMO","metadata","createMetadataKey","MAX","state","Number","numValue","NaN","MAX_LENGTH_MEMO","MAX_LENGTH","minValue","MIN_MEMO","MIN","MIN_LENGTH_MEMO","MIN_LENGTH","PATTERN_MEMO","RegExp","PATTERN","required","REQUIRED_MEMO","when","REQUIRED","validateAsync","opts","RESOURCE","createManagedMetadataKey","factory","node","stateOf","validationState","shouldSkipValidation","syncValid","params","addAsyncErrorRule","res","errors","status","hasValue","onSuccess","onError","validateTree","addSyncTreeErrorRule","validateStandardSchema","schema","VALIDATOR_MEMO","resolvedSchema","fieldTreeOf","ɵisPromise","issues","map","issue","standardIssueToFormTreeError","resource","loader","standardSchemaError","StandardSchemaValidationError","target","pathPart","pathKey","key","validateHttp","request","httpResource","debounce","durationOrDebouncer","debouncer","debounceForDuration","immediate","addMetadataRule","DEBOUNCER","durationInMilliseconds","_context","abortSignal","Promise","resolve","timeoutId","onAbort","clearTimeout","setTimeout","removeEventListener","addEventListener","once","FORM_FIELD_PARSE_ERRORS","createParser","getValue","setValue","parse","linkedSignal","debugName","source","computation","setRawValue","rawValue","set","asReadonly","transformedValue","format","parser","formFieldParseErrors","inject","self","optional","parseErrors","originalSet","bind","newRawValue","update","updateFn","InteropNgControl","field","control","valid","invalid","pending","enabled","signalErrorsToValidationErrors","pristine","dirty","touched","untouched","RuntimeError","valueAccessor","hasValidator","validator","Validators","updateValueAndValidity","FIELD_STATE_KEY_TO_CONTROL_BINDING","disabledReasons","name","CONTROL_BINDING_TO_FIELD_STATE_KEY","keys","readFieldStateBindingValue","fieldState","property","CONTROL_BINDING_NAMES","values","createBindings","bindingUpdated","bindings","isNativeFormElement","element","tagName","isNumericFormElement","type","isTextualFormElement","getNativeControlValue","currentValue","modelValue","validity","badInput","checked","untracked","valueAsNumber","Date","valueAsDate","setNativeControlValue","setNativeNumberControlValue","setNativeDomProperty","renderer","setAttribute","removeAttribute","toString","customControlCreate","host","parent","listenToCustomControlModel","controlValue","listenToCustomControlOutput","markAsTouched","registerAsBinding","customControl","setCustomControlModelInput","setInputOnDirectives","elementAcceptsNativeProperty","customControlHasInput","nativeFormElement","cvaControlCreate","controlValueAccessor","registerOnChange","registerOnTouched","writeValue","propertyWasSet","setDisabledState","observeSelectMutations","select","onMutation","destroyRef","MutationObserver","observer","mutations","some","m","isRelevantSelectMutation","observe","attributes","attributeFilter","characterData","childList","subtree","onDestroy","disconnect","mutation","Comment","addedNodes","removedNodes","HTMLOptionElement","nativeControlCreate","parseErrorsSource","updateMode","input","listenToDom","ɵNgFieldDirective","Symbol","FORM_FIELD","FormField","alias","Renderer2","DestroyRef","computed","injector","Injector","ElementRef","nativeElement","elementIsNativeFormElement","elementAcceptsNumericValues","elementAcceptsTextualValues","focuser","focus","controlValueAccessors","NG_VALUE_ACCESSOR","signal","_interopNgControl","interopNgControl","err","formField","filter","isFieldBinding","installClassBindingEffect","classes","entries","className","afterRenderEffect","write","active","addClass","removeClass","bindingOptions","focusOptions","effect","onCleanup","fieldNode","nodeState","formFieldBindings","controls","c","structure","pathKeys","join","console","warn","formatRuntimeError","ɵngControlCreate","hasPassThrough","ɵngControlUpdate","descriptor","deps","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","providers","useExisting","NgControl","useFactory","exportAs","controlCreate","passThroughInput","ngImport","decorators","args","FormRoot","onSubmit","event","preventDefault","submit","listeners"],"mappings":";;;;;;;;;;;;;;AAYO,MAAMA,mBAAmB,GAAG,IAAIC,cAAc,CACnD,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,GAAG,qBAAqB,GAAG,EAAE,CAC3E;;ACaK,SAAUC,wBAAwBA,CAACC,MAAyB,EAAA;AAChE,EAAA,OAAO,CAAC;AAACC,IAAAA,OAAO,EAAEL,mBAAmB;AAAEM,IAAAA,QAAQ,EAAEF;AAAO,GAAA,CAAC;AAC3D;;ACJgB,SAAAG,QAAQA,CACtBC,IAA8D,EAC9DC,KAAsE,EAAA;EAEtEC,mBAAmB,CAACF,IAAI,CAAC;AAEzB,EAAA,MAAMG,QAAQ,GAAGC,aAAa,CAACC,eAAe,CAACL,IAAI,CAAC;AACpDG,EAAAA,QAAQ,CAACG,OAAO,CAACC,qBAAqB,CAAEC,GAAG,IAAI;IAC7C,IAAIC,MAAM,GAAqB,IAAI;AACnC,IAAA,IAAI,OAAOR,KAAK,KAAK,QAAQ,EAAE;AAC7BQ,MAAAA,MAAM,GAAGR,KAAK;KAChB,MAAO,IAAIA,KAAK,EAAE;AAChBQ,MAAAA,MAAM,GAAGR,KAAK,CAACO,GAAsC,CAAC;AACxD;AACA,IAAA,IAAI,OAAOC,MAAM,KAAK,QAAQ,EAAE;MAC9B,OAAO;QAACC,SAAS,EAAEF,GAAG,CAACE,SAAS;AAAEC,QAAAA,OAAO,EAAEF;OAAO;AACpD;AACA,IAAA,OAAOA,MAAM,GAAG;MAACC,SAAS,EAAEF,GAAG,CAACE;AAAU,KAAA,GAAGE,SAAS;AACxD,GAAC,CAAC;AACJ;;ACZgB,SAAAC,MAAMA,CACpBb,IAA8D,EAC9DC,KAAmD,EAAA;EAEnDC,mBAAmB,CAACF,IAAI,CAAC;AAEzB,EAAA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