UNPKG

ontimize-web-ngx

Version:
118 lines (117 loc) 6.18 kB
import { ChangeDetectorRef, Injector, OnChanges, SimpleChange } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { ILocalStorageComponent } from '../interfaces/local-storage-component.interface'; import { ServiceResponse } from '../interfaces/service-response.interface'; import { DialogService } from '../services/dialog.service'; import { LocalStorageService } from '../services/local-storage.service'; import { OErrorDialogManager } from '../services/o-error-dialog-manager.service'; import { AbstractServiceComponentStateClass } from '../services/state/o-component-state.class'; import { AbstractComponentStateService, DefaultServiceComponentStateService } from '../services/state/o-component-state.service'; import { OQueryDataArgs } from '../types/query-data-args.type'; import { OExpandableContainerComponent } from './expandable-container/o-expandable-container.component'; import { OFormComponent } from './form/o-form.component'; import * as i0 from "@angular/core"; export declare const DEFAULT_INPUTS_O_SERVICE_BASE_COMPONENT: string[]; export declare abstract class AbstractOServiceBaseComponent<T extends AbstractComponentStateService<AbstractServiceComponentStateClass>> implements ILocalStorageComponent, OnChanges { protected injector: Injector; protected localStorageService: LocalStorageService; componentStateService: T; protected dialogService: DialogService; protected oErrorDialogManager: OErrorDialogManager; parentComponent: AbstractOServiceBaseComponent<T>; oattr: string; service: string; serviceType: string; entity: string; queryOnInit: boolean; queryOnBind: boolean; queryOnEvent: any; pageable: boolean; columns: string; keys: string; parentKeys: string; staticData: Array<any>; queryMethod: string; paginatedQueryMethod: string; originalQueryRows: number; protected _queryRows: number; set oQueryRows(value: number); get queryRows(): number; set queryRows(value: number); insertMethod: string; updateMethod: string; deleteMethod: string; storeState: boolean; queryWithNullParentKeys: boolean; queryFallbackFunction: (err: any) => void; protected colArray: Array<string>; protected keysArray: Array<string>; protected _pKeysEquiv: {}; dataArray: Array<any>; protected oattrFromEntity: boolean; protected onRouteChangeStorageSubscription: any; protected onFormDataSubscribe: any; protected querySubscription: Subscription; protected dataService: any; protected loadingSubject: BehaviorSubject<boolean>; loading: Observable<boolean>; protected form: OFormComponent; expandableContainer: OExpandableContainerComponent; protected alreadyStored: boolean; protected queryOnEventSubscription: Subscription; cd: ChangeDetectorRef; protected queryArguments: any[]; protected router: Router; protected actRoute: ActivatedRoute; protected sqlTypes: any; abortQuery: BehaviorSubject<boolean>; constructor(injector: Injector); get state(): AbstractServiceComponentStateClass; initialize(): void; checkColumns(): void; afterViewInit(): void; destroy(): void; protected canSetStaticData(staticData: any): boolean; ngOnChanges(changes: { [propName: string]: SimpleChange; }): void; beforeunloadHandler(): void; getAttribute(): string; getComponentKey(): string; getDataToStore(): any; getRouteKey(): string; getKeys(): string[]; configureService(): void; getDataArray(): any[]; setDataArray(data: any): void; setFormComponent(form: OFormComponent): void; getParentKeysFromContext(parentKeys: object, context: any): {}; clearData(): void; queryData(filter?: any, ovrrArgs?: OQueryDataArgs): void; reloadData(): void; reloadPaginatedDataFromStart(): void; extractKeysFromRecord(item: any): object; getAttributesValuesToQuery(): Array<string>; getQueryArguments(filter: object, ovrrArgs?: OQueryDataArgs): Array<any>; updatePaginationInfo(queryRes: ServiceResponse): void; private updatePaginationContext; getTotalRecordsNumber(): number; getContextComponent(): OFormComponent | OExpandableContainerComponent; getComponentFilter(existingFilter?: any): any; getSqlTypes(): any; getParentKeysValues(): {}; protected updateStateStorage(): void; protected setData(data: any, sqlTypes?: any, replace?: boolean): void; protected registerLocalStorageServiceRouteChange(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AbstractOServiceBaseComponent<any>, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractOServiceBaseComponent<any>, never, never, { "oattr": "attr"; "service": "service"; "serviceType": "service-type"; "entity": "entity"; "queryOnInit": "query-on-init"; "queryOnBind": "query-on-bind"; "queryOnEvent": "query-on-event"; "pageable": "pageable"; "columns": "columns"; "keys": "keys"; "parentKeys": "parent-keys"; "staticData": "static-data"; "queryMethod": "query-method"; "paginatedQueryMethod": "paginated-query-method"; "oQueryRows": "query-rows"; "insertMethod": "insert-method"; "updateMethod": "update-method"; "deleteMethod": "delete-method"; "storeState": "store-state"; "queryWithNullParentKeys": "query-with-null-parent-keys"; "queryFallbackFunction": "query-fallback-function"; }, {}, never, never, false, never>; } export declare class DefaultOServiceBaseComponent extends AbstractOServiceBaseComponent<DefaultServiceComponentStateService> { static ɵfac: i0.ɵɵFactoryDeclaration<DefaultOServiceBaseComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultOServiceBaseComponent, never, never, {}, {}, never, never, false, never>; } export declare class OServiceBaseComponent extends AbstractOServiceBaseComponent<DefaultServiceComponentStateService> { static ɵfac: i0.ɵɵFactoryDeclaration<OServiceBaseComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<OServiceBaseComponent, never, never, {}, {}, never, never, false, never>; }