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BAMXA,wCAAiBS,WAAS,YAAY,GACxCT,YAIJA,iBAIEA,oDACFA,QAEAA,qCAA4D,YAG5DA,kBACEA,gCACFA,QAEAA,kBAAY,WAAZA,CAAY,yBAQNA,wCAAiBS,cAAYA,wBAAsB,UAAW,mCAAmC,GACnGT,UAEFA,kBAEe,yBAKXA,wCAAiBS,cAAYA,wBAAsB,UAAW,sBAAsB,GACtFT,UAEFA,kBAEe,yBAKXA,wCAAiBS,cAAYA,wBAAsB,iCAAiC,GACtFT,mBAtIaA,uBAUaA,+DAQvBA,gIAUAA,8HAWmBA,sDAOtBA,4CAWAA,4CAWAA,4CAWAA,4CA4BAA,4CAUAA,4CAUAA,oUE3HJ,MAAM0F,GAAiB,CACrB,CACEC,KAAM,GACNC,UAAWpB,IAQT,MAAOqB,EAAiBtF,kDAAjBsF,EAAiB,sCAAjBA,IAAiBtF,wCAHlBuF,cAAsBJ,IACtBI,QCMN,MAAOC,EAAUxF,kDAAVwF,EAAU,sCAAVA,IAAUxF,wCATXyF,IAAcH","names":["i0","$event","ActionCardComponent","constructor","this","EventEmitter","ngOnInit","static","selectors","ctx","QueuedActivitiesComponent","apiService","toastMessagesService","router","TableModel","InlineLoadingState","EActivityStatus","Subscription","tableModel","header","mapTableHeaders","subscription","add","timer","pollingInterval","pipe","tap","loadData","subscribe","onRowClick","rowIndex","activities","activity","activityType","EActivityType","navigate","projectId","projectName","id","requestParams","relation","queryParams","size","pageLength","apiCallSubscription","unsubscribe","getQueuedActivities","response","content","totalDataLength","length","data","mapTableModel","show","title","message","type","EToastMessageType","TableHeaderItem","items","map","TableItem","creator","fullName","activityTypeLabel","activityName","createdOn","template","createdOnTemplate","statusTemplate","ngOnDestroy","core","HomeComponent","commonService","environment","roboRxnEnabled","auth","user","setTimeout","window","scroll","onCreate","resourceType","onCreateForwardReaction","onCreatePredictRetrosyntheticRoutes","onPlanASynthesis","onCreateReactionCompletion","onLinkClick","url","navigateByUrl","routes","path","component","HomeRoutingModule","RouterModule","HomeModule","SharedModule"],"sourceRoot":"webpack:///","sources":["./src/app/modules/home/action-card/action-card.component.html","./src/app/modules/home/action-card/action-card.component.ts","./src/app/modules/home/queued-activities/queued-activities.component.html","./src/app/modules/home/queued-activities/queued-activities.component.ts","./src/app/modules/home/home/home.component.html","./src/app/modules/home/home/home.component.ts","./src/app/modules/home/home-routing.module.ts","./src/app/modules/home/home.module.ts"],"sourcesContent":["
\n
{{ actionName }}
\n
{{ description }}
\n
\n \n
\n\n
\n \n\n API Docs\n\n \n \n
\n
","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'ibm-action-card',\n templateUrl: './action-card.component.html',\n styleUrls: ['./action-card.component.scss'],\n})\nexport class ActionCardComponent implements OnInit {\n @Input() actionName: string;\n @Input() description: string;\n @Input() imgSrc: string;\n\n @Input() apiDocUrl: string;\n\n @Output() triggerAction = new EventEmitter();\n\n constructor() {}\n ngOnInit(): void {}\n}\n","
\n\n
\n

Activities on Queue

\n
\n\n
\n
\n \n \n \n
\n
\n\n
\n\n\n {{data | date:'dd/MM/yyyy'}}\n\n\n\n\n
\n
\n \n {{data.activityStatusLabel}}\n
\n
\n \n \n
\n
\n\n
","import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { Subscription, timer } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport { Router } from '@angular/router';\n\nimport { InlineLoadingState, TableHeaderItem, TableItem, TableModel } from 'carbon-components-angular';\n\nimport { IApiRequest, IApiResponse } from '@app/libs/bitforce/api';\n\nimport { Activity } from '@app/core/models';\nimport { EToastMessageType } from '@app/core/services/toast-messages/toast-message.enum';\nimport { ApiService, ToastMessagesService } from '@app/core/services';\nimport { EActivityStatus, EActivityType } from '@app/shared/enums/activity.enum';\n\n@Component({\n selector: 'ibm-queued-activities',\n templateUrl: './queued-activities.component.html',\n styleUrls: ['./queued-activities.component.scss'],\n})\nexport class QueuedActivitiesComponent implements OnInit, OnDestroy {\n @ViewChild('createdOnTemplate') createdOnTemplate: ElementRef;\n @ViewChild('statusTemplate') statusTemplate: ElementRef;\n\n tableModel = new TableModel();\n InlineLoadingState = InlineLoadingState;\n EActivityStatus = EActivityStatus;\n\n private pageLength = 20;\n private activities: Activity[];\n private pollingInterval = 15000;\n private subscription = new Subscription();\n private apiCallSubscription = new Subscription();\n\n constructor(\n private apiService: ApiService,\n private toastMessagesService: ToastMessagesService,\n private router: Router\n ) {}\n\n ngOnInit(): void {\n this.tableModel.header = this.mapTableHeaders();\n\n this.subscription.add(\n timer(0, this.pollingInterval)\n .pipe(tap(() => this.loadData()))\n .subscribe()\n );\n }\n\n onRowClick(rowIndex: number) {\n if (this.activities[rowIndex]) {\n const activity: Activity = this.activities[rowIndex];\n switch (activity.activityType) {\n case EActivityType.RETROSYNTHESIS:\n this.router.navigate([\n '/projects',\n activity.projectId,\n activity.projectName,\n 'retrosynthesis',\n activity.id,\n ]);\n break;\n case EActivityType.PREDICTION:\n this.router.navigate([\n '/projects',\n activity.projectId,\n activity.projectName,\n 'forward-reaction-predictions',\n activity.id,\n 'view',\n ]);\n break;\n case EActivityType.SYNTHESIS_EXECUTION:\n this.router.navigate([\n '/projects',\n activity.projectId,\n activity.projectName,\n 'synthesis',\n 'executions',\n activity.id,\n ]);\n break;\n case EActivityType.REACTION_COMPLETION_PREDICTION:\n this.router.navigate([\n '/projects',\n activity.projectId,\n activity.projectName,\n 'reaction-completions',\n activity.id,\n ]);\n break;\n default:\n break;\n }\n }\n }\n\n private loadData() {\n const requestParams: IApiRequest = {\n relation: `queue`,\n queryParams: {\n size: this.pageLength,\n },\n };\n\n this.apiCallSubscription.unsubscribe();\n this.apiCallSubscription = this.apiService.activities.getQueuedActivities(requestParams).subscribe(\n (response: IApiResponse) => {\n this.activities = response.content;\n this.tableModel.totalDataLength = this.activities?.length;\n this.tableModel.data = this.mapTableModel(this.activities);\n },\n () => {\n this.toastMessagesService.show({\n title: 'Error',\n message: 'Error on loading queued activities',\n type: EToastMessageType.ERROR,\n });\n }\n );\n }\n\n private mapTableHeaders(): TableHeaderItem[] {\n return [\n new TableHeaderItem({\n data: `Project's name`,\n }),\n new TableHeaderItem({\n data: 'Creator',\n }),\n new TableHeaderItem({\n data: 'Activity type',\n }),\n new TableHeaderItem({\n data: 'Activity name',\n }),\n new TableHeaderItem({\n data: 'Creation data',\n }),\n new TableHeaderItem({\n data: 'Status',\n }),\n ];\n }\n\n private mapTableModel(items: Activity[]): TableItem[][] {\n return items.map(activity => [\n new TableItem({ data: activity.projectName }),\n new TableItem({ data: activity.creator.fullName }),\n new TableItem({ data: activity.activityTypeLabel }),\n new TableItem({ data: activity.activityName }),\n new TableItem({ data: activity.createdOn, template: this.createdOnTemplate }),\n new TableItem({ data: activity, template: this.statusTemplate }),\n ]);\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n this.apiCallSubscription.unsubscribe();\n }\n}\n","\n \n \n\n\n\n\n
\n
\n

Welcome, {{ apiService.auth.user.fullName }}

\n\n \n \n\n \n \n\n \n Sign up complete\n

It may take up to 30 minutes to activate your subscription. We’ll send an email to\n {{ apiService.auth?.user.email }} once this occurs.

\n
\n
\n
\n\n\n\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n\n\n Explore how to use the tools via API\n\n\n\n\n
\n
\n Additional tools\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
","import { Component, OnInit } from '@angular/core';\nimport { Router, UrlTree } from '@angular/router';\nimport { environment } from '@env/environment';\n\nimport { ApiService, CommonService } from '@services';\n@Component({\n selector: 'ibm-home',\n templateUrl: './home.component.html',\n styleUrls: ['./home.component.scss'],\n})\nexport class HomeComponent implements OnInit {\n roboRxnEnabled: boolean;\n\n environment = environment;\n\n constructor(public apiService: ApiService, public router: Router, public commonService: CommonService) {}\n\n ngOnInit(): void {\n this.roboRxnEnabled = this.apiService.auth.user.roboRxnEnabled;\n setTimeout(() => {\n window.scroll(0, 0);\n }, 0);\n }\n\n onCreate(resourceType: 'forward-reaction' | 'retrosynthesis' | 'synthesis' | 'reaction-completion') {\n switch (resourceType) {\n case 'forward-reaction':\n this.commonService.onCreateForwardReaction();\n break;\n case 'retrosynthesis':\n this.commonService.onCreatePredictRetrosyntheticRoutes();\n break;\n case 'synthesis':\n this.commonService.onPlanASynthesis();\n break;\n case 'reaction-completion':\n this.commonService.onCreateReactionCompletion();\n break;\n }\n }\n\n onLinkClick(url: UrlTree) {\n this.router.navigateByUrl(url);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { HomeComponent } from './home/home.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: HomeComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class HomeRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { SharedModule } from '@shared/shared.module';\nimport { HomeRoutingModule } from '@modules/home/home-routing.module';\n\nimport { HomeComponent } from './home/home.component';\nimport { InfoCardComponent } from './info-card/info-card.component';\nimport { ActionCardComponent } from './action-card/action-card.component';\nimport { QueuedActivitiesComponent } from './queued-activities/queued-activities.component';\n\n@NgModule({\n imports: [SharedModule, HomeRoutingModule],\n declarations: [\n HomeComponent,\n InfoCardComponent,\n ActionCardComponent,\n QueuedActivitiesComponent,\n HomeComponent,\n ],\n})\nexport class HomeModule {}\n"],"x_google_ignoreList":[]}