UNPKG

@obliczeniowo/elementary

Version:
113 lines (108 loc) 5.07 kB
import * as i0 from '@angular/core'; import { EventEmitter, ElementRef } from '@angular/core'; import * as i7 from '@angular/forms'; import { ControlValueAccessor } from '@angular/forms'; import * as i4 from '@obliczeniowo/elementary/input'; import { InputWrappersDefaultSettingsService } from '@obliczeniowo/elementary/input'; import * as i3 from '@angular/common'; import * as i5 from '@obliczeniowo/elementary/icons'; import * as i6 from '@obliczeniowo/elementary/buttons'; import * as i8 from '@obliczeniowo/elementary/animations'; type EditInputType = 'text' | 'number' | 'password'; interface EditInputFormValue { value: string; type?: EditInputType; label?: string; } declare class EditInputComponent implements ControlValueAccessor { private readonly settings; _value: string; set value(value: string); get value(): string; label: string; /** * Enable type text animation for label */ labelAnimation: boolean; /** * Mode when true it's in edit state, other way it's in display only */ mode: boolean; disabled?: any; editOnly: boolean; /** * min value for number input */ min: i0.InputSignal<number | undefined>; /** * max value for number input */ max: i0.InputSignal<number | undefined>; /** * Style of displayed input */ display: i0.InputSignal<"none" | "outlined" | "underlined">; formatter: i0.InputSignal<(value: string | number) => string | number>; type: EditInputType; changed: EventEmitter<{ text: string; numeric?: number; }>; input?: ElementRef<HTMLInputElement>; current: string; constructor(settings: InputWrappersDefaultSettingsService); setValue(event: any): void; save(): void; cancel(): void; onEdit(): void; onChange: (value: EditInputFormValue) => void; onTouched: () => void; writeValue(value: EditInputFormValue): void; registerOnChange(onChange: any): void; registerOnTouched(onTouched: any): void; setDisabledState(disabled: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<EditInputComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<EditInputComponent, "obl-edit-input", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelAnimation": { "alias": "labelAnimation"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "editOnly": { "alias": "editOnly"; "required": false; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "formatter": { "alias": "formatter"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; }; }, { "changed": "changed"; }, never, ["[prefix]", "[suffix]", "[edit-prefix]", "[edit-suffix]"], false, never>; } declare class EditTextareaComponent implements ControlValueAccessor { private readonly settings; _value: string; set value(value: string); get value(): string; label: string; /** * Enable type text animation for label */ labelAnimation: boolean; mode: boolean; disabled: boolean; changed: EventEmitter<string>; textarea?: ElementRef<HTMLTextAreaElement>; current: string; constructor(settings: InputWrappersDefaultSettingsService); setValue(event: any): void; save(): void; cancel(): void; onChange: (value: { value: string; label?: string; }) => void; onTouched: () => void; writeValue(value: { value: string; label?: string; }): void; registerOnChange(onChange: any): void; registerOnTouched(onTouched: any): void; setDisabledState(disabled: boolean): void; onEdit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<EditTextareaComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<EditTextareaComponent, "obl-edit-textarea", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelAnimation": { "alias": "labelAnimation"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "changed": "changed"; }, never, never, false, never>; } declare class EditsModule { static ɵfac: i0.ɵɵFactoryDeclaration<EditsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<EditsModule, [typeof EditInputComponent, typeof EditTextareaComponent], [typeof i3.CommonModule, typeof i4.InputModule, typeof i5.IconsModule, typeof i6.ButtonsModule, typeof i7.ReactiveFormsModule, typeof i8.AnimationsModule], [typeof EditInputComponent, typeof EditTextareaComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<EditsModule>; } export { EditInputComponent, EditTextareaComponent, EditsModule }; export type { EditInputFormValue, EditInputType };