@c10t/nice-component-library
Version:
nice-component-library
48 lines (47 loc) • 4.06 kB
TypeScript
import { ToastrService } from 'ngx-toastr';
import { TranslateService } from '@ngx-translate/core';
import { MatTableDataSource } from '@angular/material/table';
import { TablePagingRequestModel } from '../models/components/table-paging-request.model';
import { BaseModel } from '../models/base.model';
import { AbstractControl, FormGroup, NgControl } from '@angular/forms';
import { SelectModel } from '../models/components/select.model';
import { FlatTreeModel } from '../models/components/flat-tree.model';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { CvaCustomDialogComponent } from '../components/cva-custom-dialog.component';
import { CustomDialogDataConfigModel } from '../models/components/custom-dialog-data-config.model';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
export declare class UtilsService {
private dialog;
private transService;
private toastr;
constructor(dialog: MatDialog, transService: TranslateService, toastr: ToastrService);
static getEnumValue<T>(o: T, value: string): {
[P in keyof T]: T[P];
}[keyof T];
static calcPosition(e: any, results: MatTableDataSource<BaseModel>, paging: TablePagingRequestModel): number;
static reduceEntityAttributeForFormControl(formGroup: FormGroup, e: any, dateRangeConfigList?: {
dateRangeControlName: string;
fromDateControlName: string;
toDateControlName: string;
}[]): any;
static cloneAbstractControl<T extends AbstractControl>(control: T): T | undefined;
static isNgControl(control: any): control is NgControl;
static convertTreeDataToAutocompleteData(treeFields: FlatTreeModel, symbol: string, hasChildFn: (_: number, node: any) => boolean, nodes: BaseModel[], prefixDisplayValue: string | null): SelectModel[];
strFormat(str: string, replacement?: string[]): any;
onSuccessFunc: (onSuccessMessage?: string) => void;
showWarningToarst(msgKey: string, replacement?: string[]): void;
showErrorToarst(msgKey: string, replacement?: string[]): void;
showError: (err: string) => void;
execute3(apiCall: any, onSuccessFunc: (this: void, data: any, onSuccessMessage?: string) => void, onSuccessMessage: string, onErrorFunc?: (err: any) => void): void;
execute(apiCall: any, onSuccessFunc: (this: void, d: any, onSuccessMessage?: string) => void, onSuccessMessage: string, confirmMsgTitle: string, confirmMsgTitleParamsFormat?: string[], confirmMsgDetail?: string, confirmMsgDetailParamsFormat?: string[], confirmDialogConfig?: MatDialogConfig<CustomDialogDataConfigModel> | undefined, confirmDialogButtonOk?: string, confirmDialogButtonCancel?: string): void;
executeWithErrorHandle(method: () => Observable<any>, onSuccessFunc: (this: void, d: any, onSuccessMessage?: string) => void, onSuccessMessage: string, confirmMsgTitle: string, confirmMsgParamsFormat: string[], confirmMsgDetail: string, confirmMsgDetailParamsFormat: string[], onErrorFunc: ((err: any) => void) | undefined, dialogConfig?: MatDialogConfig<CustomDialogDataConfigModel>, confirmDialogButtonOk?: string, confirmDialogButtonCancel?: string): void;
showConfirmDialog(strTitle: string, replacementTitle: string[], strDetailMsg?: string, replacementDetail?: string[], confirmDialogConfig?: MatDialogConfig<CustomDialogDataConfigModel> | undefined, strOkText?: string, strCancelTex?: string, strCustomClass?: string): import("@angular/material/dialog").MatDialogRef<CvaCustomDialogComponent, any>;
showConfirmInputDialog(str1: string, replacement: string[], confirmInputDialogConfig?: MatDialogConfig<CustomDialogDataConfigModel> | undefined, strOkText?: string, strCancelTex?: string, strCustomClass?: string): import("@angular/material/dialog").MatDialogRef<CvaCustomDialogComponent, any>;
getEnumValueTranslated<T>(o: T, value: string): {
[P in keyof T]: T[P];
}[keyof T];
toBlobJon(obj: any): Blob;
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
}