@ts4nfdi/terminology-service-suite 7.7.2 → 7.9.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/types.d.ts +1 -1
- package/dist/app/widgetDescriptions.d.ts +2 -1
- package/dist/components/widgets/EntityProviderWidget/EntityProviderHookStories.d.ts +101 -0
- package/dist/components/widgets/EntityProviderWidget/EntityProviderPresentation.d.ts +16 -0
- package/dist/components/widgets/EntityProviderWidget/EntityProviderPresentationStories.d.ts +142 -0
- package/dist/components/widgets/EntityProviderWidget/EntityProviderWidget.d.ts +17 -0
- package/dist/components/widgets/EntityProviderWidget/EntityProviderWidgetStories.d.ts +49 -23
- package/dist/esm/index.es.js +1112 -1091
- package/dist/esm/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/widgets/AutocompleteWidget/AutocompleteWidget.stories.d.ts +0 -76
- package/dist/components/widgets/DataContentWidget/DataContentWidget.stories.d.ts +0 -28
- package/dist/components/widgets/EntityInfoWidget/EntityInfoWidget.stories.d.ts +0 -69
- package/dist/components/widgets/EntityListWidget/EntityListWidget.stories.d.ts +0 -6
- package/dist/components/widgets/EntityProviderWidget/EntityProviderWidget.stories.d.ts +0 -83
- package/dist/components/widgets/EntityRelationsWidget/EntityRelationsWidget.stories.d.ts +0 -70
- package/dist/components/widgets/GraphViewWidget/GraphViewWidget.stories.d.ts +0 -37
- package/dist/components/widgets/JsonApiWidget/JsonApiWidget.stories.d.ts +0 -32
- package/dist/components/widgets/MappingDetailWidget/MappingDetailWidget.stories.d.ts +0 -5
- package/dist/components/widgets/MappingListWidget/MappingListWidget.stories.d.ts +0 -10
- package/dist/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.stories.d.ts +0 -65
- package/dist/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.stories.d.ts +0 -45
- package/dist/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.stories.d.ts +0 -59
- package/dist/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.stories.d.ts +0 -60
- package/dist/components/widgets/MetadataWidget/IriWidget/IriWidget.stories.d.ts +0 -31
- package/dist/components/widgets/MetadataWidget/MathFormulaWidget/MathFormulaWidget.stories.d.ts +0 -26
- package/dist/components/widgets/MetadataWidget/MetadataWidget.stories.d.ts +0 -15
- package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +0 -56
- package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +0 -55
- package/dist/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.stories.d.ts +0 -195
- package/dist/components/widgets/MetadataWidget/TabWidget/TabWidget.stories.d.ts +0 -69
- package/dist/components/widgets/MetadataWidget/TitleWidget/TitleWidget.stories.d.ts +0 -52
- package/dist/components/widgets/OntologyInfoWidget/OntologyInfoWidget.stories.d.ts +0 -40
- package/dist/components/widgets/ResourcesWidget/ResourcesWidget.stories.d.ts +0 -70
- package/dist/components/widgets/SearchBarWidget/SearchBarWidget.stories.d.ts +0 -37
- package/dist/components/widgets/SearchResultsListWidget/SearchResultsListWidget.stories.d.ts +0 -39
- package/dist/components/widgets/TermDepictionWidget/TermDepictionWidget.stories.d.ts +0 -29
package/dist/app/types.d.ts
CHANGED
|
@@ -911,7 +911,7 @@ export type EntityProvider = {
|
|
|
911
911
|
*/
|
|
912
912
|
raw: Record<string, any>;
|
|
913
913
|
};
|
|
914
|
-
export type EntityProviderWidgetProps =
|
|
914
|
+
export type EntityProviderWidgetProps = OptionalIriObj & OptionalOntologyIdObj & {
|
|
915
915
|
/**
|
|
916
916
|
* The API instance for the API call. Defaults to the TS4NFDI API Gateway
|
|
917
917
|
* OLS endpoint, as the provider information is specific to the gateway.
|
|
@@ -25,4 +25,5 @@ export declare const TermDepictionDescription: string;
|
|
|
25
25
|
export declare const EntityListDescription: string;
|
|
26
26
|
export declare const MappingListDetailDescription: string;
|
|
27
27
|
export declare const MappingDetailDescription: string;
|
|
28
|
-
export declare const
|
|
28
|
+
export declare const EntityProviderHookDescription: string;
|
|
29
|
+
export declare const EntityProviderWidgetDescription: string;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export declare const EntityProviderHookStoryArgTypes: {
|
|
2
|
+
api: {
|
|
3
|
+
api: string;
|
|
4
|
+
required: boolean;
|
|
5
|
+
description: string;
|
|
6
|
+
table: {
|
|
7
|
+
defaultValue: {
|
|
8
|
+
summary: string;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
summary: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
enabled: {
|
|
16
|
+
required: boolean;
|
|
17
|
+
description: string;
|
|
18
|
+
control: {
|
|
19
|
+
readonly type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
table: {
|
|
22
|
+
defaultValue: {
|
|
23
|
+
summary: string;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
summary: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
parameter: {
|
|
31
|
+
required: boolean;
|
|
32
|
+
description: string;
|
|
33
|
+
table: {
|
|
34
|
+
type: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
ontologyId: {
|
|
40
|
+
required: boolean;
|
|
41
|
+
description: string;
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
type: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const EntityProviderHookStoryArgs: {
|
|
53
|
+
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
54
|
+
readonly iri: "";
|
|
55
|
+
readonly ontologyId: "";
|
|
56
|
+
readonly enabled: true;
|
|
57
|
+
readonly parameter: "";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* An entity that resolves in voc4cat via the TS4NFDI API Gateway. At the time of writing
|
|
61
|
+
* the gateway serves it through Skosmos, but which provider answers is a
|
|
62
|
+
* property of the API Gateway configuration and may change - the story renders
|
|
63
|
+
* whatever the API reports rather than asserting a specific provider.
|
|
64
|
+
*/
|
|
65
|
+
export declare const entityProviderArgs: {
|
|
66
|
+
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
67
|
+
readonly ontologyId: "agrovoc";
|
|
68
|
+
readonly iri: "http://aims.fao.org/aos/agrovoc/c_12332";
|
|
69
|
+
readonly parameter: "collectionId=ff5491d1-d0a9-481e-ac90-0fad065fa097";
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* If no IRI is provided, the ontology provider information is displayed
|
|
73
|
+
*/
|
|
74
|
+
export declare const ontologyProviderArgs: {
|
|
75
|
+
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
76
|
+
readonly ontologyId: "agrovoc";
|
|
77
|
+
readonly parameter: "collectionId=ff5491d1-d0a9-481e-ac90-0fad065fa097";
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* An IRI that does not exist in the requested ontology. The API answers with an
|
|
81
|
+
* empty `elements` array, which is not an error: `provider` stays undefined
|
|
82
|
+
* while `isSuccess` becomes true.
|
|
83
|
+
*/
|
|
84
|
+
export declare const notFoundArgs: {
|
|
85
|
+
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
86
|
+
readonly ontologyId: "voc4cat";
|
|
87
|
+
readonly iri: "http://purl.obolibrary.org/obo/NCIT_C2985";
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Nothing is fetched while `enabled` is false, so the hook stays idle. Lets an
|
|
91
|
+
* application mount the hook before an IRI has been selected.
|
|
92
|
+
*/
|
|
93
|
+
export declare const disabledArgs: {
|
|
94
|
+
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
95
|
+
readonly ontologyId: "voc4cat";
|
|
96
|
+
readonly iri: "https://w3id.org/nfdi4cat/voc4cat_0000151";
|
|
97
|
+
readonly enabled: false;
|
|
98
|
+
};
|
|
99
|
+
export declare const commonEntityProviderWidgetPlay: ({ canvasElement, }: {
|
|
100
|
+
canvasElement: HTMLElement;
|
|
101
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityProvider } from '../../../app/types';
|
|
2
|
+
export interface EntityProviderPresentationProps {
|
|
3
|
+
/** All providers found for the entity (one per ontology it occurs in). */
|
|
4
|
+
providers: EntityProvider[];
|
|
5
|
+
/** The preferred provider (defining ontology), highlighted in the list. */
|
|
6
|
+
provider?: EntityProvider;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
error?: Error;
|
|
10
|
+
/** Shows the collapsible raw `provider` block per entry. Default: true. */
|
|
11
|
+
showRaw?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function EntityProviderPresentation(props: EntityProviderPresentationProps): React.JSX.Element;
|
|
15
|
+
declare function WrappedEntityProviderPresentation(props: EntityProviderPresentationProps): React.JSX.Element;
|
|
16
|
+
export { EntityProviderPresentation, WrappedEntityProviderPresentation };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { EntityProvider } from '../../../app/types';
|
|
2
|
+
export declare const EntityProviderPresentationStoryArgTypes: {
|
|
3
|
+
providers: {
|
|
4
|
+
required: boolean;
|
|
5
|
+
description: string;
|
|
6
|
+
table: {
|
|
7
|
+
type: {
|
|
8
|
+
summary: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
provider: {
|
|
13
|
+
required: boolean;
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
type: {
|
|
17
|
+
summary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
isLoading: {
|
|
22
|
+
required: boolean;
|
|
23
|
+
description: string;
|
|
24
|
+
control: {
|
|
25
|
+
readonly type: "boolean";
|
|
26
|
+
};
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: {
|
|
29
|
+
summary: string;
|
|
30
|
+
};
|
|
31
|
+
type: {
|
|
32
|
+
summary: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
isError: {
|
|
37
|
+
required: boolean;
|
|
38
|
+
description: string;
|
|
39
|
+
control: {
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
};
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
type: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
error: {
|
|
52
|
+
required: boolean;
|
|
53
|
+
description: string;
|
|
54
|
+
table: {
|
|
55
|
+
type: {
|
|
56
|
+
summary: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
showRaw: {
|
|
61
|
+
required: boolean;
|
|
62
|
+
description: string;
|
|
63
|
+
control: {
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
};
|
|
66
|
+
table: {
|
|
67
|
+
defaultValue: {
|
|
68
|
+
summary: string;
|
|
69
|
+
};
|
|
70
|
+
type: {
|
|
71
|
+
summary: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
className: {
|
|
76
|
+
required: boolean;
|
|
77
|
+
description: string;
|
|
78
|
+
table: {
|
|
79
|
+
type: {
|
|
80
|
+
summary: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const EntityProviderPresentationStoryArgs: {
|
|
86
|
+
providers: EntityProvider[];
|
|
87
|
+
provider: undefined;
|
|
88
|
+
isLoading: boolean;
|
|
89
|
+
isError: boolean;
|
|
90
|
+
error: undefined;
|
|
91
|
+
showRaw: boolean;
|
|
92
|
+
};
|
|
93
|
+
export declare const singleProviderArgs: {
|
|
94
|
+
providers: EntityProvider[];
|
|
95
|
+
provider: EntityProvider;
|
|
96
|
+
};
|
|
97
|
+
export declare const multipleProvidersArgs: {
|
|
98
|
+
providers: EntityProvider[];
|
|
99
|
+
provider: EntityProvider;
|
|
100
|
+
};
|
|
101
|
+
export declare const withoutRawArgs: {
|
|
102
|
+
providers: EntityProvider[];
|
|
103
|
+
provider: EntityProvider;
|
|
104
|
+
showRaw: boolean;
|
|
105
|
+
};
|
|
106
|
+
export declare const missingFieldsArgs: {
|
|
107
|
+
providers: EntityProvider[];
|
|
108
|
+
provider: EntityProvider;
|
|
109
|
+
};
|
|
110
|
+
export declare const loadingArgs: {
|
|
111
|
+
providers: never[];
|
|
112
|
+
isLoading: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare const emptyArgs: {
|
|
115
|
+
providers: never[];
|
|
116
|
+
};
|
|
117
|
+
export declare const errorArgs: {
|
|
118
|
+
providers: never[];
|
|
119
|
+
isError: boolean;
|
|
120
|
+
error: Error;
|
|
121
|
+
};
|
|
122
|
+
export declare const singleProviderPlay: ({ canvasElement, }: {
|
|
123
|
+
canvasElement: HTMLElement;
|
|
124
|
+
}) => Promise<void>;
|
|
125
|
+
export declare const multipleProvidersPlay: ({ canvasElement, }: {
|
|
126
|
+
canvasElement: HTMLElement;
|
|
127
|
+
}) => Promise<void>;
|
|
128
|
+
export declare const withoutRawPlay: ({ canvasElement, }: {
|
|
129
|
+
canvasElement: HTMLElement;
|
|
130
|
+
}) => Promise<void>;
|
|
131
|
+
export declare const missingFieldsPlay: ({ canvasElement, }: {
|
|
132
|
+
canvasElement: HTMLElement;
|
|
133
|
+
}) => Promise<void>;
|
|
134
|
+
export declare const loadingPlay: ({ canvasElement, }: {
|
|
135
|
+
canvasElement: HTMLElement;
|
|
136
|
+
}) => Promise<void>;
|
|
137
|
+
export declare const emptyPlay: ({ canvasElement, }: {
|
|
138
|
+
canvasElement: HTMLElement;
|
|
139
|
+
}) => Promise<void>;
|
|
140
|
+
export declare const errorPlay: ({ canvasElement, }: {
|
|
141
|
+
canvasElement: HTMLElement;
|
|
142
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EntityProviderWidgetProps } from '../../../app/types';
|
|
2
|
+
export type EntityProviderWidgetFullProps = EntityProviderWidgetProps & {
|
|
3
|
+
/** Shows the collapsible raw `provider` block per entry. Default: true. */
|
|
4
|
+
showRaw?: boolean;
|
|
5
|
+
/** Custom CSS class replacing the default wrapper class. */
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Fetches the provider information of an entity via {@link useEntityProvider}
|
|
10
|
+
* and displays it with {@link EntityProviderPresentation}.
|
|
11
|
+
*
|
|
12
|
+
* While the widget is disabled (or no IRI is given) nothing is rendered, since
|
|
13
|
+
* "not requested yet" is different from "requested, but nothing found".
|
|
14
|
+
*/
|
|
15
|
+
declare function EntityProviderWidget(props: EntityProviderWidgetFullProps): React.JSX.Element;
|
|
16
|
+
declare function WrappedEntityProviderWidget(props: EntityProviderWidgetFullProps): React.JSX.Element;
|
|
17
|
+
export { EntityProviderWidget, WrappedEntityProviderWidget };
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
export declare const EntityProviderWidgetStoryArgTypes: {
|
|
2
|
+
showRaw: {
|
|
3
|
+
required: boolean;
|
|
4
|
+
description: string;
|
|
5
|
+
control: {
|
|
6
|
+
readonly type: "boolean";
|
|
7
|
+
};
|
|
8
|
+
table: {
|
|
9
|
+
defaultValue: {
|
|
10
|
+
summary: string;
|
|
11
|
+
};
|
|
12
|
+
type: {
|
|
13
|
+
summary: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
className: {
|
|
18
|
+
required: boolean;
|
|
19
|
+
description: string;
|
|
20
|
+
table: {
|
|
21
|
+
type: {
|
|
22
|
+
summary: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
2
26
|
api: {
|
|
3
27
|
api: string;
|
|
4
28
|
required: boolean;
|
|
@@ -50,44 +74,46 @@ export declare const EntityProviderWidgetStoryArgTypes: {
|
|
|
50
74
|
};
|
|
51
75
|
};
|
|
52
76
|
export declare const EntityProviderWidgetStoryArgs: {
|
|
77
|
+
showRaw: boolean;
|
|
78
|
+
api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
79
|
+
iri: "";
|
|
80
|
+
ontologyId: "";
|
|
81
|
+
enabled: true;
|
|
82
|
+
parameter: "";
|
|
83
|
+
};
|
|
84
|
+
export declare const WithOntologyIdArgs: {
|
|
53
85
|
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly parameter: "";
|
|
86
|
+
readonly ontologyId: "agrovoc";
|
|
87
|
+
readonly iri: "http://aims.fao.org/aos/agrovoc/c_12332";
|
|
88
|
+
readonly parameter: "collectionId=ff5491d1-d0a9-481e-ac90-0fad065fa097";
|
|
58
89
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* the gateway serves it through Skosmos, but which provider answers is a
|
|
62
|
-
* property of the API Gateway configuration and may change - the story renders
|
|
63
|
-
* whatever the API reports rather than asserting a specific provider.
|
|
64
|
-
*/
|
|
65
|
-
export declare const withOntologyIdArgs: {
|
|
90
|
+
export declare const WithoutRawArgs: {
|
|
91
|
+
readonly showRaw: false;
|
|
66
92
|
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
67
93
|
readonly ontologyId: "agrovoc";
|
|
68
94
|
readonly iri: "http://aims.fao.org/aos/agrovoc/c_12332";
|
|
69
95
|
readonly parameter: "collectionId=ff5491d1-d0a9-481e-ac90-0fad065fa097";
|
|
70
96
|
};
|
|
71
|
-
|
|
72
|
-
* An IRI that does not exist in the requested ontology. The API answers with an
|
|
73
|
-
* empty `elements` array, which is not an error: `provider` stays undefined
|
|
74
|
-
* while `isSuccess` becomes true.
|
|
75
|
-
*/
|
|
76
|
-
export declare const notFoundArgs: {
|
|
97
|
+
export declare const NotFoundArgs: {
|
|
77
98
|
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
78
99
|
readonly ontologyId: "voc4cat";
|
|
79
100
|
readonly iri: "http://purl.obolibrary.org/obo/NCIT_C2985";
|
|
80
101
|
};
|
|
81
|
-
|
|
82
|
-
* Nothing is fetched while `enabled` is false, so the hook stays idle. Lets an
|
|
83
|
-
* application mount the hook before an IRI has been selected.
|
|
84
|
-
*/
|
|
85
|
-
export declare const disabledArgs: {
|
|
102
|
+
export declare const DisabledArgs: {
|
|
86
103
|
readonly api: "https://terminology.services.base4nfdi.de/api-gateway/ols4/api/";
|
|
87
104
|
readonly ontologyId: "voc4cat";
|
|
88
105
|
readonly iri: "https://w3id.org/nfdi4cat/voc4cat_0000151";
|
|
89
106
|
readonly enabled: false;
|
|
90
107
|
};
|
|
91
|
-
export declare const
|
|
108
|
+
export declare const fullWithOntologyIdPlay: ({ canvasElement, }: {
|
|
109
|
+
canvasElement: HTMLElement;
|
|
110
|
+
}) => Promise<void>;
|
|
111
|
+
export declare const fullWithoutRawPlay: ({ canvasElement, }: {
|
|
112
|
+
canvasElement: HTMLElement;
|
|
113
|
+
}) => Promise<void>;
|
|
114
|
+
export declare const fullNotFoundPlay: ({ canvasElement, }: {
|
|
115
|
+
canvasElement: HTMLElement;
|
|
116
|
+
}) => Promise<void>;
|
|
117
|
+
export declare const fullDisabledPlay: ({ canvasElement, }: {
|
|
92
118
|
canvasElement: HTMLElement;
|
|
93
119
|
}) => Promise<void>;
|