-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Fran McDade <franmcdade@Frans-MacBook-Pro.local>
- Loading branch information
Showing
10 changed files
with
185 additions
and
11 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
explorer/app/components/Export/components/AnVILExplorer/ExportMethod/exportMethod.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
import { | ||
ExportMethod as DXExportMethod, | ||
ExportMethodProps, | ||
} from "@databiosphere/findable-ui/lib/components/Export/components/ExportMethod/exportMethod"; | ||
import { useExploreState } from "@databiosphere/findable-ui/lib/hooks/useExploreState"; | ||
import React, { Fragment, useEffect, useState } from "react"; | ||
import { FEATURE_FLAGS } from "../../../../../viewModelBuilders/common/contants"; | ||
|
||
export const ExportMethod = ({ ...props }: ExportMethodProps): JSX.Element => { | ||
const { | ||
exploreState: { featureFlagState }, | ||
} = useExploreState(); | ||
const [showMethod, setShowMethod] = useState<boolean>(false); | ||
|
||
useEffect(() => { | ||
if (featureFlagState) { | ||
setShowMethod(featureFlagState === FEATURE_FLAGS.MANIFEST); | ||
} | ||
}, [featureFlagState]); | ||
|
||
return showMethod ? <DXExportMethod {...props} /> : <Fragment />; | ||
}; |
29 changes: 29 additions & 0 deletions
29
...orer/app/components/Export/components/AnVILExplorer/ManifestDownload/manifestDownload.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Alert } from "@databiosphere/findable-ui/lib/components/common/Alert/alert"; | ||
import { | ||
ManifestDownload as DXManifestDownload, | ||
ManifestDownloadProps, | ||
} from "@databiosphere/findable-ui/lib/components/Export/components/ManifestDownload/manifestDownload"; | ||
import { useExploreState } from "@databiosphere/findable-ui/lib/hooks/useExploreState"; | ||
import { useEffect, useState } from "react"; | ||
import { FEATURE_FLAGS } from "../../../../../viewModelBuilders/common/contants"; | ||
|
||
export const ManifestDownload = ({ | ||
...props | ||
}: ManifestDownloadProps): JSX.Element => { | ||
const { | ||
exploreState: { featureFlagState }, | ||
} = useExploreState(); | ||
const [showExport, setShowExport] = useState<boolean>(false); | ||
|
||
useEffect(() => { | ||
if (featureFlagState) { | ||
setShowExport(featureFlagState === FEATURE_FLAGS.MANIFEST); | ||
} | ||
}, [featureFlagState]); | ||
|
||
return showExport ? ( | ||
<DXManifestDownload {...props} /> | ||
) : ( | ||
<Alert severity="error" title="Not Available" /> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
explorer/app/components/common/MDXContent/anvil-cmg/manifestDownloadStart.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Confirm Organism Type and Manifest File Formats | ||
|
||
Please explicitly select at least one organism type and file format for inclusion in the manifest. |
3 changes: 3 additions & 0 deletions
3
explorer/app/components/common/MDXContent/anvil-cmg/manifestDownloadSuccess.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Your File Manifest is Ready | ||
|
||
This link expires in 7 days. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export const ROUTE_EXPORT_TO_TERRA = "/export/export-to-terra"; | ||
export const ROUTE_MANIFEST_DOWNLOAD = "/export/download-manifest"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters