@webilix/ngx-helper-m3
Version:
Helper library for Angular and Material 3
28 lines (27 loc) • 1.73 kB
TypeScript
import { ApplicationRef, Injector } from '@angular/core';
import { HttpStatusCode } from '@angular/common/http';
import { NgxHelperToastService } from '../toast/ngx-helper-toast.service';
import { INgxHelperHttpDownloadConfig, INgxHelperHttpUploadConfig } from './ngx-helper-http.interface';
import * as i0 from "@angular/core";
export declare class NgxHelperHttpService {
private readonly applicationRef;
private readonly injector;
private readonly ngxHelperToastService;
private components;
constructor(applicationRef: ApplicationRef, injector: Injector, ngxHelperToastService: NgxHelperToastService);
private getId;
private updatePositions;
private getBuffer;
download(path: string, title: string): void;
download(path: string, title: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
upload<R, E>(file: File, url: string, onSuccess: (response: R | undefined, status: HttpStatusCode) => void, onError: (error: E | undefined, status: HttpStatusCode) => void): void;
upload<R, E>(file: File, url: string, config: Partial<INgxHelperHttpUploadConfig>, onSuccess: (response: R, status: HttpStatusCode) => void, onError: (error: E, status: HttpStatusCode) => void): void;
printPDF(url: string): void;
printPDF(url: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
printPDF(buffer: ArrayBuffer): void;
printPDF(buffer: ArrayBuffer, config: Partial<INgxHelperHttpDownloadConfig>): void;
printPDF(blob: Blob): void;
printPDF(blob: Blob, config: Partial<INgxHelperHttpDownloadConfig>): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperHttpService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperHttpService>;
}