import { OnInit, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { DataToTranslateToken, Token, BudgetDto, Evaluation } from 'ng-pli-util'; import { CurrencyPipe } from '@angular/common'; import { TokenService } from '../../services/token.service'; import { ToastrService } from 'ngx-toastr'; import { AuthenticationService } from '../../services/authentication.service'; import 'jquery'; import { SesionService } from '../../services/sesion.service'; import { TokenTransformationService } from '../../services/token-transformation.service'; import * as i0 from "@angular/core"; export declare class TokenComponent implements OnInit, OnChanges { private currencyPipe; private tokenService; private toastrService; private authenticationService; private tokenTransformationService; private sesionService; /** It contains the template html to translate */ template: string; istemplate: boolean; /** It contains the data to implement */ data: DataToTranslateToken; /** It notifies the html is generated*/ onGenerate: EventEmitter; /** It enables the visualization of destination */ enableDestination: boolean; /** It contains the prom code */ promCodigo: number; applicationId: string; /** */ lTokenCalculated: Token[]; /** */ lFormFieldsToken: any[]; /** */ uniqueVerificationCode: string; /** */ budgetDtoPrimary: BudgetDto; /** */ budgetDtoSecundary: BudgetDto; /** As the list of token are loaded dynamically, this manage that only replace the info once. */ alreadyCallReplaceTokens: boolean; evaluation: Evaluation; debtorInsurance: number; constructor(currencyPipe: CurrencyPipe, tokenService: TokenService, toastrService: ToastrService, authenticationService: AuthenticationService, tokenTransformationService: TokenTransformationService, sesionService: SesionService); ngOnInit(): void; /** It manages the change of the every @Input */ ngOnChanges(changes: SimpleChanges): void; /** It initializes the process of translation */ private init; translateCategory(categoryName: string): string; translateTokens(html: string, listData: any): void; callListTokens(lTokens: any[], html: string, listData: any): void; /** * Get the unique verification code and call validateListTokens method */ getUniqueVerificationCode(usuLogin: string, sesion: string, lTokens: any[], html: string, listData: any): void; validateListTokens(lTokens: any[], html: string, listData: any): void; replaceTokensWithData(lTokens: any[], html: string, listData: any): Promise; /** * Try to find the budget info to translate the token. * @param html * @param token * @param subToken */ resolveBudgetToken(html: string, token: any, subToken: string[]): any; resolveTaskoken(html: string, token: any, subToken: string[]): any; resolveStaticToken(html: string, token: any, subToken: string[]): Promise; findSesionByLogin(html: string, token: any): Promise; /** * Find all the tokens present in the HTML text. Organize this tokens in four categories. * @param html Text of the html */ getListTokens(html: string): any[]; /** * It resolves the static token destination * @param stringText * @param token * @param dataValue */ resolveStaticTokensKeyAQuienVaDirigido(stringText: string, tokenValue: any): string; /** * */ addInfoTokenDestination(): void; /** * It resolves the static token destination * @param stringText * @param token * @param dataValue */ resolveStaticTokensKeySaludoComplementario(stringText: string, tokenValue: any): string; /** * */ addInfoTokenSaludoComplementario(): void; private removeCommentsHtml; resolveStaticTokensKeySign(html: any, tokenValue: any, subToken: string[]): string; private getRubroLabel; private getTotalLabel; private getYearLabel; /** * */ addInfoTokenResumeCategoryYear(tpresCodigo: number, idTotalBudget: string, budgetDto: BudgetDto): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }