@pepperi/lib
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.
107 lines (106 loc) • 5.36 kB
TypeScript
import { OnInit, OnDestroy, KeyValueDiffers, EventEmitter, OnChanges, DoCheck } from '@angular/core';
import { FormGroup, FormBuilder } from '@angular/forms';
import { TranslateService } from '@ngx-translate/core';
import { DialogService } from '@pepperi/lib/dialog';
import { Subscription } from 'rxjs';
import { LAYOUT_TYPE, FIELD_TYPE, CustomizationService, UIControl, UIControlField, ObjectSingleData, ObjectsDataRowCell, PepperiFieldBase } from '@pepperi/lib';
import * as i0 from "@angular/core";
export declare class PepperiObjectChangedData {
Id: string;
ApiName: string;
Value: string;
ControlType: string;
constructor(id: string, apiName: string, value: string, controlType?: string);
}
export declare class PepperiFieldClickedData {
Id: string;
ApiName: string;
FieldType: FIELD_TYPE;
IdType: string;
Which: any;
Value: any;
Editable: boolean;
OtherData: any;
constructor(id: string, apiName: string, idType: any, which: any, value: any, fieldType: FIELD_TYPE, otherData?: any);
}
export declare class PepperiFormComponent implements OnInit, DoCheck, OnChanges, OnDestroy {
private dialogService;
private customizationService;
private translate;
fb: FormBuilder;
isReport: boolean;
uiControlHeader: UIControl;
lockEvents: boolean;
canEditObject: boolean;
pepperiObjectInput: ObjectSingleData;
isActive: boolean;
layoutType: LAYOUT_TYPE;
listType: string;
objectId: string;
parentId: string;
searchCode: string;
showTitle: boolean;
firstFieldAsLink: boolean;
isCardView: boolean;
checkForChanges: any;
pageType: string;
notifyValueChanged: EventEmitter<PepperiObjectChangedData>;
formValidationChanged: EventEmitter<boolean>;
childClicked: EventEmitter<void>;
childChanged: EventEmitter<void>;
notifyFieldClicked: EventEmitter<any>;
notifyMenuItemClicked: EventEmitter<any>;
LAYOUT_TYPE: typeof LAYOUT_TYPE;
isLocked: boolean;
formGutterSize: any;
cardGutterSize: any;
rowHeight: any;
lastFocusedField: any;
matrixIsLast: boolean;
form: FormGroup;
differ: any;
rows: Array<PepperiFieldBase[]>;
fields: PepperiFieldBase[];
columns: number;
hasMenuFloatingOnOtherField: boolean;
menuField: any;
menuDataField: any;
hasCampaignField: any;
hasCampaignDataField: any;
indicatorsField: any;
indicatorsDataField: any;
shouldReloadForm: boolean;
eventServiceSub: Subscription;
jsonLib: JSON;
static convertAddressFields(controlField: any, addressFields: Array<ObjectsDataRowCell>, canEditObject: boolean): PepperiFieldBase[];
static isMatrixField(apiNameToCheck: string): boolean;
static doesFieldHavaFloatingField(controlField: any, floatingField: any): boolean;
static getOptionsForCustomField(controlField: any, dataField: any, canEditObject: boolean): any;
static convertToCustomField(controlField: any, dataField: any, canEditObject: boolean, menuField: any, hasCampaignField: any, indicatorsField: any, objectId: any, parentId: any, searchCode: any): PepperiFieldBase;
static getFieldFormattedValue(field: PepperiFieldBase): string;
private static toControlGroup;
constructor(dialogService: DialogService, customizationService: CustomizationService, translate: TranslateService, fb: FormBuilder, differs: KeyValueDiffers);
showFormValidationMessage(): void;
ngOnInit(): void;
ngDoCheck(): void;
ngOnChanges(changes: any): void;
ngOnDestroy(): void;
getUiControlFields(): Array<UIControlField>;
initFieldsStructure(fields: PepperiFieldBase[], maxRow: number): void;
setForm(isForUpdate?: boolean): void;
initForm(changes: any): void;
updateForm(cleanLastFocusedField?: boolean): void;
ReloadForm(): void;
private getFormControlById;
private setSpecialFields;
convertCustomFields(controlFields: Array<any>, dataFields: Array<any>): PepperiFieldBase[];
onValueChanged(valueChanged: any, isEditModal?: boolean): void;
onChildClicked(childClicked: any): void;
onChildChanged(childChanged: any): void;
onFormValidationChanged(formValidationChanged: any): void;
onClick(fieldClickEvent: any): void;
onMenuItemClicked(fieldClickEvent: any): void;
getInternalLinkHref(): string;
static ɵfac: i0.ɵɵFactoryDef<PepperiFormComponent, never>;
static ɵcmp: i0.ɵɵComponentDefWithMeta<PepperiFormComponent, "pep-form", never, { "isReport": "isReport"; "uiControlHeader": "uiControlHeader"; "lockEvents": "lockEvents"; "canEditObject": "canEditObject"; "pepperiObjectInput": "pepperiObjectInput"; "isActive": "isActive"; "layoutType": "layoutType"; "listType": "listType"; "objectId": "objectId"; "parentId": "parentId"; "searchCode": "searchCode"; "showTitle": "showTitle"; "firstFieldAsLink": "firstFieldAsLink"; "isCardView": "isCardView"; "checkForChanges": "checkForChanges"; "pageType": "pageType"; }, { "notifyValueChanged": "notifyValueChanged"; "formValidationChanged": "formValidationChanged"; "childClicked": "childClicked"; "childChanged": "childChanged"; "notifyFieldClicked": "notifyFieldClicked"; "notifyMenuItemClicked": "notifyMenuItemClicked"; }, never, never>;
}