@webilix/ngx-helper-m3
Version:
Helper library for Angular and Material 3
859 lines (812 loc) • 36 kB
TypeScript
import * as i0 from '@angular/core';
import { InjectionToken, EnvironmentProviders, OnInit, OnChanges, Injector, SimpleChanges, EventEmitter, PipeTransform, ApplicationRef, ElementRef, RendererFactory2 } from '@angular/core';
import { ComponentType } from '@angular/cdk/portal';
import { ActivatedRoute, Router } from '@angular/router';
import { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { HttpStatusCode } from '@angular/common/http';
import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
interface INgxHelperConfig {
readonly mobileWidth: number;
readonly pageGroupSidebarWidth: string;
readonly toastTimeout: number;
readonly toastXPosition: 'LEFT' | 'CENTER' | 'RIGHT';
readonly toastAllowDuplicates: boolean;
readonly toastResetDuplicates: boolean;
readonly toastProgressAnimation: 'DECREASE' | 'INCREASE';
readonly stickyView: {
readonly top?: string | {
readonly desktopView: string;
readonly mobileView: string;
};
readonly bottom?: string | {
readonly desktopView: string;
readonly mobileView: string;
};
};
}
declare const NGX_HELPER_CONFIG: InjectionToken<Partial<INgxHelperConfig>>;
declare const provideNgxHelperConfig: (config: Partial<INgxHelperConfig>) => EnvironmentProviders;
declare class NgxHelperBoxComponent implements OnInit, OnChanges {
private className;
private paddingCSS;
component?: ComponentType<any>;
data?: any;
padding: string;
hideShadow: boolean;
injector: Injector;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
setInjector(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperBoxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperBoxComponent, "ngx-helper-box", never, { "component": { "alias": "component"; "required": false; }; "data": { "alias": "data"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "hideShadow": { "alias": "hideShadow"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare const NGX_HELPER_BOX_DATA: InjectionToken<any>;
type DateFormats = string | 'FULL' | 'SHORT' | 'DATE' | 'TIME' | 'WEEK' | 'MONTH' | 'YEAR';
type DurationFormats = 'TEXT' | 'FULL' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
type NgxHelperValue = {
type: 'BANK-CARD';
value?: string;
view?: 'CARD' | 'BANK';
join?: string;
english?: boolean;
} | {
type: 'DATE';
value?: Date | number;
format?: DateFormats;
timezone?: string;
} | {
type: 'DURATION';
value?: number | Date | {
from: Date;
} | {
to: Date;
} | {
from: Date;
to: Date;
};
format?: DurationFormats;
english?: boolean;
} | {
type: 'FILE-SIZE';
value?: number;
english?: boolean;
} | {
type: 'MOBILE';
value?: string;
join?: string;
english?: boolean;
} | {
type: 'NUMBER';
value?: number;
fractionDigits?: number;
english?: boolean;
} | {
type: 'PERIOD';
value?: Date | {
from: Date;
} | {
to: Date;
} | {
from: Date;
to: Date;
};
timezone?: string;
} | {
type: 'PRICE';
value?: number;
currency?: string;
short?: boolean;
english?: boolean;
} | {
type: 'STRING';
value?: string;
english?: boolean;
} | {
type: 'VOLUME';
value?: number;
short?: boolean;
english?: boolean;
} | {
type: 'WEIGHT';
value?: number;
short?: boolean;
english?: boolean;
};
interface INgxHelperValue {
readonly title: string;
readonly value?: string | NgxHelperValue;
readonly color?: string;
readonly action?: () => string[] | void;
readonly copyToClipboard?: boolean;
}
interface IComponentConfig {
readonly mobileWidth: number;
readonly pageGroupSidebarWidth: string;
readonly stickyView?: {
readonly top?: {
readonly desktopView: string;
readonly mobileView: string;
};
readonly bottom?: {
readonly desktopView: string;
readonly mobileView: string;
};
};
}
interface IValueComponentData {
readonly title: string;
readonly value: string;
readonly color?: string;
readonly action?: () => string[] | void;
readonly copyToClipboard?: boolean;
readonly ltr?: boolean;
readonly english?: boolean;
}
declare class ComponentService {
getComponentConfig(config?: Partial<INgxHelperConfig>): IComponentConfig;
private isRTL;
getValueData(values: INgxHelperValue[]): IValueComponentData[];
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ComponentService>;
}
interface ICardButton {
readonly title: string;
readonly icon: string;
readonly action: () => void;
readonly color?: string;
readonly showIcon?: boolean;
}
interface ICardMenu {
readonly title: string;
readonly icon: string;
readonly color?: string;
readonly showIcon?: boolean;
readonly buttons: ('DIVIDER' | ICardButton)[];
}
type NgxHelperCardAction = ICardButton | ICardMenu;
interface INgxHelperCardOption {
readonly id?: string;
readonly icon: string;
readonly items: ('DIVIDER' | {
readonly id: string;
readonly title: string;
})[];
readonly action: (id: string) => void;
}
type Button = {
type: 'BUTTON';
title: string;
icon: string;
action: () => void;
color?: string;
showIcon?: boolean;
} | {
type: 'MENU';
title: string;
icon: string;
color?: string;
showIcon?: boolean;
buttons: ('DIVIDER' | {
title: string;
icon: string;
action: () => void;
color?: string;
})[];
};
declare class NgxHelperCardComponent implements OnInit, OnChanges {
private readonly componentService;
private readonly config?;
private className;
title: string;
subTitle?: string;
icon?: string;
actions: NgxHelperCardAction[];
option?: INgxHelperCardOption;
padding: string;
backgroundColor?: string;
hasShadow: boolean;
isMobile: boolean;
buttons: Button[];
private componentConfig;
optionId?: string;
optionTitle?: string;
optionItems: ('DIVIDER' | {
readonly id: string;
readonly title: string;
})[];
constructor(componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
onResize(): void;
setOption(id: string, firstCheck?: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperCardComponent, [null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperCardComponent, "ngx-helper-card", never, { "title": { "alias": "title"; "required": true; }; "subTitle": { "alias": "subTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "option": { "alias": "option"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "hasShadow": { "alias": "hasShadow"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class NgxHelperLoaderComponent implements OnInit, OnChanges {
loaderSize: string;
loaderColor: string;
mode: 'SPINNER' | 'DOTS-SPINNER' | 'WHEEL-SPINNER';
size: number;
color: string;
padding?: string;
margin?: string;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
init(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperLoaderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperLoaderComponent, "ngx-helper-loader", never, { "mode": { "alias": "mode"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; }, {}, never, never, true, never>;
}
interface IPage {
readonly title: string;
readonly icon: string;
readonly component: ComponentType<any>;
}
interface INgxHelperPageGroup {
readonly route?: string[];
readonly header?: ComponentType<any>;
readonly pages: {
[key: string]: IPage;
};
readonly sidebarWidth?: string;
readonly showMenu?: boolean;
}
interface INgxHelperPageGroupItem {
readonly index: number;
readonly id: string;
readonly title: string;
readonly icon: string;
}
declare const NGX_HELPER_PAGE_GROUP_ITEM: InjectionToken<INgxHelperPageGroupItem>;
declare const NGX_HELPER_PAGE_GROUP_DATA: InjectionToken<any>;
declare const NGX_HELPER_PAGE_GROUP_DATA_CHANGE: InjectionToken<(data: any) => void>;
declare class NgxHelperPageGroupComponent implements OnInit, OnChanges {
private readonly activatedRoute;
private readonly router;
private readonly componentService;
private readonly config?;
private className;
display: string;
pageGroup: INgxHelperPageGroup;
pageId: string;
data?: any;
pageChanged: EventEmitter<INgxHelperPageGroupItem>;
dataChanged: EventEmitter<any>;
isMobile: boolean;
pages: string[];
injector: Injector;
sidebarWidth: string;
componentConfig: IComponentConfig;
constructor(activatedRoute: ActivatedRoute, router: Router, componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
onResize(): void;
setInjector(): void;
setPage(id: string): void;
triggerPageChanged(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperPageGroupComponent, [null, null, null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperPageGroupComponent, "ngx-helper-page-group", never, { "pageGroup": { "alias": "pageGroup"; "required": true; }; "pageId": { "alias": "pageId"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "pageChanged": "pageChanged"; "dataChanged": "dataChanged"; }, never, never, true, never>;
}
declare class NgxHelperProgressComponent implements OnChanges {
private className;
borderRadiusCSS: string;
backgroundColorCSS: string;
value: number | {
done: number;
total: number;
};
align: 'LR' | 'RL' | 'TB' | 'BT';
borderRadius: string;
progressColor: string;
backgroundColor?: string;
size: string;
direction: 'H' | 'V';
ngOnChanges(changes: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperProgressComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperProgressComponent, "ngx-helper-progress", never, { "value": { "alias": "value"; "required": true; }; "align": { "alias": "align"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "progressColor": { "alias": "progressColor"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class NgxHelperSectionComponent implements OnInit {
private readonly componentService;
private readonly config?;
private gap;
gapSize?: string;
private componentConfig;
isMobile: boolean;
constructor(componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
onResize(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperSectionComponent, [null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperSectionComponent, "ngx-helper-section", never, { "gapSize": { "alias": "gapSize"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class NgxHelperSectionColumnComponent implements OnInit, OnChanges {
private readonly componentService;
private readonly config?;
flexStyle: string;
widthStyle: string;
stickyPosition: string;
stickyZIndex: string;
stickyTop: string;
flex?: number;
width?: string;
sticky?: boolean | 'DESKTOP' | 'MOBILE';
zIndex?: number;
private componentConfig;
private isMobile;
constructor(componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
onResize(): void;
setPosition(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperSectionColumnComponent, [null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperSectionColumnComponent, "ngx-helper-section-column", never, { "flex": { "alias": "flex"; "required": false; }; "width": { "alias": "width"; "required": false; }; "sticky": { "alias": "sticky"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class NgxHelperValueBoxComponent implements OnInit, OnChanges {
private readonly router;
private readonly componentService;
private readonly config?;
private className;
private gridTemplateColumns;
private boxGap;
values: INgxHelperValue[];
column?: number | {
desktop?: number;
mobile?: number;
};
clearBox: boolean;
emptyText: string;
gapSize: string;
hideShadow: boolean;
data: IValueComponentData[];
copyIndex?: number;
private copyTimeout;
private componentConfig;
constructor(router: Router, componentService: ComponentService, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
onResize(): void;
onClick(action?: () => string[] | void): void;
onCopy(event: Event, index: number): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperValueBoxComponent, [null, null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperValueBoxComponent, "ngx-helper-value-box", never, { "values": { "alias": "values"; "required": true; }; "column": { "alias": "column"; "required": false; }; "clearBox": { "alias": "clearBox"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "gapSize": { "alias": "gapSize"; "required": false; }; "hideShadow": { "alias": "hideShadow"; "required": false; }; }, {}, never, never, true, never>;
}
declare class NgxHelperValueListComponent implements OnChanges {
private readonly router;
private readonly componentService;
private className;
values: INgxHelperValue[];
titleWidth: string;
emptyText: string;
data: IValueComponentData[];
copyIndex?: number;
private copyTimeout;
constructor(router: Router, componentService: ComponentService);
ngOnChanges(changes: SimpleChanges): void;
onClick(action?: () => string[] | void): void;
onCopy(event: Event, index: number): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperValueListComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxHelperValueListComponent, "ngx-helper-value-list", never, { "values": { "alias": "values"; "required": true; }; "titleWidth": { "alias": "titleWidth"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; }, {}, never, never, true, never>;
}
declare class NgxHelperValuePipe implements PipeTransform {
transform(value?: NgxHelperValue, options?: {
emptyText?: string;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperValuePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperValuePipe, "ngxHelperValue", true>;
}
interface INgxHelperConfirm {
readonly question: string;
readonly description?: string;
readonly data?: {
readonly title: string;
readonly value: string;
};
readonly icon?: string;
readonly confirmClass?: string;
readonly denyClass?: string;
}
interface IConfirmData {
readonly title: string;
readonly value?: string;
}
interface IConfirmConfig {
readonly description: string;
readonly confirmClass: string;
readonly denyClass: string;
}
declare class NgxHelperConfirmCalss {
private readonly matBottomSheet;
private readonly matDialog;
private readonly confirm;
constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog, confirm: INgxHelperConfirm);
dialog(onConfirmed: () => void): void;
dialog(onConfirmed: () => void, onDenied: () => void): void;
dialog(onConfirmed: () => void, config: MatDialogConfig): void;
dialog(onConfirmed: () => void, onDenied: () => void, config: MatDialogConfig): void;
bottomSheet(onConfirmed: () => void): void;
bottomSheet(onConfirmed: () => void, onDenied: () => void): void;
bottomSheet(onConfirmed: () => void, config: MatBottomSheetConfig): void;
bottomSheet(onConfirmed: () => void, onDenied: () => void, config: MatBottomSheetConfig): void;
}
declare class NgxHelperConfirmService {
private readonly matBottomSheet;
private readonly matDialog;
constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog);
verify(confirm: INgxHelperConfirm): NgxHelperConfirmCalss;
active(data: IConfirmData): NgxHelperConfirmCalss;
active(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
deactive(data: IConfirmData): NgxHelperConfirmCalss;
deactive(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
status(active: boolean, data: IConfirmData): NgxHelperConfirmCalss;
status(active: boolean, data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
delete(data: IConfirmData): NgxHelperConfirmCalss;
delete(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperConfirmService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperConfirmService>;
}
interface INgxHelperContainerConfig {
data?: any;
padding?: string;
hideClose?: boolean;
}
type NgxHelperContainer = 'DIALOG' | 'BOTTOMSHEET';
declare const NGX_HELPER_CONTAINER_TYPE: InjectionToken<NgxHelperContainer>;
declare const NGX_HELPER_CONTAINER_DATA: InjectionToken<any>;
declare const NGX_HELPER_CONTAINER_CLOSE: InjectionToken<(response?: any) => void>;
interface IContainerData {
readonly component: ComponentType<any>;
readonly title: string;
readonly config: INgxHelperContainerConfig;
}
declare class NgxHelperContainerCalss {
private readonly matBottomSheet;
private readonly matDialog;
private readonly container;
constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog, container: IContainerData);
dialog<T>(): void;
dialog<T>(onResponse: (response: T) => void): void;
dialog<T>(onResponse: (response: T) => void, onDismiss: () => void): void;
dialog<T>(onResponse: (response: T) => void, config: MatDialogConfig): void;
dialog<T>(onResponse: (response: T) => void, onDismiss: () => void, config: MatDialogConfig): void;
bottomSheet<T>(): void;
bottomSheet<T>(onResponse: (result: T) => void): void;
bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void): void;
bottomSheet<T>(onResponse: (result: T) => void, config: MatBottomSheetConfig): void;
bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void, config: MatBottomSheetConfig): void;
}
declare class NgxHelperContainerService {
private readonly matBottomSheet;
private readonly matDialog;
constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog);
init(component: ComponentType<any>, title: string): NgxHelperContainerCalss;
init(component: ComponentType<any>, title: string, config: INgxHelperContainerConfig): NgxHelperContainerCalss;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperContainerService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperContainerService>;
}
interface INgxHelperCoordinates {
latitude: number;
longitude: number;
}
interface INgxHelperCoordinatesConfig {
zoom: number;
size: number;
color: string;
view: INgxHelperCoordinates;
}
declare class NgxHelperCoordinatesService {
private readonly applicationRef;
private readonly injector;
constructor(applicationRef: ApplicationRef, injector: Injector);
get(): Promise<INgxHelperCoordinates>;
get(coordinates: INgxHelperCoordinates): Promise<INgxHelperCoordinates>;
get(config: Partial<INgxHelperCoordinatesConfig>): Promise<INgxHelperCoordinates>;
get(coordinates: INgxHelperCoordinates, config: Partial<INgxHelperCoordinatesConfig>): Promise<INgxHelperCoordinates>;
show(coordinates: INgxHelperCoordinates): void;
show(coordinates: INgxHelperCoordinates, config: Partial<Omit<INgxHelperCoordinatesConfig, 'view'>>): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperCoordinatesService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperCoordinatesService>;
}
interface INgxHelperHttpDownloadConfig {
readonly method: 'GET' | 'POST' | 'PUT' | 'PATCH';
readonly header: {
[key: string]: any;
};
}
interface INgxHelperHttpUploadConfig {
readonly method: 'POST' | 'PUT' | 'PATCH';
readonly header: {
[key: string]: any;
};
readonly body: {
[key: string]: any;
};
}
interface INgxHelperToastConfig {
readonly timeout: number;
readonly showClose: boolean;
}
interface IToast {
readonly icon: string;
readonly textColor: string;
readonly backgroundColor: string;
}
declare class NgxHelperToastService {
private readonly applicationRef;
private readonly injector;
private readonly config?;
private components;
constructor(applicationRef: ApplicationRef, injector: Injector, config?: Partial<INgxHelperConfig> | undefined);
private getId;
private updatePositions;
toast(toast: IToast, message: string | string[]): void;
toast(toast: IToast, message: string | string[], config: Partial<INgxHelperToastConfig>): void;
toast(toast: IToast, message: string | string[], onClose: () => void): void;
toast(toast: IToast, message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void;
info(message: string | string[]): void;
info(message: string | string[], config: Partial<INgxHelperToastConfig>): void;
info(message: string | string[], onClose: () => void): void;
info(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void;
success(message: string | string[]): void;
success(message: string | string[], config: Partial<INgxHelperToastConfig>): void;
success(message: string | string[], onClose: () => void): void;
success(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void;
warning(message: string | string[]): void;
warning(message: string | string[], config: Partial<INgxHelperToastConfig>): void;
warning(message: string | string[], onClose: () => void): void;
warning(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void;
error(message: string | string[]): void;
error(message: string | string[], config: Partial<INgxHelperToastConfig>): void;
error(message: string | string[], onClose: () => void): void;
error(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperToastService, [null, null, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperToastService>;
}
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;
getPDF: (data: string | ArrayBuffer | Blob, config?: Partial<INgxHelperHttpDownloadConfig>) => Promise<Blob>;
showPDF(url: string): void;
showPDF(url: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
showPDF(buffer: ArrayBuffer): void;
showPDF(buffer: ArrayBuffer, config: Partial<INgxHelperHttpDownloadConfig>): void;
showPDF(blob: Blob): void;
showPDF(blob: Blob, config: Partial<INgxHelperHttpDownloadConfig>): 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>;
}
interface INgxHelperImage {
image: string;
description?: string;
}
interface INgxHelperImageConfig {
backgroundColor?: string;
backgroundOpacity?: number;
}
declare class NgxHelperImageService {
private readonly applicationRef;
private readonly injector;
constructor(applicationRef: ApplicationRef, injector: Injector);
showImage(image: INgxHelperImage, config?: INgxHelperImageConfig): void;
showGallery(images: INgxHelperImage[], config?: INgxHelperImageConfig): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperImageService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperImageService>;
}
type NgxHelperRoute = {
latitude: number;
longitude: number;
}[];
interface INgxHelperRouteConfig {
zoom: number;
circle: Partial<{
size: number;
color: string;
}>;
text: Partial<{
size: number;
font: string;
color: string;
}>;
view: {
latitude: number;
longitude: number;
};
disableAnimate?: boolean;
}
declare class NgxHelperRouteService {
private readonly applicationRef;
private readonly injector;
constructor(applicationRef: ApplicationRef, injector: Injector);
get(): Promise<NgxHelperRoute>;
get(route: NgxHelperRoute): Promise<NgxHelperRoute>;
get(config: Partial<INgxHelperRouteConfig>): Promise<NgxHelperRoute>;
get(route: NgxHelperRoute, config: Partial<INgxHelperRouteConfig>): Promise<NgxHelperRoute>;
show(route: NgxHelperRoute): void;
show(route: NgxHelperRoute, config: Partial<Omit<INgxHelperRouteConfig, 'view'>>): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperRouteService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperRouteService>;
}
declare class NgxHelperMobileViewDirective implements OnInit {
private readonly elementRef;
private readonly rendererFactory;
private readonly config?;
ngxHelperMobileView: string;
private mobileWidth;
constructor(elementRef: ElementRef, rendererFactory: RendererFactory2, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
onResize(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperMobileViewDirective, [null, null, { optional: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxHelperMobileViewDirective, "[ngxHelperMobileView]", never, { "ngxHelperMobileView": { "alias": "ngxHelperMobileView"; "required": true; }; }, {}, never, never, true, never>;
}
declare class NgxHelperStickyDirective implements OnInit {
private readonly elementRef;
private readonly config?;
ngxHelperSticky: 'TOP' | 'BOTTOM';
stickyIn: 'ALWAYS' | 'DESKTOP' | 'MOBILE';
zIndex?: number;
private mobileWidth;
private stickyView;
private isMobile;
constructor(elementRef: ElementRef, config?: Partial<INgxHelperConfig> | undefined);
ngOnInit(): void;
onResize(): void;
setPosition(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperStickyDirective, [null, { optional: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxHelperStickyDirective, "[ngxHelperSticky]", never, { "ngxHelperSticky": { "alias": "ngxHelperSticky"; "required": true; }; "stickyIn": { "alias": "stickyIn"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, {}, never, never, true, never>;
}
declare class NgxHelperBankCardPipe implements PipeTransform {
transform(value?: string | null, options?: {
view?: 'CARD' | 'BANK';
join?: string;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperBankCardPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperBankCardPipe, "ngxHelperBankCard", true>;
}
declare class NgxHelperDatePipe implements PipeTransform {
transform(value?: Date | null, options?: {
format?: DateFormats;
timezone?: string;
}): string;
transform(value?: number | null, options?: {
format?: DateFormats;
timezone?: string;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperDatePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperDatePipe, "ngxHelperDate", true>;
}
declare class NgxHelperDurationPipe implements PipeTransform {
transform(value?: number | null, options?: {
format?: DurationFormats;
english?: boolean;
}): string;
transform(value?: Date | null, options?: {
format?: DurationFormats;
english?: boolean;
}): string;
transform(value?: {
from: Date;
} | null, options?: {
format?: DurationFormats;
english?: boolean;
}): string;
transform(value?: {
to: Date;
} | null, options?: {
format?: DurationFormats;
english?: boolean;
}): string;
transform(value?: {
from: Date;
to: Date;
} | null, options?: {
format?: DurationFormats;
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperDurationPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperDurationPipe, "ngxHelperDuration", true>;
}
declare class NgxHelperFileSizePipe implements PipeTransform {
transform(value?: number | null, options?: {
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperFileSizePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperFileSizePipe, "ngxHelperFileSize", true>;
}
declare class NgxHelperMobilePipe implements PipeTransform {
transform(value?: string | null, options?: {
join?: string;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperMobilePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperMobilePipe, "ngxHelperMobile", true>;
}
declare class NgxHelperMultiLinePipe implements PipeTransform {
private readonly domSanitizer;
constructor(domSanitizer: DomSanitizer);
transform(value?: string | null, options?: {
html?: boolean;
}): string | SafeHtml;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperMultiLinePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperMultiLinePipe, "ngxHelperMultiLine", true>;
}
declare class NgxHelperNumberPipe implements PipeTransform {
transform(value?: number | null, options?: {
fractionDigits?: number;
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperNumberPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperNumberPipe, "ngxHelperNumber", true>;
}
declare class NgxHelperPeriodPipe implements PipeTransform {
transform(value?: Date | null, options?: {
timezone?: string;
}): string;
transform(value?: {
from: Date;
} | null, options?: {
timezone?: string;
}): string;
transform(value?: {
to: Date;
} | null, options?: {
timezone?: string;
}): string;
transform(value?: {
from: Date;
to: Date;
} | null, options?: {
timezone?: string;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperPeriodPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperPeriodPipe, "ngxHelperPeriod", true>;
}
declare class NgxHelperPricePipe implements PipeTransform {
transform(value?: number | null, options?: {
currency?: string;
short?: boolean;
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperPricePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperPricePipe, "ngxHelperPrice", true>;
}
type Types = 'HTML' | 'STYLE' | 'SCRIPT' | 'URL' | 'RESOURCE_URL';
declare class NgxHelperSafePipe implements PipeTransform {
private readonly domSanitizer;
constructor(domSanitizer: DomSanitizer);
transform(value?: string | null, options?: {
type?: Types;
}): string | SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperSafePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperSafePipe, "ngxHelperSafe", true>;
}
declare class NgxHelperVolumePipe implements PipeTransform {
transform(value?: number | null, options?: {
short?: boolean;
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperVolumePipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperVolumePipe, "ngxHelperVolume", true>;
}
declare class NgxHelperWeightPipe implements PipeTransform {
transform(value?: number | null, options?: {
short?: boolean;
english?: boolean;
}): string;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperWeightPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperWeightPipe, "ngxHelperWeight", true>;
}
export { NGX_HELPER_BOX_DATA, NGX_HELPER_CONFIG, NGX_HELPER_CONTAINER_CLOSE, NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_TYPE, NGX_HELPER_PAGE_GROUP_DATA, NGX_HELPER_PAGE_GROUP_DATA_CHANGE, NGX_HELPER_PAGE_GROUP_ITEM, NgxHelperBankCardPipe, NgxHelperBoxComponent, NgxHelperCardComponent, NgxHelperConfirmService, NgxHelperContainerService, NgxHelperCoordinatesService, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperFileSizePipe, NgxHelperHttpService, NgxHelperImageService, NgxHelperLoaderComponent, NgxHelperMobilePipe, NgxHelperMobileViewDirective, NgxHelperMultiLinePipe, NgxHelperNumberPipe, NgxHelperPageGroupComponent, NgxHelperPeriodPipe, NgxHelperPricePipe, NgxHelperProgressComponent, NgxHelperRouteService, NgxHelperSafePipe, NgxHelperSectionColumnComponent, NgxHelperSectionComponent, NgxHelperStickyDirective, NgxHelperToastService, NgxHelperValueBoxComponent, NgxHelperValueListComponent, NgxHelperValuePipe, NgxHelperVolumePipe, NgxHelperWeightPipe, provideNgxHelperConfig };
export type { INgxHelperCardOption, INgxHelperConfig, INgxHelperConfirm, INgxHelperContainerConfig, INgxHelperCoordinates, INgxHelperCoordinatesConfig, INgxHelperHttpDownloadConfig, INgxHelperHttpUploadConfig, INgxHelperImage, INgxHelperImageConfig, INgxHelperPageGroup, INgxHelperPageGroupItem, INgxHelperRouteConfig, INgxHelperToastConfig, INgxHelperValue, NgxHelperCardAction, NgxHelperContainer, NgxHelperRoute, NgxHelperValue };