@ts4nfdi/terminology-service-suite 5.5.1 → 5.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -73,7 +73,7 @@ function AutocompleteWidget(props) {
|
|
|
73
73
|
React.createElement(EuiHealth, { color: dotColor },
|
|
74
74
|
React.createElement(EuiHighlight, { search: searchValue }, value.label)),
|
|
75
75
|
"\u00A0\u00A0\u00A0\u00A0\u00A0",
|
|
76
|
-
React.createElement(BreadcrumbPresentation, { shortForm: value.short_form, colorFirst: "primary", colorSecond: "success", className: `${finalClassName}-breadcrumb` }),
|
|
76
|
+
React.createElement(BreadcrumbPresentation, { shortForm: value.short_form, ontologyId: value.ontology_name, colorFirst: "primary", colorSecond: "success", className: `${finalClassName}-breadcrumb` }),
|
|
77
77
|
React.createElement(EuiIcon, { type: "iInCircle", style: { marginLeft: "5px" }, title: hoverText })),
|
|
78
78
|
!singleSuggestionRow && value.description && (React.createElement("span", { style: {
|
|
79
79
|
overflow: "hidden",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteWidget.js","sources":["../../../../../../src/components/widgets/AutocompleteWidget/AutocompleteWidget.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { OlsSearchApi } from \"../../../api/ols/OlsSearchApi\";\nimport { EuiComboBoxOptionOption } from \"@elastic/eui/src/components/combo_box/types\";\nimport {\n EuiComboBox,\n euiPaletteColorBlindBehindText,\n euiPaletteColorBlind,\n EuiHighlight,\n EuiHealth,\n EuiProvider,\n EuiIcon,\n} from \"@elastic/eui\";\nimport { QueryClient, QueryClientProvider, useQuery } from \"react-query\";\nimport { AutocompleteWidgetProps } from \"../../../app/types\";\nimport { BreadcrumbPresentation } from \"../MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation\";\nimport \"../../../style/ts4nfdiStyles/ts4nfdiAutocompleteStyle.css\";\nimport \"../../../style/ts4nfdiStyles/ts4nfdiBreadcrumbStyle.css\";\nimport { Entity } from \"../../../model/interfaces\";\nimport { OlsEntityApi } from \"../../../api/ols/OlsEntityApi\";\n\n/**\n * A React component to provide Autosuggestion based on SemLookP.\n */\nfunction AutocompleteWidget(props: AutocompleteWidgetProps) {\n const {\n api,\n parameter,\n hasShortSelectedLabel,\n allowCustomTerms,\n selectionChangedEvent,\n preselected,\n placeholder,\n singleSelection,\n singleSuggestionRow,\n ts4nfdiGateway = false,\n showApiSource = true,\n className,\n useLegacy,\n ...rest\n } = props;\n\n const olsApi = new OlsSearchApi(api);\n const olsEntityApi = new OlsEntityApi(api);\n\n const visColors = euiPaletteColorBlind();\n const visColorsBehindText = euiPaletteColorBlindBehindText();\n\n /**\n * The current search value\n */\n const [searchValue, setSearchValue] = useState<string>(\"\");\n\n /**\n * The set of available options.s\n */\n const [options, setOptions] = useState<Array<EuiComboBoxOptionOption<any>>>(\n [],\n );\n\n /**\n * Store current set of select Options. A subset of options.\n */\n const [selectedOptions, setSelectedOptions] = useState<\n Array<EuiComboBoxOptionOption<any>>\n >([]);\n\n const finalClassName = className || \"ts4nfdi-autocomplete-style\";\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const renderOption = (option, searchValue) => {\n const { label, value } = option;\n const dotColorIndex = visColorsBehindText.indexOf(\n value.type === \"class\"\n ? visColorsBehindText[5]\n : value.type === \"individual\"\n ? visColorsBehindText[3]\n : value.type === \"property\"\n ? visColorsBehindText[1]\n : \"\",\n );\n const dotColor = visColors[dotColorIndex];\n\n if (allowCustomTerms && value.iri == \"\") {\n // if we have a custom term, just show the label\n return label;\n }\n\n const prefix =\n value.type === \"ontology\"\n ? \"Prefix: \" + value.ontology_name\n : \"Prefix > Short form: \" +\n value.ontology_name +\n \" > \" +\n value.short_form;\n\n let hoverText = `Type: ${value.type}\\n\\nLabel: ${value.label}\\n\\n${prefix}`;\n if (value.description != undefined) {\n hoverText += `\\n\\nDescription: ${value.description}`;\n }\n if (showApiSource && value.source_url && value.source_url !== \"\") {\n hoverText += \"\\n\\nSource: \" + value.source;\n hoverText += \"\\n\\nSource URL: \" + value.source_url;\n }\n\n const renderOntology = () => {\n return (\n <span className={finalClassName}>\n <EuiHealth color={dotColor}>\n <span>\n <EuiHighlight search={searchValue}>{value.label}</EuiHighlight>\n <br />\n {value.description}\n </span>\n </EuiHealth>\n </span>\n );\n };\n\n const renderEntity = () => {\n return (\n <span title={hoverText} className={finalClassName}>\n <span>\n <EuiHealth color={dotColor}>\n <EuiHighlight search={searchValue}>{value.label}</EuiHighlight>\n </EuiHealth>\n \n <BreadcrumbPresentation\n shortForm={value.short_form}\n colorFirst={\"primary\"}\n colorSecond={\"success\"}\n className={`${finalClassName}-breadcrumb`}\n />\n <EuiIcon\n type={\"iInCircle\"}\n style={{ marginLeft: \"5px\" }}\n title={hoverText}\n />\n </span>\n {!singleSuggestionRow && value.description && (\n <span\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n display: \"block\",\n }}\n >\n {value.description}\n </span>\n )}\n </span>\n );\n };\n\n return value.type === \"ontology\" ? renderOntology() : renderEntity();\n };\n\n /**\n * For preselect property\n * Creates option from preselected label and iri\n * @param preselectedElement\n */\n function createCustomTermOption(\n preselectedElement: any,\n ): EuiComboBoxOptionOption<any> {\n return {\n label: preselectedElement.label,\n key: preselectedElement.label,\n value: {\n iri: preselectedElement.iri || \"\",\n label: preselectedElement.label,\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n source_url: \"\",\n },\n };\n }\n\n /**\n * For preselected property\n * Creates option from OLS API select response\n * @param selection The select response\n */\n function createSelectOption(selection: any): EuiComboBoxOptionOption<any> {\n return {\n label: hasShortSelectedLabel\n ? selection.getLabel()\n : generateDisplayLabel(selection),\n key: `${selection.getOntologyId()}::${selection.getIri()}::${selection.getType()}`,\n value: {\n iri: selection.getIri(),\n label: selection.getLabel(),\n ontology_name: selection.getOntologyId(),\n type: selection.getType(),\n short_form: selection.getShortForm(),\n description: selection.getDescription(),\n },\n };\n }\n\n /**\n * For preselected property\n * Creates option from OLS4 API entity response\n * @param entity The Entity object response\n */\n function createEntityOption(entity: Entity): EuiComboBoxOptionOption<any> {\n return {\n label: hasShortSelectedLabel\n ? entity.getLabel()\n : generateDisplayLabel(entity),\n key: `${entity.getOntologyId()}::${entity.getIri()}::${entity.getType()}`,\n value: {\n iri: entity.getIri(),\n label: entity.getLabel(),\n ontology_name: entity.getOntologyId(),\n type: entity.getType(),\n short_form: entity.getShortForm(),\n description: entity.getDescription(),\n },\n };\n }\n\n /**\n * For preselected property\n * Request the OLS4 API entity endpoint and create the entity option\n * @param preselectedElement\n * @param preselectedOptions\n */\n async function fetchAndProcessEntityOption(\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ) {\n try {\n const response = await olsEntityApi.getEntityObject(\n preselectedElement.iri,\n undefined,\n undefined,\n parameter,\n useLegacy,\n );\n\n preselectedOptions.push(createEntityOption(response));\n\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n } catch (error) {\n if (preselectedElement.label && allowCustomTerms)\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n console.error(\n \"Error fetching data for option:\",\n preselectedElement,\n error,\n );\n }\n }\n\n /**\n * For preselected property\n * Request the OLS API select endpoint and create select option by either using select response or - if no response - use the preselected label and iri\n * @param preselectedElement\n * @param preselectedOptions\n */\n async function fetchAndProcessSelectOption(\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ) {\n try {\n const response = await olsApi.getSelectData(\n { query: preselectedElement.iri },\n undefined,\n undefined,\n parameter,\n ts4nfdiGateway,\n );\n\n if (!response) return;\n\n const matchFound = processSelectResponse(\n response,\n preselectedElement,\n preselectedOptions,\n );\n\n if (!matchFound && preselectedElement.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n } catch (error) {\n if (preselectedElement.label && allowCustomTerms)\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n console.error(\n \"Error fetching data for option:\",\n preselectedElement,\n error,\n );\n }\n }\n\n /**\n * For preselected property\n * If the preselected element has a select response, create the select option\n * If no select response, return false\n * @param response\n * @param preselectedElement\n * @param preselectedOptions\n */\n function processSelectResponse(\n response: any,\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ): boolean {\n let matchFound = false;\n\n response.properties.forEach((selection: any) => {\n if (preselectedElement.iri === selection.getIri()) {\n matchFound = true;\n preselectedOptions.push(createSelectOption(selection));\n }\n });\n\n return matchFound;\n }\n\n /**\n * on mount: fetches term for preselected\n * sets its label or sets a given label if no iri is provided/the given iri cannot be resolved\n * only if allowCustomTerms is true\n */\n const { isLoading: isLoadingOnMount } = useQuery(\n [\"onMount\", preselected],\n async () => {\n let preselectedOptions: EuiComboBoxOptionOption<any>[] = [];\n\n let uniqueValues = [...new Set(preselected ?? [])].filter(\n (option) => (allowCustomTerms && option.label) || option.iri,\n );\n\n if (uniqueValues.length === 0) return;\n\n if (singleSelection) uniqueValues = [uniqueValues[0]];\n\n for (const preselectedElement of uniqueValues) {\n if (useLegacy) {\n if (preselectedElement?.iri?.startsWith(\"http\")) {\n await fetchAndProcessSelectOption(\n preselectedElement,\n preselectedOptions,\n );\n } else if (preselectedElement?.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n } else {\n if (preselectedElement?.iri?.startsWith(\"http\")) {\n await fetchAndProcessEntityOption(\n preselectedElement,\n preselectedOptions,\n );\n } else if (preselectedElement?.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n }\n }\n setOptions(preselectedOptions);\n setSelectedOptions(preselectedOptions);\n },\n );\n\n /**\n * fetches new options when searchValue changes\n */\n const { isLoading: isLoadingTerms } = useQuery(\n [\"onSearchChange\", searchValue],\n async () => {\n if (searchValue.length > 0) {\n return olsApi\n .getSelectData(\n { query: searchValue },\n undefined,\n undefined,\n parameter,\n ts4nfdiGateway,\n )\n .then((response) => {\n if (response) {\n setOptions(\n response.properties.map((selection: any) => ({\n // label to display within the combobox either raw value or generated one\n // #renderOption() is used to display during selection.\n label: hasShortSelectedLabel\n ? selection.getLabel()\n : generateDisplayLabel(selection),\n // key to distinguish the options (especially those with same label)\n key: `${selection.getOntologyId()}::${selection.getIri()}::${selection.getType()}`,\n // values to pass to clients\n value: {\n iri: selection.getIri(),\n label: selection.getLabel(),\n ontology_name: selection.getOntologyId(),\n type: selection.getType(),\n short_form: selection.getShortForm(),\n description: selection.getDescription(),\n source: selection.getApiSourceName(),\n source_url: selection.getApiSourceEndpoint(),\n },\n })),\n );\n }\n });\n }\n },\n );\n\n /**\n * Once the set of selected options changes, pass the event by invoking the passed function.\n */\n useEffect(() => {\n let isMounted = true;\n if (isMounted) {\n selectionChangedEvent(\n selectedOptions.map((x) => {\n // return the value object with the raw values from OLS to a client\n if (allowCustomTerms && x.value.iri == \"\") {\n return {\n iri: \"\",\n label: x.label,\n ontology_name: \"\",\n type: \"\",\n short_form: x.value.short_form,\n description: x.value.description,\n source: x.value.source,\n };\n } else if (x.value.iri == \"\") {\n return {\n iri: \"\",\n label: \"\",\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n };\n } else {\n return {\n iri: x.value.iri,\n label: x.value.label,\n ontology_name: x.value.ontology_name,\n type: x.value.type,\n short_form: x.value.short_form,\n description: x.value.description,\n source: x.value.source,\n };\n }\n }),\n );\n }\n return () => {\n isMounted = false;\n };\n }, [selectedOptions]);\n\n function generateDisplayLabel(item: any): string {\n return (\n item?.getLabel() ??\n \"-\" + \" (\" + item?.getOntologyId()?.toUpperCase() ??\n \"-\" + \" \" + item?.getShortForm() ??\n \"-\" + \")\"\n );\n }\n\n function onChangeHandler(options: Array<any>): void {\n setSelectedOptions(options);\n }\n\n function onCreateOptionHandler(searchValue: string) {\n const newOption = {\n label: searchValue,\n key: searchValue,\n value: {\n iri: \"\",\n label: \"\",\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n },\n };\n\n setOptions([...options, newOption]);\n setSelectedOptions(\n singleSelection ? [newOption] : [...selectedOptions, newOption],\n );\n }\n\n return (\n <div className={finalClassName}>\n <EuiComboBox\n isClearable\n aria-label=\"searchBar\"\n fullWidth={true}\n {...rest} // items above can be overridden by a client\n async={true}\n isLoading={isLoadingTerms || isLoadingOnMount}\n singleSelection={singleSelection ? { asPlainText: true } : false}\n placeholder={placeholder ? placeholder : \"Search for a Concept\"}\n options={options}\n selectedOptions={selectedOptions}\n onSearchChange={setSearchValue}\n onChange={onChangeHandler}\n renderOption={renderOption}\n onCreateOption={allowCustomTerms ? onCreateOptionHandler : undefined}\n rowHeight={singleSuggestionRow ? 30 : 50}\n />\n </div>\n );\n}\n\nfunction createAutocomplete(\n props: AutocompleteWidgetProps,\n container: any,\n callback?: () => void,\n) {\n // @ts-ignore\n ReactDOM.render(WrappedAutocompleteWidget(props), container, callback);\n}\n\nfunction WrappedAutocompleteWidget(props: AutocompleteWidgetProps) {\n const queryClient = new QueryClient();\n return (\n <EuiProvider colorMode=\"light\" globalStyles={false}>\n <QueryClientProvider client={queryClient}>\n <AutocompleteWidget\n api={props.api}\n parameter={props.parameter}\n selectionChangedEvent={props.selectionChangedEvent}\n preselected={props.preselected}\n singleSelection={props.singleSelection as boolean}\n placeholder={props.placeholder}\n hasShortSelectedLabel={props.hasShortSelectedLabel}\n allowCustomTerms={props.allowCustomTerms}\n ts4nfdiGateway={props.ts4nfdiGateway}\n singleSuggestionRow={props.singleSuggestionRow}\n showApiSource={props.showApiSource}\n className={props.className}\n useLegacy={props.useLegacy}\n />\n </QueryClientProvider>\n </EuiProvider>\n );\n}\n\nexport { AutocompleteWidget, createAutocomplete };\n"],"names":[],"mappings":";;;;;;;;;AAwBA;;AAEG;AACH;AACE;AAiBA;AACA;AAEA;AACA;AAEA;;AAEG;;AAGH;;AAEG;;AAKH;;AAEG;;AAKH;;;AAIA;AACE;;AAGI;AACA;AACE;AACA;AACE;;AAGR;;;AAIE;;AAGF;AAEI;AACA;AACE;;;AAIN;AACA;AACE;;AAEF;AACE;AACA;;;AAIA;AAEI;AACE;;;AAGG;AAKX;;;AAKM;AACE;;;;AAUA;;AASI;AACA;AACA;AACA;AACD;AAOX;AAEA;AACF;AAEA;;;;AAIG;;;;;AAOC;AACE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;AAIG;;;AAGC;AACE;AACA;AACF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;AAIG;;;AAGC;AACE;AACA;AACF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;;AAKG;AACH;AAIE;AACE;;;AAWE;;;;AAGF;;;AAGE;;;;;AAUN;;;;;AAKG;AACH;AAIE;;AASE;;;;;;;AAaE;;;;AAGF;;;AAGE;;;;;AAUN;;;;;;;AAOG;AACH;;;;;;;AAYE;AAEA;;AAGF;;;;AAIG;AACH;;AAKI;AAIA;;AAEA;AAAqB;AAErB;;;AAGM;;AAIK;;;;;;AAKL;;AAIK;;;;;;;AAOb;AAGF;;AAEG;AACH;AAGI;AACE;AACG;AAOA;;AAEG;;;AAII;AACE;AACA;;AAEF;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIT;;AAEN;AAGF;;AAEG;;;;;;;;AASS;;AAEA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAMV;;AAEA;AACF;;AAGE;;AAGE;;;;;;;AAUF;AACE;AACA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIH;;AAKF;;AAqBF;AAEA;;AAME;AACF;AAEA;AACE;;AAGI;AACE;AAkBR;;"}
|
|
1
|
+
{"version":3,"file":"AutocompleteWidget.js","sources":["../../../../../../src/components/widgets/AutocompleteWidget/AutocompleteWidget.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { OlsSearchApi } from \"../../../api/ols/OlsSearchApi\";\nimport { EuiComboBoxOptionOption } from \"@elastic/eui/src/components/combo_box/types\";\nimport {\n EuiComboBox,\n euiPaletteColorBlindBehindText,\n euiPaletteColorBlind,\n EuiHighlight,\n EuiHealth,\n EuiProvider,\n EuiIcon,\n} from \"@elastic/eui\";\nimport { QueryClient, QueryClientProvider, useQuery } from \"react-query\";\nimport { AutocompleteWidgetProps } from \"../../../app/types\";\nimport { BreadcrumbPresentation } from \"../MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation\";\nimport \"../../../style/ts4nfdiStyles/ts4nfdiAutocompleteStyle.css\";\nimport \"../../../style/ts4nfdiStyles/ts4nfdiBreadcrumbStyle.css\";\nimport { Entity } from \"../../../model/interfaces\";\nimport { OlsEntityApi } from \"../../../api/ols/OlsEntityApi\";\n\n/**\n * A React component to provide Autosuggestion based on SemLookP.\n */\nfunction AutocompleteWidget(props: AutocompleteWidgetProps) {\n const {\n api,\n parameter,\n hasShortSelectedLabel,\n allowCustomTerms,\n selectionChangedEvent,\n preselected,\n placeholder,\n singleSelection,\n singleSuggestionRow,\n ts4nfdiGateway = false,\n showApiSource = true,\n className,\n useLegacy,\n ...rest\n } = props;\n\n const olsApi = new OlsSearchApi(api);\n const olsEntityApi = new OlsEntityApi(api);\n\n const visColors = euiPaletteColorBlind();\n const visColorsBehindText = euiPaletteColorBlindBehindText();\n\n /**\n * The current search value\n */\n const [searchValue, setSearchValue] = useState<string>(\"\");\n\n /**\n * The set of available options.s\n */\n const [options, setOptions] = useState<Array<EuiComboBoxOptionOption<any>>>(\n [],\n );\n\n /**\n * Store current set of select Options. A subset of options.\n */\n const [selectedOptions, setSelectedOptions] = useState<\n Array<EuiComboBoxOptionOption<any>>\n >([]);\n\n const finalClassName = className || \"ts4nfdi-autocomplete-style\";\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const renderOption = (option, searchValue) => {\n const { label, value } = option;\n const dotColorIndex = visColorsBehindText.indexOf(\n value.type === \"class\"\n ? visColorsBehindText[5]\n : value.type === \"individual\"\n ? visColorsBehindText[3]\n : value.type === \"property\"\n ? visColorsBehindText[1]\n : \"\",\n );\n const dotColor = visColors[dotColorIndex];\n\n if (allowCustomTerms && value.iri == \"\") {\n // if we have a custom term, just show the label\n return label;\n }\n\n const prefix =\n value.type === \"ontology\"\n ? \"Prefix: \" + value.ontology_name\n : \"Prefix > Short form: \" +\n value.ontology_name +\n \" > \" +\n value.short_form;\n\n let hoverText = `Type: ${value.type}\\n\\nLabel: ${value.label}\\n\\n${prefix}`;\n if (value.description != undefined) {\n hoverText += `\\n\\nDescription: ${value.description}`;\n }\n if (showApiSource && value.source_url && value.source_url !== \"\") {\n hoverText += \"\\n\\nSource: \" + value.source;\n hoverText += \"\\n\\nSource URL: \" + value.source_url;\n }\n\n const renderOntology = () => {\n return (\n <span className={finalClassName}>\n <EuiHealth color={dotColor}>\n <span>\n <EuiHighlight search={searchValue}>{value.label}</EuiHighlight>\n <br />\n {value.description}\n </span>\n </EuiHealth>\n </span>\n );\n };\n\n const renderEntity = () => {\n return (\n <span title={hoverText} className={finalClassName}>\n <span>\n <EuiHealth color={dotColor}>\n <EuiHighlight search={searchValue}>{value.label}</EuiHighlight>\n </EuiHealth>\n \n <BreadcrumbPresentation\n shortForm={value.short_form}\n ontologyId={value.ontology_name}\n colorFirst={\"primary\"}\n colorSecond={\"success\"}\n className={`${finalClassName}-breadcrumb`}\n />\n <EuiIcon\n type={\"iInCircle\"}\n style={{ marginLeft: \"5px\" }}\n title={hoverText}\n />\n </span>\n {!singleSuggestionRow && value.description && (\n <span\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n display: \"block\",\n }}\n >\n {value.description}\n </span>\n )}\n </span>\n );\n };\n\n return value.type === \"ontology\" ? renderOntology() : renderEntity();\n };\n\n /**\n * For preselect property\n * Creates option from preselected label and iri\n * @param preselectedElement\n */\n function createCustomTermOption(\n preselectedElement: any,\n ): EuiComboBoxOptionOption<any> {\n return {\n label: preselectedElement.label,\n key: preselectedElement.label,\n value: {\n iri: preselectedElement.iri || \"\",\n label: preselectedElement.label,\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n source_url: \"\",\n },\n };\n }\n\n /**\n * For preselected property\n * Creates option from OLS API select response\n * @param selection The select response\n */\n function createSelectOption(selection: any): EuiComboBoxOptionOption<any> {\n return {\n label: hasShortSelectedLabel\n ? selection.getLabel()\n : generateDisplayLabel(selection),\n key: `${selection.getOntologyId()}::${selection.getIri()}::${selection.getType()}`,\n value: {\n iri: selection.getIri(),\n label: selection.getLabel(),\n ontology_name: selection.getOntologyId(),\n type: selection.getType(),\n short_form: selection.getShortForm(),\n description: selection.getDescription(),\n },\n };\n }\n\n /**\n * For preselected property\n * Creates option from OLS4 API entity response\n * @param entity The Entity object response\n */\n function createEntityOption(entity: Entity): EuiComboBoxOptionOption<any> {\n return {\n label: hasShortSelectedLabel\n ? entity.getLabel()\n : generateDisplayLabel(entity),\n key: `${entity.getOntologyId()}::${entity.getIri()}::${entity.getType()}`,\n value: {\n iri: entity.getIri(),\n label: entity.getLabel(),\n ontology_name: entity.getOntologyId(),\n type: entity.getType(),\n short_form: entity.getShortForm(),\n description: entity.getDescription(),\n },\n };\n }\n\n /**\n * For preselected property\n * Request the OLS4 API entity endpoint and create the entity option\n * @param preselectedElement\n * @param preselectedOptions\n */\n async function fetchAndProcessEntityOption(\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ) {\n try {\n const response = await olsEntityApi.getEntityObject(\n preselectedElement.iri,\n undefined,\n undefined,\n parameter,\n useLegacy,\n );\n\n preselectedOptions.push(createEntityOption(response));\n\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n } catch (error) {\n if (preselectedElement.label && allowCustomTerms)\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n console.error(\n \"Error fetching data for option:\",\n preselectedElement,\n error,\n );\n }\n }\n\n /**\n * For preselected property\n * Request the OLS API select endpoint and create select option by either using select response or - if no response - use the preselected label and iri\n * @param preselectedElement\n * @param preselectedOptions\n */\n async function fetchAndProcessSelectOption(\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ) {\n try {\n const response = await olsApi.getSelectData(\n { query: preselectedElement.iri },\n undefined,\n undefined,\n parameter,\n ts4nfdiGateway,\n );\n\n if (!response) return;\n\n const matchFound = processSelectResponse(\n response,\n preselectedElement,\n preselectedOptions,\n );\n\n if (!matchFound && preselectedElement.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n } catch (error) {\n if (preselectedElement.label && allowCustomTerms)\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n if (singleSelection && preselectedOptions.length > 1) {\n preselectedOptions.length = 1;\n }\n console.error(\n \"Error fetching data for option:\",\n preselectedElement,\n error,\n );\n }\n }\n\n /**\n * For preselected property\n * If the preselected element has a select response, create the select option\n * If no select response, return false\n * @param response\n * @param preselectedElement\n * @param preselectedOptions\n */\n function processSelectResponse(\n response: any,\n preselectedElement: any,\n preselectedOptions: EuiComboBoxOptionOption<any>[],\n ): boolean {\n let matchFound = false;\n\n response.properties.forEach((selection: any) => {\n if (preselectedElement.iri === selection.getIri()) {\n matchFound = true;\n preselectedOptions.push(createSelectOption(selection));\n }\n });\n\n return matchFound;\n }\n\n /**\n * on mount: fetches term for preselected\n * sets its label or sets a given label if no iri is provided/the given iri cannot be resolved\n * only if allowCustomTerms is true\n */\n const { isLoading: isLoadingOnMount } = useQuery(\n [\"onMount\", preselected],\n async () => {\n let preselectedOptions: EuiComboBoxOptionOption<any>[] = [];\n\n let uniqueValues = [...new Set(preselected ?? [])].filter(\n (option) => (allowCustomTerms && option.label) || option.iri,\n );\n\n if (uniqueValues.length === 0) return;\n\n if (singleSelection) uniqueValues = [uniqueValues[0]];\n\n for (const preselectedElement of uniqueValues) {\n if (useLegacy) {\n if (preselectedElement?.iri?.startsWith(\"http\")) {\n await fetchAndProcessSelectOption(\n preselectedElement,\n preselectedOptions,\n );\n } else if (preselectedElement?.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n } else {\n if (preselectedElement?.iri?.startsWith(\"http\")) {\n await fetchAndProcessEntityOption(\n preselectedElement,\n preselectedOptions,\n );\n } else if (preselectedElement?.label && allowCustomTerms) {\n preselectedOptions.push(createCustomTermOption(preselectedElement));\n }\n }\n }\n setOptions(preselectedOptions);\n setSelectedOptions(preselectedOptions);\n },\n );\n\n /**\n * fetches new options when searchValue changes\n */\n const { isLoading: isLoadingTerms } = useQuery(\n [\"onSearchChange\", searchValue],\n async () => {\n if (searchValue.length > 0) {\n return olsApi\n .getSelectData(\n { query: searchValue },\n undefined,\n undefined,\n parameter,\n ts4nfdiGateway,\n )\n .then((response) => {\n if (response) {\n setOptions(\n response.properties.map((selection: any) => ({\n // label to display within the combobox either raw value or generated one\n // #renderOption() is used to display during selection.\n label: hasShortSelectedLabel\n ? selection.getLabel()\n : generateDisplayLabel(selection),\n // key to distinguish the options (especially those with same label)\n key: `${selection.getOntologyId()}::${selection.getIri()}::${selection.getType()}`,\n // values to pass to clients\n value: {\n iri: selection.getIri(),\n label: selection.getLabel(),\n ontology_name: selection.getOntologyId(),\n type: selection.getType(),\n short_form: selection.getShortForm(),\n description: selection.getDescription(),\n source: selection.getApiSourceName(),\n source_url: selection.getApiSourceEndpoint(),\n },\n })),\n );\n }\n });\n }\n },\n );\n\n /**\n * Once the set of selected options changes, pass the event by invoking the passed function.\n */\n useEffect(() => {\n let isMounted = true;\n if (isMounted) {\n selectionChangedEvent(\n selectedOptions.map((x) => {\n // return the value object with the raw values from OLS to a client\n if (allowCustomTerms && x.value.iri == \"\") {\n return {\n iri: \"\",\n label: x.label,\n ontology_name: \"\",\n type: \"\",\n short_form: x.value.short_form,\n description: x.value.description,\n source: x.value.source,\n };\n } else if (x.value.iri == \"\") {\n return {\n iri: \"\",\n label: \"\",\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n };\n } else {\n return {\n iri: x.value.iri,\n label: x.value.label,\n ontology_name: x.value.ontology_name,\n type: x.value.type,\n short_form: x.value.short_form,\n description: x.value.description,\n source: x.value.source,\n };\n }\n }),\n );\n }\n return () => {\n isMounted = false;\n };\n }, [selectedOptions]);\n\n function generateDisplayLabel(item: any): string {\n return (\n item?.getLabel() ??\n \"-\" + \" (\" + item?.getOntologyId()?.toUpperCase() ??\n \"-\" + \" \" + item?.getShortForm() ??\n \"-\" + \")\"\n );\n }\n\n function onChangeHandler(options: Array<any>): void {\n setSelectedOptions(options);\n }\n\n function onCreateOptionHandler(searchValue: string) {\n const newOption = {\n label: searchValue,\n key: searchValue,\n value: {\n iri: \"\",\n label: \"\",\n ontology_name: \"\",\n type: \"\",\n short_form: \"\",\n description: \"\",\n source: \"\",\n },\n };\n\n setOptions([...options, newOption]);\n setSelectedOptions(\n singleSelection ? [newOption] : [...selectedOptions, newOption],\n );\n }\n\n return (\n <div className={finalClassName}>\n <EuiComboBox\n isClearable\n aria-label=\"searchBar\"\n fullWidth={true}\n {...rest} // items above can be overridden by a client\n async={true}\n isLoading={isLoadingTerms || isLoadingOnMount}\n singleSelection={singleSelection ? { asPlainText: true } : false}\n placeholder={placeholder ? placeholder : \"Search for a Concept\"}\n options={options}\n selectedOptions={selectedOptions}\n onSearchChange={setSearchValue}\n onChange={onChangeHandler}\n renderOption={renderOption}\n onCreateOption={allowCustomTerms ? onCreateOptionHandler : undefined}\n rowHeight={singleSuggestionRow ? 30 : 50}\n />\n </div>\n );\n}\n\nfunction createAutocomplete(\n props: AutocompleteWidgetProps,\n container: any,\n callback?: () => void,\n) {\n // @ts-ignore\n ReactDOM.render(WrappedAutocompleteWidget(props), container, callback);\n}\n\nfunction WrappedAutocompleteWidget(props: AutocompleteWidgetProps) {\n const queryClient = new QueryClient();\n return (\n <EuiProvider colorMode=\"light\" globalStyles={false}>\n <QueryClientProvider client={queryClient}>\n <AutocompleteWidget\n api={props.api}\n parameter={props.parameter}\n selectionChangedEvent={props.selectionChangedEvent}\n preselected={props.preselected}\n singleSelection={props.singleSelection as boolean}\n placeholder={props.placeholder}\n hasShortSelectedLabel={props.hasShortSelectedLabel}\n allowCustomTerms={props.allowCustomTerms}\n ts4nfdiGateway={props.ts4nfdiGateway}\n singleSuggestionRow={props.singleSuggestionRow}\n showApiSource={props.showApiSource}\n className={props.className}\n useLegacy={props.useLegacy}\n />\n </QueryClientProvider>\n </EuiProvider>\n );\n}\n\nexport { AutocompleteWidget, createAutocomplete };\n"],"names":[],"mappings":";;;;;;;;;AAwBA;;AAEG;AACH;AACE;AAiBA;AACA;AAEA;AACA;AAEA;;AAEG;;AAGH;;AAEG;;AAKH;;AAEG;;AAKH;;;AAIA;AACE;;AAGI;AACA;AACE;AACA;AACE;;AAGR;;;AAIE;;AAGF;AAEI;AACA;AACE;;;AAIN;AACA;AACE;;AAEF;AACE;AACA;;;AAIA;AAEI;AACE;;;AAGG;AAKX;;;AAKM;AACE;;;;AAWA;;AASI;AACA;AACA;AACA;AACD;AAOX;AAEA;AACF;AAEA;;;;AAIG;;;;;AAOC;AACE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;AAIG;;;AAGC;AACE;AACA;AACF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;AAIG;;;AAGC;AACE;AACA;AACF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIL;;;;;AAKG;AACH;AAIE;AACE;;;AAWE;;;;AAGF;;;AAGE;;;;;AAUN;;;;;AAKG;AACH;AAIE;;AASE;;;;;;;AAaE;;;;AAGF;;;AAGE;;;;;AAUN;;;;;;;AAOG;AACH;;;;;;;AAYE;AAEA;;AAGF;;;;AAIG;AACH;;AAKI;AAIA;;AAEA;AAAqB;AAErB;;;AAGM;;AAIK;;;;;;AAKL;;AAIK;;;;;;;AAOb;AAGF;;AAEG;AACH;AAGI;AACE;AACG;AAOA;;AAEG;;;AAII;AACE;AACA;;AAEF;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIT;;AAEN;AAGF;;AAEG;;;;;;;;AASS;;AAEA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAMV;;AAEA;AACF;;AAGE;;AAGE;;;;;;;AAUF;AACE;AACA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACD;;;AAIH;;AAKF;;AAqBF;AAEA;;AAME;AACF;AAEA;AACE;;AAGI;AACE;AAkBR;;"}
|
package/dist/server/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.euiFilterSelectItem:hover{text-decoration:none!important}button{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.surroundCircle{background:#8228cc;border-radius:50%;color:#fff;display:inline-block;font:15px Arial,sans-serif;font-weight:700;height:17px;text-align:center;width:17px}.ontology-badge{background-color:#6dccb1;border:2px solid #6dccb1;border-radius:6px;color:#000;font-size:13px;padding:3px 3px 0}.ontology-badge:hover{background-color:#fff}.expand-onto-list{color:#00827c;font-style:italic}.expand-onto-list:hover{text-decoration-line:underline}.no-decoration{color:#000;text-decoration:none}.highlight{background-color:#add8e6;border-radius:6px;padding:4px 3px 1px}.clickable{color:#0645ad}.clickable:hover{text-decoration:underline}.ts4nfdi-autocomplete-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-style button{background:none;border:none}.euiComboBoxOptionsList *{background-color:inherit;border:none}.euiComboBoxOptionsList .euiFilterSelectItem{background:none}.euiComboBoxOptionsList__empty{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-breadcrumb button{background:none;border:none}.ts4nfdi-autocomplete-breadcrumb .euiBadge *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-breadcrumb .breadcrumb{border:2px solid transparent;border-radius:6px;padding:3px 3px 0}.ts4nfdi-autocomplete-breadcrumb .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-breadcrumb-style button{background:none;border:none}.ts4nfdi-breadcrumb-style .euiBadge *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-breadcrumb-style .breadcrumb{border:2px solid transparent;border-radius:6px;padding:3px 3px 0}.ts4nfdi-breadcrumb-style .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-hierarchy-style,.ts4nfdi-hierarchy-style button,.ts4nfdi-iri-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-hierarchy-style button{background:none;border:none;font-size:inherit;padding:0}.ts4nfdi-hierarchy-style ul{margin-block-start:0;padding-inline-start:0}.ts4nfdi-hierarchy-style div{margin:0!important}.ts4nfdi-
|
|
1
|
+
.euiFilterSelectItem:hover{text-decoration:none!important}button{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.surroundCircle{background:#8228cc;border-radius:50%;color:#fff;display:inline-block;font:15px Arial,sans-serif;font-weight:700;height:17px;text-align:center;width:17px}.ontology-badge{background-color:#6dccb1;border:2px solid #6dccb1;border-radius:6px;color:#000;font-size:13px;padding:3px 3px 0}.ontology-badge:hover{background-color:#fff}.expand-onto-list{color:#00827c;font-style:italic}.expand-onto-list:hover{text-decoration-line:underline}.no-decoration{color:#000;text-decoration:none}.highlight{background-color:#add8e6;border-radius:6px;padding:4px 3px 1px}.clickable{color:#0645ad}.clickable:hover{text-decoration:underline}.ts4nfdi-autocomplete-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-style button{background:none;border:none}.euiComboBoxOptionsList *{background-color:inherit;border:none}.euiComboBoxOptionsList .euiFilterSelectItem{background:none}.euiComboBoxOptionsList__empty{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-breadcrumb button{background:none;border:none}.ts4nfdi-autocomplete-breadcrumb .euiBadge *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-autocomplete-breadcrumb .breadcrumb{border:2px solid transparent;border-radius:6px;padding:3px 3px 0}.ts4nfdi-autocomplete-breadcrumb .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-breadcrumb-style button{background:none;border:none}.ts4nfdi-breadcrumb-style .euiBadge *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-breadcrumb-style .breadcrumb{border:2px solid transparent;border-radius:6px;padding:3px 3px 0}.ts4nfdi-breadcrumb-style .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-hierarchy-style,.ts4nfdi-hierarchy-style button,.ts4nfdi-iri-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-hierarchy-style button{background:none;border:none;font-size:inherit;padding:0}.ts4nfdi-hierarchy-style ul{margin-block-start:0;padding-inline-start:0}.ts4nfdi-hierarchy-style div{margin:0!important}.ts4nfdi-metadata-style button{background:none;border:none;font-size:inherit;padding:0}.ts4nfdi-metadata-style button,.ts4nfdi-metadata-style-title{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-metadata-style-title .euiText{font-weight:700}.ts4nfdi-metadata-style-description *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-metadata-style-breadcrumb button{background:none;border:none}.ts4nfdi-metadata-style-breadcrumb .breadcrumb{border:2px solid transparent;border-radius:6px;font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif;padding:3px 3px 0}.ts4nfdi-metadata-style-breadcrumb .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-metadata-style-altNameTab *,.ts4nfdi-metadata-style-crossRef *,.ts4nfdi-metadata-style-hierarchy,.ts4nfdi-metadata-style-hierarchy button,.ts4nfdi-metadata-style-iri *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-metadata-style-hierarchy button{background:none;border:none;font-size:inherit;padding:0}.ts4nfdi-metadata-style-hierarchy ul{margin-block-start:0;padding-inline-start:0}.ts4nfdi-metadata-style-hierarchy div{margin:0!important}.ts4nfdi-metadata-style-entity-defined-by *,.ts4nfdi-metadata-style-entity-defined-by button{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-metadata-style-entity-defined-by button{background:none;border:none}.ts4nfdi-metadata-style-entity-onto-list *,.ts4nfdi-metadata-style-entity-onto-list button{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-metadata-style-entity-onto-list button{background:none;border:none}.euiText p{margin:0 0 10px}.euiCard{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-ontologyy-info-style .euiText p{margin:0 0 10px}.ts4nfdi-ontologyy-info-style .euiCard,.ts4nfdi-resources-style *,.ts4nfdi-searchResult-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-searchResult-style button{background:none;border:none}.ts4nfdi-searchResult-style .euiCard{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif;padding-top:0}.ts4nfdi-searchResult-style .euiCard__content div{align-items:baseline;font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-searchResult-style ul{list-style:none}.ts4nfdi-searchResult-style-metadata-compact-description *,.ts4nfdi-searchResult-style-metadata-compact-iri *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-searchResult-style-metadata-compact-breadcrumb button{background:none;border:none}.ts4nfdi-searchResult-style-metadata-compact-breadcrumb .euiBadge *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-searchResult-style-metadata-compact-breadcrumb .breadcrumb{border:2px solid transparent;border-radius:6px;padding:3px 3px 0}.ts4nfdi-searchResult-style-metadata-compact-breadcrumb .clickable-breadcrumb:hover{border:2px solid #000}.ts4nfdi-description-style *,.ts4nfdi-graph-style,.ts4nfdi-graph-style button{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-graph-style button{border:none}.ts4nfdi-tab-style button{background:none;border:none}.ts4nfdi-tab-style-altNameTab *,.ts4nfdi-tab-style-crossRef *,.ts4nfdi-tab-style-hierarchy,.ts4nfdi-tab-style-hierarchy button{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-tab-style-hierarchy button{background:none;border:none;font-size:inherit;padding:0}.ts4nfdi-tab-style-hierarchy ul{margin-block-start:0;padding-inline-start:0}.ts4nfdi-tab-style-hierarchy div{margin:0!important}.ts4nfdi-altNameTab-style *,.ts4nfdi-crossRef-style *,.ts4nfdi-entity-onto-list-style *,.ts4nfdi-entity-onto-list-style button,.ts4nfdi-title-style *{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-entity-onto-list-style button{background:none;border:none}.ts4nfdi-entity-defined-by-style *,.ts4nfdi-entity-defined-by-style button{font-family:Inter,BlinkMacSystemFont,Helvetica,Arial,sans-serif}.ts4nfdi-entity-defined-by-style button{background:none;border:none}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts4nfdi/terminology-service-suite",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "This project includes a widget component library derived from the semantic lookup service SemLookP. The Terminology Service is a repository for biomedical resources that aims to provide a single point of access to the latest ontology and terminology versions. User interface (UI) functionalities were extracted and implemented as separate widgets to allow integration into other 3rd party services, thus simplifying the development of user interfaces and the visualization of semantic information. The widgets are built with React and TypeScript and can be used in React applications. SemLookP and the widgets are based on the Ontology Lookup Service (OLS), software developed by EBI.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|