|
4 | 4 |
|
5 | 5 | ```ts |
6 | 6 |
|
7 | | -import { ControlValueAccessor } from '@angular/forms'; |
8 | 7 | import { DestroyableInjector } from '@angular/core'; |
9 | | -import { ElementRef } from '@angular/core'; |
10 | 8 | import { HttpResourceOptions } from '@angular/common/http'; |
11 | 9 | import { HttpResourceRequest } from '@angular/common/http'; |
12 | 10 | import * as i0 from '@angular/core'; |
13 | 11 | import { InjectionToken } from '@angular/core'; |
14 | 12 | import { Injector } from '@angular/core'; |
15 | 13 | import { InputSignal } from '@angular/core'; |
16 | 14 | import { ModelSignal } from '@angular/core'; |
17 | | -import { NgControl } from '@angular/forms'; |
18 | 15 | import { OutputRef } from '@angular/core'; |
19 | 16 | import { ResourceRef } from '@angular/core'; |
20 | 17 | import { Signal } from '@angular/core'; |
21 | 18 | import { StandardSchemaV1 } from '@standard-schema/spec'; |
22 | 19 | import { WritableSignal } from '@angular/core'; |
| 20 | +import { ɵCONTROL } from '@angular/core'; |
| 21 | +import { ɵControl } from '@angular/core'; |
| 22 | +import { ɵFieldState } from '@angular/core'; |
23 | 23 |
|
24 | 24 | // @public |
25 | 25 | export class AggregateProperty<TAcc, TItem> { |
@@ -69,17 +69,17 @@ export interface ChildFieldContext<TValue> extends RootFieldContext<TValue> { |
69 | 69 | export const CONTROL: InjectionToken<Control<unknown>>; |
70 | 70 |
|
71 | 71 | // @public |
72 | | -export class Control<T> { |
73 | | - get cva(): ControlValueAccessor | undefined; |
74 | | - readonly cvaArray: ControlValueAccessor[] | null; |
75 | | - readonly el: ElementRef<HTMLElement>; |
76 | | - readonly field: i0.WritableSignal<FieldTree<T>>; |
| 72 | +export class Control<T> implements ɵControl<T> { |
| 73 | + // (undocumented) |
| 74 | + readonly [ɵCONTROL]: undefined; |
| 75 | + // (undocumented) |
| 76 | + readonly field: i0.InputSignal<FieldTree<T>>; |
| 77 | + // (undocumented) |
| 78 | + register(): void; |
77 | 79 | // (undocumented) |
78 | | - set _field(value: FieldTree<T>); |
79 | | - get ngControl(): NgControl; |
80 | 80 | readonly state: i0.Signal<FieldState<T, string | number>>; |
81 | 81 | // (undocumented) |
82 | | - static ɵdir: i0.ɵɵDirectiveDeclaration<Control<any>, "[control]", never, { "_field": { "alias": "control"; "required": true; }; }, {}, never, never, true, never>; |
| 82 | + static ɵdir: i0.ɵɵDirectiveDeclaration<Control<any>, "[control]", never, { "field": { "alias": "control"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>; |
83 | 83 | // (undocumented) |
84 | 84 | static ɵfac: i0.ɵɵFactoryDeclaration<Control<any>, never>; |
85 | 85 | } |
@@ -137,29 +137,24 @@ export type FieldPath<TValue, TPathKind extends PathKind = PathKind.Root> = { |
137 | 137 | } : unknown); |
138 | 138 |
|
139 | 139 | // @public |
140 | | -export interface FieldState<TValue, TKey extends string | number = string | number> { |
| 140 | +export interface FieldState<TValue, TKey extends string | number = string | number> extends ɵFieldState<TValue> { |
141 | 141 | readonly controls: Signal<readonly Control<unknown>[]>; |
142 | 142 | readonly dirty: Signal<boolean>; |
143 | | - readonly disabled: Signal<boolean>; |
| 143 | + // (undocumented) |
144 | 144 | readonly disabledReasons: Signal<readonly DisabledReason[]>; |
| 145 | + // (undocumented) |
145 | 146 | readonly errors: Signal<ValidationError[]>; |
146 | 147 | readonly errorSummary: Signal<ValidationError[]>; |
147 | 148 | hasProperty(key: Property<any> | AggregateProperty<any, any>): boolean; |
148 | 149 | readonly hidden: Signal<boolean>; |
149 | 150 | readonly invalid: Signal<boolean>; |
150 | 151 | readonly keyInParent: Signal<TKey>; |
151 | | - markAsDirty(): void; |
152 | | - markAsTouched(): void; |
153 | | - readonly name: Signal<string>; |
154 | 152 | readonly pending: Signal<boolean>; |
155 | 153 | property<M>(prop: AggregateProperty<M, any>): Signal<M>; |
156 | 154 | property<M>(prop: Property<M>): M | undefined; |
157 | | - readonly readonly: Signal<boolean>; |
158 | 155 | reset(): void; |
159 | 156 | readonly submitting: Signal<boolean>; |
160 | | - readonly touched: Signal<boolean>; |
161 | 157 | readonly valid: Signal<boolean>; |
162 | | - readonly value: WritableSignal<TValue>; |
163 | 158 | } |
164 | 159 |
|
165 | 160 | // @public |
|
0 commit comments