Skip to content

Commit

Permalink
Add the mssing source file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed Jan 31, 2023
1 parent a0b4d5d commit 15aa878
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abi-software/mapintegratedvuer",
"version": "0.3.11-fixes-0",
"version": "0.3.12-beta-0",
"scripts": {
"serve": "vue-cli-service serve --port 8081",
"build": "vue-cli-service build --mode prod",
Expand All @@ -25,7 +25,7 @@
"*.js"
],
"dependencies": {
"@abi-software/flatmapvuer": "^0.3.12-fixes-0",
"@abi-software/flatmapvuer": "^0.3.13-beta-0",
"@abi-software/map-side-bar": "^1.3.33",
"@abi-software/plotvuer": "^0.3.9",
"@abi-software/scaffoldvuer": "^0.1.57",
Expand Down
64 changes: 64 additions & 0 deletions src/components/scripts/utilities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const initialState = () => {
return {
mainTabName: "Flatmap",
zIndex: 1,
showDialogIcons: false,
activeDockedId: 1,
currentCount: 1,
entries: [
{
resource: "Rat",
type: "MultiFlatmap",
zIndex:1,
mode: "main",
id: 1,
state: undefined,
label: "",
discoverId: undefined
}
],
sideBarVisibility: true,
search: '',
startUp: true
}
}

const capitalise = term => {
if (term)
return term.charAt(0).toUpperCase() + term.slice(1);
return term;
};

const availableSpecies = () => {
return {
"Human Female":{taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass:"mapicon-icon_human", displayWarning:true},
"Human Male":{taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass:"mapicon-icon_human", displayWarning:true},
"Rat":{taxo: "NCBITaxon:10114", iconClass:"mapicon-icon_rat", displayLatestChanges: true},
"Mouse":{taxo: "NCBITaxon:10090", iconClass:"mapicon-icon_mouse", displayWarning: true},
"Pig":{taxo: "NCBITaxon:9823", iconClass:"mapicon-icon_pig", displayWarning: true},
"Cat":{taxo: "NCBITaxon:9685", iconClass:"mapicon-icon_cat", displayWarning: true},
}
}

const findSpeciesKey = condition => {
if (condition) {
const list = availableSpecies();
const keys = Object.keys(list);
for (let i = 0; i < keys.length; i++) {
if (condition.taxo === list[keys[i]].taxo) {
if (condition.biologicalSex) {
if (condition.biologicalSex === list[keys[i]].biologicalSex)
return keys[i];
} else {
return keys[i];
}
}
}
}
return "";
}

exports.availableSpecies = availableSpecies;
exports.capitalise = capitalise;
exports.findSpeciesKey = findSpeciesKey;
exports.initialState = initialState;

0 comments on commit 15aa878

Please sign in to comment.