@databiosphere/findable-ui 10.2.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/.github/workflows/run-checks.yml +13 -0
  2. package/lib/apis/azul/common/constants.d.ts +0 -4
  3. package/lib/apis/azul/common/constants.js +0 -4
  4. package/lib/apis/azul/common/entities.d.ts +5 -5
  5. package/lib/apis/azul/common/filterTransformer.d.ts +3 -3
  6. package/lib/apis/azul/common/filterTransformer.js +1 -1
  7. package/lib/common/analytics/analytics.d.ts +1 -1
  8. package/lib/common/analytics/entities.d.ts +2 -2
  9. package/lib/common/entities.d.ts +5 -5
  10. package/lib/components/ComponentCreator/ComponentCreator.d.ts +0 -1
  11. package/lib/components/Detail/components/AccessibilityBadge/accessibilityBadge.d.ts +0 -1
  12. package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +1 -1
  13. package/lib/components/Detail/components/Table/components/TableBody/tableBody.d.ts +1 -2
  14. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +1 -2
  15. package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +1 -2
  16. package/lib/components/Detail/components/Table/table.d.ts +1 -2
  17. package/lib/components/Detail/detail.stories.d.ts +4 -2
  18. package/lib/components/Error/error.d.ts +0 -1
  19. package/lib/components/Error/error.js +1 -1
  20. package/lib/components/Error/error.stories.d.ts +3 -3
  21. package/lib/components/Error/error.styles.d.ts +11 -12
  22. package/lib/components/ErrorBoundary/errorBoundary.d.ts +1 -1
  23. package/lib/components/Export/common/entities.d.ts +2 -2
  24. package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandForm/downloadCurlCommandForm.styles.d.ts +1 -2
  25. package/lib/components/Export/components/ExportForm/common/entities.d.ts +2 -2
  26. package/lib/components/Export/components/ExportForm/components/ExportFileSummaryForm/exportFileSummaryForm.d.ts +0 -1
  27. package/lib/components/Export/components/ExportForm/components/ExportFileSummaryForm/exportFileSummaryForm.js +1 -1
  28. package/lib/components/Export/components/ExportForm/components/ExportManifestDownloadFormatForm/exportManifestDownloadFormatForm.d.ts +0 -1
  29. package/lib/components/Export/components/ExportForm/components/ExportSpeciesForm/exportSpeciesForm.d.ts +0 -1
  30. package/lib/components/Export/components/ExportForm/exportForm.d.ts +3 -3
  31. package/lib/components/Export/components/ExportForm/exportForm.styles.d.ts +11 -40
  32. package/lib/components/Export/components/ExportMethod/exportMethod.stories.d.ts +4 -2
  33. package/lib/components/Export/components/ExportMethod/exportMethod.styles.d.ts +3 -4
  34. package/lib/components/Export/components/ExportSummary/components/ExportCurrentQuery/exportCurrentQuery.d.ts +1 -2
  35. package/lib/components/Export/components/ExportSummary/components/ExportSelectedDataSummary/exportSelectedDataSummary.d.ts +2 -2
  36. package/lib/components/Export/components/ExportSummary/exportSummary.styles.d.ts +4 -5
  37. package/lib/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.d.ts +0 -1
  38. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/formStep.styles.d.ts +3 -4
  39. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.d.ts +0 -1
  40. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.d.ts +0 -1
  41. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.styles.d.ts +8 -9
  42. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.d.ts +0 -1
  43. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestSpreadsheet/fileManifestSpreadsheet.d.ts +0 -1
  44. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +0 -1
  45. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.styles.d.ts +6 -11
  46. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadForm/manifestDownloadForm.d.ts +0 -1
  47. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadReady/manifestDownloadReady.styles.d.ts +1 -1
  48. package/lib/components/Export/export.styles.d.ts +13 -14
  49. package/lib/components/Filter/common/entities.d.ts +3 -3
  50. package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.d.ts +0 -1
  51. package/lib/components/Filter/components/Filter/filter.stories.d.ts +4 -2
  52. package/lib/components/Filter/components/Filter/filter.styles.d.ts +2 -2
  53. package/lib/components/Filter/components/FilterLabel/filterLabel.stories.d.ts +4 -2
  54. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +4 -35
  55. package/lib/components/Filter/components/FilterList/filterList.styles.d.ts +4 -12
  56. package/lib/components/Filter/components/FilterMenu/filterMenu.d.ts +0 -1
  57. package/lib/components/Filter/components/FilterMenu/filterMenu.stories.d.ts +4 -2
  58. package/lib/components/Filter/components/FilterMenu/filterMenu.styles.d.ts +8 -41
  59. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.d.ts +0 -1
  60. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.d.ts +1 -1
  61. package/lib/components/Filter/components/FilterNoResultsFound/filterNoResultsFound.d.ts +1 -1
  62. package/lib/components/Filter/components/FilterNoResultsFound/filterNoResultsFound.styles.d.ts +2 -3
  63. package/lib/components/Filter/components/FilterTag/filterTag.d.ts +0 -1
  64. package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +4 -2
  65. package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +4 -21
  66. package/lib/components/Filter/components/FilterTags/filterTags.d.ts +0 -1
  67. package/lib/components/Filter/components/FilterTags/filterTags.stories.d.ts +4 -2
  68. package/lib/components/Filter/components/FilterTags/filterTags.styles.d.ts +2 -3
  69. package/lib/components/Filter/components/Filters/filters.d.ts +0 -1
  70. package/lib/components/Filter/components/Filters/filters.stories.d.ts +3 -3
  71. package/lib/components/Filter/components/Filters/filters.styles.d.ts +4 -5
  72. package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.d.ts +0 -1
  73. package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.styles.d.ts +2 -3
  74. package/lib/components/Filter/components/SearchAllFilters/common/constants.d.ts +2 -2
  75. package/lib/components/Filter/components/SearchAllFilters/common/entites.d.ts +2 -2
  76. package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.d.ts +2 -12
  77. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.d.ts +1 -1
  78. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.d.ts +3 -3
  79. package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.d.ts +0 -1
  80. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.d.ts +0 -1
  81. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.d.ts +1 -1
  82. package/lib/components/Filter/components/VariableSizeList/VariableSizeList.d.ts +1 -2
  83. package/lib/components/Head/head.d.ts +0 -1
  84. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.d.ts +0 -1
  85. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +20 -51
  86. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.stories.d.ts +4 -2
  87. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.styles.d.ts +1 -1
  88. package/lib/components/Index/components/AzulFileDownload/common/constants.d.ts +3 -0
  89. package/lib/components/Index/components/AzulFileDownload/common/constants.js +3 -0
  90. package/lib/components/Index/components/Cell/cell.d.ts +0 -1
  91. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.d.ts +0 -1
  92. package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.d.ts +1 -2
  93. package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.d.ts +4 -2
  94. package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.d.ts +3 -4
  95. package/lib/components/Index/components/Hero/hero.stories.d.ts +4 -2
  96. package/lib/components/Index/components/Hero/hero.styles.d.ts +6 -7
  97. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +0 -1
  98. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +2 -3
  99. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +1 -2
  100. package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +4 -2
  101. package/lib/components/Index/components/Tabs/tabs.d.ts +0 -1
  102. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +1 -1
  103. package/lib/components/Index/index.stories.d.ts +3 -3
  104. package/lib/components/Index/index.styles.d.ts +2 -3
  105. package/lib/components/Layout/components/AppLayout/appLayout.styles.d.ts +2 -3
  106. package/lib/components/Layout/components/BackPage/backPageView.js +1 -1
  107. package/lib/components/Layout/components/BackPage/backPageView.stories.d.ts +4 -2
  108. package/lib/components/Layout/components/BackPage/backPageView.styles.d.ts +22 -23
  109. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +3 -3
  110. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.styles.d.ts +7 -15
  111. package/lib/components/Layout/components/ContentLayout/common/entities.d.ts +1 -1
  112. package/lib/components/Layout/components/ContentLayout/contentLayout.styles.d.ts +16 -17
  113. package/lib/components/Layout/components/Floating/floating.d.ts +0 -1
  114. package/lib/components/Layout/components/Footer/footer.stories.d.ts +3 -3
  115. package/lib/components/Layout/components/Footer/footer.styles.d.ts +6 -6
  116. package/lib/components/Layout/components/Header/common/entities.d.ts +2 -2
  117. package/lib/components/Layout/components/Header/components/Announcements/announcements.d.ts +0 -1
  118. package/lib/components/Layout/components/Header/components/Content/components/Actions/actions.styles.d.ts +2 -3
  119. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.d.ts +0 -1
  120. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.js +1 -1
  121. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +4 -2
  122. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +16 -79
  123. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/Button/button.styles.d.ts +4 -35
  124. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Content/components/Navigation/navigation.styles.d.ts +2 -3
  125. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Content/components/Socials/socials.styles.d.ts +1 -2
  126. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.js +1 -1
  127. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/Button/button.styles.d.ts +4 -35
  128. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.d.ts +0 -1
  129. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.d.ts +6 -6
  130. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.d.ts +0 -1
  131. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.styles.d.ts +1 -1
  132. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.styles.d.ts +4 -5
  133. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.js +1 -1
  134. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.styles.d.ts +7 -42
  135. package/lib/components/Layout/components/Header/components/Content/components/Navigation/navigation.styles.d.ts +2 -3
  136. package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.d.ts +6 -17
  137. package/lib/components/Layout/components/Header/components/Content/components/Socials/socials.styles.d.ts +1 -2
  138. package/lib/components/Layout/components/Header/components/Content/content.styles.d.ts +2 -3
  139. package/lib/components/Layout/components/Header/header.stories.d.ts +3 -3
  140. package/lib/components/Layout/components/Header/header.styles.d.ts +8 -8
  141. package/lib/components/Layout/components/Main/main.styles.d.ts +5 -6
  142. package/lib/components/Layout/components/Nav/components/NavBarHero/navBarHero.d.ts +0 -1
  143. package/lib/components/Layout/components/Nav/components/NavBarHero/navBarHero.js +1 -1
  144. package/lib/components/Layout/components/Nav/components/NavBarHero/navBarHero.styles.d.ts +6 -7
  145. package/lib/components/Layout/components/Nav/nav.stories.d.ts +3 -3
  146. package/lib/components/Layout/components/Nav/nav.styles.d.ts +6 -14
  147. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.d.ts +0 -1
  148. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +4 -32
  149. package/lib/components/Layout/components/Outline/outline.styles.d.ts +9 -104
  150. package/lib/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.styles.d.ts +3 -4
  151. package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.styles.d.ts +2 -2
  152. package/lib/components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel.d.ts +0 -1
  153. package/lib/components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel.stories.d.ts +4 -2
  154. package/lib/components/Layout/components/Sidebar/components/SidebarPositioner/sidebarPositioner.styles.d.ts +2 -3
  155. package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.d.ts +2 -3
  156. package/lib/components/Layout/components/Sidebar/sidebar.stories.d.ts +3 -3
  157. package/lib/components/Layout/components/Sidebar/sidebar.styles.d.ts +2 -3
  158. package/lib/components/Links/common/entities.d.ts +3 -4
  159. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +0 -1
  160. package/lib/components/Links/links.stories.d.ts +4 -2
  161. package/lib/components/Loading/loading.d.ts +1 -2
  162. package/lib/components/Loading/loading.stories.d.ts +4 -2
  163. package/lib/components/Loading/loading.styles.d.ts +3 -4
  164. package/lib/components/Login/login.stories.d.ts +3 -3
  165. package/lib/components/Login/login.styles.d.ts +16 -17
  166. package/lib/components/NoResults/noResults.styles.d.ts +6 -7
  167. package/lib/components/Project/common/entities.d.ts +3 -3
  168. package/lib/components/Project/components/Citation/citation.d.ts +0 -1
  169. package/lib/components/Project/components/Citation/citation.stories.d.ts +1 -1
  170. package/lib/components/Project/components/Citation/citation.styles.d.ts +4 -5
  171. package/lib/components/Project/components/CollaboratingOrganizations/collaboratingOrganizations.d.ts +0 -1
  172. package/lib/components/Project/components/CollaboratingOrganizations/collaboratingOrganizations.stories.d.ts +4 -2
  173. package/lib/components/Project/components/Contacts/contacts.d.ts +0 -1
  174. package/lib/components/Project/components/Contacts/contacts.stories.d.ts +4 -2
  175. package/lib/components/Project/components/Contributors/contributors.d.ts +0 -1
  176. package/lib/components/Project/components/Contributors/contributors.stories.d.ts +4 -2
  177. package/lib/components/Project/components/DataCurators/dataCurators.d.ts +0 -1
  178. package/lib/components/Project/components/DataCurators/dataCurators.stories.d.ts +4 -2
  179. package/lib/components/Project/components/DataReleasePolicy/dataReleasePolicy.d.ts +0 -1
  180. package/lib/components/Project/components/DataReleasePolicy/dataReleasePolicy.stories.d.ts +4 -2
  181. package/lib/components/Project/components/Description/description.d.ts +0 -1
  182. package/lib/components/Project/components/Description/description.stories.d.ts +4 -2
  183. package/lib/components/Project/components/Details/details.d.ts +0 -1
  184. package/lib/components/Project/components/Details/details.stories.d.ts +4 -2
  185. package/lib/components/Project/components/Publications/publications.d.ts +0 -1
  186. package/lib/components/Project/components/Publications/publications.stories.d.ts +4 -2
  187. package/lib/components/Project/components/Sup/sup.styles.d.ts +2 -3
  188. package/lib/components/Project/components/SupplementaryLinks/supplementaryLinks.d.ts +0 -1
  189. package/lib/components/Project/components/SupplementaryLinks/supplementaryLinks.js +1 -1
  190. package/lib/components/Project/components/SupplementaryLinks/supplementaryLinks.stories.d.ts +4 -2
  191. package/lib/components/Project/components/SupplementaryLinks/supplementaryLinks.styles.d.ts +6 -7
  192. package/lib/components/Redirect/redirect.d.ts +0 -1
  193. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.d.ts +5 -33
  194. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/common/constants.js +2 -2
  195. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/common/entities.d.ts +4 -4
  196. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/common/utils.d.ts +1 -1
  197. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.styles.d.ts +5 -6
  198. package/lib/components/Support/components/SupportRequest/components/SupportRequestSubmitted/supportRequestSubmitted.js +1 -1
  199. package/lib/components/Support/components/SupportRequest/supportRequest.d.ts +0 -1
  200. package/lib/components/Support/components/ViewSupport/viewSupport.styles.d.ts +2 -3
  201. package/lib/components/Table/common/gridTable.styles.d.ts +4 -12
  202. package/lib/components/Table/common/utils.d.ts +2 -2
  203. package/lib/components/Table/common/utils.js +17 -11
  204. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +2 -3
  205. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +4 -2
  206. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +1 -1
  207. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +1 -2
  208. package/lib/components/Table/components/Pagination/pagination.d.ts +0 -1
  209. package/lib/components/Table/components/Pagination/pagination.stories.d.ts +4 -2
  210. package/lib/components/Table/components/Pagination/pagination.styles.d.ts +2 -3
  211. package/lib/components/Table/components/PaginationSummary/paginationSummary.d.ts +0 -1
  212. package/lib/components/Table/components/TableBody/tableBody.d.ts +1 -2
  213. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.d.ts +1 -2
  214. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.d.ts +7 -8
  215. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.d.ts +0 -1
  216. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.d.ts +2 -3
  217. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.d.ts +1 -2
  218. package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts +1 -2
  219. package/lib/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.d.ts +1 -2
  220. package/lib/components/Table/components/TableHead/tableHead.d.ts +1 -2
  221. package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +4 -11
  222. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +1 -2
  223. package/lib/components/Table/components/TableRows/components/VirtualizedRow/virtualizedRow.d.ts +0 -1
  224. package/lib/components/Table/components/TableRows/tableRows.d.ts +1 -2
  225. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.d.ts +1 -1
  226. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.d.ts +2 -2
  227. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.d.ts +1 -2
  228. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.d.ts +2 -3
  229. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.d.ts +2 -3
  230. package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.d.ts +1 -2
  231. package/lib/components/Table/components/TableToolbar/components/RowSelection/components/DropdownMenu/dropdownMenu.d.ts +0 -1
  232. package/lib/components/Table/components/TableToolbar/components/RowSelection/components/DropdownMenu/dropdownMenu.styles.d.ts +1 -1
  233. package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.d.ts +1 -2
  234. package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.styles.d.ts +2 -3
  235. package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +1 -2
  236. package/lib/components/Table/components/TableToolbar/tableToolbar.styles.d.ts +3 -2
  237. package/lib/components/Table/features/RowPreview/entities.d.ts +1 -1
  238. package/lib/components/Table/features/entities.d.ts +5 -5
  239. package/lib/components/Table/table.d.ts +2 -3
  240. package/lib/components/Table/table.js +4 -4
  241. package/lib/components/Table/table.styles.d.ts +4 -12
  242. package/lib/components/TableCreator/tableCreator.d.ts +2 -3
  243. package/lib/components/TableCreator/tableCreator.styles.d.ts +2 -3
  244. package/lib/components/TempError/components/errorBox.d.ts +0 -1
  245. package/lib/components/TempError/tempError.d.ts +0 -1
  246. package/lib/components/common/Accordion/accordion.js +1 -1
  247. package/lib/components/common/Accordion/accordion.stories.d.ts +3 -3
  248. package/lib/components/common/Alert/alert.js +1 -1
  249. package/lib/components/common/Alert/alert.stories.d.ts +3 -3
  250. package/lib/components/common/Alert/alert.styles.d.ts +2 -2
  251. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +2 -3
  252. package/lib/components/common/AnchorLink/anchorLink.d.ts +0 -1
  253. package/lib/components/common/AnchorLink/anchorLink.styles.d.ts +23 -25
  254. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +1 -1
  255. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.d.ts +1 -2
  256. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +1 -1
  257. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +1 -1
  258. package/lib/components/common/Breadcrumbs/breadcrumbs.js +1 -1
  259. package/lib/components/common/Breadcrumbs/breadcrumbs.stories.d.ts +6 -4
  260. package/lib/components/common/Button/components/ButtonOutline/buttonOutline.styles.d.ts +1 -2
  261. package/lib/components/common/Button/components/ButtonText/buttonText.d.ts +0 -1
  262. package/lib/components/common/Button/components/ButtonText/buttonText.styles.d.ts +1 -2
  263. package/lib/components/common/Button/components/ButtonTextPrimary/buttonTextPrimary.d.ts +0 -1
  264. package/lib/components/common/Button/components/ButtonTextPrimary/buttonTextPrimary.styles.d.ts +1 -2
  265. package/lib/components/common/Button/components/ButtonTextUnderline/buttonTextUnderline.d.ts +0 -1
  266. package/lib/components/common/Button/components/ButtonTextUnderline/buttonTextUnderline.styles.d.ts +1 -2
  267. package/lib/components/common/Button/components/CallToActionButton/callToActionButton.stories.d.ts +5 -3
  268. package/lib/components/common/Button/components/DropdownButton/dropdownButton.d.ts +0 -1
  269. package/lib/components/common/Button/components/DropdownButton/dropdownButton.styles.d.ts +1 -2
  270. package/lib/components/common/Button/components/FileDownloadButton/fileDownloadButton.d.ts +0 -1
  271. package/lib/components/common/Button/components/HelpIconButton/helpIconButton.d.ts +0 -1
  272. package/lib/components/common/Button/components/HelpIconButton/helpIconButton.stories.d.ts +1 -1
  273. package/lib/components/common/Button/components/HelpIconButton/helpIconButton.styles.d.ts +2 -1
  274. package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +1 -2
  275. package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +3 -4
  276. package/lib/components/common/Button/components/NavigationButton/navigationButton.d.ts +0 -1
  277. package/lib/components/common/Button/components/NavigationButton/navigationButton.styles.d.ts +1 -2
  278. package/lib/components/common/Card/card.stories.d.ts +3 -3
  279. package/lib/components/common/Card/card.styles.d.ts +5 -6
  280. package/lib/components/common/Card/components/CardAction/cardAction.d.ts +0 -1
  281. package/lib/components/common/Card/components/CardActions/cardActions.styles.d.ts +2 -3
  282. package/lib/components/common/Card/components/CardMedia/cardMedia.d.ts +0 -1
  283. package/lib/components/common/Card/components/CardMedia/cardMedia.styles.d.ts +2 -3
  284. package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.styles.d.ts +3 -4
  285. package/lib/components/common/Code/code.d.ts +0 -1
  286. package/lib/components/common/Code/code.stories.d.ts +4 -3
  287. package/lib/components/common/Code/code.styles.d.ts +2 -3
  288. package/lib/components/common/CopyToClipboard/copyToClipboard.d.ts +0 -1
  289. package/lib/components/common/CopyToClipboard/copyToClipboard.stories.d.ts +3 -3
  290. package/lib/components/common/CustomIcon/components/AddIcon/addIcon.d.ts +0 -1
  291. package/lib/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.d.ts +0 -1
  292. package/lib/components/common/CustomIcon/components/AlertIcon/alertIcon.d.ts +0 -1
  293. package/lib/components/common/CustomIcon/components/BackArrowIcon/backArrowIcon.d.ts +0 -1
  294. package/lib/components/common/CustomIcon/components/CheckedIcon/checkedIcon.d.ts +0 -1
  295. package/lib/components/common/CustomIcon/components/ContactSupportIcon/contactSupportIcon.d.ts +0 -1
  296. package/lib/components/common/CustomIcon/components/ContentCopyIcon/contentCopyIcon.d.ts +0 -1
  297. package/lib/components/common/CustomIcon/components/DiscourseIcon/discourseIcon.d.ts +0 -1
  298. package/lib/components/common/CustomIcon/components/DownloadIcon/downloadIcon.d.ts +0 -1
  299. package/lib/components/common/CustomIcon/components/EmailReadIcon/emailReadIcon.d.ts +0 -1
  300. package/lib/components/common/CustomIcon/components/ErrorIcon/errorIcon.d.ts +0 -1
  301. package/lib/components/common/CustomIcon/components/FacebookIcon/facebookIcon.d.ts +0 -1
  302. package/lib/components/common/CustomIcon/components/FeedbackIcon/feedbackIcon.d.ts +0 -1
  303. package/lib/components/common/CustomIcon/components/FormStatusCompletedIcon/formStatusCompletedIcon.d.ts +0 -1
  304. package/lib/components/common/CustomIcon/components/FormStatusIncompleteIcon/formStatusIncompleteIcon.d.ts +0 -1
  305. package/lib/components/common/CustomIcon/components/ForwardArrowIcon/forwardArrowIcon.d.ts +0 -1
  306. package/lib/components/common/CustomIcon/components/GitHubIcon/gitHubIcon.d.ts +0 -1
  307. package/lib/components/common/CustomIcon/components/GoogleIcon/googleIcon.d.ts +0 -1
  308. package/lib/components/common/CustomIcon/components/HelpIcon/helpIcon.d.ts +0 -1
  309. package/lib/components/common/CustomIcon/components/InProgressIcon/inProgressIcon.d.ts +0 -1
  310. package/lib/components/common/CustomIcon/components/IndeterminateIcon/indeterminateIcon.d.ts +0 -1
  311. package/lib/components/common/CustomIcon/components/InfoIcon/infoIcon.d.ts +0 -1
  312. package/lib/components/common/CustomIcon/components/InventoryIcon/inventoryIcon.d.ts +0 -1
  313. package/lib/components/common/CustomIcon/components/LinkedInIcon/linkedInIcon.d.ts +0 -1
  314. package/lib/components/common/CustomIcon/components/LoadingIcon/loadingIcon.d.ts +0 -1
  315. package/lib/components/common/CustomIcon/components/OpenInNewIcon/openInNewIcon.d.ts +0 -1
  316. package/lib/components/common/CustomIcon/components/RadioCheckedIcon/radioCheckedIcon.d.ts +0 -1
  317. package/lib/components/common/CustomIcon/components/RadioUncheckedIcon/radioUncheckedIcon.d.ts +0 -1
  318. package/lib/components/common/CustomIcon/components/RemoveIcon/removeIcon.d.ts +0 -1
  319. package/lib/components/common/CustomIcon/components/SearchIcon/searchIcon.d.ts +0 -1
  320. package/lib/components/common/CustomIcon/components/SearchOffIcon/searchOffIcon.d.ts +0 -1
  321. package/lib/components/common/CustomIcon/components/Segment/segment.d.ts +0 -1
  322. package/lib/components/common/CustomIcon/components/SlackIcon/slackIcon.d.ts +0 -1
  323. package/lib/components/common/CustomIcon/components/SouthIcon/southIcon.d.ts +0 -1
  324. package/lib/components/common/CustomIcon/components/SuccessIcon/successIcon.d.ts +0 -1
  325. package/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.d.ts +0 -1
  326. package/lib/components/common/CustomIcon/components/UncheckedErrorIcon/uncheckedErrorIcon.d.ts +0 -1
  327. package/lib/components/common/CustomIcon/components/UncheckedIcon/uncheckedIcon.d.ts +0 -1
  328. package/lib/components/common/CustomIcon/components/UnfoldMoreIcon/unfoldMoreIcon.d.ts +0 -1
  329. package/lib/components/common/CustomIcon/components/WarningIcon/warningIcon.d.ts +0 -1
  330. package/lib/components/common/CustomIcon/components/XIcon/xIcon.d.ts +0 -1
  331. package/lib/components/common/CustomIcon/components/YouTubeIcon/youTubeIcon.d.ts +0 -1
  332. package/lib/components/common/Dialog/components/DialogTitle/dialogTitle.js +1 -1
  333. package/lib/components/common/Dot/dot.d.ts +0 -1
  334. package/lib/components/common/Dot/dot.styles.d.ts +2 -3
  335. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.d.ts +2 -3
  336. package/lib/components/common/Drawer/components/drawer.styles.d.ts +2 -3
  337. package/lib/components/common/DropdownMenu/common/entities.d.ts +2 -2
  338. package/lib/components/common/DropdownMenu/dropdownMenu.styles.d.ts +1 -1
  339. package/lib/components/common/EllipsisContent/ellipsisContent.styles.d.ts +3 -4
  340. package/lib/components/common/Form/components/Input/input.d.ts +0 -1
  341. package/lib/components/common/Form/components/Input/input.styles.d.ts +4 -19
  342. package/lib/components/common/Form/components/Select/components/DropDownIcon/dropDownIcon.d.ts +0 -1
  343. package/lib/components/common/Form/components/Select/select.d.ts +2 -2
  344. package/lib/components/common/Form/components/Select/select.styles.d.ts +4 -19
  345. package/lib/components/common/Form/components/UploadFile/uploadFile.d.ts +0 -1
  346. package/lib/components/common/Form/components/UploadFile/uploadFile.styles.d.ts +6 -39
  347. package/lib/components/common/IconBadge/iconBadge.d.ts +1 -1
  348. package/lib/components/common/IconBadge/iconBadge.styles.d.ts +2 -3
  349. package/lib/components/common/IconButton/iconButton.styles.d.ts +4 -30
  350. package/lib/components/common/Input/input.styles.d.ts +5 -20
  351. package/lib/components/common/KeyValuePairs/keyValuePairs.d.ts +5 -5
  352. package/lib/components/common/MDXMarkdown/components/Section/mdxSection.styles.d.ts +2 -3
  353. package/lib/components/common/Markdown/markdown.d.ts +0 -1
  354. package/lib/components/common/Paper/paper.d.ts +1 -1
  355. package/lib/components/common/Paper/paper.styles.d.ts +5 -6
  356. package/lib/components/common/Paper/paper.styles.js +1 -1
  357. package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.d.ts +2 -3
  358. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.d.ts +0 -1
  359. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.d.ts +1 -1
  360. package/lib/components/common/RadioGroup/radioGroup.d.ts +3 -4
  361. package/lib/components/common/Section/components/CollapsableSection/collapsableSection.styles.d.ts +8 -40
  362. package/lib/components/common/Section/components/SectionDetailsEmpty/sectionDetailsEmpty.d.ts +0 -1
  363. package/lib/components/common/Section/components/SectionTitle/sectionTitle.d.ts +0 -1
  364. package/lib/components/common/Section/components/SectionTitle/sectionTitle.stories.d.ts +4 -2
  365. package/lib/components/common/Section/section.styles.d.ts +17 -17
  366. package/lib/components/common/Socials/socials.stories.d.ts +3 -4
  367. package/lib/components/common/Socials/socials.styles.d.ts +4 -4
  368. package/lib/components/common/Stack/components/Divider/divider.styles.d.ts +2 -11
  369. package/lib/components/common/StaticImage/staticImage.d.ts +1 -2
  370. package/lib/components/common/StaticImage/staticImage.stories.d.ts +4 -2
  371. package/lib/components/common/StatusBadge/statusBadge.d.ts +1 -1
  372. package/lib/components/common/StatusBadge/statusBadge.stories.d.ts +3 -4
  373. package/lib/components/common/StatusIcon/statusIcon.d.ts +1 -1
  374. package/lib/components/common/StatusIcon/statusIcon.stories.d.ts +4 -2
  375. package/lib/components/common/StatusIcon/statusIcon.styles.d.ts +2 -3
  376. package/lib/components/common/Tabs/tabs.d.ts +3 -3
  377. package/lib/components/common/Tabs/tabs.styles.d.ts +6 -34
  378. package/lib/components/common/Tag/tag.stories.d.ts +4 -2
  379. package/lib/components/common/Tag/tag.styles.d.ts +2 -2
  380. package/lib/components/common/Title/title.d.ts +1 -1
  381. package/lib/components/common/Title/title.styles.d.ts +2 -1
  382. package/lib/components/common/ToggleButtonGroup/toggleButtonGroup.d.ts +2 -3
  383. package/lib/components/common/ToggleButtonGroup/toggleButtonGroup.stories.d.ts +4 -2
  384. package/lib/components/common/Typography/common/entities.d.ts +1 -1
  385. package/lib/config/entities.d.ts +16 -16
  386. package/lib/entity/api/service.d.ts +3 -2
  387. package/lib/entity/apicf/service.d.ts +1 -1
  388. package/lib/entity/common/service.d.ts +2 -2
  389. package/lib/entity/service/model.d.ts +1 -1
  390. package/lib/hooks/useAsync.d.ts +1 -1
  391. package/lib/hooks/useAuthentication/common/entities.d.ts +1 -1
  392. package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +3 -3
  393. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +2 -2
  394. package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +2 -2
  395. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +2 -2
  396. package/lib/hooks/useAuthentication/useTokenClient.d.ts +1 -1
  397. package/lib/hooks/useBreakpoint.d.ts +1 -1
  398. package/lib/hooks/useBreakpointHelper.d.ts +2 -2
  399. package/lib/hooks/useCategoryFilter.d.ts +2 -2
  400. package/lib/hooks/useCurrentBreakpoint.d.ts +1 -1
  401. package/lib/hooks/useEntityService.d.ts +1 -1
  402. package/lib/hooks/useExploreMode.d.ts +1 -1
  403. package/lib/hooks/useExportToTerraResponseURL.d.ts +1 -1
  404. package/lib/hooks/useFetchEntity.d.ts +1 -1
  405. package/lib/hooks/useFileLocation.d.ts +7 -1
  406. package/lib/hooks/useFileLocation.js +13 -14
  407. package/lib/hooks/useFileManifest/common/entities.d.ts +4 -4
  408. package/lib/hooks/useFileManifest/useFileManifest.d.ts +1 -1
  409. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +1 -1
  410. package/lib/hooks/useRequestFileLocation.d.ts +2 -2
  411. package/lib/hooks/useResizeObserver.d.ts +1 -1
  412. package/lib/hooks/useScroll.d.ts +2 -2
  413. package/lib/providers/authentication.d.ts +2 -2
  414. package/lib/providers/config.d.ts +1 -1
  415. package/lib/providers/exploreState/entities.d.ts +4 -4
  416. package/lib/providers/exploreState/initializer/utils.js +1 -1
  417. package/lib/providers/exploreState/payloads/entities.d.ts +6 -6
  418. package/lib/providers/exploreState.d.ts +20 -20
  419. package/lib/providers/fileManifestState.d.ts +12 -12
  420. package/lib/providers/layoutState.d.ts +4 -4
  421. package/lib/theme/common/breakpoints.d.ts +4 -4
  422. package/lib/theme/common/components.js +8 -8
  423. package/lib/theme/common/palette.d.ts +2 -2
  424. package/lib/types/error.d.ts +1 -1
  425. package/lib/utils/tests.d.ts +12 -0
  426. package/lib/utils/tests.js +17 -0
  427. package/lib/viewModelBuilders/common/entities.d.ts +1 -1
  428. package/lib/views/ContentView/contentView.stories.d.ts +3 -3
  429. package/lib/views/EntityDetailView/entityDetailView.d.ts +0 -1
  430. package/lib/views/ExploreView/exploreView.d.ts +0 -1
  431. package/lib/views/ExportMethodView/exportMethodView.d.ts +0 -1
  432. package/lib/views/ExportView/exportView.d.ts +1 -2
  433. package/lib/views/LoginView/loginView.d.ts +0 -1
  434. package/package.json +12 -10
  435. package/src/apis/azul/common/constants.ts +0 -5
  436. package/src/apis/azul/common/filterTransformer.ts +1 -1
  437. package/src/common/analytics/analytics.ts +1 -1
  438. package/src/common/analytics/readme-analytics.md +15 -0
  439. package/src/components/Detail/components/Table/table.tsx +1 -1
  440. package/src/components/Error/error.tsx +1 -1
  441. package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +1 -1
  442. package/src/components/Export/components/ExportForm/components/ExportFileSummaryForm/exportFileSummaryForm.tsx +1 -1
  443. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.tsx +1 -1
  444. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.tsx +1 -1
  445. package/src/components/Filter/components/VariableSizeList/VariableSizeList.tsx +1 -1
  446. package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +44 -63
  447. package/src/components/Index/components/AzulFileDownload/common/constants.ts +4 -0
  448. package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +1 -1
  449. package/src/components/Layout/components/BackPage/backPageView.tsx +1 -1
  450. package/src/components/Layout/components/Header/common/utils.ts +1 -1
  451. package/src/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.tsx +1 -1
  452. package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/menu.tsx +1 -1
  453. package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.tsx +1 -1
  454. package/src/components/Layout/components/Nav/components/NavBarHero/navBarHero.tsx +2 -2
  455. package/src/components/Layout/components/Outline/outline.styles.ts +1 -1
  456. package/src/components/Loading/loading.styles.ts +1 -1
  457. package/src/components/Loading/loading.tsx +1 -1
  458. package/src/components/Project/components/SupplementaryLinks/supplementaryLinks.tsx +1 -1
  459. package/src/components/Support/components/SupportRequest/components/SupportRequestForm/common/constants.ts +1 -1
  460. package/src/components/Support/components/SupportRequest/components/SupportRequestForm/common/utils.ts +1 -1
  461. package/src/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.tsx +1 -1
  462. package/src/components/Support/components/SupportRequest/components/SupportRequestSubmitted/supportRequestSubmitted.tsx +1 -1
  463. package/src/components/Table/common/utils.ts +17 -15
  464. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.tsx +1 -1
  465. package/src/components/common/Accordion/accordion.tsx +2 -2
  466. package/src/components/common/Alert/alert.tsx +1 -1
  467. package/src/components/common/Banner/components/CookieBanner/cookieBanner.tsx +1 -1
  468. package/src/components/common/Banner/components/DismissibleBanner/dismissibleBanner.tsx +1 -1
  469. package/src/components/common/Breadcrumbs/breadcrumbs.tsx +1 -1
  470. package/src/components/common/Dialog/components/DialogTitle/dialogTitle.tsx +1 -1
  471. package/src/components/common/Form/components/Input/input.tsx +1 -1
  472. package/src/components/common/Form/components/Select/select.tsx +2 -2
  473. package/src/components/common/IconBadge/iconBadge.styles.ts +1 -1
  474. package/src/components/common/Stack/components/Divider/divider.styles.tsx +1 -1
  475. package/src/entity/api/service.ts +1 -1
  476. package/src/hooks/useCurrentBreakpoint.ts +1 -1
  477. package/src/hooks/useEntityList.ts +1 -1
  478. package/src/hooks/useEntityService.ts +1 -1
  479. package/src/hooks/useFileLocation.ts +16 -14
  480. package/src/utils/tests.ts +19 -0
  481. package/tests/azulFileDownload.test.tsx +86 -0
  482. package/tests/useFileLocation.test.ts +32 -0
  483. package/tsconfig.json +4 -1
@@ -1,11 +1,15 @@
1
1
  import { Box } from "@mui/material";
2
- import React, { useEffect, useRef, useState } from "react";
3
- import { API_FILE_LOCATION_FETCH } from "../../../../apis/azul/common/constants";
4
- import { useRequestFileLocation } from "../../../../hooks/useRequestFileLocation";
2
+ import React, { Fragment, useEffect, useRef, useState } from "react";
3
+ import { useFileLocation } from "../../../../hooks/useFileLocation";
5
4
  import { DownloadIcon } from "../../../common/CustomIcon/components/DownloadIcon/downloadIcon";
6
5
  import { LoadingIcon } from "../../../common/CustomIcon/components/LoadingIcon/loadingIcon";
7
6
  import { IconButton } from "../../../common/IconButton/iconButton";
8
7
  import { StyledIconButton } from "./azulFileDownload.styles";
8
+ import {
9
+ AZUL_FILE_DOWNLOAD_TEST_ID,
10
+ AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID,
11
+ AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID,
12
+ } from "./common/constants";
9
13
 
10
14
  export interface AzulFileDownloadProps {
11
15
  url?: string; // Original "file fetch URL" as returned from Azul endpoint.
@@ -14,72 +18,49 @@ export interface AzulFileDownloadProps {
14
18
  export const AzulFileDownload = ({
15
19
  url,
16
20
  }: AzulFileDownloadProps): JSX.Element => {
21
+ const { fileUrl, isLoading, run } = useFileLocation(url);
17
22
  const downloadRef = useRef<HTMLAnchorElement>(null);
18
- // Used to prevent the download button from being clicked twice
19
- const [isDownloading, setIsDownloading] = useState(false);
20
- // Correct the file fetch URL as per the Azul spec.
21
- const azulFetchUrl = buildFetchFileUrl(url);
22
- const { data, isLoading, isSuccess, run } =
23
- useRequestFileLocation(azulFetchUrl);
24
- const fileLocation = data?.location;
23
+ const [isRequestPending, setIsRequestPending] = useState(false);
25
24
 
26
25
  // Initiates file download when file location request is successful.
27
26
  useEffect(() => {
28
- if (isSuccess && fileLocation && downloadRef.current) {
29
- const downloadEl = downloadRef.current;
30
- downloadEl.href = fileLocation;
31
- downloadEl.click();
32
- setIsDownloading(false);
33
- }
34
- }, [fileLocation, isLoading, isSuccess]);
35
-
36
- /**
37
- * Initiate file location request.
38
- */
39
- const onFileLocationRequested = async (): Promise<void> => {
40
- // Prevent duplicate downloads
41
- setIsDownloading(true);
42
- run();
43
- };
44
-
45
- if (isDownloading)
46
- return (
47
- <StyledIconButton color="primary" Icon={LoadingIcon} size="medium" />
48
- );
27
+ if (!fileUrl) return;
28
+ if (!downloadRef.current) return;
29
+ const downloadEl = downloadRef.current;
30
+ downloadEl.href = fileUrl;
31
+ downloadEl.click();
32
+ setIsRequestPending(false);
33
+ }, [fileUrl]);
49
34
 
50
35
  return (
51
- <>
52
- <IconButton
53
- color="primary"
54
- disabled={!url}
55
- Icon={isLoading ? LoadingIcon : DownloadIcon}
56
- onClick={onFileLocationRequested}
57
- size="medium"
36
+ <Fragment>
37
+ {isRequestPending ? (
38
+ <StyledIconButton
39
+ color="primary"
40
+ data-testid={AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID}
41
+ Icon={LoadingIcon}
42
+ size="medium"
43
+ />
44
+ ) : (
45
+ <IconButton
46
+ color="primary"
47
+ data-testid={AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID}
48
+ disabled={!url}
49
+ Icon={isLoading ? LoadingIcon : DownloadIcon}
50
+ onClick={(): void => {
51
+ setIsRequestPending(true);
52
+ run();
53
+ }}
54
+ size="medium"
55
+ />
56
+ )}
57
+ <Box
58
+ component="a"
59
+ data-testid={AZUL_FILE_DOWNLOAD_TEST_ID}
60
+ download
61
+ ref={downloadRef}
62
+ sx={{ display: "none" }}
58
63
  />
59
- <Box component="a" download ref={downloadRef} sx={{ display: "none" }} />
60
- </>
64
+ </Fragment>
61
65
  );
62
66
  };
63
-
64
- /**
65
- * Prepend "/fetch" to the path of the specified file URL, if not already included. See #1596.
66
- * @param fileUrl - Original file URL as returned from Azul.
67
- * @returns Complete and correct URL to use when requesting file location from Azul or undefined if no fileUrl is passed.
68
- */
69
- function buildFetchFileUrl(fileUrl?: string): string | undefined {
70
- if (!fileUrl) {
71
- return;
72
- }
73
-
74
- try {
75
- const url = new URL(fileUrl);
76
- const path = url.pathname;
77
- if (!path.includes(API_FILE_LOCATION_FETCH)) {
78
- url.pathname = `${API_FILE_LOCATION_FETCH}${path}`;
79
- }
80
- return url.toString();
81
- } catch (error) {
82
- //console.log("error parsing file URL", fileUrl);
83
- return;
84
- }
85
- }
@@ -0,0 +1,4 @@
1
+ export const AZUL_FILE_DOWNLOAD_TEST_ID = "azul-file-download";
2
+ export const AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID =
3
+ "azul-file-request-download-pending";
4
+ export const AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID = "azul-file-request-download";
@@ -1,7 +1,7 @@
1
1
  import {
2
- PopperProps,
3
2
  Tooltip as MTooltip,
4
3
  TooltipProps as MTooltipProps,
4
+ PopperProps,
5
5
  } from "@mui/material";
6
6
  import { detectOverflow } from "@popperjs/core";
7
7
  import { State } from "@popperjs/core/lib/types";
@@ -4,8 +4,8 @@ import {
4
4
  BackPageContentMainColumn,
5
5
  BackPageContentSideColumn,
6
6
  BackPageHero,
7
- BackPageTabs,
8
7
  BackPageView as BackPageLayout,
8
+ BackPageTabs,
9
9
  DetailPageOverviewContent,
10
10
  DetailPageOverviewContentMainColumn,
11
11
  DetailPageOverviewContentSideColumn,
@@ -1,7 +1,7 @@
1
1
  import { Breakpoint } from "@mui/material";
2
2
  import { isClientSideNavigation } from "../../../../Links/common/utils";
3
3
  import { NavLinkItem } from "../components/Content/components/Navigation/navigation";
4
- import { Navigation, SelectedMatch, SELECTED_MATCH } from "./entities";
4
+ import { Navigation, SELECTED_MATCH, SelectedMatch } from "./entities";
5
5
 
6
6
  /**
7
7
  * Adds to the set of selected patterns, for the navigation link, at the current breakpoint.
@@ -2,8 +2,8 @@ import { MenuItem } from "@mui/material";
2
2
  import React, { MouseEvent, useState } from "react";
3
3
  import { UserProfile } from "../../../../../../../../../../../../hooks/useAuthentication/useFetchGoogleProfile";
4
4
  import {
5
- AuthenticationMenu as Menu,
6
5
  Avatar,
6
+ AuthenticationMenu as Menu,
7
7
  UserIcon,
8
8
  UserNames,
9
9
  UserSummary,
@@ -1,5 +1,5 @@
1
1
  import MenuRoundedIcon from "@mui/icons-material/MenuRounded";
2
- import { Dialog as MDialog, Fade, IconButton } from "@mui/material";
2
+ import { Fade, IconButton, Dialog as MDialog } from "@mui/material";
3
3
  import React, { CSSProperties, forwardRef, Fragment, useEffect } from "react";
4
4
  import { getMenuNavigationLinks } from "../../../../../../common/utils";
5
5
  import { HeaderProps } from "../../../../../../header";
@@ -1,7 +1,7 @@
1
1
  import ArrowDropDownRoundedIcon from "@mui/icons-material/ArrowDropDownRounded";
2
2
  import {
3
- ClickAwayListener as MClickAwayListener,
4
3
  Grow,
4
+ ClickAwayListener as MClickAwayListener,
5
5
  MenuList as MMenuList,
6
6
  Paper as MPaper,
7
7
  PopperProps as MPopperProps,
@@ -5,9 +5,9 @@ import {
5
5
  StaticImageProps,
6
6
  } from "../../../../../common/StaticImage/staticImage";
7
7
  import {
8
- HeroLogo as Logo,
9
- HeroText,
10
8
  NavBarHero as Hero,
9
+ HeroText,
10
+ HeroLogo as Logo,
11
11
  } from "./navBarHero.styles";
12
12
 
13
13
  export interface NavBarHeroProps {
@@ -1,6 +1,6 @@
1
1
  import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
- import { Tab as MTab, TabProps, Tabs as MTabs } from "@mui/material";
3
+ import { Tab as MTab, Tabs as MTabs, TabProps } from "@mui/material";
4
4
  import { smokeMain } from "../../../../styles/common/mixins/colors";
5
5
  import {
6
6
  textBody500,
@@ -2,7 +2,7 @@ import { css } from "@emotion/react";
2
2
  import styled from "@emotion/styled";
3
3
  import { TABLET } from "../../theme/common/breakpoints";
4
4
  import { Paper, PAPER_PANEL_STYLE } from "../common/Paper/paper";
5
- import { LoadingPanelStyle, LOADING_PANEL_STYLE } from "./loading";
5
+ import { LOADING_PANEL_STYLE, LoadingPanelStyle } from "./loading";
6
6
 
7
7
  interface Props {
8
8
  panelStyle: LoadingPanelStyle;
@@ -1,7 +1,7 @@
1
1
  import { Fade, SvgIconProps, Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import { LoadingIcon } from "../common/CustomIcon/components/LoadingIcon/loadingIcon";
4
- import { PaperPanelStyle, PAPER_PANEL_STYLE } from "../common/Paper/paper";
4
+ import { PAPER_PANEL_STYLE, PaperPanelStyle } from "../common/Paper/paper";
5
5
  import { LoadingPaper, LoadingPositioner } from "./loading.styles";
6
6
 
7
7
  /**
@@ -7,8 +7,8 @@ import { ANCHOR_TARGET } from "../../../Links/common/entities";
7
7
  import { Link } from "../../../Links/components/Link/link";
8
8
  import { SupplementaryLink } from "../../common/entities";
9
9
  import {
10
- Marker,
11
10
  SupplementaryLink as EllipsisLink,
11
+ Marker,
12
12
  SupplementaryList,
13
13
  } from "./supplementaryLinks.styles";
14
14
 
@@ -1,4 +1,4 @@
1
- import { FormOption, FormState, FORM_CONTROL_NAME } from "./entities";
1
+ import { FORM_CONTROL_NAME, FormOption, FormState } from "./entities";
2
2
 
3
3
  // Validation constraints
4
4
  export const CONSTRAINTS = {
@@ -1,4 +1,4 @@
1
- import { RequestValue, REQUEST_FIELD_ID, UploadResponse } from "./entities";
1
+ import { REQUEST_FIELD_ID, RequestValue, UploadResponse } from "./entities";
2
2
 
3
3
  /**
4
4
  * Create support request.
@@ -28,9 +28,9 @@ import {
28
28
  OPTIONS,
29
29
  } from "./common/constants";
30
30
  import {
31
- FormState,
32
31
  FORM_CONTROL_LABEL,
33
32
  FORM_CONTROL_NAME,
33
+ FormState,
34
34
  RequestValue,
35
35
  ValidateResponse,
36
36
  } from "./common/entities";
@@ -6,8 +6,8 @@ import {
6
6
  } from "../../../../../../theme/common/typography";
7
7
  import { EmailReadIcon } from "../../../../../common/CustomIcon/components/EmailReadIcon/emailReadIcon";
8
8
  import {
9
- IconBadge,
10
9
  ICON_BADGE_COLOR,
10
+ IconBadge,
11
11
  } from "../../../../../common/IconBadge/iconBadge";
12
12
  import {
13
13
  Section,
@@ -21,7 +21,8 @@ import {
21
21
  GridTrackMinMax,
22
22
  GridTrackSize,
23
23
  } from "../../../config/entities";
24
- import { ExploreMode, EXPLORE_MODE } from "../../../hooks/useExploreMode";
24
+ import { EXPLORE_MODE, ExploreMode } from "../../../hooks/useExploreMode";
25
+ import { ACCESSOR_KEYS } from "../../TableCreator/common/constants";
25
26
  import { CheckboxMenuListItem } from "../components/CheckboxMenu/checkboxMenu";
26
27
 
27
28
  /**
@@ -146,8 +147,8 @@ export function generateDownloadBlob<T extends RowData>(
146
147
  if (rows.length === 0) {
147
148
  return;
148
149
  }
149
- const tableHeaders = getVisibleHeadersTableData(rows);
150
- const tableData = getVisibleRowsTableData(rows);
150
+ const tableHeaders = getHeadersTableData(rows);
151
+ const tableData = getRowsTableData(rows);
151
152
  const tsv = formatDataToTSV([tableHeaders, ...tableData]);
152
153
  return new Blob([tsv], { type: "text/tab-separated-values" });
153
154
  }
@@ -338,28 +339,29 @@ export function getTableStatePagination(
338
339
  }
339
340
 
340
341
  /**
341
- * Returns the list of visible table headers.
342
+ * Returns the list of table headers, excluding "select" column.
342
343
  * @param rows - Table rows.
343
- * @returns list of visible headers.
344
+ * @returns list of headers.
344
345
  */
345
- function getVisibleHeadersTableData<T extends RowData>(
346
- rows: Row<T>[]
347
- ): TableData[] {
346
+ function getHeadersTableData<T extends RowData>(rows: Row<T>[]): TableData[] {
347
+ console.log(rows[0].getAllCells());
348
348
  return rows[0]
349
- .getVisibleCells()
349
+ .getAllCells()
350
+ .filter((cell) => cell.column.id !== ACCESSOR_KEYS.SELECT)
350
351
  .map((cell) => cell.column.columnDef.header as TableData);
351
352
  }
352
353
 
353
354
  /**
354
- * Returns the list of visible table data.
355
+ * Returns the list of table data, excluding "select" column.
355
356
  * @param rows - Table rows.
356
- * @returns list of visible data.
357
+ * @returns list of data.
357
358
  */
358
- function getVisibleRowsTableData<T extends RowData>(
359
- rows: Row<T>[]
360
- ): TableData[][] {
359
+ function getRowsTableData<T extends RowData>(rows: Row<T>[]): TableData[][] {
361
360
  return rows.map((row) =>
362
- row.getVisibleCells().map((cell) => cell.getValue() as TableData)
361
+ row
362
+ .getAllCells()
363
+ .filter((cell) => cell.column.id !== ACCESSOR_KEYS.SELECT)
364
+ .map((cell) => cell.getValue() as TableData)
363
365
  );
364
366
  }
365
367
 
@@ -1,7 +1,7 @@
1
1
  import {
2
- PopperProps,
3
2
  Tooltip as MTooltip,
4
3
  TooltipProps as MTooltipProps,
4
+ PopperProps,
5
5
  } from "@mui/material";
6
6
  import { detectOverflow } from "@popperjs/core";
7
7
  import { State } from "@popperjs/core/lib/types";
@@ -1,8 +1,8 @@
1
1
  import {
2
- Accordion as MAccordion,
3
2
  AccordionDetails,
4
- AccordionProps as MAccordionProps,
5
3
  AccordionSummary,
4
+ Accordion as MAccordion,
5
+ AccordionProps as MAccordionProps,
6
6
  Typography,
7
7
  } from "@mui/material";
8
8
  import React, { ReactNode, useState } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
+ AlertTitle,
2
3
  Alert as MAlert,
3
4
  AlertProps as MAlertProps,
4
- AlertTitle,
5
5
  } from "@mui/material";
6
6
  import React, { ReactNode } from "react";
7
7
 
@@ -1,4 +1,4 @@
1
- import { AlertProps as MAlertProps, ButtonProps } from "@mui/material";
1
+ import { ButtonProps, AlertProps as MAlertProps } from "@mui/material";
2
2
  import React, { forwardRef, Fragment, ReactNode } from "react";
3
3
  import { FLAG } from "../../../../../hooks/useFeatureFlag/common/entities";
4
4
  import { setLocalStorage } from "../../../../../hooks/useLocalStorage/common/utils";
@@ -1,7 +1,7 @@
1
1
  import {
2
+ Fade,
2
3
  Alert as MAlert,
3
4
  AlertProps as MAlertProps,
4
- Fade,
5
5
  } from "@mui/material";
6
6
  import React, { ElementType, ReactNode, useEffect, useState } from "react";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import ChevronRightRoundedIcon from "@mui/icons-material/ChevronRightRounded";
2
2
  import {
3
- Breadcrumbs as MBreadcrumbs,
4
3
  Link as BreadcrumbLink,
4
+ Breadcrumbs as MBreadcrumbs,
5
5
  Typography,
6
6
  } from "@mui/material";
7
7
  import Link from "next/link";
@@ -1,5 +1,5 @@
1
1
  import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
2
- import { DialogTitle as MDialogTitle, IconButton } from "@mui/material";
2
+ import { IconButton, DialogTitle as MDialogTitle } from "@mui/material";
3
3
  import React, { ReactNode } from "react";
4
4
 
5
5
  export interface DialogTitleProps {
@@ -1,6 +1,6 @@
1
1
  import {
2
- OutlinedInput,
3
2
  OutlinedInputProps as MOutlinedInputProps,
3
+ OutlinedInput,
4
4
  Typography,
5
5
  } from "@mui/material";
6
6
  import React from "react";
@@ -11,12 +11,12 @@ import { InputFormControl } from "./select.styles";
11
11
  * Basic form select component.
12
12
  */
13
13
 
14
- export interface SelectProps extends MSelectProps {
14
+ export type SelectProps = MSelectProps & {
15
15
  children: ReactNode;
16
16
  className?: string;
17
17
  isFilled: boolean;
18
18
  label?: string;
19
- }
19
+ };
20
20
 
21
21
  export const Select = ({
22
22
  children,
@@ -10,7 +10,7 @@ import {
10
10
  warningLightest,
11
11
  warningMain,
12
12
  } from "../../../styles/common/mixins/colors";
13
- import { IconBadgeColor, ICON_BADGE_COLOR } from "./iconBadge";
13
+ import { ICON_BADGE_COLOR, IconBadgeColor } from "./iconBadge";
14
14
 
15
15
  interface Props {
16
16
  color: IconBadgeColor;
@@ -3,4 +3,4 @@ import { Box } from "@mui/material";
3
3
 
4
4
  export const Divider = styled(Box)`
5
5
  white-space: pre-wrap;
6
- `;
6
+ ` as typeof Box;
@@ -4,11 +4,11 @@
4
4
  // TODO move to Azul APIs section
5
5
  import {
6
6
  APIEndpoints,
7
+ AZUL_PARAM,
7
8
  AzulCatalogResponse,
8
9
  AzulEntitiesResponse,
9
10
  AzulListParams,
10
11
  AzulSummaryResponse,
11
- AZUL_PARAM,
12
12
  } from "../../apis/azul/common/entities";
13
13
  import { transformFilters } from "../../apis/azul/common/filterTransformer";
14
14
  import { getConfig } from "../../config/config";
@@ -1,8 +1,8 @@
1
1
  import { Breakpoint } from "@mui/material";
2
2
  import { useMemo } from "react";
3
3
  import {
4
- BreakpointKey,
5
4
  BREAKPOINT_FN_NAME,
5
+ BreakpointKey,
6
6
  useBreakpointHelper,
7
7
  } from "./useBreakpointHelper";
8
8
 
@@ -17,7 +17,7 @@ import { useAsync } from "./useAsync";
17
17
  import { useAuthentication } from "./useAuthentication/useAuthentication";
18
18
  import { useConfig } from "./useConfig";
19
19
  import { useEntityService } from "./useEntityService";
20
- import { ExploreMode, EXPLORE_MODE, useExploreMode } from "./useExploreMode";
20
+ import { EXPLORE_MODE, ExploreMode, useExploreMode } from "./useExploreMode";
21
21
  import { useExploreState } from "./useExploreState";
22
22
  import { useURLFilterParams } from "./useURLFilterParams";
23
23
 
@@ -1,7 +1,7 @@
1
1
  import { EntityConfig, EntityMapper } from "../config/entities";
2
2
  import { getEntityConfig } from "../config/utils";
3
3
  import { createEntityService } from "../entity/service/factory";
4
- import { EntityService, ENTITY_SERVICE_TYPE } from "../entity/service/model";
4
+ import { ENTITY_SERVICE_TYPE, EntityService } from "../entity/service/model";
5
5
  import { useCatalog } from "./useCatalog";
6
6
  import { useConfig } from "./useConfig";
7
7
  import { EXPLORE_MODE } from "./useExploreMode";
@@ -1,35 +1,37 @@
1
- import { API_FILE_LOCATION_FETCH } from "../apis/azul/common/constants";
2
1
  import {
3
2
  useRequestFileLocation,
4
3
  UseRequestFileLocationResult,
5
4
  } from "./useRequestFileLocation";
6
5
 
6
+ const NOT_PREPENDED_WITH_FETCH_REGEX = /^(\/(?!fetch))/;
7
+
7
8
  export interface UseFileLocation extends UseRequestFileLocationResult {
8
9
  fileUrl?: string;
9
10
  }
10
11
 
11
12
  export const useFileLocation = (fileUrl?: string): UseFileLocation => {
12
- // Prepend "/fetch" to the path of the specified file URL, if not already included.
13
13
  const url = buildFetchFileUrl(fileUrl);
14
14
  const fileLocation = useRequestFileLocation(url);
15
- const { data } = fileLocation;
16
- const { location } = data || {};
17
- return { ...fileLocation, fileUrl: location };
15
+ return { ...fileLocation, fileUrl: fileLocation.data?.location };
18
16
  };
19
17
 
20
18
  /**
21
19
  * Prepends "/fetch" to the path of the specified file URL, if not already included.
22
- * @param fileUrl - File url.
23
- * @returns file url with path prepended with "/fetch".
20
+ * @param url - URL.
21
+ * @returns file URL with path prepended with "/fetch".
24
22
  */
25
- function buildFetchFileUrl(fileUrl?: string): string | undefined {
26
- if (!fileUrl) {
23
+ export function buildFetchFileUrl(url?: string): string | undefined {
24
+ if (!url) {
27
25
  return;
28
26
  }
29
- const url = new URL(fileUrl);
30
- const path = url.pathname;
31
- if (!path.includes(API_FILE_LOCATION_FETCH)) {
32
- url.pathname = `${API_FILE_LOCATION_FETCH}${path}`;
27
+ try {
28
+ const urlObj = new URL(url);
29
+ urlObj.pathname = urlObj.pathname.replace(
30
+ NOT_PREPENDED_WITH_FETCH_REGEX,
31
+ "/fetch/"
32
+ );
33
+ return urlObj.href;
34
+ } catch (e) {
35
+ throw new Error(`Invalid file URL: ${url}`);
33
36
  }
34
- return url.toString();
35
37
  }
@@ -0,0 +1,19 @@
1
+ import { screen } from "@testing-library/react";
2
+
3
+ /**
4
+ * Returns anchor element by id.
5
+ * @param id - ID.
6
+ * @returns anchor element.
7
+ */
8
+ export function getAnchorEl(id: string): HTMLAnchorElement {
9
+ return screen.getByTestId(id) as HTMLAnchorElement;
10
+ }
11
+
12
+ /**
13
+ * Returns button element by id.
14
+ * @param id - ID.
15
+ * @returns HTML button element.
16
+ */
17
+ export function getButtonById(id: string): HTMLButtonElement {
18
+ return screen.getByTestId(id);
19
+ }