UNPKG

@versatiledatakit/shared

Version:

Versatile Data Kit Shared library enables reusability of shared features like: NgRx Redux, Error Handlers, Utils, Generic Components, etc.

60 lines (59 loc) 2.65 kB
import { EventEmitter, ChangeDetectorRef, ElementRef } from '@angular/core'; import { FormGroupDirective } from '@angular/forms'; import { ClrLoadingState } from '@clr/angular'; import * as i0 from "@angular/core"; export declare enum FORM_STATE { VIEW = 0, CAN_EDIT = 1, EDIT = 2, ERROR = 3, SUBMIT = 4 } export declare class VdkFormState { state: FORM_STATE; /** * Optional. The section with this name identifier will be excluded from the state change. */ emittingSection: string; /** * Optional. * All the sections in the array will change its state. * All the others will be excluded if this array is not empty. */ sectionsToInclude: string[]; constructor(_state: FORM_STATE, _sectionsToInclude?: string[], _emittingSection?: string); } export declare class VdkFormSectionContainerComponent { private cspForm; private cdr; FORM_STATE: typeof FORM_STATE; _sectionState: FORM_STATE; ClrLoadingState: typeof ClrLoadingState; stopInitialFocus: boolean; canEditSection: boolean; isSubmitEnabled: boolean; sectionName: string; editBtn: string; cancelBtn: string; saveBtn: string; editBtnAriaLabel: string; cancelBtnAriaLabel: string; saveBtnAriaLabel: string; set formState(_formState: VdkFormState); formStateChange: EventEmitter<any>; sectionStateChange: EventEmitter<any>; submitForm: EventEmitter<any>; disableForm: EventEmitter<any>; enableForm: EventEmitter<any>; editButtonEl: ElementRef; constructor(cspForm: FormGroupDirective, cdr: ChangeDetectorRef); showEditBtn(): boolean; showSaveBtn(): boolean; clickEdit(): void; clickCancel(): void; clickSave(): boolean; changeSectionState(_sectionState: FORM_STATE): void; focusEdit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<VdkFormSectionContainerComponent, [{ optional: true; host: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<VdkFormSectionContainerComponent, "vdk-form-section-container", never, { "canEditSection": "canEditSection"; "isSubmitEnabled": "isSubmitEnabled"; "sectionName": "sectionName"; "editBtn": "editBtn"; "cancelBtn": "cancelBtn"; "saveBtn": "saveBtn"; "editBtnAriaLabel": "editBtnAriaLabel"; "cancelBtnAriaLabel": "cancelBtnAriaLabel"; "saveBtnAriaLabel": "saveBtnAriaLabel"; "formState": "formState"; }, { "formStateChange": "formStateChange"; "sectionStateChange": "sectionStateChange"; "submitForm": "submitForm"; "disableForm": "disableForm"; "enableForm": "enableForm"; }, never, [".section-title", ".form-section-readonly", ".form-section-edit"]>; }