@ts4nfdi/terminology-service-suite 7.4.3 → 7.5.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 +8 -0
- package/dist/app/widgetDescriptions.d.ts +1 -0
- package/dist/components/widgets/MappingDetailWidget/MappingDetailPresentation.d.ts +35 -0
- package/dist/components/widgets/MappingDetailWidget/MappingDetailWidget.d.ts +5 -0
- package/dist/components/widgets/MappingDetailWidget/MappingDetailWidget.stories.d.ts +5 -0
- package/dist/components/widgets/MappingDetailWidget/MappingDetailWidgetStories.d.ts +13 -0
- package/dist/components/widgets/MappingDetailWidget/Utils/mappingUtils.d.ts +11 -0
- package/dist/components/widgets/MappingDetailWidget/index.d.ts +1 -0
- package/dist/components/widgets/MappingListWidget/MappingListPresentation.d.ts +50 -0
- package/dist/components/widgets/MappingListWidget/MappingListWidgetStories.d.ts +13 -1
- package/dist/esm/index.es.js +3437 -3068
- package/dist/esm/index.es.js.map +1 -1
- package/dist/stories/storyArgs.d.ts +2 -0
- package/package.json +1 -1
package/dist/app/types.d.ts
CHANGED
|
@@ -659,6 +659,14 @@ export type EntityListWidgetProps = {
|
|
|
659
659
|
export type MappingListWidgetProps = {
|
|
660
660
|
api: string;
|
|
661
661
|
source: string;
|
|
662
|
+
rowColor?: string;
|
|
663
|
+
MappingDetailBackgroundColor?: string;
|
|
664
|
+
};
|
|
665
|
+
export type MappingDetailWidgetProps = {
|
|
666
|
+
api: string;
|
|
667
|
+
source: string;
|
|
668
|
+
target: string;
|
|
669
|
+
MappingDetailBackgroundColor?: string;
|
|
662
670
|
};
|
|
663
671
|
/**
|
|
664
672
|
* Information about the terminology backend that actually served an entity.
|
|
@@ -24,4 +24,5 @@ export declare const SearchResultsListDescription: string;
|
|
|
24
24
|
export declare const TermDepictionDescription: string;
|
|
25
25
|
export declare const EntityListDescription: string;
|
|
26
26
|
export declare const MappingListDetailDescription: string;
|
|
27
|
+
export declare const MappingDetailDescription: string;
|
|
27
28
|
export declare const EntityProviderDescription: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One mapping, flattened to the strings the card shows and downloads.
|
|
3
|
+
* MappingDetailWidget builds it from what it fetches, MappingListWidget from
|
|
4
|
+
* the row the user expanded.
|
|
5
|
+
*/
|
|
6
|
+
export type MappingDetail = {
|
|
7
|
+
type?: string;
|
|
8
|
+
from?: string;
|
|
9
|
+
fromUri?: string;
|
|
10
|
+
fromScheme?: string;
|
|
11
|
+
to?: string;
|
|
12
|
+
toUri?: string;
|
|
13
|
+
toScheme?: string;
|
|
14
|
+
creator?: string;
|
|
15
|
+
created?: string;
|
|
16
|
+
modified?: string;
|
|
17
|
+
identifier?: string;
|
|
18
|
+
partOf?: string;
|
|
19
|
+
uri?: string;
|
|
20
|
+
};
|
|
21
|
+
type MappingDetailPresentationProps = {
|
|
22
|
+
mapping: MappingDetail;
|
|
23
|
+
MappingDetailBackgroundColor?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Puts a close button in the top corner of the card.
|
|
26
|
+
* MappingListWidget uses it to collapse the row again.
|
|
27
|
+
*/
|
|
28
|
+
onClose?: () => void;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The card itself: its fields, downloads and layout. It renders the mapping it
|
|
32
|
+
* is handed and fetches nothing, so both mapping widgets can show it.
|
|
33
|
+
*/
|
|
34
|
+
export default function MappingDetailPresentation(props: MappingDetailPresentationProps): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MappingDetailWidgetProps } from '../../../app';
|
|
2
|
+
declare function MappingDetailWidget(props: MappingDetailWidgetProps): import("react").JSX.Element;
|
|
3
|
+
export declare function WrappedMappingDetailWidget(props: MappingDetailWidgetProps): import("react").JSX.Element;
|
|
4
|
+
export { MappingDetailWidget };
|
|
5
|
+
export default WrappedMappingDetailWidget;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const MappingDetailWidgetStoryArgTypes: {
|
|
2
|
+
[x: string]: import('storybook/internal/csf').InputType;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* One mapping of the NSK-BK concordance, picked by its source and target. It
|
|
6
|
+
* belongs to a concordance, so every field of the card has a value.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MappingDetailWidgetStoryArgs_Rec_B_2000: {
|
|
9
|
+
readonly api: "https://coli-conc.gbv.de/api/";
|
|
10
|
+
readonly source: "http://uri.gbv.de/terminology/nsk/Rec%20B%202000";
|
|
11
|
+
readonly target: "http://uri.gbv.de/terminology/bk/86.26";
|
|
12
|
+
readonly MappingDetailBackgroundColor: "#ebedef";
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MappingDetail } from '../MappingDetailPresentation';
|
|
2
|
+
/**
|
|
3
|
+
* Turns a JSKOS timestamp into "11 May 2026, 12:48", or a dash when it cannot
|
|
4
|
+
* be read. MappingListWidget formats its table dates with it too.
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatMappingDate(value?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Reads the values the card needs out of one JSKOS mapping, with a dash for
|
|
9
|
+
* whatever the server left out.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toMappingDetail(mapping: any): MappingDetail;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MappingDetailWidget, WrappedMappingDetailWidget, } from './MappingDetailWidget';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EuiSearchBarProps } from '@elastic/eui';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
export type MappingRow = {
|
|
4
|
+
/** Stable id the table uses to track which rows are expanded. */
|
|
5
|
+
id: string;
|
|
6
|
+
from: string;
|
|
7
|
+
fromUri: string;
|
|
8
|
+
to: string;
|
|
9
|
+
toUri: string;
|
|
10
|
+
creator: string;
|
|
11
|
+
type: string;
|
|
12
|
+
created: string;
|
|
13
|
+
createdLabel: string;
|
|
14
|
+
targetFromColiConc: string;
|
|
15
|
+
fromScheme: string;
|
|
16
|
+
toScheme: string;
|
|
17
|
+
identifier: string;
|
|
18
|
+
modified: string;
|
|
19
|
+
uri: string;
|
|
20
|
+
partOf: string;
|
|
21
|
+
};
|
|
22
|
+
type MetadataTarget = {
|
|
23
|
+
iri: string;
|
|
24
|
+
ontologyId: string;
|
|
25
|
+
} | null;
|
|
26
|
+
/** Everything the list shows or changes, passed down by MappingListWidget. */
|
|
27
|
+
type MappingListPresentationProps = {
|
|
28
|
+
fromLabel: string;
|
|
29
|
+
rowColor: string;
|
|
30
|
+
MappingDetailBackgroundColor?: string;
|
|
31
|
+
labels: Record<string, string>;
|
|
32
|
+
filteredRows: MappingRow[];
|
|
33
|
+
search: EuiSearchBarProps;
|
|
34
|
+
expandedRowIds: string[];
|
|
35
|
+
toggleRowExpansion: (row: MappingRow) => void;
|
|
36
|
+
metadataTarget: MetadataTarget;
|
|
37
|
+
setMetadataTarget: Dispatch<SetStateAction<MetadataTarget>>;
|
|
38
|
+
isTypeFilterOpen: boolean;
|
|
39
|
+
setIsTypeFilterOpen: Dispatch<SetStateAction<boolean>>;
|
|
40
|
+
selectedTypeFilters: string[];
|
|
41
|
+
setSelectedTypeFilters: Dispatch<SetStateAction<string[]>>;
|
|
42
|
+
setAppliedTypeFilters: Dispatch<SetStateAction<string[]>>;
|
|
43
|
+
toggleTypeFilter: (type: string) => void;
|
|
44
|
+
isPopoverOpen: boolean;
|
|
45
|
+
onButtonClick: () => void;
|
|
46
|
+
closePopover: () => void;
|
|
47
|
+
};
|
|
48
|
+
/** UI of the mapping list; all state and data come from MappingListWidget. */
|
|
49
|
+
export default function MappingListPresentation(props: MappingListPresentationProps): import("react").JSX.Element;
|
|
50
|
+
export {};
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
export declare const MappingListWidgetStoryArgTypes: {
|
|
1
|
+
export declare const MappingListWidgetStoryArgTypes: {
|
|
2
|
+
[x: string]: import('storybook/internal/csf').InputType;
|
|
3
|
+
};
|
|
2
4
|
export declare const MappingListWidgetStoryArgs_OEO_00000150: {
|
|
3
5
|
readonly api: "https://coli-conc.gbv.de/api/";
|
|
4
6
|
readonly source: "https://openenergyplatform.org/ontology/oeo/OEO_00000150";
|
|
7
|
+
readonly rowColor: "#fff5fa";
|
|
8
|
+
readonly MappingDetailBackgroundColor: "#efebee";
|
|
5
9
|
};
|
|
6
10
|
export declare const MappingListWidgetStoryArgs_Q259745: {
|
|
7
11
|
readonly api: "https://coli-conc.gbv.de/api/";
|
|
8
12
|
readonly source: "http://www.wikidata.org/entity/Q259745";
|
|
13
|
+
readonly rowColor: "#ebe3f8";
|
|
14
|
+
readonly MappingDetailBackgroundColor: "#ebedef";
|
|
9
15
|
};
|
|
10
16
|
export declare const MappingListWidgetStoryArgs_Energy: {
|
|
11
17
|
readonly api: "https://coli-conc.gbv.de/api/";
|
|
12
18
|
readonly source: "https://schema.org/Energy";
|
|
19
|
+
readonly rowColor: "#faf8e0";
|
|
20
|
+
readonly MappingDetailBackgroundColor: "#ecebef";
|
|
13
21
|
};
|
|
14
22
|
export declare const MappingListWidgetStoryArgs_Rec_B_2000: {
|
|
15
23
|
readonly api: "https://coli-conc.gbv.de/api/";
|
|
16
24
|
readonly source: "http://uri.gbv.de/terminology/nsk/Rec%20B%202000";
|
|
25
|
+
readonly rowColor: "#ffe9dc";
|
|
26
|
+
readonly MappingDetailBackgroundColor: "#ebedef";
|
|
17
27
|
};
|
|
18
28
|
export declare const MappingListWidgetStoryArgs_Ges_C_2700: {
|
|
19
29
|
readonly api: "https://coli-conc.gbv.de/api/";
|
|
20
30
|
readonly source: "http://uri.gbv.de/terminology/nsk/Ges%20C%202700";
|
|
31
|
+
readonly rowColor: "#ffd5d5";
|
|
32
|
+
readonly MappingDetailBackgroundColor: "#f1f3f3";
|
|
21
33
|
};
|
|
22
34
|
export declare const MappingListWidgetStoryArgs_B14C4A: {
|
|
23
35
|
readonly api: "https://coli-conc.gbv.de/api/";
|