@databiosphere/findable-ui 13.0.1 → 15.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.
- package/.github/workflows/release-please.yml +3 -6
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +43 -0
- package/lib/common/analytics/entities.d.ts +18 -7
- package/lib/common/analytics/entities.js +5 -3
- package/lib/components/Export/common/tracking.d.ts +19 -3
- package/lib/components/Export/common/tracking.js +37 -12
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +3 -17
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.js +6 -3
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/exportToTerra.js +11 -3
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.js +2 -2
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.js +9 -3
- package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +1 -1
- package/lib/components/Index/components/AzulFileDownload/azulFileDownload.d.ts +4 -1
- package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +3 -1
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.d.ts +2 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.js +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.d.ts +2 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.js +27 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.d.ts +15 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.js +26 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/constants.d.ts +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/constants.js +27 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/types.d.ts +12 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/types.js +1 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/utils.d.ts +19 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/utils.js +29 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.d.ts +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.js +10 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +5 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +9 -0
- package/lib/components/Layout/components/Footer/footer.d.ts +3 -2
- package/lib/components/Layout/components/Footer/footer.js +4 -3
- package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.d.ts +2 -2
- package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.js +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.styles.js +0 -1
- package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
- package/lib/components/Links/components/Link/link.d.ts +2 -3
- package/lib/components/Links/components/Link/link.js +1 -2
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +5 -0
- package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +5 -0
- package/lib/components/Table/common/utils.js +0 -1
- package/lib/components/common/Alert/alert.d.ts +4 -12
- package/lib/components/common/Alert/alert.js +5 -7
- package/lib/components/common/Alert/alert.styles.d.ts +1 -11
- package/lib/components/common/Alert/alert.styles.js +18 -24
- package/lib/components/common/Alert/constants.d.ts +2 -0
- package/lib/components/common/Alert/constants.js +27 -0
- package/lib/components/common/Alert/hooks/useTransition/types.d.ts +5 -0
- package/lib/components/common/Alert/hooks/useTransition/types.js +1 -0
- package/lib/components/common/Alert/hooks/useTransition/useTransition.d.ts +7 -0
- package/lib/components/common/Alert/hooks/useTransition/useTransition.js +20 -0
- package/lib/components/common/Banner/banner.d.ts +4 -7
- package/lib/components/common/Banner/banner.js +4 -3
- package/lib/components/common/Banner/banner.styles.d.ts +3 -0
- package/lib/components/common/Banner/banner.styles.js +28 -0
- package/lib/components/common/Banner/components/CookieBanner/constants.d.ts +2 -0
- package/lib/components/common/Banner/components/CookieBanner/constants.js +7 -0
- package/lib/components/common/Banner/components/CookieBanner/cookieBanner.d.ts +3 -3
- package/lib/components/common/Banner/components/CookieBanner/cookieBanner.js +17 -31
- package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.d.ts +1 -1
- package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.js +2 -16
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.d.ts +3 -7
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.js +6 -4
- package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.d.ts +3 -8
- package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.js +6 -8
- package/lib/components/common/Banner/components/SystemStatus/systemStatus.d.ts +3 -8
- package/lib/components/common/Banner/components/SystemStatus/systemStatus.js +6 -8
- package/lib/components/common/Banner/constants.d.ts +2 -0
- package/lib/components/common/Banner/constants.js +9 -0
- package/lib/components/common/Breadcrumbs/breadcrumbs.d.ts +2 -2
- package/lib/components/common/Breadcrumbs/breadcrumbs.js +3 -4
- package/lib/components/common/Paper/paper.styles.js +18 -12
- package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
- package/lib/components/types.d.ts +10 -0
- package/lib/components/types.js +1 -0
- package/lib/config/entities.d.ts +1 -0
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +1 -1
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +3 -2
- package/lib/hooks/useFileManifest/common/entities.d.ts +5 -5
- package/lib/hooks/useFileManifest/common/entities.js +7 -6
- package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +3 -1
- package/lib/hooks/useFileManifest/useRequestFileManifest.js +4 -1
- package/lib/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
- package/lib/hooks/useLocalStorage/useLocalStorage.js +1 -1
- package/lib/providers/fileManifestState/actions.d.ts +9 -0
- package/lib/providers/fileManifestState/actions.js +19 -0
- package/lib/providers/fileManifestState/constants.d.ts +4 -0
- package/lib/providers/fileManifestState/constants.js +25 -0
- package/lib/providers/fileManifestState/utils.d.ts +34 -0
- package/lib/providers/fileManifestState/utils.js +80 -0
- package/lib/providers/fileManifestState.d.ts +5 -19
- package/lib/providers/fileManifestState.js +17 -37
- package/lib/styles/common/constants/size.d.ts +5 -0
- package/lib/styles/common/constants/size.js +6 -0
- package/lib/styles/common/mui/alert.d.ts +4 -0
- package/lib/styles/common/mui/alert.js +20 -0
- package/lib/styles/common/mui/chip.d.ts +11 -0
- package/lib/styles/common/mui/chip.js +25 -0
- package/lib/styles/common/mui/icon.d.ts +2 -0
- package/lib/styles/common/mui/icon.js +6 -0
- package/lib/theme/common/components.d.ts +0 -12
- package/lib/theme/common/components.js +33 -157
- package/lib/theme/components/index.d.ts +2 -0
- package/lib/theme/components/index.js +2 -0
- package/lib/theme/components/muiAlert.d.ts +2 -0
- package/lib/theme/components/muiAlert.js +121 -0
- package/lib/theme/components/muiAlertTitle.d.ts +2 -0
- package/lib/theme/components/muiAlertTitle.js +12 -0
- package/lib/theme/theme.js +3 -2
- package/lib/views/ExportView/exportView.js +1 -1
- package/package.json +4 -4
- package/release-please-config.json +23 -0
- package/src/common/analytics/entities.ts +17 -6
- package/src/common/analytics/readme-analytics.md +9 -7
- package/src/components/Export/common/tracking.ts +46 -16
- package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +4 -30
- package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.tsx +16 -18
- package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +18 -2
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +7 -1
- package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +11 -1
- package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +8 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.ts +5 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.tsx +53 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.ts +31 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/constants.ts +30 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/types.ts +14 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/utils.ts +32 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +10 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.tsx +31 -0
- package/src/components/Layout/components/Footer/footer.tsx +5 -2
- package/src/components/Layout/components/Header/components/Content/components/Logo/logo.styles.ts +0 -1
- package/src/components/Layout/components/Header/components/Content/components/Logo/logo.tsx +3 -2
- package/src/components/Links/components/Link/link.tsx +17 -16
- package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +5 -0
- package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +5 -0
- package/src/components/Table/common/utils.ts +0 -1
- package/src/components/common/Alert/alert.styles.ts +22 -25
- package/src/components/common/Alert/alert.tsx +14 -35
- package/src/components/common/Alert/constants.ts +29 -0
- package/src/components/common/Alert/hooks/useTransition/types.ts +5 -0
- package/src/components/common/Alert/hooks/useTransition/useTransition.ts +25 -0
- package/src/components/common/Banner/banner.styles.ts +29 -0
- package/src/components/common/Banner/banner.tsx +11 -18
- package/src/components/common/Banner/components/CookieBanner/constants.ts +9 -0
- package/src/components/common/Banner/components/CookieBanner/cookieBanner.styles.ts +2 -16
- package/src/components/common/Banner/components/CookieBanner/cookieBanner.tsx +36 -64
- package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.tsx +12 -17
- package/src/components/common/Banner/components/SystemIndexing/systemIndexing.tsx +11 -22
- package/src/components/common/Banner/components/SystemStatus/systemStatus.tsx +11 -22
- package/src/components/common/Banner/constants.ts +11 -0
- package/src/components/common/Breadcrumbs/breadcrumbs.tsx +6 -10
- package/src/components/common/Paper/paper.styles.ts +18 -12
- package/src/components/types.ts +13 -0
- package/src/config/entities.ts +1 -0
- package/src/hooks/useFileManifest/common/buildFileManifestRequestURL.ts +3 -4
- package/src/hooks/useFileManifest/common/entities.ts +5 -6
- package/src/hooks/useFileManifest/useRequestFileManifest.ts +5 -0
- package/src/hooks/useLocalStorage/useLocalStorage.ts +2 -2
- package/src/providers/fileManifestState/actions.ts +34 -0
- package/src/providers/fileManifestState/constants.ts +31 -0
- package/src/providers/fileManifestState/utils.ts +108 -0
- package/src/providers/fileManifestState.tsx +30 -58
- package/src/styles/common/constants/size.ts +5 -0
- package/src/styles/common/mui/alert.ts +24 -0
- package/src/styles/common/mui/chip.ts +36 -0
- package/src/styles/common/mui/icon.ts +8 -0
- package/src/theme/common/components.ts +32 -159
- package/src/theme/components/index.ts +2 -0
- package/src/theme/components/muiAlert.ts +123 -0
- package/src/theme/components/muiAlertTitle.ts +14 -0
- package/src/theme/theme.ts +3 -2
- package/src/views/ExportView/exportView.tsx +1 -1
- package/tests/azulFileDownload.test.tsx +11 -6
- package/tests/fileManifestRequestFilters.test.ts +160 -0
- package/tests/updateFilesFacetsStatus.test.ts +84 -0
- package/types/data-explorer-ui.d.ts +6 -5
- package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
- package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
- package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
- package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
- package/lib/components/common/Alert/alert.stories.d.ts +0 -6
- package/lib/components/common/Alert/alert.stories.js +0 -36
- package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
- package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
- package/src/components/Index/components/TitleCell/titleCell.styles.ts +0 -7
- package/src/components/Index/components/TitleCell/titleCell.tsx +0 -22
- package/src/components/common/Alert/alert.stories.tsx +0 -41
- package/src/components/common/Alert/components/AlertText/alertText.styles.ts +0 -20
- package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.ts +0 -20
- package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.tsx +0 -27
- package/src/components/common/Banner/components/DismissibleBanner/dismissibleBanner.tsx +0 -44
- package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.ts +0 -22
|
@@ -2,6 +2,7 @@ on:
|
|
|
2
2
|
push:
|
|
3
3
|
branches:
|
|
4
4
|
- main
|
|
5
|
+
workflow_dispatch: # Enable manual triggering
|
|
5
6
|
|
|
6
7
|
permissions:
|
|
7
8
|
contents: write
|
|
@@ -16,12 +17,8 @@ jobs:
|
|
|
16
17
|
- uses: googleapis/release-please-action@v4
|
|
17
18
|
id: release
|
|
18
19
|
with:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
|
|
22
|
-
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
23
|
-
# This is a built-in strategy in release-please, see "Action Inputs" for more options
|
|
24
|
-
release-type: node
|
|
20
|
+
config-file: release-please-config.json
|
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
25
22
|
|
|
26
23
|
# The logic below handles the npm publication:
|
|
27
24
|
- uses: actions/checkout@v4
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [15.0.0](https://github.com/DataBiosphere/findable-ui/compare/v14.0.0...v15.0.0) (2024-11-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* added file download tracking ([#260](https://github.com/DataBiosphere/findable-ui/issues/260)) (#263)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add optional version information to footer ([#258](https://github.com/DataBiosphere/findable-ui/issues/258)) ([#265](https://github.com/DataBiosphere/findable-ui/issues/265)) ([7a245ca](https://github.com/DataBiosphere/findable-ui/commit/7a245caf8f8966da3406f04559ecbf19ad978b6e))
|
|
13
|
+
* added file download tracking ([#260](https://github.com/DataBiosphere/findable-ui/issues/260)) ([#263](https://github.com/DataBiosphere/findable-ui/issues/263)) ([092ad93](https://github.com/DataBiosphere/findable-ui/commit/092ad9390cff425c2bcc4a65e7212bde5acd573f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add support for inclusion of orphans in verbatim PFB ([#264](https://github.com/DataBiosphere/findable-ui/issues/264)) ([#269](https://github.com/DataBiosphere/findable-ui/issues/269)) ([5f295e0](https://github.com/DataBiosphere/findable-ui/commit/5f295e0d008fb5db92b82f7ac1aa09dbbac06bbe))
|
|
19
|
+
* remove `console.log` from `getHeadersTableData` ([#256](https://github.com/DataBiosphere/findable-ui/issues/256)) ([#261](https://github.com/DataBiosphere/findable-ui/issues/261)) ([7a87206](https://github.com/DataBiosphere/findable-ui/commit/7a872063aac9bee7ca05c55c6dc007ca83f5df61))
|
|
20
|
+
* simplify release-please config and remove pat ([#267](https://github.com/DataBiosphere/findable-ui/issues/267)) ([#268](https://github.com/DataBiosphere/findable-ui/issues/268)) ([b6d3efa](https://github.com/DataBiosphere/findable-ui/commit/b6d3efab4c10a71b162df5168595e3142454d62e))
|
|
21
|
+
|
|
22
|
+
## [14.0.0](https://github.com/DataBiosphere/findable-ui/compare/v13.0.1...v14.0.0) (2024-11-05)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ⚠ BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* update banner components ([#253](https://github.com/DataBiosphere/findable-ui/issues/253)) (#255)
|
|
28
|
+
* simplify alert components ([#252](https://github.com/DataBiosphere/findable-ui/issues/252)) (#254)
|
|
29
|
+
* fix mui error "cannot resolve @mui/utils/getReactNodeRef" ([#242](https://github.com/DataBiosphere/findable-ui/issues/242)) (#243)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* add 'testid' prop interface ([#247](https://github.com/DataBiosphere/findable-ui/issues/247)) ([#250](https://github.com/DataBiosphere/findable-ui/issues/250)) ([1e494e0](https://github.com/DataBiosphere/findable-ui/commit/1e494e0b7279035b820dcacf16efc4d1f55d7a1e))
|
|
34
|
+
* added and updated index export tracking ([#222](https://github.com/DataBiosphere/findable-ui/issues/222)) ([#224](https://github.com/DataBiosphere/findable-ui/issues/224)) ([15e861d](https://github.com/DataBiosphere/findable-ui/commit/15e861de5a2411e5cbb9d24b137ef62ff48695c4))
|
|
35
|
+
* remove unused titlecell component ([#248](https://github.com/DataBiosphere/findable-ui/issues/248)) ([#249](https://github.com/DataBiosphere/findable-ui/issues/249)) ([51a7c4f](https://github.com/DataBiosphere/findable-ui/commit/51a7c4f8877990dd4a7fef23ddce543e4913f885))
|
|
36
|
+
* simplify alert components ([#252](https://github.com/DataBiosphere/findable-ui/issues/252)) ([#254](https://github.com/DataBiosphere/findable-ui/issues/254)) ([18f3e54](https://github.com/DataBiosphere/findable-ui/commit/18f3e54ef73bedd585b1c162fcabd0cbe74cc8bf))
|
|
37
|
+
* update banner components ([#253](https://github.com/DataBiosphere/findable-ui/issues/253)) ([#255](https://github.com/DataBiosphere/findable-ui/issues/255)) ([d9c87c7](https://github.com/DataBiosphere/findable-ui/commit/d9c87c73c7b0e018c639c98ca8100b12112afe5d))
|
|
38
|
+
* update mui link theme styles ([#245](https://github.com/DataBiosphere/findable-ui/issues/245)) ([#246](https://github.com/DataBiosphere/findable-ui/issues/246)) ([7f401b8](https://github.com/DataBiosphere/findable-ui/commit/7f401b8eba6c53daec2a40e825220e8506bc95b3))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* fix cookie banner color ([#239](https://github.com/DataBiosphere/findable-ui/issues/239)) ([#251](https://github.com/DataBiosphere/findable-ui/issues/251)) ([54b2802](https://github.com/DataBiosphere/findable-ui/commit/54b2802ce83168c5f79860c2baf53c7148e19767))
|
|
44
|
+
* fix mui error "cannot resolve @mui/utils/getReactNodeRef" ([#242](https://github.com/DataBiosphere/findable-ui/issues/242)) ([#243](https://github.com/DataBiosphere/findable-ui/issues/243)) ([4b832ac](https://github.com/DataBiosphere/findable-ui/commit/4b832acd7b18511781ce4046df9c4e9454896991))
|
|
45
|
+
|
|
3
46
|
## [13.0.1](https://github.com/DataBiosphere/findable-ui/compare/v13.0.0...v13.0.1) (2024-10-18)
|
|
4
47
|
|
|
5
48
|
|
|
@@ -7,20 +7,22 @@ export declare enum EVENT_NAME {
|
|
|
7
7
|
ENTITY_SELECTED = "entity_selected",
|
|
8
8
|
ENTITY_TABLE_PAGINATED = "entity_table_paginated",
|
|
9
9
|
ENTITY_TABLE_SORTED = "entity_table_sorted",
|
|
10
|
-
|
|
10
|
+
FILE_DOWNLOADED = "file_downloaded",
|
|
11
|
+
FILTER_SELECTED = "filter_selected",
|
|
12
|
+
INDEX_ANALYZE_IN_TERRA_REQUESTED = "index_analyze_in_terra_requested",
|
|
13
|
+
INDEX_FILE_MANIFEST_REQUESTED = "index_file_manifest_requested"
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Set of analytics event parameters.
|
|
14
17
|
*/
|
|
15
18
|
export declare enum EVENT_PARAM {
|
|
16
|
-
CATALOG = "catalog",
|
|
17
19
|
COLUMN_NAME = "column_name",
|
|
18
|
-
CURRENT_QUERY = "current_query",
|
|
19
20
|
ENTITY_NAME = "entity_name",
|
|
20
21
|
FILTER_NAME = "filter_name",
|
|
21
22
|
FILTER_VALUE = "filter_value",
|
|
22
|
-
INDEX = "index",
|
|
23
23
|
PAGINATION_DIRECTION = "pagination_direction",
|
|
24
|
+
RELATED_ENTITY_ID = "related_entity_id",
|
|
25
|
+
RELATED_ENTITY_NAME = "related_entity_name",
|
|
24
26
|
SORT_DIRECTION = "sort_direction",
|
|
25
27
|
TOOL_NAME = "tool_name"
|
|
26
28
|
}
|
|
@@ -43,9 +45,7 @@ export declare enum SORT_DIRECTION {
|
|
|
43
45
|
*/
|
|
44
46
|
export type EventParams = {
|
|
45
47
|
[EVENT_NAME.BULK_DOWNLOAD_REQUESTED]: {
|
|
46
|
-
[EVENT_PARAM.
|
|
47
|
-
[EVENT_PARAM.CURRENT_QUERY]: string;
|
|
48
|
-
[EVENT_PARAM.INDEX]: string;
|
|
48
|
+
[EVENT_PARAM.ENTITY_NAME]: string;
|
|
49
49
|
[EVENT_PARAM.TOOL_NAME]: string;
|
|
50
50
|
};
|
|
51
51
|
[EVENT_NAME.ENTITY_SELECTED]: {
|
|
@@ -60,8 +60,19 @@ export type EventParams = {
|
|
|
60
60
|
[EVENT_PARAM.COLUMN_NAME]: string;
|
|
61
61
|
[EVENT_PARAM.SORT_DIRECTION]: SORT_DIRECTION;
|
|
62
62
|
};
|
|
63
|
+
[EVENT_NAME.FILE_DOWNLOADED]: {
|
|
64
|
+
[EVENT_PARAM.ENTITY_NAME]: string;
|
|
65
|
+
[EVENT_PARAM.RELATED_ENTITY_ID]: string;
|
|
66
|
+
[EVENT_PARAM.RELATED_ENTITY_NAME]: string;
|
|
67
|
+
};
|
|
63
68
|
[EVENT_NAME.FILTER_SELECTED]: {
|
|
64
69
|
[EVENT_PARAM.FILTER_NAME]: string;
|
|
65
70
|
[EVENT_PARAM.FILTER_VALUE]: string;
|
|
66
71
|
};
|
|
72
|
+
[EVENT_NAME.INDEX_ANALYZE_IN_TERRA_REQUESTED]: {
|
|
73
|
+
[EVENT_PARAM.ENTITY_NAME]: string;
|
|
74
|
+
};
|
|
75
|
+
[EVENT_NAME.INDEX_FILE_MANIFEST_REQUESTED]: {
|
|
76
|
+
[EVENT_PARAM.ENTITY_NAME]: string;
|
|
77
|
+
};
|
|
67
78
|
};
|
|
@@ -7,21 +7,23 @@ export var EVENT_NAME;
|
|
|
7
7
|
EVENT_NAME["ENTITY_SELECTED"] = "entity_selected";
|
|
8
8
|
EVENT_NAME["ENTITY_TABLE_PAGINATED"] = "entity_table_paginated";
|
|
9
9
|
EVENT_NAME["ENTITY_TABLE_SORTED"] = "entity_table_sorted";
|
|
10
|
+
EVENT_NAME["FILE_DOWNLOADED"] = "file_downloaded";
|
|
10
11
|
EVENT_NAME["FILTER_SELECTED"] = "filter_selected";
|
|
12
|
+
EVENT_NAME["INDEX_ANALYZE_IN_TERRA_REQUESTED"] = "index_analyze_in_terra_requested";
|
|
13
|
+
EVENT_NAME["INDEX_FILE_MANIFEST_REQUESTED"] = "index_file_manifest_requested";
|
|
11
14
|
})(EVENT_NAME || (EVENT_NAME = {}));
|
|
12
15
|
/**
|
|
13
16
|
* Set of analytics event parameters.
|
|
14
17
|
*/
|
|
15
18
|
export var EVENT_PARAM;
|
|
16
19
|
(function (EVENT_PARAM) {
|
|
17
|
-
EVENT_PARAM["CATALOG"] = "catalog";
|
|
18
20
|
EVENT_PARAM["COLUMN_NAME"] = "column_name";
|
|
19
|
-
EVENT_PARAM["CURRENT_QUERY"] = "current_query";
|
|
20
21
|
EVENT_PARAM["ENTITY_NAME"] = "entity_name";
|
|
21
22
|
EVENT_PARAM["FILTER_NAME"] = "filter_name";
|
|
22
23
|
EVENT_PARAM["FILTER_VALUE"] = "filter_value";
|
|
23
|
-
EVENT_PARAM["INDEX"] = "index";
|
|
24
24
|
EVENT_PARAM["PAGINATION_DIRECTION"] = "pagination_direction";
|
|
25
|
+
EVENT_PARAM["RELATED_ENTITY_ID"] = "related_entity_id";
|
|
26
|
+
EVENT_PARAM["RELATED_ENTITY_NAME"] = "related_entity_name";
|
|
25
27
|
EVENT_PARAM["SORT_DIRECTION"] = "sort_direction";
|
|
26
28
|
EVENT_PARAM["TOOL_NAME"] = "tool_name";
|
|
27
29
|
})(EVENT_PARAM || (EVENT_PARAM = {}));
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Executes event tracking for bulk download.
|
|
3
|
-
* @param
|
|
3
|
+
* @param entity_name - Entity (tab) name.
|
|
4
4
|
* @param toolName - Tool name.
|
|
5
|
-
* @param requestParams - Request params.
|
|
6
5
|
*/
|
|
7
|
-
export declare function
|
|
6
|
+
export declare function trackBulkDownloadRequested(entity_name: string, toolName: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Executes event tracking for the file manifest export.
|
|
9
|
+
* @param entity_name - Entity (tab) name.
|
|
10
|
+
*/
|
|
11
|
+
export declare function trackFileManifestRequested(entity_name: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Executes event tracking for the Terra export.
|
|
14
|
+
* @param entity_name - Entity (tab) name.
|
|
15
|
+
*/
|
|
16
|
+
export declare function trackExportToTerraRequested(entity_name: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Executes event tracking for individual file downloads
|
|
19
|
+
* @param entity_name - The name of the file downloaded.
|
|
20
|
+
* @param related_entity_id - The ID of the file's dataset / project
|
|
21
|
+
* @param related_entity_name -The name of the file's dataset / project
|
|
22
|
+
*/
|
|
23
|
+
export declare function trackFileDownloaded(entity_name: string, related_entity_id: string, related_entity_name: string): void;
|
|
@@ -2,22 +2,47 @@ import { track } from "../../../common/analytics/analytics";
|
|
|
2
2
|
import { EVENT_NAME, EVENT_PARAM } from "../../../common/analytics/entities";
|
|
3
3
|
/**
|
|
4
4
|
* Executes event tracking for bulk download.
|
|
5
|
-
* @param
|
|
5
|
+
* @param entity_name - Entity (tab) name.
|
|
6
6
|
* @param toolName - Tool name.
|
|
7
|
-
* @param requestParams - Request params.
|
|
8
7
|
*/
|
|
9
|
-
export function
|
|
10
|
-
if (!requestParams) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
// Grab catalog and current query from the request params.
|
|
14
|
-
const catalog = requestParams.get("catalog"); // Catalog will be defined.
|
|
15
|
-
const currentQuery = requestParams.get("filters"); // Filters will be defined.
|
|
8
|
+
export function trackBulkDownloadRequested(entity_name, toolName) {
|
|
16
9
|
// Track the bulk download requested event.
|
|
17
10
|
track(EVENT_NAME.BULK_DOWNLOAD_REQUESTED, {
|
|
18
|
-
[EVENT_PARAM.
|
|
19
|
-
[EVENT_PARAM.CURRENT_QUERY]: currentQuery,
|
|
20
|
-
[EVENT_PARAM.INDEX]: index,
|
|
11
|
+
[EVENT_PARAM.ENTITY_NAME]: entity_name,
|
|
21
12
|
[EVENT_PARAM.TOOL_NAME]: toolName,
|
|
22
13
|
});
|
|
23
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Executes event tracking for the file manifest export.
|
|
17
|
+
* @param entity_name - Entity (tab) name.
|
|
18
|
+
*/
|
|
19
|
+
export function trackFileManifestRequested(entity_name) {
|
|
20
|
+
// Track the file manifest requested event.
|
|
21
|
+
track(EVENT_NAME.INDEX_FILE_MANIFEST_REQUESTED, {
|
|
22
|
+
[EVENT_PARAM.ENTITY_NAME]: entity_name,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Executes event tracking for the Terra export.
|
|
27
|
+
* @param entity_name - Entity (tab) name.
|
|
28
|
+
*/
|
|
29
|
+
export function trackExportToTerraRequested(entity_name) {
|
|
30
|
+
// Track the export to terra event.
|
|
31
|
+
track(EVENT_NAME.INDEX_ANALYZE_IN_TERRA_REQUESTED, {
|
|
32
|
+
[EVENT_PARAM.ENTITY_NAME]: entity_name,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Executes event tracking for individual file downloads
|
|
37
|
+
* @param entity_name - The name of the file downloaded.
|
|
38
|
+
* @param related_entity_id - The ID of the file's dataset / project
|
|
39
|
+
* @param related_entity_name -The name of the file's dataset / project
|
|
40
|
+
*/
|
|
41
|
+
export function trackFileDownloaded(entity_name, related_entity_id, related_entity_name) {
|
|
42
|
+
// Track the file downloaded event.
|
|
43
|
+
track(EVENT_NAME.FILE_DOWNLOADED, {
|
|
44
|
+
[EVENT_PARAM.ENTITY_NAME]: entity_name,
|
|
45
|
+
[EVENT_PARAM.RELATED_ENTITY_ID]: related_entity_id,
|
|
46
|
+
[EVENT_PARAM.RELATED_ENTITY_NAME]: related_entity_name,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
|
|
3
3
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
4
|
-
import { FILE_MANIFEST_TYPE, } from "../../../../hooks/useFileManifest/common/entities";
|
|
5
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
6
5
|
import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
|
|
7
6
|
import { BULK_DOWNLOAD_EXECUTION_ENVIRONMENT, } from "../../common/entities";
|
|
8
|
-
import {
|
|
7
|
+
import { trackBulkDownloadRequested } from "../../common/tracking";
|
|
9
8
|
import { DownloadCurlCommandNotStarted } from "./components/DownloadCurlCommandNotStarted/downloadCurlCommandNotStarted";
|
|
10
9
|
import { DownloadCurlCommandReady } from "./components/DownloadCurlCommandReady/downloadCurlCommandReady";
|
|
11
10
|
export const DownloadCurlCommand = ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, }) => {
|
|
12
|
-
useRequestFileManifest(MANIFEST_DOWNLOAD_FORMAT.CURL, filters, fileSummaryFacetName);
|
|
11
|
+
useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.CURL, filters, fileSummaryFacetName);
|
|
13
12
|
const [executionEnvironment, setExecutionEnvironment] = useState(BULK_DOWNLOAD_EXECUTION_ENVIRONMENT.BASH);
|
|
14
13
|
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
15
|
-
const { requestParams } = fileManifestState;
|
|
16
14
|
const { data, isLoading, run } = useFileManifest();
|
|
17
15
|
const curlCommand = getBulkDownloadCurlCommand(data, executionEnvironment);
|
|
18
16
|
return curlCommand ? (React.createElement(DownloadCurlCommandReady, { curlCommand: curlCommand, DownloadCurlSuccess: DownloadCurlSuccess })) : (React.createElement(DownloadCurlCommandNotStarted, { DownloadCurlForm: DownloadCurlForm, DownloadCurlStart: DownloadCurlStart, executionEnvironment: executionEnvironment, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, onRequestManifest: () => {
|
|
19
17
|
// Execute GTM tracking.
|
|
20
|
-
|
|
18
|
+
trackBulkDownloadRequested(entityList, executionEnvironment);
|
|
21
19
|
// Request manifest.
|
|
22
20
|
run();
|
|
23
21
|
}, setExecutionEnvironment: setExecutionEnvironment }));
|
|
@@ -35,15 +33,3 @@ function getBulkDownloadCurlCommand(fileLocation, executionEnvironment) {
|
|
|
35
33
|
}
|
|
36
34
|
return commandLine[executionEnvironment];
|
|
37
35
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Executes GTM tracking.
|
|
40
|
-
* @param fileManifestType - File manifest type.
|
|
41
|
-
* @param index - Index.
|
|
42
|
-
* @param toolName - Execution environment.
|
|
43
|
-
* @param requestParams - Request params.
|
|
44
|
-
*/
|
|
45
|
-
function track(fileManifestType, index, toolName, requestParams) {
|
|
46
|
-
if (fileManifestType === FILE_MANIFEST_TYPE.BULK_DOWNLOAD) {
|
|
47
|
-
bulkDownloadTracking(index, toolName, requestParams);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { expireTimeInSeconds, useAuthenticationNIHExpiry, } from "../../../../../../../../hooks/useAuthentication/useAuthenticationNIHExpiry";
|
|
3
|
-
import {
|
|
3
|
+
import { Alert } from "../../../../../../../common/Alert/alert";
|
|
4
|
+
import { ALERT_PROPS } from "../../../../../../../common/Alert/constants";
|
|
5
|
+
import { FluidPaper } from "../../../../../../../common/Paper/paper.styles";
|
|
4
6
|
import { Link } from "../../../../../../../Links/components/Link/link";
|
|
5
7
|
export const NIHAccountExpiryWarning = () => {
|
|
6
8
|
const expiryStatus = useAuthenticationNIHExpiry();
|
|
7
9
|
const { isReady, linkExpired, linkExpireTime, linkWillExpire } = expiryStatus || {};
|
|
8
10
|
if (!isReady)
|
|
9
11
|
return null;
|
|
10
|
-
return linkWillExpire || linkExpired ? (React.createElement(
|
|
12
|
+
return linkWillExpire || linkExpired ? (React.createElement(Alert, { ...ALERT_PROPS.STANDARD_WARNING, component: FluidPaper },
|
|
13
|
+
React.createElement("span", null,
|
|
11
14
|
React.createElement("span", null, getExpiryMessage(linkExpired, linkExpireTime)),
|
|
12
15
|
" ",
|
|
13
16
|
React.createElement("span", null,
|
|
@@ -15,7 +18,7 @@ export const NIHAccountExpiryWarning = () => {
|
|
|
15
18
|
" ",
|
|
16
19
|
React.createElement(Link, { label: "renew your account", url: "https://support.terra.bio/hc/en-us/articles/360038086332-Linking-authorization-accessing-controlled-data-on-external-servers#heading-4" }),
|
|
17
20
|
" ",
|
|
18
|
-
"link."))
|
|
21
|
+
"link.")))) : null;
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Calculates the remaining days until the link expires.
|
|
@@ -15,4 +15,4 @@ export interface ExportToTerraProps {
|
|
|
15
15
|
manifestDownloadFormat?: ManifestDownloadFormat;
|
|
16
16
|
manifestDownloadFormats: ManifestDownloadFormat[];
|
|
17
17
|
}
|
|
18
|
-
export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }: ExportToTerraProps) => JSX.Element;
|
|
18
|
+
export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }: ExportToTerraProps) => JSX.Element;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
2
3
|
import { useExportToTerraResponseURL } from "../../../../hooks/useExportToTerraResponseURL";
|
|
3
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
4
5
|
import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
|
|
6
|
+
import { trackExportToTerraRequested } from "../../common/tracking";
|
|
5
7
|
import { ExportToTerraNotStarted } from "./components/ExportToTerraNotStarted/exportToTerraNotStarted";
|
|
6
8
|
import { ExportToTerraReady } from "./components/ExportToTerraReady/exportToTerraReady";
|
|
7
|
-
export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }) => {
|
|
8
|
-
|
|
9
|
+
export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }) => {
|
|
10
|
+
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
11
|
+
useRequestFileManifest(fileManifestType, manifestDownloadFormat, filters, fileSummaryFacetName);
|
|
9
12
|
const { requestParams } = fileManifestState;
|
|
10
13
|
const { data, isLoading, run } = useFileManifest();
|
|
11
14
|
const exportURL = useExportToTerraResponseURL(requestParams, data);
|
|
12
|
-
return exportURL ? (React.createElement(ExportToTerraReady, { ExportToTerraSuccess: ExportToTerraSuccess, exportURL: exportURL })) : (React.createElement(ExportToTerraNotStarted, { ExportTerraForm: ExportForm, ExportToTerraStart: ExportToTerraStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest:
|
|
15
|
+
return exportURL ? (React.createElement(ExportToTerraReady, { ExportToTerraSuccess: ExportToTerraSuccess, exportURL: exportURL })) : (React.createElement(ExportToTerraNotStarted, { ExportTerraForm: ExportForm, ExportToTerraStart: ExportToTerraStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest: () => {
|
|
16
|
+
// Execute GA tracking
|
|
17
|
+
trackExportToTerraRequested(entityList);
|
|
18
|
+
// Request manifest
|
|
19
|
+
run();
|
|
20
|
+
} }));
|
|
13
21
|
};
|
|
@@ -5,4 +5,4 @@ export interface ManifestDownloadEntityProps {
|
|
|
5
5
|
filters: Filters;
|
|
6
6
|
metadataFilters: Filters;
|
|
7
7
|
}
|
|
8
|
-
export declare const ManifestDownloadEntity: ({ filters, metadataFilters, }: ManifestDownloadEntityProps) => JSX.Element;
|
|
8
|
+
export declare const ManifestDownloadEntity: ({ fileManifestType, filters, metadataFilters, }: ManifestDownloadEntityProps) => JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../../../apis/azul/common/ent
|
|
|
3
3
|
import { useRequestFileManifest } from "../../../../../../hooks/useFileManifest/useRequestFileManifest";
|
|
4
4
|
import { FileManifestDownload } from "./components/FileManifestDownload/fileManifestDownload";
|
|
5
5
|
import { FileManifestSpreadsheet } from "./components/FileManifestSpreadsheet/fileManifestSpreadsheet";
|
|
6
|
-
export const ManifestDownloadEntity = ({ filters, metadataFilters, }) => {
|
|
7
|
-
useRequestFileManifest(MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, undefined);
|
|
6
|
+
export const ManifestDownloadEntity = ({ fileManifestType, filters, metadataFilters, }) => {
|
|
7
|
+
useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, undefined);
|
|
8
8
|
return (React.createElement(React.Fragment, null,
|
|
9
9
|
React.createElement(FileManifestSpreadsheet, { filters: metadataFilters }),
|
|
10
10
|
React.createElement(FileManifestDownload, { filters: filters })));
|
|
@@ -13,4 +13,4 @@ export interface ManifestDownloadProps {
|
|
|
13
13
|
ManifestDownloadStart: ElementType;
|
|
14
14
|
ManifestDownloadSuccess: ElementType;
|
|
15
15
|
}
|
|
16
|
-
export declare const ManifestDownload: ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }: ManifestDownloadProps) => JSX.Element;
|
|
16
|
+
export declare const ManifestDownload: ({ fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }: ManifestDownloadProps) => JSX.Element;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
|
|
3
|
+
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
3
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
4
5
|
import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
|
|
6
|
+
import { trackFileManifestRequested } from "../../common/tracking";
|
|
5
7
|
import { ManifestDownloadNotStarted } from "./components/ManifestDownloadNotStarted/manifestDownloadNotStarted";
|
|
6
8
|
import { ManifestDownloadReady } from "./components/ManifestDownloadReady/manifestDownloadReady";
|
|
7
|
-
export const ManifestDownload = ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }) => {
|
|
8
|
-
useRequestFileManifest(MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, fileSummaryFacetName);
|
|
9
|
+
export const ManifestDownload = ({ fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }) => {
|
|
10
|
+
useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, fileSummaryFacetName);
|
|
11
|
+
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
9
12
|
const { data, isLoading, run } = useFileManifest();
|
|
10
13
|
const manifestURL = getManifestDownloadURL(data);
|
|
11
|
-
return manifestURL ? (React.createElement(ManifestDownloadReady, { ManifestDownloadSuccess: ManifestDownloadSuccess, manifestURL: manifestURL })) : (React.createElement(ManifestDownloadNotStarted, { ManifestDownloadForm: ManifestDownloadForm, ManifestDownloadStart: ManifestDownloadStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, onRequestManifest:
|
|
14
|
+
return manifestURL ? (React.createElement(ManifestDownloadReady, { ManifestDownloadSuccess: ManifestDownloadSuccess, manifestURL: manifestURL })) : (React.createElement(ManifestDownloadNotStarted, { ManifestDownloadForm: ManifestDownloadForm, ManifestDownloadStart: ManifestDownloadStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, onRequestManifest: () => {
|
|
15
|
+
trackFileManifestRequested(entityList);
|
|
16
|
+
run();
|
|
17
|
+
} }));
|
|
12
18
|
};
|
|
13
19
|
/**
|
|
14
20
|
* Returns the manifest download URL for the generated manifest.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SupersededTag: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, "label" | "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "
|
|
3
|
+
}, "label" | "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "icon" | "onDelete" | "skipFocusWhenDisabled"> & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
}, {}, {}>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export interface AzulFileDownloadProps {
|
|
2
|
+
entityName: string;
|
|
3
|
+
relatedEntityId: string;
|
|
4
|
+
relatedEntityName: string;
|
|
2
5
|
url?: string;
|
|
3
6
|
}
|
|
4
|
-
export declare const AzulFileDownload: ({ url, }: AzulFileDownloadProps) => JSX.Element;
|
|
7
|
+
export declare const AzulFileDownload: ({ entityName, relatedEntityId, relatedEntityName, url, }: AzulFileDownloadProps) => JSX.Element;
|
|
@@ -4,9 +4,10 @@ import { useFileLocation } from "../../../../hooks/useFileLocation";
|
|
|
4
4
|
import { DownloadIcon } from "../../../common/CustomIcon/components/DownloadIcon/downloadIcon";
|
|
5
5
|
import { LoadingIcon } from "../../../common/CustomIcon/components/LoadingIcon/loadingIcon";
|
|
6
6
|
import { IconButton } from "../../../common/IconButton/iconButton";
|
|
7
|
+
import { trackFileDownloaded } from "../../../Export/common/tracking";
|
|
7
8
|
import { StyledIconButton } from "./azulFileDownload.styles";
|
|
8
9
|
import { AZUL_FILE_DOWNLOAD_TEST_ID, AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID, AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID, } from "./common/constants";
|
|
9
|
-
export const AzulFileDownload = ({ url, }) => {
|
|
10
|
+
export const AzulFileDownload = ({ entityName, relatedEntityId, relatedEntityName, url, }) => {
|
|
10
11
|
const { fileUrl, isLoading, run } = useFileLocation(url);
|
|
11
12
|
const downloadRef = useRef(null);
|
|
12
13
|
const [isRequestPending, setIsRequestPending] = useState(false);
|
|
@@ -24,6 +25,7 @@ export const AzulFileDownload = ({ url, }) => {
|
|
|
24
25
|
return (React.createElement(Fragment, null,
|
|
25
26
|
isRequestPending ? (React.createElement(StyledIconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID, Icon: LoadingIcon, size: "medium" })) : (React.createElement(IconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID, disabled: !url, Icon: isLoading ? LoadingIcon : DownloadIcon, onClick: () => {
|
|
26
27
|
setIsRequestPending(true);
|
|
28
|
+
trackFileDownloaded(entityName, relatedEntityId, relatedEntityName);
|
|
27
29
|
run();
|
|
28
30
|
}, size: "medium" })),
|
|
29
31
|
React.createElement(Box, { component: "a", "data-testid": AZUL_FILE_DOWNLOAD_TEST_ID, download: true, ref: downloadRef, sx: { display: "none" } })));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useConfig } from "../../../../../../../../../../hooks/useConfig";
|
|
4
|
+
import { TEXT_BODY_SMALL_400_2_LINES } from "../../../../../../../../../../theme/common/typography";
|
|
5
|
+
import { Link } from "../../../../../../../../../Links/components/Link/link";
|
|
6
|
+
import { getGitHash, getVersion } from "../../../../utils";
|
|
7
|
+
import { LINK_PROPS } from "./constants";
|
|
8
|
+
import { getCommitUrl, getReleaseUrl } from "./utils";
|
|
9
|
+
export const Title = ({ versionInfo, }) => {
|
|
10
|
+
const { config: { gitHubUrl }, } = useConfig();
|
|
11
|
+
if (!versionInfo)
|
|
12
|
+
return null;
|
|
13
|
+
const { buildDate, catalog, gitHash, version } = versionInfo;
|
|
14
|
+
return (React.createElement(Typography, { component: "div", variant: TEXT_BODY_SMALL_400_2_LINES },
|
|
15
|
+
buildDate && (React.createElement("div", null,
|
|
16
|
+
React.createElement("span", null, "Build Date: "),
|
|
17
|
+
React.createElement("span", null, buildDate))),
|
|
18
|
+
React.createElement("div", null,
|
|
19
|
+
React.createElement("span", null, "Version: "),
|
|
20
|
+
React.createElement(Link, { ...LINK_PROPS, label: getVersion(version), url: getReleaseUrl(gitHubUrl, versionInfo) })),
|
|
21
|
+
gitHash && (React.createElement("div", null,
|
|
22
|
+
React.createElement("span", null, "Git Commit: "),
|
|
23
|
+
React.createElement(Link, { ...LINK_PROPS, label: getGitHash(gitHash), url: getCommitUrl(gitHubUrl, versionInfo) }))),
|
|
24
|
+
catalog && (React.createElement("div", null,
|
|
25
|
+
React.createElement("span", null, "Catalog: "),
|
|
26
|
+
React.createElement("span", null, catalog)))));
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VersionInfo } from "../../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns GitHub commit URL for the given git hash.
|
|
4
|
+
* @param gitHubRepoUrl - GitHub repository URL.
|
|
5
|
+
* @param versionInfo - Version info.
|
|
6
|
+
* @returns GitHub commit URL.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCommitUrl(gitHubRepoUrl?: string, versionInfo?: VersionInfo): string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns GitHub release URL for the given release version.
|
|
11
|
+
* @param gitHubRepoUrl - GitHub repository URL.
|
|
12
|
+
* @param versionInfo - Version info.
|
|
13
|
+
* @returns GitHub release URL.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getReleaseUrl(gitHubRepoUrl?: string, versionInfo?: VersionInfo): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns GitHub commit URL for the given git hash.
|
|
3
|
+
* @param gitHubRepoUrl - GitHub repository URL.
|
|
4
|
+
* @param versionInfo - Version info.
|
|
5
|
+
* @returns GitHub commit URL.
|
|
6
|
+
*/
|
|
7
|
+
export function getCommitUrl(gitHubRepoUrl, versionInfo) {
|
|
8
|
+
if (!gitHubRepoUrl || !versionInfo)
|
|
9
|
+
return "";
|
|
10
|
+
if (!versionInfo.gitHash)
|
|
11
|
+
return "";
|
|
12
|
+
return `${gitHubRepoUrl}/commit/${versionInfo.gitHash}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Returns GitHub release URL for the given release version.
|
|
16
|
+
* @param gitHubRepoUrl - GitHub repository URL.
|
|
17
|
+
* @param versionInfo - Version info.
|
|
18
|
+
* @returns GitHub release URL.
|
|
19
|
+
*/
|
|
20
|
+
export function getReleaseUrl(gitHubRepoUrl, versionInfo) {
|
|
21
|
+
if (!gitHubRepoUrl || !versionInfo)
|
|
22
|
+
return "";
|
|
23
|
+
if (!versionInfo.version)
|
|
24
|
+
return "";
|
|
25
|
+
return `${gitHubRepoUrl}/releases/tag/${versionInfo.version}`;
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../../../styles/common/mui/chip";
|
|
2
|
+
export const CHIP_PROPS = {
|
|
3
|
+
color: MUI_CHIP_PROPS.COLOR.DEFAULT,
|
|
4
|
+
size: MUI_CHIP_PROPS.SIZE.SMALL,
|
|
5
|
+
};
|
|
6
|
+
export const TOOLTIP_PROPS = {
|
|
7
|
+
arrow: true,
|
|
8
|
+
slotProps: {
|
|
9
|
+
popper: {
|
|
10
|
+
modifiers: [
|
|
11
|
+
{
|
|
12
|
+
name: "offset",
|
|
13
|
+
options: {
|
|
14
|
+
offset: [0, -4],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "preventOverflow",
|
|
19
|
+
options: { padding: 8 },
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
tooltip: {
|
|
24
|
+
sx: { maxWidth: "none" },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChipProps, TooltipProps } from "@mui/material";
|
|
2
|
+
export interface VersionInfo {
|
|
3
|
+
buildDate?: string;
|
|
4
|
+
catalog?: string;
|
|
5
|
+
gitHash?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface VersionInfoProps {
|
|
9
|
+
chipProps?: Partial<ChipProps>;
|
|
10
|
+
tooltipProps?: Partial<TooltipProps>;
|
|
11
|
+
versionInfo?: VersionInfo;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VersionInfo } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns displayable shortened version of Git hash.
|
|
4
|
+
* @param gitHash - Git hash.
|
|
5
|
+
* @returns displayable shortened version of Git hash.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getGitHash(gitHash?: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Returns Chip label based on version info.
|
|
10
|
+
* @param versionInfo - Version info.
|
|
11
|
+
* @returns Chip label.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getLabel(versionInfo?: VersionInfo): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Returns displayable version, or "Unversioned" if version is not provided.
|
|
16
|
+
* @param version - Version info.
|
|
17
|
+
* @returns Version.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getVersion(version?: string): string;
|