import * as i0 from '@angular/core'; import { OnInit, ViewContainerRef, ComponentFactoryResolver, AfterViewInit, QueryList, OnDestroy, EventEmitter, ElementRef, Type, OnChanges, SimpleChanges, ComponentRef, PipeTransform } from '@angular/core'; import * as i34 from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table'; import * as i25 from '@angular/common/http'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, Subscription, Subject, BehaviorSubject } from 'rxjs'; import * as i44 from '@angular/material/dialog'; import { MatDialogRef, MatDialog } from '@angular/material/dialog'; import * as i36 from '@angular/material/paginator'; import { MatPaginator, PageEvent } from '@angular/material/paginator'; import { SelectionModel } from '@angular/cdk/collections'; import * as i26 from '@angular/router'; import { Router, ActivatedRoute } from '@angular/router'; import * as _angular_forms from '@angular/forms'; import { FormGroup, FormControl, FormArray, ControlValueAccessor } from '@angular/forms'; import * as i47 from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar'; import * as _angular_platform_browser from '@angular/platform-browser'; import { DomSanitizer, Title } from '@angular/platform-browser'; import { AmazingTimePickerService } from '@jonijnm/amazing-time-picker'; import * as i23 from '@angular/common'; import * as i27 from '@angular/material/datepicker'; import * as i28 from '@angular/material/core'; import * as i29 from '@angular/material/toolbar'; import * as i30 from '@angular/material/sidenav'; import * as i31 from '@angular/material/chips'; import * as i32 from '@angular/material/list'; import * as i33 from '@angular/material/icon'; import * as i35 from '@angular/material/card'; import * as i37 from '@angular/material/button'; import * as i38 from '@angular/material/menu'; import * as i39 from '@angular/material/progress-bar'; import * as i40 from '@angular/material/progress-spinner'; import * as i41 from '@angular/material/form-field'; import * as i42 from '@angular/material/input'; import * as i43 from '@angular/material/checkbox'; import * as i45 from '@angular/material/button-toggle'; import * as i46 from '@angular/material/grid-list'; import * as i48 from '@angular/material/select'; import * as i49 from '@angular/material/tabs'; import * as i50 from '@angular/material/expansion'; import * as i51 from '@angular/material/autocomplete'; import * as i52 from '@cloudinn/mat-select-autocomplete'; import * as i53 from '@ngx-translate/core'; declare class AttachmentsService { private http; private _attachments; id: string; constructor(http: HttpClient); get attachmentsFormData(): any[]; set attachmentsFormData(value: any[]); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ApiService { private http; private attachmentsService; constructor(http: HttpClient, attachmentsService: AttachmentsService); fetch(api: string, params?: HttpParams): Observable; download(api: string, params?: HttpParams): Observable; put(api: string, body: any, params?: {}): Observable; post(api: string, body: any, fieldName?: any, params?: {}): Observable; delete(api: string, payload: any, join?: boolean): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ListingDialogComponent implements OnInit { private ref; private container; private resolver; data: any; metadata: Metadata; listingView: ViewContainerRef; constructor(ref: MatDialogRef, container: ViewContainerRef, resolver: ComponentFactoryResolver, data: any); ngOnInit(): void; picked(value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ListingComponent implements OnInit, AfterViewInit { private api; private viewContainerRef; private dialog; private resolver; private listingDialogRef; private router; private activeRoute; paginator: MatPaginator; viewConfig: ListViewer; mode: any; is_actions_set: boolean; openComponent: boolean; forcedSearchParams: any; dataSource: MatTableDataSource; searchParams: HttpParams; columns: any[]; displayColumns: string[]; selectedRows: any[]; resultsCount: number; isLoading: boolean; initialLoading: boolean; userHasPermission: boolean; defaultFilters: {}; queryParams: {}; pages: number; searchComponent: ViewContainerRef; customComponent: ViewContainerRef; customElement: QueryList; selection: SelectionModel; constructor(api: ApiService, viewContainerRef: ViewContainerRef, dialog: MatDialog, resolver: ComponentFactoryResolver, listingDialogRef: MatDialogRef, router: Router, activeRoute: ActivatedRoute); ngOnInit(): void; ngAfterViewInit(): void; private prepareColumns; private generateCode; private populateDataTable; populateParams(defaultFilter?: any): void; changeView(view: any): void; getColId(id: string): string; openEditView(id: number): void; fetch(): void; addCustomElementColumnsToTemplate(): void; addCustomComponent(value: any): void; onChange(ev: PageEvent): void; searchClicked(searchParams: any): void; setMultipleForeignFieldParams(paramKey: string, paramValue: any): HttpParams; isAllSelected(): boolean; /** Selects all rows if they are not all selected; otherwise clear selection. */ masterToggle(): void; /** The label for the checkbox on the passed row */ checkboxLabel(row?: any): string; onAction(action: any): void; _picked(value: any): void; cancel(): void; deleteRow(id: any): void; isString(val: any): boolean; openCreationPopUp(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FormService { constructor(); create(config: FieldConfig[], mode?: string): FormGroup; update(config: any, data: any): FormGroup; checkIfEmptyArray(val: any): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class IframeModalComponent implements OnInit { data: any; iframeDialog: MatDialogRef; private sanitizer; src: any; title: string; constructor(data: any, iframeDialog: MatDialogRef, sanitizer: DomSanitizer); ngOnInit(): void; closeDialog(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SearchDialogComponent implements OnInit { private ref; private container; private resolver; data: any; metadata: Metadata; formView: ViewContainerRef; constructor(ref: MatDialogRef, container: ViewContainerRef, resolver: ComponentFactoryResolver, data: any); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ModelFormComponent implements OnInit, OnDestroy { private api; private formService; private _snackBar; private dialog; private router; private creationDialogRef; private iframeModal; private attacmentsService; viewConfig: FormViewer; expanded: boolean; mode: string; id: any; submit: EventEmitter; iframe: ElementRef; formGroup: FormGroup; formsets: FieldConfig[]; subFormsets: FieldConfig[]; is_ready: boolean; controlsConfig: FieldConfig[]; actions: {}; submitButtonText: string; _visibleControls: FieldConfig[]; disabled: boolean; initialLoading: boolean; fileUrl: any; fileName: any; openedInaialog: boolean; dropDownActionButtons: any; normalActionButtons: any; response: any; isExpanded: boolean; viewMode: any; iframeSrc: string; subscriptions: Subscription; constructor(api: ApiService, formService: FormService, _snackBar: MatSnackBar, dialog: MatDialog, router: Router, creationDialogRef: MatDialogRef, iframeModal: MatDialogRef, attacmentsService: AttachmentsService); ngOnInit(): void; appendIframeSrc(id?: any): void; toggleExpansion(): void; updateFormBasedOnWindowMessages(): void; editForm(id: any, state?: any): void; populateParams(): HttpParams; getFormErrors(): void; onAction(link: any): void; private handleRequest; openIframe(link: any): void; openActionDialog(options: any): void; fillFormControls(link: any): void; requestAction(link: any): void; saveAndEdit(): void; saveAndAdd(): void; save(): void; showSuccessMessage(): void; isEmptyObject(obj: any): boolean; removeEmptyFormsets(): void; _onSubmit(action_type?: any): void; private _submitSearchFormWithFilters; changeFieldsBeforeSending(): void; modifyDateFields(ctrl: any): void; handlePostSubmit(action_type: any, res: any): void; checkForirgnKey(ctrl: any): void; elementDeleted(event: any): void; applyPostSubmit(field: FieldConfig, id: string, options?: any): void; displayError(error: any): void; checkForPostSubmit(): FieldConfig[]; updateForiegnKeyField(element: any): void; updateForiegnKeyMultipleField(element: any): void; performAction(type: any): void; _onReset(): void; openSnackBar(message: string, type: string): void; getStyles(link: any): any; cancel(ref: any): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface ViewConfig { title: string; breadcrumbs: any[]; metadata: Metadata; component: Type; iframeMode?: IFrameMode; } interface ListViewer extends ViewConfig { search: { enabled: boolean; view: FormViewer; search_key?: string[]; mode?: string; creationView?: FormView; }; external_link?: { link: string; params: string[]; }; dialog_mode?: boolean; dialog_settings?: { add_new_btn?: boolean; }; pagination?: { enabled: boolean; pageSize?: number; }; } interface FormActions { [key: string]: any; } interface FormViewer extends ViewConfig { layout: string; controls: FieldConfig[]; actions: FormActions[]; external_link?: { link: string; params: string[]; }; viewMode?: string; } interface IframeOptions { external_link: { link: string; params: string[]; }; viewMode: string; } declare enum IFrameMode { POP_UP = "pop_up", NEW_PAGE = "new_page" } declare class FormView implements FormViewer { metadata: Metadata; title: string; breadcrumbs: any[]; component: typeof ModelFormComponent; layout: string; controls: FieldConfig[]; actions: any[]; search_key: any; viewMode: string; external_link: any; constructor(metadata: Metadata, options?: IframeOptions); } interface ViewSettingsObj { isDialog: boolean; dialog_settings?: { add_new_btn?: boolean; }; search_settings: { enabled: boolean; search_key?: string[]; mode: string; creationView?: FormView; }; external_link?: { link: string; params: string[]; }; pagination?: { enabled: boolean; pageSize: number; }; iframeMode?: IFrameMode; } declare class ListingView implements ListViewer { metadata: Metadata; viewSettings: ViewSettingsObj; title: string; breadcrumbs: any[]; component: typeof ListingComponent; search: any; external_link: any; dialog_mode: boolean; dialog_settings: any; pagination: any; defaults: {}; iframeMode: IFrameMode; constructor(metadata: Metadata, viewSettings: ViewSettingsObj); setDefaults(values: any): void; } interface ControlConfig { type?: string; subFields?: FieldConfig[]; } interface FieldSetControlConfig extends ControlConfig { fields: FieldConfig[]; collapsibleFields?: FieldConfig[]; } interface FormSetControlConfig extends ControlConfig { fields: FieldConfig[]; } interface ForeignKeyControlConfig extends ControlConfig { metadata: Metadata; viewConfig?: ViewConfig; } interface SelectControlConfig extends ControlConfig { multiple?: boolean; choices: { [key: string]: any; }[]; } interface AutoCompleteControlConfig extends SelectControlConfig { autocomplete: { api?: string; valueField: string; labelFields: string[]; }; } interface TextAreaControlConfig extends ControlConfig { rowSpan?: Number; } interface TouchingFields { field: string; change_value: any; field_value: any; } declare class FieldConfig { name: string; label: string; expanded?: boolean; disabled?: boolean; type?: 'text' | 'number' | 'boolean' | 'textArea' | 'select' | 'file' | 'date' | 'datetime' | 'foreignKey' | 'formset' | 'datetime' | 'time' | 'fieldset' | 'custom_element' | 'custom_component' | 'foreignKey_multiple'; isEditable?: boolean; customElement?: CustomElementConfig; customComponent?: CustomElementConfig; isSearchable?: boolean; isHidden?: boolean; control?: ControlConfig | ForeignKeyControlConfig | TextAreaControlConfig | SelectControlConfig | AutoCompleteControlConfig | FormSetControlConfig | FieldSetControlConfig; validators?: any[]; hasErrorWhen?: { field_name: string; error: string; }[]; choices?: any[]; defaultValue?: any; iContains?: boolean; isClickable?: boolean; resolveValueFrom?: string; keyOnSearch?: string; displayFrom?: string[]; listFrom?: string; touching?: TouchingFields; cssWidth?: string; cssMaxWidth?: string; maxlength?: string; equalsTo?: string; postSubmitHookActions?: PostSubmitAction[]; translate?: boolean; errorMessages?: ErrorMessage[]; cellStyle?: {}; dropDownDisplay?: string; DatePickerStartAt?: any; showInListing?: boolean; validateOptionSelected?: boolean; } interface CustomElementConfig { component: any; inputs?: { key: string; value?: any; readValueFrom?: string; }[]; outputs?: { name: string; functionToExcute: Function; }[]; } interface ErrorMessage { type: string; message: string; } interface PostSubmitAction { apiUrl: string; type: string; } interface Metadata { expanded?: boolean; name: string; optionName?: string; queryParams?: string[]; filter?: boolean; includeParams?: boolean; search_key?: string; applyFunctions?: boolean; rows?: Subject; label: string; api: string; model: any; fields: FieldConfig[]; collapsibleFields?: FieldConfig[]; subFields?: FieldConfig[]; listingFields: string[]; searchParam?: string; filter_key?: string[]; default_filters?: any[]; formActions: FormActions[]; bulkActions?: any[]; externalViews?: any[]; isDialog?: boolean; sortBy?: string; returnRecordsIDS?: boolean; onDestroyFunction?: Function; selectFromGridFunction?: Function; containsComponent?: boolean; } declare class ForeignKeyFieldComponent implements OnChanges, OnInit { private api; private dialog; formGroup: FormGroup; forcedSearchParams: any; config: FieldConfig; display_name: FieldConfig; initialChoices: any[]; reset: Subject; controlConfig: ForeignKeyControlConfig; availableOptions: Observable; _underlyingCtrl: FormControl; hasValue: boolean; constructor(api: ApiService, dialog: MatDialog); ngOnChanges(): void; ngOnInit(): void; selectOption(value: any): void; fetchById(id?: number | string): void; fetch(): void; displayFn(option: any): any; _filter(value: string): Observable; _setControlValue(value: any): void; openListingDialog(event: Event): void; removeSelection(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ForeignKeyFiledMultipleComponent implements OnChanges { private api; private dialog; visible: boolean; options$: BehaviorSubject; selectedOptions: any[]; formGroup: FormGroup; mode: string; config: FieldConfig; reset: Subject; controlConfig: ForeignKeyControlConfig; _underlyingCtrl: FormControl; currentControl: FormControl; constructor(api: ApiService, dialog: MatDialog); ngOnChanges(): void; fetch(value?: string): void; selected(event: any): void; openListingDialog(event: Event): void; setFormControlValue(value: unknown[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FormFieldComponent implements OnChanges, OnInit { formGroup: FormGroup; mode: string; forcedSearchParams: any; config: FieldConfig; choices: any[]; reset: Subject; elementDeleted: EventEmitter; type: string; filteredOptions: Observable; foreign_model?: Metadata; get f(): { [key: string]: _angular_forms.AbstractControl; }; constructor(); ngOnChanges(changes: SimpleChanges): void; deleteAttachment(event: any): void; ngOnInit(): void; checkValidity(): void; getFieldErrorMessage(type: string): string | ErrorMessage; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FormsetComponent implements OnChanges { private formService; formGroup: FormGroup; config: FieldConfig; mode: any; control: FormSetControlConfig; subControl: FormSetControlConfig; formArray: FormArray; choices: {}; constructor(formService: FormService); ngOnChanges(changes: SimpleChanges): void; getHiddenField(): FieldConfig; addForm(): void; delete(index: any): void; trackByFn(index: any): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SelectFieldComponent implements OnInit, OnChanges { formGroup: FormGroup; config: FieldConfig; controlConfig: SelectControlConfig; get f(): { [key: string]: _angular_forms.AbstractControl; }; constructor(); ngOnChanges(): void; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TextAreaFieldComponent implements OnInit { formGroup: FormGroup; config: FieldConfig; controlConfig: TextAreaControlConfig; constructor(); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FileUploadComponent implements ControlValueAccessor { private host; onChange: Function; file: File[] | null; emitFiles(event: FileList): void; constructor(host: ElementRef); writeValue(value: null): void; deleteFile(): void; registerOnChange(fn: Function): void; registerOnTouched(fn: Function): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DateTimePickerComponent implements OnInit { formGroup: any; config: any; selectedMoment: FormControl; constructor(); ngOnInit(): void; setValue(value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TimePickerComponent implements OnInit { private atp; formGroup: FormGroup; config: any; selectedTime: FormControl; constructor(atp: AmazingTimePickerService); ngOnInit(): void; openTimePicker(time: any): void; setTimes(initial_time: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HistoryComponent implements OnInit { data: any; historyDialog: MatDialogRef; constructor(data: any, historyDialog: MatDialogRef); logs: any; dateTimeFormat: { dateFormat: string; timeFormat: string; }; ngOnInit(): void; closeDialog(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AttachmentsComponent implements OnChanges { private attacmentsService; constructor(attacmentsService: AttachmentsService); formGroup: any; config: any; deleteAttachment: EventEmitter; attachments: Array; uploadedAttachments: any[]; attachments_delete: any[]; allowedTypes: string[]; fileInput: FileUploadComponent; attachments_service_conatiner: any[]; get formControls(): any; ngOnChanges(): void; subscribeToFormChanges(): void; _handleReaderLoaded(file: any): void; ifFileExsits(attachments: any[], file: any): boolean; addFile(file: any): void; splitFile(file: any): { extension: any; name: any; }; isUploaded(file: any): boolean; deleteFile(file: any, index: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class Registry { forms: { [key: string]: FormGroup; }; screens: { [key: string]: ViewConfig; }; metadata: { [key: string]: Metadata; }; isReady: BehaviorSubject; constructor(); registerMetadata(metadata: Metadata): void; registerScreen(url: string, screen: ViewConfig): void; registerForm(metadata: Metadata, formClass: any): void; register(meta: {}): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ScreenWrapperComponent implements OnInit { data: any; dialogRef: MatDialogRef; private reg; private route; private container; private resolver; private title; screen: ViewConfig; component: Type; componentRef: ComponentRef; searchComponentRef: ComponentRef; dynamicComponentContainer: ViewContainerRef; constructor(data: any, dialogRef: MatDialogRef, reg: Registry, route: ActivatedRoute, container: ViewContainerRef, resolver: ComponentFactoryResolver, title: Title); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class Navigator { navItems: EventEmitter; activeNavItem: any; path: EventEmitter; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ErrorHanlderService { constructor(); private errorSubject; setError(error: any): void; defineErrorMessages(error: any, type: any): void; getError(): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ErrorHandlingComponent implements OnDestroy { private errorService; private errorSubscription; strErrors: any[]; errors: any[]; keys: any[]; hasErr: boolean; constructor(errorService: ErrorHanlderService); setError(error: any): void; setForbiddenErrors(error: any): void; declareError(key: any, error: any): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SafePipe implements PipeTransform { private sanitizer; constructor(sanitizer: DomSanitizer); transform(url: any): _angular_platform_browser.SafeResourceUrl; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ActionDialogComponent { dialogData: any; dialogRef: MatDialogRef; constructor(dialogData: any, dialogRef: MatDialogRef); dialogAction(option: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GetSelectorPipe implements PipeTransform { transform(selector: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class DateTimeFormatPipe implements PipeTransform { transform(value: string, format: { dateFormat: string; timeFormat: string; }): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class CrudModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ApiService, AttachmentsComponent, CrudModule, DateTimePickerComponent, ErrorHanlderService, FieldConfig, FileUploadComponent, ForeignKeyFieldComponent, ForeignKeyFiledMultipleComponent, FormFieldComponent, FormService, FormView, FormsetComponent, HistoryComponent, IFrameMode, ListingComponent, ListingDialogComponent, ListingView, ModelFormComponent, Navigator, Registry, ScreenWrapperComponent, SelectFieldComponent, TextAreaFieldComponent, TimePickerComponent }; export type { AutoCompleteControlConfig, ControlConfig, CustomElementConfig, ErrorMessage, FieldSetControlConfig, ForeignKeyControlConfig, FormActions, FormSetControlConfig, FormViewer, IframeOptions, ListViewer, Metadata, PostSubmitAction, SelectControlConfig, TextAreaControlConfig, TouchingFields, ViewConfig, ViewSettingsObj }; //# sourceMappingURL=index.d.ts.map