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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":["<div class=\"d-flex flex-column bg-white p-7 action-card-container h-100\"\n (click)=\"triggerAction.emit($event)\">\n <div class=\"mb-5 action-name\"\n data-testid=\"action-card-name\">{{ actionName }}</div>\n <div class=\"mb-6 action-description flex-grow-1\">{{ description }}</div>\n <div class=\"d-flex justify-content-start\">\n <img [src]=\"imgSrc\"\n class=\"action-icon\" />\n </div>\n\n <div *ngIf=\"apiDocUrl\"\n class=\"d-flex justify-content-end\">\n <a ibmLink\n class=\"d-flex text-decoration-none\"\n [href]=\"apiDocUrl\"\n target=\"_blank\"\n (click)=\"$event.stopPropagation()\">\n\n API Docs\n\n <svg icon\n ibmIconArrowRight\n class=\"ml-2\"\n fill=\"currentColor\"\n [size]=\"16\"></svg>\n </a>\n </div>\n</div>","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","<div class=\"mb-7\"\n *ngIf=\"tableModel.totalDataLength\">\n\n <div ibmRow>\n <h1 ibmCol>Activities on Queue</h1>\n </div>\n\n <div ibmRow\n class=\"mt-5\">\n <div ibmCol\n class=\"overflow-hidden\">\n <ibm-table-container class=\"w-100\">\n <ibm-table [model]=\"tableModel\"\n [showSelectionColumn]=\"false\"\n [striped]=\"false\"\n [sortable]=\"true\"\n (rowClick)=\"onRowClick($event)\"\n size=\"sm\"></ibm-table>\n </ibm-table-container>\n </div>\n </div>\n\n</div>\n\n<ng-template #createdOnTemplate\n let-data=\"data\">\n {{data | date:'dd/MM/yyyy'}}\n</ng-template>\n\n<ng-template #statusTemplate\n let-data=\"data\">\n\n <div [ngSwitch]=\"data.status\"\n [attr.data-retrosynthesisId]=\"data.id\">\n <div *ngSwitchCase=\"EActivityStatus.WAITING\"\n class=\"d-flex align-items-center\">\n <ibm-icon-in-progress-warning size=\"16\"></ibm-icon-in-progress-warning>\n <span class=\"ml-3 bx--inline-loading__text\">{{data.activityStatusLabel}}</span>\n </div>\n <div *ngSwitchDefault>\n <ibm-inline-loading\n [state]=\"(data.status === EActivityStatus.RETROSYNTHESIS_READY || data.status === EActivityStatus.PREDICTION_READY) ? InlineLoadingState.Finished : InlineLoadingState.Active\"\n [successText]=\"data.activityStatusLabel\"\n [loadingText]=\"data.activityStatusLabel\">\n </ibm-inline-loading>\n </div>\n </div>\n\n</ng-template>","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<any>;\n @ViewChild('statusTemplate') statusTemplate: ElementRef<any>;\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<Activity[]>) => {\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","<ibm-mlrp-header [hasSidenav]=\"true\">\n <ibm-new-project-button></ibm-new-project-button>\n <ibm-user-overflow-menu></ibm-user-overflow-menu>\n</ibm-mlrp-header>\n\n<ibm-unsuccessful-payment-notification></ibm-unsuccessful-payment-notification>\n\n<div ibmRow\n class=\"mb-5\">\n <div ibmCol>\n <h1 data-heap-redact-text>Welcome, {{ apiService.auth.user.fullName }}</h1>\n\n <ibm-notification [notificationObj]=\"{\n type: 'success',\n showClose: false,\n lowContrast: true,\n template: subscriptionInProgress\n }\"\n *ngIf=\"apiService.auth?.user?.subscriptionInProgress\">\n </ibm-notification>\n\n <ibm-notification [notificationObj]=\"{\n type: 'warning',\n showClose: false,\n lowContrast: true,\n title: 'Api Key usage limit reached: ',\n message: 'You have reached the maximum number of API key calls.',\n }\"\n *ngIf=\"apiService.auth?.user?.isApiKeyLimitReached\">\n </ibm-notification>\n\n <ng-template #subscriptionInProgress>\n <strong class=\"mb-1\">Sign up complete</strong>\n <p class=\"small--sm\">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.</p>\n </ng-template>\n </div>\n</div>\n\n<ibm-upgrade-plan-button *ngIf=\"environment.ecommerceEnabled\"\n ibmHeapTrack=\"HOME: Get unlimited access\"></ibm-upgrade-plan-button>\n\n<div class=\"home-divider\"></div>\n\n<div ibmRow>\n <div ibmCol\n [columnNumbers]=\"{ max: 6, xlg: 6, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Predict retrosynthesis modal\"\n actionName=\"Predict retrosynthesis\"\n description=\"Predict possible retrosynthetic routes given a target molecule\"\n imgSrc=\"assets/img/home/predict_retrosynthesis.svg\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#predict-retrosynthesis\"\n (triggerAction)=\"onCreate('retrosynthesis')\">\n </ibm-action-card>\n </div>\n <div ibmCol\n [columnNumbers]=\"{ max: 6, xlg: 6, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Predict product modal\"\n actionName=\"Predict product\"\n description=\"Predict the product of a chemical reaction given the starting materials\"\n imgSrc=\"assets/img/home/predict_product.svg\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#predict-product\"\n (triggerAction)=\"onCreate('forward-reaction')\">\n </ibm-action-card>\n </div>\n <div ibmCol\n [columnNumbers]=\"{ max: 6, xlg: 6, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Predict reagents modal\"\n actionName=\"Predict reagents\"\n description=\"Predict the reagents needed to convert a given starting material to a given product\"\n imgSrc=\"assets/img/home/predict_reagents.svg\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#predict-reagents\"\n (triggerAction)=\"onCreate('reaction-completion')\">\n </ibm-action-card>\n </div>\n <div ibmCol\n [columnNumbers]=\"{ max: 6, xlg: 6, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Plan a synthesis modal\"\n actionName=\"Plan a synthesis\"\n description=\"Plan a synthesis starting from a target molecule, a retrosynthetic route, or an experimental procedure in text format\"\n imgSrc=\"assets/img/home/plan_synthesis.svg\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#plan-a-synthesis\"\n (triggerAction)=\"onCreate('synthesis')\">\n </ibm-action-card>\n </div>\n</div>\n\n<a ibmButton=\"secondary\"\n class=\"max-width-none font-weight-bold mt-3 bg-gray\"\n href=\"https://accelerate-science.github.io/rxn/wrapper/intro.html\"\n target=\"_blank\">\n Explore how to use the tools via API\n</a>\n\n<ibm-queued-activities class=\"mb-7\"></ibm-queued-activities>\n\n<div class=\"home-divider\"></div>\n<h5 class=\"font-weight-bold mb-6\">\n Additional tools\n</h5>\n\n<div ibmRow>\n <div ibmCol\n [columnNumbers]=\"{ max: 5, xlg: 5, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Atom mapping\"\n actionName=\"Atom mapping\"\n description=\"Map atoms from starting materials to products\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#atom-mapping\"\n (triggerAction)=\"onLinkClick(router.createUrlTree(['actions', 'reaction-properties-prediction']))\">\n </ibm-action-card>\n </div>\n <div ibmCol\n [columnNumbers]=\"{ max: 5, xlg: 5, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Text to procedure\"\n actionName=\"Text to procedure\"\n description=\"Translate your reaction procedures from text to exact steps to follow\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#text-to-procedure\"\n (triggerAction)=\"onLinkClick(router.createUrlTree(['actions', 'text-to-procedure']))\">\n </ibm-action-card>\n </div>\n <div ibmCol\n [columnNumbers]=\"{ max: 5, xlg: 5, lg: 8 , md: 4, sm: 4 }\"\n class=\"mb-7\">\n <ibm-action-card ibmHeapTrack=\"HOME: Reaction digitization\"\n actionName=\"Reaction digitization\"\n description=\"Convert images of reaction schemes to machine-readable format\"\n apiDocUrl=\"https://accelerate-science.github.io/rxn/wrapper/tools.html#reaction-digitization\"\n (triggerAction)=\"onLinkClick(router.createUrlTree(['optical-chemical-recognition']))\">\n </ibm-action-card>\n </div>\n</div>","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":[]}