import { EventEmitter, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { BaseModelInterface } from '../../models/base/base-model.model'; import { PaginateInterface } from '../../models/paginate/paginate.interface'; import { HelperServiceInterface } from '../../services/helper/helper-service.interface'; import { BaseListComponentInterface } from './base-list-component.interface'; import * as i0 from "@angular/core"; export declare abstract class BaseListComponent> implements OnInit, BaseListComponentInterface { private type; isModal: boolean; isEmbed: boolean; loadData: boolean; models: T[]; filter: any; set data(value: any); editModel: EventEmitter; deleteModel: EventEmitter; deleteMultipleModels: EventEmitter; saveModel: EventEmitter; model: T; paginate: PaginateInterface; transformToLowerCase: boolean; helperService: HelperServiceInterface; activatedRoute: ActivatedRoute; currentPageNumber: number; constructor(type: new () => T); ngOnInit(): void; /** * Load datas. If you set `filter` options the request will be a "search" (POST request), otherwise the request * will be a "get all" (GET request). Of course only if the model not use the LocalStorage. */ load(): void; /** * Set the data loader request based on filter and paginate state. */ private setGetRequest; /** * Return true if object has any keys. Helps to find out filter has any key or not. * * @param object JSON object */ private isEmptyObject; /** * Reverse the model's boolean value and send to the storage the change to save. * * @param model any model * @param field model's field */ toggleCheckbox(model: T, field: string): void; /** * Call on start editing a model. If model use LocalStorage it will present an emit, otherwise it will navigate * to the `/{model.api_endpoint}/edit/{model.id}`. Use only if the model has `id` and it's not `0`. */ edit(model: T): void; /** * Delete a model instance. If the component used as child (`isEmbed`) it will do a splice only and nothing to * save. Otherwise it will send a delete request to the storage. * * @param model instance to delete */ delete(model: T): void; /** * Delete multiple models in one move. * * @param models instances of model */ deleteMultiple(models: T[]): void; /** * Change the page and looad datas. If you set `filter` options the request will be a "search" (POST request), * otherwise the request will be a "get all" (GET request). Of course only if the model not use the LocalStorage. * * @param turnToPage number of new page */ changePage(turnToPage: number): void; /** * Save the model. * * @param model instance of model */ save(model: T): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, { "isModal": "isModal"; "isEmbed": "isEmbed"; "loadData": "loadData"; "models": "models"; "filter": "filter"; "data": "data"; }, { "editModel": "editModel"; "deleteModel": "deleteModel"; "deleteMultipleModels": "deleteMultipleModels"; "saveModel": "saveModel"; }, never, never, false, never>; } //# sourceMappingURL=base-list.component.d.ts.map