@ts4nfdi/terminology-service-suite 7.6.0 → 7.7.0
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.
- package/dist/app/globals.d.ts +1 -0
- package/dist/app/types.d.ts +37 -2
- package/dist/components/widgets/DataContentWidget/DataContentWidget.stories.d.ts +1 -1
- package/dist/components/widgets/DataContentWidget/DataContentWidgetStories.d.ts +3 -2
- package/dist/components/widgets/DataContentWidget/index.d.ts +1 -0
- package/dist/components/widgets/DataContentWidget/useCollectionStatistics.d.ts +15 -0
- package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +1 -0
- package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetStories.d.ts +11 -0
- package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +1 -0
- package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts +11 -0
- package/dist/esm/index.es.js +1997 -1926
- package/dist/esm/index.es.js.map +1 -1
- package/dist/stories/storyArgs.d.ts +1 -0
- package/package.json +1 -1
package/dist/app/globals.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const TIB_API_ENDPOINT = "https://api.terminology.tib.eu/api/";
|
|
2
2
|
export declare const GATEWAY_API_OLS_ENDPOINT = "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
3
|
+
export declare const GATEWAY_API_MOD_ENDPOINT = "https://terminology.services.base4nfdi.de/api-gateway/";
|
|
3
4
|
export declare const ZBMED_OLS4_API = "https://semanticlookup.zbmed.de/ols/api/";
|
|
4
5
|
export declare const ZBMED_OLS3_API = "https://ols3-semanticlookup.zbmed.de/ols/api/";
|
|
5
6
|
export declare const ZBMED_OLS4_GATEWAY_API = "https://semanticlookup.zbmed.de/api/";
|
package/dist/app/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { EuiComboBoxProps } from '@elastic/eui/src/components/combo_box/combo_bo
|
|
|
4
4
|
import { EuiLinkColor } from '@elastic/eui/src/components/link/link';
|
|
5
5
|
import { EuiTextProps } from '@elastic/eui/src/components/text/text';
|
|
6
6
|
import { EntityValue } from '../components/widgets/AutocompleteWidget/AutocompleteWidget';
|
|
7
|
-
import { Entity,
|
|
7
|
+
import { Entity, Individual, Ontologies, Ontology, Thing } from '../model/interfaces';
|
|
8
8
|
import { BuildHierarchyProps, HierarchyIriProp } from '../model/interfaces/HierarchyBuilder';
|
|
9
9
|
import { EntityTypeName, ThingTypeName } from '../model/ModelTypeCheck';
|
|
10
10
|
import { default as Reified } from '../model/Reified';
|
|
@@ -189,7 +189,18 @@ export type AutocompleteWidgetProps = Partial<EuiComboBoxProps<EntityValue>> & P
|
|
|
189
189
|
*/
|
|
190
190
|
showApiRequestButton?: boolean;
|
|
191
191
|
};
|
|
192
|
-
export type DataContentWidgetProps =
|
|
192
|
+
export type DataContentWidgetProps = {
|
|
193
|
+
/**
|
|
194
|
+
* The API instance for the API call.
|
|
195
|
+
*/
|
|
196
|
+
api?: string;
|
|
197
|
+
} & ParameterObj & {
|
|
198
|
+
/**
|
|
199
|
+
* The id of a TS4NFDI API Gateway collection. If set, the statistics of
|
|
200
|
+
* that collection are shown instead of the OLS ontologies data.
|
|
201
|
+
*/
|
|
202
|
+
collectionId?: string;
|
|
203
|
+
};
|
|
193
204
|
export type DataContentPresentationProps = EuiTextProps & {
|
|
194
205
|
ontologiesData?: Ontologies;
|
|
195
206
|
isLoading?: boolean;
|
|
@@ -940,4 +951,28 @@ export type UseEntityProviderResult = {
|
|
|
940
951
|
*/
|
|
941
952
|
error?: Error;
|
|
942
953
|
};
|
|
954
|
+
export type UseCollectionStatisticsProps = {
|
|
955
|
+
/**
|
|
956
|
+
* The API instance for the API call. Defaults to the TS4NFDI API Gateway.
|
|
957
|
+
*/
|
|
958
|
+
api?: string;
|
|
959
|
+
/**
|
|
960
|
+
* The id of the collection whose statistics are shown.
|
|
961
|
+
*/
|
|
962
|
+
collectionId?: string;
|
|
963
|
+
/**
|
|
964
|
+
* If false, no request is made and the result stays empty. Default is true.
|
|
965
|
+
*/
|
|
966
|
+
enabled?: boolean;
|
|
967
|
+
};
|
|
968
|
+
export type UseCollectionStatisticsResult = {
|
|
969
|
+
/**
|
|
970
|
+
* The latest statistics of the collection, in the shape expected by the
|
|
971
|
+
* DataContentPresentation.
|
|
972
|
+
*/
|
|
973
|
+
ontologiesData?: Ontologies;
|
|
974
|
+
isLoading: boolean;
|
|
975
|
+
isError: boolean;
|
|
976
|
+
dataUpdatedAt?: number;
|
|
977
|
+
};
|
|
943
978
|
export {};
|
|
@@ -23,5 +23,5 @@ declare const meta: {
|
|
|
23
23
|
export default meta;
|
|
24
24
|
type Story = StoryObj<typeof meta>;
|
|
25
25
|
export declare const NFDI4HealthDataContentWidget: Story;
|
|
26
|
-
export declare const SafetyDataContentWidget: Story;
|
|
27
26
|
export declare const ErrorDataContentWidget: Story;
|
|
27
|
+
export declare const DataContentFAIRagroCollection: Story;
|
|
@@ -9,11 +9,12 @@ export declare const NFDI4HealthDataContentWidgetArgs: {
|
|
|
9
9
|
api: string;
|
|
10
10
|
parameter: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const ErrorDataContentWidgetArgs: {
|
|
13
13
|
api: string;
|
|
14
14
|
parameter: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const DataContentFAIRagroCollectionArgs: {
|
|
17
|
+
collectionId: string;
|
|
17
18
|
api: string;
|
|
18
19
|
parameter: string;
|
|
19
20
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UseCollectionStatisticsResult } from '../../../app';
|
|
2
|
+
/**
|
|
3
|
+
* React hook returning the statistics of a collection of the TS4NFDI API
|
|
4
|
+
* Gateway.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const { ontologiesData, isLoading } = useCollectionStatistics({
|
|
8
|
+
* collectionId: "dc45621d-7e40-47ce-9616-4133f0b54edf",
|
|
9
|
+
* });
|
|
10
|
+
*/
|
|
11
|
+
export declare function useCollectionStatistics(props: {
|
|
12
|
+
statisticsApi: any;
|
|
13
|
+
collectionId: string | undefined;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
}): UseCollectionStatisticsResult;
|
|
@@ -52,6 +52,17 @@ export declare const DefiningOntologyUnavailableArgs: {
|
|
|
52
52
|
readonly entityType: "term";
|
|
53
53
|
readonly parameter: "";
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Points at a host that does not answer, so the tab shows the error message
|
|
57
|
+
* instead of its empty state.
|
|
58
|
+
*/
|
|
59
|
+
export declare const RequestFailedArgs: {
|
|
60
|
+
readonly api: "https://example.com/nonexistent/";
|
|
61
|
+
readonly iri: "http://purl.obolibrary.org/obo/NCIT_C2985";
|
|
62
|
+
readonly entityType: "term";
|
|
63
|
+
readonly ontologyId: "ncit";
|
|
64
|
+
readonly parameter: "";
|
|
65
|
+
};
|
|
55
66
|
export declare const commonAlternativeNameTabWidgetPlay: ({ canvasElement, }: {
|
|
56
67
|
canvasElement: HTMLElement;
|
|
57
68
|
}) => Promise<void>;
|
package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts
CHANGED
|
@@ -52,6 +52,17 @@ export declare const DefiningOntologyUnavailableArgs: {
|
|
|
52
52
|
readonly entityType: "term";
|
|
53
53
|
readonly parameter: "";
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Points at a host that does not answer, so the tab shows the error message
|
|
57
|
+
* instead of its empty state.
|
|
58
|
+
*/
|
|
59
|
+
export declare const RequestFailedArgs: {
|
|
60
|
+
readonly api: "https://example.com/nonexistent/";
|
|
61
|
+
readonly iri: "http://purl.obolibrary.org/obo/RXNO_0000138";
|
|
62
|
+
readonly entityType: "term";
|
|
63
|
+
readonly ontologyId: "rxno";
|
|
64
|
+
readonly parameter: "";
|
|
65
|
+
};
|
|
55
66
|
export declare const commonCrossRefWidgetPlay: ({ canvasElement, }: {
|
|
56
67
|
canvasElement: HTMLElement;
|
|
57
68
|
}) => Promise<void>;
|