Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,25 @@
},
"private": true,
"dependencies": {
"@angular/animations": "13.2.1",
"@angular/cdk": "13.2.1",
"@angular/common": "13.2.1",
"@angular/compiler": "13.2.1",
"@angular/core": "13.2.1",
"@angular/forms": "13.2.1",
"@angular/material": "13.2.1",
"@angular/platform-browser": "13.2.1",
"@angular/platform-browser-dynamic": "13.2.1",
"@angular/platform-server": "13.2.1",
"@angular/router": "13.2.1",
"@nguniversal/express-engine": "13.0.2",
"@angular/animations": "14.3.0",
"@angular/cdk": "^14.2.7",
"@angular/common": "14.3.0",
"@angular/compiler": "14.3.0",
"@angular/core": "14.3.0",
"@angular/forms": "14.3.0",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "14.3.0",
"@angular/platform-browser-dynamic": "14.3.0",
"@angular/platform-server": "14.3.0",
"@angular/router": "14.3.0",
"@nguniversal/express-engine": "^14.2.3",
"@types/hammerjs": "2.0.36",
"@types/node": "18.15.3",
"classlist.js": "1.1.20150312",
"compression": "1.7.3",
"core-js": "2.5.4",
"cronstrue": "1.94.0",
"date-fns": "^4.1.0",
"defiant.js": "2.2.6",
"dom-to-image": "^2.6.0",
"hammerjs": "2.0.8",
Expand All @@ -68,10 +69,10 @@
"ng-multiselect-dropdown": "0.2.10",
"ngx-json-viewer": "2.4.0",
"ngx-moment": "3.5.0",
"ngx-schema-form": "2.7.0",
"primeng": "^13.2.0",
"ngx-schema-form": "2.8.4",
"primeng": "^14.2.3",
"reflect-metadata": "0.1.13",
"rxjs": "7.5.4",
"rxjs": "7.4.0",
"ts-loader": "4.5.0",
"util": "0.12.4",
"web-animations-js": "2.3.2",
Expand All @@ -80,15 +81,15 @@
"zone.js": "0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "13.2.1",
"@angular-eslint/builder": "13.0.1",
"@angular-eslint/eslint-plugin": "13.0.1",
"@angular-eslint/eslint-plugin-template": "13.0.1",
"@angular-eslint/schematics": "13.0.1",
"@angular-eslint/template-parser": "13.0.1",
"@angular/cli": "13.2.1",
"@angular/compiler-cli": "13.2.1",
"@angular/language-service": "13.2.1",
"@angular-devkit/build-angular": "^14.2.13",
"@angular-eslint/builder": "^14.4.0",
"@angular-eslint/eslint-plugin": "^14.4.0",
"@angular-eslint/eslint-plugin-template": "^14.4.0",
"@angular-eslint/schematics": "^14.4.0",
"@angular-eslint/template-parser": "^14.4.0",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "^14.3.0",
"@angular/language-service": "^14.3.0",
"@types/estree": "0.0.51",
"@types/jasmine": "3.10.3",
"@types/jasminewd2": "2.0.10",
Expand All @@ -112,15 +113,15 @@
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.7.0",
"mkdirp": "1.0.4",
"ng-packagr": "13.2.1",
"ng-packagr": "14.2.2",
"protractor": "7.0.0",
"raw-loader": "4.0.2",
"rimraf": "3.0.2",
"sass": "1.80.6",
"ts-node": "10.5.0",
"tslib": "2.3.1",
"tslint": "5.20.1",
"typescript": "4.5.5"
"typescript": "4.8.4"
},
"husky": {
"hooks": {
Expand Down
2 changes: 0 additions & 2 deletions src/app/core/admin/admin.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { AdminComponent } from '@gsrs-core/admin/admin.component';
import { CvTermDialogComponent } from '@gsrs-core/admin/cv-management/cv-term-dialog/cv-term-dialog.component';
import { ScheduledJobsComponent } from '@gsrs-core/admin/scheduled-jobs/scheduled-jobs.component';
import { ScheduledJobComponent } from '@gsrs-core/admin/scheduled-jobs/scheduled-job/scheduled-job.component';
import { MomentModule } from 'ngx-moment';
import { UserManagementComponent } from '@gsrs-core/admin/user-management/user-management.component';
import { UserEditDialogComponent } from '@gsrs-core/admin/user-management/user-edit-dialog/user-edit-dialog.component';
import { CacheSummaryComponent } from '@gsrs-core/admin/cache-summary/cache-summary.component';
Expand Down Expand Up @@ -77,7 +76,6 @@ import { TakeImportPipe } from '@gsrs-core/admin/import-browse/take-import.pipe'
MatTooltipModule,
MatProgressSpinnerModule,
MatDialogModule,
MomentModule,
MatPaginatorModule,
MatIconModule,
MatRadioModule,
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/config/config.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { ConfigService } from './config.service';
import { environment } from '../../../environments/environment';

// eslint-disable-next-line ban-types
export function configServiceFactory(startupService: ConfigService): Function {
return () => startupService.load(environment);
}
export function configServiceFactory(configService: ConfigService): () => Promise<void> {
return () => configService.load(environment);
}
4 changes: 2 additions & 2 deletions src/app/core/sequence-search/sequence-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class SequenceSearchComponent implements OnInit, OnDestroy {
this.sequenceSearchForm.controls.type.setValue(params.get('type'));
}
if (params.has('cutoff')) {
this.sequenceSearchForm.controls.cutoff.setValue(params.get('cutoff'));
this.sequenceSearchForm.controls.cutoff.setValue(parseInt(params.get('cutoff')));
}
if (params.has('seq_type')) {
const type = params.get('seq_type');
Expand Down Expand Up @@ -173,7 +173,7 @@ export class SequenceSearchComponent implements OnInit, OnDestroy {
}
}, error => {
console.log(error);
if (this.sequenceSearchForm.value.sequence > 50000 ) {
if (parseInt(this.sequenceSearchForm.value.sequence) > 50000 ) {
this.errorMessage = 'Cannot process searches for sequences with more than 50,000 sites';
} else {
this.errorMessage = 'There was a problem processing your sequence search request';
Expand Down
20 changes: 10 additions & 10 deletions src/app/core/substance-form/amount-form/amount-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class AmountFormComponent implements OnInit {
this.typeControl.valueChanges.subscribe(value => {
this.privateSubstanceAmount.type = value;
});
this.averageControl.setValue(this.privateSubstanceAmount.average);
this.averageControl.setValue(this.privateSubstanceAmount.average.toString());
this.averageControl.valueChanges.subscribe(value => {
if(value === null) {
this.averageControl.setValue('');
Expand All @@ -58,9 +58,9 @@ export class AmountFormComponent implements OnInit {
} else {
this.averageControl.setValue('');
}
this.privateSubstanceAmount.average = value;
this.privateSubstanceAmount.average = parseInt(value);
});
this.lowControl.setValue(this.privateSubstanceAmount.low);
this.lowControl.setValue(this.privateSubstanceAmount.low.toString());
this.lowControl.valueChanges.subscribe(value => {

if(value === null) {
Expand All @@ -71,9 +71,9 @@ export class AmountFormComponent implements OnInit {
} else {
this.lowControl.setValue('');
}
this.privateSubstanceAmount.low = value;
this.privateSubstanceAmount.low = parseInt(value);
});
this.highControl.setValue(this.privateSubstanceAmount.high);
this.highControl.setValue(this.privateSubstanceAmount.high.toString());
this.highControl.valueChanges.subscribe(value => {

if(value === null) {
Expand All @@ -84,9 +84,9 @@ export class AmountFormComponent implements OnInit {
} else {
this.highControl.setValue('');
}
this.privateSubstanceAmount.high = value;
this.privateSubstanceAmount.high = parseInt(value);
});
this.lowLimitControl.setValue(this.privateSubstanceAmount.lowLimit);
this.lowLimitControl.setValue(this.privateSubstanceAmount.lowLimit.toString());
this.lowLimitControl.valueChanges.subscribe(value => {
if(value === null) {
this.lowLimitControl.setValue('');
Expand All @@ -96,9 +96,9 @@ export class AmountFormComponent implements OnInit {
} else {
this.lowLimitControl.setValue('');
}
this.privateSubstanceAmount.lowLimit = value;
this.privateSubstanceAmount.lowLimit = parseInt(value);
});
this.highLimitControl.setValue(this.privateSubstanceAmount.highLimit);
this.highLimitControl.setValue(this.privateSubstanceAmount.highLimit.toString());
this.highLimitControl.valueChanges.subscribe(value => {
if(value === null) {
this.highLimitControl.setValue('');
Expand All @@ -108,7 +108,7 @@ export class AmountFormComponent implements OnInit {
} else {
this.highLimitControl.setValue('');
}
this.privateSubstanceAmount.highLimit = value;
this.privateSubstanceAmount.highLimit = parseInt(value);
});
this.unitsControl.setValue(this.privateSubstanceAmount.units);
this.unitsControl.valueChanges.subscribe(value => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class DisulfideLinksFormComponent implements OnInit, AfterViewInit, OnDes

ngOnInit() {
if (this.privateLink.sites) {
this.testForm.controls['site0'].setValue(this.privateLink.sites[0]);
this.testForm.controls['site1'].setValue(this.privateLink.sites[1]);
this.testForm.controls['site0'].setValue(this.privateLink.sites[0].toString());
this.testForm.controls['site1'].setValue(this.privateLink.sites[1].toString());
} else {
this.privateLink.sites = [{}, {}];
}
Expand Down Expand Up @@ -128,14 +128,14 @@ export class DisulfideLinksFormComponent implements OnInit, AfterViewInit, OnDes
if (newLinks) {
if (newLinks[0] && newLinks[0].subunitIndex) {
this.privateLink.sites[0] = newLinks[0];
this.testForm.controls['site0'].setValue(this.privateLink.sites[0]);
this.testForm.controls['site0'].setValue(this.privateLink.sites[0].toString());
} else {
this.privateLink.sites[0] = {};
this.testForm.controls['site0'].reset();
}
if (newLinks[1] && newLinks[1].subunitIndex) {
this.privateLink.sites[1] = newLinks[1];
this.testForm.controls['site1'].setValue(this.privateLink.sites[1]);
this.testForm.controls['site1'].setValue(this.privateLink.sites[1].toString());
} else {
this.privateLink.sites[1] = {};
this.testForm.controls['site1'].reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { SubstanceReference } from '../../../substance/substance.model';
import { SubstanceService } from '@gsrs-core/substance/substance.service';
import { AuthService } from '@gsrs-core/auth';
import { Content } from '@angular/compiler/src/render3/r3_ast';

@Component({
selector: 'app-refernce-form-dialog',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ export class SubstanceFormStructurallyDiverseSourceComponent extends SubstanceF
let found = true;
check.forEach( field => {
if (this.structurallyDiverse[field] && this.structurallyDiverse[field] !== null &&
this.structurallyDiverse[field] !== '' &&
this.structurallyDiverse[field] !== {} ) {
this.structurallyDiverse[field] !== '' && Object.keys(this.structurallyDiverse[field]).length > 0 ) {
found = false;
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/substance-form/substance-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ export class SubstanceFormService implements OnDestroy {
if (substanceCopy.polymer && substanceCopy.polymer.monomers) {
for (let i = 0; i < substanceCopy.polymer.monomers.length; i++) {
const prop = substanceCopy.polymer.monomers[i];
if (!prop.monomerSubstance || prop.monomerSubstance == {}) {
if (!prop.monomerSubstance || Object.keys(prop.monomerSubstance).length === 0) {
const invalidPropertyMessage: ValidationMessage = {
actionType: 'frontEnd',
appliedChange: false,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/substance-ssg2/substance-ssg2-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ export class SubstanceSsg2FormService implements OnDestroy {
if (substanceCopy.polymer && substanceCopy.polymer.monomers) {
for (let i = 0; i < substanceCopy.polymer.monomers.length; i++) {
const prop = substanceCopy.polymer.monomers[i];
if (!prop.monomerSubstance || prop.monomerSubstance === {}) {
if (!prop.monomerSubstance || Object.keys(prop.monomerSubstance).length === 0) {
const invalidPropertyMessage: ValidationMessage = {
actionType: 'frontEnd',
appliedChange: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,50 +221,50 @@ export class Ssg4mCriticalParameterFormComponent implements OnInit, OnDestroy {
this.typeControl.valueChanges.subscribe(value => {
this.privateSubstanceAmount.type = value;
});
this.averageControl.setValue(this.privateSubstanceAmount.average);
this.averageControl.setValue(this.privateSubstanceAmount.average.toString());
this.averageControl.valueChanges.subscribe(value => {
if (value === null) {
this.averageControl.setValue('');
} else if (value.length === 1 && value.match(/[a-z]/i)) {
this.averageControl.setValue('');
}
this.privateSubstanceAmount.average = value;
this.privateSubstanceAmount.average = parseInt(value);
});
this.lowControl.setValue(this.privateSubstanceAmount.low);
this.lowControl.setValue(this.privateSubstanceAmount.low.toString());
this.lowControl.valueChanges.subscribe(value => {
if (value === null) {
this.lowControl.setValue('');
} else if (value.length === 1 && value.match(/[a-z]/i)) {
this.lowControl.setValue('');
}
this.privateSubstanceAmount.low = value;
this.privateSubstanceAmount.low = parseInt(value);
});
this.highControl.setValue(this.privateSubstanceAmount.high);
this.highControl.setValue(this.privateSubstanceAmount.high.toString());
this.highControl.valueChanges.subscribe(value => {
if (value === null) {
this.highControl.setValue('');
} else if (value.length === 1 && value.match(/[a-z]/i)) {
this.highControl.setValue('');
}
this.privateSubstanceAmount.high = value;
this.privateSubstanceAmount.high = parseInt(value);
});
this.lowLimitControl.setValue(this.privateSubstanceAmount.lowLimit);
this.lowLimitControl.setValue(this.privateSubstanceAmount.lowLimit.toString());
this.lowLimitControl.valueChanges.subscribe(value => {
if (value === null) {
this.lowLimitControl.setValue('');
} else if (value.length === 1 && value.match(/[a-z]/i)) {
this.lowLimitControl.setValue('');
}
this.privateSubstanceAmount.lowLimit = value;
this.privateSubstanceAmount.lowLimit = parseInt(value);
});
this.highLimitControl.setValue(this.privateSubstanceAmount.highLimit);
this.highLimitControl.setValue(this.privateSubstanceAmount.highLimit.toString());
this.highLimitControl.valueChanges.subscribe(value => {
if (value === null) {
this.highLimitControl.setValue('');
} else if (value.length === 1 && value.match(/[a-z]/i)) {
this.highLimitControl.setValue('');
}
this.privateSubstanceAmount.highLimit = value;
this.privateSubstanceAmount.highLimit = parseInt(value);
});
this.unitsControl.setValue(this.privateSubstanceAmount.units);
this.unitsControl.valueChanges.subscribe(value => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ export class SubstanceSsg4ManufactureFormComponent implements OnInit, AfterViewI
if (substanceCopy.polymer && substanceCopy.polymer.monomers) {
for (let i = 0; i < substanceCopy.polymer.monomers.length; i++) {
const prop = substanceCopy.polymer.monomers[i];
if (!prop.monomerSubstance || prop.monomerSubstance === {}) {
if (!prop.monomerSubstance || Object.keys(prop.monomerSubstance).length === 0) {
const invalidPropertyMessage: ValidationMessage = {
actionType: 'frontEnd',
appliedChange: false,
Expand Down