@databiosphere/findable-ui 25.0.0 → 26.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 (351) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +56 -0
  3. package/lib/common/entities.d.ts +25 -0
  4. package/lib/components/DataDictionary/common/utils.js +10 -8
  5. package/lib/components/DataDictionary/components/Entities/entities.d.ts +1 -1
  6. package/lib/components/DataDictionary/components/Entities/entities.js +2 -2
  7. package/lib/components/DataDictionary/components/Entities/types.d.ts +3 -1
  8. package/lib/components/DataDictionary/components/Entity/entity.d.ts +1 -1
  9. package/lib/components/DataDictionary/components/Entity/entity.js +2 -2
  10. package/lib/components/DataDictionary/components/Entity/types.d.ts +3 -1
  11. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +1 -2
  12. package/lib/components/DataDictionary/components/Table/hook.d.ts +2 -2
  13. package/lib/components/DataDictionary/components/Table/hook.js +2 -3
  14. package/lib/components/DataDictionary/dataDictionary.js +2 -2
  15. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +7 -2
  16. package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +3 -1
  17. package/lib/components/Detail/components/Table/stories/args.d.ts +27 -0
  18. package/lib/components/Detail/components/Table/stories/args.js +100 -0
  19. package/lib/components/Detail/components/Table/stories/constants.d.ts +4 -0
  20. package/lib/components/Detail/components/Table/stories/constants.js +11 -0
  21. package/lib/components/Detail/components/Table/stories/filter/args.d.ts +5 -0
  22. package/lib/components/Detail/components/Table/stories/filter/args.js +50 -0
  23. package/lib/components/Detail/components/Table/stories/filter/filter.stories.d.ts +11 -0
  24. package/lib/components/Detail/components/Table/stories/filter/filter.stories.js +78 -0
  25. package/lib/components/Detail/components/Table/stories/table.stories.d.ts +6 -0
  26. package/lib/components/Detail/components/Table/stories/table.stories.js +19 -0
  27. package/lib/components/Detail/components/Table/table.js +2 -0
  28. package/lib/components/Export/components/ExportMethod/exportMethod.d.ts +2 -2
  29. package/lib/components/Export/components/ExportMethod/exportMethod.styles.js +1 -1
  30. package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.js +2 -1
  31. package/lib/components/Filter/components/Filter/filter.js +2 -1
  32. package/lib/components/Filter/components/FilterRange/constants.d.ts +8 -0
  33. package/lib/components/Filter/components/FilterRange/constants.js +27 -0
  34. package/lib/components/Filter/components/FilterRange/filterRange.d.ts +2 -0
  35. package/lib/components/Filter/components/FilterRange/filterRange.js +26 -0
  36. package/lib/components/Filter/components/FilterRange/filterRange.styles.d.ts +4 -0
  37. package/lib/components/Filter/components/FilterRange/filterRange.styles.js +66 -0
  38. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.d.ts +2 -0
  39. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.js +14 -0
  40. package/lib/components/Filter/components/FilterRange/hooks/UseFilterRange/types.d.ts +8 -0
  41. package/lib/components/Filter/components/FilterRange/stories/filterRange.stories.d.ts +6 -0
  42. package/lib/components/Filter/components/FilterRange/stories/filterRange.stories.js +9 -0
  43. package/lib/components/Filter/components/FilterRange/types.d.ts +8 -0
  44. package/lib/components/Filter/components/FilterRange/types.js +6 -0
  45. package/lib/components/Filter/components/Filters/filters.js +2 -1
  46. package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.d.ts +3 -2
  47. package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.js +2 -2
  48. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.js +3 -2
  49. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.js +2 -1
  50. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js +1 -2
  51. package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.js +3 -2
  52. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +1 -1
  53. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +5 -2
  54. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +2 -1
  55. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +2 -1
  56. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +10 -7
  57. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +6 -0
  58. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +4 -4
  59. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +1 -2
  60. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +1 -0
  61. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +0 -1
  62. package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +2 -0
  63. package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +1 -1
  64. package/lib/components/Index/components/EntitiesView/entitiesView.js +3 -2
  65. package/lib/components/Index/components/EntitiesView/types.d.ts +2 -2
  66. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +2 -1
  67. package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.d.ts +1 -1
  68. package/lib/components/Layout/components/Outline/outline.styles.js +1 -2
  69. package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.js +2 -1
  70. package/lib/components/Layout/components/Sidebar/sidebar.js +4 -1
  71. package/lib/components/Loading/loading.styles.js +2 -1
  72. package/lib/components/Login/components/Button/constants.js +2 -3
  73. package/lib/components/Login/components/Button/types.d.ts +1 -1
  74. package/lib/components/Login/components/Buttons/types.d.ts +1 -1
  75. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +4 -4
  76. package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +2 -2
  77. package/lib/components/Table/columnDef/columnFilters/filterFn.d.ts +13 -0
  78. package/lib/components/Table/columnDef/columnFilters/filterFn.js +22 -0
  79. package/lib/components/Table/common/columnDef.js +2 -0
  80. package/lib/components/Table/common/utils.d.ts +1 -13
  81. package/lib/components/Table/common/utils.js +1 -23
  82. package/lib/components/Table/components/Pagination/pagination.js +3 -2
  83. package/lib/components/Table/components/PaginationSummary/paginationSummary.js +2 -1
  84. package/lib/components/Table/components/TableRows/tableRows.js +7 -3
  85. package/lib/components/Table/table.js +3 -1
  86. package/lib/components/TableCreator/tableCreator.js +12 -3
  87. package/lib/components/common/Button/components/ButtonOutline/buttonOutline.styles.js +7 -7
  88. package/lib/components/common/Button/constants.d.ts +2 -0
  89. package/lib/components/common/Button/constants.js +21 -0
  90. package/lib/components/common/LoginDialog/loginDialog.styles.js +2 -3
  91. package/lib/components/types.d.ts +3 -0
  92. package/lib/config/entities.d.ts +3 -3
  93. package/lib/config/utils.js +1 -1
  94. package/lib/hooks/useEntityList.js +2 -1
  95. package/lib/hooks/useEntityService.js +1 -1
  96. package/lib/hooks/useExploreMode/types.d.ts +6 -0
  97. package/lib/hooks/useExploreMode/types.js +6 -0
  98. package/lib/hooks/{useExploreMode.d.ts → useExploreMode/useExploreMode.d.ts} +1 -6
  99. package/lib/hooks/{useExploreMode.js → useExploreMode/useExploreMode.js} +1 -7
  100. package/lib/hooks/useFetchEntity.js +2 -1
  101. package/lib/styles/common/constants/colorMixes.d.ts +18 -0
  102. package/lib/styles/common/constants/colorMixes.js +19 -0
  103. package/lib/styles/common/constants/shadows.d.ts +5 -0
  104. package/lib/styles/common/constants/shadows.js +5 -0
  105. package/lib/styles/common/mui/button.d.ts +10 -2
  106. package/lib/styles/common/mui/button.js +12 -2
  107. package/lib/tests/mui/constants.d.ts +1 -0
  108. package/lib/tests/mui/constants.js +1 -0
  109. package/lib/tests/testIds.d.ts +19 -0
  110. package/lib/tests/testIds.js +19 -0
  111. package/lib/theme/common/components.d.ts +2 -3
  112. package/lib/theme/common/components.js +47 -51
  113. package/lib/theme/common/palette.d.ts +0 -44
  114. package/lib/theme/common/palette.js +27 -82
  115. package/lib/theme/common/shadows.d.ts +2 -28
  116. package/lib/theme/common/shadows.js +27 -32
  117. package/lib/theme/components/muiAlert.js +5 -5
  118. package/lib/theme/theme.js +7 -7
  119. package/lib/views/ExploreView/exploreView.js +4 -3
  120. package/package.json +4 -4
  121. package/src/common/entities.ts +30 -0
  122. package/src/components/DataDictionary/common/utils.ts +12 -8
  123. package/src/components/DataDictionary/components/Entities/entities.tsx +11 -2
  124. package/src/components/DataDictionary/components/Entities/types.ts +3 -1
  125. package/src/components/DataDictionary/components/Entity/entity.tsx +2 -1
  126. package/src/components/DataDictionary/components/Entity/types.ts +3 -1
  127. package/src/components/DataDictionary/components/Table/components/BasicCell/types.ts +1 -2
  128. package/src/components/DataDictionary/components/Table/hook.ts +6 -4
  129. package/src/components/DataDictionary/dataDictionary.tsx +2 -2
  130. package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +8 -2
  131. package/src/components/DataDictionary/hooks/UseDataDictionary/types.ts +3 -1
  132. package/src/components/Detail/components/Table/stories/args.ts +104 -0
  133. package/src/components/Detail/components/Table/stories/constants.ts +15 -0
  134. package/src/components/Detail/components/Table/stories/filter/args.ts +54 -0
  135. package/src/components/Detail/components/Table/stories/filter/filter.stories.tsx +90 -0
  136. package/src/components/Detail/components/Table/stories/table.stories.tsx +32 -0
  137. package/src/components/Detail/components/Table/table.tsx +2 -0
  138. package/src/components/Export/components/ExportMethod/exportMethod.styles.ts +1 -1
  139. package/src/components/Export/components/ExportMethod/exportMethod.tsx +3 -2
  140. package/src/components/Filter/components/ClearAllFilters/clearAllFilters.tsx +7 -1
  141. package/src/components/Filter/components/Filter/filter.tsx +2 -0
  142. package/src/components/Filter/components/FilterRange/constants.ts +41 -0
  143. package/src/components/Filter/components/FilterRange/filterRange.styles.ts +71 -0
  144. package/src/components/Filter/components/FilterRange/filterRange.tsx +71 -0
  145. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/hook.ts +20 -0
  146. package/src/components/Filter/components/FilterRange/hooks/UseFilterRange/types.ts +9 -0
  147. package/src/components/Filter/components/FilterRange/stories/filterRange.stories.tsx +15 -0
  148. package/src/components/Filter/components/FilterRange/types.ts +9 -0
  149. package/src/components/Filter/components/Filters/filters.tsx +7 -1
  150. package/src/components/Filter/components/HighlightedLabel/highlightedLabel.tsx +4 -2
  151. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx +14 -2
  152. package/src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx +2 -0
  153. package/src/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.ts +1 -2
  154. package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +14 -2
  155. package/src/components/Index/components/EntitiesView/components/ChartView/chartView.tsx +2 -1
  156. package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.ts +3 -1
  157. package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.ts +10 -7
  158. package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.ts +10 -4
  159. package/src/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.tsx +1 -2
  160. package/src/components/Index/components/EntitiesView/components/ChartView/stories/args.ts +1 -0
  161. package/src/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.tsx +0 -1
  162. package/src/components/Index/components/EntitiesView/components/ChartView/types.ts +2 -0
  163. package/src/components/Index/components/EntitiesView/entitiesView.tsx +2 -2
  164. package/src/components/Index/components/EntitiesView/types.ts +2 -2
  165. package/src/components/Index/components/Hero/components/ExportButton/exportButton.tsx +2 -0
  166. package/src/components/Layout/components/Outline/outline.styles.ts +1 -2
  167. package/src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.tsx +2 -0
  168. package/src/components/Layout/components/Sidebar/sidebar.tsx +4 -1
  169. package/src/components/Loading/loading.styles.ts +2 -1
  170. package/src/components/Login/components/Button/constants.ts +2 -3
  171. package/src/components/Login/components/Button/types.ts +1 -1
  172. package/src/components/Login/components/Buttons/types.ts +1 -1
  173. package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +4 -4
  174. package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +2 -2
  175. package/src/components/Table/columnDef/columnFilters/filterFn.ts +27 -0
  176. package/src/components/Table/common/columnDef.ts +2 -0
  177. package/src/components/Table/common/utils.ts +1 -27
  178. package/src/components/Table/components/Pagination/pagination.tsx +3 -2
  179. package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +2 -1
  180. package/src/components/Table/components/TableRows/tableRows.tsx +10 -3
  181. package/src/components/Table/table.tsx +3 -1
  182. package/src/components/TableCreator/tableCreator.tsx +17 -3
  183. package/src/components/common/Button/components/ButtonOutline/buttonOutline.styles.ts +7 -7
  184. package/src/components/common/Button/constants.ts +23 -0
  185. package/src/components/common/LoginDialog/loginDialog.styles.ts +2 -3
  186. package/src/components/types.ts +4 -0
  187. package/src/config/entities.ts +3 -3
  188. package/src/config/utils.ts +1 -1
  189. package/src/hooks/useEntityList.ts +2 -1
  190. package/src/hooks/useEntityService.ts +1 -1
  191. package/src/hooks/useExploreMode/types.ts +7 -0
  192. package/src/hooks/{useExploreMode.ts → useExploreMode/useExploreMode.ts} +2 -9
  193. package/src/hooks/useFetchEntity.tsx +2 -1
  194. package/src/styles/common/constants/colorMixes.ts +20 -0
  195. package/src/styles/common/constants/shadows.ts +5 -0
  196. package/src/styles/common/mui/button.ts +20 -2
  197. package/src/tests/mui/constants.ts +1 -0
  198. package/src/tests/testIds.ts +19 -0
  199. package/src/theme/common/components.ts +47 -59
  200. package/src/theme/common/palette.ts +27 -86
  201. package/src/theme/common/shadows.ts +28 -33
  202. package/src/theme/components/muiAlert.ts +5 -5
  203. package/src/theme/theme.ts +50 -51
  204. package/src/views/ExploreView/exploreView.tsx +8 -3
  205. package/tests/chart.test.tsx +113 -22
  206. package/tests/chartView.test.tsx +12 -0
  207. package/tests/entitiesView.test.tsx +7 -11
  208. package/tests/filterRange.test.tsx +87 -0
  209. package/tests/filterRangeMock.test.tsx +38 -0
  210. package/tests/tableFilter.test.tsx +90 -0
  211. package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +0 -6
  212. package/lib/components/DataDictionary/components/Table/columns/columnDef.js +0 -33
  213. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +0 -5
  214. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +0 -5
  215. package/lib/components/DataDictionary/components/Table/columns/types.d.ts +0 -2
  216. package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +0 -8
  217. package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +0 -36
  218. package/lib/components/Index/components/Cell/cell.d.ts +0 -7
  219. package/lib/components/Index/components/Cell/cell.js +0 -10
  220. package/lib/components/Index/components/EntitiesView/constants.d.ts +0 -1
  221. package/lib/components/Index/components/EntitiesView/constants.js +0 -1
  222. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +0 -8
  223. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +0 -57
  224. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +0 -4
  225. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +0 -10
  226. package/lib/components/Index/components/NTag/nTag.d.ts +0 -10
  227. package/lib/components/Index/components/NTag/nTag.js +0 -8
  228. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +0 -11
  229. package/lib/components/Index/components/NTagCell/nTagCell.js +0 -29
  230. package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +0 -5
  231. package/lib/components/Index/components/NTagCell/nTagCell.stories.js +0 -16
  232. package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
  233. package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
  234. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
  235. package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
  236. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +0 -6
  237. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +0 -10
  238. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +0 -5
  239. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +0 -29
  240. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +0 -6
  241. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +0 -13
  242. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +0 -36
  243. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +0 -9
  244. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +0 -5
  245. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +0 -10
  246. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +0 -36
  247. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +0 -9
  248. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +0 -5
  249. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +0 -19
  250. package/lib/components/Layout/components/Outline/common/constants.d.ts +0 -2
  251. package/lib/components/Layout/components/Outline/common/constants.js +0 -1
  252. package/lib/components/Login/login.stories.d.ts +0 -6
  253. package/lib/components/Login/login.stories.js +0 -31
  254. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +0 -16
  255. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +0 -28
  256. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +0 -5
  257. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +0 -46
  258. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +0 -3
  259. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +0 -21
  260. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +0 -2
  261. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +0 -37
  262. package/lib/components/TableCreator/common/constants.d.ts +0 -6
  263. package/lib/components/TableCreator/common/constants.js +0 -19
  264. package/lib/components/TableCreator/common/entities.d.ts +0 -5
  265. package/lib/components/TableCreator/common/entities.js +0 -1
  266. package/lib/components/TableCreator/tableCreator.styles.d.ts +0 -4
  267. package/lib/components/TableCreator/tableCreator.styles.js +0 -4
  268. package/lib/components/common/Alert/alert.stories.d.ts +0 -6
  269. package/lib/components/common/Alert/alert.stories.js +0 -36
  270. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
  271. package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
  272. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
  273. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
  274. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
  275. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
  276. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
  277. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
  278. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
  279. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
  280. package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +0 -3
  281. package/lib/components/common/Button/components/LoginButton/loginButton.js +0 -6
  282. package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +0 -7
  283. package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +0 -11
  284. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +0 -5
  285. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +0 -10
  286. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +0 -3
  287. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +0 -9
  288. package/lib/hooks/useAuthentication/common/constants.d.ts +0 -4
  289. package/lib/hooks/useAuthentication/common/constants.js +0 -19
  290. package/lib/hooks/useAuthentication/common/entities.d.ts +0 -25
  291. package/lib/hooks/useAuthentication/common/entities.js +0 -11
  292. package/lib/hooks/useAuthentication/common/utils.d.ts +0 -15
  293. package/lib/hooks/useAuthentication/common/utils.js +0 -25
  294. package/lib/hooks/useAuthentication/useAuthentication.d.ts +0 -6
  295. package/lib/hooks/useAuthentication/useAuthentication.js +0 -9
  296. package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +0 -6
  297. package/lib/hooks/useAuthentication/useAuthenticationComplete.js +0 -55
  298. package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +0 -20
  299. package/lib/hooks/useAuthentication/useAuthenticationForm.js +0 -88
  300. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +0 -18
  301. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +0 -50
  302. package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +0 -20
  303. package/lib/hooks/useAuthentication/useAuthenticationStatus.js +0 -32
  304. package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +0 -21
  305. package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +0 -41
  306. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +0 -18
  307. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +0 -62
  308. package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +0 -24
  309. package/lib/hooks/useAuthentication/useFetchTerraProfile.js +0 -62
  310. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +0 -15
  311. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +0 -62
  312. package/lib/hooks/useAuthentication/useTokenClient.d.ts +0 -11
  313. package/lib/hooks/useAuthentication/useTokenClient.js +0 -29
  314. package/lib/hooks/useAuthenticationConfig.d.ts +0 -6
  315. package/lib/hooks/useAuthenticationConfig.js +0 -14
  316. package/lib/hooks/useCategoryConfigs.d.ts +0 -6
  317. package/lib/hooks/useCategoryConfigs.js +0 -17
  318. package/lib/hooks/useEntityListRelatedView.d.ts +0 -15
  319. package/lib/hooks/useEntityListRelatedView.js +0 -62
  320. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +0 -15
  321. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +0 -27
  322. package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +0 -5
  323. package/lib/hooks/useFileManifest/useFileManifestURL.js +0 -11
  324. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +0 -9
  325. package/lib/hooks/useFileManifest/useRequestFileManifest.js +0 -37
  326. package/lib/hooks/useLayoutState.d.ts +0 -6
  327. package/lib/hooks/useLayoutState.js +0 -9
  328. package/lib/hooks/useMenu.d.ts +0 -10
  329. package/lib/hooks/useMenu.js +0 -17
  330. package/lib/hooks/useMenuWithPosition.d.ts +0 -14
  331. package/lib/hooks/useMenuWithPosition.js +0 -33
  332. package/lib/hooks/useSessionTimeout.d.ts +0 -11
  333. package/lib/hooks/useSessionTimeout.js +0 -28
  334. package/lib/providers/authentication.d.ts +0 -51
  335. package/lib/providers/authentication.js +0 -110
  336. package/lib/providers/layoutState.d.ts +0 -40
  337. package/lib/providers/layoutState.js +0 -47
  338. package/lib/styles/common/mixins/shadows.d.ts +0 -3
  339. package/lib/styles/common/mixins/shadows.js +0 -4
  340. package/lib/theme/common/entities.d.ts +0 -6
  341. package/lib/theme/common/entities.js +0 -1
  342. package/src/components/DataDictionary/components/Table/columns/columnDef.ts +0 -47
  343. package/src/components/DataDictionary/components/Table/columns/columnIdentifier.ts +0 -5
  344. package/src/components/DataDictionary/components/Table/columns/types.ts +0 -3
  345. package/src/components/Index/components/EntitiesView/constants.ts +0 -1
  346. package/src/styles/common/mixins/shadows.ts +0 -7
  347. package/src/theme/common/entities.ts +0 -7
  348. /package/lib/components/{DataDictionary/components/Table/columns → Filter/components/FilterRange/hooks/UseFilterRange}/types.js +0 -0
  349. /package/lib/styles/common/{mui → constants}/palette.d.ts +0 -0
  350. /package/lib/styles/common/{mui → constants}/palette.js +0 -0
  351. /package/src/styles/common/{mui → constants}/palette.ts +0 -0
@@ -1,9 +1,9 @@
1
1
  import * as Plot from "@observablehq/plot";
2
2
  import { PlotOptions } from "@observablehq/plot";
3
3
  import { SelectCategoryValueView } from "../../../../../../../../../common/entities";
4
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
4
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
5
5
  import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
6
- import { DATA_FIELD, TEXT_PADDING } from "./constants";
6
+ import { DATA_FIELD, MARGIN_LEFT, TEXT_PADDING } from "./constants";
7
7
  import {
8
8
  getCategoryValueText,
9
9
  getCategoryValueTextFill,
@@ -32,6 +32,7 @@ export function getPlotOptions(
32
32
  height: getPlotHeight(selectCategoryValueViews.length),
33
33
  margin: 0,
34
34
  marginBottom: 32,
35
+ marginLeft: MARGIN_LEFT,
35
36
  marks: [
36
37
  Plot.axisX({
37
38
  className: "x-axis",
@@ -50,19 +51,21 @@ export function getPlotOptions(
50
51
  fill: DATA_FIELD.SELECTED,
51
52
  rx1: 0,
52
53
  rx2: 4,
53
- sort: { y: null },
54
+ sort: { order: "descending", y: "x" }, // Sort by count (x-axis), descending.
54
55
  x: DATA_FIELD.COUNT,
55
56
  y: DATA_FIELD.LABEL,
56
57
  }),
57
58
  Plot.text(selectCategoryValueViews, {
58
59
  className: "text-category-label",
59
- dx: 16,
60
- dy: -28,
60
+ dx: -TEXT_PADDING,
61
+ dy: -2,
61
62
  fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
62
- lineWidth: width / 13, // "em" unit; font-size is 13px.
63
+ lineHeight: 0.8125,
64
+ lineWidth: (MARGIN_LEFT - TEXT_PADDING) / 13, // "em" unit; font-size is 13px.
63
65
  text: getCategoryValueText,
64
- textAnchor: "start",
66
+ textAnchor: "end",
65
67
  textOverflow: "ellipsis",
68
+ title: getCategoryValueText,
66
69
  x: 0,
67
70
  y: DATA_FIELD.LABEL,
68
71
  }),
@@ -6,8 +6,14 @@ import {
6
6
  ScaleFunctions,
7
7
  } from "@observablehq/plot";
8
8
  import { SelectCategoryValueView } from "../../../../../../../../../common/entities";
9
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
10
- import { BAR_GAP, BAR_HEIGHT, TEXT_PADDING, TICKS } from "./constants";
9
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
10
+ import {
11
+ BAR_GAP,
12
+ BAR_HEIGHT,
13
+ MARGIN_LEFT,
14
+ TEXT_PADDING,
15
+ TICKS,
16
+ } from "./constants";
11
17
 
12
18
  /**
13
19
  * Returns the text for the category value point.
@@ -170,7 +176,7 @@ export function isAnyValueSelected(data: SelectCategoryValueView[]): boolean {
170
176
  * @param translate - The transform `translate` string.
171
177
  * @returns A tuple of the x and y coordinates.
172
178
  */
173
- function parseTranslate(translate: string | null): [number, number] {
179
+ export function parseTranslate(translate: string | null): [number, number] {
174
180
  const match = translate?.match(/translate\(\s*([-\d.]+)[,\s]+([-\d.]+)\s*\)/);
175
181
  let tx = 0;
176
182
  let ty = 0;
@@ -210,7 +216,7 @@ export function renderText(
210
216
  const bBox = textEl.getBBox();
211
217
  if (!ctm || !bBox) continue;
212
218
  // If the text doesn't fit inside the bar, reposition it outside.
213
- if (ctm.e - bBox.width - TEXT_PADDING < 0) {
219
+ if (ctm.e - bBox.width - TEXT_PADDING < MARGIN_LEFT) {
214
220
  const [tx, ty] = parseTranslate(textEl.getAttribute("transform"));
215
221
  // Translate by the width of the bar plus padding on each side.
216
222
  textEl.setAttribute(
@@ -1,7 +1,7 @@
1
1
  import { Box } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react";
3
3
  import React from "react";
4
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
4
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
5
5
  import { Chart } from "../chart";
6
6
  import { CHART_ARGS, SELECT_CHART_ARGS } from "./args";
7
7
 
@@ -15,7 +15,6 @@ const meta: Meta<typeof Chart> = {
15
15
  </Box>
16
16
  ),
17
17
  ],
18
- title: "Components/Entities/EntitiesView/ChartView/Chart",
19
18
  };
20
19
 
21
20
  export default meta;
@@ -95,5 +95,6 @@ export const CHART_VIEW_ARGS: ComponentProps<typeof ChartView> = {
95
95
  ],
96
96
  },
97
97
  ],
98
+ entityName: "Projects",
98
99
  loading: false,
99
100
  };
@@ -15,7 +15,6 @@ const meta: Meta<typeof ChartView> = {
15
15
  ),
16
16
  ],
17
17
  parameters: { layout: "fullscreen" },
18
- title: "Components/Entities/EntitiesView/ChartView",
19
18
  };
20
19
 
21
20
  export default meta;
@@ -1,7 +1,9 @@
1
+ import { EntityConfig } from "../../../../../../config/entities";
1
2
  import { CategoryFilter } from "../../../../../Filter/components/Filters/filters";
2
3
  import { TestIdProps } from "../../../../../types";
3
4
 
4
5
  export interface ChartViewProps extends TestIdProps {
5
6
  categoryFilters: CategoryFilter[];
7
+ entityName: EntityConfig["label"];
6
8
  loading: boolean;
7
9
  }
@@ -1,5 +1,6 @@
1
1
  import { ToggleButton, ToggleButtonGroup, Toolbar } from "@mui/material";
2
2
  import React from "react";
3
+ import { TEST_IDS } from "../../../../tests/testIds";
3
4
  import { GridPaper } from "../../../common/Paper/paper.styles";
4
5
  import { StyledFluidPaper } from "./entitiesView.styles";
5
6
  import { VIEW_MODE } from "./hooks/UseEntitiesView/types";
@@ -8,12 +9,11 @@ import { EntitiesViewProps } from "./types";
8
9
  export const EntitiesView = ({
9
10
  children,
10
11
  onChange,
11
- testId,
12
12
  viewMode,
13
13
  viewStatus,
14
14
  }: EntitiesViewProps): JSX.Element => {
15
15
  return (
16
- <StyledFluidPaper testId={testId}>
16
+ <StyledFluidPaper testId={TEST_IDS.ENTITIES_VIEW}>
17
17
  <GridPaper>
18
18
  {viewStatus.disabled ? null : (
19
19
  <Toolbar>
@@ -1,8 +1,8 @@
1
1
  import { ToggleButtonGroupProps } from "@mui/material";
2
- import { ChildrenProps, TestIdProps } from "../../../types";
2
+ import { ChildrenProps } from "../../../types";
3
3
  import { VIEW_MODE, ViewStatus } from "./hooks/UseEntitiesView/types";
4
4
 
5
- export interface EntitiesViewProps extends ChildrenProps, TestIdProps {
5
+ export interface EntitiesViewProps extends ChildrenProps {
6
6
  onChange: ToggleButtonGroupProps["onChange"];
7
7
  viewMode: VIEW_MODE;
8
8
  viewStatus: ViewStatus;
@@ -2,6 +2,7 @@ import { Tooltip } from "@mui/material";
2
2
  import Link from "next/link";
3
3
  import React from "react";
4
4
  import { useDownloadStatus } from "../../../../../../hooks/useDownloadStatus";
5
+ import { TEST_IDS } from "../../../../../../tests/testIds";
5
6
  import { Button } from "./exportButton.styles";
6
7
 
7
8
  export const ExportButton = (): JSX.Element => {
@@ -11,6 +12,7 @@ export const ExportButton = (): JSX.Element => {
11
12
  <span>
12
13
  <Link href="/export" legacyBehavior passHref>
13
14
  <Button
15
+ data-testid={TEST_IDS.EXPORT_BUTTON}
14
16
  disabled={disabled || isLoading}
15
17
  href="passHref"
16
18
  id="button-cohort-export"
@@ -1,12 +1,11 @@
1
1
  import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
3
  import { Tab as MTab, Tabs as MTabs, TabProps } from "@mui/material";
4
- import { smokeMain } from "../../../../styles/common/mixins/colors";
4
+ import { inkMain, smokeMain } from "../../../../styles/common/mixins/colors";
5
5
  import {
6
6
  textBody500,
7
7
  textBodySmall400,
8
8
  } from "../../../../styles/common/mixins/fonts";
9
- import { inkMain } from "../../../../theme/common/palette";
10
9
 
11
10
  interface Props extends TabProps {
12
11
  depth: number;
@@ -1,6 +1,7 @@
1
1
  import { CloseRounded } from "@mui/icons-material";
2
2
  import { PopoverPosition, PopoverProps } from "@mui/material";
3
3
  import React, { ReactNode } from "react";
4
+ import { TEST_IDS } from "../../../../../../tests/testIds";
4
5
  import { DrawerTransition } from "../../../../../Filter/components/Filter/components/DrawerTransition/drawerTransition";
5
6
  import { IconButton, TemporarySidebar } from "./sidebarDrawer.styles";
6
7
 
@@ -25,6 +26,7 @@ export const SidebarDrawer = ({
25
26
  <TemporarySidebar
26
27
  anchorPosition={DEFAULT_POSITION}
27
28
  anchorReference="anchorPosition"
29
+ data-testid={TEST_IDS.SIDEBAR_DRAWER}
28
30
  hideBackdrop={false}
29
31
  marginThreshold={0}
30
32
  onClose={onDrawerClose}
@@ -3,6 +3,7 @@ import {
3
3
  BREAKPOINT_FN_NAME,
4
4
  useBreakpointHelper,
5
5
  } from "../../../../hooks/useBreakpointHelper";
6
+ import { TEST_IDS } from "../../../../tests/testIds";
6
7
  import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
7
8
  import { SidebarDrawer } from "./components/SidebarDrawer/sidebarDrawer";
8
9
  import { SidebarPositioner } from "./components/SidebarPositioner/sidebarPositioner";
@@ -26,7 +27,9 @@ export const Sidebar = ({
26
27
  const controlledSidebar = typeof drawerOpen === "boolean";
27
28
  const drawerSidebar = controlledSidebar && desktopSmDown; // Sidebar is "temporary" drawer when drawerOpen is defined and breakpoint is smaller than the breakpoint.
28
29
  const Bar = drawerSidebar ? SidebarDrawer : PermanentSidebar;
29
- const barProps = drawerSidebar ? { drawerOpen, onDrawerClose } : {};
30
+ const barProps = drawerSidebar
31
+ ? { drawerOpen, onDrawerClose }
32
+ : { "data-testid": TEST_IDS.SIDEBAR };
30
33
 
31
34
  // Closes an open, controlled drawer sidebar with a change of breakpoint.
32
35
  useEffect(() => {
@@ -1,5 +1,6 @@
1
1
  import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
+ import { COLOR_MIXES } from "../../styles/common/constants/colorMixes";
3
4
  import { TABLET } from "../../theme/common/breakpoints";
4
5
  import { Paper, PAPER_PANEL_STYLE } from "../common/Paper/paper";
5
6
  import { LOADING_PANEL_STYLE, LoadingPanelStyle } from "./loading";
@@ -26,7 +27,7 @@ export const LoadingPositioner = styled.div<Props>`
26
27
  `;
27
28
 
28
29
  export const LoadingPaper = styled(Paper)<Props>`
29
- background-color: rgba(255, 255, 255, 0.8);
30
+ background-color: ${COLOR_MIXES.COMMON_WHITE_80};
30
31
  display: grid;
31
32
  gap: 16px;
32
33
  justify-items: center;
@@ -1,8 +1,7 @@
1
1
  import { ButtonProps } from "@mui/material";
2
- import { COLOR, VARIANT } from "../../../../styles/common/mui/button";
2
+ import { BUTTON_PROPS as DX_BUTTON_PROPS } from "../../../common/Button/constants";
3
3
 
4
4
  export const BUTTON_PROPS: Partial<ButtonProps> = {
5
- color: COLOR.SECONDARY,
5
+ ...DX_BUTTON_PROPS.SECONDARY_CONTAINED,
6
6
  fullWidth: true,
7
- variant: VARIANT.CONTAINED,
8
7
  };
@@ -1,4 +1,4 @@
1
1
  import { ButtonProps } from "@mui/material";
2
- import { BaseComponentProps } from "../../../../theme/common/entities";
2
+ import { BaseComponentProps } from "../../../types";
3
3
 
4
4
  export type Props = BaseComponentProps & ButtonProps;
@@ -1,7 +1,7 @@
1
1
  import { ButtonProps } from "@mui/material";
2
2
  import { ClientSafeProvider } from "next-auth/react";
3
3
  import { OAuthProvider } from "../../../../config/entities";
4
- import { BaseComponentProps } from "../../../../theme/common/entities";
4
+ import { BaseComponentProps } from "../../../types";
5
5
 
6
6
  export interface Props<P> extends BaseComponentProps, ButtonProps {
7
7
  handleLogin: (providerId: string) => void;
@@ -1,10 +1,10 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { Fab as MFab, Popover as MPopover } from "@mui/material";
3
+ import { COLOR_MIXES } from "../../../../../../styles/common/constants/colorMixes";
4
+ import { SHADOWS } from "../../../../../../styles/common/constants/shadows";
3
5
  import { mediaTabletUp } from "../../../../../../styles/common/mixins/breakpoints";
4
6
  import { smokeMain } from "../../../../../../styles/common/mixins/colors";
5
- import { shadows02 } from "../../../../../../styles/common/mixins/shadows";
6
7
  import { tabletUp } from "../../../../../../theme/common/breakpoints";
7
- import { alpha80, inkMain } from "../../../../../../theme/common/palette";
8
8
 
9
9
  interface Props {
10
10
  open: boolean;
@@ -12,7 +12,7 @@ interface Props {
12
12
 
13
13
  export const Fab = styled(MFab)<Props>`
14
14
  bottom: 16px;
15
- box-shadow: ${shadows02};
15
+ box-shadow: ${SHADOWS["02"]};
16
16
  position: fixed;
17
17
  right: 16px;
18
18
  z-index: ${({ open }) => (open ? 1350 : 1050)}; // Above backdrop component.
@@ -24,7 +24,7 @@ export const Fab = styled(MFab)<Props>`
24
24
 
25
25
  export const Popover = styled(MPopover)`
26
26
  &.MuiPopover-root {
27
- background-color: ${inkMain}${alpha80};
27
+ background-color: ${COLOR_MIXES.INK_MAIN_80};
28
28
 
29
29
  > .MuiPaper-root {
30
30
  border: 1px solid ${smokeMain};
@@ -1,11 +1,11 @@
1
1
  import styled from "@emotion/styled";
2
+ import { SHADOWS } from "../../../../styles/common/constants/shadows";
2
3
  import { mediaTabletUp } from "../../../../styles/common/mixins/breakpoints";
3
4
  import {
4
5
  primaryDark,
5
6
  primaryMain,
6
7
  white,
7
8
  } from "../../../../styles/common/mixins/colors";
8
- import { shadows02 } from "../../../../styles/common/mixins/shadows";
9
9
 
10
10
  export const Fab = styled("a")`
11
11
  align-items: center;
@@ -13,7 +13,7 @@ export const Fab = styled("a")`
13
13
  border: none;
14
14
  border-radius: 50%;
15
15
  bottom: 16px;
16
- box-shadow: ${shadows02};
16
+ box-shadow: ${SHADOWS["02"]};
17
17
  color: ${white};
18
18
  cursor: pointer;
19
19
  display: flex;
@@ -0,0 +1,27 @@
1
+ import { Row, RowData } from "@tanstack/react-table";
2
+
3
+ /**
4
+ * Returns true if the row should be included in the filtered rows.
5
+ * The row will be included if:
6
+ * - the column value (string) equals a value in the filter values array, or
7
+ * - one of the column values is included in the filter values array.
8
+ * See https://github.com/TanStack/table/blob/c895bda085d0886a7eba00a08019f377efbac54c/packages/table-core/src/filterFns.ts.
9
+ * @param row - Row to filter.
10
+ * @param columnId - Column identifier to retrieve the row's value.
11
+ * @param filterValue - Filter value or values.
12
+ * @returns True if the row should be included in the filtered rows.
13
+ */
14
+ export function arrIncludesSome<T extends RowData>(
15
+ row: Row<T>,
16
+ columnId: string,
17
+ filterValue: unknown[]
18
+ ): boolean {
19
+ return filterValue.some((val) => {
20
+ const columnValue = row.getValue<unknown[]>(columnId);
21
+ if (Array.isArray(columnValue)) {
22
+ return columnValue?.includes(val);
23
+ } else {
24
+ return columnValue === val;
25
+ }
26
+ });
27
+ }
@@ -8,6 +8,7 @@ import { COLUMN_IDENTIFIER } from "./columnIdentifier";
8
8
  export const COLUMN_DEF: Record<string, ColumnDef<RowData>> = {
9
9
  ROW_POSITION: {
10
10
  cell: RowPositionCell,
11
+ enableColumnFilter: false,
11
12
  enableGrouping: false,
12
13
  enableHiding: false,
13
14
  enableSorting: false,
@@ -22,6 +23,7 @@ export const COLUMN_DEF: Record<string, ColumnDef<RowData>> = {
22
23
  },
23
24
  ROW_SELECTION: {
24
25
  cell: RowSelectionCell,
26
+ enableColumnFilter: false,
25
27
  enableGrouping: false,
26
28
  enableHiding: false,
27
29
  enableSorting: false,
@@ -10,7 +10,7 @@ import {
10
10
  Table,
11
11
  } from "@tanstack/react-table";
12
12
  import { SelectCategory } from "../../../common/entities";
13
- import { EXPLORE_MODE, ExploreMode } from "../../../hooks/useExploreMode";
13
+ import { EXPLORE_MODE, ExploreMode } from "../../../hooks/useExploreMode/types";
14
14
  import { COLUMN_IDENTIFIER } from "./columnIdentifier";
15
15
 
16
16
  /**
@@ -29,32 +29,6 @@ type PinnedCell<T extends RowData> = [Cell<T, unknown>, number];
29
29
  */
30
30
  type TableData = number | string | string[];
31
31
 
32
- /**
33
- * Returns true if the row should be included in the filtered rows.
34
- * The row will be included if:
35
- * - the column value equals a value in the filter values array, or
36
- * - one of the column values is included in the filter values array.
37
- * See https://github.com/TanStack/table/blob/c895bda085d0886a7eba00a08019f377efbac54c/packages/table-core/src/filterFns.ts.
38
- * @param row - Row to filter.
39
- * @param columnId - Column identifier to retrieve the row's value.
40
- * @param filterValue - Filter value or values.
41
- * @returns True if the row should be included in the filtered rows.
42
- */
43
- export function arrIncludesSome<T extends RowData>(
44
- row: Row<T>,
45
- columnId: string,
46
- filterValue: unknown[]
47
- ): boolean {
48
- return filterValue.some((val) => {
49
- const columnValue = row.getValue<unknown[]>(columnId);
50
- if (Array.isArray(columnValue)) {
51
- return columnValue?.includes(val);
52
- } else {
53
- return columnValue === val;
54
- }
55
- });
56
- }
57
-
58
32
  /**
59
33
  * Build view-specific models from react table faceted values function.
60
34
  * @param columns - Table columns.
@@ -1,6 +1,7 @@
1
1
  import { EastRounded, WestRounded } from "@mui/icons-material";
2
2
  import { Typography } from "@mui/material";
3
3
  import React from "react";
4
+ import { TEST_IDS } from "../../../../tests/testIds";
4
5
  import { IconButton } from "../../../common/IconButton/iconButton";
5
6
  import { Stack } from "../../../common/Stack/stack";
6
7
  import { Pagination as TablePagination } from "./pagination.styles";
@@ -23,8 +24,8 @@ export const Pagination = ({
23
24
  totalPage,
24
25
  }: PaginationProps): JSX.Element => {
25
26
  return (
26
- <TablePagination>
27
- <div>
27
+ <TablePagination data-testid={TEST_IDS.TABLE_PAGINATION}>
28
+ <div data-testid={TEST_IDS.TABLE_PAGINATION_PAGE}>
28
29
  <Typography variant="text-body-400">Page </Typography>
29
30
  <Typography variant="text-body-500">
30
31
  {currentPage} of {totalPage}
@@ -1,5 +1,6 @@
1
1
  import { Fade, Typography } from "@mui/material";
2
2
  import React from "react";
3
+ import { TEST_IDS } from "../../../../tests/testIds";
3
4
 
4
5
  export interface PaginationSummaryProps {
5
6
  firstResult: number;
@@ -14,7 +15,7 @@ export const PaginationSummary = ({
14
15
  }: PaginationSummaryProps): JSX.Element => {
15
16
  return (
16
17
  <Fade in={totalResult > 0}>
17
- <div>
18
+ <div data-testid={TEST_IDS.TABLE_PAGINATION_RESULTS}>
18
19
  <Typography variant="text-body-400">Results </Typography>
19
20
  <Typography variant="text-body-small-500">
20
21
  {firstResult} - {lastResult}
@@ -2,6 +2,7 @@ import { TableCell } from "@mui/material";
2
2
  import { flexRender, Row, RowData } from "@tanstack/react-table";
3
3
  import { Virtualizer } from "@tanstack/react-virtual";
4
4
  import React, { Fragment } from "react";
5
+ import { TEST_IDS } from "../../../../tests/testIds";
5
6
  import {
6
7
  getTableCellAlign,
7
8
  getTableCellPadding,
@@ -21,21 +22,27 @@ export const TableRows = <T extends RowData>({
21
22
  return (
22
23
  <Fragment>
23
24
  {virtualItems.map((virtualRow) => {
24
- const row = rows[virtualRow.index] as Row<T>;
25
+ const rowIndex = virtualRow.index;
26
+ const row = rows[rowIndex] as Row<T>;
25
27
  const { getIsGrouped, getIsPreview } = row;
26
28
  return (
27
29
  <TableRow
28
30
  key={row.id}
29
- data-index={virtualRow.index}
31
+ data-index={rowIndex}
30
32
  isGrouped={getIsGrouped()}
31
33
  isPreview={getIsPreview()}
32
34
  ref={virtualizer.measureElement}
33
35
  >
34
- {row.getVisibleCells().map((cell) => {
36
+ {row.getVisibleCells().map((cell, i) => {
35
37
  if (cell.getIsAggregated()) return null; // Display of aggregated cells is currently not supported.
36
38
  if (cell.getIsPlaceholder()) return null; // Display of placeholder cells is currently not supported.
37
39
  return (
38
40
  <TableCell
41
+ data-testid={
42
+ rowIndex === 0 && i === 0
43
+ ? TEST_IDS.TABLE_FIRST_CELL
44
+ : undefined
45
+ }
39
46
  key={cell.id}
40
47
  align={getTableCellAlign(cell.column)}
41
48
  padding={getTableCellPadding(cell.column.id)}
@@ -27,7 +27,7 @@ import {
27
27
  BREAKPOINT_FN_NAME,
28
28
  useBreakpointHelper,
29
29
  } from "../../hooks/useBreakpointHelper";
30
- import { useExploreMode } from "../../hooks/useExploreMode";
30
+ import { useExploreMode } from "../../hooks/useExploreMode/useExploreMode";
31
31
  import { useExploreState } from "../../hooks/useExploreState";
32
32
  import { useScroll } from "../../hooks/useScroll";
33
33
  import { ExploreActionKind } from "../../providers/exploreState";
@@ -36,6 +36,7 @@ import { TABLET } from "../../theme/common/breakpoints";
36
36
  import { Loading, LOADING_PANEL_STYLE } from "../Loading/loading";
37
37
  import { NoResults } from "../NoResults/noResults";
38
38
  import { getColumnTrackSizing } from "../TableCreator/options/columnTrackSizing/utils";
39
+ import { arrIncludesSome } from "./columnDef/columnFilters/filterFn";
39
40
  import { ROW_DIRECTION } from "./common/entities";
40
41
  import {
41
42
  buildCategoryViews,
@@ -168,6 +169,7 @@ TableProps<T>): JSX.Element => {
168
169
  enableColumnFilters: true, // client-side filtering.
169
170
  enableFilters: true, // client-side filtering.
170
171
  enableMultiSort: clientFiltering, // TODO(cc) move to sorting options; default to false and let the table options in config flag this value.
172
+ filterFns: { arrIncludesSome },
171
173
  getCoreRowModel: getCoreRowModel(),
172
174
  getFacetedRowModel: clientFiltering ? getFacetedRowModel() : undefined,
173
175
  getFacetedUniqueValues: clientFiltering
@@ -8,7 +8,7 @@ import React, { useMemo } from "react";
8
8
  import { ColumnConfig, ListViewConfig } from "../../config/entities";
9
9
  import { ComponentCreator } from "../ComponentCreator/ComponentCreator";
10
10
  import { COLUMN_DEF } from "../Table/common/columnDef";
11
- import { arrIncludesSome, sortingFn } from "../Table/common/utils";
11
+ import { sortingFn } from "../Table/common/utils";
12
12
  import { Table } from "../Table/table";
13
13
  import { buildBaseColumnDef } from "./common/utils";
14
14
  import { useTableOptions } from "./options/hook";
@@ -45,11 +45,25 @@ export const TableCreator = <T extends RowData>({
45
45
  const columnDefs: ColumnDef<T>[] = useMemo(
46
46
  () =>
47
47
  columns.reduce(
48
- (acc, columnConfig) => {
48
+ (
49
+ acc,
50
+ {
51
+ /**
52
+ * Applies the custom `arrIncludesSome` filter function as the default for multi-value filtering.
53
+ * Although `ColumnFilter["value"]` is typed as `unknown`, in practice it's consistently an array (`unknown[]`) in entity lists.
54
+ * This custom filter function supports multi-select filtering, even when individual cell values are single strings.
55
+ * This override of TanStack's default `arrIncludesSome` resolves a limitation where the base implementation
56
+ * does not support matching an array of filter values against a single string cell value.
57
+ * For range filtering, specify TanStack's `inNumberRange` filter function on the column definition.
58
+ */
59
+ filterFn = "arrIncludesSome",
60
+ ...columnConfig
61
+ }
62
+ ) => {
49
63
  acc.push({
50
64
  ...buildBaseColumnDef(columnConfig),
51
65
  cell: createCell(columnConfig),
52
- filterFn: arrIncludesSome,
66
+ filterFn,
53
67
  sortingFn: sortingFn,
54
68
  });
55
69
  return acc;
@@ -1,18 +1,18 @@
1
1
  import styled from "@emotion/styled";
2
- import { white } from "../../../../../styles/common/mixins/colors";
3
- import { alpha32, alpha64 } from "../../../../../theme/common/palette";
2
+ import { COLOR_MIXES } from "../../../../../styles/common/constants/colorMixes";
3
+ import { PALETTE } from "../../../../../styles/common/constants/palette";
4
4
  import { Button } from "../../button";
5
5
 
6
6
  export const ButtonOutline = styled(Button)`
7
- box-shadow: inset 0 0 0 1px ${white}${alpha32};
8
- color: ${white};
7
+ box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_32};
8
+ color: ${PALETTE.COMMON_WHITE};
9
9
 
10
10
  &:hover {
11
- box-shadow: inset 0 0 0 1px ${white}${alpha64};
11
+ box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_64};
12
12
  }
13
13
 
14
14
  &:disabled {
15
- box-shadow: inset 0 0 0 1px ${white}${alpha32};
16
- color: ${white};
15
+ box-shadow: inset 0 0 0 1px ${COLOR_MIXES.COMMON_WHITE_32};
16
+ color: ${PALETTE.COMMON_WHITE};
17
17
  }
18
18
  `;
@@ -0,0 +1,23 @@
1
+ import { ButtonProps } from "@mui/material";
2
+ import { BUTTON_PROPS as MUI_BUTTON_PROPS } from "../../../styles/common/mui/button";
3
+
4
+ export const BUTTON_PROPS: Record<string, Partial<ButtonProps>> = {
5
+ PRIMARY_CONTAINED: {
6
+ color: MUI_BUTTON_PROPS.COLOR.PRIMARY,
7
+ variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
8
+ },
9
+ PRIMARY_MEDIUM_CONTAINED: {
10
+ color: MUI_BUTTON_PROPS.COLOR.PRIMARY,
11
+ size: MUI_BUTTON_PROPS.SIZE.MEDIUM,
12
+ variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
13
+ },
14
+ SECONDARY_CONTAINED: {
15
+ color: MUI_BUTTON_PROPS.COLOR.SECONDARY,
16
+ variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
17
+ },
18
+ SECONDARY_MEDIUM_CONTAINED: {
19
+ color: MUI_BUTTON_PROPS.COLOR.SECONDARY,
20
+ size: MUI_BUTTON_PROPS.SIZE.MEDIUM,
21
+ variant: MUI_BUTTON_PROPS.VARIANT.CONTAINED,
22
+ },
23
+ };
@@ -1,12 +1,11 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { Dialog } from "@mui/material";
3
- import { inkMain } from "../../../styles/common/mixins/colors";
4
- import { alpha80 } from "../../../theme/common/palette";
3
+ import { COLOR_MIXES } from "../../../styles/common/constants/colorMixes";
5
4
 
6
5
  export const StyledDialog = styled(Dialog)`
7
6
  &.MuiDialog-root {
8
7
  .MuiBackdrop-root {
9
- background-color: ${inkMain}${alpha80};
8
+ background-color: ${COLOR_MIXES.INK_MAIN_80};
10
9
  }
11
10
 
12
11
  .MuiDialog-paper {
@@ -12,6 +12,10 @@ export interface ContentProps {
12
12
  content?: ReactNode;
13
13
  }
14
14
 
15
+ export interface TrackingProps {
16
+ trackingId?: string;
17
+ }
18
+
15
19
  export interface TestIdProps {
16
20
  testId?: string;
17
21
  }