@ardium-ui/ui 5.0.0-alpha.59 → 5.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,7 @@ export declare abstract class _NgModelComponentBase extends _FocusableComponentB
|
|
|
45
45
|
protected _shouldEmitTouched: boolean;
|
|
46
46
|
onBlur(event: FocusEvent): void;
|
|
47
47
|
protected _emitTouched(): void;
|
|
48
|
-
readonly control: import("
|
|
48
|
+
readonly control: import("@ardium-ui/devkit").TrackedFormControl<any>;
|
|
49
49
|
ngOnInit(): void;
|
|
50
50
|
readonly htmlId: import("@angular/core").InputSignal<string>;
|
|
51
51
|
readonly _hasError: import("@angular/core").InputSignalWithTransform<boolean | undefined, any>;
|
|
@@ -6,7 +6,7 @@ export declare class ArdiumFormFieldNativeInputAdapterDirective implements ArdFo
|
|
|
6
6
|
readonly required: import("@angular/core").Signal<boolean>;
|
|
7
7
|
readonly isSuccess: import("@angular/core").InputSignalWithTransform<boolean, BooleanLike>;
|
|
8
8
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanLike>;
|
|
9
|
-
readonly control: import("
|
|
9
|
+
readonly control: import("@ardium-ui/devkit").TrackedFormControl<any>;
|
|
10
10
|
ngOnInit(): void;
|
|
11
11
|
readonly htmlId: import("@angular/core").InputSignal<string>;
|
|
12
12
|
readonly _hasError: import("@angular/core").InputSignalWithTransform<boolean | undefined, any>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -54,6 +54,5 @@ export * from './lib/types/colors.types';
|
|
|
54
54
|
export * from './lib/types/item-storage.types';
|
|
55
55
|
export * from './lib/types/theming.types';
|
|
56
56
|
export * from './lib/types/utility.types';
|
|
57
|
-
export * from './lib/utils/ng-control';
|
|
58
57
|
export * from './lib/breakpoints';
|
|
59
58
|
export { searchFunctions as ArdSearchFunction, searchInString } from './lib/search-functions';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
|
-
import { AbstractControl, AsyncValidatorFn, FormControlStatus, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
3
|
-
export interface FormControlTrackerOptions {
|
|
4
|
-
attachValueAccessor?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface TrackedFormControl<T> {
|
|
7
|
-
readonly instance: AbstractControl<T>;
|
|
8
|
-
readonly value: Signal<T>;
|
|
9
|
-
readonly errors: Signal<ValidationErrors | null>;
|
|
10
|
-
readonly touched: Signal<boolean>;
|
|
11
|
-
readonly untouched: Signal<boolean>;
|
|
12
|
-
readonly pristine: Signal<boolean>;
|
|
13
|
-
readonly dirty: Signal<boolean>;
|
|
14
|
-
readonly status: Signal<FormControlStatus>;
|
|
15
|
-
readonly valid: Signal<boolean>;
|
|
16
|
-
readonly invalid: Signal<boolean>;
|
|
17
|
-
readonly pending: Signal<boolean>;
|
|
18
|
-
readonly disabled: Signal<boolean>;
|
|
19
|
-
readonly enabled: Signal<boolean>;
|
|
20
|
-
readonly validators: Signal<ValidatorFn[] | null>;
|
|
21
|
-
readonly asyncValidators: Signal<AsyncValidatorFn[] | null>;
|
|
22
|
-
init(): void;
|
|
23
|
-
destroy(): void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Gives reactive access to the properties of the Form Control assigned to the component instance.
|
|
27
|
-
*
|
|
28
|
-
* Call the `init()` method inside `ngOnInit()` to start listening to the Form Control, call `destroy()` to dispose of the listener.
|
|
29
|
-
*
|
|
30
|
-
* @param thisObj the component instance.
|
|
31
|
-
* @returns an object containing all standard form control getters as signals.
|
|
32
|
-
* @example
|
|
33
|
-
* ```
|
|
34
|
-
* export class MyComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
35
|
-
* readonly control = trackFormControl(this);
|
|
36
|
-
*
|
|
37
|
-
* ngOnInit(): void {
|
|
38
|
-
* this.control.init();
|
|
39
|
-
* }
|
|
40
|
-
* ngOnDestroy(): void {
|
|
41
|
-
* this.control.destroy();
|
|
42
|
-
* }
|
|
43
|
-
* // control value accessor implementation ...
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export declare function trackFormControl<T = any>(thisObj: any, options?: {
|
|
48
|
-
attachValueAccessor?: boolean;
|
|
49
|
-
}): TrackedFormControl<T>;
|