@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
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
import { AlertProps
|
|
2
|
-
import React
|
|
1
|
+
import { AlertProps, Fade } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { useSystemStatus } from "../../../../../hooks/useSystemStatus";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export interface SystemIndexingProps extends Omit<MAlertProps, "title"> {
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
title?: ReactNode;
|
|
10
|
-
}
|
|
4
|
+
import { BaseComponentProps, ContentProps } from "../../../../types";
|
|
5
|
+
import { Banner } from "../../banner";
|
|
11
6
|
|
|
12
7
|
export const SystemIndexing = ({
|
|
13
8
|
children,
|
|
14
9
|
className,
|
|
15
|
-
|
|
10
|
+
content,
|
|
16
11
|
...props
|
|
17
|
-
}:
|
|
12
|
+
}: AlertProps & BaseComponentProps & ContentProps): JSX.Element => {
|
|
18
13
|
const systemStatus = useSystemStatus();
|
|
19
14
|
const { indexing, loading, ok } = systemStatus;
|
|
20
|
-
const showAlert = !loading && ok && indexing;
|
|
21
15
|
return (
|
|
22
|
-
<
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{children}
|
|
28
|
-
</Fragment>
|
|
29
|
-
</BannerPrimary>
|
|
30
|
-
)}
|
|
31
|
-
</Fragment>
|
|
16
|
+
<Fade in={!loading && ok && indexing} unmountOnExit>
|
|
17
|
+
<Banner className={className} {...props}>
|
|
18
|
+
{content || children}
|
|
19
|
+
</Banner>
|
|
20
|
+
</Fade>
|
|
32
21
|
);
|
|
33
22
|
};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
import { AlertProps
|
|
2
|
-
import React
|
|
1
|
+
import { AlertProps, Fade } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { useSystemStatus } from "../../../../../hooks/useSystemStatus";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export interface SystemStatusProps extends Omit<MAlertProps, "title"> {
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
title?: ReactNode;
|
|
10
|
-
}
|
|
4
|
+
import { BaseComponentProps, ContentProps } from "../../../../types";
|
|
5
|
+
import { Banner } from "../../banner";
|
|
11
6
|
|
|
12
7
|
export const SystemStatus = ({
|
|
13
8
|
children,
|
|
14
9
|
className,
|
|
15
|
-
|
|
10
|
+
content,
|
|
16
11
|
...props
|
|
17
|
-
}:
|
|
12
|
+
}: AlertProps & BaseComponentProps & ContentProps): JSX.Element => {
|
|
18
13
|
const systemStatus = useSystemStatus();
|
|
19
14
|
const { loading, ok } = systemStatus;
|
|
20
|
-
const showAlert = !loading && !ok;
|
|
21
15
|
return (
|
|
22
|
-
<
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{children}
|
|
28
|
-
</Fragment>
|
|
29
|
-
</BannerPrimary>
|
|
30
|
-
)}
|
|
31
|
-
</Fragment>
|
|
16
|
+
<Fade in={!loading && !ok} unmountOnExit>
|
|
17
|
+
<Banner className={className} {...props}>
|
|
18
|
+
{content || children}
|
|
19
|
+
</Banner>
|
|
20
|
+
</Fade>
|
|
32
21
|
);
|
|
33
22
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AlertProps } from "@mui/material";
|
|
2
|
+
import { COLOR, VARIANT } from "../../../styles/common/mui/alert";
|
|
3
|
+
import { FlatPaper } from "../Paper/paper.styles";
|
|
4
|
+
|
|
5
|
+
export const ALERT_PROPS: Partial<AlertProps> = {
|
|
6
|
+
color: COLOR.PRIMARY,
|
|
7
|
+
component: FlatPaper,
|
|
8
|
+
elevation: 0,
|
|
9
|
+
icon: false,
|
|
10
|
+
variant: VARIANT.FILLED,
|
|
11
|
+
};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import ChevronRightRoundedIcon from "@mui/icons-material/ChevronRightRounded";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Breadcrumbs as MBreadcrumbs,
|
|
5
|
-
Typography,
|
|
6
|
-
} from "@mui/material";
|
|
7
|
-
import Link from "next/link";
|
|
2
|
+
import { Link, Breadcrumbs as MBreadcrumbs, Typography } from "@mui/material";
|
|
3
|
+
import NLink from "next/link";
|
|
8
4
|
import React, { ReactNode } from "react";
|
|
5
|
+
import { BaseComponentProps } from "../../types";
|
|
9
6
|
|
|
10
7
|
export interface Breadcrumb {
|
|
11
8
|
path: string;
|
|
12
9
|
text: ReactNode;
|
|
13
10
|
}
|
|
14
11
|
|
|
15
|
-
export interface BreadcrumbsProps {
|
|
12
|
+
export interface BreadcrumbsProps extends BaseComponentProps {
|
|
16
13
|
breadcrumbs: Breadcrumb[];
|
|
17
|
-
className?: string;
|
|
18
14
|
Separator?: ReactNode;
|
|
19
15
|
}
|
|
20
16
|
|
|
@@ -29,8 +25,8 @@ export const Breadcrumbs = ({
|
|
|
29
25
|
<MBreadcrumbs className={className} separator={Separator}>
|
|
30
26
|
{breadcrumbs.map(({ path, text }, b) =>
|
|
31
27
|
path ? (
|
|
32
|
-
<Link
|
|
33
|
-
|
|
28
|
+
<Link component={NLink} key={b} href={path}>
|
|
29
|
+
{text}
|
|
34
30
|
</Link>
|
|
35
31
|
) : (
|
|
36
32
|
<Typography key={`${path}${b}`} maxWidth={180} noWrap>
|
|
@@ -7,11 +7,13 @@ import { Paper } from "./paper";
|
|
|
7
7
|
* e.g. the entire width of mobile viewports.
|
|
8
8
|
*/
|
|
9
9
|
export const FlatPaper = styled(Paper)`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
& {
|
|
11
|
+
align-self: stretch;
|
|
12
|
+
border-left: none;
|
|
13
|
+
border-radius: 0;
|
|
14
|
+
border-right: none;
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
}
|
|
15
17
|
`;
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -19,8 +21,10 @@ export const FlatPaper = styled(Paper)`
|
|
|
19
21
|
* To use RoundedPaper, wrap the styled paper around a single child element e.g. "Section" or "Sections" component. TODO
|
|
20
22
|
*/
|
|
21
23
|
export const RoundedPaper = styled(Paper)`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
& {
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
}
|
|
24
28
|
`;
|
|
25
29
|
|
|
26
30
|
/* eslint-disable valid-jsdoc -- disable require param */
|
|
@@ -30,11 +34,13 @@ export const RoundedPaper = styled(Paper)`
|
|
|
30
34
|
*/
|
|
31
35
|
/* eslint-enable valid-jsdoc -- disable require param */
|
|
32
36
|
export const FluidPaper = styled(RoundedPaper)`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
& {
|
|
38
|
+
${({ theme }) => theme.breakpoints.down(TABLET)} {
|
|
39
|
+
border-left: none;
|
|
40
|
+
border-radius: 0;
|
|
41
|
+
border-right: none;
|
|
42
|
+
box-shadow: none;
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
`;
|
|
40
46
|
|
package/src/config/entities.ts
CHANGED
|
@@ -360,6 +360,7 @@ export interface SiteConfig {
|
|
|
360
360
|
explorerTitle: HeroTitle;
|
|
361
361
|
export?: ExportConfig;
|
|
362
362
|
exportToTerraUrl?: string; // TODO(cc) revist location; possibly nest inside "export"?
|
|
363
|
+
gitHubUrl?: string;
|
|
363
364
|
layout: {
|
|
364
365
|
floating?: FloatingConfig;
|
|
365
366
|
footer: FooterProps;
|
|
@@ -20,13 +20,12 @@ export interface FileManifestRequestURL {
|
|
|
20
20
|
*/
|
|
21
21
|
export const buildFileManifestRequestURL = (
|
|
22
22
|
url: string,
|
|
23
|
-
filters: Filters,
|
|
23
|
+
filters: Filters | undefined,
|
|
24
24
|
catalog: string,
|
|
25
25
|
manifestFormat: ManifestDownloadFormat | undefined
|
|
26
26
|
): FileManifestRequestURL | undefined => {
|
|
27
|
-
if (!manifestFormat)
|
|
28
|
-
|
|
29
|
-
}
|
|
27
|
+
if (!manifestFormat) return;
|
|
28
|
+
if (!filters) return;
|
|
30
29
|
|
|
31
30
|
// Build request params.
|
|
32
31
|
const requestParams = new URLSearchParams({
|
|
@@ -37,21 +37,20 @@ export interface FileFacet {
|
|
|
37
37
|
export enum FILE_MANIFEST_TYPE {
|
|
38
38
|
BULK_DOWNLOAD = "BULK_DOWNLOAD",
|
|
39
39
|
DOWNLOAD_MANIFEST = "DOWNLOAD_MANIFEST",
|
|
40
|
-
ENITY_EXPORT_TO_TERRA = "ENITY_EXPORT_TO_TERRA",
|
|
41
40
|
ENTITY_BULK_DOWNLOAD = "ENTITY_BULK_DOWNLOAD",
|
|
42
41
|
ENTITY_DOWNLOAD_MANIFEST = "ENTITY_DOWNLOAD_MANIFEST",
|
|
42
|
+
ENTITY_EXPORT_TO_TERRA = "ENTITY_EXPORT_TO_TERRA",
|
|
43
43
|
EXPORT_TO_TERRA = "EXPORT_TO_TERRA",
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export type FileManifestType = FILE_MANIFEST_TYPE;
|
|
47
47
|
|
|
48
|
-
export enum
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
export enum FILES_FACETS_STATUS {
|
|
49
|
+
COMPLETED = "COMPLETED",
|
|
50
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
51
|
+
NOT_STARTED = "NOT_STARTED",
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
export type FileManifestStateStatus = FILE_MANIFEST_STATE_STATUS;
|
|
54
|
-
|
|
55
54
|
export type SelectedSearchTermsBySearchKey = Map<
|
|
56
55
|
CategoryKey,
|
|
57
56
|
Set<CategoryValueKey>
|
|
@@ -3,14 +3,17 @@ import { ManifestDownloadFormat } from "../../apis/azul/common/entities";
|
|
|
3
3
|
import { Filters } from "../../common/entities";
|
|
4
4
|
import { FileManifestActionKind } from "../../providers/fileManifestState";
|
|
5
5
|
import { useFileManifestState } from "../useFileManifestState";
|
|
6
|
+
import { FileManifestType } from "./common/entities";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Initializes and fetches file manifest comprising file facets and summary for the given file manifest format.
|
|
10
|
+
* @param fileManifestType - File manifest type.
|
|
9
11
|
* @param fileManifestFormat - File manifest format.
|
|
10
12
|
* @param initialFilters - Filters to initialize file manifest request.
|
|
11
13
|
* @param fileSummaryFacetName - File summary facet name.
|
|
12
14
|
*/
|
|
13
15
|
export const useRequestFileManifest = (
|
|
16
|
+
fileManifestType: FileManifestType | undefined,
|
|
14
17
|
fileManifestFormat: ManifestDownloadFormat | undefined,
|
|
15
18
|
initialFilters: Filters | undefined = [],
|
|
16
19
|
fileSummaryFacetName?: string
|
|
@@ -26,6 +29,7 @@ export const useRequestFileManifest = (
|
|
|
26
29
|
fileManifestDispatch({
|
|
27
30
|
payload: {
|
|
28
31
|
fileManifestFormat,
|
|
32
|
+
fileManifestType,
|
|
29
33
|
fileSummaryFacetName,
|
|
30
34
|
filters: initFilters,
|
|
31
35
|
},
|
|
@@ -40,6 +44,7 @@ export const useRequestFileManifest = (
|
|
|
40
44
|
}, [
|
|
41
45
|
fileManifestDispatch,
|
|
42
46
|
fileManifestFormat,
|
|
47
|
+
fileManifestType,
|
|
43
48
|
fileSummaryFacetName,
|
|
44
49
|
initFilters,
|
|
45
50
|
]);
|
|
@@ -6,8 +6,8 @@ import { getLocalStorage } from "./common/utils";
|
|
|
6
6
|
* @param key - Local storage key.
|
|
7
7
|
* @returns local storage value.
|
|
8
8
|
*/
|
|
9
|
-
export function useLocalStorage(key: string): string | null {
|
|
10
|
-
const [value, setValue] = useState<string | null>(
|
|
9
|
+
export function useLocalStorage(key: string): string | null | undefined {
|
|
10
|
+
const [value, setValue] = useState<string | null>();
|
|
11
11
|
|
|
12
12
|
useEffect(() => {
|
|
13
13
|
setValue(getLocalStorage(key));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { buildFileManifestRequestURL } from "../../hooks/useFileManifest/common/buildFileManifestRequestURL";
|
|
2
|
+
import {
|
|
3
|
+
FileManifestContext,
|
|
4
|
+
FileManifestState,
|
|
5
|
+
UpdateFileManifestPayload,
|
|
6
|
+
} from "../fileManifestState";
|
|
7
|
+
import { getRequestFilters, updateFilesFacetsStatus } from "./utils";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Update file manifest action.
|
|
11
|
+
* @param state - State.
|
|
12
|
+
* @param payload - Payload.
|
|
13
|
+
* @param context - Context.
|
|
14
|
+
* @returns state.
|
|
15
|
+
*/
|
|
16
|
+
export function updateFileManifestAction(
|
|
17
|
+
state: FileManifestState,
|
|
18
|
+
payload: UpdateFileManifestPayload,
|
|
19
|
+
context: FileManifestContext
|
|
20
|
+
): FileManifestState {
|
|
21
|
+
const { catalog, URL } = context;
|
|
22
|
+
const filesFacetsStatus = updateFilesFacetsStatus(state, payload);
|
|
23
|
+
const nextState = { ...state, ...payload, filesFacetsStatus };
|
|
24
|
+
const fileManifestRequest = buildFileManifestRequestURL(
|
|
25
|
+
URL,
|
|
26
|
+
getRequestFilters(nextState),
|
|
27
|
+
catalog,
|
|
28
|
+
nextState.fileManifestFormat
|
|
29
|
+
);
|
|
30
|
+
return {
|
|
31
|
+
...nextState,
|
|
32
|
+
...fileManifestRequest,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FILE_MANIFEST_TYPE,
|
|
3
|
+
FILES_FACETS_STATUS,
|
|
4
|
+
} from "../../hooks/useFileManifest/common/entities";
|
|
5
|
+
import { FileManifestState } from "../fileManifestState";
|
|
6
|
+
|
|
7
|
+
export const ENTITIES_FILE_MANIFEST_TYPES: FILE_MANIFEST_TYPE[] = [
|
|
8
|
+
FILE_MANIFEST_TYPE.BULK_DOWNLOAD,
|
|
9
|
+
FILE_MANIFEST_TYPE.DOWNLOAD_MANIFEST,
|
|
10
|
+
FILE_MANIFEST_TYPE.EXPORT_TO_TERRA,
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const FILE_MANIFEST_STATE: FileManifestState = {
|
|
14
|
+
fileManifestFormat: undefined,
|
|
15
|
+
fileManifestType: undefined,
|
|
16
|
+
fileSummary: undefined,
|
|
17
|
+
fileSummaryFacetName: undefined,
|
|
18
|
+
fileSummaryFilters: [],
|
|
19
|
+
filesFacets: [],
|
|
20
|
+
filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
|
|
21
|
+
filters: [],
|
|
22
|
+
isEnabled: false,
|
|
23
|
+
isFacetsLoading: false,
|
|
24
|
+
isFacetsSuccess: false,
|
|
25
|
+
isFileSummaryLoading: false,
|
|
26
|
+
isLoading: false,
|
|
27
|
+
isSummaryLoading: false,
|
|
28
|
+
requestParams: undefined,
|
|
29
|
+
requestURL: undefined,
|
|
30
|
+
summary: undefined,
|
|
31
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Filters } from "../../common/entities";
|
|
2
|
+
import {
|
|
3
|
+
FileFacet,
|
|
4
|
+
FILES_FACETS_STATUS,
|
|
5
|
+
} from "../../hooks/useFileManifest/common/entities";
|
|
6
|
+
import { findFacet } from "../../hooks/useFileManifest/common/utils";
|
|
7
|
+
import {
|
|
8
|
+
FileManifestState,
|
|
9
|
+
UpdateFileManifestPayload,
|
|
10
|
+
} from "../fileManifestState";
|
|
11
|
+
import { ENTITIES_FILE_MANIFEST_TYPES } from "./constants";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generates the filters for a request URL based on the file manifest state.
|
|
15
|
+
* If all terms in a facet are selected, the corresponding facet is excluded.
|
|
16
|
+
* @param state - File manifest state.
|
|
17
|
+
* @returns filters for the request URL.
|
|
18
|
+
*/
|
|
19
|
+
export function getRequestFilters(
|
|
20
|
+
state: FileManifestState
|
|
21
|
+
): Filters | undefined {
|
|
22
|
+
if (state.filesFacetsStatus !== FILES_FACETS_STATUS.COMPLETED) return;
|
|
23
|
+
// Determine if the filters are user-selected.
|
|
24
|
+
if (isFiltersUserSelected(state)) {
|
|
25
|
+
return state.filters;
|
|
26
|
+
}
|
|
27
|
+
for (const filter of state.filters) {
|
|
28
|
+
const facet = findFacet(state.filesFacets, filter.categoryKey);
|
|
29
|
+
if (!facet) return [filter]; // The entity identifier related filter will not have a corresponding term facet.
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns true if filter values for each selected facet are partially selected.
|
|
35
|
+
* @param filters - Selected filters.
|
|
36
|
+
* @param filesFacets - Files facets.
|
|
37
|
+
* @returns true if the filters are partially selected.
|
|
38
|
+
*/
|
|
39
|
+
function isFiltersPartiallySelected(
|
|
40
|
+
filters: Filters,
|
|
41
|
+
filesFacets: FileFacet[]
|
|
42
|
+
): boolean {
|
|
43
|
+
for (const { categoryKey, value } of filters) {
|
|
44
|
+
const facet = findFacet(filesFacets, categoryKey);
|
|
45
|
+
if (!facet) continue; // Continue; the entity identifier related filter will not have a corresponding term facet.
|
|
46
|
+
if (value.length < facet.termCount) return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the filters are user-selected, when:
|
|
53
|
+
* - The file manifest type is not set.
|
|
54
|
+
* - The file manifest type is an entity list related type.
|
|
55
|
+
* - Filter values for each selected facet are partially selected.
|
|
56
|
+
* @param state - File manifest state.
|
|
57
|
+
* @returns true if the filters are user-selected.
|
|
58
|
+
*/
|
|
59
|
+
export function isFiltersUserSelected(state: FileManifestState): boolean {
|
|
60
|
+
if (!state.fileManifestType) return true;
|
|
61
|
+
if (ENTITIES_FILE_MANIFEST_TYPES.includes(state.fileManifestType))
|
|
62
|
+
return true;
|
|
63
|
+
return isFiltersPartiallySelected(state.filters, state.filesFacets);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Transitions the files facets' status.
|
|
68
|
+
* @param shouldTransition - True if transitioning, false otherwise.
|
|
69
|
+
* @param nextStatus - Next files facets' status.
|
|
70
|
+
* @param currentStatus - Current files facets' status.
|
|
71
|
+
* @returns files facets' status.
|
|
72
|
+
*/
|
|
73
|
+
export function transitionFilesFacetsStatus(
|
|
74
|
+
shouldTransition: boolean,
|
|
75
|
+
nextStatus: FILES_FACETS_STATUS,
|
|
76
|
+
currentStatus: FILES_FACETS_STATUS
|
|
77
|
+
): FILES_FACETS_STATUS {
|
|
78
|
+
return shouldTransition ? nextStatus : currentStatus;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Returns the updated files facets' status.
|
|
83
|
+
* @param state - File manifest state.
|
|
84
|
+
* @param payload - Update file manifest payload.
|
|
85
|
+
* @returns files facets' status.
|
|
86
|
+
*/
|
|
87
|
+
export function updateFilesFacetsStatus(
|
|
88
|
+
state: FileManifestState,
|
|
89
|
+
payload: UpdateFileManifestPayload
|
|
90
|
+
): FILES_FACETS_STATUS {
|
|
91
|
+
if (state.filesFacetsStatus === FILES_FACETS_STATUS.NOT_STARTED) {
|
|
92
|
+
// If the current status is NOT_STARTED, transition to IN_PROGRESS if facets are loading.
|
|
93
|
+
return transitionFilesFacetsStatus(
|
|
94
|
+
payload.isFacetsLoading,
|
|
95
|
+
FILES_FACETS_STATUS.IN_PROGRESS,
|
|
96
|
+
FILES_FACETS_STATUS.NOT_STARTED
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
if (state.filesFacetsStatus === FILES_FACETS_STATUS.IN_PROGRESS) {
|
|
100
|
+
// If the current status is IN_PROGRESS, transition to COMPLETED if facets are successfully loaded.
|
|
101
|
+
return transitionFilesFacetsStatus(
|
|
102
|
+
payload.isFacetsSuccess,
|
|
103
|
+
FILES_FACETS_STATUS.COMPLETED,
|
|
104
|
+
FILES_FACETS_STATUS.IN_PROGRESS
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return FILES_FACETS_STATUS.COMPLETED;
|
|
108
|
+
}
|
|
@@ -19,36 +19,26 @@ import {
|
|
|
19
19
|
import { useCatalog } from "../hooks/useCatalog";
|
|
20
20
|
import { buildNextFilterState } from "../hooks/useCategoryFilter";
|
|
21
21
|
import { buildFileManifestRequestURL } from "../hooks/useFileManifest/common/buildFileManifestRequestURL";
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
FileFacet,
|
|
24
|
+
FileManifestType,
|
|
25
|
+
FILES_FACETS_STATUS,
|
|
26
|
+
} from "../hooks/useFileManifest/common/entities";
|
|
23
27
|
import { useFetchFilesFacets } from "../hooks/useFileManifest/useFetchFilesFacets";
|
|
24
28
|
import { useFetchSummary } from "../hooks/useFileManifest/useFetchSummary";
|
|
25
29
|
import { useFileManifestURL } from "../hooks/useFileManifest/useFileManifestURL";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fileManifestFormat: undefined,
|
|
30
|
-
fileSummary: undefined,
|
|
31
|
-
fileSummaryFacetName: undefined,
|
|
32
|
-
fileSummaryFilters: [],
|
|
33
|
-
filesFacets: [],
|
|
34
|
-
filters: [],
|
|
35
|
-
isEnabled: false,
|
|
36
|
-
isFacetsLoading: false,
|
|
37
|
-
isFacetsSuccess: false,
|
|
38
|
-
isFileSummaryLoading: false,
|
|
39
|
-
isLoading: false,
|
|
40
|
-
isSummaryLoading: false,
|
|
41
|
-
requestParams: undefined,
|
|
42
|
-
requestURL: undefined,
|
|
43
|
-
summary: undefined,
|
|
44
|
-
};
|
|
30
|
+
import { updateFileManifestAction } from "./fileManifestState/actions";
|
|
31
|
+
import { FILE_MANIFEST_STATE } from "./fileManifestState/constants";
|
|
32
|
+
import { getRequestFilters } from "./fileManifestState/utils";
|
|
45
33
|
|
|
46
34
|
/**
|
|
47
35
|
* File manifest state.
|
|
48
36
|
*/
|
|
49
37
|
export type FileManifestState = {
|
|
50
38
|
fileManifestFormat?: ManifestDownloadFormat;
|
|
39
|
+
fileManifestType?: FileManifestType;
|
|
51
40
|
filesFacets: FileFacet[];
|
|
41
|
+
filesFacetsStatus: FILES_FACETS_STATUS;
|
|
52
42
|
fileSummary?: AzulSummaryResponse;
|
|
53
43
|
fileSummaryFacetName?: string;
|
|
54
44
|
fileSummaryFilters: Filters;
|
|
@@ -76,7 +66,7 @@ export const FileManifestStateContext =
|
|
|
76
66
|
createContext<FileManifestStateContextProps>({
|
|
77
67
|
// eslint-disable-next-line @typescript-eslint/no-empty-function -- allow dummy function for default state.
|
|
78
68
|
fileManifestDispatch: () => {},
|
|
79
|
-
fileManifestState:
|
|
69
|
+
fileManifestState: FILE_MANIFEST_STATE,
|
|
80
70
|
});
|
|
81
71
|
|
|
82
72
|
export interface FileManifestStateProps {
|
|
@@ -96,7 +86,7 @@ export function FileManifestStateProvider({
|
|
|
96
86
|
const [fileManifestState, fileManifestDispatch] = useReducer(
|
|
97
87
|
(s: FileManifestState, a: FileManifestAction) =>
|
|
98
88
|
fileManifestReducer(s, a, { URL, catalog }),
|
|
99
|
-
|
|
89
|
+
FILE_MANIFEST_STATE
|
|
100
90
|
);
|
|
101
91
|
|
|
102
92
|
const { fileSummaryFacetName, fileSummaryFilters, filters, isEnabled } =
|
|
@@ -233,6 +223,7 @@ type UpdateFiltersCategoryAction = {
|
|
|
233
223
|
*/
|
|
234
224
|
type FetchFileManifestPayload = {
|
|
235
225
|
fileManifestFormat?: ManifestDownloadFormat;
|
|
226
|
+
fileManifestType?: FileManifestType;
|
|
236
227
|
fileSummaryFacetName?: string;
|
|
237
228
|
filters: Filters;
|
|
238
229
|
};
|
|
@@ -240,7 +231,7 @@ type FetchFileManifestPayload = {
|
|
|
240
231
|
/**
|
|
241
232
|
* Update file manifest payload.
|
|
242
233
|
*/
|
|
243
|
-
type UpdateFileManifestPayload = {
|
|
234
|
+
export type UpdateFileManifestPayload = {
|
|
244
235
|
filesFacets: FileFacet[];
|
|
245
236
|
fileSummary?: AzulSummaryResponse;
|
|
246
237
|
isFacetsLoading: boolean;
|
|
@@ -288,6 +279,7 @@ function fileManifestReducer(
|
|
|
288
279
|
return {
|
|
289
280
|
...state,
|
|
290
281
|
fileManifestFormat: undefined,
|
|
282
|
+
filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
|
|
291
283
|
isEnabled: false,
|
|
292
284
|
requestParams: undefined,
|
|
293
285
|
requestURL: undefined,
|
|
@@ -300,35 +292,29 @@ function fileManifestReducer(
|
|
|
300
292
|
payload.filters,
|
|
301
293
|
payload.fileSummaryFacetName
|
|
302
294
|
);
|
|
303
|
-
// Build request params and request URL.
|
|
304
|
-
const { requestParams, requestURL } =
|
|
305
|
-
buildFileManifestRequestURL(
|
|
306
|
-
URL,
|
|
307
|
-
payload.filters,
|
|
308
|
-
catalog,
|
|
309
|
-
payload.fileManifestFormat
|
|
310
|
-
) || {};
|
|
311
295
|
return {
|
|
312
296
|
...state,
|
|
313
297
|
...payload,
|
|
314
298
|
fileSummaryFilters,
|
|
315
299
|
isEnabled: true,
|
|
316
|
-
requestParams,
|
|
317
|
-
requestURL,
|
|
300
|
+
requestParams: undefined,
|
|
301
|
+
requestURL: undefined,
|
|
318
302
|
};
|
|
319
303
|
}
|
|
320
304
|
// Updates file manifest.
|
|
321
305
|
case FileManifestActionKind.UpdateFileManifest: {
|
|
322
|
-
return
|
|
323
|
-
...state,
|
|
324
|
-
...payload,
|
|
325
|
-
};
|
|
306
|
+
return updateFileManifestAction(state, payload, fileManifestContext);
|
|
326
307
|
}
|
|
327
308
|
// Updates file manifest format.
|
|
328
309
|
case FileManifestActionKind.UpdateFileManifestFormat: {
|
|
329
310
|
// Build request params and request URL.
|
|
330
311
|
const { requestParams, requestURL } =
|
|
331
|
-
buildFileManifestRequestURL(
|
|
312
|
+
buildFileManifestRequestURL(
|
|
313
|
+
URL,
|
|
314
|
+
getRequestFilters(state),
|
|
315
|
+
catalog,
|
|
316
|
+
payload
|
|
317
|
+
) || {};
|
|
332
318
|
return {
|
|
333
319
|
...state,
|
|
334
320
|
fileManifestFormat: payload,
|
|
@@ -350,20 +336,13 @@ function fileManifestReducer(
|
|
|
350
336
|
filters,
|
|
351
337
|
state.fileSummaryFacetName
|
|
352
338
|
);
|
|
353
|
-
// Build request params and request URL.
|
|
354
|
-
const { requestParams, requestURL } =
|
|
355
|
-
buildFileManifestRequestURL(
|
|
356
|
-
URL,
|
|
357
|
-
filters,
|
|
358
|
-
catalog,
|
|
359
|
-
state.fileManifestFormat
|
|
360
|
-
) || {};
|
|
361
339
|
return {
|
|
362
340
|
...state,
|
|
363
341
|
fileSummaryFilters,
|
|
342
|
+
filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
|
|
364
343
|
filters,
|
|
365
|
-
requestParams,
|
|
366
|
-
requestURL,
|
|
344
|
+
requestParams: undefined,
|
|
345
|
+
requestURL: undefined,
|
|
367
346
|
};
|
|
368
347
|
}
|
|
369
348
|
// Updates selected file manifest filters by category.
|
|
@@ -379,20 +358,13 @@ function fileManifestReducer(
|
|
|
379
358
|
filters,
|
|
380
359
|
state.fileSummaryFacetName
|
|
381
360
|
);
|
|
382
|
-
// Build request params and request URL.
|
|
383
|
-
const { requestParams, requestURL } =
|
|
384
|
-
buildFileManifestRequestURL(
|
|
385
|
-
URL,
|
|
386
|
-
filters,
|
|
387
|
-
catalog,
|
|
388
|
-
state.fileManifestFormat
|
|
389
|
-
) || {};
|
|
390
361
|
return {
|
|
391
362
|
...state,
|
|
392
363
|
fileSummaryFilters,
|
|
364
|
+
filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
|
|
393
365
|
filters,
|
|
394
|
-
requestParams,
|
|
395
|
-
requestURL,
|
|
366
|
+
requestParams: undefined,
|
|
367
|
+
requestURL: undefined,
|
|
396
368
|
};
|
|
397
369
|
}
|
|
398
370
|
default:
|