-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1276 from alliance-genome/release/v0.25.0
Release/v0.25.0
- Loading branch information
Showing
54 changed files
with
22,913 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Button } from "primereact/button"; | ||
|
||
export const DeleteAction = ({ disabled, deletionHandler, index}) => { | ||
return ( | ||
<Button icon="pi pi-trash" className="p-button-text" disabled={disabled} | ||
onClick={(e) => deletionHandler(e, index)} /> | ||
); | ||
}; |
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
src/main/cliapp/src/components/Editors/ControlledVocabularyEditor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent"; | ||
import { useControlledVocabularyService } from "../../service/useControlledVocabularyService"; | ||
import { ControlledVocabularyDropdown } from '../ControlledVocabularySelector'; | ||
|
||
export const ControlledVocabularyEditor = ({ | ||
props, | ||
onChangeHandler, | ||
errorMessages, | ||
rowIndex, | ||
vocabType, | ||
field, | ||
showClear, | ||
optionLabel="name" | ||
}) => { | ||
const vocabTerms = useControlledVocabularyService(vocabType); | ||
|
||
return ( | ||
<> | ||
<ControlledVocabularyDropdown | ||
field={field} | ||
options={vocabTerms} | ||
editorChange={onChangeHandler} | ||
props={props} | ||
showClear={showClear} | ||
optionLabel={optionLabel} | ||
dataKey='id' | ||
/> | ||
<DialogErrorMessageComponent errorMessages={errorMessages[rowIndex]} errorField={field} /> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { AutocompleteMultiEditor } from "../Autocomplete/AutocompleteMultiEditor"; | ||
import { SearchService } from '../../service/SearchService'; | ||
import { autocompleteSearch, buildAutocompleteFilter } from '../../utils/utils'; | ||
import { LiteratureAutocompleteTemplate } from '../Autocomplete/LiteratureAutocompleteTemplate'; | ||
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent"; | ||
|
||
const evidenceSearch = (event, setFiltered, setInputValue) => { | ||
const searchService = new SearchService(); | ||
const autocompleteFields = ["curie", "cross_references.curie"]; | ||
const endpoint = "literature-reference"; | ||
const filterName = "evidenceFilter"; | ||
const filter = buildAutocompleteFilter(event, autocompleteFields); | ||
|
||
setInputValue(event.query); | ||
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered); | ||
} | ||
export const EvidenceEditor = ({ props, errorMessages, onChange }) => { | ||
return ( | ||
<> | ||
<AutocompleteMultiEditor | ||
search={evidenceSearch} | ||
initialValue={props?.rowData?.evidence} | ||
rowProps={props} | ||
fieldName='evidence' | ||
subField='curie' | ||
valueDisplay={(item, setAutocompleteHoverItem, op, query) => | ||
<LiteratureAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query}/>} | ||
onValueChangeHandler={onChange} | ||
/> | ||
<DialogErrorMessageComponent | ||
errorMessages={errorMessages[props?.rowIndex]} | ||
errorField={"evidence"} | ||
/> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent"; | ||
import { useControlledVocabularyService } from "../../service/useControlledVocabularyService"; | ||
import { TrueFalseDropdown } from "../TrueFalseDropDownSelector"; | ||
|
||
export const InternalEditor = ({ props, internalOnChangeHandler, errorMessages, rowIndex }) => { | ||
const booleanTerms = useControlledVocabularyService("generic_boolean_terms"); | ||
|
||
return ( | ||
<> | ||
<TrueFalseDropdown | ||
props={props} | ||
field="internal" | ||
options={booleanTerms} | ||
editorChange={internalOnChangeHandler} | ||
showClear={false} | ||
/> | ||
<DialogErrorMessageComponent errorMessages={errorMessages[rowIndex]} errorField={"internal"} /> | ||
</> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
src/main/cliapp/src/components/Editors/TableInputTextEditor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { InputText } from "primereact/inputtext"; | ||
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent"; | ||
import { useState } from "react"; | ||
|
||
export const TableInputTextEditor = ({ value, errorMessages, textOnChangeHandler, rowIndex, field }) => { | ||
const [localValue, setLocalValue] = useState(value); | ||
|
||
const onChange = (e) => { | ||
setLocalValue(e.target.value); | ||
textOnChangeHandler(rowIndex, e, field) | ||
} | ||
|
||
return ( | ||
<> | ||
<InputText | ||
id={field} | ||
value={localValue} | ||
onChange={onChange} | ||
fieldName={field} | ||
/> | ||
<DialogErrorMessageComponent errorMessages={errorMessages[rowIndex]} errorField={field} /> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const FormTableWrapper = ({ | ||
labelColumnSize, | ||
table, | ||
tableName, | ||
showTable, | ||
button, | ||
}) => { | ||
return ( | ||
<div className="grid"> | ||
<div className="col-12"> | ||
<div className="mb-3"> | ||
<label>{tableName}</label> | ||
</div> | ||
{showTable && table} | ||
<div className={`${showTable ? "pt-3" : ""} p-field p-col col-4`}> | ||
{button} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.