@databiosphere/findable-ui 29.0.2 → 31.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +35 -0
  3. package/lib/common/categories/config/types.d.ts +28 -0
  4. package/lib/common/categories/config/utils.d.ts +31 -0
  5. package/lib/common/categories/config/utils.js +29 -0
  6. package/lib/common/categories/models/range/typeGuards.d.ts +14 -0
  7. package/lib/common/categories/models/range/typeGuards.js +18 -0
  8. package/lib/common/categories/models/range/types.d.ts +15 -0
  9. package/lib/common/categories/models/range/types.js +1 -0
  10. package/lib/common/categories/models/range/utils.d.ts +23 -0
  11. package/lib/common/categories/models/range/utils.js +41 -0
  12. package/lib/common/categories/models/select/utils.d.ts +8 -0
  13. package/lib/common/categories/models/select/utils.js +16 -0
  14. package/lib/common/categories/models/types.d.ts +6 -0
  15. package/lib/common/categories/models/types.js +1 -0
  16. package/lib/common/categories/views/common/types.d.ts +10 -0
  17. package/lib/common/categories/views/common/types.js +1 -0
  18. package/lib/common/categories/views/range/typeGuards.d.ts +8 -0
  19. package/lib/common/categories/views/range/typeGuards.js +8 -0
  20. package/lib/common/categories/views/range/types.d.ts +19 -0
  21. package/lib/common/categories/views/range/types.js +1 -0
  22. package/lib/common/categories/views/range/utils.d.ts +12 -0
  23. package/lib/common/categories/views/range/utils.js +24 -0
  24. package/lib/common/categories/views/select/typeGuards.d.ts +8 -0
  25. package/lib/common/categories/views/select/typeGuards.js +8 -0
  26. package/lib/common/categories/views/select/types.d.ts +7 -0
  27. package/lib/common/categories/views/select/types.js +1 -0
  28. package/lib/common/categories/views/types.d.ts +13 -0
  29. package/lib/common/categories/views/types.js +8 -0
  30. package/lib/common/entities.d.ts +8 -23
  31. package/lib/components/DataDictionary/components/Entities/entities.d.ts +3 -1
  32. package/lib/components/DataDictionary/components/Entities/entities.js +1 -1
  33. package/lib/components/DataDictionary/components/Entities/types.d.ts +5 -5
  34. package/lib/components/DataDictionary/components/Entity/entity.d.ts +3 -1
  35. package/lib/components/DataDictionary/components/Entity/entity.js +6 -6
  36. package/lib/components/DataDictionary/components/Entity/types.d.ts +5 -5
  37. package/lib/components/DataDictionary/components/Outline/utils.d.ts +3 -2
  38. package/lib/components/DataDictionary/components/Table/components/BasicCell/basicCell.d.ts +3 -2
  39. package/lib/components/DataDictionary/components/Table/components/BasicCell/basicCell.js +6 -2
  40. package/lib/components/DataDictionary/components/Table/components/BasicCell/utils.d.ts +9 -0
  41. package/lib/components/DataDictionary/components/Table/components/BasicCell/utils.js +12 -0
  42. package/lib/components/DataDictionary/components/Table/hook.d.ts +3 -3
  43. package/lib/components/DataDictionary/components/Table/hook.js +3 -1
  44. package/lib/components/DataDictionary/components/Table/options/core/constants.d.ts +2 -3
  45. package/lib/components/DataDictionary/components/Table/options/hook.d.ts +2 -2
  46. package/lib/components/DataDictionary/components/Table/options/sorting/constants.d.ts +2 -3
  47. package/lib/components/DataDictionary/components/Table/table.d.ts +2 -1
  48. package/lib/components/DataDictionary/components/Table/table.js +1 -1
  49. package/lib/components/DataDictionary/components/Table/types.d.ts +3 -4
  50. package/lib/components/DataDictionary/dataDictionary.d.ts +3 -1
  51. package/lib/components/DataDictionary/dataDictionary.styles.js +2 -3
  52. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +3 -1
  53. package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +5 -5
  54. package/lib/components/Filter/components/Filter/filter.d.ts +2 -2
  55. package/lib/components/Filter/components/Filter/filter.js +11 -3
  56. package/lib/components/Filter/components/Filter/stories/args.d.ts +5 -0
  57. package/lib/components/Filter/components/Filter/stories/args.js +19 -0
  58. package/lib/components/Filter/components/Filter/stories/filter.stories.d.ts +8 -0
  59. package/lib/components/Filter/components/Filter/stories/filter.stories.js +21 -0
  60. package/lib/components/Filter/components/FilterMenu/filterMenu.js +2 -2
  61. package/lib/components/Filter/components/FilterMenu/filterMenu.styles.d.ts +1 -1
  62. package/lib/components/Filter/components/FilterMenu/filterMenu.styles.js +1 -1
  63. package/lib/components/Filter/components/FilterRange/constants.d.ts +0 -2
  64. package/lib/components/Filter/components/FilterRange/constants.js +0 -5
  65. package/lib/components/Filter/components/FilterRange/filterRange.d.ts +1 -1
  66. package/lib/components/Filter/components/FilterRange/filterRange.js +50 -21
  67. package/lib/components/Filter/components/FilterRange/filterRange.styles.js +58 -10
  68. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/constants.d.ts +5 -0
  69. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/constants.js +5 -0
  70. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.d.ts +2 -2
  71. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.js +32 -7
  72. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/schema.d.ts +6 -0
  73. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/schema.js +50 -0
  74. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/types.d.ts +26 -3
  75. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/types.js +6 -1
  76. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/utils.d.ts +15 -0
  77. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/utils.js +25 -0
  78. package/lib/components/Filter/components/FilterRange/stories/args.d.ts +3 -0
  79. package/lib/components/Filter/components/FilterRange/stories/args.js +13 -0
  80. package/lib/components/Filter/components/FilterRange/stories/filterRange.stories.js +2 -2
  81. package/lib/components/Filter/components/FilterRange/types.d.ts +10 -6
  82. package/lib/components/Filter/components/FilterRange/types.js +1 -6
  83. package/lib/components/Filter/components/FilterRange/utils.d.ts +8 -0
  84. package/lib/components/Filter/components/FilterRange/utils.js +15 -0
  85. package/lib/components/Filter/components/FilterTag/stories/args.d.ts +5 -0
  86. package/lib/components/Filter/components/FilterTag/stories/args.js +17 -0
  87. package/lib/components/Filter/components/FilterTag/stories/filterTag.stories.d.ts +8 -0
  88. package/lib/components/Filter/components/FilterTag/stories/filterTag.stories.js +21 -0
  89. package/lib/components/Filter/components/FilterTag/utils.d.ts +10 -0
  90. package/lib/components/Filter/components/FilterTag/utils.js +40 -0
  91. package/lib/components/Filter/components/Filters/filters.d.ts +2 -2
  92. package/lib/components/Filter/components/Filters/filters.js +15 -8
  93. package/lib/components/Filter/components/Filters/stories/args.d.ts +3 -0
  94. package/lib/components/Filter/components/Filters/stories/args.js +15 -0
  95. package/lib/components/Filter/components/Filters/stories/constants.d.ts +22 -0
  96. package/lib/components/Filter/components/Filters/stories/constants.js +134 -0
  97. package/lib/components/Filter/components/Filters/stories/filters.stories.d.ts +6 -0
  98. package/lib/components/Filter/components/Filters/stories/filters.stories.js +15 -0
  99. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.d.ts +1 -1
  100. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.js +5 -5
  101. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.js +2 -1
  102. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.d.ts +3 -2
  103. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.js +6 -4
  104. package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.js +2 -1
  105. package/lib/components/Index/components/EntitiesView/components/ChartView/utils.js +2 -0
  106. package/lib/components/Index/table/hook.js +4 -0
  107. package/lib/components/MarkdownRenderer/components/Anchor/anchor.d.ts +19 -0
  108. package/lib/components/MarkdownRenderer/components/Anchor/anchor.js +21 -0
  109. package/lib/components/MarkdownRenderer/components/Table/table.d.ts +3 -0
  110. package/lib/components/MarkdownRenderer/components/Table/table.js +5 -0
  111. package/lib/components/MarkdownRenderer/components/Table/table.styles.d.ts +4 -0
  112. package/lib/components/MarkdownRenderer/components/Table/table.styles.js +40 -0
  113. package/lib/components/MarkdownRenderer/constants.d.ts +2 -0
  114. package/lib/components/MarkdownRenderer/constants.js +6 -0
  115. package/lib/components/MarkdownRenderer/markdownRenderer.d.ts +2 -0
  116. package/lib/components/MarkdownRenderer/markdownRenderer.js +45 -0
  117. package/lib/components/MarkdownRenderer/markdownRenderer.styles.d.ts +4 -0
  118. package/lib/components/MarkdownRenderer/markdownRenderer.styles.js +13 -0
  119. package/lib/components/MarkdownRenderer/types.d.ts +6 -0
  120. package/lib/components/MarkdownRenderer/types.js +1 -0
  121. package/lib/components/Table/columnDef/accessorFn/typeGuards.d.ts +9 -0
  122. package/lib/components/Table/columnDef/accessorFn/typeGuards.js +10 -0
  123. package/lib/components/Table/common/utils.d.ts +2 -2
  124. package/lib/components/Table/common/utils.js +28 -13
  125. package/lib/components/Table/components/TableCell/components/ChipCell/chipCell.d.ts +4 -0
  126. package/lib/components/Table/components/TableCell/components/ChipCell/chipCell.js +8 -0
  127. package/lib/components/Table/components/TableCell/components/LinkCell/linkCell.d.ts +4 -0
  128. package/lib/components/Table/components/TableCell/components/LinkCell/linkCell.js +21 -0
  129. package/lib/components/Table/components/TableCell/components/LinkCell/stories/args.d.ts +6 -0
  130. package/lib/components/Table/components/TableCell/components/LinkCell/stories/args.js +27 -0
  131. package/lib/components/Table/components/TableCell/components/LinkCell/stories/linkCell.stories.d.ts +9 -0
  132. package/lib/components/Table/components/TableCell/components/LinkCell/stories/linkCell.stories.js +18 -0
  133. package/lib/components/Table/components/TableCell/components/LinkCell/stories/types.d.ts +3 -0
  134. package/lib/components/Table/components/TableCell/components/LinkCell/stories/types.js +1 -0
  135. package/lib/components/Table/components/TableCell/components/LinkCell/utils.d.ts +22 -0
  136. package/lib/components/Table/components/TableCell/components/LinkCell/utils.js +45 -0
  137. package/lib/components/Table/components/TableCell/components/MarkdownCell/markdownCell.d.ts +4 -0
  138. package/lib/components/Table/components/TableCell/components/MarkdownCell/markdownCell.js +13 -0
  139. package/lib/components/Table/components/TableCell/components/MarkdownCell/markdownCell.styles.d.ts +3 -0
  140. package/lib/components/Table/components/TableCell/components/MarkdownCell/markdownCell.styles.js +30 -0
  141. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/args.d.ts +4 -0
  142. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/args.js +10 -0
  143. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/constants.d.ts +5 -0
  144. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/constants.js +9 -0
  145. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/markdownCell.stories.d.ts +7 -0
  146. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/markdownCell.stories.js +25 -0
  147. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.d.ts +3 -0
  148. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.js +1 -0
  149. package/lib/components/Table/components/TableCell/components/MarkdownCell/types.d.ts +3 -0
  150. package/lib/components/Table/components/TableCell/components/MarkdownCell/types.js +1 -0
  151. package/lib/components/Table/featureOptions/facetedColumn/getFacetedMinMaxValues.d.ts +8 -0
  152. package/lib/components/Table/featureOptions/facetedColumn/getFacetedMinMaxValues.js +46 -0
  153. package/lib/components/common/Link/typeGuards.d.ts +13 -0
  154. package/lib/components/common/Link/typeGuards.js +21 -0
  155. package/lib/config/entities.d.ts +2 -11
  156. package/lib/hooks/useCategoryFilter.d.ts +8 -13
  157. package/lib/hooks/useCategoryFilter.js +31 -28
  158. package/lib/providers/exploreState/entities.d.ts +5 -3
  159. package/lib/providers/exploreState/payloads/entities.d.ts +6 -2
  160. package/lib/providers/exploreState.d.ts +3 -2
  161. package/lib/providers/exploreState.js +1 -1
  162. package/lib/styles/common/mui/typography.js +1 -0
  163. package/lib/tests/utils.d.ts +24 -0
  164. package/lib/tests/utils.js +34 -0
  165. package/lib/theme/common/components.js +19 -1
  166. package/lib/views/ExploreView/exploreView.js +10 -8
  167. package/package.json +7 -1
  168. package/src/common/categories/config/types.ts +42 -0
  169. package/src/common/categories/config/utils.ts +47 -0
  170. package/src/common/categories/models/range/typeGuards.ts +24 -0
  171. package/src/common/categories/models/range/types.ts +17 -0
  172. package/src/common/categories/models/range/utils.ts +51 -0
  173. package/src/common/categories/models/select/utils.ts +23 -0
  174. package/src/common/categories/models/types.ts +7 -0
  175. package/src/common/categories/views/common/types.ts +11 -0
  176. package/src/common/categories/views/range/typeGuards.ts +13 -0
  177. package/src/common/categories/views/range/types.ts +21 -0
  178. package/src/common/categories/views/range/utils.ts +35 -0
  179. package/src/common/categories/views/select/typeGuards.ts +13 -0
  180. package/src/common/categories/views/select/types.ts +8 -0
  181. package/src/common/categories/views/types.ts +15 -0
  182. package/src/common/entities.ts +8 -26
  183. package/src/components/DataDictionary/components/Entities/entities.tsx +7 -5
  184. package/src/components/DataDictionary/components/Entities/types.ts +5 -9
  185. package/src/components/DataDictionary/components/Entity/entity.tsx +9 -7
  186. package/src/components/DataDictionary/components/Entity/types.ts +5 -9
  187. package/src/components/DataDictionary/components/Outline/utils.ts +5 -2
  188. package/src/components/DataDictionary/components/Table/components/BasicCell/basicCell.tsx +12 -4
  189. package/src/components/DataDictionary/components/Table/components/BasicCell/utils.ts +13 -0
  190. package/src/components/DataDictionary/components/Table/hook.ts +16 -8
  191. package/src/components/DataDictionary/components/Table/options/core/constants.ts +2 -3
  192. package/src/components/DataDictionary/components/Table/options/hook.ts +3 -3
  193. package/src/components/DataDictionary/components/Table/options/sorting/constants.ts +2 -6
  194. package/src/components/DataDictionary/components/Table/table.tsx +4 -1
  195. package/src/components/DataDictionary/components/Table/types.ts +3 -4
  196. package/src/components/DataDictionary/dataDictionary.styles.ts +2 -3
  197. package/src/components/DataDictionary/dataDictionary.tsx +4 -2
  198. package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +9 -2
  199. package/src/components/DataDictionary/hooks/UseDataDictionary/types.ts +5 -9
  200. package/src/components/Filter/components/Filter/filter.tsx +38 -13
  201. package/src/components/Filter/components/Filter/stories/args.ts +24 -0
  202. package/src/components/Filter/components/Filter/stories/filter.stories.tsx +32 -0
  203. package/src/components/Filter/components/FilterMenu/filterMenu.styles.ts +1 -1
  204. package/src/components/Filter/components/FilterMenu/filterMenu.tsx +7 -3
  205. package/src/components/Filter/components/FilterRange/constants.ts +0 -7
  206. package/src/components/Filter/components/FilterRange/filterRange.styles.ts +58 -14
  207. package/src/components/Filter/components/FilterRange/filterRange.tsx +112 -40
  208. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/constants.ts +5 -0
  209. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.ts +51 -10
  210. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/schema.ts +60 -0
  211. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/types.ts +34 -3
  212. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/utils.ts +32 -0
  213. package/src/components/Filter/components/FilterRange/stories/args.ts +16 -0
  214. package/src/components/Filter/components/FilterRange/stories/filterRange.stories.tsx +2 -2
  215. package/src/components/Filter/components/FilterRange/types.ts +12 -6
  216. package/src/components/Filter/components/FilterRange/utils.ts +16 -0
  217. package/src/components/Filter/components/FilterTag/stories/args.ts +22 -0
  218. package/src/components/Filter/components/FilterTag/stories/filterTag.stories.tsx +32 -0
  219. package/src/components/Filter/components/FilterTag/utils.ts +57 -0
  220. package/src/components/Filter/components/Filters/filters.tsx +21 -12
  221. package/src/components/Filter/components/Filters/stories/args.ts +24 -0
  222. package/src/components/Filter/components/Filters/stories/constants.ts +151 -0
  223. package/src/components/Filter/components/Filters/stories/filters.stories.tsx +24 -0
  224. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.tsx +32 -29
  225. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx +9 -1
  226. package/src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx +12 -6
  227. package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +2 -1
  228. package/src/components/Index/components/EntitiesView/components/ChartView/utils.ts +2 -0
  229. package/src/components/Index/table/hook.ts +4 -0
  230. package/src/components/MarkdownRenderer/components/Anchor/anchor.tsx +34 -0
  231. package/src/components/MarkdownRenderer/components/Table/table.styles.ts +41 -0
  232. package/src/components/MarkdownRenderer/components/Table/table.tsx +13 -0
  233. package/src/components/MarkdownRenderer/constants.ts +8 -0
  234. package/src/components/MarkdownRenderer/markdownRenderer.styles.ts +16 -0
  235. package/src/components/MarkdownRenderer/markdownRenderer.tsx +62 -0
  236. package/src/components/MarkdownRenderer/types.ts +7 -0
  237. package/src/components/Table/columnDef/accessorFn/typeGuards.ts +15 -0
  238. package/src/components/Table/common/utils.ts +37 -16
  239. package/src/components/Table/components/TableCell/components/ChipCell/chipCell.tsx +16 -0
  240. package/src/components/Table/components/TableCell/components/LinkCell/linkCell.tsx +64 -0
  241. package/src/components/Table/components/TableCell/components/LinkCell/stories/args.ts +35 -0
  242. package/src/components/Table/components/TableCell/components/LinkCell/stories/linkCell.stories.tsx +32 -0
  243. package/src/components/Table/components/TableCell/components/LinkCell/stories/types.ts +4 -0
  244. package/src/components/Table/components/TableCell/components/LinkCell/utils.ts +59 -0
  245. package/src/components/Table/components/TableCell/components/MarkdownCell/markdownCell.styles.ts +31 -0
  246. package/src/components/Table/components/TableCell/components/MarkdownCell/markdownCell.tsx +29 -0
  247. package/src/components/Table/components/TableCell/components/MarkdownCell/stories/args.ts +17 -0
  248. package/src/components/Table/components/TableCell/components/MarkdownCell/stories/constants.ts +11 -0
  249. package/src/components/Table/components/TableCell/components/MarkdownCell/stories/markdownCell.stories.tsx +37 -0
  250. package/src/components/Table/components/TableCell/components/MarkdownCell/stories/types.ts +4 -0
  251. package/src/components/Table/components/TableCell/components/MarkdownCell/types.ts +3 -0
  252. package/src/components/Table/featureOptions/facetedColumn/getFacetedMinMaxValues.ts +64 -0
  253. package/src/components/common/Link/typeGuards.ts +35 -0
  254. package/src/config/entities.ts +1 -14
  255. package/src/hooks/useCategoryFilter.ts +56 -53
  256. package/src/providers/exploreState/entities.ts +3 -3
  257. package/src/providers/exploreState/initializer/utils.ts +1 -1
  258. package/src/providers/exploreState/payloads/entities.ts +5 -2
  259. package/src/providers/exploreState.tsx +5 -3
  260. package/src/styles/common/mui/typography.ts +1 -0
  261. package/src/tests/utils.ts +44 -0
  262. package/src/theme/common/components.ts +19 -1
  263. package/src/views/ExploreView/exploreView.tsx +17 -22
  264. package/tests/filter.test.tsx +100 -0
  265. package/tests/filterRange.test.tsx +331 -46
  266. package/tests/filters.test.tsx +61 -0
  267. package/tests/getFacetedMinMaxValues.test.ts +166 -0
  268. package/tests/linkCell.test.tsx +89 -0
  269. package/tests/markdownCell.test.tsx +53 -0
  270. package/types/data-explorer-ui.d.ts +2 -0
  271. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +0 -3
  272. package/lib/components/Filter/components/Filter/filter.stories.d.ts +0 -25
  273. package/lib/components/Filter/components/Filter/filter.stories.js +0 -42
  274. package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +0 -16
  275. package/lib/components/Filter/components/FilterTag/filterTag.stories.js +0 -17
  276. package/lib/components/Filter/components/Filters/filters.stories.d.ts +0 -6
  277. package/lib/components/Filter/components/Filters/filters.stories.js +0 -91
  278. package/src/components/DataDictionary/components/Table/components/BasicCell/types.ts +0 -7
  279. package/src/components/Filter/components/Filter/filter.stories.tsx +0 -52
  280. package/src/components/Filter/components/FilterTag/filterTag.stories.tsx +0 -23
  281. package/src/components/Filter/components/Filters/filters.stories.tsx +0 -101
  282. package/tests/filterRangeMock.test.tsx +0 -38
  283. /package/lib/{components/DataDictionary/components/Table/components/BasicCell → common/categories/config}/types.js +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "29.0.2"
2
+ ".": "31.0.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## [31.0.0](https://github.com/DataBiosphere/findable-ui/compare/v30.0.0...v31.0.0) (2025-05-15)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * create data dictionary table cell for displaying markdown ([#453](https://github.com/DataBiosphere/findable-ui/issues/453)) (#480)
9
+ * make data dictionary config generic with attribute as default ([#476](https://github.com/DataBiosphere/findable-ui/issues/476)) (#477)
10
+
11
+ ### Features
12
+
13
+ * create data dictionary table cell for displaying markdown ([#453](https://github.com/DataBiosphere/findable-ui/issues/453)) ([#480](https://github.com/DataBiosphere/findable-ui/issues/480)) ([4ee16e7](https://github.com/DataBiosphere/findable-ui/commit/4ee16e75e66dd56d126ed01773364d6fe5a32ab7))
14
+ * make data dictionary config generic with attribute as default ([#476](https://github.com/DataBiosphere/findable-ui/issues/476)) ([#477](https://github.com/DataBiosphere/findable-ui/issues/477)) ([723585d](https://github.com/DataBiosphere/findable-ui/commit/723585de6e6380eccd5d39f72cbc0aa6db1fc398))
15
+
16
+ ## [30.0.0](https://github.com/DataBiosphere/findable-ui/compare/v29.0.2...v30.0.0) (2025-05-13)
17
+
18
+
19
+ ### ⚠ BREAKING CHANGES
20
+
21
+ * create table cell for displaying links ([#468](https://github.com/DataBiosphere/findable-ui/issues/468)) (#473)
22
+ * create data dictionary chip ([#451](https://github.com/DataBiosphere/findable-ui/issues/451)) (#467)
23
+ * implement filter range in category filters ([#440](https://github.com/DataBiosphere/findable-ui/issues/440)) (#458)
24
+
25
+ ### Features
26
+
27
+ * create data dictionary chip ([#451](https://github.com/DataBiosphere/findable-ui/issues/451)) ([#467](https://github.com/DataBiosphere/findable-ui/issues/467)) ([f3fa731](https://github.com/DataBiosphere/findable-ui/commit/f3fa7315c4266e00f323a466a9d49ab2a8759697))
28
+ * create table cell for displaying links ([#468](https://github.com/DataBiosphere/findable-ui/issues/468)) ([#473](https://github.com/DataBiosphere/findable-ui/issues/473)) ([ac13085](https://github.com/DataBiosphere/findable-ui/commit/ac130852f8dc8200407b2d4c640f6d2d8a871f1b))
29
+ * implement filter range in category filters ([#440](https://github.com/DataBiosphere/findable-ui/issues/440)) ([#458](https://github.com/DataBiosphere/findable-ui/issues/458)) ([70644d1](https://github.com/DataBiosphere/findable-ui/commit/70644d12609e05551ec0d276630b9b8cd686edcf))
30
+ * update data dictionary view to be full width ([#456](https://github.com/DataBiosphere/findable-ui/issues/456)) ([#465](https://github.com/DataBiosphere/findable-ui/issues/465)) ([16e98bd](https://github.com/DataBiosphere/findable-ui/commit/16e98bd9b9e9680bad532126cb760cc117d5690f))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * fix data dictionary basiccell component to render boolean values as string ([#474](https://github.com/DataBiosphere/findable-ui/issues/474)) ([#475](https://github.com/DataBiosphere/findable-ui/issues/475)) ([d754d31](https://github.com/DataBiosphere/findable-ui/commit/d754d31929b09509e30e624edb9aae44b8114876))
36
+ * update table chipcell component interface ([#471](https://github.com/DataBiosphere/findable-ui/issues/471)) ([#472](https://github.com/DataBiosphere/findable-ui/issues/472)) ([992a0f2](https://github.com/DataBiosphere/findable-ui/commit/992a0f24d6f08dcf3fbfab545bad47816f791e11))
37
+
3
38
  ## [29.0.2](https://github.com/DataBiosphere/findable-ui/compare/v29.0.1...v29.0.2) (2025-05-07)
4
39
 
5
40
 
@@ -0,0 +1,28 @@
1
+ import { CategoryKey, DataDictionaryAnnotation, SelectCategoryValueView } from "../../entities";
2
+ import { RangeViewKind } from "../views/range/types";
3
+ import { SelectViewKind } from "../views/select/types";
4
+ /**
5
+ * Category config.
6
+ */
7
+ export type CategoryConfig = RangeCategoryConfig | SelectCategoryConfig;
8
+ /**
9
+ * Common category config.
10
+ */
11
+ export interface CommonCategoryConfig {
12
+ annotation?: DataDictionaryAnnotation;
13
+ key: CategoryKey;
14
+ label: string;
15
+ }
16
+ /**
17
+ * Range category config.
18
+ */
19
+ export interface RangeCategoryConfig extends CommonCategoryConfig, RangeViewKind {
20
+ unit?: string;
21
+ }
22
+ /**
23
+ * Select category config.
24
+ */
25
+ export interface SelectCategoryConfig extends CommonCategoryConfig, SelectViewKind {
26
+ enableChartView?: boolean;
27
+ mapSelectCategoryValue?: (selectCategoryValue: SelectCategoryValueView) => SelectCategoryValueView;
28
+ }
@@ -0,0 +1,31 @@
1
+ import { Category } from "../models/types";
2
+ import { VIEW_KIND } from "../views/types";
3
+ import { CategoryConfig } from "./types";
4
+ /**
5
+ * Returns the category config for the given category config key and view kind.
6
+ * @param viewKind - View kind.
7
+ * @param key - Category config key.
8
+ * @param configs - Category configs.
9
+ * @returns category config.
10
+ */
11
+ export declare function findCategoryConfig<V extends VIEW_KIND>(viewKind: V, key: Category["key"], configs: CategoryConfig[]): Extract<CategoryConfig, {
12
+ viewKind: V;
13
+ }> | undefined;
14
+ /**
15
+ * Returns the range category config for the given category config key.
16
+ * @param key - Category config key.
17
+ * @param configs - Category configs.
18
+ * @returns category config.
19
+ */
20
+ export declare function findRangeCategoryConfig(key: Category["key"], configs: CategoryConfig[]): Extract<CategoryConfig, {
21
+ viewKind: VIEW_KIND.RANGE;
22
+ }> | undefined;
23
+ /**
24
+ * Returns the select category config for the given category config key.
25
+ * @param key - Category config key.
26
+ * @param configs - Category configs.
27
+ * @returns category config.
28
+ */
29
+ export declare function findSelectCategoryConfig(key: Category["key"], configs: CategoryConfig[]): Extract<CategoryConfig, {
30
+ viewKind?: VIEW_KIND.SELECT;
31
+ }> | undefined;
@@ -0,0 +1,29 @@
1
+ import { VIEW_KIND } from "../views/types";
2
+ /**
3
+ * Returns the category config for the given category config key and view kind.
4
+ * @param viewKind - View kind.
5
+ * @param key - Category config key.
6
+ * @param configs - Category configs.
7
+ * @returns category config.
8
+ */
9
+ export function findCategoryConfig(viewKind, key, configs) {
10
+ return configs.find((c) => c.viewKind === viewKind && c.key === key);
11
+ }
12
+ /**
13
+ * Returns the range category config for the given category config key.
14
+ * @param key - Category config key.
15
+ * @param configs - Category configs.
16
+ * @returns category config.
17
+ */
18
+ export function findRangeCategoryConfig(key, configs) {
19
+ return findCategoryConfig(VIEW_KIND.RANGE, key, configs);
20
+ }
21
+ /**
22
+ * Returns the select category config for the given category config key.
23
+ * @param key - Category config key.
24
+ * @param configs - Category configs.
25
+ * @returns category config.
26
+ */
27
+ export function findSelectCategoryConfig(key, configs) {
28
+ return findCategoryConfig(VIEW_KIND.SELECT, key, configs);
29
+ }
@@ -0,0 +1,14 @@
1
+ import { Category } from "../types";
2
+ import { RangeCategory, SelectedRange } from "./types";
3
+ /**
4
+ * Determine if category is a range category.
5
+ * @param category - Category to check if range category.
6
+ * @returns true if category is a range category.
7
+ */
8
+ export declare function isRangeCategory(category: Category): category is RangeCategory;
9
+ /**
10
+ * Determine if value is a selected range.
11
+ * @param value - Value to check if selected range.
12
+ * @returns true if value is a selected range.
13
+ */
14
+ export declare function isSelectedRange(value: unknown): value is SelectedRange;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Determine if category is a range category.
3
+ * @param category - Category to check if range category.
4
+ * @returns true if category is a range category.
5
+ */
6
+ export function isRangeCategory(category) {
7
+ return "max" in category && "min" in category;
8
+ }
9
+ /**
10
+ * Determine if value is a selected range.
11
+ * @param value - Value to check if selected range.
12
+ * @returns true if value is a selected range.
13
+ */
14
+ export function isSelectedRange(value) {
15
+ return (Array.isArray(value) &&
16
+ value.length === 2 &&
17
+ value.every((v) => v === null || typeof v === "number"));
18
+ }
@@ -0,0 +1,15 @@
1
+ import { CategoryKey } from "../../../entities";
2
+ /**
3
+ * Internal filter model of a range category.
4
+ */
5
+ export interface RangeCategory {
6
+ key: CategoryKey;
7
+ max: number;
8
+ min: number;
9
+ selectedMax: SelectedRange[1];
10
+ selectedMin: SelectedRange[0];
11
+ }
12
+ /**
13
+ * Min and max values selected in range category.
14
+ */
15
+ export type SelectedRange = [number | null, number | null];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { CategoryValueKey, SelectedFilter } from "../../../entities";
2
+ import { SelectedRange } from "./types";
3
+ /**
4
+ * Asserts that the given value is a selected range.
5
+ * Throws an error if the value is not a selected range.
6
+ * @param value - Value to assert is a selected range.
7
+ */
8
+ export declare function assertIsRange(value: unknown): asserts value is SelectedRange;
9
+ /**
10
+ * Build the next filter state for the given range category.
11
+ * @param nextCategorySelectedFilter - Next filter state for the range category.
12
+ * @param selectedValue - Selected value for the range category.
13
+ * @param selected - Whether the category value is selected.
14
+ */
15
+ export declare function buildNextRangeFilterState(nextCategorySelectedFilter: SelectedFilter, selectedValue: CategoryValueKey, selected: boolean): void;
16
+ /**
17
+ * Get the selected values for the given category, if any.
18
+ * Handles type checking for selected range.
19
+ * Falls back to empty array if no selected values or invalid type (should never happen).
20
+ * @param categorySelectedFilter - Current filter state for a category.
21
+ * @returns The selected filter (i.e. the set of selected values) for the given category.
22
+ */
23
+ export declare function getRangeSelectedValue(categorySelectedFilter?: SelectedFilter): SelectedRange;
@@ -0,0 +1,41 @@
1
+ import { isSelectedRange } from "./typeGuards";
2
+ /**
3
+ * Asserts that the given value is a selected range.
4
+ * Throws an error if the value is not a selected range.
5
+ * @param value - Value to assert is a selected range.
6
+ */
7
+ export function assertIsRange(value) {
8
+ if (!isSelectedRange(value)) {
9
+ throw new Error("Value is not SelectedRange");
10
+ }
11
+ }
12
+ /**
13
+ * Build the next filter state for the given range category.
14
+ * @param nextCategorySelectedFilter - Next filter state for the range category.
15
+ * @param selectedValue - Selected value for the range category.
16
+ * @param selected - Whether the category value is selected.
17
+ */
18
+ export function buildNextRangeFilterState(nextCategorySelectedFilter, selectedValue, selected) {
19
+ if (selected) {
20
+ // Assert that the selected value is a range.
21
+ assertIsRange(selectedValue);
22
+ // Set the selected range.
23
+ nextCategorySelectedFilter.value = selectedValue;
24
+ }
25
+ else {
26
+ // Remove the selected range.
27
+ nextCategorySelectedFilter.value = [];
28
+ }
29
+ }
30
+ /**
31
+ * Get the selected values for the given category, if any.
32
+ * Handles type checking for selected range.
33
+ * Falls back to empty array if no selected values or invalid type (should never happen).
34
+ * @param categorySelectedFilter - Current filter state for a category.
35
+ * @returns The selected filter (i.e. the set of selected values) for the given category.
36
+ */
37
+ export function getRangeSelectedValue(categorySelectedFilter) {
38
+ return isSelectedRange(categorySelectedFilter?.value)
39
+ ? categorySelectedFilter?.value
40
+ : [null, null];
41
+ }
@@ -0,0 +1,8 @@
1
+ import { CategoryValueKey, SelectedFilter } from "../../../entities";
2
+ /**
3
+ * Build the next filter state for the given select category.
4
+ * @param nextCategorySelectedFilter - Next filter state for the select category.
5
+ * @param selectedValue - Selected value for the select category.
6
+ * @param selected - Whether the category value is selected.
7
+ */
8
+ export declare function buildNextSelectFilterState(nextCategorySelectedFilter: SelectedFilter, selectedValue: CategoryValueKey, selected: boolean): void;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Build the next filter state for the given select category.
3
+ * @param nextCategorySelectedFilter - Next filter state for the select category.
4
+ * @param selectedValue - Selected value for the select category.
5
+ * @param selected - Whether the category value is selected.
6
+ */
7
+ export function buildNextSelectFilterState(nextCategorySelectedFilter, selectedValue, selected) {
8
+ if (selected) {
9
+ // Set the selected value.
10
+ nextCategorySelectedFilter.value.push(selectedValue);
11
+ }
12
+ else {
13
+ // Remove the selected value from the selected set of values.
14
+ nextCategorySelectedFilter.value = nextCategorySelectedFilter.value.filter((value) => value !== selectedValue);
15
+ }
16
+ }
@@ -0,0 +1,6 @@
1
+ import { SelectCategory } from "../../entities";
2
+ import { RangeCategory } from "./range/types";
3
+ /**
4
+ * Internal filter model of a category.
5
+ */
6
+ export type Category = SelectCategory | RangeCategory;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { CategoryKey, DataDictionaryAnnotation } from "../../../entities";
2
+ /**
3
+ * Common properties for category views.
4
+ */
5
+ export interface BaseCategoryView {
6
+ annotation?: DataDictionaryAnnotation;
7
+ isDisabled?: boolean;
8
+ key: CategoryKey;
9
+ label: string;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { CategoryView } from "../types";
2
+ import { RangeCategoryView } from "./types";
3
+ /**
4
+ * Returns true if the category view is a range category view.
5
+ * @param view - Category view.
6
+ * @returns true if the category view is a range category view.
7
+ */
8
+ export declare function isRangeCategoryView(view: CategoryView): view is RangeCategoryView;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns true if the category view is a range category view.
3
+ * @param view - Category view.
4
+ * @returns true if the category view is a range category view.
5
+ */
6
+ export function isRangeCategoryView(view) {
7
+ return "max" in view && "min" in view;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { SelectedRange } from "../../models/range/types";
2
+ import { BaseCategoryView } from "../common/types";
3
+ import { VIEW_KIND } from "../types";
4
+ /**
5
+ * View model of range category.
6
+ */
7
+ export interface RangeCategoryView extends BaseCategoryView {
8
+ max: number;
9
+ min: number;
10
+ selectedMax: SelectedRange[1];
11
+ selectedMin: SelectedRange[0];
12
+ unit?: string;
13
+ }
14
+ /**
15
+ * Model of range category view kind.
16
+ */
17
+ export interface RangeViewKind {
18
+ viewKind: VIEW_KIND.RANGE;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { SelectedFilter } from "../../../entities";
2
+ import { CategoryConfig } from "../../config/types";
3
+ import { RangeCategory } from "../../models/range/types";
4
+ import { RangeCategoryView } from "../../views/range/types";
5
+ /**
6
+ * Build the view-specific model of the given range category.
7
+ * @param category - The range category to build a view model of.
8
+ * @param categoryConfigs - Category configs indicating accept list as well as label configuration.
9
+ * @param categorySelectedFilter - Current filter state for a category.
10
+ * @returns Full built range category view, ready for display.
11
+ */
12
+ export declare function buildRangeCategoryView(category: RangeCategory, categoryConfigs: CategoryConfig[], categorySelectedFilter?: SelectedFilter): RangeCategoryView;
@@ -0,0 +1,24 @@
1
+ import { findRangeCategoryConfig } from "../../config/utils";
2
+ import { getRangeSelectedValue } from "../../models/range/utils";
3
+ /**
4
+ * Build the view-specific model of the given range category.
5
+ * @param category - The range category to build a view model of.
6
+ * @param categoryConfigs - Category configs indicating accept list as well as label configuration.
7
+ * @param categorySelectedFilter - Current filter state for a category.
8
+ * @returns Full built range category view, ready for display.
9
+ */
10
+ export function buildRangeCategoryView(category, categoryConfigs, categorySelectedFilter) {
11
+ const categoryConfig = findRangeCategoryConfig(category.key, categoryConfigs);
12
+ const [selectedMin, selectedMax] = getRangeSelectedValue(categorySelectedFilter);
13
+ return {
14
+ annotation: categoryConfig?.annotation,
15
+ isDisabled: false,
16
+ key: category.key,
17
+ label: categoryConfig?.label || category.key,
18
+ max: category.max,
19
+ min: category.min,
20
+ selectedMax,
21
+ selectedMin,
22
+ unit: categoryConfig?.unit,
23
+ };
24
+ }
@@ -0,0 +1,8 @@
1
+ import { SelectCategoryView } from "../../../entities";
2
+ import { CategoryView } from "../types";
3
+ /**
4
+ * Returns true if the category view is a select category view.
5
+ * @param view - Category view.
6
+ * @returns true if the category view is a select category view.
7
+ */
8
+ export declare function isSelectCategoryView(view: CategoryView): view is SelectCategoryView;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns true if the category view is a select category view.
3
+ * @param view - Category view.
4
+ * @returns true if the category view is a select category view.
5
+ */
6
+ export function isSelectCategoryView(view) {
7
+ return "values" in view;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { VIEW_KIND } from "../types";
2
+ /**
3
+ * Model of select category view kind.
4
+ */
5
+ export interface SelectViewKind {
6
+ viewKind?: VIEW_KIND.SELECT;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { SelectCategoryView } from "../../entities";
2
+ import { RangeCategoryView } from "./range/types";
3
+ /**
4
+ * Possible category view model types.
5
+ */
6
+ export type CategoryView = RangeCategoryView | SelectCategoryView;
7
+ /**
8
+ * Category view kind.
9
+ */
10
+ export declare enum VIEW_KIND {
11
+ RANGE = "RANGE",
12
+ SELECT = "SELECT"
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Category view kind.
3
+ */
4
+ export var VIEW_KIND;
5
+ (function (VIEW_KIND) {
6
+ VIEW_KIND["RANGE"] = "RANGE";
7
+ VIEW_KIND["SELECT"] = "SELECT";
8
+ })(VIEW_KIND || (VIEW_KIND = {}));
@@ -1,4 +1,4 @@
1
- import { ColumnDef } from "@tanstack/react-table";
1
+ import { ColumnDef, RowData } from "@tanstack/react-table";
2
2
  /**
3
3
  * Model of a value of a metadata class.
4
4
  */
@@ -16,10 +16,6 @@ export interface Attribute {
16
16
  title: string;
17
17
  values?: string;
18
18
  }
19
- /**
20
- * Model of attribute key types; used mostly when building data dictionary column definitions.
21
- */
22
- export type AttributeValueTypes = string | boolean;
23
19
  /**
24
20
  * Filterable metadata keys.
25
21
  */
@@ -35,8 +31,8 @@ export interface CategoryTag {
35
31
  /**
36
32
  * Model of a metadata class, to be specified manually or built from LinkML schema.
37
33
  */
38
- export interface Class {
39
- attributes: Attribute[];
34
+ export interface Class<T extends RowData = Attribute> {
35
+ attributes: T[];
40
36
  description: string;
41
37
  name: string;
42
38
  title: string;
@@ -53,34 +49,23 @@ export type DataDictionaryPrefix = Record<string, string>;
53
49
  /**
54
50
  * Model of a metadata dictionary containing a set of classes and their definitions.
55
51
  */
56
- export interface DataDictionary {
52
+ export interface DataDictionary<T extends RowData = Attribute> {
57
53
  annotations?: {
58
54
  [key in keyof DataDictionaryPrefix]: string;
59
55
  };
60
- classes: Class[];
56
+ classes: Class<T>[];
61
57
  description?: string;
62
58
  name: string;
63
59
  prefixes?: DataDictionaryPrefix;
64
60
  title: string;
65
61
  }
66
- /**
67
- * Display model of a data dictionary column.
68
- */
69
- export interface DataDictionaryColumnDef {
70
- attributeDisplayName: string;
71
- attributeSlotName: string;
72
- width: {
73
- max: string;
74
- min: string;
75
- };
76
- }
77
62
  /**
78
63
  * Configuration of data dictionary; contains schema definition (that is, the actual data
79
64
  * dictionary) as well as column def for displaying the data dictionary.
80
65
  */
81
- export interface DataDictionaryConfig {
82
- columnDefs: ColumnDef<Attribute, AttributeValueTypes>[];
83
- dataDictionary: DataDictionary;
66
+ export interface DataDictionaryConfig<T extends RowData = Attribute> {
67
+ columnDefs: ColumnDef<T, T[keyof T]>[];
68
+ dataDictionary: DataDictionary<T>;
84
69
  }
85
70
  /**
86
71
  * Label and description values from a data dictionary that are added to a site
@@ -1,2 +1,4 @@
1
+ import { RowData } from "@tanstack/react-table";
2
+ import { Attribute } from "../../../../common/entities";
1
3
  import { ClassesProps } from "./types";
2
- export declare const Entities: ({ classes, columnDefs, spacing, }: ClassesProps) => JSX.Element;
4
+ export declare const Entities: <T extends RowData = Attribute>({ classes, columnDefs, spacing, }: ClassesProps<T>) => JSX.Element;
@@ -3,5 +3,5 @@ import React from "react";
3
3
  import { Entity } from "../Entity/entity";
4
4
  import { GRID_PROPS } from "./constants";
5
5
  export const Entities = ({ classes, columnDefs, spacing, }) => {
6
- return (React.createElement(Grid, { ...GRID_PROPS }, classes.map((classData) => (React.createElement(Entity, { key: classData.name, class: classData, columnDefs: columnDefs, spacing: spacing })))));
6
+ return (React.createElement(Grid, { ...GRID_PROPS }, classes.map((cls) => (React.createElement(Entity, { key: cls.name, class: cls, columnDefs: columnDefs, spacing: spacing })))));
7
7
  };
@@ -1,8 +1,8 @@
1
- import { ColumnDef } from "@tanstack/react-table";
2
- import { Attribute, AttributeValueTypes, Class } from "../../../../common/entities";
1
+ import { ColumnDef, RowData } from "@tanstack/react-table";
2
+ import { Attribute, Class } from "../../../../common/entities";
3
3
  import { LayoutSpacing } from "../../hooks/UseLayoutSpacing/types";
4
- export interface ClassesProps {
5
- classes: Class[];
6
- columnDefs: ColumnDef<Attribute, AttributeValueTypes>[];
4
+ export interface ClassesProps<T extends RowData = Attribute> {
5
+ classes: Class<T>[];
6
+ columnDefs: ColumnDef<T, T[keyof T]>[];
7
7
  spacing?: LayoutSpacing;
8
8
  }
@@ -1,2 +1,4 @@
1
+ import { RowData } from "@tanstack/react-table";
2
+ import { Attribute } from "../../../../common/entities";
1
3
  import { EntityProps } from "./types";
2
- export declare const Entity: ({ class: classData, columnDefs, spacing, }: EntityProps) => JSX.Element;
4
+ export declare const Entity: <T extends RowData = Attribute>({ class: cls, columnDefs, spacing, }: EntityProps<T>) => JSX.Element;
@@ -6,14 +6,14 @@ import { useTable } from "../Table/hook";
6
6
  import { Table } from "../Table/table";
7
7
  import { GRID_PROPS } from "./constants";
8
8
  import { StyledTypography } from "./entity.styles";
9
- export const Entity = ({ class: classData, columnDefs, spacing, }) => {
10
- const table = useTable(classData.attributes, columnDefs);
9
+ export const Entity = ({ class: cls, columnDefs, spacing, }) => {
10
+ const table = useTable(cls.attributes, columnDefs);
11
11
  return (React.createElement(Grid, { ...GRID_PROPS, rowGap: 4 },
12
12
  React.createElement(Grid, { ...GRID_PROPS, rowGap: 1 },
13
- React.createElement(StyledTypography, { component: "h3", id: classData.name, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL, ...spacing },
14
- classData.title,
13
+ React.createElement(StyledTypography, { component: "h3", id: cls.name, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL, ...spacing },
14
+ cls.title,
15
15
  " ",
16
- React.createElement(AnchorLink, { anchorLink: classData.name })),
17
- React.createElement(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_400_2_LINES }, classData.description)),
16
+ React.createElement(AnchorLink, { anchorLink: cls.name })),
17
+ React.createElement(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_400_2_LINES }, cls.description)),
18
18
  React.createElement(Table, { table: table })));
19
19
  };
@@ -1,8 +1,8 @@
1
- import { ColumnDef } from "@tanstack/react-table";
2
- import { Attribute, AttributeValueTypes, Class } from "../../../../common/entities";
1
+ import { ColumnDef, RowData } from "@tanstack/react-table";
2
+ import { Attribute, Class } from "../../../../common/entities";
3
3
  import { LayoutSpacing } from "../../hooks/UseLayoutSpacing/types";
4
- export interface EntityProps {
5
- class: Class;
6
- columnDefs: ColumnDef<Attribute, AttributeValueTypes>[];
4
+ export interface EntityProps<T extends RowData = Attribute> {
5
+ class: Class<T>;
6
+ columnDefs: ColumnDef<T, T[keyof T]>[];
7
7
  spacing?: LayoutSpacing;
8
8
  }
@@ -1,8 +1,9 @@
1
- import { Class } from "../../../../common/entities";
1
+ import { RowData } from "@tanstack/react-table";
2
+ import { Attribute, Class } from "../../../../common/entities";
2
3
  import { OutlineItem } from "../../../Layout/components/Outline/types";
3
4
  /**
4
5
  * Returns outline items from classes.
5
6
  * @param classes - Class entities.
6
7
  * @returns Outline items.
7
8
  */
8
- export declare function buildClassesOutline(classes: Class[]): OutlineItem[];
9
+ export declare function buildClassesOutline<T extends RowData = Attribute>(classes: Class<T>[]): OutlineItem[];
@@ -1,2 +1,3 @@
1
- import { BasicCellProps } from "./types";
2
- export declare const BasicCell: ({ getValue }: BasicCellProps) => JSX.Element;
1
+ import { CellContext, RowData } from "@tanstack/react-table";
2
+ import React, { ReactNode } from "react";
3
+ export declare const BasicCell: <T extends RowData, TValue extends ReactNode = React.ReactNode>({ getValue, }: CellContext<T, TValue>) => JSX.Element | null;
@@ -1,6 +1,10 @@
1
1
  import { Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import { TYPOGRAPHY_PROPS } from "../../../../../../styles/common/mui/typography";
4
- export const BasicCell = ({ getValue }) => {
5
- return (React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.INHERIT }, getValue()));
4
+ import { parseValue } from "./utils";
5
+ export const BasicCell = ({ getValue, }) => {
6
+ const value = getValue();
7
+ if (value === undefined || value === null)
8
+ return null;
9
+ return (React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.INHERIT }, parseValue(value)));
6
10
  };