@ts4nfdi/terminology-service-suite 5.4.1 → 5.5.1

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 (503) hide show
  1. package/dist/esm/api/OntoPortalApi.js +151 -0
  2. package/dist/esm/api/OntoPortalApi.js.map +1 -0
  3. package/dist/esm/api/SkosApi.js +187 -0
  4. package/dist/esm/api/SkosApi.js.map +1 -0
  5. package/dist/esm/api/ols/OlsBaseApi.d.ts +6 -0
  6. package/dist/esm/api/ols/OlsBaseApi.js +24 -0
  7. package/dist/esm/api/ols/OlsBaseApi.js.map +1 -0
  8. package/dist/esm/api/ols/OlsEntityApi.d.ts +82 -0
  9. package/dist/esm/api/ols/OlsEntityApi.js +232 -0
  10. package/dist/esm/api/ols/OlsEntityApi.js.map +1 -0
  11. package/dist/esm/api/ols/OlsHierarchyApi.d.ts +38 -0
  12. package/dist/esm/api/ols/OlsHierarchyApi.js +469 -0
  13. package/dist/esm/api/ols/OlsHierarchyApi.js.map +1 -0
  14. package/dist/esm/api/ols/OlsOntologyApi.d.ts +22 -0
  15. package/dist/esm/api/ols/OlsOntologyApi.js +78 -0
  16. package/dist/esm/api/ols/OlsOntologyApi.js.map +1 -0
  17. package/dist/esm/api/ols/OlsSearchApi.d.ts +17 -0
  18. package/dist/esm/api/ols/OlsSearchApi.js +66 -0
  19. package/dist/esm/api/ols/OlsSearchApi.js.map +1 -0
  20. package/dist/esm/api/ols/OlsThingApi.d.ts +11 -0
  21. package/dist/esm/api/ols/OlsThingApi.js +59 -0
  22. package/dist/esm/api/ols/OlsThingApi.js.map +1 -0
  23. package/dist/esm/{types/app → app}/types.d.ts +11 -4
  24. package/dist/esm/app/util.js +134 -0
  25. package/dist/esm/app/util.js.map +1 -0
  26. package/dist/esm/{types/app → app}/widgetDescriptions.d.ts +1 -0
  27. package/dist/esm/{types/components → components}/index.d.ts +1 -0
  28. package/dist/esm/components/server/BreadcrumbData.d.ts +9 -0
  29. package/dist/esm/components/server/BreadcrumbData.js +13 -0
  30. package/dist/esm/components/server/BreadcrumbData.js.map +1 -0
  31. package/dist/esm/components/server/index.d.ts +1 -0
  32. package/dist/esm/components/widgets/AutocompleteWidget/AutocompleteWidget.js +373 -0
  33. package/dist/esm/components/widgets/AutocompleteWidget/AutocompleteWidget.js.map +1 -0
  34. package/dist/esm/components/widgets/DataContentWidget/DataContentWidget.js +49 -0
  35. package/dist/esm/components/widgets/DataContentWidget/DataContentWidget.js.map +1 -0
  36. package/dist/esm/components/widgets/EntityInfoWidget/EntityInfoWidget.js +310 -0
  37. package/dist/esm/components/widgets/EntityInfoWidget/EntityInfoWidget.js.map +1 -0
  38. package/dist/esm/components/widgets/EntityRelationsWidget/EntityRelationsWidget.js +363 -0
  39. package/dist/esm/components/widgets/EntityRelationsWidget/EntityRelationsWidget.js.map +1 -0
  40. package/dist/esm/components/widgets/GraphViewWidget/GraphViewWidget.js +395 -0
  41. package/dist/esm/components/widgets/GraphViewWidget/GraphViewWidget.js.map +1 -0
  42. package/dist/esm/components/widgets/JsonApiWidget/JsonApiWidget.js +22 -0
  43. package/dist/esm/components/widgets/JsonApiWidget/JsonApiWidget.js.map +1 -0
  44. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.d.ts +6 -0
  45. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.js +41 -0
  46. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.js.map +1 -0
  47. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.stories.d.ts +107 -0
  48. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationHTML.stories.d.ts +107 -0
  49. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationStories.d.ts +111 -0
  50. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.js +49 -0
  51. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.js.map +1 -0
  52. package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetStories.d.ts +16 -0
  53. package/dist/esm/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +2 -0
  54. package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.js +21 -0
  55. package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.js.map +1 -0
  56. package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.js +29 -0
  57. package/dist/esm/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.js.map +1 -0
  58. package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.js +39 -0
  59. package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.js.map +1 -0
  60. package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.js +54 -0
  61. package/dist/esm/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.js.map +1 -0
  62. package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.js +39 -0
  63. package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.js.map +1 -0
  64. package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.js +59 -0
  65. package/dist/esm/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.js.map +1 -0
  66. package/dist/esm/components/widgets/MetadataWidget/IriWidget/IriWidget.js +54 -0
  67. package/dist/esm/components/widgets/MetadataWidget/IriWidget/IriWidget.js.map +1 -0
  68. package/dist/esm/components/widgets/MetadataWidget/MetadataWidget.js +93 -0
  69. package/dist/esm/components/widgets/MetadataWidget/MetadataWidget.js.map +1 -0
  70. package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.js +25 -0
  71. package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.js.map +1 -0
  72. package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.js +41 -0
  73. package/dist/esm/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.js.map +1 -0
  74. package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.js +26 -0
  75. package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.js.map +1 -0
  76. package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.js +36 -0
  77. package/dist/esm/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.js.map +1 -0
  78. package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.d.ts +0 -7
  79. package/dist/esm/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.js +168 -0
  80. package/dist/esm/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.js.map +1 -0
  81. package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabPresentation.js +91 -0
  82. package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabPresentation.js.map +1 -0
  83. package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabWidget.js +36 -0
  84. package/dist/esm/components/widgets/MetadataWidget/TabWidget/TabWidget.js.map +1 -0
  85. package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.js +38 -0
  86. package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.js.map +1 -0
  87. package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitleWidget.js +29 -0
  88. package/dist/esm/components/widgets/MetadataWidget/TitleWidget/TitleWidget.js.map +1 -0
  89. package/dist/esm/components/widgets/OntologyInfoWidget/OntologyInfoWidget.js +98 -0
  90. package/dist/esm/components/widgets/OntologyInfoWidget/OntologyInfoWidget.js.map +1 -0
  91. package/dist/esm/components/widgets/ResourcesWidget/ResourcesWidget.js +285 -0
  92. package/dist/esm/components/widgets/ResourcesWidget/ResourcesWidget.js.map +1 -0
  93. package/dist/esm/components/widgets/SearchBarWidget/SearchBarWidget.js +84 -0
  94. package/dist/esm/components/widgets/SearchBarWidget/SearchBarWidget.js.map +1 -0
  95. package/dist/esm/components/widgets/SearchResultsListWidget/MetadataCompact.js +80 -0
  96. package/dist/esm/components/widgets/SearchResultsListWidget/MetadataCompact.js.map +1 -0
  97. package/dist/esm/components/widgets/SearchResultsListWidget/SearchResultsListWidget.js +224 -0
  98. package/dist/esm/components/widgets/SearchResultsListWidget/SearchResultsListWidget.js.map +1 -0
  99. package/dist/esm/components/widgets/TermDepictionWidget/TermDepictionWidget.js +44 -0
  100. package/dist/esm/components/widgets/TermDepictionWidget/TermDepictionWidget.js.map +1 -0
  101. package/dist/esm/{types/components → components}/widgets/index.d.ts +2 -1
  102. package/dist/esm/components/widgets/index.js +73 -0
  103. package/dist/esm/components/widgets/index.js.map +1 -0
  104. package/dist/esm/index.css +1 -1
  105. package/dist/esm/index.js +25 -6325
  106. package/dist/esm/index.js.map +1 -1
  107. package/dist/esm/model/LinkedEntities.js +32 -0
  108. package/dist/esm/model/LinkedEntities.js.map +1 -0
  109. package/dist/esm/model/ModelObjectCreator.js +100 -0
  110. package/dist/esm/model/ModelObjectCreator.js.map +1 -0
  111. package/dist/esm/model/ModelTypeCheck.js +57 -0
  112. package/dist/esm/model/ModelTypeCheck.js.map +1 -0
  113. package/dist/esm/model/Reified.js +57 -0
  114. package/dist/esm/model/Reified.js.map +1 -0
  115. package/dist/esm/model/StructureRendering.js +524 -0
  116. package/dist/esm/model/StructureRendering.js.map +1 -0
  117. package/dist/esm/model/interfaces/Hierarchy.js +155 -0
  118. package/dist/esm/model/interfaces/Hierarchy.js.map +1 -0
  119. package/dist/esm/model/ols-model/OLSSelect.js +12 -0
  120. package/dist/esm/model/ols-model/OLSSelect.js.map +1 -0
  121. package/dist/esm/model/ols-model/OLSSelectResult.js +57 -0
  122. package/dist/esm/model/ols-model/OLSSelectResult.js.map +1 -0
  123. package/dist/esm/model/ols3-model/OLS3Class.js +38 -0
  124. package/dist/esm/model/ols3-model/OLS3Class.js.map +1 -0
  125. package/dist/esm/model/ols3-model/OLS3Entity.js +125 -0
  126. package/dist/esm/model/ols3-model/OLS3Entity.js.map +1 -0
  127. package/dist/esm/model/ols3-model/OLS3Individual.js +36 -0
  128. package/dist/esm/model/ols3-model/OLS3Individual.js.map +1 -0
  129. package/dist/esm/model/ols3-model/OLS3Ontologies.js +24 -0
  130. package/dist/esm/model/ols3-model/OLS3Ontologies.js.map +1 -0
  131. package/dist/esm/model/ols3-model/OLS3Ontology.js +132 -0
  132. package/dist/esm/model/ols3-model/OLS3Ontology.js.map +1 -0
  133. package/dist/esm/model/ols3-model/OLS3Property.js +36 -0
  134. package/dist/esm/model/ols3-model/OLS3Property.js.map +1 -0
  135. package/dist/esm/model/ols3-model/OLS3Thing.js +73 -0
  136. package/dist/esm/model/ols3-model/OLS3Thing.js.map +1 -0
  137. package/dist/esm/model/ols4-model/OLS4Class.js +27 -0
  138. package/dist/esm/model/ols4-model/OLS4Class.js.map +1 -0
  139. package/dist/esm/model/ols4-model/OLS4Entity.js +154 -0
  140. package/dist/esm/model/ols4-model/OLS4Entity.js.map +1 -0
  141. package/dist/esm/model/ols4-model/OLS4Individual.js +33 -0
  142. package/dist/esm/model/ols4-model/OLS4Individual.js.map +1 -0
  143. package/dist/esm/model/ols4-model/OLS4Ontologies.js +24 -0
  144. package/dist/esm/model/ols4-model/OLS4Ontologies.js.map +1 -0
  145. package/dist/esm/model/ols4-model/OLS4Ontology.js +118 -0
  146. package/dist/esm/model/ols4-model/OLS4Ontology.js.map +1 -0
  147. package/dist/esm/model/ols4-model/OLS4Property.js +33 -0
  148. package/dist/esm/model/ols4-model/OLS4Property.js.map +1 -0
  149. package/dist/esm/model/ols4-model/OLS4Thing.js +104 -0
  150. package/dist/esm/model/ols4-model/OLS4Thing.js.map +1 -0
  151. package/dist/esm/model/ts4nfdi-model/Ts4nfdiSearchResult.js +57 -0
  152. package/dist/esm/model/ts4nfdi-model/Ts4nfdiSearchResult.js.map +1 -0
  153. package/dist/esm/{types/stories → stories}/storyArgs.d.ts +6 -1
  154. package/dist/esm/utils/olsApiTypes.d.ts +54 -0
  155. package/dist/esm/utils/olsApiUtils.d.ts +15 -0
  156. package/dist/esm/utils/olsApiUtils.js +140 -0
  157. package/dist/esm/utils/olsApiUtils.js.map +1 -0
  158. package/dist/server/32px.png +0 -0
  159. package/dist/server/api/HierarchyBuilder.d.ts +26 -0
  160. package/dist/server/api/OntoPortalApi.d.ts +11 -0
  161. package/dist/server/api/SkosApi.d.ts +10 -0
  162. package/dist/server/api/ols/OlsBaseApi.d.ts +6 -0
  163. package/dist/server/api/ols/OlsEntityApi.d.ts +82 -0
  164. package/dist/server/api/ols/OlsHierarchyApi.d.ts +38 -0
  165. package/dist/server/api/ols/OlsOntologyApi.d.ts +22 -0
  166. package/dist/server/api/ols/OlsSearchApi.d.ts +17 -0
  167. package/dist/server/api/ols/OlsThingApi.d.ts +11 -0
  168. package/dist/server/app/globals.d.ts +9 -0
  169. package/dist/server/app/index.d.ts +1 -0
  170. package/dist/server/app/types.d.ts +533 -0
  171. package/dist/server/app/util.d.ts +44 -0
  172. package/dist/server/app/widgetDescriptions.d.ts +23 -0
  173. package/dist/server/components/index.d.ts +2 -0
  174. package/dist/server/components/server/BreadcrumbData.d.ts +9 -0
  175. package/dist/server/components/server/index.d.ts +1 -0
  176. package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidget.d.ts +10 -0
  177. package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidget.stories.d.ts +119 -0
  178. package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidgetHTML.stories.d.ts +121 -0
  179. package/dist/server/components/widgets/AutocompleteWidget/AutocompleteWidgetStories.d.ts +274 -0
  180. package/dist/server/components/widgets/AutocompleteWidget/index.d.ts +1 -0
  181. package/dist/server/components/widgets/DataContentWidget/DataContentWidget.d.ts +5 -0
  182. package/dist/server/components/widgets/DataContentWidget/DataContentWidget.stories.d.ts +42 -0
  183. package/dist/server/components/widgets/DataContentWidget/DataContentWidgetHTML.stories.d.ts +44 -0
  184. package/dist/server/components/widgets/DataContentWidget/DataContentWidgetStories.d.ts +45 -0
  185. package/dist/server/components/widgets/DataContentWidget/index.d.ts +1 -0
  186. package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidget.d.ts +5 -0
  187. package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidget.stories.d.ts +187 -0
  188. package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidgetHTML.stories.d.ts +186 -0
  189. package/dist/server/components/widgets/EntityInfoWidget/EntityInfoWidgetStories.d.ts +250 -0
  190. package/dist/server/components/widgets/EntityInfoWidget/index.d.ts +1 -0
  191. package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidget.d.ts +5 -0
  192. package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidget.stories.d.ts +176 -0
  193. package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidgetHTML.stories.d.ts +175 -0
  194. package/dist/server/components/widgets/EntityRelationsWidget/EntityRelationsWidgetStories.d.ts +248 -0
  195. package/dist/server/components/widgets/EntityRelationsWidget/index.d.ts +1 -0
  196. package/dist/server/components/widgets/GraphViewWidget/GraphViewWidget.d.ts +6 -0
  197. package/dist/server/components/widgets/GraphViewWidget/GraphViewWidget.stories.d.ts +65 -0
  198. package/dist/server/components/widgets/GraphViewWidget/GraphViewWidgetHTML.stories.d.ts +68 -0
  199. package/dist/server/components/widgets/GraphViewWidget/GraphViewWidgetStories.d.ts +126 -0
  200. package/dist/server/components/widgets/GraphViewWidget/index.d.ts +1 -0
  201. package/dist/server/components/widgets/JsonApiWidget/JsonApiWidget.d.ts +5 -0
  202. package/dist/server/components/widgets/JsonApiWidget/JsonApiWidget.stories.d.ts +52 -0
  203. package/dist/server/components/widgets/JsonApiWidget/JsonApiWidgetHTML.stories.d.ts +54 -0
  204. package/dist/server/components/widgets/JsonApiWidget/JsonApiWidgetStories.d.ts +44 -0
  205. package/dist/server/components/widgets/JsonApiWidget/index.d.ts +1 -0
  206. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.d.ts +6 -0
  207. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentation.stories.d.ts +107 -0
  208. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationHTML.stories.d.ts +107 -0
  209. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation/BreadcrumbPresentationStories.d.ts +111 -0
  210. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.d.ts +5 -0
  211. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.stories.d.ts +143 -0
  212. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetHTML.stories.d.ts +143 -0
  213. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetStories.d.ts +198 -0
  214. package/dist/server/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +2 -0
  215. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.d.ts +5 -0
  216. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.d.ts +5 -0
  217. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.stories.d.ts +123 -0
  218. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetHTML.stories.d.ts +126 -0
  219. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetStories.d.ts +141 -0
  220. package/dist/server/components/widgets/MetadataWidget/DescriptionWidget/index.d.ts +1 -0
  221. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.d.ts +5 -0
  222. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.d.ts +6 -0
  223. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.stories.d.ts +115 -0
  224. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetHTML.stories.d.ts +115 -0
  225. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetStories.d.ts +120 -0
  226. package/dist/server/components/widgets/MetadataWidget/EntityDefinedByWidget/index.d.ts +1 -0
  227. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.d.ts +5 -0
  228. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.d.ts +6 -0
  229. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.stories.d.ts +115 -0
  230. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetHTML.stories.d.ts +115 -0
  231. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetStories.d.ts +127 -0
  232. package/dist/server/components/widgets/MetadataWidget/EntityOntoListWidget/index.d.ts +1 -0
  233. package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidget.d.ts +6 -0
  234. package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidget.stories.d.ts +90 -0
  235. package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidgetHTML.stories.d.ts +93 -0
  236. package/dist/server/components/widgets/MetadataWidget/IriWidget/IriWidgetStories.d.ts +98 -0
  237. package/dist/server/components/widgets/MetadataWidget/IriWidget/index.d.ts +1 -0
  238. package/dist/server/components/widgets/MetadataWidget/MetadataWidget.d.ts +7 -0
  239. package/dist/server/components/widgets/MetadataWidget/MetadataWidget.stories.d.ts +171 -0
  240. package/dist/server/components/widgets/MetadataWidget/MetadataWidgetHTML.stories.d.ts +170 -0
  241. package/dist/server/components/widgets/MetadataWidget/MetadataWidgetStories.d.ts +238 -0
  242. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.d.ts +5 -0
  243. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.d.ts +5 -0
  244. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +102 -0
  245. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetHTML.stories.d.ts +105 -0
  246. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetStories.d.ts +111 -0
  247. package/dist/server/components/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/index.d.ts +1 -0
  248. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.d.ts +5 -0
  249. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.d.ts +5 -0
  250. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +88 -0
  251. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidgetHTML.stories.d.ts +91 -0
  252. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts +98 -0
  253. package/dist/server/components/widgets/MetadataWidget/TabWidget/CrossRefWidget/index.d.ts +1 -0
  254. package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.d.ts +7 -0
  255. package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.stories.d.ts +198 -0
  256. package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetStories.d.ts +303 -0
  257. package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetsHTML.stories.d.ts +197 -0
  258. package/dist/server/components/widgets/MetadataWidget/TabWidget/HierarchyWidget/index.d.ts +1 -0
  259. package/dist/server/components/widgets/MetadataWidget/TabWidget/TabPresentation.d.ts +5 -0
  260. package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidget.d.ts +5 -0
  261. package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidget.stories.d.ts +130 -0
  262. package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidgetHTML.stories.d.ts +133 -0
  263. package/dist/server/components/widgets/MetadataWidget/TabWidget/TabWidgetStories.d.ts +192 -0
  264. package/dist/server/components/widgets/MetadataWidget/TabWidget/index.d.ts +4 -0
  265. package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitlePresentation.d.ts +5 -0
  266. package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidget.d.ts +5 -0
  267. package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidget.stories.d.ts +134 -0
  268. package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidgetHTML.stories.d.ts +137 -0
  269. package/dist/server/components/widgets/MetadataWidget/TitleWidget/TitleWidgetStories.d.ts +214 -0
  270. package/dist/server/components/widgets/MetadataWidget/TitleWidget/index.d.ts +1 -0
  271. package/dist/server/components/widgets/MetadataWidget/index.d.ts +8 -0
  272. package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidget.d.ts +6 -0
  273. package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidget.stories.d.ts +165 -0
  274. package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidgetHTML.stories.d.ts +163 -0
  275. package/dist/server/components/widgets/OntologyInfoWidget/OntologyInfoWidgetStories.d.ts +175 -0
  276. package/dist/server/components/widgets/OntologyInfoWidget/index.d.ts +1 -0
  277. package/dist/server/components/widgets/ResourcesWidget/ResourcesWidget.d.ts +6 -0
  278. package/dist/server/components/widgets/ResourcesWidget/ResourcesWidget.stories.d.ts +137 -0
  279. package/dist/server/components/widgets/ResourcesWidget/ResourcesWidgetHTML.stories.d.ts +139 -0
  280. package/dist/server/components/widgets/ResourcesWidget/ResourcesWidgetStories.d.ts +175 -0
  281. package/dist/server/components/widgets/ResourcesWidget/index.d.ts +1 -0
  282. package/dist/server/components/widgets/SearchBarWidget/SearchBarWidget.d.ts +5 -0
  283. package/dist/server/components/widgets/SearchBarWidget/SearchBarWidget.stories.d.ts +59 -0
  284. package/dist/server/components/widgets/SearchBarWidget/SearchBarWidgetHTML.stories.d.ts +62 -0
  285. package/dist/server/components/widgets/SearchBarWidget/SearchBarWidgetStories.d.ts +69 -0
  286. package/dist/server/components/widgets/SearchBarWidget/index.d.ts +1 -0
  287. package/dist/server/components/widgets/SearchResultsListWidget/MetadataCompact.d.ts +4 -0
  288. package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidget.d.ts +6 -0
  289. package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidget.stories.d.ts +101 -0
  290. package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidgetHTML.stories.d.ts +104 -0
  291. package/dist/server/components/widgets/SearchResultsListWidget/SearchResultsListWidgetStories.d.ts +140 -0
  292. package/dist/server/components/widgets/SearchResultsListWidget/index.d.ts +1 -0
  293. package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidget.d.ts +6 -0
  294. package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidget.stories.d.ts +63 -0
  295. package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidgetHTML.stories.d.ts +65 -0
  296. package/dist/server/components/widgets/TermDepictionWidget/TermDepictionWidgetStories.d.ts +64 -0
  297. package/dist/server/components/widgets/TermDepictionWidget/index.d.ts +1 -0
  298. package/dist/server/components/widgets/index.d.ts +36 -0
  299. package/dist/server/index.css +1 -0
  300. package/dist/server/index.d.ts +2 -0
  301. package/dist/server/index.js +1439 -0
  302. package/dist/server/index.js.map +1 -0
  303. package/dist/server/model/LinkedEntities.d.ts +18 -0
  304. package/dist/server/model/ModelObjectCreator.d.ts +10 -0
  305. package/dist/server/model/ModelTypeCheck.d.ts +24 -0
  306. package/dist/server/model/Reified.d.ts +8 -0
  307. package/dist/server/model/StructureRendering.d.ts +69 -0
  308. package/dist/server/model/Suggest.d.ts +7 -0
  309. package/dist/server/model/interfaces/Class.d.ts +6 -0
  310. package/dist/server/model/interfaces/Entity.d.ts +30 -0
  311. package/dist/server/model/interfaces/Hierarchy.d.ts +65 -0
  312. package/dist/server/model/interfaces/Individual.d.ts +6 -0
  313. package/dist/server/model/interfaces/Ontologies.d.ts +9 -0
  314. package/dist/server/model/interfaces/Ontology.d.ts +28 -0
  315. package/dist/server/model/interfaces/Property.d.ts +9 -0
  316. package/dist/server/model/interfaces/Select.d.ts +5 -0
  317. package/dist/server/model/interfaces/SelectResult.d.ts +13 -0
  318. package/dist/server/model/interfaces/Thing.d.ts +22 -0
  319. package/dist/server/model/interfaces/index.d.ts +7 -0
  320. package/dist/server/model/ols-model/OLSSelect.d.ts +7 -0
  321. package/dist/server/model/ols-model/OLSSelectResult.d.ts +15 -0
  322. package/dist/server/model/ols3-model/OLS3Class.d.ts +14 -0
  323. package/dist/server/model/ols3-model/OLS3Entity.d.ts +40 -0
  324. package/dist/server/model/ols3-model/OLS3Individual.d.ts +13 -0
  325. package/dist/server/model/ols3-model/OLS3Ontologies.d.ts +11 -0
  326. package/dist/server/model/ols3-model/OLS3Ontology.d.ts +40 -0
  327. package/dist/server/model/ols3-model/OLS3Property.d.ts +15 -0
  328. package/dist/server/model/ols3-model/OLS3Thing.d.ts +24 -0
  329. package/dist/server/model/ols3-model/index.d.ts +7 -0
  330. package/dist/server/model/ols4-model/OLS4Class.d.ts +11 -0
  331. package/dist/server/model/ols4-model/OLS4Entity.d.ts +32 -0
  332. package/dist/server/model/ols4-model/OLS4Individual.d.ts +11 -0
  333. package/dist/server/model/ols4-model/OLS4Ontologies.d.ts +11 -0
  334. package/dist/server/model/ols4-model/OLS4Ontology.d.ts +30 -0
  335. package/dist/server/model/ols4-model/OLS4Property.d.ts +13 -0
  336. package/dist/server/model/ols4-model/OLS4Thing.d.ts +24 -0
  337. package/dist/server/model/ols4-model/index.d.ts +7 -0
  338. package/dist/server/model/ts4nfdi-model/Ts4nfdiSearchResult.d.ts +15 -0
  339. package/dist/server/stories/storyArgs.d.ts +767 -0
  340. package/dist/server/utils/olsApiTypes.d.ts +54 -0
  341. package/dist/server/utils/olsApiUtils.d.ts +15 -0
  342. package/package.json +18 -2
  343. package/dist/esm/types/api/OlsApi.d.ts +0 -202
  344. package/dist/esm/types/components/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbPresentation.d.ts +0 -5
  345. package/dist/esm/types/components/widgets/MetadataWidget/BreadcrumbWidget/index.d.ts +0 -1
  346. /package/dist/esm/{types/api → api}/HierarchyBuilder.d.ts +0 -0
  347. /package/dist/esm/{types/api → api}/OntoPortalApi.d.ts +0 -0
  348. /package/dist/esm/{types/api → api}/SkosApi.d.ts +0 -0
  349. /package/dist/esm/{types/app → app}/globals.d.ts +0 -0
  350. /package/dist/esm/{types/app → app}/index.d.ts +0 -0
  351. /package/dist/esm/{types/app → app}/util.d.ts +0 -0
  352. /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidget.d.ts +0 -0
  353. /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidget.stories.d.ts +0 -0
  354. /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidgetHTML.stories.d.ts +0 -0
  355. /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/AutocompleteWidgetStories.d.ts +0 -0
  356. /package/dist/esm/{types/components → components}/widgets/AutocompleteWidget/index.d.ts +0 -0
  357. /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidget.d.ts +0 -0
  358. /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidget.stories.d.ts +0 -0
  359. /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidgetHTML.stories.d.ts +0 -0
  360. /package/dist/esm/{types/components → components}/widgets/DataContentWidget/DataContentWidgetStories.d.ts +0 -0
  361. /package/dist/esm/{types/components → components}/widgets/DataContentWidget/index.d.ts +0 -0
  362. /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidget.d.ts +0 -0
  363. /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidget.stories.d.ts +0 -0
  364. /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidgetHTML.stories.d.ts +0 -0
  365. /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/EntityInfoWidgetStories.d.ts +0 -0
  366. /package/dist/esm/{types/components → components}/widgets/EntityInfoWidget/index.d.ts +0 -0
  367. /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidget.d.ts +0 -0
  368. /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidget.stories.d.ts +0 -0
  369. /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidgetHTML.stories.d.ts +0 -0
  370. /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/EntityRelationsWidgetStories.d.ts +0 -0
  371. /package/dist/esm/{types/components → components}/widgets/EntityRelationsWidget/index.d.ts +0 -0
  372. /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidget.d.ts +0 -0
  373. /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidget.stories.d.ts +0 -0
  374. /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidgetHTML.stories.d.ts +0 -0
  375. /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/GraphViewWidgetStories.d.ts +0 -0
  376. /package/dist/esm/{types/components → components}/widgets/GraphViewWidget/index.d.ts +0 -0
  377. /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidget.d.ts +0 -0
  378. /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidget.stories.d.ts +0 -0
  379. /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidgetHTML.stories.d.ts +0 -0
  380. /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/JsonApiWidgetStories.d.ts +0 -0
  381. /package/dist/esm/{types/components → components}/widgets/JsonApiWidget/index.d.ts +0 -0
  382. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.d.ts +0 -0
  383. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidget.stories.d.ts +0 -0
  384. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/BreadcrumbWidget/BreadcrumbWidgetHTML.stories.d.ts +0 -0
  385. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionPresentation.d.ts +0 -0
  386. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.d.ts +0 -0
  387. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.stories.d.ts +0 -0
  388. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetHTML.stories.d.ts +0 -0
  389. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/DescriptionWidgetStories.d.ts +0 -0
  390. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/DescriptionWidget/index.d.ts +0 -0
  391. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByPresentation.d.ts +0 -0
  392. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.d.ts +0 -0
  393. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidget.stories.d.ts +0 -0
  394. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetHTML.stories.d.ts +0 -0
  395. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/EntityDefinedByWidgetStories.d.ts +0 -0
  396. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityDefinedByWidget/index.d.ts +0 -0
  397. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListPresentation.d.ts +0 -0
  398. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.d.ts +0 -0
  399. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidget.stories.d.ts +0 -0
  400. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetHTML.stories.d.ts +0 -0
  401. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/EntityOntoListWidgetStories.d.ts +0 -0
  402. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/EntityOntoListWidget/index.d.ts +0 -0
  403. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidget.d.ts +0 -0
  404. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidget.stories.d.ts +0 -0
  405. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidgetHTML.stories.d.ts +0 -0
  406. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/IriWidgetStories.d.ts +0 -0
  407. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/IriWidget/index.d.ts +0 -0
  408. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidget.d.ts +0 -0
  409. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidget.stories.d.ts +0 -0
  410. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidgetHTML.stories.d.ts +0 -0
  411. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/MetadataWidgetStories.d.ts +0 -0
  412. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabPresentation.d.ts +0 -0
  413. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.d.ts +0 -0
  414. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidget.stories.d.ts +0 -0
  415. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetHTML.stories.d.ts +0 -0
  416. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/AlternativeNameTabWidgetStories.d.ts +0 -0
  417. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/AlternativeNameTabWidget/index.d.ts +0 -0
  418. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabPresentation.d.ts +0 -0
  419. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.d.ts +0 -0
  420. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidget.stories.d.ts +0 -0
  421. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefTabWidgetHTML.stories.d.ts +0 -0
  422. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/CrossRefWidgetStories.d.ts +0 -0
  423. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/CrossRefWidget/index.d.ts +0 -0
  424. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidget.stories.d.ts +0 -0
  425. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetStories.d.ts +0 -0
  426. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/HierarchyWidgetsHTML.stories.d.ts +0 -0
  427. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/HierarchyWidget/index.d.ts +0 -0
  428. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabPresentation.d.ts +0 -0
  429. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidget.d.ts +0 -0
  430. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidget.stories.d.ts +0 -0
  431. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidgetHTML.stories.d.ts +0 -0
  432. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/TabWidgetStories.d.ts +0 -0
  433. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TabWidget/index.d.ts +0 -0
  434. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitlePresentation.d.ts +0 -0
  435. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidget.d.ts +0 -0
  436. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidget.stories.d.ts +0 -0
  437. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidgetHTML.stories.d.ts +0 -0
  438. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/TitleWidgetStories.d.ts +0 -0
  439. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/TitleWidget/index.d.ts +0 -0
  440. /package/dist/esm/{types/components → components}/widgets/MetadataWidget/index.d.ts +0 -0
  441. /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidget.d.ts +0 -0
  442. /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidget.stories.d.ts +0 -0
  443. /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidgetHTML.stories.d.ts +0 -0
  444. /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/OntologyInfoWidgetStories.d.ts +0 -0
  445. /package/dist/esm/{types/components → components}/widgets/OntologyInfoWidget/index.d.ts +0 -0
  446. /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidget.d.ts +0 -0
  447. /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidget.stories.d.ts +0 -0
  448. /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidgetHTML.stories.d.ts +0 -0
  449. /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/ResourcesWidgetStories.d.ts +0 -0
  450. /package/dist/esm/{types/components → components}/widgets/ResourcesWidget/index.d.ts +0 -0
  451. /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidget.d.ts +0 -0
  452. /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidget.stories.d.ts +0 -0
  453. /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidgetHTML.stories.d.ts +0 -0
  454. /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/SearchBarWidgetStories.d.ts +0 -0
  455. /package/dist/esm/{types/components → components}/widgets/SearchBarWidget/index.d.ts +0 -0
  456. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/MetadataCompact.d.ts +0 -0
  457. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidget.d.ts +0 -0
  458. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidget.stories.d.ts +0 -0
  459. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidgetHTML.stories.d.ts +0 -0
  460. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/SearchResultsListWidgetStories.d.ts +0 -0
  461. /package/dist/esm/{types/components → components}/widgets/SearchResultsListWidget/index.d.ts +0 -0
  462. /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidget.d.ts +0 -0
  463. /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidget.stories.d.ts +0 -0
  464. /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidgetHTML.stories.d.ts +0 -0
  465. /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/TermDepictionWidgetStories.d.ts +0 -0
  466. /package/dist/esm/{types/components → components}/widgets/TermDepictionWidget/index.d.ts +0 -0
  467. /package/dist/esm/{types/index.d.ts → index.d.ts} +0 -0
  468. /package/dist/esm/{types/model → model}/LinkedEntities.d.ts +0 -0
  469. /package/dist/esm/{types/model → model}/ModelObjectCreator.d.ts +0 -0
  470. /package/dist/esm/{types/model → model}/ModelTypeCheck.d.ts +0 -0
  471. /package/dist/esm/{types/model → model}/Reified.d.ts +0 -0
  472. /package/dist/esm/{types/model → model}/StructureRendering.d.ts +0 -0
  473. /package/dist/esm/{types/model → model}/Suggest.d.ts +0 -0
  474. /package/dist/esm/{types/model → model}/interfaces/Class.d.ts +0 -0
  475. /package/dist/esm/{types/model → model}/interfaces/Entity.d.ts +0 -0
  476. /package/dist/esm/{types/model → model}/interfaces/Hierarchy.d.ts +0 -0
  477. /package/dist/esm/{types/model → model}/interfaces/Individual.d.ts +0 -0
  478. /package/dist/esm/{types/model → model}/interfaces/Ontologies.d.ts +0 -0
  479. /package/dist/esm/{types/model → model}/interfaces/Ontology.d.ts +0 -0
  480. /package/dist/esm/{types/model → model}/interfaces/Property.d.ts +0 -0
  481. /package/dist/esm/{types/model → model}/interfaces/Select.d.ts +0 -0
  482. /package/dist/esm/{types/model → model}/interfaces/SelectResult.d.ts +0 -0
  483. /package/dist/esm/{types/model → model}/interfaces/Thing.d.ts +0 -0
  484. /package/dist/esm/{types/model → model}/interfaces/index.d.ts +0 -0
  485. /package/dist/esm/{types/model → model}/ols-model/OLSSelect.d.ts +0 -0
  486. /package/dist/esm/{types/model → model}/ols-model/OLSSelectResult.d.ts +0 -0
  487. /package/dist/esm/{types/model → model}/ols3-model/OLS3Class.d.ts +0 -0
  488. /package/dist/esm/{types/model → model}/ols3-model/OLS3Entity.d.ts +0 -0
  489. /package/dist/esm/{types/model → model}/ols3-model/OLS3Individual.d.ts +0 -0
  490. /package/dist/esm/{types/model → model}/ols3-model/OLS3Ontologies.d.ts +0 -0
  491. /package/dist/esm/{types/model → model}/ols3-model/OLS3Ontology.d.ts +0 -0
  492. /package/dist/esm/{types/model → model}/ols3-model/OLS3Property.d.ts +0 -0
  493. /package/dist/esm/{types/model → model}/ols3-model/OLS3Thing.d.ts +0 -0
  494. /package/dist/esm/{types/model → model}/ols3-model/index.d.ts +0 -0
  495. /package/dist/esm/{types/model → model}/ols4-model/OLS4Class.d.ts +0 -0
  496. /package/dist/esm/{types/model → model}/ols4-model/OLS4Entity.d.ts +0 -0
  497. /package/dist/esm/{types/model → model}/ols4-model/OLS4Individual.d.ts +0 -0
  498. /package/dist/esm/{types/model → model}/ols4-model/OLS4Ontologies.d.ts +0 -0
  499. /package/dist/esm/{types/model → model}/ols4-model/OLS4Ontology.d.ts +0 -0
  500. /package/dist/esm/{types/model → model}/ols4-model/OLS4Property.d.ts +0 -0
  501. /package/dist/esm/{types/model → model}/ols4-model/OLS4Thing.d.ts +0 -0
  502. /package/dist/esm/{types/model → model}/ols4-model/index.d.ts +0 -0
  503. /package/dist/esm/{types/model → model}/ts4nfdi-model/Ts4nfdiSearchResult.d.ts +0 -0
@@ -0,0 +1,151 @@
1
+ import axios from 'axios';
2
+ import { Hierarchy, TreeNode } from '../model/interfaces/Hierarchy.js';
3
+ import { pluralizeType } from '../app/util.js';
4
+
5
+ function HierarchyNodeToEntityData(hierarchyNode) {
6
+ return {
7
+ iri: hierarchyNode["@id"],
8
+ label: hierarchyNode["prefLabel"],
9
+ hasChildren: hierarchyNode["hasChildren"],
10
+ parents: [],
11
+ };
12
+ }
13
+ class OntoPortalApi {
14
+ axiosInstance;
15
+ apiKey;
16
+ constructor(api, apiKey) {
17
+ this.axiosInstance = axios.create({
18
+ baseURL: api,
19
+ headers: {
20
+ Accept: "application/json",
21
+ // Content_Type: "application/json", // leads to preflight error
22
+ },
23
+ });
24
+ this.apiKey = apiKey;
25
+ this.axiosInstance.interceptors.request.use((config) => {
26
+ config.params = config.params || {};
27
+ // default params
28
+ config.params["apikey"] = this.apiKey;
29
+ config.params["format"] = "json";
30
+ return config;
31
+ });
32
+ }
33
+ async makeCall(url, config) {
34
+ return (await this.axiosInstance.get(url, config)).data;
35
+ }
36
+ async buildHierarchyWithIri(props) {
37
+ const { iri, ontologyId, entityType, showSiblingsOnInit } = props;
38
+ if (!ontologyId)
39
+ throw Error("ontologyId has to be specified for OntoPortal API.");
40
+ if (!entityType)
41
+ throw Error("entityType has to be specified for OntoPortal API.");
42
+ const rootEntities = [];
43
+ const entitiesData = new Map();
44
+ const parentChildRelations = new Map();
45
+ const allChildrenPresent = new Set();
46
+ const onInitialPath = new Set(); // only used if showSiblingsOnInit == false
47
+ function buildRelations(currNode) {
48
+ entitiesData.set(currNode["@id"], HierarchyNodeToEntityData(currNode));
49
+ if (currNode.hasChildren && currNode.children.length > 0) {
50
+ parentChildRelations.set(currNode["@id"], currNode.children.map((c) => {
51
+ return { childIri: c["@id"] };
52
+ }));
53
+ allChildrenPresent.add(currNode["@id"]);
54
+ onInitialPath.add(currNode["@id"]);
55
+ for (const child of currNode.children) {
56
+ buildRelations(child);
57
+ }
58
+ }
59
+ }
60
+ if (iri) {
61
+ // TODO: property which is child of multiple properties only is returned in one parent in /tree query (-> do it right manually?) (e.g.: http://sweetontology.net/relaTime/hasNHTime -> has more than one parent, but is only shown in one parent in /tree)
62
+ const api_tree = await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/${encodeURIComponent(iri)}/tree`, {
63
+ params: {
64
+ include: "@id,prefLabel,hasChildren,children",
65
+ language: "EN",
66
+ },
67
+ });
68
+ for (const rootNode of api_tree) {
69
+ rootEntities.push(rootNode["@id"]);
70
+ onInitialPath.add(rootNode["@id"]);
71
+ buildRelations(rootNode);
72
+ }
73
+ onInitialPath.add(iri);
74
+ }
75
+ else {
76
+ const roots = await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/roots`, {
77
+ params: {
78
+ include: "@id,prefLabel,hasChildren",
79
+ language: "EN",
80
+ },
81
+ });
82
+ for (const rootNode of roots) {
83
+ rootEntities.push(rootNode["@id"]);
84
+ onInitialPath.add(rootNode["@id"]);
85
+ }
86
+ }
87
+ function createTreeNode(entityData, cycleCheck) {
88
+ cycleCheck.add(entityData.iri); // add current entity to cycle check set
89
+ const node = new TreeNode(entityData);
90
+ const children = parentChildRelations.get(entityData.iri) || [];
91
+ if (!showSiblingsOnInit) {
92
+ for (const child of children) {
93
+ if (cycleCheck.has(child.childIri)) {
94
+ // cyclic tree, skip cycle
95
+ console.error(`Cyclic tree at entity "${child.childIri}".`);
96
+ continue;
97
+ }
98
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
99
+ if (onInitialPath.has(child.childIri))
100
+ node.addChild(createTreeNode(entitiesData.get(child.childIri), cycleCheck));
101
+ }
102
+ }
103
+ else {
104
+ for (const child of children) {
105
+ if (cycleCheck.has(child.childIri)) {
106
+ // cyclic tree, skip cycle
107
+ console.error(`Cyclic tree at entity "${child.childIri}".`);
108
+ continue;
109
+ }
110
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
111
+ node.addChild(createTreeNode(entitiesData.get(child.childIri), cycleCheck));
112
+ }
113
+ }
114
+ if (node.loadedChildren.length > 0)
115
+ node.expanded = true;
116
+ cycleCheck.delete(entityData.iri);
117
+ return node;
118
+ }
119
+ const cycleCheck = new Set(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.
120
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
121
+ const rootNodes = rootEntities
122
+ .map((rootEntity) => createTreeNode(entitiesData.get(rootEntity), cycleCheck))
123
+ .sort((a, b) => (a.entityData.label || a.entityData.iri).localeCompare(b.entityData.label || b.entityData.iri));
124
+ return new Hierarchy({
125
+ parentChildRelations: parentChildRelations,
126
+ entitiesData: entitiesData,
127
+ allChildrenPresent: allChildrenPresent,
128
+ roots: rootNodes,
129
+ api: new OntoPortalApi(this.axiosInstance.getUri(), this.apiKey),
130
+ ontologyId: ontologyId,
131
+ mainEntityIri: iri,
132
+ keepExpansionStates: props.keepExpansionStates,
133
+ entityType: entityType,
134
+ });
135
+ }
136
+ async loadHierarchyChildren(props) {
137
+ const { nodeToExpand, ontologyId, entityType } = props;
138
+ if (entityType == undefined)
139
+ throw Error("entityType has to be provided to load children in an OntoPortal hierarchy.");
140
+ const children = (await this.makeCall(`/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(entityType, false)}/${encodeURIComponent(nodeToExpand.entityData.iri)}/children`, {
141
+ params: {
142
+ include: "@id,prefLabel,hasChildren",
143
+ language: "EN",
144
+ },
145
+ }))["collection"];
146
+ return children.map((child) => HierarchyNodeToEntityData(child));
147
+ }
148
+ }
149
+
150
+ export { OntoPortalApi };
151
+ //# sourceMappingURL=OntoPortalApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OntoPortalApi.js","sources":["../../../../src/api/OntoPortalApi.ts"],"sourcesContent":["import {\n BuildHierarchyProps,\n HierarchyBuilder,\n HierarchyIriProp,\n LoadHierarchyChildrenProps,\n} from \"./HierarchyBuilder\";\nimport axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport {\n Hierarchy,\n ParentChildRelation,\n TreeNode,\n} from \"../model/interfaces/Hierarchy\";\nimport { pluralizeType } from \"../app/util\";\nimport { EntityData } from \"../app/types\";\n\ntype HierarchyNode = {\n prefLabel: string;\n hasChildren: boolean;\n children: HierarchyNode[];\n obsolete: boolean; // TODO: use this to enable showing obsoleteTerms?\n [\"@id\"]: string;\n [\"@type\"]: string;\n // links: object - not needed here\n [\"@context\"]: {\n [\"@vocab\"]: string;\n prefLabel: string;\n obsolete: string;\n [\"@language\"]: string;\n };\n};\n\nfunction HierarchyNodeToEntityData(hierarchyNode: HierarchyNode): EntityData {\n return {\n iri: hierarchyNode[\"@id\"],\n label: hierarchyNode[\"prefLabel\"],\n hasChildren: hierarchyNode[\"hasChildren\"],\n parents: [],\n };\n}\n\nexport class OntoPortalApi implements HierarchyBuilder {\n private axiosInstance: AxiosInstance;\n private apiKey: string;\n\n constructor(api: string, apiKey: string) {\n this.axiosInstance = axios.create({\n baseURL: api,\n headers: {\n Accept: \"application/json\",\n // Content_Type: \"application/json\", // leads to preflight error\n },\n });\n this.apiKey = apiKey;\n this.axiosInstance.interceptors.request.use((config) => {\n config.params = config.params || {};\n\n // default params\n config.params[\"apikey\"] = this.apiKey;\n config.params[\"format\"] = \"json\";\n\n return config;\n });\n }\n\n private async makeCall(url: string, config?: AxiosRequestConfig<never>) {\n return (await this.axiosInstance.get(url, config)).data;\n }\n\n public async buildHierarchyWithIri(\n props: BuildHierarchyProps & HierarchyIriProp,\n ): Promise<Hierarchy> {\n const { iri, ontologyId, entityType, showSiblingsOnInit } = props;\n\n if (!ontologyId)\n throw Error(\"ontologyId has to be specified for OntoPortal API.\");\n if (!entityType)\n throw Error(\"entityType has to be specified for OntoPortal API.\");\n\n const rootEntities: string[] = [];\n const entitiesData: Map<string, EntityData> = new Map<string, EntityData>();\n const parentChildRelations: Map<string, ParentChildRelation[]> = new Map<\n string,\n ParentChildRelation[]\n >();\n const allChildrenPresent: Set<string> = new Set<string>();\n const onInitialPath: Set<string> = new Set<string>(); // only used if showSiblingsOnInit == false\n\n function buildRelations(currNode: HierarchyNode) {\n entitiesData.set(currNode[\"@id\"], HierarchyNodeToEntityData(currNode));\n if (currNode.hasChildren && currNode.children.length > 0) {\n parentChildRelations.set(\n currNode[\"@id\"],\n currNode.children.map((c) => {\n return { childIri: c[\"@id\"] };\n }),\n );\n\n allChildrenPresent.add(currNode[\"@id\"]);\n onInitialPath.add(currNode[\"@id\"]);\n\n for (const child of currNode.children) {\n buildRelations(child);\n }\n }\n }\n\n if (iri) {\n // TODO: property which is child of multiple properties only is returned in one parent in /tree query (-> do it right manually?) (e.g.: http://sweetontology.net/relaTime/hasNHTime -> has more than one parent, but is only shown in one parent in /tree)\n const api_tree: HierarchyNode[] = await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/${encodeURIComponent(iri)}/tree`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren,children\",\n language: \"EN\",\n },\n },\n );\n\n for (const rootNode of api_tree) {\n rootEntities.push(rootNode[\"@id\"]);\n onInitialPath.add(rootNode[\"@id\"]);\n buildRelations(rootNode);\n }\n onInitialPath.add(iri);\n } else {\n const roots: HierarchyNode[] = await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/roots`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren\",\n language: \"EN\",\n },\n },\n );\n\n for (const rootNode of roots) {\n rootEntities.push(rootNode[\"@id\"]);\n onInitialPath.add(rootNode[\"@id\"]);\n }\n }\n\n function createTreeNode(\n entityData: EntityData,\n cycleCheck: Set<string>,\n ): TreeNode {\n cycleCheck.add(entityData.iri); // add current entity to cycle check set\n\n const node = new TreeNode(entityData);\n const children = parentChildRelations.get(entityData.iri) || [];\n\n if (!showSiblingsOnInit) {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (onInitialPath.has(child.childIri))\n node.addChild(\n createTreeNode(entitiesData.get(child.childIri)!, cycleCheck),\n );\n }\n } else {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n node.addChild(\n createTreeNode(entitiesData.get(child.childIri)!, cycleCheck),\n );\n }\n }\n\n if (node.loadedChildren.length > 0) node.expanded = true;\n\n cycleCheck.delete(entityData.iri);\n return node;\n }\n\n const cycleCheck: Set<string> = new Set<string>(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const rootNodes: TreeNode[] = rootEntities\n .map((rootEntity) =>\n createTreeNode(entitiesData.get(rootEntity)!, cycleCheck),\n )\n .sort((a, b) =>\n (a.entityData.label || a.entityData.iri).localeCompare(\n b.entityData.label || b.entityData.iri,\n ),\n );\n\n return new Hierarchy({\n parentChildRelations: parentChildRelations,\n entitiesData: entitiesData,\n allChildrenPresent: allChildrenPresent,\n roots: rootNodes,\n api: new OntoPortalApi(this.axiosInstance.getUri(), this.apiKey),\n ontologyId: ontologyId,\n mainEntityIri: iri,\n keepExpansionStates: props.keepExpansionStates,\n entityType: entityType,\n });\n }\n\n public async loadHierarchyChildren(\n props: LoadHierarchyChildrenProps,\n ): Promise<EntityData[]> {\n const { nodeToExpand, ontologyId, entityType } = props;\n\n if (entityType == undefined)\n throw Error(\n \"entityType has to be provided to load children in an OntoPortal hierarchy.\",\n );\n\n const children: HierarchyNode[] = (\n await this.makeCall(\n `/ontologies/${ontologyId.toUpperCase()}/${pluralizeType(\n entityType,\n false,\n )}/${encodeURIComponent(nodeToExpand.entityData.iri)}/children`,\n {\n params: {\n include: \"@id,prefLabel,hasChildren\",\n language: \"EN\",\n },\n },\n )\n )[\"collection\"];\n\n return children.map((child) => HierarchyNodeToEntityData(child));\n }\n}\n"],"names":[],"mappings":";;;;AA+BA,SAAS,yBAAyB,CAAC,aAA4B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,EAC/D;AACE,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE,2BAA2B;AACpC,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA;AACF,SAAA,CACF,EACD,YAAY,CAAC,CAAC;AAEhB,QAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC;KAClE;AACF;;;;"}
@@ -0,0 +1,187 @@
1
+ import axios from 'axios';
2
+ import { Hierarchy, TreeNode } from '../model/interfaces/Hierarchy.js';
3
+ import Reified from '../model/Reified.js';
4
+ import { dictFromParamString } from '../app/util.js';
5
+
6
+ class SkosEntityDataBuilder {
7
+ static fromTopConcept(obj) {
8
+ return {
9
+ iri: obj.uri,
10
+ label: obj.label,
11
+ hasChildren: obj.hasChildren,
12
+ parents: [],
13
+ };
14
+ }
15
+ static fromHierarchyResult(obj) {
16
+ return {
17
+ iri: obj.uri,
18
+ label: obj.prefLabel,
19
+ hasChildren: obj.narrower != undefined && obj.narrower.length > 0,
20
+ parents: Reified.fromJson(obj.broader),
21
+ };
22
+ }
23
+ static fromPrefAndUriAndChildren(obj, parents) {
24
+ return {
25
+ iri: obj.uri,
26
+ label: obj.prefLabel,
27
+ hasChildren: obj.hasChildren,
28
+ parents: Reified.fromJson(parents),
29
+ };
30
+ }
31
+ static fromLabelAndUriAndChildren(obj, parents) {
32
+ return {
33
+ iri: obj.uri,
34
+ label: obj.label,
35
+ hasChildren: obj.hasChildren,
36
+ parents: Reified.fromJson(parents),
37
+ };
38
+ }
39
+ }
40
+ class SkosApi {
41
+ axiosInstance;
42
+ constructor(api) {
43
+ this.axiosInstance = axios.create({
44
+ baseURL: api,
45
+ headers: {
46
+ Accept: "application/json",
47
+ // Content_Type: "application/json", // leads to preflight error
48
+ },
49
+ });
50
+ }
51
+ async makeCall(url, config) {
52
+ return (await this.axiosInstance.get(url, config)).data;
53
+ }
54
+ async buildHierarchyWithIri(props) {
55
+ const { iri, ontologyId, showSiblingsOnInit, parameter } = props;
56
+ if (!ontologyId)
57
+ throw Error("ontologyId has to be specified for SKOS API.");
58
+ const rootEntities = [];
59
+ const parentChildRelations = new Map();
60
+ const entitiesData = new Map();
61
+ const allChildrenPresent = new Set();
62
+ const onInitialPath = new Set(); // only used if showSiblingsOnInit == false
63
+ if (iri) {
64
+ const broaderTransitive = await this.makeCall(`/${ontologyId}/hierarchy`, {
65
+ params: {
66
+ uri: iri,
67
+ lang: "en",
68
+ format: "application/json",
69
+ ...dictFromParamString(parameter),
70
+ },
71
+ }).then((obj) => Object.keys(obj["broaderTransitive"]).map((key) => obj["broaderTransitive"][key]));
72
+ // stores all entities appearing in broaderTransitive
73
+ //const entities: Map<string, EntityData> = new Map<string, EntityData>()
74
+ for (const node of broaderTransitive) {
75
+ const nodeData = SkosEntityDataBuilder.fromHierarchyResult(node);
76
+ entitiesData.set(nodeData.iri, nodeData);
77
+ if (node.top)
78
+ rootEntities.push(nodeData.iri);
79
+ if (!showSiblingsOnInit)
80
+ onInitialPath.add(nodeData.iri);
81
+ }
82
+ for (const node of broaderTransitive) {
83
+ if (node.narrower != undefined) {
84
+ const children = [];
85
+ for (const childNode of node.narrower) {
86
+ let childNodeData = entitiesData.get(childNode.uri);
87
+ if (childNodeData == undefined) {
88
+ childNodeData = SkosEntityDataBuilder.fromLabelAndUriAndChildren(childNode, [node.uri]);
89
+ entitiesData.set(childNodeData.iri, childNodeData);
90
+ }
91
+ else {
92
+ if (!childNodeData?.parents?.map((r) => r.value).includes(node.uri))
93
+ if (childNodeData?.parents) {
94
+ childNodeData?.parents?.push(...Reified.fromJson(node.uri));
95
+ }
96
+ }
97
+ children.push(childNodeData);
98
+ }
99
+ children.sort((a, b) => (a.label || a.iri).localeCompare(b.label || b.iri));
100
+ parentChildRelations.set(node.uri, children.map((c) => {
101
+ return { childIri: c.iri };
102
+ }));
103
+ allChildrenPresent.add(node.uri); // in skos, all children are loaded if any are
104
+ }
105
+ }
106
+ }
107
+ else {
108
+ const topconcepts = await this.makeCall(`/${ontologyId}/topConcepts`, {
109
+ params: {
110
+ lang: "en",
111
+ format: "application/json",
112
+ ...dictFromParamString(parameter),
113
+ },
114
+ }).then((obj) => obj["topconcepts"]);
115
+ for (const concept of topconcepts) {
116
+ rootEntities.push(concept.uri);
117
+ }
118
+ }
119
+ function createTreeNode(entityData, cycleCheck) {
120
+ cycleCheck.add(entityData.iri); // add current entity to cycle check set
121
+ const node = new TreeNode(entityData);
122
+ const children = parentChildRelations.get(entityData.iri) || [];
123
+ if (!showSiblingsOnInit) {
124
+ for (const child of children) {
125
+ if (cycleCheck.has(child.childIri)) {
126
+ // cyclic tree, skip cycle
127
+ console.error(`Cyclic tree at entity "${child.childIri}".`);
128
+ continue;
129
+ }
130
+ const childData = entitiesData.get(child.childIri);
131
+ if (childData != undefined && onInitialPath.has(child.childIri)) {
132
+ node.addChild(createTreeNode(childData, cycleCheck));
133
+ }
134
+ }
135
+ }
136
+ else {
137
+ for (const child of children) {
138
+ if (cycleCheck.has(child.childIri)) {
139
+ // cyclic tree, skip cycle
140
+ console.error(`Cyclic tree at entity "${child.childIri}".`);
141
+ continue;
142
+ }
143
+ const childData = entitiesData.get(child.childIri);
144
+ if (childData != undefined)
145
+ node.addChild(createTreeNode(childData, cycleCheck));
146
+ }
147
+ }
148
+ if (node.loadedChildren.length > 0)
149
+ node.expanded = true;
150
+ cycleCheck.delete(entityData.iri);
151
+ return node;
152
+ }
153
+ const cycleCheck = new Set(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.
154
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
155
+ const rootNodes = rootEntities
156
+ .map((rootEntity) => createTreeNode(entitiesData.get(rootEntity), cycleCheck))
157
+ .sort((a, b) => (a.entityData.label || a.entityData.iri).localeCompare(b.entityData.label || b.entityData.iri));
158
+ return new Hierarchy({
159
+ parentChildRelations: parentChildRelations,
160
+ entitiesData: entitiesData,
161
+ allChildrenPresent: allChildrenPresent,
162
+ roots: rootNodes,
163
+ api: new SkosApi(this.axiosInstance.getUri()),
164
+ ontologyId: ontologyId,
165
+ mainEntityIri: iri,
166
+ keepExpansionStates: props.keepExpansionStates,
167
+ parameter: parameter,
168
+ });
169
+ }
170
+ async loadHierarchyChildren(props) {
171
+ const { nodeToExpand, ontologyId, parameter } = props;
172
+ const narrower = (await this.makeCall(`/${ontologyId}/children`, {
173
+ params: {
174
+ uri: nodeToExpand.entityData.iri,
175
+ lang: "en",
176
+ format: "application/json",
177
+ ...dictFromParamString(parameter),
178
+ },
179
+ }))["narrower"];
180
+ return narrower.map((obj) => SkosEntityDataBuilder.fromPrefAndUriAndChildren(obj, [
181
+ nodeToExpand.entityData.iri,
182
+ ]));
183
+ }
184
+ }
185
+
186
+ export { SkosApi };
187
+ //# sourceMappingURL=SkosApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkosApi.js","sources":["../../../../src/api/SkosApi.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport {\n BuildHierarchyProps,\n HierarchyBuilder,\n HierarchyIriProp,\n LoadHierarchyChildrenProps,\n} from \"./HierarchyBuilder\";\nimport {\n Hierarchy,\n ParentChildRelation,\n TreeNode,\n} from \"../model/interfaces/Hierarchy\";\nimport Reified from \"../model/Reified\";\nimport { EntityData } from \"../app/types\";\nimport { dictFromParamString } from \"../app/util\";\n\ntype TopConcept = {\n uri: string;\n label?: string;\n topConceptOf?: string;\n hasChildren: boolean;\n notation?: string;\n};\n\ntype LabelAndUriAndChildren = {\n uri: string;\n label: string;\n hasChildren: boolean;\n notation?: string;\n};\n\ntype HierarchyResult = {\n uri: string;\n prefLabel: string;\n top?: string;\n broader?: string[];\n narrower?: LabelAndUriAndChildren[];\n};\n\ntype PrefAndUriAndChildren = {\n uri: string;\n prefLabel: string;\n hasChildren: boolean;\n notation?: string;\n};\n\nabstract class SkosEntityDataBuilder {\n static fromTopConcept(obj: TopConcept): EntityData {\n return {\n iri: obj.uri,\n label: obj.label,\n hasChildren: obj.hasChildren,\n parents: [],\n };\n }\n\n static fromHierarchyResult(obj: HierarchyResult): EntityData {\n return {\n iri: obj.uri,\n label: obj.prefLabel,\n hasChildren: obj.narrower != undefined && obj.narrower.length > 0,\n parents: Reified.fromJson(obj.broader),\n };\n }\n\n static fromPrefAndUriAndChildren(\n obj: PrefAndUriAndChildren,\n parents?: string[],\n ): EntityData {\n return {\n iri: obj.uri,\n label: obj.prefLabel,\n hasChildren: obj.hasChildren,\n parents: Reified.fromJson(parents),\n };\n }\n\n static fromLabelAndUriAndChildren(\n obj: LabelAndUriAndChildren,\n parents?: string[],\n ): EntityData {\n return {\n iri: obj.uri,\n label: obj.label,\n hasChildren: obj.hasChildren,\n parents: Reified.fromJson(parents),\n };\n }\n}\n\nexport class SkosApi implements HierarchyBuilder {\n private axiosInstance: AxiosInstance;\n\n constructor(api: string) {\n this.axiosInstance = axios.create({\n baseURL: api,\n headers: {\n Accept: \"application/json\",\n // Content_Type: \"application/json\", // leads to preflight error\n },\n });\n }\n\n private async makeCall(\n url: string,\n config: AxiosRequestConfig<never> | undefined,\n ) {\n return (await this.axiosInstance.get(url, config)).data;\n }\n\n public async buildHierarchyWithIri(\n props: BuildHierarchyProps & HierarchyIriProp,\n ): Promise<Hierarchy> {\n const { iri, ontologyId, showSiblingsOnInit, parameter } = props;\n\n if (!ontologyId)\n throw Error(\"ontologyId has to be specified for SKOS API.\");\n\n const rootEntities: string[] = [];\n const parentChildRelations: Map<string, ParentChildRelation[]> = new Map<\n string,\n ParentChildRelation[]\n >();\n const entitiesData: Map<string, EntityData> = new Map<string, EntityData>();\n const allChildrenPresent: Set<string> = new Set<string>();\n const onInitialPath: Set<string> = new Set<string>(); // only used if showSiblingsOnInit == false\n\n if (iri) {\n const broaderTransitive: HierarchyResult[] = await this.makeCall(\n `/${ontologyId}/hierarchy`,\n {\n params: {\n uri: iri,\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n },\n ).then((obj) =>\n Object.keys(obj[\"broaderTransitive\"]).map(\n (key) => obj[\"broaderTransitive\"][key],\n ),\n );\n\n // stores all entities appearing in broaderTransitive\n //const entities: Map<string, EntityData> = new Map<string, EntityData>()\n\n for (const node of broaderTransitive) {\n const nodeData: EntityData =\n SkosEntityDataBuilder.fromHierarchyResult(node);\n\n entitiesData.set(nodeData.iri, nodeData);\n if (node.top) rootEntities.push(nodeData.iri);\n\n if (!showSiblingsOnInit) onInitialPath.add(nodeData.iri);\n }\n for (const node of broaderTransitive) {\n if (node.narrower != undefined) {\n const children: EntityData[] = [];\n\n for (const childNode of node.narrower) {\n let childNodeData = entitiesData.get(childNode.uri);\n if (childNodeData == undefined) {\n childNodeData = SkosEntityDataBuilder.fromLabelAndUriAndChildren(\n childNode,\n [node.uri],\n );\n\n entitiesData.set(childNodeData.iri, childNodeData);\n } else {\n if (\n !childNodeData?.parents?.map((r) => r.value).includes(node.uri)\n )\n if (childNodeData?.parents) {\n childNodeData?.parents?.push(\n ...Reified.fromJson<string>(node.uri),\n );\n }\n }\n children.push(childNodeData);\n }\n\n children.sort((a, b) =>\n (a.label || a.iri).localeCompare(b.label || b.iri),\n );\n\n parentChildRelations.set(\n node.uri,\n children.map((c) => {\n return { childIri: c.iri };\n }),\n );\n allChildrenPresent.add(node.uri); // in skos, all children are loaded if any are\n }\n }\n } else {\n const topconcepts: TopConcept[] = await this.makeCall(\n `/${ontologyId}/topConcepts`,\n {\n params: {\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n },\n ).then((obj) => obj[\"topconcepts\"]);\n\n for (const concept of topconcepts) {\n rootEntities.push(concept.uri);\n }\n }\n\n function createTreeNode(\n entityData: EntityData,\n cycleCheck: Set<string>,\n ): TreeNode {\n cycleCheck.add(entityData.iri); // add current entity to cycle check set\n\n const node = new TreeNode(entityData);\n const children = parentChildRelations.get(entityData.iri) || [];\n\n if (!showSiblingsOnInit) {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n const childData = entitiesData.get(child.childIri);\n if (childData != undefined && onInitialPath.has(child.childIri)) {\n node.addChild(createTreeNode(childData, cycleCheck));\n }\n }\n } else {\n for (const child of children) {\n if (cycleCheck.has(child.childIri)) {\n // cyclic tree, skip cycle\n console.error(`Cyclic tree at entity \"${child.childIri}\".`);\n continue;\n }\n\n const childData = entitiesData.get(child.childIri);\n if (childData != undefined)\n node.addChild(createTreeNode(childData, cycleCheck));\n }\n }\n\n if (node.loadedChildren.length > 0) node.expanded = true;\n\n cycleCheck.delete(entityData.iri);\n return node;\n }\n\n const cycleCheck: Set<string> = new Set<string>(); // Contains iris of all entities that have occurred within the current recursion branch. Is used to check for cycles.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const rootNodes: TreeNode[] = rootEntities\n .map((rootEntity) =>\n createTreeNode(entitiesData.get(rootEntity)!, cycleCheck),\n )\n .sort((a, b) =>\n (a.entityData.label || a.entityData.iri).localeCompare(\n b.entityData.label || b.entityData.iri,\n ),\n );\n\n return new Hierarchy({\n parentChildRelations: parentChildRelations,\n entitiesData: entitiesData,\n allChildrenPresent: allChildrenPresent,\n roots: rootNodes,\n api: new SkosApi(this.axiosInstance.getUri()),\n ontologyId: ontologyId,\n mainEntityIri: iri,\n keepExpansionStates: props.keepExpansionStates,\n parameter: parameter,\n });\n }\n\n public async loadHierarchyChildren(\n props: LoadHierarchyChildrenProps,\n ): Promise<EntityData[]> {\n const { nodeToExpand, ontologyId, parameter } = props;\n\n const narrower: PrefAndUriAndChildren[] = (\n await this.makeCall(`/${ontologyId}/children`, {\n params: {\n uri: nodeToExpand.entityData.iri,\n lang: \"en\",\n format: \"application/json\",\n ...dictFromParamString(parameter),\n },\n })\n )[\"narrower\"];\n\n return narrower.map((obj) =>\n SkosEntityDataBuilder.fromPrefAndUriAndChildren(obj, [\n nodeToExpand.entityData.iri,\n ]),\n );\n }\n}\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AAC,UAAU,CAAC,GAAG;AAChC,gBAAA,IAAI,EAAE,IAAI;AACV,gBAAA,MAAM,EAAE,kBAAkB;gBAC1B,GAAG,mBAAmB,CAAC,SAAS,CAAC;AAClC,aAAA;AACF,SAAA,CAAC,EACF,UAAU,CAAC,CAAC;AAEd,QAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,KACtB,qBAAqB,CAAC,yBAAyB,CAAC,GAAG,EAAE;YACnD,YAAY,CAAC,UAAU,CAAC,GAAG;AAC5B,SAAA,CAAC,CACH,CAAC;KACH;AACF;;;;"}
@@ -0,0 +1,6 @@
1
+ import { AxiosInstance, AxiosRequestConfig } from "axios";
2
+ export declare class OlsBaseApi {
3
+ protected axiosInstance: AxiosInstance;
4
+ constructor(api: string | AxiosInstance);
5
+ protected makeCall(url: string, config: AxiosRequestConfig<any> | undefined, useLegacy: boolean): Promise<any>;
6
+ }
@@ -0,0 +1,24 @@
1
+ import axios from 'axios';
2
+ import { getUseLegacy } from '../../app/util.js';
3
+ import { check_for_errors } from '../../utils/olsApiUtils.js';
4
+
5
+ class OlsBaseApi {
6
+ axiosInstance;
7
+ constructor(api) {
8
+ this.axiosInstance =
9
+ typeof api === "string"
10
+ ? axios.create({
11
+ baseURL: api,
12
+ headers: { Accept: "application/json" },
13
+ })
14
+ : api;
15
+ }
16
+ async makeCall(url, config, useLegacy) {
17
+ const apiVersionPrefix = getUseLegacy(useLegacy) ? "" : "v2/";
18
+ const response = (await this.axiosInstance.get(apiVersionPrefix + url, config)).data;
19
+ return check_for_errors(response);
20
+ }
21
+ }
22
+
23
+ export { OlsBaseApi };
24
+ //# sourceMappingURL=OlsBaseApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OlsBaseApi.js","sources":["../../../../../src/api/ols/OlsBaseApi.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport { getUseLegacy } from \"../../app/util\";\nimport { check_for_errors } from \"../../utils/olsApiUtils\";\n\nexport class OlsBaseApi {\n protected axiosInstance: AxiosInstance;\n\n constructor(api: string | AxiosInstance) {\n this.axiosInstance =\n typeof api === \"string\"\n ? axios.create({\n baseURL: api,\n headers: { Accept: \"application/json\" },\n })\n : api;\n }\n\n protected async makeCall(\n url: string,\n config: AxiosRequestConfig<any> | undefined,\n useLegacy: boolean,\n ) {\n const apiVersionPrefix = getUseLegacy(useLegacy) ? \"\" : \"v2/\";\n const response = (\n await this.axiosInstance.get(apiVersionPrefix + url, config)\n ).data;\n return check_for_errors(response);\n }\n}\n"],"names":[],"mappings":";;;;MAIa,UAAU,CAAA;AACX,IAAA,aAAa,CAAgB;AAEvC,IAAA,WAAA,CAAY,GAA2B,EAAA;AACrC,QAAA,IAAI,CAAC,aAAa;YAChB,OAAO,GAAG,KAAK,QAAQ;AACrB,kBAAE,KAAK,CAAC,MAAM,CAAC;AACX,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;iBACxC,CAAC;kBACF,GAAG,CAAC;KACX;AAES,IAAA,MAAM,QAAQ,CACtB,GAAW,EACX,MAA2C,EAC3C,SAAkB,EAAA;AAElB,QAAA,MAAM,gBAAgB,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AAC9D,QAAA,MAAM,QAAQ,GAAG,CACf,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,GAAG,GAAG,EAAE,MAAM,CAAC,EAC5D,IAAI,CAAC;AACP,QAAA,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;KACnC;AACF;;;;"}
@@ -0,0 +1,82 @@
1
+ import { OlsBaseApi } from "./OlsBaseApi";
2
+ import { EntityTypeName } from "../../model/ModelTypeCheck";
3
+ import { Entity, Individual } from "../../model/interfaces";
4
+ import { apiCallFn, ContentParams, JsTreeParams } from "../../utils/olsApiTypes";
5
+ export declare class OlsEntityApi extends OlsBaseApi {
6
+ /**
7
+ * Is used to fetch all terms from the api
8
+ * @param paginationParams
9
+ * @param sortingParams
10
+ * @param contentParams
11
+ * @param parameter
12
+ * @param `useLegacy` Depending on the value of `useLegacy`, `"terms"` (`useLegacy == true`) or `"classes"` (`useLegacy == false`) will be used in the query url
13
+ */
14
+ getTerms: apiCallFn;
15
+ getProperties: apiCallFn;
16
+ getIndividuals: apiCallFn;
17
+ /**
18
+ * Is used to fetch a term from the api
19
+ * @param paginationParams
20
+ * @param sortingParams
21
+ * @param `contentParams` Always requires the respective object IRI in `contentParams` to be set.
22
+ * If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results.
23
+ * If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology.
24
+ * @param parameter
25
+ * @param `useLegacy` Depending on the value of `useLegacy`, `"terms"` (`useLegacy == true`) or `"classes"` (`useLegacy == false`) will be used in the query url
26
+ * @param abortSignal
27
+ */
28
+ getTerm: apiCallFn;
29
+ /**
30
+ * Is used to fetch a property from the api in ols3.
31
+ * Always requires the respective object IRI in contentParams to be set
32
+ * If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
33
+ * If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
34
+ */
35
+ getProperty: apiCallFn;
36
+ /**
37
+ * Is used to fetch an individual from the api in ols3.
38
+ * Always requires the respective object IRI in contentParams to be set
39
+ * If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
40
+ * If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
41
+ */
42
+ getIndividual: apiCallFn;
43
+ /**
44
+ * Is used to fetch an entity from the /entities endpoint in the api in ols4.
45
+ * Always requires the respective object IRI in contentParams to be set
46
+ * If ontologyId is undefined in contentParams, the object will be queried from all ontologies, containing a list of results
47
+ * If an ontologyId is provided in contentParams, the returned list will only contain the object from that specific ontology
48
+ */
49
+ getEntity: apiCallFn;
50
+ /**
51
+ * Returns the whole entity response json with a comfortable wrapper handling entityType, ontologyId and useLegacy
52
+ * @param iri
53
+ * @param entityType queries specific routes if provided and infers type if not
54
+ * @param ontologyId queries ontology routes if provided, otherwise not
55
+ * @param parameter
56
+ * @param useLegacy affects how entityType is inferred if not provided
57
+ */
58
+ getEntityResponse(iri: string, entityType?: EntityTypeName, ontologyId?: string, parameter?: string, useLegacy?: boolean): Promise<any>;
59
+ private getEntityWithEntityTypeProvided;
60
+ private getEntityWithInferredEntityType;
61
+ /**
62
+ * Returns an Entity object (implementing 'Class', 'Property' or 'Individual').
63
+ * Indirectly fetches the response JSON for the specified entityType, iri, ontologyId, parameter and API version (useLegacy).
64
+ *
65
+ * @param entityType
66
+ * @param iri
67
+ * @param ontologyId
68
+ * @param parameter
69
+ * @param useLegacy
70
+ */
71
+ getEntityObject(iri: string, entityType?: EntityTypeName, ontologyId?: string, parameter?: string, useLegacy?: boolean): Promise<Entity>;
72
+ getClassInstances(iri: string, ontologyId: string): Promise<Individual[]>;
73
+ getTermRelations: (contentParams: ContentParams) => Promise<any>;
74
+ /**
75
+ * getTermTree:
76
+ * This method always requires an ontologyId in contentParams
77
+ * 1) If no termIri is defined in contentParams, the ontology roots will be queried
78
+ * 2) If a termIri is defined but no child in jsTreeParams, the hierarchy containing that term will be queried
79
+ * 3) If a termIri is defined and also a child in jsTreeParams, the subhierarchy of that child will be queried
80
+ */
81
+ getTermTree: (contentParams: ContentParams, treeParams: JsTreeParams) => Promise<any>;
82
+ }