@ts4nfdi/terminology-service-suite 7.11.0 → 7.12.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.
@@ -4,4 +4,6 @@ export declare class JskosMappingApi {
4
4
  constructor(api: string | AxiosInstance);
5
5
  protected makeCall(url: string, config?: AxiosRequestConfig): Promise<any>;
6
6
  getMappingsByFrom(iri: string): Promise<any>;
7
+ getMappingsByTo(iri: string): Promise<any>;
8
+ getMappingsInBothDirections(iri: string): Promise<any>;
7
9
  }
@@ -866,6 +866,7 @@ export type EntityListWidgetProps = {
866
866
  };
867
867
  export type MappingListWidgetProps = {
868
868
  api: string;
869
+ /** IRI of the entity whose mappings are shown, in whichever view direction. */
869
870
  source: string;
870
871
  rowColor?: string;
871
872
  MappingDetailBackgroundColor?: string;
@@ -1,8 +1,4 @@
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
- */
1
+ /** One mapping, flattened to the strings the card shows and downloads. */
6
2
  export type MappingDetail = {
7
3
  type?: string;
8
4
  from?: string;
@@ -18,18 +14,13 @@ export type MappingDetail = {
18
14
  partOf?: string;
19
15
  uri?: string;
20
16
  };
21
- type MappingDetailPresentationProps = {
17
+ export type MappingDetailPresentationProps = {
22
18
  mapping: MappingDetail;
23
19
  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
- */
20
+ /** Shows a close button; the list widget uses it to collapse the row. */
28
21
  onClose?: () => void;
29
22
  };
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
- */
23
+ /** Renders the mapping it is handed, so both mapping widgets can show it. */
34
24
  export default function MappingDetailPresentation(props: MappingDetailPresentationProps): React.JSX.Element;
35
- export {};
25
+ declare function WrappedMappingDetailPresentation(props: MappingDetailPresentationProps): React.JSX.Element;
26
+ export { MappingDetailPresentation, WrappedMappingDetailPresentation };
@@ -1,5 +1,5 @@
1
1
  import { MappingDetailWidgetProps } from '../../../app';
2
2
  declare function MappingDetailWidget(props: MappingDetailWidgetProps): React.JSX.Element;
3
- export declare function WrappedMappingDetailWidget(props: MappingDetailWidgetProps): React.JSX.Element;
4
- export { MappingDetailWidget };
3
+ declare function WrappedMappingDetailWidget(props: MappingDetailWidgetProps): React.JSX.Element;
4
+ export { MappingDetailWidget, WrappedMappingDetailWidget };
5
5
  export default WrappedMappingDetailWidget;
@@ -1 +1,2 @@
1
+ export { MappingDetailPresentation } from './MappingDetailPresentation';
1
2
  export { MappingDetailWidget, WrappedMappingDetailWidget, } from './MappingDetailWidget';
@@ -19,32 +19,40 @@ export type MappingRow = {
19
19
  uri: string;
20
20
  partOf: string;
21
21
  };
22
+ /** Which side of the mappings the source sits on. */
23
+ export type ViewDirection = "from" | "to" | "both";
22
24
  type MetadataTarget = {
23
25
  iri: string;
24
26
  ontologyId: string;
25
27
  } | null;
26
28
  /** Everything the list shows or changes, passed down by MappingListWidget. */
27
- type MappingListPresentationProps = {
28
- fromLabel: string;
29
+ export type MappingListPresentationProps = {
30
+ /** The entity the user asked for; its cells are shown in bold. */
31
+ source: string;
32
+ entityLabel: string;
29
33
  rowColor: string;
30
34
  MappingDetailBackgroundColor?: string;
31
35
  labels: Record<string, string>;
36
+ fromLabels: Record<string, string>;
32
37
  filteredRows: MappingRow[];
33
38
  search: EuiSearchBarProps;
34
39
  expandedRowIds: string[];
35
40
  toggleRowExpansion: (row: MappingRow) => void;
36
41
  metadataTarget: MetadataTarget;
37
42
  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
+ typeFilters: string[];
44
+ setTypeFilters: Dispatch<SetStateAction<string[]>>;
43
45
  toggleTypeFilter: (type: string) => void;
44
46
  isPopoverOpen: boolean;
45
47
  onButtonClick: () => void;
46
48
  closePopover: () => void;
49
+ isFilterOpen: boolean;
50
+ setIsFilterOpen: Dispatch<SetStateAction<boolean>>;
51
+ viewDirection: ViewDirection;
52
+ setViewDirection: Dispatch<SetStateAction<ViewDirection>>;
47
53
  };
48
54
  /** UI of the mapping list; all state and data come from MappingListWidget. */
49
- export default function MappingListPresentation(props: MappingListPresentationProps): React.JSX.Element;
50
- export {};
55
+ declare function MappingListPresentation(props: MappingListPresentationProps): React.JSX.Element;
56
+ declare function WrappedMappingListPresentation(props: MappingListPresentationProps): React.JSX.Element;
57
+ export { MappingListPresentation, WrappedMappingListPresentation };
58
+ export default MappingListPresentation;
@@ -1,5 +1,9 @@
1
1
  import { MappingListWidgetProps } from '../../../app';
2
2
  declare function MappingListWidget(props: MappingListWidgetProps): React.JSX.Element;
3
- export declare function WrappedMappingListWidget(props: MappingListWidgetProps): React.JSX.Element;
4
- export { MappingListWidget };
3
+ /**
4
+ * Brings its own EUI and react-query providers, the way the other widgets do,
5
+ * so the widget also renders and fetches inside a plain host application.
6
+ */
7
+ declare function WrappedMappingListWidget(props: MappingListWidgetProps): React.JSX.Element;
8
+ export { MappingListWidget, WrappedMappingListWidget };
5
9
  export default WrappedMappingListWidget;
@@ -1 +1,2 @@
1
+ export { MappingListPresentation } from './MappingListPresentation';
1
2
  export { MappingListWidget, WrappedMappingListWidget, } from './MappingListWidget';
@@ -48,3 +48,10 @@ export declare const OntologyInfoWidgetOhdab: {
48
48
  export declare const commonOntologyInfoWidgetPlay: ({ canvasElement, }: {
49
49
  canvasElement: HTMLElement;
50
50
  }) => Promise<void>;
51
+ /**
52
+ * Checks that the IRI links are styled as links (issue #390), so they
53
+ * do not look like plain text when the host app resets the link color.
54
+ */
55
+ export declare const ontologyInfoLinksPlay: ({ canvasElement, }: {
56
+ canvasElement: HTMLElement;
57
+ }) => Promise<void>;