@databiosphere/findable-ui 50.6.0 → 50.7.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 (439) hide show
  1. package/README.md +32 -19
  2. package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +6 -0
  3. package/lib/components/DataDictionary/components/Table/columns/columnDef.js +33 -0
  4. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +5 -0
  5. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +5 -0
  6. package/lib/components/DataDictionary/components/Table/columns/types.d.ts +2 -0
  7. package/lib/components/DataDictionary/components/Table/columns/types.js +1 -0
  8. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +4 -0
  9. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.js +1 -0
  10. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +4 -0
  11. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +23 -0
  12. package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +8 -0
  13. package/lib/components/DataDictionary/hooks/UseDataDictionary/types.js +1 -0
  14. package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.d.ts +2 -0
  15. package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.js +10 -0
  16. package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.d.ts +7 -0
  17. package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.js +1 -0
  18. package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +8 -0
  19. package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +36 -0
  20. package/lib/components/Export/components/ExportMethod/exportMethod.stories.d.ts +22 -0
  21. package/lib/components/Export/components/ExportMethod/exportMethod.stories.js +20 -0
  22. package/lib/components/Filter/components/Filter/filter.stories.d.ts +25 -0
  23. package/lib/components/Filter/components/Filter/filter.stories.js +42 -0
  24. package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +16 -0
  25. package/lib/components/Filter/components/FilterTag/filterTag.stories.js +17 -0
  26. package/lib/components/Filter/components/Filters/components/CategoryLabel/categoryLabel.d.ts +9 -0
  27. package/lib/components/Filter/components/Filters/components/CategoryLabel/categoryLabel.js +15 -0
  28. package/lib/components/Filter/components/Filters/components/Controls/controls.d.ts +12 -0
  29. package/lib/components/Filter/components/Filters/components/Controls/controls.js +20 -0
  30. package/lib/components/Filter/components/Filters/components/Controls/controls.styles.d.ts +5 -0
  31. package/lib/components/Filter/components/Filters/components/Controls/controls.styles.js +7 -0
  32. package/lib/components/Filter/components/Filters/components/Controls/types.d.ts +6 -0
  33. package/lib/components/Filter/components/Filters/components/Controls/types.js +1 -0
  34. package/lib/components/Filter/components/Filters/filters.stories.d.ts +6 -0
  35. package/lib/components/Filter/components/Filters/filters.stories.js +91 -0
  36. package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.d.ts +3 -0
  37. package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.js +15 -0
  38. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.d.ts +6 -0
  39. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.js +82 -0
  40. package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.d.ts +1 -0
  41. package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +14 -0
  42. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.d.ts +2 -0
  43. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.js +12 -0
  44. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.d.ts +5 -0
  45. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js +34 -0
  46. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/constants.d.ts +5 -0
  47. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/constants.js +5 -0
  48. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.d.ts +2 -0
  49. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.js +19 -0
  50. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.styles.d.ts +12 -0
  51. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/endAdornment.styles.js +22 -0
  52. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/types.d.ts +4 -0
  53. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/types.js +1 -0
  54. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/utils.d.ts +8 -0
  55. package/lib/components/Filter/components/ai/components/FacetAssistant/components/EndAdornment/utils.js +14 -0
  56. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.d.ts +2 -0
  57. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.js +15 -0
  58. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/types.d.ts +7 -0
  59. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/types.js +1 -0
  60. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.d.ts +2 -0
  61. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.js +27 -0
  62. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.d.ts +9 -0
  63. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.js +16 -0
  64. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/tooltip.d.ts +2 -0
  65. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/tooltip.js +11 -0
  66. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/types.d.ts +5 -0
  67. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/types.js +1 -0
  68. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.d.ts +2 -0
  69. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.js +17 -0
  70. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.styles.d.ts +5 -0
  71. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.styles.js +10 -0
  72. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/types.d.ts +8 -0
  73. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/types.js +1 -0
  74. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/utils.d.ts +7 -0
  75. package/lib/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/utils.js +19 -0
  76. package/lib/components/Filter/components/ai/components/FacetAssistant/constants.d.ts +2 -0
  77. package/lib/components/Filter/components/ai/components/FacetAssistant/constants.js +10 -0
  78. package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.d.ts +6 -0
  79. package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.js +70 -0
  80. package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.styles.d.ts +8 -0
  81. package/lib/components/Filter/components/ai/components/FacetAssistant/facetAssistant.styles.js +14 -0
  82. package/lib/components/Filter/components/ai/components/FacetAssistant/stories/aiFacetAssistant.stories.d.ts +6 -0
  83. package/lib/components/Filter/components/ai/components/FacetAssistant/stories/aiFacetAssistant.stories.js +12 -0
  84. package/lib/components/Filter/components/ai/components/FacetAssistant/types.d.ts +13 -0
  85. package/lib/components/Filter/components/ai/components/FacetAssistant/types.js +1 -0
  86. package/lib/components/Filter/components/ai/components/FacetAssistant/utils.d.ts +15 -0
  87. package/lib/components/Filter/components/ai/components/FacetAssistant/utils.js +91 -0
  88. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.d.ts +9 -0
  89. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.js +16 -0
  90. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.styles.d.ts +3 -0
  91. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/aiSwitch.styles.js +9 -0
  92. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/stories/aiSwitch.stories.d.ts +6 -0
  93. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/stories/aiSwitch.stories.js +8 -0
  94. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/types.d.ts +4 -0
  95. package/lib/components/Filter/components/controls/Controls/components/AiSwitch/types.js +1 -0
  96. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.d.ts +10 -0
  97. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.js +16 -0
  98. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.styles.d.ts +6 -0
  99. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/button.styles.js +18 -0
  100. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/types.d.ts +2 -0
  101. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/Button/types.js +1 -0
  102. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/constants.d.ts +2 -0
  103. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/constants.js +4 -0
  104. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.d.ts +10 -0
  105. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.js +18 -0
  106. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.styles.d.ts +6 -0
  107. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/iconButton.styles.js +13 -0
  108. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/types.d.ts +2 -0
  109. package/lib/components/Filter/components/controls/Controls/components/FilterSort/components/IconButton/types.js +1 -0
  110. package/lib/components/Filter/components/surfaces/drawer/components/Button/types.d.ts +4 -0
  111. package/lib/components/Filter/components/surfaces/drawer/components/Button/types.js +1 -0
  112. package/lib/components/Index/components/Cell/cell.d.ts +7 -0
  113. package/lib/components/Index/components/Cell/cell.js +10 -0
  114. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +2 -0
  115. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +20 -0
  116. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts +13 -0
  117. package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.js +12 -0
  118. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +10 -0
  119. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +10 -0
  120. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.d.ts +3 -0
  121. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +91 -0
  122. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +132 -0
  123. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +230 -0
  124. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.d.ts +2 -0
  125. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.js +7 -0
  126. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.d.ts +3 -0
  127. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.js +29 -0
  128. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.d.ts +1 -0
  129. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.js +1 -0
  130. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.d.ts +4 -0
  131. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.js +70 -0
  132. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.d.ts +7 -0
  133. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +18 -0
  134. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.d.ts +6 -0
  135. package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.js +1 -0
  136. package/lib/components/Index/components/EntitiesView/components/ChartView/constants.d.ts +1 -0
  137. package/lib/components/Index/components/EntitiesView/components/ChartView/constants.js +1 -0
  138. package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.d.ts +7 -0
  139. package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.js +1 -0
  140. package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.d.ts +3 -0
  141. package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.js +11 -0
  142. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.d.ts +3 -0
  143. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +97 -0
  144. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.d.ts +6 -0
  145. package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +15 -0
  146. package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +8 -0
  147. package/lib/components/Index/components/EntitiesView/components/ChartView/types.js +1 -0
  148. package/lib/components/Index/components/EntitiesView/components/ChartView/utils.d.ts +14 -0
  149. package/lib/components/Index/components/EntitiesView/components/ChartView/utils.js +23 -0
  150. package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +3 -0
  151. package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.js +14 -0
  152. package/lib/components/Index/components/EntitiesView/components/EntityList/types.d.ts +6 -0
  153. package/lib/components/Index/components/EntitiesView/components/EntityList/types.js +1 -0
  154. package/lib/components/Index/components/EntitiesView/constants.d.ts +1 -0
  155. package/lib/components/Index/components/EntitiesView/constants.js +1 -0
  156. package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +2 -0
  157. package/lib/components/Index/components/EntitiesView/entitiesView.js +15 -0
  158. package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +3 -0
  159. package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +20 -0
  160. package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +2 -0
  161. package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.js +14 -0
  162. package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.d.ts +13 -0
  163. package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.js +5 -0
  164. package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +8 -0
  165. package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +50 -0
  166. package/lib/components/Index/components/EntitiesView/types.d.ts +8 -0
  167. package/lib/components/Index/components/EntitiesView/types.js +1 -0
  168. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.d.ts +1 -0
  169. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +13 -0
  170. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.d.ts +3 -0
  171. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.js +13 -0
  172. package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.d.ts +6 -0
  173. package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.js +14 -0
  174. package/lib/components/Index/components/Hero/components/Summaries/summaries.d.ts +9 -0
  175. package/lib/components/Index/components/Hero/components/Summaries/summaries.js +12 -0
  176. package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.d.ts +13 -0
  177. package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.js +18 -0
  178. package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.d.ts +7 -0
  179. package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.js +26 -0
  180. package/lib/components/Index/components/Hero/hero.d.ts +11 -0
  181. package/lib/components/Index/components/Hero/hero.js +12 -0
  182. package/lib/components/Index/components/Hero/hero.stories.d.ts +23 -0
  183. package/lib/components/Index/components/Hero/hero.stories.js +22 -0
  184. package/lib/components/Index/components/Hero/hero.styles.d.ts +16 -0
  185. package/lib/components/Index/components/Hero/hero.styles.js +44 -0
  186. package/lib/components/Index/components/Hero/stories/hero.stories.d.ts +6 -0
  187. package/lib/components/Index/components/Hero/stories/hero.stories.js +16 -0
  188. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +8 -0
  189. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +57 -0
  190. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +4 -0
  191. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +10 -0
  192. package/lib/components/Index/components/NTag/nTag.d.ts +10 -0
  193. package/lib/components/Index/components/NTag/nTag.js +8 -0
  194. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +11 -0
  195. package/lib/components/Index/components/NTagCell/nTagCell.js +29 -0
  196. package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +5 -0
  197. package/lib/components/Index/components/NTagCell/nTagCell.stories.js +16 -0
  198. package/lib/components/Index/components/Tabs/common/utils.d.ts +8 -0
  199. package/lib/components/Index/components/Tabs/common/utils.js +19 -0
  200. package/lib/components/Index/components/Tabs/tabs.d.ts +1 -0
  201. package/lib/components/Index/components/Tabs/tabs.js +20 -0
  202. package/lib/components/Index/components/TitleCell/titleCell.d.ts +6 -0
  203. package/lib/components/Index/components/TitleCell/titleCell.js +10 -0
  204. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +3 -0
  205. package/lib/components/Index/components/TitleCell/titleCell.styles.js +6 -0
  206. package/lib/components/Index/index.stories.d.ts +6 -0
  207. package/lib/components/Index/index.stories.js +26 -0
  208. package/lib/components/Index/stories/index.stories.d.ts +6 -0
  209. package/lib/components/Index/stories/index.stories.js +17 -0
  210. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +6 -0
  211. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +10 -0
  212. package/lib/components/Layout/components/Footer/footer.stories.d.ts +27 -0
  213. package/lib/components/Layout/components/Footer/footer.stories.js +64 -0
  214. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +5 -0
  215. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +29 -0
  216. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +6 -0
  217. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +13 -0
  218. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +36 -0
  219. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +9 -0
  220. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +5 -0
  221. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +10 -0
  222. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +36 -0
  223. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +9 -0
  224. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +5 -0
  225. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +19 -0
  226. package/lib/components/Layout/components/Outline/common/constants.d.ts +2 -0
  227. package/lib/components/Layout/components/Outline/common/constants.js +1 -0
  228. package/lib/components/Login/login.stories.d.ts +6 -0
  229. package/lib/components/Login/login.stories.js +31 -0
  230. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +16 -0
  231. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +28 -0
  232. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +5 -0
  233. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +46 -0
  234. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +3 -0
  235. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +21 -0
  236. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +6 -0
  237. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +17 -0
  238. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +2 -0
  239. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +37 -0
  240. package/lib/components/Table/components/Pagination/pagination.d.ts +9 -0
  241. package/lib/components/Table/components/Pagination/pagination.js +19 -0
  242. package/lib/components/Table/components/Pagination/pagination.stories.d.ts +28 -0
  243. package/lib/components/Table/components/Pagination/pagination.stories.js +24 -0
  244. package/lib/components/Table/components/Pagination/pagination.styles.d.ts +4 -0
  245. package/lib/components/Table/components/Pagination/pagination.styles.js +15 -0
  246. package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.d.ts +3 -0
  247. package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.js +3 -0
  248. package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.d.ts +8 -0
  249. package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.js +18 -0
  250. package/lib/components/Table/components/TableBody/hooks/virtualizer/types.d.ts +4 -0
  251. package/lib/components/Table/components/TableBody/hooks/virtualizer/types.js +1 -0
  252. package/lib/components/Table/components/TableBody/utils.d.ts +12 -0
  253. package/lib/components/Table/components/TableBody/utils.js +17 -0
  254. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.d.ts +3 -0
  255. package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.js +1 -0
  256. package/lib/components/Table/components/TableCell/components/MarkdownCell/types.d.ts +3 -0
  257. package/lib/components/Table/components/TableCell/components/MarkdownCell/types.js +1 -0
  258. package/lib/components/TableCreator/common/constants.d.ts +6 -0
  259. package/lib/components/TableCreator/common/constants.js +19 -0
  260. package/lib/components/TableCreator/common/entities.d.ts +5 -0
  261. package/lib/components/TableCreator/common/entities.js +1 -0
  262. package/lib/components/TableCreator/tableCreator.styles.d.ts +4 -0
  263. package/lib/components/TableCreator/tableCreator.styles.js +4 -0
  264. package/lib/components/common/Alert/alert.stories.d.ts +6 -0
  265. package/lib/components/common/Alert/alert.stories.js +36 -0
  266. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +4 -0
  267. package/lib/components/common/Alert/components/AlertText/alertText.styles.js +19 -0
  268. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +7 -0
  269. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +5 -0
  270. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +3 -0
  271. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +19 -0
  272. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +10 -0
  273. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +16 -0
  274. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +3 -0
  275. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +21 -0
  276. package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +3 -0
  277. package/lib/components/common/Button/components/LoginButton/loginButton.js +6 -0
  278. package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +7 -0
  279. package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +11 -0
  280. package/lib/components/common/CustomIcon/components/AiIcon/aiIcon.d.ts +2 -0
  281. package/lib/components/common/CustomIcon/components/AiIcon/aiIcon.js +6 -0
  282. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +5 -0
  283. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +10 -0
  284. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +3 -0
  285. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +9 -0
  286. package/lib/components/common/Switch/provider/context.d.ts +2 -0
  287. package/lib/components/common/Switch/provider/context.js +6 -0
  288. package/lib/components/common/Switch/provider/hook.d.ts +6 -0
  289. package/lib/components/common/Switch/provider/hook.js +9 -0
  290. package/lib/components/common/Switch/provider/provider.d.ts +9 -0
  291. package/lib/components/common/Switch/provider/provider.js +16 -0
  292. package/lib/components/common/Switch/provider/types.d.ts +6 -0
  293. package/lib/components/common/Switch/provider/types.js +1 -0
  294. package/lib/hooks/useAuthentication/common/constants.d.ts +4 -0
  295. package/lib/hooks/useAuthentication/common/constants.js +19 -0
  296. package/lib/hooks/useAuthentication/common/entities.d.ts +25 -0
  297. package/lib/hooks/useAuthentication/common/entities.js +11 -0
  298. package/lib/hooks/useAuthentication/common/utils.d.ts +15 -0
  299. package/lib/hooks/useAuthentication/common/utils.js +25 -0
  300. package/lib/hooks/useAuthentication/useAuthentication.d.ts +6 -0
  301. package/lib/hooks/useAuthentication/useAuthentication.js +9 -0
  302. package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +6 -0
  303. package/lib/hooks/useAuthentication/useAuthenticationComplete.js +55 -0
  304. package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +20 -0
  305. package/lib/hooks/useAuthentication/useAuthenticationForm.js +88 -0
  306. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +18 -0
  307. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +50 -0
  308. package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +20 -0
  309. package/lib/hooks/useAuthentication/useAuthenticationStatus.js +32 -0
  310. package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +21 -0
  311. package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +41 -0
  312. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +18 -0
  313. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +62 -0
  314. package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +24 -0
  315. package/lib/hooks/useAuthentication/useFetchTerraProfile.js +62 -0
  316. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +15 -0
  317. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +62 -0
  318. package/lib/hooks/useAuthentication/useTokenClient.d.ts +11 -0
  319. package/lib/hooks/useAuthentication/useTokenClient.js +29 -0
  320. package/lib/hooks/useAuthenticationConfig.d.ts +6 -0
  321. package/lib/hooks/useAuthenticationConfig.js +14 -0
  322. package/lib/hooks/useCategoryConfigs.d.ts +6 -0
  323. package/lib/hooks/useCategoryConfigs.js +17 -0
  324. package/lib/hooks/useEntityListRelatedView.d.ts +15 -0
  325. package/lib/hooks/useEntityListRelatedView.js +62 -0
  326. package/lib/hooks/useExploreMode.d.ts +14 -0
  327. package/lib/hooks/useExploreMode.js +20 -0
  328. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +15 -0
  329. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +27 -0
  330. package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +5 -0
  331. package/lib/hooks/useFileManifest/useFileManifestURL.js +11 -0
  332. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +9 -0
  333. package/lib/hooks/useFileManifest/useRequestFileManifest.js +37 -0
  334. package/lib/hooks/useLayoutState.d.ts +6 -0
  335. package/lib/hooks/useLayoutState.js +9 -0
  336. package/lib/hooks/useMenu.d.ts +10 -0
  337. package/lib/hooks/useMenu.js +17 -0
  338. package/lib/hooks/useMenuWithPosition.d.ts +14 -0
  339. package/lib/hooks/useMenuWithPosition.js +33 -0
  340. package/lib/hooks/useScroll.d.ts +10 -0
  341. package/lib/hooks/useScroll.js +12 -0
  342. package/lib/hooks/useSessionTimeout.d.ts +11 -0
  343. package/lib/hooks/useSessionTimeout.js +28 -0
  344. package/lib/mocks/@storybook/addon-actions.d.ts +9 -0
  345. package/lib/mocks/@storybook/addon-actions.js +9 -0
  346. package/lib/providers/authentication.d.ts +51 -0
  347. package/lib/providers/authentication.js +110 -0
  348. package/lib/providers/layoutState.d.ts +40 -0
  349. package/lib/providers/layoutState.js +47 -0
  350. package/lib/styles/common/mixins/colors.d.ts +25 -0
  351. package/lib/styles/common/mixins/colors.js +32 -0
  352. package/lib/styles/common/mixins/fonts.d.ts +16 -0
  353. package/lib/styles/common/mixins/fonts.js +30 -0
  354. package/lib/styles/common/mixins/shadows.d.ts +3 -0
  355. package/lib/styles/common/mixins/shadows.js +4 -0
  356. package/lib/styles/common/mui/palette.d.ts +47 -0
  357. package/lib/styles/common/mui/palette.js +47 -0
  358. package/lib/styles/common/mui/switch.d.ts +7 -0
  359. package/lib/styles/common/mui/switch.js +13 -0
  360. package/lib/theme/common/entities.d.ts +6 -0
  361. package/lib/theme/common/entities.js +1 -0
  362. package/lib/theme/components/muiSwitch.d.ts +2 -0
  363. package/lib/theme/components/muiSwitch.js +52 -0
  364. package/lib/utils/form.d.ts +8 -0
  365. package/lib/utils/form.js +17 -0
  366. package/lib/views/ExploreView/components/filters/Search/search.d.ts +12 -0
  367. package/lib/views/ExploreView/components/filters/Search/search.js +19 -0
  368. package/package.json +6 -1
  369. package/.eslintignore +0 -5
  370. package/.eslintrc.json +0 -79
  371. package/.github/copilot-instructions.md +0 -176
  372. package/.github/workflows/release-please.yml +0 -49
  373. package/.github/workflows/run-checks.yml +0 -57
  374. package/.husky/commit-msg +0 -18
  375. package/.husky/pre-commit +0 -43
  376. package/.prettierignore +0 -19
  377. package/.prettierrc.json +0 -1
  378. package/.release-please-manifest.json +0 -3
  379. package/.storybook/main.ts +0 -10
  380. package/.storybook/preview-head.html +0 -4
  381. package/.storybook/preview.js +0 -6
  382. package/CHANGELOG.md +0 -1117
  383. package/CLAUDE.md +0 -214
  384. package/backend/README.md +0 -64
  385. package/backend/__init__.py +0 -0
  386. package/backend/controllers/__init__.py +0 -0
  387. package/backend/controllers/facets_controller.py +0 -16
  388. package/backend/controllers/models.py +0 -11
  389. package/backend/main.py +0 -8
  390. package/backend/requirements.txt +0 -4
  391. package/backend/services/__init__.py +0 -0
  392. package/backend/services/facets_service.py +0 -68
  393. package/backend/services/models.py +0 -43
  394. package/commitlint.config.js +0 -1
  395. package/docs/TRUSTED_PUBLISHING.md +0 -132
  396. package/jest.config.js +0 -6
  397. package/release-please-config.json +0 -23
  398. package/tests/azulFileDownload.test.tsx +0 -96
  399. package/tests/buildCategoryViews.test.ts +0 -282
  400. package/tests/buildRequestFilters.test.ts +0 -60
  401. package/tests/buildRequestManifest.test.ts +0 -103
  402. package/tests/chart.test.tsx +0 -274
  403. package/tests/chartSortUtils.test.ts +0 -119
  404. package/tests/chartView.test.tsx +0 -48
  405. package/tests/dataDictionaryColumnFilters.test.tsx +0 -101
  406. package/tests/dataDictionary_utils.test.ts +0 -153
  407. package/tests/fetchApi.test.ts +0 -93
  408. package/tests/filter.test.tsx +0 -100
  409. package/tests/filterMenu.test.ts +0 -100
  410. package/tests/filterRange.test.tsx +0 -372
  411. package/tests/filterSortUtils.test.ts +0 -180
  412. package/tests/filters.test.tsx +0 -61
  413. package/tests/getFacetedMinMaxValues.test.ts +0 -166
  414. package/tests/getFilterSortType.test.ts +0 -45
  415. package/tests/getProfileStatus.test.ts +0 -290
  416. package/tests/linkCell.test.tsx +0 -89
  417. package/tests/markdownCell.test.tsx +0 -52
  418. package/tests/provider.test.tsx +0 -189
  419. package/tests/research.chatState.test.ts +0 -463
  420. package/tests/research.fetchResponse.test.ts +0 -164
  421. package/tests/research.queryProvider.test.ts +0 -321
  422. package/tests/research.useKeyShortCuts.test.ts +0 -256
  423. package/tests/rowSelectionValidation.test.ts +0 -282
  424. package/tests/setup.ts +0 -19
  425. package/tests/stepIcon.test.tsx +0 -42
  426. package/tests/tableFilter.test.tsx +0 -90
  427. package/tests/terraProfileProvider.test.tsx +0 -117
  428. package/tests/theme.test.ts +0 -465
  429. package/tests/toggleButtonGroupProvider.test.tsx +0 -125
  430. package/tests/transformRoute.test.ts +0 -21
  431. package/tests/tsconfig.json +0 -8
  432. package/tests/useFileLocation.test.ts +0 -36
  433. package/tests/useRequestManifest.test.ts +0 -201
  434. package/tests/useRouteHistory.test.ts +0 -97
  435. package/tests/useSessionActive.test.ts +0 -106
  436. package/tests/useWindowResize.test.ts +0 -130
  437. package/tests/viewModelBuilders_utils.test.ts +0 -58
  438. package/tests/viewToggle.test.tsx +0 -54
  439. package/tsconfig.json +0 -25
@@ -1,290 +0,0 @@
1
- import {
2
- LoginStatus,
3
- REQUEST_STATUS,
4
- } from "../src/providers/authentication/terra/hooks/common/entities";
5
- import { TerraNIHResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraNIHProfile";
6
- import { TerraResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraProfile";
7
- import { TerraTermsOfServiceResponse } from "../src/providers/authentication/terra/hooks/useFetchTerraTermsOfService";
8
- import { TERRA_PROFILE_STATUS } from "../src/providers/authentication/terra/types";
9
- import { getProfileStatus } from "../src/providers/authentication/terra/utils";
10
-
11
- const LOGIN_STATUS_NIH_COMPLETED: LoginStatus<TerraNIHResponse> = {
12
- isSuccess: true,
13
- isSupported: true,
14
- requestStatus: REQUEST_STATUS.COMPLETED,
15
- response: undefined,
16
- };
17
-
18
- const LOGIN_STATUS_TERRA_COMPLETED: LoginStatus<TerraResponse> = {
19
- isSuccess: true,
20
- isSupported: true,
21
- requestStatus: REQUEST_STATUS.COMPLETED,
22
- response: undefined,
23
- };
24
-
25
- const LOGIN_STATUS_TOS_COMPLETED: LoginStatus<TerraTermsOfServiceResponse> = {
26
- isSuccess: true,
27
- isSupported: true,
28
- requestStatus: REQUEST_STATUS.COMPLETED,
29
- response: undefined,
30
- };
31
-
32
- const LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL: LoginStatus<TerraTermsOfServiceResponse> =
33
- {
34
- isSuccess: false,
35
- isSupported: true,
36
- requestStatus: REQUEST_STATUS.COMPLETED,
37
- response: undefined,
38
- };
39
-
40
- const LOGIN_STATUS_NIH_NOT_STARTED: LoginStatus<TerraNIHResponse> = {
41
- isSuccess: false,
42
- isSupported: true,
43
- requestStatus: REQUEST_STATUS.NOT_STARTED,
44
- response: undefined,
45
- };
46
-
47
- const LOGIN_STATUS_TERRA_NOT_STARTED: LoginStatus<TerraResponse> = {
48
- isSuccess: false,
49
- isSupported: true,
50
- requestStatus: REQUEST_STATUS.NOT_STARTED,
51
- response: undefined,
52
- };
53
-
54
- const LOGIN_STATUS_TOS_NOT_STARTED: LoginStatus<TerraTermsOfServiceResponse> = {
55
- isSuccess: false,
56
- isSupported: true,
57
- requestStatus: REQUEST_STATUS.NOT_STARTED,
58
- response: undefined,
59
- };
60
-
61
- const LOGIN_STATUS_NIH_PENDING: LoginStatus<TerraNIHResponse> = {
62
- isSuccess: false,
63
- isSupported: true,
64
- requestStatus: REQUEST_STATUS.PENDING,
65
- response: undefined,
66
- };
67
-
68
- const LOGIN_STATUS_TERRA_PENDING: LoginStatus<TerraResponse> = {
69
- isSuccess: false,
70
- isSupported: true,
71
- requestStatus: REQUEST_STATUS.PENDING,
72
- response: undefined,
73
- };
74
-
75
- const LOGIN_STATUS_TOS_PENDING: LoginStatus<TerraTermsOfServiceResponse> = {
76
- isSuccess: false,
77
- isSupported: true,
78
- requestStatus: REQUEST_STATUS.PENDING,
79
- response: undefined,
80
- };
81
-
82
- const LOGIN_STATUS_NIH_UNSUPPORTED: LoginStatus<TerraNIHResponse> = {
83
- isSuccess: false,
84
- isSupported: false,
85
- requestStatus: REQUEST_STATUS.NOT_STARTED,
86
- response: undefined,
87
- };
88
-
89
- const LOGIN_STATUS_TERRA_UNSUPPORTED: LoginStatus<TerraResponse> = {
90
- isSuccess: false,
91
- isSupported: false,
92
- requestStatus: REQUEST_STATUS.NOT_STARTED,
93
- response: undefined,
94
- };
95
-
96
- const LOGIN_STATUS_TOS_UNSUPPORTED: LoginStatus<TerraTermsOfServiceResponse> = {
97
- isSuccess: false,
98
- isSupported: false,
99
- requestStatus: REQUEST_STATUS.NOT_STARTED,
100
- response: undefined,
101
- };
102
-
103
- describe("getProfileStatus", () => {
104
- test("not authenticated, services not started", () => {
105
- expect(
106
- getProfileStatus(
107
- false,
108
- LOGIN_STATUS_NIH_NOT_STARTED,
109
- LOGIN_STATUS_TERRA_NOT_STARTED,
110
- LOGIN_STATUS_TOS_NOT_STARTED,
111
- ),
112
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
113
- });
114
-
115
- test("not authenticated, services unsupported", () => {
116
- expect(
117
- getProfileStatus(
118
- false,
119
- LOGIN_STATUS_NIH_UNSUPPORTED,
120
- LOGIN_STATUS_TERRA_UNSUPPORTED,
121
- LOGIN_STATUS_TOS_UNSUPPORTED,
122
- ),
123
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
124
- });
125
-
126
- test("not authenticated, services completed", () => {
127
- expect(
128
- getProfileStatus(
129
- false,
130
- LOGIN_STATUS_NIH_COMPLETED,
131
- LOGIN_STATUS_TERRA_COMPLETED,
132
- LOGIN_STATUS_TOS_COMPLETED,
133
- ),
134
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
135
- });
136
-
137
- test("authenticated, services not started", () => {
138
- expect(
139
- getProfileStatus(
140
- true,
141
- LOGIN_STATUS_NIH_NOT_STARTED,
142
- LOGIN_STATUS_TERRA_NOT_STARTED,
143
- LOGIN_STATUS_TOS_NOT_STARTED,
144
- ),
145
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
146
- });
147
-
148
- test("authenticated, services pending", () => {
149
- expect(
150
- getProfileStatus(
151
- true,
152
- LOGIN_STATUS_NIH_PENDING,
153
- LOGIN_STATUS_TERRA_PENDING,
154
- LOGIN_STATUS_TOS_PENDING,
155
- ),
156
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
157
- });
158
-
159
- test("authenticated, nih pending, other services completed", () => {
160
- expect(
161
- getProfileStatus(
162
- true,
163
- LOGIN_STATUS_NIH_PENDING,
164
- LOGIN_STATUS_TERRA_COMPLETED,
165
- LOGIN_STATUS_TOS_COMPLETED,
166
- ),
167
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
168
- });
169
-
170
- test("authenticated, terra pending, other services completed", () => {
171
- expect(
172
- getProfileStatus(
173
- true,
174
- LOGIN_STATUS_NIH_COMPLETED,
175
- LOGIN_STATUS_TERRA_PENDING,
176
- LOGIN_STATUS_TOS_COMPLETED,
177
- ),
178
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
179
- });
180
-
181
- test("authenticated, tos pending, other services completed", () => {
182
- expect(
183
- getProfileStatus(
184
- true,
185
- LOGIN_STATUS_NIH_COMPLETED,
186
- LOGIN_STATUS_TERRA_COMPLETED,
187
- LOGIN_STATUS_TOS_PENDING,
188
- ),
189
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
190
- });
191
-
192
- test("authenticated, nih completed, terra pending, tos not started", () => {
193
- expect(
194
- getProfileStatus(
195
- true,
196
- LOGIN_STATUS_NIH_COMPLETED,
197
- LOGIN_STATUS_TERRA_PENDING,
198
- LOGIN_STATUS_TOS_NOT_STARTED,
199
- ),
200
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
201
- });
202
-
203
- test("authenticated, nih not started, terra completed, tos pending", () => {
204
- expect(
205
- getProfileStatus(
206
- true,
207
- LOGIN_STATUS_NIH_NOT_STARTED,
208
- LOGIN_STATUS_TERRA_COMPLETED,
209
- LOGIN_STATUS_TOS_PENDING,
210
- ),
211
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
212
- });
213
-
214
- test("authenticated, nih pending, terra not started, tos completed", () => {
215
- expect(
216
- getProfileStatus(
217
- true,
218
- LOGIN_STATUS_NIH_PENDING,
219
- LOGIN_STATUS_TERRA_NOT_STARTED,
220
- LOGIN_STATUS_TOS_COMPLETED,
221
- ),
222
- ).toBe(TERRA_PROFILE_STATUS.PENDING);
223
- });
224
-
225
- test("authenticated, services unsupported", () => {
226
- expect(
227
- getProfileStatus(
228
- true,
229
- LOGIN_STATUS_NIH_UNSUPPORTED,
230
- LOGIN_STATUS_TERRA_UNSUPPORTED,
231
- LOGIN_STATUS_TOS_UNSUPPORTED,
232
- ),
233
- ).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
234
- });
235
-
236
- test("authenticated, services completed, tos unsuccessful", () => {
237
- expect(
238
- getProfileStatus(
239
- true,
240
- LOGIN_STATUS_NIH_COMPLETED,
241
- LOGIN_STATUS_TERRA_COMPLETED,
242
- LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL,
243
- ),
244
- ).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
245
- });
246
-
247
- test("authenticated, nih unsupported, terra completed, tos completed unsuccessfully", () => {
248
- expect(
249
- getProfileStatus(
250
- true,
251
- LOGIN_STATUS_NIH_UNSUPPORTED,
252
- LOGIN_STATUS_TERRA_COMPLETED,
253
- LOGIN_STATUS_TOS_COMPLETED_UNSUCCESSFUL,
254
- ),
255
- ).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
256
- });
257
-
258
- test("authenticated, nih unsupported, other services completed", () => {
259
- expect(
260
- getProfileStatus(
261
- true,
262
- LOGIN_STATUS_NIH_UNSUPPORTED,
263
- LOGIN_STATUS_TERRA_COMPLETED,
264
- LOGIN_STATUS_TOS_COMPLETED,
265
- ),
266
- ).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
267
- });
268
-
269
- test("authenticated, terra completed, other services unsupported", () => {
270
- expect(
271
- getProfileStatus(
272
- true,
273
- LOGIN_STATUS_NIH_UNSUPPORTED,
274
- LOGIN_STATUS_TERRA_COMPLETED,
275
- LOGIN_STATUS_TOS_UNSUPPORTED,
276
- ),
277
- ).toBe(TERRA_PROFILE_STATUS.UNAUTHENTICATED);
278
- });
279
-
280
- test("authenticated, services completed", () => {
281
- expect(
282
- getProfileStatus(
283
- true,
284
- LOGIN_STATUS_NIH_COMPLETED,
285
- LOGIN_STATUS_TERRA_COMPLETED,
286
- LOGIN_STATUS_TOS_COMPLETED,
287
- ),
288
- ).toBe(TERRA_PROFILE_STATUS.AUTHENTICATED);
289
- });
290
- });
@@ -1,89 +0,0 @@
1
- import { matchers } from "@emotion/jest";
2
- import { composeStories } from "@storybook/react";
3
- import "@testing-library/jest-dom";
4
- import { render, screen } from "@testing-library/react";
5
- import React from "react";
6
- import {
7
- ANCHOR_TARGET,
8
- REL_ATTRIBUTE,
9
- } from "../src/components/Links/common/entities";
10
- import * as stories from "../src/components/Table/components/TableCell/components/LinkCell/stories/linkCell.stories";
11
-
12
- expect.extend(matchers);
13
-
14
- const { ClientSide, External, Invalid, WithCustomStyle } =
15
- composeStories(stories);
16
-
17
- const STYLE_RULE_PROPERTIES = {
18
- TEXT_DECORATION: "text-decoration",
19
- };
20
-
21
- const STYLE_RULE_VALUES = {
22
- NONE: "none",
23
- UNDERLINE: "underline",
24
- };
25
-
26
- describe("TableCell, LinkCell", () => {
27
- it("renders client-side link", async () => {
28
- render(<ClientSide />);
29
- const anchorEl = screen.getByText("Explore");
30
- expect(anchorEl).toBeDefined();
31
- expect(anchorEl?.getAttribute("href")).toBe("/");
32
- expect(anchorEl?.getAttribute("rel")).toBe(REL_ATTRIBUTE.NO_OPENER);
33
- expect(anchorEl?.getAttribute("target")).toBe(ANCHOR_TARGET.SELF);
34
- // Expect MuiLink-underlineAlways class and underline style.
35
- expect(anchorEl).toHaveClass("MuiLink-underlineAlways");
36
- expect(anchorEl).toHaveStyleRule(
37
- STYLE_RULE_PROPERTIES.TEXT_DECORATION,
38
- STYLE_RULE_VALUES.UNDERLINE,
39
- );
40
- });
41
-
42
- it("renders external link", async () => {
43
- render(<External />);
44
- const anchorEl = screen.getByText("Explore");
45
- expect(anchorEl).toBeDefined();
46
- expect(anchorEl?.getAttribute("href")).toBe("https://www.example.com");
47
- expect(anchorEl?.getAttribute("rel")).toBe(
48
- REL_ATTRIBUTE.NO_OPENER_NO_REFERRER,
49
- );
50
- expect(anchorEl?.getAttribute("target")).toBe(ANCHOR_TARGET.BLANK);
51
- // Expect MuiLink-underlineAlways class and underline style.
52
- expect(anchorEl).toHaveClass("MuiLink-underlineAlways");
53
- expect(anchorEl).toHaveStyleRule(
54
- STYLE_RULE_PROPERTIES.TEXT_DECORATION,
55
- STYLE_RULE_VALUES.UNDERLINE,
56
- );
57
- });
58
-
59
- it("renders plain text for invalid link", () => {
60
- render(<Invalid />);
61
- const spanEl = screen.getByText("Explore");
62
- expect(spanEl.tagName).toBe("SPAN");
63
- expect(spanEl.getAttribute("href")).toBeNull();
64
- expect(spanEl.getAttribute("rel")).toBeNull();
65
- expect(spanEl.getAttribute("target")).toBeNull();
66
- // Expect no MuiLink-root class and no underline style.
67
- expect(spanEl).not.toHaveClass("MuiLink-root");
68
- expect(spanEl).not.toHaveStyleRule(
69
- STYLE_RULE_PROPERTIES.TEXT_DECORATION,
70
- STYLE_RULE_VALUES.UNDERLINE,
71
- );
72
- });
73
-
74
- it("renders link with custom link props", async () => {
75
- render(<WithCustomStyle />);
76
- const anchorEl = screen.getByText("Explore");
77
- // Expect MuiLink-underlineNone class and no underline style.
78
- expect(anchorEl).toHaveClass("MuiLink-underlineNone");
79
- expect(anchorEl).toHaveStyleRule(
80
- STYLE_RULE_PROPERTIES.TEXT_DECORATION,
81
- STYLE_RULE_VALUES.NONE,
82
- );
83
- expect(anchorEl).toHaveStyleRule(
84
- STYLE_RULE_PROPERTIES.TEXT_DECORATION,
85
- STYLE_RULE_VALUES.NONE,
86
- { target: ":hover" },
87
- );
88
- });
89
- });
@@ -1,52 +0,0 @@
1
- import { matchers } from "@emotion/jest";
2
- import { composeStories } from "@storybook/react";
3
- import { Column } from "@tanstack/react-table";
4
- import "@testing-library/jest-dom";
5
- import { render, screen } from "@testing-library/react";
6
- import React from "react";
7
- import {
8
- ANCHOR_TARGET,
9
- REL_ATTRIBUTE,
10
- } from "../src/components/Links/common/entities";
11
- import { STYLED_ANCHOR } from "../src/components/Table/components/TableCell/components/MarkdownCell/stories/constants";
12
- import * as stories from "../src/components/Table/components/TableCell/components/MarkdownCell/stories/markdownCell.stories";
13
-
14
- expect.extend(matchers);
15
-
16
- const { Default, WithHtml } = composeStories(stories);
17
-
18
- describe("MarkdownCell", () => {
19
- it("renders the markdown content", async () => {
20
- render(<Default />);
21
- expect(await screen.findByText("UBERON:0000955")).toBeInTheDocument();
22
- });
23
-
24
- it("renders HTML and anchor elements", async () => {
25
- render(<WithHtml />);
26
- const anchorEl = await screen.findByText("example link");
27
- expect(anchorEl).toBeInTheDocument();
28
- expect(anchorEl.getAttribute("href")).toBe("https://www.example.com");
29
- expect(anchorEl.getAttribute("target")).toBe(ANCHOR_TARGET.BLANK);
30
- expect(anchorEl.getAttribute("rel")).toBe(
31
- REL_ATTRIBUTE.NO_OPENER_NO_REFERRER,
32
- );
33
- expect(anchorEl).toHaveClass("MuiLink-root");
34
- });
35
-
36
- it("applies the correct className and component", async () => {
37
- render(
38
- <WithHtml
39
- className="css-pygqsj"
40
- column={
41
- {
42
- columnDef: { meta: { components: { a: STYLED_ANCHOR } } },
43
- } as unknown as Column<unknown, string>
44
- }
45
- />,
46
- );
47
- const anchorEl = await screen.findByText("example link");
48
- expect(anchorEl).toHaveStyleRule("background-color", "green");
49
- expect(anchorEl).toHaveStyleRule("color", "white");
50
- expect(anchorEl.closest(".css-pygqsj")).toBeInTheDocument();
51
- });
52
- });
@@ -1,189 +0,0 @@
1
- import { jest } from "@jest/globals";
2
- import { act, render, screen } from "@testing-library/react";
3
- import React from "react";
4
- import { LoginGuardContext } from "../src/providers/loginGuard/context";
5
-
6
- jest.unstable_mockModule("../src/hooks/useConfig", () => ({
7
- useConfig: jest.fn(),
8
- }));
9
-
10
- jest.unstable_mockModule("../src/providers/authentication/auth/hook", () => ({
11
- useAuth: jest.fn(),
12
- }));
13
-
14
- jest.unstable_mockModule(
15
- "../src/hooks/authentication/config/useAuthenticationConfig",
16
- () => ({
17
- useAuthenticationConfig: jest.fn(),
18
- }),
19
- );
20
-
21
- const TEST_ID_LOGIN_DIALOG = "login-dialog";
22
- const TEXT_DIALOG_CLOSED = "closed";
23
- const TEXT_DIALOG_OPEN = "open";
24
- jest.unstable_mockModule(
25
- "../src/components/common/LoginDialog/loginDialog",
26
- () => ({
27
- LoginDialog: ({ open }: { open: boolean }): JSX.Element => (
28
- <div data-testid={TEST_ID_LOGIN_DIALOG}>
29
- {open ? TEXT_DIALOG_OPEN : TEXT_DIALOG_CLOSED}
30
- </div>
31
- ),
32
- }),
33
- );
34
-
35
- const { useConfig } = await import("../src/hooks/useConfig");
36
- const { useAuth } = await import("../src/providers/authentication/auth/hook");
37
- const { useAuthenticationConfig } =
38
- await import("../src/hooks/authentication/config/useAuthenticationConfig");
39
-
40
- const { LoginGuardProvider } =
41
- await import("../src/providers/loginGuard/provider");
42
-
43
- const TEXT_BUTTON_EXPORT = "export";
44
-
45
- describe("LoginGuardProvider", () => {
46
- beforeEach(() => {
47
- // Mock hooks used by login guard.
48
- (useConfig as jest.Mock).mockReturnValue({
49
- config: {
50
- exportsRequireAuth: true,
51
- },
52
- });
53
- (useAuth as jest.Mock).mockReturnValue({
54
- authState: {
55
- isAuthenticated: false,
56
- },
57
- });
58
- (useAuthenticationConfig as jest.Mock).mockReturnValue({});
59
- });
60
-
61
- it("should render children and login dialog closed", () => {
62
- render(
63
- <LoginGuardProvider>
64
- <div data-testid="child">child component</div>
65
- </LoginGuardProvider>,
66
- );
67
-
68
- expect(screen.getByTestId("child")).toBeTruthy();
69
- expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
70
- TEXT_DIALOG_CLOSED,
71
- );
72
- });
73
-
74
- it("calls callback immediately if user is authenticated", () => {
75
- const callback = jest.fn();
76
-
77
- // Simulate user authentication.
78
- (useAuth as jest.Mock).mockReturnValue({
79
- authState: { isAuthenticated: true },
80
- });
81
-
82
- render(
83
- <LoginGuardProvider>
84
- <LoginGuardContext.Consumer>
85
- {({ requireLogin }) => (
86
- <button onClick={() => requireLogin(callback)}>
87
- {TEXT_BUTTON_EXPORT}
88
- </button>
89
- )}
90
- </LoginGuardContext.Consumer>
91
- </LoginGuardProvider>,
92
- );
93
-
94
- // Click button requiring login.
95
- act(() => {
96
- screen.getByText(TEXT_BUTTON_EXPORT).click();
97
- });
98
-
99
- // User is authenticated; callback should be fired immediately.
100
- expect(callback).toHaveBeenCalled();
101
-
102
- // Login dialog should not be open.
103
- expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
104
- TEXT_DIALOG_CLOSED,
105
- );
106
- });
107
-
108
- it("calls callback immediately if exportsRequireAuth is false", () => {
109
- const callback = jest.fn();
110
-
111
- // Simulate exportsRequireAuth being false.
112
- (useConfig as jest.Mock).mockReturnValue({
113
- config: {
114
- exportsRequireAuth: false,
115
- },
116
- });
117
-
118
- render(
119
- <LoginGuardProvider>
120
- <LoginGuardContext.Consumer>
121
- {({ requireLogin }) => (
122
- <button onClick={() => requireLogin(callback)}>
123
- {TEXT_BUTTON_EXPORT}
124
- </button>
125
- )}
126
- </LoginGuardContext.Consumer>
127
- </LoginGuardProvider>,
128
- );
129
-
130
- // Click button requiring login.
131
- act(() => {
132
- screen.getByText(TEXT_BUTTON_EXPORT).click();
133
- });
134
-
135
- // exportsRequireAuth is false; callback should be fired immediately.
136
- expect(callback).toHaveBeenCalled();
137
-
138
- // Login dialog should not be open.
139
- expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
140
- TEXT_DIALOG_CLOSED,
141
- );
142
- });
143
-
144
- it("should call callback after user authenticates", async () => {
145
- const callback = jest.fn();
146
-
147
- const { rerender } = render(
148
- <LoginGuardProvider>
149
- <LoginGuardContext.Consumer>
150
- {({ requireLogin }) => (
151
- <button onClick={() => requireLogin(callback)}>
152
- {TEXT_BUTTON_EXPORT}
153
- </button>
154
- )}
155
- </LoginGuardContext.Consumer>
156
- </LoginGuardProvider>,
157
- );
158
-
159
- // Click button requiring login.
160
- act(() => {
161
- screen.getByText(TEXT_BUTTON_EXPORT).click();
162
- });
163
-
164
- // User is not authenticated; callback should not have been called.
165
- expect(callback).not.toHaveBeenCalled();
166
-
167
- // User is not authenticated; login dialog should be open.
168
- expect(screen.getByTestId(TEST_ID_LOGIN_DIALOG).textContent).toBe(
169
- TEXT_DIALOG_OPEN,
170
- );
171
-
172
- // Simulate user authentication.
173
- await act(async () => {
174
- (useAuth as jest.Mock).mockReturnValue({
175
- authState: { isAuthenticated: true },
176
- });
177
- });
178
-
179
- // Rerender to trigger useEffect.
180
- rerender(
181
- <LoginGuardProvider>
182
- <div />
183
- </LoginGuardProvider>,
184
- );
185
-
186
- // Callback should be called (in useEffect called on re-render).
187
- expect(callback).toHaveBeenCalled();
188
- });
189
- });