@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,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { useExploreState } from "../../../../hooks/useExploreState";
3
3
  import { ExploreActionKind } from "../../../../providers/exploreState";
4
+ import { TEST_IDS } from "../../../../tests/testIds";
4
5
  import { ButtonTextPrimary } from "../../../common/Button/components/ButtonTextPrimary/buttonTextPrimary";
5
6
  export const ClearAllFilters = () => {
6
7
  const { exploreDispatch } = useExploreState();
@@ -10,5 +11,5 @@ export const ClearAllFilters = () => {
10
11
  type: ExploreActionKind.ClearFilters,
11
12
  });
12
13
  };
13
- return (React.createElement(ButtonTextPrimary, { onClick: onClearFilters }, "Clear All"));
14
+ return (React.createElement(ButtonTextPrimary, { "data-testid": TEST_IDS.CLEAR_ALL_FILTERS, onClick: onClearFilters }, "Clear All"));
14
15
  };
@@ -1,6 +1,7 @@
1
1
  import { CloseRounded } from "@mui/icons-material";
2
2
  import { Grow } from "@mui/material";
3
3
  import React, { useState } from "react";
4
+ import { TEST_IDS } from "../../../../tests/testIds";
4
5
  import { FilterLabel } from "../FilterLabel/filterLabel";
5
6
  import { FilterMenu } from "../FilterMenu/filterMenu";
6
7
  import { DrawerTransition } from "./components/DrawerTransition/drawerTransition";
@@ -49,7 +50,7 @@ export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterD
49
50
  };
50
51
  return (React.createElement(React.Fragment, null,
51
52
  React.createElement(FilterLabel, { annotation: categoryView.annotation, count: categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
52
- React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
53
+ React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", "data-testid": TEST_IDS.FILTER_POPOVER, marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
53
54
  isOpen && isFilterDrawer && (React.createElement(IconButton, { Icon: CloseRounded, onClick: onCloseFilters, size: "medium" })),
54
55
  React.createElement(FilterMenu, { categorySection: categorySection, categoryKey: categoryView.key, categoryLabel: categoryView.label, isFilterDrawer: isFilterDrawer, onFilter: onFilter, onCloseFilter: onCloseFilter, values: categoryView.values })),
55
56
  tags));
@@ -0,0 +1,8 @@
1
+ import { ButtonProps, DividerProps, InputLabelProps, OutlinedInputProps, ToggleButtonGroupProps } from "@mui/material";
2
+ import { RANGE_OPERATOR } from "./types";
3
+ export declare const BUTTON_PROPS: ButtonProps;
4
+ export declare const DIVIDER_PROPS: DividerProps;
5
+ export declare const INPUT_PROPS: OutlinedInputProps;
6
+ export declare const INPUT_LABEL_PROPS: InputLabelProps;
7
+ export declare const RANGE_OPERATOR_DISPLAY: Record<RANGE_OPERATOR, string>;
8
+ export declare const TOGGLE_BUTTON_GROUP_PROPS: ToggleButtonGroupProps;
@@ -0,0 +1,27 @@
1
+ import { BUTTON_PROPS as DX_BUTTON_PROPS } from "../../../common/Button/constants";
2
+ export const BUTTON_PROPS = {
3
+ ...DX_BUTTON_PROPS.PRIMARY_MEDIUM_CONTAINED,
4
+ fullWidth: true,
5
+ type: "submit",
6
+ };
7
+ export const DIVIDER_PROPS = {
8
+ flexItem: true,
9
+ orientation: "vertical",
10
+ };
11
+ export const INPUT_PROPS = {
12
+ autoFocus: false,
13
+ size: "small",
14
+ };
15
+ export const INPUT_LABEL_PROPS = {
16
+ disableAnimation: true,
17
+ shrink: true,
18
+ };
19
+ export const RANGE_OPERATOR_DISPLAY = {
20
+ between: "From",
21
+ greaterThan: "Greater Than",
22
+ lessThan: "Less Than",
23
+ };
24
+ export const TOGGLE_BUTTON_GROUP_PROPS = {
25
+ exclusive: true,
26
+ fullWidth: true,
27
+ };
@@ -0,0 +1,2 @@
1
+ import { FilterRangeProps } from "./types";
2
+ export declare const FilterRange: ({ className }: FilterRangeProps) => JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { Button, Divider, FormControl, Grid, InputLabel, OutlinedInput, ToggleButton, ToggleButtonGroup, } from "@mui/material";
2
+ import React, { Fragment } from "react";
3
+ import { TEST_IDS } from "../../../../tests/testIds";
4
+ import { BUTTON_PROPS, DIVIDER_PROPS, INPUT_LABEL_PROPS, INPUT_PROPS, RANGE_OPERATOR_DISPLAY, TOGGLE_BUTTON_GROUP_PROPS, } from "./constants";
5
+ import { StyledForm } from "./filterRange.styles";
6
+ import { useFilterRange } from "./hooks/UseFilterRange/hook";
7
+ import { RANGE_OPERATOR } from "./types";
8
+ export const FilterRange = ({ className }) => {
9
+ const { onChange, onSubmit, value } = useFilterRange();
10
+ return (React.createElement(StyledForm, { className: className, "data-testid": TEST_IDS.FILTER_RANGE, onSubmit: onSubmit },
11
+ React.createElement(ToggleButtonGroup, { ...TOGGLE_BUTTON_GROUP_PROPS, onChange: onChange, value: value },
12
+ React.createElement(ToggleButton, { value: RANGE_OPERATOR.BETWEEN }, "Between"),
13
+ React.createElement(ToggleButton, { value: RANGE_OPERATOR.LESS_THAN }, "Less Than"),
14
+ React.createElement(Divider, { ...DIVIDER_PROPS }),
15
+ React.createElement(ToggleButton, { value: RANGE_OPERATOR.GREATER_THAN }, "Greater Than")),
16
+ React.createElement(Grid, null,
17
+ React.createElement(FormControl, null,
18
+ React.createElement(InputLabel, { ...INPUT_LABEL_PROPS, htmlFor: value }, RANGE_OPERATOR_DISPLAY[value]),
19
+ React.createElement(OutlinedInput, { ...INPUT_PROPS, name: value, placeholder: "eg. 1" })),
20
+ value === RANGE_OPERATOR.BETWEEN && (React.createElement(Fragment, null,
21
+ React.createElement(Divider, null),
22
+ React.createElement(FormControl, null,
23
+ React.createElement(InputLabel, { ...INPUT_LABEL_PROPS, htmlFor: "between-to" }, "To"),
24
+ React.createElement(OutlinedInput, { ...INPUT_PROPS, name: "between-to", placeholder: "eg. 2" }))))),
25
+ React.createElement(Button, { ...BUTTON_PROPS }, "Filter")));
26
+ };
@@ -0,0 +1,4 @@
1
+ export declare const StyledForm: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: import("react").ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, {}>;
@@ -0,0 +1,66 @@
1
+ import styled from "@emotion/styled";
2
+ import { inkLight, inkMain, smokeDark, } from "../../../../styles/common/mixins/colors";
3
+ import { textBody400 } from "../../../../styles/common/mixins/fonts";
4
+ export const StyledForm = styled("form") `
5
+ padding: 16px;
6
+ width: 396px;
7
+
8
+ .MuiToggleButtonGroup-root {
9
+ grid-auto-columns: 1fr 1fr auto 1fr; // buttons + divider
10
+ width: 100%;
11
+
12
+ .MuiToggleButton-root {
13
+ color: ${inkLight};
14
+ text-transform: capitalize;
15
+
16
+ &.Mui-selected {
17
+ color: ${inkMain};
18
+ }
19
+ }
20
+
21
+ .MuiDivider-root {
22
+ border-color: ${smokeDark};
23
+ border-radius: 4px;
24
+ margin: 6px 0;
25
+ }
26
+ }
27
+
28
+ .MuiGrid-root {
29
+ display: grid;
30
+ gap: 4px 0;
31
+ grid-auto-flow: column;
32
+ grid-template-rows: auto auto;
33
+ margin: 12px 0 16px 0;
34
+
35
+ .MuiFormControl-root {
36
+ display: grid;
37
+ gap: inherit;
38
+ grid-row: 1 / -1;
39
+ grid-template-rows: subgrid;
40
+
41
+ .MuiInputLabel-root {
42
+ ${textBody400};
43
+ color: ${inkMain};
44
+ max-width: unset;
45
+ position: relative;
46
+ transform: unset;
47
+ }
48
+
49
+ .MuiOutlinedInput-input {
50
+ padding-right: 10px;
51
+ }
52
+ }
53
+
54
+ .MuiDivider-root {
55
+ align-self: center;
56
+ border-color: ${inkLight};
57
+ grid-row: 2;
58
+ margin: 0 4px;
59
+ width: 8px;
60
+ }
61
+ }
62
+
63
+ .MuiButton-root {
64
+ grid-column: 1 / -1;
65
+ }
66
+ `;
@@ -0,0 +1,2 @@
1
+ import { UseFilterRange } from "./types";
2
+ export declare const useFilterRange: () => UseFilterRange;
@@ -0,0 +1,14 @@
1
+ import { useCallback } from "react";
2
+ import { useToggleButtonGroup } from "../../../../../common/ToggleButtonGroup/hooks/UseToggleButtonGroup/hook";
3
+ import { RANGE_OPERATOR } from "../../types";
4
+ export const useFilterRange = () => {
5
+ const { onChange, value } = useToggleButtonGroup(RANGE_OPERATOR.BETWEEN);
6
+ const onSubmit = useCallback((e) => {
7
+ e.preventDefault();
8
+ }, []);
9
+ return {
10
+ onChange,
11
+ onSubmit,
12
+ value,
13
+ };
14
+ };
@@ -0,0 +1,8 @@
1
+ import { ToggleButtonGroupProps } from "@mui/material";
2
+ import { FormEvent } from "react";
3
+ import { RANGE_OPERATOR } from "../../types";
4
+ export interface UseFilterRange {
5
+ onChange: ToggleButtonGroupProps["onChange"];
6
+ onSubmit: (e: FormEvent) => void;
7
+ value: RANGE_OPERATOR;
8
+ }
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { FilterRange } from "../filterRange";
3
+ declare const meta: Meta<typeof FilterRange>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -0,0 +1,9 @@
1
+ import { FilterRange } from "../filterRange";
2
+ const meta = {
3
+ args: {},
4
+ component: FilterRange,
5
+ };
6
+ export default meta;
7
+ export const Default = {
8
+ args: {},
9
+ };
@@ -0,0 +1,8 @@
1
+ import { BaseComponentProps } from "../../../types";
2
+ export interface FilterRangeProps extends BaseComponentProps {
3
+ }
4
+ export declare enum RANGE_OPERATOR {
5
+ BETWEEN = "between",
6
+ GREATER_THAN = "greaterThan",
7
+ LESS_THAN = "lessThan"
8
+ }
@@ -0,0 +1,6 @@
1
+ export var RANGE_OPERATOR;
2
+ (function (RANGE_OPERATOR) {
3
+ RANGE_OPERATOR["BETWEEN"] = "between";
4
+ RANGE_OPERATOR["GREATER_THAN"] = "greaterThan";
5
+ RANGE_OPERATOR["LESS_THAN"] = "lessThan";
6
+ })(RANGE_OPERATOR || (RANGE_OPERATOR = {}));
@@ -2,6 +2,7 @@ import { Divider } from "@mui/material";
2
2
  import React, { Fragment, useEffect, useRef, useState } from "react";
3
3
  import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
4
4
  import { useWindowResize } from "../../../../hooks/useWindowResize";
5
+ import { TEST_IDS } from "../../../../tests/testIds";
5
6
  import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
6
7
  import { Filter } from "../Filter/filter";
7
8
  import { FilterTags } from "../FilterTags/filterTags";
@@ -42,7 +43,7 @@ export const Filters = ({ categoryFilters, closeAncestor, disabled = false, onFi
42
43
  useEffect(() => {
43
44
  setHeight(calculateListHeight(windowHeight, filterListRef.current));
44
45
  }, [windowHeight]);
45
- return (React.createElement(FilterList, { disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
46
+ return (React.createElement(FilterList, { "data-testid": TEST_IDS.FILTERS, disabled: disabled, height: height, ref: filterListRef }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
46
47
  i !== 0 && React.createElement(Divider, null),
47
48
  label && React.createElement(CategoryViewsLabel, null, label),
48
49
  categoryViews.map((categoryView) => (React.createElement(Filter, { key: categoryView.key, categorySection: label, categoryView: categoryView, closeAncestor: closeAncestor, isFilterDrawer: isFilterDrawer, onFilter: onFilter, trackFilterOpened: trackFilterOpened, tags: renderFilterTags(categoryView, onFilter) }))))))));
@@ -1,7 +1,8 @@
1
+ import { TestIdProps } from "../../../types";
1
2
  import { FilterMenuSearchMatchRange } from "../../common/entities";
2
- interface HighlightedLabelProps {
3
+ interface HighlightedLabelProps extends TestIdProps {
3
4
  label: string;
4
5
  ranges?: FilterMenuSearchMatchRange[];
5
6
  }
6
- export declare const HighlightedLabel: ({ label, ranges, }: HighlightedLabelProps) => JSX.Element;
7
+ export declare const HighlightedLabel: ({ label, ranges, testId, }: HighlightedLabelProps) => JSX.Element;
7
8
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { MatchHighlight } from "./highlightedLabel.styles";
3
- export const HighlightedLabel = ({ label, ranges, }) => {
3
+ export const HighlightedLabel = ({ label, ranges, testId, }) => {
4
4
  const items = [];
5
5
  if (ranges) {
6
6
  ranges = ranges.slice().sort(({ start: a }, { start: b }) => a - b);
@@ -29,5 +29,5 @@ export const HighlightedLabel = ({ label, ranges, }) => {
29
29
  else {
30
30
  items.push(label);
31
31
  }
32
- return React.createElement("span", null, items);
32
+ return React.createElement("span", { "data-testid": testId }, items);
33
33
  };
@@ -1,5 +1,6 @@
1
1
  import { Checkbox, ListItemButton, ListItemText, ListSubheader, Typography, } from "@mui/material";
2
2
  import React, { useEffect, useRef } from "react";
3
+ import { TEST_IDS } from "../../../../../../tests/testIds";
3
4
  import { TEXT_BODY_SMALL_400 } from "../../../../../../theme/common/typography";
4
5
  import { CheckedIcon } from "../../../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
5
6
  import { UncheckedIcon } from "../../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
@@ -18,9 +19,9 @@ export default function VariableSizeListItem({ item, onFilter, onUpdateItemSizeB
18
19
  }, [key, onUpdateItemSizeByItemKey]);
19
20
  if (item.type === ITEM_TYPE.VALUE) {
20
21
  const { categoryKey, matchRanges, value: { count, key: valueKey, label, selected }, } = item;
21
- return (React.createElement(ListItemButton, { ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
22
+ return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: setRef, key: key, onClick: () => onFilter(categoryKey, valueKey, !selected, undefined, searchTerm), selected: selected, style: style },
22
23
  React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
23
- React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges }), secondary: React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count) })));
24
+ React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: matchRanges, testId: TEST_IDS.FILTER_TERM }), secondary: React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count) })));
24
25
  }
25
26
  else if (item.type === ITEM_TYPE.CATEGORY) {
26
27
  return (React.createElement(ListSubheader, { key: key, ref: setRef, style: style }, item.categoryLabel));
@@ -1,6 +1,7 @@
1
1
  import React, { createContext, useContext, useEffect, useRef, useState, } from "react";
2
2
  import { SELECTOR } from "../../../../common/selectors";
3
3
  import { BREAKPOINT_FN_NAME, useBreakpointHelper, } from "../../../../hooks/useBreakpointHelper";
4
+ import { TEST_IDS } from "../../../../tests/testIds";
4
5
  import { DESKTOP_SM } from "../../../../theme/common/breakpoints";
5
6
  import { SearchCloseButton } from "../SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton";
6
7
  import { SearchAllFiltersSearch } from "../SearchAllFiltersSearch/searchAllFiltersSearch";
@@ -85,7 +86,7 @@ export const SearchAllFilters = ({ categoryViews, drawerOpen = false, onFilter,
85
86
  open,
86
87
  searchTerm,
87
88
  } },
88
- React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
89
+ React.createElement(Autocomplete, { clearOnBlur: desktopSmUp, "data-testid": TEST_IDS.SEARCH_ALL_FILTERS, filterOptions: (options) => options, freeSolo: true, ListboxComponent: Listbox, onBlur: desktopSmUp ? onCloseSearch : undefined, onClose: desktopSmUp ? onCloseSearch : undefined, onFocus: onOpenSearch, onOpen: onOpen, open: open, options: [""], PopperComponent: AutocompletePopper, ref: autocompleteRef, renderInput: (props) => renderInput({
89
90
  ...props,
90
91
  InputProps: {
91
92
  ...props.InputProps,
@@ -1,7 +1,6 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { TextField } from "@mui/material";
3
- import { inkMain } from "../../../../styles/common/mixins/colors";
4
- import { inkLight } from "../../../../theme/common/palette";
3
+ import { inkLight, inkMain } from "../../../../styles/common/mixins/colors";
5
4
  export const InputField = styled(TextField) `
6
5
  && {
7
6
  display: flex;
@@ -1,6 +1,7 @@
1
1
  import { Checkbox, ListItemButton, ListItemText, Typography, } from "@mui/material";
2
2
  import React, { useEffect, useRef } from "react";
3
3
  import { SELECT_CATEGORY_KEY } from "../../../../providers/exploreState/constants";
4
+ import { TEST_IDS } from "../../../../tests/testIds";
4
5
  import { TEXT_BODY_SMALL_400 } from "../../../../theme/common/typography";
5
6
  import { CheckedIcon } from "../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
6
7
  import { UncheckedIcon } from "../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
@@ -16,7 +17,7 @@ export default function VariableSizeListItem({ categoryKey, categorySection, mat
16
17
  const handleItemClicked = () => {
17
18
  onFilter(categoryKey, key, !selected, categorySection);
18
19
  };
19
- return (React.createElement(ListItemButton, { ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
20
+ return (React.createElement(ListItemButton, { "data-testid": TEST_IDS.FILTER_ITEM, ref: listItemRef, onClick: handleItemClicked, selected: selected, style: style },
20
21
  React.createElement(Checkbox, { checked: selected, checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
21
- React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", variant: TEXT_BODY_SMALL_400 }, count)) })));
22
+ React.createElement(ListItemText, { disableTypography: true, primary: React.createElement(HighlightedLabel, { label: label, ranges: labelRanges, testId: TEST_IDS.FILTER_TERM }), secondary: categoryKey !== SELECT_CATEGORY_KEY.SAVED_FILTERS && (React.createElement(Typography, { color: "ink.light", "data-testid": TEST_IDS.FILTER_COUNT, variant: TEXT_BODY_SMALL_400 }, count)) })));
22
23
  }
@@ -1,2 +1,2 @@
1
1
  import { ChartViewProps } from "./types";
2
- export declare const ChartView: ({ categoryFilters, loading, testId, }: ChartViewProps) => JSX.Element | null;
2
+ export declare const ChartView: ({ categoryFilters, entityName, loading, testId, }: ChartViewProps) => JSX.Element | null;
@@ -5,13 +5,16 @@ import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
5
5
  import { StyledGrid, StyledGridPaperSection } from "./chartView.styles";
6
6
  import { Chart } from "./components/Chart/chart";
7
7
  import { useChartView } from "./hooks/UseChartView/useChartView";
8
- export const ChartView = ({ categoryFilters, loading, testId, }) => {
8
+ export const ChartView = ({ categoryFilters, entityName, loading, testId, }) => {
9
9
  const { chartViewRef, selectCategoryViews, width } = useChartView(categoryFilters);
10
10
  if (selectCategoryViews.length === 0)
11
11
  return null;
12
12
  return (React.createElement(Fragment, null,
13
13
  React.createElement(Loading, { appear: false, autoPosition: false, loading: loading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
14
14
  React.createElement(StyledGrid, { "data-testid": testId, ref: chartViewRef }, selectCategoryViews.map(({ key, label, values }) => (React.createElement(StyledGridPaperSection, { key: key },
15
- React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL }, label),
15
+ React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_HEADING_SMALL },
16
+ entityName,
17
+ " per ",
18
+ label),
16
19
  React.createElement(Chart, { selectCategoryValueViews: values, width: width })))))));
17
20
  };
@@ -1,9 +1,10 @@
1
- export declare const BAR_GAP = 40;
1
+ export declare const BAR_GAP = 8;
2
2
  export declare const BAR_HEIGHT = 24;
3
3
  export declare const DATA_FIELD: {
4
4
  readonly COUNT: "count";
5
5
  readonly LABEL: "label";
6
6
  readonly SELECTED: "selected";
7
7
  };
8
+ export declare const MARGIN_LEFT = 136;
8
9
  export declare const TEXT_PADDING = 8;
9
10
  export declare const TICKS = 6;
@@ -1,9 +1,10 @@
1
- export const BAR_GAP = 40;
1
+ export const BAR_GAP = 8;
2
2
  export const BAR_HEIGHT = 24;
3
3
  export const DATA_FIELD = {
4
4
  COUNT: "count",
5
5
  LABEL: "label",
6
6
  SELECTED: "selected",
7
7
  };
8
+ export const MARGIN_LEFT = 136;
8
9
  export const TEXT_PADDING = 8;
9
10
  export const TICKS = 6;
@@ -1,7 +1,7 @@
1
1
  import * as Plot from "@observablehq/plot";
2
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
2
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
3
3
  import { formatCountSize } from "../../../../../../../../../utils/formatCountSize";
4
- import { DATA_FIELD, TEXT_PADDING } from "./constants";
4
+ import { DATA_FIELD, MARGIN_LEFT, TEXT_PADDING } from "./constants";
5
5
  import { getCategoryValueText, getCategoryValueTextFill, getColorRangeValue, getCountTextFill, getPlotHeight, getTicks, getXDomain, getYPaddingInner, getYPaddingOuter, isAnyValueSelected, renderText, } from "./utils";
6
6
  export function getPlotOptions(selectCategoryValueViews, width) {
7
7
  const isCategorySelected = isAnyValueSelected(selectCategoryValueViews);
@@ -14,6 +14,7 @@ export function getPlotOptions(selectCategoryValueViews, width) {
14
14
  height: getPlotHeight(selectCategoryValueViews.length),
15
15
  margin: 0,
16
16
  marginBottom: 32,
17
+ marginLeft: MARGIN_LEFT,
17
18
  marks: [
18
19
  Plot.axisX({
19
20
  className: "x-axis",
@@ -32,19 +33,21 @@ export function getPlotOptions(selectCategoryValueViews, width) {
32
33
  fill: DATA_FIELD.SELECTED,
33
34
  rx1: 0,
34
35
  rx2: 4,
35
- sort: { y: null },
36
+ sort: { order: "descending", y: "x" }, // Sort by count (x-axis), descending.
36
37
  x: DATA_FIELD.COUNT,
37
38
  y: DATA_FIELD.LABEL,
38
39
  }),
39
40
  Plot.text(selectCategoryValueViews, {
40
41
  className: "text-category-label",
41
- dx: 16,
42
- dy: -28,
42
+ dx: -TEXT_PADDING,
43
+ dy: -2,
43
44
  fill: (d) => getCategoryValueTextFill(d, isCategorySelected),
44
- lineWidth: width / 13, // "em" unit; font-size is 13px.
45
+ lineHeight: 0.8125,
46
+ lineWidth: (MARGIN_LEFT - TEXT_PADDING) / 13, // "em" unit; font-size is 13px.
45
47
  text: getCategoryValueText,
46
- textAnchor: "start",
48
+ textAnchor: "end",
47
49
  textOverflow: "ellipsis",
50
+ title: getCategoryValueText,
48
51
  x: 0,
49
52
  y: DATA_FIELD.LABEL,
50
53
  }),
@@ -90,6 +90,12 @@ export declare function getYPaddingOuter(): number;
90
90
  * @returns True if any value is selected, false otherwise.
91
91
  */
92
92
  export declare function isAnyValueSelected(data: SelectCategoryValueView[]): boolean;
93
+ /**
94
+ * Parses a transform `translate` string and returns the x and y coordinates.
95
+ * @param translate - The transform `translate` string.
96
+ * @returns A tuple of the x and y coordinates.
97
+ */
98
+ export declare function parseTranslate(translate: string | null): [number, number];
93
99
  /**
94
100
  * Renders text elements for count values, positioning them either inside or outside bars
95
101
  * based on available space. If text doesn't fit inside a bar, it's repositioned outside
@@ -1,5 +1,5 @@
1
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
2
- import { BAR_GAP, BAR_HEIGHT, TEXT_PADDING, TICKS } from "./constants";
1
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
2
+ import { BAR_GAP, BAR_HEIGHT, MARGIN_LEFT, TEXT_PADDING, TICKS, } from "./constants";
3
3
  /**
4
4
  * Returns the text for the category value point.
5
5
  * @param d - Data point.
@@ -146,7 +146,7 @@ export function isAnyValueSelected(data) {
146
146
  * @param translate - The transform `translate` string.
147
147
  * @returns A tuple of the x and y coordinates.
148
148
  */
149
- function parseTranslate(translate) {
149
+ export function parseTranslate(translate) {
150
150
  const match = translate?.match(/translate\(\s*([-\d.]+)[,\s]+([-\d.]+)\s*\)/);
151
151
  let tx = 0;
152
152
  let ty = 0;
@@ -180,7 +180,7 @@ export function renderText(index, scales, values, dimensions, context, next) {
180
180
  if (!ctm || !bBox)
181
181
  continue;
182
182
  // If the text doesn't fit inside the bar, reposition it outside.
183
- if (ctm.e - bBox.width - TEXT_PADDING < 0) {
183
+ if (ctm.e - bBox.width - TEXT_PADDING < MARGIN_LEFT) {
184
184
  const [tx, ty] = parseTranslate(textEl.getAttribute("transform"));
185
185
  // Translate by the width of the bar plus padding on each side.
186
186
  textEl.setAttribute("transform", `translate(${tx + bBox.width + TEXT_PADDING * 2}, ${ty})`);
@@ -1,6 +1,6 @@
1
1
  import { Box } from "@mui/material";
2
2
  import React from "react";
3
- import { PALETTE } from "../../../../../../../../../styles/common/mui/palette";
3
+ import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
4
4
  import { Chart } from "../chart";
5
5
  import { CHART_ARGS, SELECT_CHART_ARGS } from "./args";
6
6
  const meta = {
@@ -10,7 +10,6 @@ const meta = {
10
10
  (Story, context) => (React.createElement(Box, { sx: { backgroundColor: PALETTE.COMMON_WHITE, padding: 5 } },
11
11
  React.createElement(Story, { ...context }))),
12
12
  ],
13
- title: "Components/Entities/EntitiesView/ChartView/Chart",
14
13
  };
15
14
  export default meta;
16
15
  export const Default = {};
@@ -92,5 +92,6 @@ export const CHART_VIEW_ARGS = {
92
92
  ],
93
93
  },
94
94
  ],
95
+ entityName: "Projects",
95
96
  loading: false,
96
97
  };
@@ -10,7 +10,6 @@ const meta = {
10
10
  React.createElement(Story, { ...context }))),
11
11
  ],
12
12
  parameters: { layout: "fullscreen" },
13
- title: "Components/Entities/EntitiesView/ChartView",
14
13
  };
15
14
  export default meta;
16
15
  export const Default = {};
@@ -1,6 +1,8 @@
1
+ import { EntityConfig } from "../../../../../../config/entities";
1
2
  import { CategoryFilter } from "../../../../../Filter/components/Filters/filters";
2
3
  import { TestIdProps } from "../../../../../types";
3
4
  export interface ChartViewProps extends TestIdProps {
4
5
  categoryFilters: CategoryFilter[];
6
+ entityName: EntityConfig["label"];
5
7
  loading: boolean;
6
8
  }
@@ -1,2 +1,2 @@
1
1
  import { EntitiesViewProps } from "./types";
2
- export declare const EntitiesView: ({ children, onChange, testId, viewMode, viewStatus, }: EntitiesViewProps) => JSX.Element;
2
+ export declare const EntitiesView: ({ children, onChange, viewMode, viewStatus, }: EntitiesViewProps) => JSX.Element;
@@ -1,10 +1,11 @@
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";
6
- export const EntitiesView = ({ children, onChange, testId, viewMode, viewStatus, }) => {
7
- return (React.createElement(StyledFluidPaper, { testId: testId },
7
+ export const EntitiesView = ({ children, onChange, viewMode, viewStatus, }) => {
8
+ return (React.createElement(StyledFluidPaper, { testId: TEST_IDS.ENTITIES_VIEW },
8
9
  React.createElement(GridPaper, null,
9
10
  viewStatus.disabled ? null : (React.createElement(Toolbar, null,
10
11
  React.createElement(ToggleButtonGroup, { exclusive: true, value: viewMode, onChange: onChange },
@@ -1,7 +1,7 @@
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
- export interface EntitiesViewProps extends ChildrenProps, TestIdProps {
4
+ export interface EntitiesViewProps extends ChildrenProps {
5
5
  onChange: ToggleButtonGroupProps["onChange"];
6
6
  viewMode: VIEW_MODE;
7
7
  viewStatus: ViewStatus;
@@ -2,11 +2,12 @@ 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
  export const ExportButton = () => {
7
8
  const { disabled, isLoading, message } = useDownloadStatus();
8
9
  return (React.createElement(Tooltip, { arrow: true, title: message },
9
10
  React.createElement("span", null,
10
11
  React.createElement(Link, { href: "/export", legacyBehavior: true, passHref: true },
11
- React.createElement(Button, { disabled: disabled || isLoading, href: "passHref", id: "button-cohort-export" }, "Export")))));
12
+ React.createElement(Button, { "data-testid": TEST_IDS.EXPORT_BUTTON, disabled: disabled || isLoading, href: "passHref", id: "button-cohort-export" }, "Export")))));
12
13
  };
@@ -4,6 +4,6 @@ export declare const Slogan: import("@emotion/styled").StyledComponent<{
4
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const Divider: import("@emotion/styled").StyledComponent<import("@mui/material").DividerOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
6
6
  ref?: ((instance: HTMLHRElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHRElement> | null | undefined;
7
- }, "style" | "className" | "classes" | "children" | "textAlign" | "sx" | "variant" | "orientation" | "light" | "absolute" | "flexItem"> & {
7
+ }, "style" | "className" | "classes" | "children" | "textAlign" | "sx" | "variant" | "orientation" | "absolute" | "light" | "flexItem"> & {
8
8
  theme?: import("@emotion/react").Theme;
9
9
  }, {}, {}>;
@@ -1,9 +1,8 @@
1
1
  import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
3
  import { Tab as MTab, Tabs as MTabs } from "@mui/material";
4
- import { smokeMain } from "../../../../styles/common/mixins/colors";
4
+ import { inkMain, smokeMain } from "../../../../styles/common/mixins/colors";
5
5
  import { textBody500, textBodySmall400, } from "../../../../styles/common/mixins/fonts";
6
- import { inkMain } from "../../../../theme/common/palette";
7
6
  export const tab = css `
8
7
  align-items: flex-start;
9
8
  margin: 0;