projects/ng-dynamic-forms/core/src/lib/model/dynamic-input-control.model.ts
Properties |
|
Methods |
Protected
constructor(config: DynamicInputControlModelConfig
|
|||||||||
|
Parameters :
|
| autoComplete |
Type : string
|
Decorators :
@serializable()
|
| autoFocus |
Type : boolean
|
Decorators :
@serializable()
|
| maxLength |
Type : number | null
|
Decorators :
@serializable()
|
| minLength |
Type : number | null
|
Decorators :
@serializable()
|
| placeholder |
Type : string
|
Decorators :
@serializable()
|
| prefix |
Type : string | null
|
Decorators :
@serializable()
|
| readOnly |
Type : boolean
|
Decorators :
@serializable()
|
| spellCheck |
Type : boolean
|
Decorators :
@serializable()
|
| suffix |
Type : string | null
|
Decorators :
@serializable()
|
| Private _value |
Type : T | null
|
Decorators :
@serializable('value')
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:22
|
| additional |
Type : literal type | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:18
|
| hint |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:19
|
| required |
Type : boolean
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:20
|
| tabIndex |
Type : number | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:21
|
| Private Readonly value$ |
Type : BehaviorSubject<T>
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:24
|
| Readonly valueChanges |
Type : Observable<T>
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:26
|
| _disabled |
Type : boolean
|
Decorators :
@serializable('disabled')
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:28
|
| asyncValidators |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:27
|
| controlTooltip |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:34
|
| Private Readonly disabled$ |
Type : BehaviorSubject<boolean>
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:42
|
| Readonly disabledChanges |
Type : Observable<boolean>
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:44
|
| errorMessages |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:29
|
| hidden |
Type : boolean
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:30
|
| id |
Type : string
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:31
|
| label |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:32
|
| labelTooltip |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:33
|
| layout |
Type : DynamicFormControlLayout | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:35
|
| name |
Type : string
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:36
|
| parent |
Type : DynamicPathable | null
|
Default value : null
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:37
|
| relations |
Type : DynamicFormControlRelation[]
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:38
|
| Abstract Readonly type |
Type : string
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:46
|
| updateOn |
Type : DynamicFormHook | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:39
|
| validators |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:40
|
| _disabled |
Type : boolean
|
Decorators :
@serializable('disabled')
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:28
|
| asyncValidators |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:27
|
| controlTooltip |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:34
|
| Private Readonly disabled$ |
Type : BehaviorSubject<boolean>
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:42
|
| Readonly disabledChanges |
Type : Observable<boolean>
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:44
|
| errorMessages |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:29
|
| hidden |
Type : boolean
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:30
|
| id |
Type : string
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:31
|
| label |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:32
|
| labelTooltip |
Type : string | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:33
|
| layout |
Type : DynamicFormControlLayout | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:35
|
| name |
Type : string
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:36
|
| parent |
Type : DynamicPathable | null
|
Default value : null
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:37
|
| relations |
Type : DynamicFormControlRelation[]
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:38
|
| Abstract Readonly type |
Type : string
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:46
|
| updateOn |
Type : DynamicFormHook | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:39
|
| validators |
Type : DynamicValidatorsConfig | null
|
Decorators :
@serializable()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:40
|
| getAdditional | |||||||||
getAdditional(key: string, defaultValue?: any | null)
|
|||||||||
|
Inherited from
DynamicFormValueControlModel
|
|||||||||
|
Defined in
DynamicFormValueControlModel:50
|
|||||||||
|
Parameters :
Returns :
any
|
| toJSON |
toJSON()
|
|
Inherited from
DynamicFormValueControlModel
|
|
Defined in
DynamicFormValueControlModel:80
|
|
Returns :
any
|
| toJSON |
toJSON()
|
|
Inherited from
DynamicFormControlModel
|
|
Defined in
DynamicFormControlModel:80
|
|
Returns :
any
|
import { DynamicFormValueControlModel, DynamicFormValueControlModelConfig } from "./dynamic-form-value-control.model";
import { DynamicFormControlLayout } from "./misc/dynamic-form-control-layout.model";
import { serializable } from "../decorator/serializable.decorator";
import { isBoolean, isNumber } from "../utils/core.utils";
export interface DynamicInputControlModelConfig<T> extends DynamicFormValueControlModelConfig<T> {
autoComplete?: string;
autoFocus?: boolean;
maxLength?: number;
minLength?: number;
placeholder?: string;
prefix?: string;
readOnly?: boolean;
spellCheck?: boolean;
suffix?: string;
}
export abstract class DynamicInputControlModel<T> extends DynamicFormValueControlModel<T> {
@serializable() autoComplete: string;
@serializable() autoFocus: boolean;
@serializable() maxLength: number | null;
@serializable() minLength: number | null;
@serializable() placeholder: string;
@serializable() prefix: string | null;
@serializable() readOnly: boolean;
@serializable() spellCheck: boolean;
@serializable() suffix: string | null;
protected constructor(config: DynamicInputControlModelConfig<T>, layout?: DynamicFormControlLayout) {
super(config, layout);
this.autoComplete = config.autoComplete || "on";
this.autoFocus = isBoolean(config.autoFocus) ? config.autoFocus : false;
this.maxLength = isNumber(config.maxLength) ? config.maxLength : null;
this.minLength = isNumber(config.minLength) ? config.minLength : null;
this.placeholder = config.placeholder || "";
this.prefix = config.prefix || null;
this.readOnly = isBoolean(config.readOnly) ? config.readOnly : false;
this.spellCheck = isBoolean(config.spellCheck) ? config.spellCheck : false;
this.suffix = config.suffix || null;
}
}