-
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.
feat: add request file manifest to anvil explorer dataset page (#4093) (
#4094) * feat: add request file manifest to anvil explorer dataset page (#4093) * feat: added alert to download manifest (#4093) --------- Co-authored-by: Fran McDade <franmcdade@Frans-MacBook-Pro.local>
- Loading branch information
Showing
6 changed files
with
110 additions
and
32 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
.../components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.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,19 @@ | ||
import { MANIFEST_DOWNLOAD_FORMAT } from "@databiosphere/findable-ui/lib/apis/azul/common/entities"; | ||
import { FileManifestDownload } from "@databiosphere/findable-ui/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload"; | ||
import { ManifestDownloadEntityProps } from "@databiosphere/findable-ui/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity"; | ||
import { useRequestFileManifest } from "@databiosphere/findable-ui/lib/hooks/useFileManifest/useRequestFileManifest"; | ||
import React from "react"; | ||
|
||
export const ManifestDownloadEntity = ({ | ||
filters, | ||
}: Omit< | ||
ManifestDownloadEntityProps, | ||
"fileManifestType" | "metadataFilters" | ||
>): JSX.Element => { | ||
useRequestFileManifest(MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, undefined); | ||
return ( | ||
<> | ||
<FileManifestDownload filters={filters} /> | ||
</> | ||
); | ||
}; |
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
46 changes: 46 additions & 0 deletions
46
explorer/site-config/anvil-cmg/dev/detail/dataset/metadataMainColumn.ts
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,46 @@ | ||
import { ComponentConfig } from "@databiosphere/findable-ui/lib/config/entities"; | ||
import { DatasetsResponse } from "../../../../../app/apis/azul/anvil-cmg/common/responses"; | ||
import * as C from "../../../../../app/components"; | ||
import * as V from "../../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders"; | ||
import { sideColumn } from "../../export/exportSideColumn"; | ||
|
||
export const mainColumn: ComponentConfig[] = [ | ||
{ | ||
/* Dataset is not accessible; render warning */ | ||
children: [ | ||
{ | ||
children: [ | ||
{ | ||
component: C.FluidAlert, | ||
viewBuilder: V.buildManifestDownloadEntityWarning, | ||
} as ComponentConfig<typeof C.FluidAlert, DatasetsResponse>, | ||
], | ||
component: C.BackPageContentSingleColumn, | ||
} as ComponentConfig<typeof C.BackPageContentSingleColumn>, | ||
], | ||
component: C.ConditionalComponent, | ||
viewBuilder: V.renderExportEntityWarning, | ||
} as ComponentConfig<typeof C.ConditionalComponent, DatasetsResponse>, | ||
{ | ||
/* Dataset is accessible; render export entity */ | ||
children: [ | ||
/* mainColumn */ | ||
{ | ||
children: [ | ||
{ | ||
component: C.AnVILManifestDownloadEntity, | ||
viewBuilder: V.buildManifestDownloadEntity, | ||
} as ComponentConfig< | ||
typeof C.AnVILManifestDownloadEntity, | ||
DatasetsResponse | ||
>, | ||
], | ||
component: C.BackPageContentMainColumn, | ||
} as ComponentConfig<typeof C.BackPageContentMainColumn>, | ||
/* sideColumn */ | ||
...sideColumn, | ||
], | ||
component: C.ConditionalComponent, | ||
viewBuilder: V.renderExportEntity, | ||
} as ComponentConfig<typeof C.ConditionalComponent, DatasetsResponse>, | ||
]; |
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