{"version":3,"sources":["webpack:///src/app/entity/article.ts","webpack:///src/app/services/wordpress.service.ts","webpack:///src/app/modules/shared/components/latest-articles/latest-articles.component.html","webpack:///src/app/modules/shared/components/latest-articles/latest-articles.component.ts","webpack:///src/app/modules/shared/components/latest-articles/latest-articles.module.ts"],"sourcesContent":["export class Article {\n title: string;\n text: string;\n imageUrl: string;\n articleURL: string;\n}\n\n","import {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {BackRouter} from '../modules/shared/services/back-router';\nimport {map} from 'rxjs/operators';\nimport {plainToClass} from 'class-transformer';\nimport {Article} from '../entity/article';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WordpressService {\n constructor(private httpClient: HttpClient, private br: BackRouter) {\n }\n\n getRecent() {\n return this.httpClient.get(this.br.getJavaWebServicesUrl() + '/rest/wordpress', {headers: { ignoreLoadingBar: '' }})\n .pipe(\n map((objs: Object[]) => {\n return objs.map(obj => plainToClass(Article, obj));\n },\n ),\n );\n }\n}\n","
\n
\n

Latest Articles

\n\n
\n
\n \n \"\"\n \n
\n {{item.title}}\n
\n
\n
\n Read more...\n
\n
\n
\n
\n \n\n
\n
\n","import {AfterViewInit, Component, EventEmitter, OnInit, Output, QueryList, ViewChildren} from '@angular/core';\nimport {WordpressService} from '../../../../services/wordpress.service';\nimport {Router} from '@angular/router';\nimport { NGXLogger } from 'ngx-logger';\n\n@Component({\n selector: 'shared-latest-articles',\n templateUrl: './latest-articles.component.html',\n styleUrls: ['./latest-articles.component.scss'],\n})\nexport class LatestArticlesComponent implements OnInit, AfterViewInit {\n articles;\n\n @ViewChildren('articlesList') articlesList: QueryList;\n\n @Output() finishRender = new EventEmitter();\n constructor(\n private wordpressService: WordpressService,\n private router: Router,\n private logger: NGXLogger\n ) {\n }\n\n\n async ngOnInit() {\n try {\n this.articles = await this.wordpressService.getRecent().toPromise();\n } catch (e) {\n this.logger.error('Articles were not obtained', e);\n }\n await this.finishRender.emit(true);\n }\n\n goToAuthor(author) {\n }\n\n async readMore(url) {\n await this.router.navigate([url]);\n }\n\n ngAfterViewInit() {\n this.articlesList.changes.subscribe(t => {\n this.finishRender.emit(true);\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {LatestArticlesComponent} from './latest-articles.component';\nimport {RouterModule} from '@angular/router';\n@NgModule({\n declarations: [ LatestArticlesComponent ],\n bootstrap: [ LatestArticlesComponent ],\n imports: [\n CommonModule,\n RouterModule\n ]\n})\nexport class LatestArticlesModule { }\n"],"names":["WordpressService","constructor","httpClient","br","this","getRecent","get","getJavaWebServicesUrl","headers","ignoreLoadingBar","pipe","map","objs","obj","plainToClass","Article","i0","factory","LatestArticlesComponent","wordpressService","router","logger","EventEmitter","ngOnInit","e","articles","toPromise","error","finishRender","emit","goToAuthor","author","readMore","url","r","navigate","ngAfterViewInit","articlesList","changes","subscribe","t","selectors","LatestArticlesModule","bootstrap","CommonModule","RouterModule"],"mappings":";;qNAAM,mCCUC,IAAMA,EAAb,MAAM,QACFC,YAAoBC,EAAgCC,GAAhCC,kBAAgCA,UAGpDC,YACI,OAAOD,KAAKF,WAAWI,IAAIF,KAAKD,GAAGI,wBAA0B,kBAAmB,CAACC,QAAS,CAAEC,iBAAkB,MACzGC,MACGC,OAAKC,GACUA,EAAKD,IAAIE,IAAOC,QAAaC,EAASF,oDARxDb,GAAgBgB,mDAAhBhB,EAAgBiB,QAAhBjB,EAAgB,qBAFb,SAEHA,GAAb,8ECLYgB,mBACIA,eACIA,kBACJA,QACAA,kBACIA,SACJA,QACAA,kBACIA,kBACAA,gBAAqDA,wBAAYA,QACrEA,QACAA,eACJA,kCAXOA,0CACoCA,uCAGnCA,gCAGKA,yCACqBA,2CCJvC,IAAME,EAAb,MAAM,QAMFjB,YACYkB,EACAC,EACAC,GAFAjB,wBACAA,cACAA,cAJFA,kBAAe,IAAIkB,MASvBC,WAAQ,qCACV,IACIC,EAAKC,eAAiBD,EAAKL,iBAAiBd,YAAYqB,kBACnDF,GACLA,EAAKH,OAAOM,MAAM,6BAA8BH,SAE9CA,EAAKI,aAAaC,MAAK,IANnB,GASdC,WAAWC,IAGLC,SAASC,GAAG,2CACRC,EAAKd,OAAOe,SAAS,CAACF,KADd,GAIlBG,kBACIhC,KAAKiC,aAAaC,QAAQC,UAAUC,IAChCpC,KAAKwB,aAAaC,MAAK,mDAhCtBX,GAAuBF,2DAAvBE,EAAuBuB,4mBDVpCzB,iBACIA,iBACIA,gBAAwBA,2BAAeA,QAEvCA,iBACIA,wBAaJA,QACAA,iBACIA,eAA2EA,6BAAiBA,QAChGA,QAEJA,QACJA,eAnBgDA,iyBCKnCE,GAAb,GCEawB,EAAb,MAAM,sDAAOA,8BAAoBC,WANbzB,iCACP,CACL0B,KACAC,SAGKH,GAAb","debug_id":"f179b100-d3c4-5579-9db7-92ade78aa17a"}