import { FormGroup } from '@angular/forms'; import { EditComponent } from '../edit/edit.component'; import { KeyValues } from '../../key-value/models/key-values.model'; export declare abstract class TranslatableEditComponent extends EditComponent { /** * The formGroup, that is displayed. The man details (common) form. */ commonForm: FormGroup; /** * Original JSON value of the initial common form. */ protected originalCommonFormContent: string; /** * The translatable forms. Indexed by locales. */ translatableForms: TranslatableForm[]; /** * Original JSON values of the initial translatable forms. */ protected originalTranslatableFormContents: KeyValues; constructor(); /** * Public property that can be used as change detection. * @returns {boolean} true if there are no changes. */ readonly disabled: boolean; /** * This method extends the EditComponent's setModel method with the filling of the editForm part. */ beforeModelLoaded(): void; /** * This function sets the EditComponent's model before uploading. */ beforeUpdate(): void; /** * Private property that can be used as change detection. * @returns {boolean} true if there are no changes. */ protected readonly noChange: boolean; /** * Private property that can be used as change detection. * @returns {boolean} true if there are no changes. */ protected readonly noChangeTranslatable: boolean; /** * Private property that can be used as change detection. * @returns {boolean} true if there is an invalid form. */ protected readonly hasInvalidForm: boolean; /** * Private property that can be used as change detection. * @returns {boolean} true if there are at least one not empty and valid translatable form. */ protected readonly hasFilledTranslatableForm: boolean; /** * The abstract function, that needs to be implemented in the child element. This method will returns the FormGroup from the T model. * @returns void * public getForms(): void { * this.commonForm = this.model.getFormGroup(); * } */ protected abstract getForms(): void; /** * The abstract function, that needs to be implemented in the child element. This method will transform the FormGroup into the model. * @returns void * public loadModelFromForms(): void { * this.model.loadFromFormGroup(this.form); * } */ protected abstract loadModelFromForms(): void; } export interface TranslatableForm { locale: string; form: FormGroup; }