@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,465 +0,0 @@
1
- import {
2
- createTheme,
3
- CssVarsTheme,
4
- Palette,
5
- PaletteColor,
6
- Theme,
7
- ThemeOptions,
8
- ThemeVars,
9
- TypographyStyle,
10
- } from "@mui/material";
11
- import { components as componentsValues } from "../src/theme/common/components";
12
- import { palette as paletteValues } from "../src/theme/common/palette";
13
- import { typography as typographyValues } from "../src/theme/common/typography";
14
- import { createAppTheme } from "../src/theme/theme";
15
-
16
- type GenericRecord<T = unknown> = Record<string, T>;
17
-
18
- const CUSTOM_BODY_400: TypographyStyle = {
19
- fontSize: "80px",
20
- };
21
-
22
- const CUSTOM_BREAKPOINTS = {
23
- values: {
24
- lg: 1280,
25
- md: 1024,
26
- sm: 600,
27
- xl: 1600,
28
- xs: 0,
29
- },
30
- };
31
-
32
- const CUSTOM_PALETTE_PRIMARY = {
33
- main: "#00ffb6",
34
- };
35
-
36
- const DEFAULT_BODY_400: TypographyStyle = {
37
- fontFamily: "Inter",
38
- fontSize: "14px",
39
- fontWeight: 400,
40
- lineHeight: "20px",
41
- };
42
-
43
- const DEFAULT_BREAKPOINTS = {
44
- values: {
45
- lg: 1440,
46
- md: 1280,
47
- sm: 768,
48
- xs: 0,
49
- },
50
- };
51
-
52
- const DEFAULT_PALETTE_ALERT = {
53
- light: "#FED3D1",
54
- lightest: "#FFF4F4",
55
- main: "#B42318",
56
- };
57
-
58
- const DEFAULT_PALETTE_BACKGROUND = {
59
- default: "#F6F6F7",
60
- };
61
-
62
- const DEFAULT_PALETTE_INFO = {
63
- contrastText: "#00729C",
64
- light: "#97D6EA",
65
- lightest: "#F2FAFC",
66
- main: "#00729C",
67
- };
68
-
69
- const DEFAULT_PALETTE_INK = {
70
- light: "#637381",
71
- main: "#212B36",
72
- };
73
-
74
- const DEFAULT_PALETTE_PRIMARY = {
75
- dark: "#005EA9",
76
- lightest: "#E6EFF6",
77
- main: "#1C7CC7",
78
- };
79
-
80
- const DEFAULT_PALETTE_SMOKE = {
81
- dark: "#C4CDD5",
82
- light: "#F6F6F7",
83
- lightest: "#FAFBFB",
84
- main: "#E1E3E5",
85
- };
86
-
87
- const DEFAULT_PALETTE_SUCCESS = {
88
- light: "#AEE9D1",
89
- lightest: "#F1F8F5",
90
- main: "#287555",
91
- };
92
-
93
- const DEFAULT_PALETTE_TEXT = {
94
- primary: "#212B36",
95
- };
96
-
97
- const DEFAULT_PALETTE_WARNING = {
98
- contrastText: "#B54708",
99
- light: "#FFD79D",
100
- lightest: "#FFFAEB",
101
- main: "#B54708",
102
- };
103
-
104
- const DEFAULT_SHADOWS = [
105
- "none",
106
- "0 1px 4px 0 #00000012",
107
- "0 8px 8px -4px #10182808, 0 20px 24px -4px #10182814",
108
- ];
109
-
110
- const CUSTOM_OPTIONS: ThemeOptions = {
111
- breakpoints: CUSTOM_BREAKPOINTS,
112
- palette: { primary: CUSTOM_PALETTE_PRIMARY },
113
- typography: {
114
- "body-400": CUSTOM_BODY_400,
115
- fontFamily: "Roboto",
116
- },
117
- };
118
-
119
- describe("Theme Configuration", () => {
120
- let baseTheme: Theme;
121
- let theme: Theme;
122
- let customTheme: Theme;
123
-
124
- beforeEach(() => {
125
- baseTheme = createTheme();
126
- theme = createAppTheme();
127
- customTheme = createAppTheme(CUSTOM_OPTIONS);
128
- });
129
-
130
- describe("CSS Variables", () => {
131
- it("should have css variables enabled", () => {
132
- expect("vars" in theme).toBe(true);
133
- });
134
- });
135
-
136
- describe("CSS Variables Configuration", () => {
137
- let vars: CssVarsTheme["vars"];
138
-
139
- beforeEach(() => {
140
- vars = theme.vars;
141
- expect(vars).toBeDefined();
142
- });
143
-
144
- it("should have custom 'app' var exposed as CSS variables", () => {
145
- const appValue = vars.app?.fontFamily;
146
- expect(appValue).toBeDefined();
147
- expect(appValue).toContain(theme.typography.fontFamily);
148
- });
149
-
150
- it("should have fonts exposed as CSS variables", () => {
151
- expect(vars.font).toBeDefined();
152
-
153
- Object.keys(typographyValues(baseTheme))
154
- .filter(filterTypographyVariants)
155
- .forEach((variant) => {
156
- // Test the variant exists in both theme and vars.
157
- expect(variant in theme.typography).toBe(true);
158
- expect(variant in vars.font).toBe(true);
159
-
160
- const typography = theme.typography as unknown as GenericRecord;
161
- const font = vars.font as unknown as GenericRecord;
162
-
163
- // Get the font and typography variable value.
164
- const fontValue = font[variant];
165
- const typographyValue = typography[variant] as TypographyStyle;
166
-
167
- // Ensure the font family is defined.
168
- expect(typographyValue.fontFamily).toBeDefined();
169
-
170
- // Check variable pattern.
171
- expect(fontValue).toMatch(new RegExp(`^var\\(--font-${variant}`));
172
-
173
- // Check font size and line height format.
174
- expect(fontValue).toMatch(/\d+px\/\d+px/);
175
-
176
- // Check ends with font-family.
177
- expect(fontValue).toMatch(
178
- new RegExp(`${typographyValue.fontFamily}\\)$`),
179
- );
180
-
181
- // Full pattern test.
182
- expect(fontValue).toMatch(
183
- new RegExp(
184
- `^var\\(--font-${variant},\\s+\\d+\\s+\\d+px\\/\\d+px\\s+${typographyValue.fontFamily}\\)$`,
185
- ),
186
- );
187
- });
188
- });
189
-
190
- it("should have palette colors exposed as CSS variables", () => {
191
- expect(vars.palette).toBeDefined();
192
-
193
- Object.keys(paletteValues).forEach((color) => {
194
- // Test the color exists in both theme and vars.
195
- expect(color in theme.palette).toBe(true);
196
- expect(color in vars.palette).toBe(true);
197
-
198
- const palette = theme.palette;
199
- const paletteColor = palette[color as keyof Palette];
200
- const varsPalette = vars.palette;
201
- const varsColor = varsPalette[color as keyof ThemeVars["palette"]];
202
-
203
- // We only expect the return varsColor to be an object.
204
- expect(varsColor).toBeInstanceOf(Object);
205
-
206
- Object.entries(paletteColor).forEach(([shade, value]) => {
207
- // Test the shade exists in the vars.
208
- expect(shade in (varsColor as object)).toBe(true);
209
-
210
- // Full pattern test.
211
- expect((vars.palette as any)[color][shade]).toEqual(
212
- `var(--palette-${color}-${shade}, ${value})`,
213
- );
214
- });
215
- });
216
- });
217
-
218
- it("should have shadow values exposed as CSS variables", () => {
219
- expect(vars.shadows).toBeDefined();
220
- vars.shadows.forEach((shadow, i) => {
221
- // Full pattern test.
222
- expect(shadow).toEqual(`var(--shadows-${i}, ${theme.shadows[i]})`);
223
- });
224
- });
225
- });
226
-
227
- describe("Breakpoint Configuration", () => {
228
- it("should use default breakpoint values when no custom options provided", () => {
229
- expect(theme.breakpoints.values).toEqual(DEFAULT_BREAKPOINTS.values);
230
- });
231
-
232
- it("should override breakpoints when custom values provided", () => {
233
- expect(customTheme.breakpoints.values).toEqual(CUSTOM_BREAKPOINTS.values);
234
- });
235
- });
236
-
237
- describe("Components Configuration", () => {
238
- it("should initialize with default components settings", () => {
239
- expect(theme.components).toBeDefined();
240
- });
241
-
242
- it("should apply configured components variants", () => {
243
- expect(componentsValues).toBeDefined();
244
- Object.keys(componentsValues!).forEach((component) => {
245
- expect(component in theme.components!).toBe(true);
246
- });
247
- });
248
-
249
- it("should override MuiToolbar component breakpoints when custom values provided", () => {
250
- // Get the component styleOverrides.
251
- const styleOverrides = customTheme.components?.MuiToolbar?.styleOverrides;
252
- expect(styleOverrides).toBeDefined();
253
-
254
- // The root property should be a function that receives theme.
255
- const rootFunction = styleOverrides?.root;
256
- expect(typeof rootFunction).toBe("function");
257
-
258
- if (typeof rootFunction === "function") {
259
- // Call the function with the custom theme to get the computed styles.
260
- const computedStyles = rootFunction({
261
- ownerState: {},
262
- theme: customTheme,
263
- });
264
-
265
- // Verify that the computed styles contain the custom breakpoint values.
266
- // The breakpoint functions should generate media queries using custom values.
267
- expect(computedStyles).toBeDefined();
268
-
269
- const styleKeys = Object.keys(computedStyles!);
270
-
271
- // Confirm that breakpoint-based custom styles are present.
272
- expect(
273
- hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.xs),
274
- ).toBeTruthy();
275
- expect(
276
- hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.lg),
277
- ).toBeTruthy();
278
- }
279
- });
280
- });
281
-
282
- describe("Palette Configuration", () => {
283
- it("should initialize with default palette settings", () => {
284
- expect(theme.palette).toBeDefined();
285
- });
286
-
287
- it("should apply default alert colors", () => {
288
- expect("alert" in theme.palette).toBe(true);
289
- validatePaletteColor(theme.palette.alert, DEFAULT_PALETTE_ALERT);
290
- });
291
-
292
- it("should apply default background color", () => {
293
- expect(theme.palette.background.default).toEqual(
294
- DEFAULT_PALETTE_BACKGROUND.default,
295
- );
296
- });
297
-
298
- it("should apply default info colors", () => {
299
- expect("info" in theme.palette).toBe(true);
300
- validatePaletteColor(theme.palette.info, DEFAULT_PALETTE_INFO);
301
- });
302
-
303
- it("should apply default ink colors", () => {
304
- expect("ink" in theme.palette).toBe(true);
305
- validatePaletteColor(theme.palette.ink, DEFAULT_PALETTE_INK);
306
- });
307
-
308
- it("should apply default primary color", () => {
309
- validatePaletteColor(theme.palette.primary, DEFAULT_PALETTE_PRIMARY);
310
- });
311
-
312
- it("should apply default smoke colors", () => {
313
- expect("smoke" in theme.palette).toBe(true);
314
- validatePaletteColor(theme.palette.smoke, DEFAULT_PALETTE_SMOKE);
315
- });
316
-
317
- it("should apply default success color", () => {
318
- validatePaletteColor(theme.palette.success, DEFAULT_PALETTE_SUCCESS);
319
- });
320
-
321
- it("should apply default text color", () => {
322
- expect(theme.palette.text.primary).toEqual(DEFAULT_PALETTE_TEXT.primary);
323
- });
324
-
325
- it("should apply default warning colors", () => {
326
- validatePaletteColor(theme.palette.warning, DEFAULT_PALETTE_WARNING);
327
- });
328
-
329
- it("should apply custom primary color when specified", () => {
330
- expect(customTheme.palette.primary.main).toEqual(
331
- CUSTOM_PALETTE_PRIMARY.main,
332
- );
333
- // Validate that primary dark and lightest are not overridden.
334
- validatePaletteColor(customTheme.palette.primary, {
335
- dark: DEFAULT_PALETTE_PRIMARY.dark,
336
- lightest: DEFAULT_PALETTE_PRIMARY.lightest,
337
- });
338
- });
339
- });
340
-
341
- describe("Shadow Configuration", () => {
342
- it("should initialize with default shadow settings", () => {
343
- expect(theme.shadows).toBeDefined();
344
- });
345
-
346
- it("should have the correct number of shadows", () => {
347
- expect(theme.shadows.length).toBe(25);
348
- });
349
-
350
- it("should have the correct default shadow values", () => {
351
- expect(theme.shadows[0]).toBe(DEFAULT_SHADOWS[0]);
352
- expect(theme.shadows[1]).toBe(DEFAULT_SHADOWS[1]);
353
- expect(theme.shadows[2]).toBe(DEFAULT_SHADOWS[2]);
354
- });
355
- });
356
-
357
- describe("Typography Configuration", () => {
358
- it("should initialize with default typography settings", () => {
359
- expect(theme.typography).toBeDefined();
360
- });
361
-
362
- it("should apply configured typography variants", () => {
363
- Object.keys(typographyValues(baseTheme))
364
- .filter(filterTypographyVariants)
365
- .forEach((variant) => {
366
- expect(variant in theme.typography).toBe(true);
367
- });
368
- });
369
-
370
- it("should apply configured body-400 typography styles", () => {
371
- expect("body-400" in theme.typography).toBe(true);
372
- validateTypographyStyle(theme.typography["body-400"], DEFAULT_BODY_400);
373
- });
374
-
375
- it("should override body-400 typography styles when custom values provided", () => {
376
- expect("body-400" in customTheme.typography).toBe(true);
377
- validateTypographyStyle(
378
- customTheme.typography["body-400"],
379
- CUSTOM_BODY_400,
380
- );
381
- });
382
-
383
- it("should apply custom body-400 styles to CSS variables", () => {
384
- const fontValue = customTheme.vars?.font?.["body-400"];
385
- const variant = customTheme.typography["body-400"];
386
- expect(fontValue).toBeDefined();
387
- expect(fontValue).toContain(variant.fontSize);
388
- });
389
-
390
- it("should apply custom fontFamily to CSS variables", () => {
391
- const appValue = customTheme.vars?.app?.fontFamily;
392
- const fontFamily = customTheme.typography.fontFamily;
393
- expect(appValue).toBeDefined();
394
- expect(appValue).toContain(fontFamily);
395
- });
396
- });
397
- });
398
-
399
- /**
400
- * Filters typography variant keys to exclude specific predefined variant types.
401
- * @param value - The typography variant key to be evaluated.
402
- * @returns Returns true if the variant key is not among the excluded keys; otherwise false.
403
- */
404
- function filterTypographyVariants(value: string): boolean {
405
- return !/fontFamily|fontSize|fontWeightLight|fontWeightRegular|fontWeightMedium|fontWeightBold|htmlFontSize|allVariants/.test(
406
- value,
407
- );
408
- }
409
-
410
- /**
411
- * Checks if a style key exists for a given breakpoint.
412
- * @param keys - Style keys.
413
- * @param breakpoint - Breakpoint.
414
- * @returns True if the style key exists for the given breakpoint, false otherwise.
415
- */
416
- function hasBreakpointKey(keys: string[], breakpoint: number): boolean {
417
- return keys.some(
418
- (key) => /^@media/.test(key) && key.includes(String(breakpoint)),
419
- );
420
- }
421
-
422
- /**
423
- * Type guard to check if a value is a PaletteColor.
424
- * @param color - Color.
425
- * @returns True if the color is a valid PaletteColor, false otherwise.
426
- */
427
- function isPaletteColor(color: unknown): color is PaletteColor {
428
- return (
429
- color !== null &&
430
- typeof color === "object" &&
431
- "light" in color &&
432
- "main" in color
433
- );
434
- }
435
-
436
- /**
437
- * Validates that a palette color (like theme.palette.alert)
438
- * has the expected values for given keys.
439
- * @param actual - Actual palette color object to validate.
440
- * @param expected - An object containing the expected key-value pairs.
441
- */
442
- function validatePaletteColor(
443
- actual: unknown,
444
- expected: Record<string, string>,
445
- ): void {
446
- expect(isPaletteColor(actual)).toBe(true);
447
- for (const [key, value] of Object.entries(expected)) {
448
- expect((actual as Record<string, unknown>)[key]).toEqual(value);
449
- }
450
- }
451
-
452
- /**
453
- * Validates that a typography variant (like theme.typography["body-400"])
454
- * has the expected typography style values.
455
- * @param actual - Actual typography style to validate.
456
- * @param expected - Expected typography style values.
457
- */
458
- export function validateTypographyStyle(
459
- actual: TypographyStyle,
460
- expected: TypographyStyle,
461
- ): void {
462
- for (const [key, value] of Object.entries(expected)) {
463
- expect(actual[key]).toEqual(value);
464
- }
465
- }
@@ -1,125 +0,0 @@
1
- import { act, render, screen } from "@testing-library/react";
2
- import React, { JSX } from "react";
3
- import { ToggleButtonGroupProvider } from "../src/components/common/ToggleButtonGroup/provider/provider";
4
- import { useToggleButtonGroup } from "../src/components/common/ToggleButtonGroup/provider/hook";
5
-
6
- enum TEST_VALUE {
7
- OPTION_A = "OPTION_A",
8
- OPTION_B = "OPTION_B",
9
- }
10
-
11
- const TEST_ID_VALUE = "value";
12
- const TEST_ID_BUTTON = "button";
13
-
14
- /**
15
- * Test component that consumes the toggle button group context via hook.
16
- * @returns Test component.
17
- */
18
- function TestConsumer(): JSX.Element {
19
- const { onChange, value } = useToggleButtonGroup<TEST_VALUE>();
20
- return (
21
- <div>
22
- <span data-testid={TEST_ID_VALUE}>{value ?? "null"}</span>
23
- <button
24
- data-testid={TEST_ID_BUTTON}
25
- onClick={(e) =>
26
- onChange?.(
27
- e as unknown as React.MouseEvent<HTMLElement>,
28
- TEST_VALUE.OPTION_B,
29
- )
30
- }
31
- >
32
- Change
33
- </button>
34
- </div>
35
- );
36
- }
37
-
38
- describe("ToggleButtonGroupProvider", () => {
39
- it("should render children", () => {
40
- render(
41
- <ToggleButtonGroupProvider>
42
- <div data-testid="child">child component</div>
43
- </ToggleButtonGroupProvider>,
44
- );
45
-
46
- expect(screen.getByTestId("child")).toBeTruthy();
47
- });
48
-
49
- it("should set initial value to null by default", () => {
50
- render(
51
- <ToggleButtonGroupProvider>
52
- <TestConsumer />
53
- </ToggleButtonGroupProvider>,
54
- );
55
-
56
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe("null");
57
- });
58
-
59
- it("should set initial value when provided", () => {
60
- render(
61
- <ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
62
- <TestConsumer />
63
- </ToggleButtonGroupProvider>,
64
- );
65
-
66
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
67
- TEST_VALUE.OPTION_A,
68
- );
69
- });
70
-
71
- it("should update value on onChange", () => {
72
- render(
73
- <ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
74
- <TestConsumer />
75
- </ToggleButtonGroupProvider>,
76
- );
77
-
78
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
79
- TEST_VALUE.OPTION_A,
80
- );
81
-
82
- act(() => {
83
- screen.getByTestId(TEST_ID_BUTTON).click();
84
- });
85
-
86
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
87
- TEST_VALUE.OPTION_B,
88
- );
89
- });
90
-
91
- it("should pass props to render function children", () => {
92
- render(
93
- <ToggleButtonGroupProvider<TEST_VALUE> initialValue={TEST_VALUE.OPTION_A}>
94
- {({ onChange, value }) => (
95
- <div>
96
- <span data-testid={TEST_ID_VALUE}>{value}</span>
97
- <button
98
- data-testid={TEST_ID_BUTTON}
99
- onClick={(e) =>
100
- onChange?.(
101
- e as unknown as React.MouseEvent<HTMLElement>,
102
- TEST_VALUE.OPTION_B,
103
- )
104
- }
105
- >
106
- Change
107
- </button>
108
- </div>
109
- )}
110
- </ToggleButtonGroupProvider>,
111
- );
112
-
113
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
114
- TEST_VALUE.OPTION_A,
115
- );
116
-
117
- act(() => {
118
- screen.getByTestId(TEST_ID_BUTTON).click();
119
- });
120
-
121
- expect(screen.getByTestId(TEST_ID_VALUE).textContent).toBe(
122
- TEST_VALUE.OPTION_B,
123
- );
124
- });
125
- });
@@ -1,21 +0,0 @@
1
- import { transformRoute } from "../src/hooks/authentication/session/useSessionActive";
2
-
3
- describe("transformRoute", () => {
4
- it("should return the first non-login route without the inactivity param", () => {
5
- const routes = ["/login", "/route1?inactivityTimeout=true", "/route2"];
6
- const result = transformRoute(routes);
7
- expect(result).toBe("/route1");
8
- });
9
-
10
- it("should remove the inactivity param from the route", () => {
11
- const routes = ["/route1?inactivityTimeout=true"];
12
- const result = transformRoute(routes);
13
- expect(result).toBe("/route1");
14
- });
15
-
16
- it("should return undefined if all routes are login routes", () => {
17
- const routes = ["/login"];
18
- const result = transformRoute(routes);
19
- expect(result).toBeUndefined();
20
- });
21
- });
@@ -1,8 +0,0 @@
1
- {
2
- "allowJs": true,
3
- "compilerOptions": {
4
- "rootDir": "../"
5
- },
6
- "extends": "../tsconfig.json",
7
- "include": ["./**/*.ts", "../types/*.d.ts"]
8
- }
@@ -1,36 +0,0 @@
1
- import { jest } from "@jest/globals";
2
-
3
- const URL_INVALID = "invalidUrl";
4
- const URL_WITH_FETCH_PREPEND = "https://example.com/fetch/repository/file";
5
- const URL_WITHOUT_FETCH_PREPEND = "https://example.com/repository/file";
6
-
7
- jest.unstable_mockModule("../src/hooks/useRequestFileLocation", () => ({
8
- useRequestFileLocation: jest.fn(),
9
- }));
10
-
11
- const { buildFetchFileUrl } = await import("../src/hooks/useFileLocation");
12
-
13
- describe("useFileLocation", () => {
14
- describe("build file URL", () => {
15
- describe("buildFetchFileUrl", () => {
16
- test("url is undefined", () => {
17
- expect(buildFetchFileUrl()).toBeUndefined();
18
- });
19
- test("url is invalid", () => {
20
- expect(() => buildFetchFileUrl(URL_INVALID)).toThrowError(
21
- `Invalid file URL: ${URL_INVALID}`,
22
- );
23
- });
24
- test("url with 'fetch' prepended in path", () => {
25
- expect(buildFetchFileUrl(URL_WITH_FETCH_PREPEND)).toEqual(
26
- URL_WITH_FETCH_PREPEND,
27
- );
28
- });
29
- test("url without 'fetch' prepended in path", () => {
30
- expect(buildFetchFileUrl(URL_WITHOUT_FETCH_PREPEND)).toEqual(
31
- URL_WITH_FETCH_PREPEND,
32
- );
33
- });
34
- });
35
- });
36
- });