127 lines
5.0 KiB
TypeScript
127 lines
5.0 KiB
TypeScript
import { Block, BlockBean, BlockType, Brand, EmailElements, Logo, Structure, StructureType } from './models';
|
|
import { Observable, Subject } from 'rxjs';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import * as i0 from "@angular/core";
|
|
export declare class EmailElementService {
|
|
private http;
|
|
apiPath: string;
|
|
initialElement: {
|
|
structures: {
|
|
type: string;
|
|
blocks: {
|
|
type: string;
|
|
content: string;
|
|
backgroundColor: string;
|
|
color: string;
|
|
link: string;
|
|
src: string;
|
|
width: string;
|
|
height: string;
|
|
isSelected: boolean;
|
|
font: string;
|
|
fontSize: string;
|
|
align: string;
|
|
format: string;
|
|
}[][];
|
|
backgroundColor: string;
|
|
color: string;
|
|
isSelected: boolean;
|
|
}[];
|
|
general: {
|
|
footer: {
|
|
content: string;
|
|
font: string;
|
|
fontSize: string;
|
|
brands: {
|
|
prefix: string;
|
|
iconName: string;
|
|
icon: (string | number | never[])[];
|
|
src: string;
|
|
svgTxt: string;
|
|
link: string;
|
|
color: string;
|
|
}[];
|
|
unsubscribe: boolean;
|
|
};
|
|
logo: {
|
|
src: string;
|
|
link: string;
|
|
align: string;
|
|
};
|
|
color: string;
|
|
background: string;
|
|
contentBackground: string;
|
|
};
|
|
};
|
|
fontFamilyList: string[];
|
|
fontSizeList: {
|
|
val: string;
|
|
label: number;
|
|
}[];
|
|
emailElements: EmailElements;
|
|
emailElements$: Subject<EmailElements>;
|
|
selectedStructureIndex$: Subject<number>;
|
|
selectedStructureColumn$: Subject<number>;
|
|
selectedStructureIndex: number;
|
|
selectedStructureColumn: number;
|
|
selectedBlockType$: Subject<BlockType>;
|
|
selectedBlockType: BlockType;
|
|
selectedBlockIndex$: Subject<number>;
|
|
structureAdded$: Subject<number>;
|
|
blockAdded$: Subject<number>;
|
|
logoSelected$: Subject<boolean>;
|
|
showPriview$: Subject<boolean>;
|
|
selectedBlockIndex: number;
|
|
showLoader$: Subject<boolean>;
|
|
contentUpdated$: Subject<boolean>;
|
|
footerVisibility$: Subject<boolean>;
|
|
contactsCount: number;
|
|
contactsList: any[];
|
|
selectedBrands: any[];
|
|
elementClickedStatus: Subject<boolean>;
|
|
constructor(http: HttpClient);
|
|
setSelectedStructureIndex(index: number, resetLogoFooter?: boolean): void;
|
|
setSelectedStructureColumn(index: number): void;
|
|
setSelectedBlock(index: number, type: BlockType, sIndex: number, cIndex: number): void;
|
|
resetBlockSelection(onlyBlock?: boolean): void;
|
|
resetAllSelection(): void;
|
|
addStucture(type: StructureType): void;
|
|
deleteStucture(sIndex: number): void;
|
|
swapStucture(sIndex1: number, sIndex2: number): void;
|
|
resetElements(): void;
|
|
setElements(emailElements: EmailElements): void;
|
|
getElements(): Subject<EmailElements>;
|
|
addBlockToStucture(type: BlockType): void;
|
|
deleteBlockInStucture(sIndex: number, cIndex: number, bIndex: number): void;
|
|
getBlockDetails(sIndex: number, cIndex: number, bIndex: number): any;
|
|
swapBlockInStucture(sIndex: number, cIndex: number, bIndex1: number, bIndex2: number): void;
|
|
swapPositions(array: any[], a: number, b: number): void;
|
|
addNewStucture(type: StructureType): Structure;
|
|
addNewElement(type: BlockType): Block;
|
|
updateLogoContent(updatedData: Logo): void;
|
|
updateLogoLink(link: string): void;
|
|
updateLogoAlign(alignType: any): void;
|
|
updateLogoSize(updatedSizeType: string, updatedWidth: any, originalWidth: any): void;
|
|
updateBgColor(value: string): void;
|
|
updateContentBgColor(value: string): void;
|
|
editBlockContent(sIndex: number, cIndex: number, bIndex: number, property: string, value: string): void;
|
|
updateImageVideoBlockContent(sIndex: number, cIndex: number, bIndex: number, updatedData: BlockBean): void;
|
|
getBlockContent(sIndex: any, cIndex: any, bIndex: any): any;
|
|
loadVideoJSON(id: any): Observable<any>;
|
|
isYouTubeUrl(videoUrl: string): boolean;
|
|
extractYouTubeVideoId(videoUrl: string): string | null;
|
|
loadVimeoVideoJSON(id: any): Observable<any>;
|
|
checkYoutubeUrl(videoUrl: any): Observable<any>;
|
|
getVideoData(videoUrl: string, awsRegion: string): Observable<unknown>;
|
|
generateUniqueId(): string;
|
|
onFooterEdit(footerContent: string): void;
|
|
onFooterFontChange(font: string): void;
|
|
onFooterSizeChange(fontSize: string): void;
|
|
unsubscribeStatus(status: any): void;
|
|
updateUnsubscribeColor(unsubscribeColor: any): void;
|
|
updateOrAddBrandList(selectedBrand: Brand[] | null | undefined, brandData: any): void;
|
|
clearLogo(): void;
|
|
static ɵfac: i0.ɵɵFactoryDeclaration<EmailElementService, never>;
|
|
static ɵprov: i0.ɵɵInjectableDeclaration<EmailElementService>;
|
|
}
|