Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/forms/signals/compat/src/api/compat_form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {CompatFieldAdapter} from '../compat_field_adapter';
* Options that may be specified when creating a compat form.
*
* @category interop
* @experimental 21.0.0
* @publicApi 22.0
*/
export type CompatFormOptions<TModel> = Omit<FormOptions<TModel>, 'adapter'>;

Expand Down Expand Up @@ -47,7 +47,7 @@ export type CompatFormOptions<TModel> = Omit<FormOptions<TModel>, 'adapter'>;
* the model.
*
* @category interop
* @experimental 21.0.0
* @publicApi 22.0
*/
export function compatForm<TModel>(model: WritableSignal<TModel>): FieldTree<TModel>;

Expand Down Expand Up @@ -81,7 +81,7 @@ export function compatForm<TModel>(model: WritableSignal<TModel>): FieldTree<TMo
* 2. The form options (excluding adapter, since it's provided).
*
* @category interop
* @experimental 21.0.0
* @publicApi 22.0
*/
export function compatForm<TModel>(
model: WritableSignal<TModel>,
Expand Down Expand Up @@ -117,7 +117,7 @@ export function compatForm<TModel>(
* @param options The form options (excluding adapter, since it's provided).
*
* @category interop
* @experimental 21.0.0
* @publicApi 22.0
*/
export function compatForm<TModel>(
model: WritableSignal<TModel>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/compat/src/api/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {SignalFormsConfig} from '../../../src/api/di';
* A value that can be used for `SignalFormsConfig.classes` to automatically add
* the `ng-*` status classes from reactive forms.
*
* @experimental 21.0.1
* @publicApi 22.0
*/
export const NG_STATUS_CLASSES: SignalFormsConfig['classes'] = {
'ng-touched': ({state}) => state().touched(),
Expand Down
8 changes: 4 additions & 4 deletions packages/forms/signals/compat/src/api/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type RawValue<T> =
/**
* A type that recursively makes all properties of T optional.
* Used for the result of `extractValue` when filtering is applied.
* @experimental 21.2.0
* @publicApi 22.0
*/
export type DeepPartial<T> =
| (T extends (infer U)[]
Expand All @@ -45,7 +45,7 @@ export type DeepPartial<T> =
* Each property is optional; when provided, the field must match the specified state.
*
* @category interop
* @experimental 21.2.0
* @publicApi 22.0
*/
export interface ExtractFilter {
readonly dirty?: boolean;
Expand All @@ -63,7 +63,7 @@ export interface ExtractFilter {
* @returns The raw value of the field tree.
*
* @category interop
* @experimental 21.2.0
* @publicApi 22.0
*/
export function extractValue<T>(field: FieldTree<T>): RawValue<T>;
/**
Expand All @@ -77,7 +77,7 @@ export function extractValue<T>(field: FieldTree<T>): RawValue<T>;
* @returns A partial value containing only the fields matching the filter, or `undefined` if none match.
*
* @category interop
* @experimental 21.2.0
* @publicApi 22.0
*/
export function extractValue<T>(
field: FieldTree<T>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export type ValueUpdateOptions = {
* </form>
* ```
*
* @experimental
* @publicApi 22.0
*/
export class SignalFormControl<T> extends AbstractControl {
/** Source FieldTree. */
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/signals/src/api/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {DisabledReason} from './types';
* The base set of properties shared by all form control contracts.
*
* @category control
* @experimental 21.0.0
* @publicApi 22.0
*/
export interface FormUiControl {
/**
Expand Down Expand Up @@ -144,7 +144,7 @@ type FormUiControlImplementsFormFieldBindingOptions = Check<
* @template TValue The type of `FieldTree` that the implementing component can edit.
*
* @category control
* @experimental 21.0.0
* @publicApi 22.0
*/
export interface FormValueControl<TValue> extends FormUiControl {
/**
Expand Down Expand Up @@ -173,7 +173,7 @@ export interface FormValueControl<TValue> extends FormUiControl {
* `Field` directive.
*
* @category control
* @experimental 21.0.0
* @publicApi 22.0
*/
// TODO: should we make this generic extends `boolean | null` so people can use `null` for parse error?
export interface FormCheckboxControl extends FormUiControl {
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/signals/src/api/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {SIGNAL_FORMS_CONFIG} from '../field/di';
/**
* Configuration options for signal forms.
*
* @experimental 21.0.1
* @publicApi 22.0
*/
export interface SignalFormsConfig {
/** A map of CSS class names to predicate functions that determine when to apply them. */
Expand All @@ -25,7 +25,7 @@ export interface SignalFormsConfig {
/**
* Provides configuration options for signal forms.
*
* @experimental 21.0.1
* @publicApi 22.0
*/
export function provideSignalFormsConfig(config: SignalFormsConfig): Provider[] {
return [{provide: SIGNAL_FORMS_CONFIG, useValue: config}];
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {Debouncer, PathKind, SchemaPath, SchemaPathRules} from '../types';
* @param config A debounce configuration, which can be either a debounce duration in milliseconds,
* `'blur'` to debounce until the field is blurred, or a custom {@link Debouncer} function.
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/disabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {FieldContext, LogicFn, PathKind, SchemaPath, SchemaPathRules} from
* @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)
*
* @category logic
* @experimental 21.0.0
* @publicApi 22.0
*/
export function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/hidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';
* @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)
*
* @category logic
* @experimental 21.0.0
* @publicApi 22.0
*/
export function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
Expand Down
30 changes: 15 additions & 15 deletions packages/forms/signals/src/api/rules/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type {FieldState, LogicFn, PathKind, SchemaPath, SchemaPathRules} from '.
* @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)
*
* @category logic
* @experimental 21.0.0
* @publicApi 22.0
*/
export function metadata<
TValue,
Expand All @@ -49,7 +49,7 @@ export function metadata<
*
* @template TAcc The accumulated type of the reduce operation.
* @template TItem The type of the individual items that are reduced over.
* @experimental 21.0.2
* @publicApi 22.0
*/
export interface MetadataReducer<TAcc, TItem> {
/** The reduce function. */
Expand Down Expand Up @@ -125,7 +125,7 @@ function override<T>(getInitial?: () => T): MetadataReducer<T | undefined, T> {
* A symbol used to tag a `MetadataKey` as representing an asynchronous validation resource.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const IS_ASYNC_VALIDATION_RESOURCE: unique symbol = Symbol('IS_ASYNC_VALIDATION_RESOURCE');

Expand All @@ -139,7 +139,7 @@ export const IS_ASYNC_VALIDATION_RESOURCE: unique symbol = Symbol('IS_ASYNC_VALI
* @template TWrite The type written to this key using the `metadata()` rule
* @template TAcc The type of the reducer's accumulated value.
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export class MetadataKey<TRead, TWrite, TAcc> {
private brand!: [TRead, TWrite, TAcc];
Expand All @@ -159,7 +159,7 @@ export class MetadataKey<TRead, TWrite, TAcc> {
*
* @template TKey The `MetadataKey` type
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export type MetadataSetterType<TKey> =
TKey extends MetadataKey<any, infer TWrite, any> ? TWrite : never;
Expand All @@ -170,7 +170,7 @@ export type MetadataSetterType<TKey> =
*
* @template TWrite The type written to this key using the `metadata()` rule
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export function createMetadataKey<TWrite>(): MetadataKey<
Signal<TWrite | undefined>,
Expand All @@ -184,7 +184,7 @@ export function createMetadataKey<TWrite>(): MetadataKey<
* @template TWrite The type written to this key using the `metadata()` rule
* @template TAcc The type of the reducer's accumulated value.
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export function createMetadataKey<TWrite, TAcc>(
reducer: MetadataReducer<TAcc, TWrite>,
Expand All @@ -208,7 +208,7 @@ export function createMetadataKey<TWrite, TAcc>(
* @template TRead The type read from the `FieldState` for this key
* @template TWrite The type written to this key using the `metadata()` rule
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export function createManagedMetadataKey<TRead, TWrite>(
create: (state: FieldState<unknown>, data: Signal<TWrite | undefined>) => TRead,
Expand All @@ -226,7 +226,7 @@ export function createManagedMetadataKey<TRead, TWrite>(
* @template TWrite The type written to this key using the `metadata()` rule
* @template TAcc The type of the reducer's accumulated value.
*
* @experimental 21.0.0
* @publicApi 22.0
*/
export function createManagedMetadataKey<TRead, TWrite, TAcc>(
create: (state: FieldState<unknown>, data: Signal<TAcc>) => TRead,
Expand All @@ -246,7 +246,7 @@ export function createManagedMetadataKey<TRead, TWrite, TAcc>(
* A {@link MetadataKey} representing whether the field is required.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const REQUIRED: MetadataKey<Signal<boolean>, boolean, boolean> = createMetadataKey(
MetadataReducer.or(),
Expand All @@ -256,7 +256,7 @@ export const REQUIRED: MetadataKey<Signal<boolean>, boolean, boolean> = createMe
* A {@link MetadataKey} representing the min value of the field.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const MIN: MetadataKey<
Signal<number | undefined>,
Expand All @@ -268,7 +268,7 @@ export const MIN: MetadataKey<
* A {@link MetadataKey} representing the max value of the field.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const MAX: MetadataKey<
Signal<number | undefined>,
Expand All @@ -280,7 +280,7 @@ export const MAX: MetadataKey<
* A {@link MetadataKey} representing the min length of the field.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const MIN_LENGTH: MetadataKey<
Signal<number | undefined>,
Expand All @@ -292,7 +292,7 @@ export const MIN_LENGTH: MetadataKey<
* A {@link MetadataKey} representing the max length of the field.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const MAX_LENGTH: MetadataKey<
Signal<number | undefined>,
Expand All @@ -304,7 +304,7 @@ export const MAX_LENGTH: MetadataKey<
* A {@link MetadataKey} representing the patterns the field must match.
*
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export const PATTERN: MetadataKey<
Signal<RegExp[]>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/readonly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';
* @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)
*
* @category logic
* @experimental 21.0.0
* @publicApi 22.0
*/
export function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/validation/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const EMAIL_REGEXP =
*
* @see [Signal Form Email Validation](guide/forms/signals/validation#email)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function email<TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/validation/max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {maxError} from './validation_errors';
*
* @see [Signal Form Max Validation](guide/forms/signals/validation#min-and-max)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function max<TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<number | string | null, SchemaPathRules.Supported, TPathKind>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {maxLengthError} from './validation_errors';
*
* @see [Signal Form Max Length Validation](guide/forms/signals/validation#minlength-and-maxlength)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function maxLength<
TValue extends ValueWithLengthOrSize,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/validation/min.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {minError} from './validation_errors';
*
* @see [Signal Form Min Validation](guide/forms/signals/validation#min-and-max)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function min<
TValue extends number | string | null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {minLengthError} from './validation_errors';
*
* @see [Signal Form Min Length Validation](guide/forms/signals/validation#minlength-and-maxlength)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function minLength<
TValue extends ValueWithLengthOrSize,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/signals/src/api/rules/validation/pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {patternError} from './validation_errors';
*
* @see [Signal Form Pattern Validation](guide/forms/signals/validation#pattern)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function pattern<TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {requiredError} from './validation_errors';
*
* @see [Signal Form Required Validation](guide/forms/signals/validation#required)
* @category validation
* @experimental 21.0.0
* @publicApi 22.0
*/
export function required<TValue, TPathKind extends PathKind = PathKind.Root>(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
Expand Down
Loading
Loading