@ts4nfdi/terminology-service-suite 6.8.1 → 6.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.
@@ -131,6 +131,20 @@ type TabList = {
131
131
  * It is possible to show and hide the TermDepiction tab. **True** shows the tab. **False** hides the tab.
132
132
  * */
133
133
  termDepictionTab?: boolean;
134
+ /**
135
+ * It is possible to show and hide the EntityInfo tab. **True** shows the tab. **False** hides the tab.
136
+ * */
137
+ entityInfoTab?: boolean;
138
+ /**
139
+ * It is possible to show and hide the EntityRelations tab. **True** shows the tab. **False** hides the tab.
140
+ * */
141
+ entityRelationTab?: boolean;
142
+ /**
143
+ * This argument can be used to define active/open tab by initialisation. The following values can be used:
144
+ * "synonyms" | "hierarchy" | "crossref" | "ontology" | "graphview" | "depiction" | "entityinfo" |
145
+ * "entityrelations"
146
+ * */
147
+ initialSelectedTab?: string;
134
148
  };
135
149
  export type AutocompleteWidgetSelectedOptions = {
136
150
  /**
@@ -220,13 +234,13 @@ export type ColorObj = {
220
234
  };
221
235
  export type ColorFirstObj = {
222
236
  /**
223
- * Color of the first badge, can be primary, accent, success, warning, danger, ghost, text, subdued or a hex / rgb value
237
+ * Color of the first breadcrumb badge, can be primary, accent, success, warning, danger, ghost, text, subdued or a hex / rgb value
224
238
  */
225
239
  colorFirst?: EuiLinkColor | string;
226
240
  };
227
241
  export type ColorSecondObj = {
228
242
  /**
229
- * Color of the second badge, can be primary, accent, success, warning, danger, ghost, text, subdued or a hex / rgb value
243
+ * Color of the second breadcrumb badge, can be primary, accent, success, warning, danger, ghost, text, subdued or a hex / rgb value
230
244
  */
231
245
  colorSecond?: EuiLinkColor | string;
232
246
  };
@@ -244,7 +258,7 @@ export type BreadcrumbPresentationProps = OptionalOntologyIdObj & ColorFirstObj
244
258
  };
245
259
  export type DescTextObj = {
246
260
  /**
247
- * Set your own text manually that overwrites the text fetched from the API
261
+ * Set your own description text manually that overwrites the text fetched from the API
248
262
  */
249
263
  descText?: string;
250
264
  };
@@ -288,11 +302,44 @@ export type TabWidgetProps = TabSubwidgetsProps & TabList & OnNavigates & CssCla
288
302
  hierarchyKeepExpansionStates?: boolean;
289
303
  hierarchyShowSiblingsOnInit?: boolean;
290
304
  hierarchyWrap?: boolean;
305
+ /**
306
+ * When true, the graph will show the tree hierarchy for the target node in form of a graph.
307
+ */
308
+ rootWalk?: boolean;
309
+ /**
310
+ * When true, the graph shows the nodes in their hierarchy based on their position in the tree. It should be used with the rootWalk mode to true.
311
+ */
312
+ graphHierarchy?: boolean;
313
+ /**
314
+ * The edge label in the graph. Default is "is a". Only for sub-class predicators.
315
+ */
316
+ edgeLabel?: string;
317
+ /**
318
+ * Callback function for double clicking on a node in graph. The default behaviour is to expand the node.
319
+ * */
320
+ onNodeClick?: (iri: string) => void;
321
+ showHeader?: boolean;
322
+ showComparisonTitleInHeader?: boolean;
323
+ /**
324
+ * Prevent the graph to be rendered with full width (CSS width 100%).
325
+ * */
326
+ stopFullWidth?: boolean;
327
+ /**
328
+ * Show the input field for the targetIri in comparison mode.
329
+ */
330
+ enableComparisonMode?: boolean;
331
+ /**
332
+ * Hide the graph legend. Default is false/undefined
333
+ */
334
+ hideLegend?: boolean;
335
+ className?: string;
336
+ targetIri?: string;
291
337
  };
292
- export type TabPresentationProps = TabWidgetProps & CssClassNameObj & {
338
+ export type TabPresentationProps = TabWidgetProps & {
293
339
  data: Thing;
294
340
  isLoading?: boolean;
295
341
  error?: string | unknown;
342
+ onTargetIriChange?: (iri: string | undefined) => void;
296
343
  };
297
344
  export type EntityOntoListWidgetProps = TabSubwidgetsProps & ForcedOntologyIdObj & OnNavigateToOntology & CssClassNameObj;
298
345
  export type NavigateToOntologyProps = OnNavigateToOntology & OptionalEntityTypeObj & OptionalIriObj & {
@@ -379,19 +426,22 @@ export type HierarchyWidgetProps = CssClassNameObj & {
379
426
  apiKey?: string;
380
427
  backendType?: string;
381
428
  hierarchyWrap?: boolean;
429
+ /**
430
+ * If provided, a view comparing the hierarchies of iri and targetIri is shown.
431
+ */
382
432
  targetIri?: string;
383
433
  showHeader?: boolean;
384
434
  showComparisonTitleInHeader?: boolean;
385
435
  } & BuildHierarchyProps & HierarchyIriProp & OnNavigateToEntity & OnNavigateToOntology & ParameterObj;
386
436
  export type TitleTextObj = {
387
437
  /**
388
- * Set your own text manually that overwrites the text fetched from the API
438
+ * Set your own title text manually that overwrites the text fetched from the API
389
439
  */
390
440
  titleText?: string;
391
441
  };
392
442
  export type TitleWidgetProps = ApiObj & OptionalThingTypeObj & OptionalOntologyIdObj & OptionalIriObj & ParameterObj & UseLegacyObj & TitleTextObj & CssClassNameObj & {
393
443
  /**
394
- * Set the default text shown if the API fails to retrieve one.
444
+ * Set the default title text shown if the API fails to retrieve one.
395
445
  */
396
446
  defaultValue?: string;
397
447
  /**
@@ -412,11 +462,38 @@ export type TitlePresentationProps = TitleTextObj & CssClassNameObj & OptionalTh
412
462
  onNavigateTo?: (iri: string, ontologyId: string, thingType: string) => void;
413
463
  href?: string;
414
464
  };
415
- export type MetadataWidgetProps = TabWidgetProps & CssClassNameObj & {
465
+ export type MetadataWidgetProps = TabWidgetProps & CssClassNameObj & ColorFirstObj & ColorSecondObj & DescTextObj & TitleTextObj & {
416
466
  /**
417
467
  * 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.
418
468
  */
419
469
  termLink?: string;
470
+ /**
471
+ * Set the default title text shown if the API fails to retrieve one.
472
+ */
473
+ defaultValue?: string;
474
+ /**
475
+ * Set your own text manually, which will show as a clickable link instead of the IRI.
476
+ */
477
+ iriText?: string;
478
+ /**
479
+ * Indicates that the target iri is external and needs an icon.
480
+ */
481
+ externalIcon?: boolean;
482
+ /**
483
+ * The iri should get appended to the urlPrefix or not. When provided, the iri gets encoded and appended to the urlPrefix.
484
+ */
485
+ urlPrefix?: string;
486
+ /**
487
+ * Position a copy to clipboard button for the iri link. 'none' or not providing the option means hiding the button.
488
+ * left/right means showing the button on the left or right side of the iri link.
489
+ */
490
+ copyButton?: "right" | "left" | "none";
491
+ /**
492
+ * Show the input field for the targetIri in comparison mode.
493
+ */
494
+ enableComparisonMode?: boolean;
495
+ showHeader?: boolean;
496
+ showComparisonTitleInHeader?: boolean;
420
497
  };
421
498
  export type OntologyInfoWidgetProps = ApiObj & ForcedOntologyIdObj & HasTitleObj & ShowBadgesObj & ParameterObj & UseLegacyObj & ContainerWidthObj & OnNavigates & CssClassNameObj;
422
499
  export type ResourcesWidgetProps = ApiObj & ParameterObj & UseLegacyObj & CssClassNameObj & {
@@ -564,4 +641,10 @@ export type OlsGraphEdge = {
564
641
  source?: string;
565
642
  target?: string;
566
643
  };
644
+ export type ComparisonInputProps = {
645
+ entityLabel?: string;
646
+ onTargetIriChange: (iri: string | undefined) => void;
647
+ initialTargetIri?: string;
648
+ className?: string;
649
+ };
567
650
  export {};
@@ -1,4 +1,5 @@
1
1
  export declare const MetadataWidgetStoryArgTypes: {
2
+ graphHierarchy: import('storybook/internal/csf').InputType;
2
3
  hierarchyShowSiblingsOnInit: {
3
4
  required: boolean;
4
5
  description: string;
@@ -85,6 +86,8 @@ export declare const MetadataWidgetStoryArgs: {
85
86
  readonly onNavigateToDisambiguate: "Console message";
86
87
  readonly hierarchyWrap: false;
87
88
  readonly parameter: "";
89
+ readonly showHeader: true;
90
+ readonly className: "ts4nfdi-metadata-style";
88
91
  };
89
92
  export declare const MetadataWidget1Args: {
90
93
  readonly api: "https://semanticlookup.zbmed.de/ols/api/";
@@ -92,6 +95,7 @@ export declare const MetadataWidget1Args: {
92
95
  readonly iri: "http://purl.obolibrary.org/obo/UBERON_0001443";
93
96
  readonly entityType: "term";
94
97
  readonly hierarchyWrap: true;
98
+ readonly copyButton: "right";
95
99
  };
96
100
  export declare const OLS3Args: {
97
101
  readonly api: "https://ols3-semanticlookup.zbmed.de/ols/api/";
@@ -112,6 +116,7 @@ export declare const OLS4V2Args: {
112
116
  readonly entityType: "term";
113
117
  readonly useLegacy: false;
114
118
  readonly parameter: "";
119
+ readonly initialSelectedTab: "ontology";
115
120
  };
116
121
  export declare const SelectingDefiningOntologyArgs: {
117
122
  readonly api: "https://www.ebi.ac.uk/ols4/api/";
@@ -143,6 +148,8 @@ export declare const HiddenTabsArgs: {
143
148
  readonly terminologyInfoTab: false;
144
149
  readonly graphViewTab: false;
145
150
  readonly termDepictionTab: false;
151
+ readonly entityRelationTab: false;
152
+ readonly entityInfoTab: false;
146
153
  };
147
154
  export declare const TermAsLinkArgs: {
148
155
  readonly api: "https://www.ebi.ac.uk/ols4/api/";
@@ -150,6 +157,19 @@ export declare const TermAsLinkArgs: {
150
157
  readonly ontologyId: "efo";
151
158
  readonly termLink: "https://www.ebi.ac.uk/ols4/ontologies/efo/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FHP_0000819";
152
159
  };
160
+ export declare const ShowComparisonInputFieldArgs: {
161
+ readonly api: "https://www.ebi.ac.uk/ols4/api/";
162
+ readonly ontologyId: "chebi";
163
+ readonly iri: "http://purl.obolibrary.org/obo/CHEBI_27594";
164
+ readonly entityType: "term";
165
+ readonly hierarchyWrap: true;
166
+ readonly copyButton: "right";
167
+ readonly enableComparisonMode: true;
168
+ readonly showComparisonTitleInHeader: true;
169
+ readonly targetIri: "http://purl.obolibrary.org/obo/CHEBI_18248";
170
+ readonly rootWalk: true;
171
+ readonly graphHierarchy: true;
172
+ };
153
173
  export declare const commonMetadataWidgetPlay: ({ canvasElement, }: {
154
174
  canvasElement: HTMLElement;
155
175
  }) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { ComparisonInputProps } from '../../../../../app';
2
+ export declare function ComparisonInput({ entityLabel, onTargetIriChange, initialTargetIri, className, }: ComparisonInputProps): import("react/jsx-runtime").JSX.Element;
@@ -99,6 +99,10 @@ export declare const HiddenTabsArgs: {
99
99
  readonly hierarchyTab: false;
100
100
  readonly crossRefTab: false;
101
101
  readonly terminologyInfoTab: false;
102
+ readonly graphViewTab: false;
103
+ readonly termDepictionTab: false;
104
+ readonly entityRelationTab: false;
105
+ readonly entityInfoTab: false;
102
106
  };
103
107
  export declare const commonTabWidgetPlay: ({ canvasElement, }: {
104
108
  canvasElement: HTMLElement;
@@ -25,3 +25,4 @@ export default meta;
25
25
  type Story = StoryObj<typeof meta>;
26
26
  export declare const TermDepictionWidgetExample: Story;
27
27
  export declare const TermDepictionWidget3D: Story;
28
+ export declare const OntologyIriAsId: Story;
@@ -19,6 +19,12 @@ export declare const TermDepictionWidget3DArgs: {
19
19
  ontologyId: string;
20
20
  useLegacy: boolean;
21
21
  };
22
+ export declare const OntologyIriAsIdArgs: {
23
+ api: string;
24
+ iri: string;
25
+ ontologyId: string;
26
+ useLegacy: boolean;
27
+ };
22
28
  export declare const commonTermDepictionWidgetPlay: ({ canvasElement, }: {
23
29
  canvasElement: HTMLElement;
24
30
  }) => Promise<void>;