@ts4nfdi/terminology-service-suite 7.4.3 → 7.6.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.
Files changed (56) hide show
  1. package/dist/app/types.d.ts +208 -3
  2. package/dist/app/widgetDescriptions.d.ts +1 -0
  3. package/dist/components/widgets/DataContentWidget/DataContentPresentation.d.ts +8 -0
  4. package/dist/components/widgets/DataContentWidget/DataContentWidget.d.ts +1 -1
  5. package/dist/components/widgets/DataContentWidget/index.d.ts +1 -0
  6. package/dist/components/widgets/EntityInfoWidget/EntityInfoPresentation.d.ts +9 -0
  7. package/dist/components/widgets/EntityInfoWidget/index.d.ts +1 -0
  8. package/dist/components/widgets/EntityListWidget/EntityListPresentation.d.ts +4 -0
  9. package/dist/components/widgets/EntityListWidget/EntityListWidget.d.ts +3 -0
  10. package/dist/components/widgets/EntityListWidget/index.d.ts +2 -1
  11. package/dist/components/widgets/EntityRelationsWidget/EntityRelationsPresentation.d.ts +21 -0
  12. package/dist/components/widgets/EntityRelationsWidget/EntityRelationsWidget.d.ts +1 -14
  13. package/dist/components/widgets/EntityRelationsWidget/index.d.ts +1 -0
  14. package/dist/components/widgets/GraphViewWidget/GraphViewPresentation.d.ts +4 -0
  15. package/dist/components/widgets/GraphViewWidget/GraphViewWidget.d.ts +1 -1
  16. package/dist/components/widgets/GraphViewWidget/index.d.ts +1 -0
  17. package/dist/components/widgets/MappingDetailWidget/MappingDetailPresentation.d.ts +35 -0
  18. package/dist/components/widgets/MappingDetailWidget/MappingDetailWidget.d.ts +5 -0
  19. package/dist/components/widgets/MappingDetailWidget/MappingDetailWidget.stories.d.ts +5 -0
  20. package/dist/components/widgets/MappingDetailWidget/MappingDetailWidgetStories.d.ts +13 -0
  21. package/dist/components/widgets/MappingDetailWidget/Utils/mappingUtils.d.ts +11 -0
  22. package/dist/components/widgets/MappingDetailWidget/index.d.ts +1 -0
  23. package/dist/components/widgets/MappingListWidget/MappingListPresentation.d.ts +50 -0
  24. package/dist/components/widgets/MappingListWidget/MappingListWidgetStories.d.ts +13 -1
  25. package/dist/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.d.ts +3 -2
  26. package/dist/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.d.ts +1 -1
  27. package/dist/components/widgets/MetadataWidget/DescriptionWidget/index.d.ts +1 -0
  28. package/dist/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.d.ts +2 -1
  29. package/dist/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.d.ts +1 -1
  30. package/dist/components/widgets/MetadataWidget/EntityDefinedByWidget/index.d.ts +1 -0
  31. package/dist/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.d.ts +2 -1
  32. package/dist/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.d.ts +1 -1
  33. package/dist/components/widgets/MetadataWidget/EntityOntoListWidget/index.d.ts +1 -0
  34. package/dist/components/widgets/MetadataWidget/MetadataPresentation.d.ts +4 -0
  35. package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.d.ts +3 -2
  36. package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.d.ts +1 -1
  37. package/dist/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/index.d.ts +1 -0
  38. package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.d.ts +3 -2
  39. package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.d.ts +1 -1
  40. package/dist/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/index.d.ts +1 -0
  41. package/dist/components/widgets/MetadataWidget/TabWidget/TabPresentation.d.ts +2 -1
  42. package/dist/components/widgets/MetadataWidget/TabWidget/TabWidget.d.ts +1 -1
  43. package/dist/components/widgets/MetadataWidget/TabWidget/index.d.ts +1 -0
  44. package/dist/components/widgets/MetadataWidget/index.d.ts +1 -0
  45. package/dist/components/widgets/OntologyInfoWidget/OntologyInfoPresentation.d.ts +4 -0
  46. package/dist/components/widgets/OntologyInfoWidget/index.d.ts +1 -0
  47. package/dist/components/widgets/ResourcesWidget/ResourcesPresentation.d.ts +4 -0
  48. package/dist/components/widgets/ResourcesWidget/index.d.ts +1 -0
  49. package/dist/components/widgets/TermDepictionWidget/TermDepictionPresentation.d.ts +4 -0
  50. package/dist/components/widgets/TermDepictionWidget/TermDepictionWidget.d.ts +1 -1
  51. package/dist/components/widgets/TermDepictionWidget/index.d.ts +2 -1
  52. package/dist/esm/index.es.js +4685 -4087
  53. package/dist/esm/index.es.js.map +1 -1
  54. package/dist/esm/terminology-service-suite.css +1 -1
  55. package/dist/stories/storyArgs.d.ts +2 -0
  56. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { EuiCardProps } from '@elastic/eui';
1
+ import { Criteria, EuiCardProps } from '@elastic/eui';
2
2
  import { Action } from '@elastic/eui/src/components/basic_table/action_types';
3
3
  import { EuiComboBoxProps } from '@elastic/eui/src/components/combo_box/combo_box';
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 { Thing } from '../model/interfaces';
7
+ import { Entity, Ontology, Ontologies, Individual, 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';
@@ -190,8 +190,47 @@ export type AutocompleteWidgetProps = Partial<EuiComboBoxProps<EntityValue>> & P
190
190
  showApiRequestButton?: boolean;
191
191
  };
192
192
  export type DataContentWidgetProps = ApiObj & ParameterObj;
193
+ export type DataContentPresentationProps = EuiTextProps & {
194
+ ontologiesData?: Ontologies;
195
+ isLoading?: boolean;
196
+ isError?: boolean;
197
+ dataUpdatedAt?: number;
198
+ };
193
199
  export type EntityInfoWidgetProps = ApiObj & OptionalEntityTypeObj & OptionalOntologyIdObj & ForcedIriObj & HasTitleObj & ShowBadgesObj & ParameterObj & UseLegacyObj & OnNavigates;
200
+ export type EntityInfoPresentationProps = ApiObj & ForcedIriObj & OptionalEntityTypeObj & HasTitleObj & ShowBadgesObj & UseLegacyObj & OnNavigates & EuiTextProps & {
201
+ /**
202
+ * The already resolved entity whose information is shown.
203
+ */
204
+ entity?: Entity;
205
+ /**
206
+ * Shows a loading spinner instead of the information.
207
+ */
208
+ isLoading?: boolean;
209
+ /**
210
+ * Error of a lookup performed by the caller, shown instead of the information.
211
+ */
212
+ error?: string | unknown;
213
+ };
194
214
  export type EntityRelationsWidgetProps = ApiObj & OptionalEntityTypeObj & OptionalOntologyIdObj & ForcedIriObj & HasTitleObj & ShowBadgesObj & ParameterObj & OnNavigates;
215
+ export type EntityRelationsPresentationProps = OptionalEntityTypeObj & HasTitleObj & ShowBadgesObj & OnNavigates & EuiTextProps & {
216
+ /**
217
+ * The already resolved entity whose relations are shown.
218
+ */
219
+ entity?: Entity;
220
+ /**
221
+ * Instances of the entity, shown in the instances section of a class.
222
+ */
223
+ instances?: Individual[];
224
+ /**
225
+ * Shows a loading spinner instead of the relations.
226
+ */
227
+ isLoading?: boolean;
228
+ /**
229
+ * True when a lookup performed by the caller failed. A message is shown
230
+ * instead of the relations.
231
+ */
232
+ isError?: boolean;
233
+ };
195
234
  export type JsonApiWidgetProps = {
196
235
  /**
197
236
  * The API query whose response JSON should be displayed on click.
@@ -307,7 +346,7 @@ export type TabWidgetProps = TabSubwidgetsProps & TabList & OnNavigates & CssCla
307
346
  */
308
347
  edgeLabel?: string;
309
348
  /**
310
- * Callback function for double clicking on a node in graph. The default behaviour is to expand the node.
349
+ * Callback function for double-clicking on a node in graph. The default behaviour is to expand the node.
311
350
  * */
312
351
  onNodeClick?: (iri: string) => void;
313
352
  showHeader?: boolean;
@@ -460,6 +499,62 @@ export type TitlePresentationProps = TitleTextObj & CssClassNameObj & OptionalTh
460
499
  onNavigateTo?: (iri: string, ontologyId: string, thingType: string) => void;
461
500
  href?: string;
462
501
  };
502
+ export type MetadataPresentationProps = ForcedIriObj & OptionalOntologyIdObj & OptionalEntityTypeObj & OnNavigateToOntology & CssClassNameObj & ColorFirstObj & ColorSecondObj & DescTextObj & {
503
+ /**
504
+ * Label of the already resolved entity, shown as the title.
505
+ */
506
+ label?: string;
507
+ /**
508
+ * Short form of the already resolved entity, e.g. "format_2332". Shown in the breadcrumb.
509
+ */
510
+ shortForm?: string;
511
+ /**
512
+ * Description of the already resolved entity.
513
+ */
514
+ description?: string;
515
+ /**
516
+ * Other ontologies the entity appears in.
517
+ */
518
+ ontoList?: string[];
519
+ /**
520
+ * Ontologies the entity is defined by.
521
+ */
522
+ definedBy?: string[];
523
+ /**
524
+ * Show a loading state instead of the passed values, for example while the caller resolves them.
525
+ */
526
+ isLoading?: boolean;
527
+ /**
528
+ * Error of a lookup performed by the caller, shown instead of the passed values.
529
+ */
530
+ error?: string | unknown;
531
+ /**
532
+ * The term backlink. User can use this to make the term's label a link. For example, a link to the term page on a terminology service.
533
+ */
534
+ termLink?: string;
535
+ /**
536
+ * Set your own text manually, which will show as a clickable link instead of the IRI.
537
+ */
538
+ iriText?: string;
539
+ /**
540
+ * Indicates that the target iri is external and needs an icon.
541
+ */
542
+ externalIcon?: boolean;
543
+ /**
544
+ * The iri should get appended to the urlPrefix or not. When provided, the iri gets encoded and appended to the urlPrefix.
545
+ */
546
+ urlPrefix?: string;
547
+ /**
548
+ * Position a copy to clipboard button for the iri link. 'none' or not providing the option means hiding the button.
549
+ * left/right means showing the button on the left or right side of the iri link.
550
+ */
551
+ copyButton?: "right" | "left" | "none";
552
+ /**
553
+ * Props of the tab section. Tabs fetch their own data, so when this is not provided no tabs are rendered
554
+ * and the component performs no request at all.
555
+ */
556
+ tabProps?: TabWidgetProps;
557
+ };
463
558
  export type MetadataWidgetProps = TabWidgetProps & CssClassNameObj & ColorFirstObj & ColorSecondObj & DescTextObj & TitleTextObj & {
464
559
  /**
465
560
  * The term backlink. User can use this to make the term's label a link. For example, a link to the term page on a terminology service.
@@ -493,6 +588,11 @@ export type MetadataWidgetProps = TabWidgetProps & CssClassNameObj & ColorFirstO
493
588
  showHeader?: boolean;
494
589
  showComparisonTitleInHeader?: boolean;
495
590
  };
591
+ export type OntologyInfoPresentationProps = HasTitleObj & ShowBadgesObj & ContainerWidthObj & OnNavigates & CssClassNameObj & {
592
+ ontology?: Ontology;
593
+ isLoading?: boolean;
594
+ error?: string | unknown;
595
+ };
496
596
  export type OntologyInfoWidgetProps = ApiObj & ForcedOntologyIdObj & HasTitleObj & ShowBadgesObj & ParameterObj & UseLegacyObj & ContainerWidthObj & OnNavigates & CssClassNameObj;
497
597
  export type ResourcesWidgetProps = ApiObj & ParameterObj & UseLegacyObj & CssClassNameObj & {
498
598
  /**
@@ -520,6 +620,45 @@ export type ResourcesWidgetProps = ApiObj & ParameterObj & UseLegacyObj & CssCla
520
620
  */
521
621
  onNavigate?: ((ontologyId: string) => void) | string;
522
622
  };
623
+ export type ResourcesPresentationProps = UseLegacyObj & CssClassNameObj & {
624
+ /**
625
+ * The already resolved resources shown in the table.
626
+ */
627
+ resources: OlsResource[];
628
+ /**
629
+ * Shows the table in its loading state.
630
+ */
631
+ isLoading?: boolean;
632
+ /**
633
+ * True when a lookup performed by the caller failed. The license notice and
634
+ * the resource count are then hidden.
635
+ */
636
+ isError?: boolean;
637
+ /**
638
+ * Initial number of entries displayed per page.
639
+ */
640
+ initialEntriesPerPage?: number;
641
+ /**
642
+ * Possible values for number of entries displayed per page.
643
+ */
644
+ pageSizeOptions?: number[];
645
+ /**
646
+ * Column the table is sorted by initially.
647
+ */
648
+ initialSortField?: string;
649
+ /**
650
+ * Initial sorting direction.
651
+ */
652
+ initialSortDir?: "asc" | "desc";
653
+ /**
654
+ * Pass actions to each item in the table.
655
+ */
656
+ actions?: Array<Action<OlsResource>>;
657
+ /**
658
+ * This function is called every time an ontology link is clicked.
659
+ */
660
+ onNavigate?: ((ontologyId: string) => void) | string;
661
+ };
523
662
  export type OlsResource = ForcedOntologyIdObj & {
524
663
  loaded: string;
525
664
  numberOfTerms: number;
@@ -593,6 +732,21 @@ export type MetadataCompactProps = Partial<Omit<EuiCardProps, "layout">> & ApiOb
593
732
  useLegacy: boolean;
594
733
  };
595
734
  export type TermDepictionWidgetProps = ApiObj & ForcedIriObj & ForcedOntologyIdObj & UseLegacyObj;
735
+ export type TermDepictionPresentationProps = {
736
+ /**
737
+ * Urls of the already resolved depictions. A url ending in .glb is shown as a
738
+ * 3D model, every other one as an image.
739
+ */
740
+ depictionUrls?: string[];
741
+ /**
742
+ * Shows a loading spinner instead of the depictions.
743
+ */
744
+ isLoading?: boolean;
745
+ /**
746
+ * Error of a lookup performed by the caller, shown instead of the depictions.
747
+ */
748
+ error?: string | unknown;
749
+ };
596
750
  export type GraphViewWidgetProps = ApiObj & ForcedIriObj & ForcedOntologyIdObj & CssClassNameObj & ParameterObj & {
597
751
  /**
598
752
  * The target iri. used in the hierarchy mode to compare two terms in one graph.
@@ -627,6 +781,26 @@ export type GraphViewWidgetProps = ApiObj & ForcedIriObj & ForcedOntologyIdObj &
627
781
  */
628
782
  onNavigateTo?: (target: string) => void;
629
783
  };
784
+ export type GraphViewPresentationProps = CssClassNameObj & {
785
+ downloadGraphData: () => void;
786
+ reset: () => void;
787
+ isLoading: boolean;
788
+ isError: boolean;
789
+ error?: string | unknown;
790
+ removeNodeFromGraph: () => void;
791
+ hideLegend?: boolean;
792
+ sourceNodeBgColor: string;
793
+ sourceLabel: string;
794
+ targetIri: string;
795
+ commonNodesBgColor: string;
796
+ targetNodeBgColor: string;
797
+ targetLabel: string;
798
+ exclusiveToTargetIriColor: string;
799
+ stopFullWidth?: boolean;
800
+ showNothingToAddMessage: boolean;
801
+ showNodeNotSelectedMessage: boolean;
802
+ container: React.RefObject<HTMLDivElement>;
803
+ };
630
804
  export type OlsGraphNode = {
631
805
  /**
632
806
  * Used in the GraphView widget for rendering a graph's node
@@ -650,6 +824,29 @@ export type ComparisonInputProps = {
650
824
  initialTargetIri?: string;
651
825
  className?: string;
652
826
  };
827
+ export type EntityListPresentationProps = {
828
+ isLoading?: boolean;
829
+ isFetching?: boolean;
830
+ totalItemCount: number;
831
+ searchText: string;
832
+ onSearchTextChange: (searchText: string) => void;
833
+ onTableChange: (criteria: Criteria<EntityRow>) => void;
834
+ pageIndex: number;
835
+ pageSize: number;
836
+ sortField: keyof EntityRow;
837
+ sortDirection: "asc" | "desc";
838
+ entityType?: EntityTypeName;
839
+ error?: string | unknown;
840
+ rows: EntityRow[];
841
+ };
842
+ export type EntityRow = {
843
+ name: string;
844
+ id: string;
845
+ rowIndex: number;
846
+ domain?: string;
847
+ range?: string;
848
+ type?: string;
849
+ };
653
850
  export type EntityListWidgetProps = {
654
851
  api: string;
655
852
  ontologyId: string;
@@ -659,6 +856,14 @@ export type EntityListWidgetProps = {
659
856
  export type MappingListWidgetProps = {
660
857
  api: string;
661
858
  source: string;
859
+ rowColor?: string;
860
+ MappingDetailBackgroundColor?: string;
861
+ };
862
+ export type MappingDetailWidgetProps = {
863
+ api: string;
864
+ source: string;
865
+ target: string;
866
+ MappingDetailBackgroundColor?: string;
662
867
  };
663
868
  /**
664
869
  * 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,8 @@
1
+ import { DataContentPresentationProps } from '../../../app';
2
+ declare function DataContentPresentation(props: DataContentPresentationProps): React.JSX.Element;
3
+ /**
4
+ * Brings its own EUI provider, the way the widgets do, so the card also renders
5
+ * inside a plain host application. It performs no request of its own.
6
+ */
7
+ declare function WrappedDataContentPresentation(props: DataContentPresentationProps): React.JSX.Element;
8
+ export { DataContentPresentation, WrappedDataContentPresentation };
@@ -1,4 +1,4 @@
1
- import { DataContentWidgetProps } from '../../../app/types';
1
+ import { DataContentWidgetProps } from '../../../app';
2
2
  declare function DataContentWidget(props: DataContentWidgetProps): React.JSX.Element;
3
3
  declare function WrappedDataContentWidget(props: DataContentWidgetProps): React.JSX.Element;
4
4
  export { DataContentWidget, WrappedDataContentWidget };
@@ -1 +1,2 @@
1
+ export { DataContentPresentation } from './DataContentPresentation';
1
2
  export { DataContentWidget } from './DataContentWidget';
@@ -0,0 +1,9 @@
1
+ import { EntityInfoPresentationProps } from '../../../app';
2
+ declare function EntityInfoPresentation(props: EntityInfoPresentationProps): React.JSX.Element;
3
+ /**
4
+ * Brings its own EUI and react-query providers, the way the widgets do, so the
5
+ * card also renders inside a plain host application. The react-query provider is
6
+ * needed because a MathML annotation renders a MathFormulaWidget, which fetches.
7
+ */
8
+ declare function WrappedEntityInfoPresentation(props: EntityInfoPresentationProps): React.JSX.Element;
9
+ export { EntityInfoPresentation, WrappedEntityInfoPresentation };
@@ -1 +1,2 @@
1
+ export { EntityInfoPresentation } from './EntityInfoPresentation';
1
2
  export { EntityInfoWidget } from './EntityInfoWidget';
@@ -0,0 +1,4 @@
1
+ import { EntityListPresentationProps } from '../../../app';
2
+ declare function EntityListPresentation(props: EntityListPresentationProps): import("react").JSX.Element;
3
+ declare function WrappedEntityListPresentation(props: EntityListPresentationProps): import("react").JSX.Element;
4
+ export { EntityListPresentation, WrappedEntityListPresentation };
@@ -1,4 +1,7 @@
1
1
  import { EntityListWidgetProps } from '../../../app';
2
+ import { EntityTypeName } from '../../../model/ModelTypeCheck';
3
+ export declare function isPropertyEntityType(entityType: EntityTypeName | undefined): entityType is "property" | "annotationProperty" | "dataProperty" | "objectProperty";
4
+ export declare function isIndividualEntityType(entityType: EntityTypeName | undefined): entityType is "individual";
2
5
  declare function EntityListWidget(props: EntityListWidgetProps): React.JSX.Element;
3
6
  export declare function WrappedEntityListWidget(props: EntityListWidgetProps): React.JSX.Element;
4
7
  export { EntityListWidget };
@@ -1 +1,2 @@
1
- export { EntityListWidget, WrappedEntityListWidget } from './EntityListWidget';
1
+ export { EntityListPresentation } from './EntityListPresentation';
2
+ export { EntityListWidget } from './EntityListWidget';
@@ -0,0 +1,21 @@
1
+ import { ReactElement } from 'react';
2
+ import { EntityRelationsPresentationProps, OnNavigates } from '../../../app';
3
+ import { Thing } from '../../../model/interfaces';
4
+ /**
5
+ * Builds and returns an array of section list elements specified at `currentResponsePath`
6
+ * @param parentEntity
7
+ * @param array
8
+ * @param showBadges
9
+ * @param onNavigates functions defining the action when clicking clickable items
10
+ * @param onNavigates.onNavigateToEntity function defining the action when clicking on an entities name
11
+ * @param onNavigates.onNavigateToOntology function defining the action when clicking on an ontology badge
12
+ * @param onNavigates.onNavigateToDisambiguate function defining the action when clicking on a disambiguation badge
13
+ */
14
+ export declare function getSectionListJSX(parentEntity: Thing, array: any[], showBadges: boolean | undefined, onNavigates: OnNavigates): ReactElement;
15
+ declare function EntityRelationsPresentation(props: EntityRelationsPresentationProps): React.JSX.Element;
16
+ /**
17
+ * Brings its own EUI provider, the way the widgets do, so the card also renders
18
+ * inside a plain host application. It performs no request of its own.
19
+ */
20
+ declare function WrappedEntityRelationsPresentation(props: EntityRelationsPresentationProps): React.JSX.Element;
21
+ export { EntityRelationsPresentation, WrappedEntityRelationsPresentation };
@@ -1,17 +1,4 @@
1
- import { ReactElement } from 'react';
2
- import { EntityRelationsWidgetProps, OnNavigates } from '../../../app';
3
- import { Thing } from '../../../model/interfaces';
4
- /**
5
- * Builds and returns an array of section list elements specified at `currentResponsePath`
6
- * @param parentEntity
7
- * @param array
8
- * @param showBadges
9
- * @param onNavigates functions defining the action when clicking clickable items
10
- * @param onNavigates.onNavigateToEntity function defining the action when clicking on an entities name
11
- * @param onNavigates.onNavigateToOntology function defining the action when clicking on an ontology badge
12
- * @param onNavigates.onNavigateToDisambiguate function defining the action when clicking on a disambiguation badge
13
- */
14
- export declare function getSectionListJSX(parentEntity: Thing, array: any[], showBadges: boolean | undefined, onNavigates: OnNavigates): ReactElement;
1
+ import { EntityRelationsWidgetProps } from '../../../app';
15
2
  declare function EntityRelationsWidget(props: EntityRelationsWidgetProps): React.JSX.Element;
16
3
  declare function WrappedEntityRelationsWidget(props: EntityRelationsWidgetProps): React.JSX.Element;
17
4
  export { EntityRelationsWidget, WrappedEntityRelationsWidget };
@@ -1 +1,2 @@
1
+ export { EntityRelationsPresentation } from './EntityRelationsPresentation';
1
2
  export { EntityRelationsWidget } from './EntityRelationsWidget';
@@ -0,0 +1,4 @@
1
+ import { GraphViewPresentationProps } from '../../../app';
2
+ declare function GraphViewPresentation(props: GraphViewPresentationProps): React.JSX.Element;
3
+ declare function WrappedGraphViewPresentation(props: GraphViewPresentationProps): React.JSX.Element;
4
+ export { GraphViewPresentation, WrappedGraphViewPresentation };
@@ -1,4 +1,4 @@
1
- import { GraphViewWidgetProps } from '../../../app/types';
1
+ import { GraphViewWidgetProps } from '../../../app';
2
2
  declare function GraphViewWidget(props: GraphViewWidgetProps): React.JSX.Element;
3
3
  declare function WrappedGraphViewWidget(props: GraphViewWidgetProps): React.JSX.Element;
4
4
  export { GraphViewWidget, WrappedGraphViewWidget };
@@ -1 +1,2 @@
1
+ export { GraphViewPresentation } from './GraphViewPresentation';
1
2
  export { GraphViewWidget } from './GraphViewWidget';
@@ -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,5 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj<typeof meta>;
5
+ export declare const Rec_B_2000: Story;
@@ -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/";
@@ -1,3 +1,4 @@
1
- import { DescriptionPresentationProps } from '../../../../app/types';
1
+ import { DescriptionPresentationProps } from '../../../../app/';
2
2
  declare function DescriptionPresentation(props: DescriptionPresentationProps): import("react").JSX.Element;
3
- export { DescriptionPresentation };
3
+ declare function WrappedDescriptionPresentation(props: DescriptionPresentationProps): import("react").JSX.Element;
4
+ export { DescriptionPresentation, WrappedDescriptionPresentation };
@@ -1,4 +1,4 @@
1
- import { DescriptionWidgetProps } from '../../../../app/types';
1
+ import { DescriptionWidgetProps } from '../../../../app';
2
2
  declare function DescriptionWidget(props: DescriptionWidgetProps): React.JSX.Element;
3
3
  declare function WrappedDescriptionWidget(props: DescriptionWidgetProps): React.JSX.Element;
4
4
  export { DescriptionWidget, WrappedDescriptionWidget };
@@ -1 +1,2 @@
1
+ export { DescriptionPresentation } from './DescriptionPresentation';
1
2
  export { DescriptionWidget } from './DescriptionWidget';
@@ -1,3 +1,4 @@
1
1
  import { EntityOntoListPresentationProps } from '../../../../app';
2
2
  declare function EntityDefinedByPresentation(props: EntityOntoListPresentationProps): import("react").JSX.Element;
3
- export { EntityDefinedByPresentation };
3
+ declare function WrappedEntityDefinedByPresentation(props: EntityOntoListPresentationProps): import("react").JSX.Element;
4
+ export { EntityDefinedByPresentation, WrappedEntityDefinedByPresentation };
@@ -1,4 +1,4 @@
1
- import { EntityDefinedByWidgetProps } from '../../../../app/types';
1
+ import { EntityDefinedByWidgetProps } from '../../../../app/';
2
2
  declare function EntityDefinedByWidget(props: EntityDefinedByWidgetProps): React.JSX.Element;
3
3
  declare function WrappedEntityDefinedByWidget(props: EntityDefinedByWidgetProps): React.JSX.Element;
4
4
  export { EntityDefinedByWidget, WrappedEntityDefinedByWidget };
@@ -1 +1,2 @@
1
+ export { EntityDefinedByPresentation } from './EntityDefinedByPresentation';
1
2
  export { EntityDefinedByWidget } from './EntityDefinedByWidget';
@@ -1,3 +1,4 @@
1
1
  import { EntityOntoListPresentationProps } from '../../../../app';
2
2
  declare function EntityOntoListPresentation(props: EntityOntoListPresentationProps): import("react").JSX.Element;
3
- export { EntityOntoListPresentation };
3
+ declare function WrappedEntityOntoListPresentation(props: EntityOntoListPresentationProps): import("react").JSX.Element;
4
+ export { EntityOntoListPresentation, WrappedEntityOntoListPresentation };
@@ -1,4 +1,4 @@
1
- import { EntityOntoListWidgetProps } from '../../../../app/types';
1
+ import { EntityOntoListWidgetProps } from '../../../../app/';
2
2
  declare function EntityOntoListWidget(props: EntityOntoListWidgetProps): React.JSX.Element;
3
3
  declare function WrappedEntityOntoListWidget(props: EntityOntoListWidgetProps): React.JSX.Element;
4
4
  export { EntityOntoListWidget, WrappedEntityOntoListWidget };
@@ -1 +1,2 @@
1
+ export { EntityOntoListPresentation } from './EntityOntoListPresentation';
1
2
  export { EntityOntoListWidget } from './EntityOntoListWidget';
@@ -0,0 +1,4 @@
1
+ import { MetadataPresentationProps } from '../../../app';
2
+ declare function MetadataPresentation(props: MetadataPresentationProps): import("react").JSX.Element;
3
+ declare function WrappedMetadataPresentation(props: MetadataPresentationProps): import("react").JSX.Element;
4
+ export { MetadataPresentation, WrappedMetadataPresentation };