@databiosphere/findable-ui 51.0.0 → 51.0.1
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/lib/common/chart/sort/utils.d.ts +1 -1
- package/lib/components/ComponentCreator/ComponentCreator.js +1 -1
- package/lib/components/ComponentCreator/components/RenderComponent/renderComponent.d.ts +1 -1
- package/lib/components/ErrorBoundary/errorBoundary.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandForm/downloadCurlCommandForm.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandNotStarted/downloadCurlCommandNotStarted.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandReady/downloadCurlCommandReady.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/components/ExportButton/exportButton.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/components/ExportExecutionEnvironmentForm/exportExecutionEnvironmentForm.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/exportForm.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraNotStarted/exportToTerraNotStarted.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraReady/exportToTerraReady.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraReady/exportToTerraReady.js +2 -2
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.js +1 -1
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.js +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadNotStarted/manifestDownloadNotStarted.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadReady/manifestDownloadReady.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
- package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.d.ts +1 -1
- package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/types.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/search.d.ts +1 -1
- package/lib/components/MarkdownRenderer/components/Anchor/anchor.d.ts +1 -1
- package/lib/components/MarkdownRenderer/components/Table/table.d.ts +1 -1
- package/lib/components/MarkdownRenderer/markdownRenderer.js +2 -2
- package/lib/components/MarkdownRenderer/types.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.d.ts +1 -1
- package/lib/components/common/Button/components/CallToActionButton/callToActionButton.d.ts +1 -1
- package/lib/components/common/Chip/components/Beta/beta.styles.js +1 -1
- package/lib/components/common/IconBadge/iconBadge.d.ts +1 -1
- package/lib/components/common/IconButton/iconButton.d.ts +1 -1
- package/lib/components/common/Input/input.d.ts +1 -1
- package/lib/components/common/KeyValuePairs/keyValuePairs.d.ts +1 -1
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.d.ts +1 -1
- package/lib/components/common/Stack/components/Divider/divider.d.ts +1 -1
- package/lib/components/common/StatusIcon/statusIcon.d.ts +1 -1
- package/lib/config/entities.d.ts +4 -4
- package/lib/hooks/useEntityList.js +10 -0
- package/lib/providers/exploreState.js +1 -10
- package/lib/providers/loginGuard/provider.js +1 -1
- package/lib/utils/mdx/plugins/rehypeSlug.d.ts +1 -1
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.js +2 -3
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.styles.js +1 -1
- package/lib/views/ExploreView/exploreView.js +2 -2
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.js +2 -2
- package/lib/views/ResearchView/assistant/components/Input/input.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Input/stories/input.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/messages.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/messages.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/stories/args.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/stories/messages.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/stories/toggleButtonGroup.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.js +2 -2
- package/lib/views/ResearchView/assistant/stories/assistant.stories.js +1 -1
- package/lib/views/ResearchView/state/query/hooks/UseSubmit/hook.js +2 -2
- package/package.json +1 -1
- package/types/data-explorer-ui.d.ts +12 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from "react";
|
|
3
|
+
import { useAuth } from "../../auth/hooks/useAuth";
|
|
3
4
|
import { useConfig } from "../../hooks/useConfig";
|
|
4
5
|
import { useExploreState } from "../../hooks/useExploreState";
|
|
5
6
|
import { useFileManifestState } from "../../hooks/useFileManifestState";
|
|
6
7
|
import { useSystemStatus } from "../../hooks/useSystemStatus";
|
|
7
|
-
import { useAuth } from "../../auth/hooks/useAuth";
|
|
8
8
|
/**
|
|
9
9
|
* ComponentCreator uses React API to create components based on the component configs, instead of using JSX.
|
|
10
10
|
* That way we can continue to create UI components without having to worry about if they should be able to transform model data into props.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dispatch, JSX, SetStateAction } from "react";
|
|
2
2
|
import { ExecutionEnvironment, FormFacet } from "../../../../common/entities";
|
|
3
3
|
import { OnRequestManifestFn } from "../../../ExportForm/exportForm";
|
|
4
4
|
export interface DownloadCurlCommandFormProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dispatch, ElementType, JSX, SetStateAction } from "react";
|
|
2
2
|
import { FileManifestState } from "../../../../../../providers/fileManifestState";
|
|
3
3
|
import { ExecutionEnvironment, FormFacet } from "../../../../common/entities";
|
|
4
4
|
export interface DownloadCurlCommandNotStartedProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, JSX } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
4
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dispatch, JSX, SetStateAction } from "react";
|
|
2
2
|
import { ExecutionEnvironment } from "../../../../common/entities";
|
|
3
3
|
export interface ExportExecutionEnvironmentFormProps {
|
|
4
4
|
executionEnvironment: ExecutionEnvironment;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dispatch, JSX, SetStateAction } from "react";
|
|
2
2
|
import { FileManifestFormatState } from "../../../../../../hooks/useFileManifest/useFileManifestFormat";
|
|
3
3
|
import { FormFacet, ManifestDownloadFormat } from "../../../../common/entities";
|
|
4
4
|
import { OnRequestManifestFn } from "../../../ExportForm/exportForm";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, JSX } from "react";
|
|
2
2
|
import { FileManifestFormatState } from "../../../../../../hooks/useFileManifest/useFileManifestFormat";
|
|
3
3
|
import { FileManifestState } from "../../../../../../providers/fileManifestState";
|
|
4
4
|
import { FormFacet, ManifestDownloadFormat } from "../../../../common/entities";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Link } from "@mui/material";
|
|
3
|
+
import { BUTTON_PROPS } from "../../../../../../styles/common/mui/button";
|
|
2
4
|
import { FluidPaper } from "../../../../../common/Paper/paper.styles";
|
|
3
5
|
import { ANCHOR_TARGET, REL_ATTRIBUTE, } from "../../../../../Links/common/entities";
|
|
4
6
|
import { Section, SectionActions, SectionContent, } from "../../../../export.styles";
|
|
5
|
-
import { BUTTON_PROPS } from "../../../../../../styles/common/mui/button";
|
|
6
|
-
import { Button, Link } from "@mui/material";
|
|
7
7
|
export const ExportToTerraReady = ({ ExportToTerraSuccess, exportURL, }) => {
|
|
8
8
|
return (_jsx(FluidPaper, { children: _jsxs(Section, { children: [_jsx(SectionContent, { children: _jsx(ExportToTerraSuccess, {}) }), _jsx(SectionActions, { children: _jsx(Button, { color: BUTTON_PROPS.COLOR.PRIMARY, component: Link, href: exportURL, rel: REL_ATTRIBUTE.NO_OPENER_NO_REFERRER, target: ANCHOR_TARGET.BLANK, variant: BUTTON_PROPS.VARIANT.CONTAINED, children: "Open Terra" }) })] }) }));
|
|
9
9
|
};
|
package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
|
-
import { ONBOARDING_STEP, useAuthenticationForm, } from "../../../../../../hooks/authentication/terra/useAuthenticationForm";
|
|
4
3
|
import { useAuth } from "../../../../../../auth/hooks/useAuth";
|
|
5
4
|
import { AUTH_STATUS } from "../../../../../../auth/types/auth";
|
|
5
|
+
import { ONBOARDING_STEP, useAuthenticationForm, } from "../../../../../../hooks/authentication/terra/useAuthenticationForm";
|
|
6
6
|
import { TYPOGRAPHY_PROPS } from "../../../../../../styles/common/mui/typography";
|
|
7
7
|
import { FluidPaper, GridPaper, } from "../../../../../common/Paper/paper.styles";
|
|
8
8
|
import { SectionTitle } from "../../../../../common/Section/components/SectionTitle/sectionTitle";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, JSX } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
4
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
@@ -4,13 +4,13 @@ import copy from "copy-to-clipboard";
|
|
|
4
4
|
import { useDownloadStatus } from "../../../../../../../../hooks/useDownloadStatus";
|
|
5
5
|
import { useFileManifestDownload } from "../../../../../../../../hooks/useFileManifest/useFileManifestDownload";
|
|
6
6
|
import { useLoginGuard } from "../../../../../../../../providers/loginGuard/hook";
|
|
7
|
-
import { trackDatasetFileManifestRequested } from "../../../../../../common/tracking";
|
|
8
7
|
import { BUTTON_PROPS } from "../../../../../../../common/Button/constants";
|
|
9
8
|
import { ButtonGroup } from "../../../../../../../common/ButtonGroup/buttonGroup";
|
|
10
9
|
import { ContentCopyIconSmall, DownloadIconSmall, } from "../../../../../../../common/CustomIcon/common/constants";
|
|
11
10
|
import { FluidPaper, GridPaper, } from "../../../../../../../common/Paper/paper.styles";
|
|
12
11
|
import { Loading, LOADING_PANEL_STYLE, } from "../../../../../../../Loading/loading";
|
|
13
12
|
import { GridTable } from "../../../../../../../Table/common/gridTable.styles";
|
|
13
|
+
import { trackDatasetFileManifestRequested } from "../../../../../../common/tracking";
|
|
14
14
|
import { TOOLTIP_PROPS } from "../../constants";
|
|
15
15
|
import { SectionTitle, TableContainer, } from "../../manifestDownloadEntity.styles";
|
|
16
16
|
export const FileManifestDownload = ({ filters, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, JSX } from "react";
|
|
2
2
|
import { FileManifestState } from "../../../../../../providers/fileManifestState";
|
|
3
3
|
import { FormFacet } from "../../../../common/entities";
|
|
4
4
|
export interface ManifestDownloadNotStartedProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, JSX } from "react";
|
|
2
2
|
import { Filters } from "../../../../common/entities";
|
|
3
3
|
import { FileManifestState } from "../../../../providers/fileManifestState";
|
|
4
4
|
import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, JSX } from "react";
|
|
2
2
|
import { CategoryKey } from "../../../../common/entities";
|
|
3
3
|
import { OnFilterFn } from "../../../../hooks/useCategoryFilter";
|
|
4
4
|
import { FilterMenuSearchMatch } from "../../common/entities";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RowData, Table, TableMeta as TanStackTableMeta } from "@tanstack/react-table";
|
|
2
|
+
import { JSX } from "react";
|
|
2
3
|
import { FILTER_SORT } from "../../../../../../common/filters/sort/config/types";
|
|
3
4
|
import { CategoryGroup } from "../../../../../../config/entities";
|
|
4
5
|
import { SurfaceProps } from "../../../surfaces/types";
|
|
5
|
-
import { JSX } from "react";
|
|
6
6
|
export interface ColumnFiltersAdapterProps<T extends RowData> {
|
|
7
7
|
renderSurface: (props: SurfaceProps) => JSX.Element | null;
|
|
8
8
|
table: Table<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps as MButtonProps, IconButtonProps as MIconButtonProps } from "@mui/material";
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, JSX } from "react";
|
|
3
3
|
export interface AuthenticationProps {
|
|
4
4
|
authenticationEnabled?: boolean;
|
|
5
5
|
Button: ElementType<MButtonProps> | ElementType<MIconButtonProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps as MButtonProps, IconButtonProps as MIconButtonProps } from "@mui/material";
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, JSX } from "react";
|
|
3
3
|
export interface SearchProps {
|
|
4
4
|
Button: ElementType<MButtonProps> | ElementType<MIconButtonProps>;
|
|
5
5
|
closeMenu: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnchorHTMLAttributes, ClassAttributes, JSX } from "react";
|
|
2
2
|
import { BaseComponentProps } from "../../../types";
|
|
3
3
|
/**
|
|
4
4
|
* rehype-sanitize's default schema allows only a limited set of attributes on <a> elements:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BaseComponentProps } from "components/types";
|
|
2
|
-
import {
|
|
2
|
+
import { ClassAttributes, JSX, TableHTMLAttributes } from "react";
|
|
3
3
|
export declare const Table: (props: BaseComponentProps & ClassAttributes<HTMLTableElement> & TableHTMLAttributes<HTMLTableElement>) => JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
|
-
import { useEffect, useMemo, useState,
|
|
3
|
+
import { isValidElement, useEffect, useMemo, useState, } from "react";
|
|
4
|
+
import * as production from "react/jsx-runtime";
|
|
4
5
|
import rehypeRaw from "rehype-raw";
|
|
5
6
|
import rehypeReact from "rehype-react";
|
|
6
|
-
import * as production from "react/jsx-runtime";
|
|
7
7
|
import rehypeSanitize from "rehype-sanitize";
|
|
8
8
|
import remarkGfm from "remark-gfm";
|
|
9
9
|
import remarkParse from "remark-parse";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { Chip } from "@mui/material";
|
|
3
|
-
import { PALETTE } from "../../../../../styles/common/constants/palette";
|
|
4
3
|
import { FONT } from "../../../../../styles/common/constants/font";
|
|
4
|
+
import { PALETTE } from "../../../../../styles/common/constants/palette";
|
|
5
5
|
export const StyledChip = styled(Chip) `
|
|
6
6
|
background-color: ${PALETTE.PRIMARY_LIGHTEST};
|
|
7
7
|
border-radius: 4px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconButtonProps as MIconButtonProps, IconProps as MIconProps } from "@mui/material";
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, JSX } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Basic icon button component.
|
|
5
5
|
* Use IconButtonSecondary styles to render secondary icon button.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CircularProgressProps as MCircularProgressProps } from "@mui/material";
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, JSX } from "react";
|
|
3
3
|
export interface CircularProgressProps extends MCircularProgressProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
Track?: ElementType<CircularProgressProps>;
|
package/lib/config/entities.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ import { TabProps as MTabProps, Theme, ThemeOptions } from "@mui/material";
|
|
|
2
2
|
import { CellContext, ColumnDef, ColumnMeta, ColumnSort, GroupingState, RowData, Table, TableOptions } from "@tanstack/react-table";
|
|
3
3
|
import { JSX, JSXElementConstructor, ReactNode } from "react";
|
|
4
4
|
import { AzulSummaryResponse } from "../apis/azul/common/entities";
|
|
5
|
+
import { AuthState } from "../auth/types/auth";
|
|
6
|
+
import { UserProfile } from "../auth/types/authentication";
|
|
7
|
+
import { ProviderId } from "../auth/types/common";
|
|
8
|
+
import { AiConfig } from "../common/ai/config/types";
|
|
5
9
|
import { CategoryConfig } from "../common/categories/config/types";
|
|
6
10
|
import { DataDictionaryAnnotation, DataDictionaryConfig, SelectedFilter } from "../common/entities";
|
|
7
11
|
import { FilterSortConfig } from "../common/filters/sort/config/types";
|
|
8
12
|
import { FooterProps } from "../components/Layout/components/Footer/footer";
|
|
9
13
|
import { HeaderProps } from "../components/Layout/components/Header/header";
|
|
10
14
|
import { ExploreMode } from "../hooks/useExploreMode/types";
|
|
11
|
-
import { AuthState } from "../auth/types/auth";
|
|
12
|
-
import { UserProfile } from "../auth/types/authentication";
|
|
13
|
-
import { ProviderId } from "../auth/types/common";
|
|
14
15
|
import { ExploreState } from "../providers/exploreState";
|
|
15
16
|
import { FileManifestState } from "../providers/fileManifestState";
|
|
16
17
|
import { SystemStatus, SystemStatusResponse } from "../providers/systemStatus";
|
|
17
|
-
import { AiConfig } from "../common/ai/config/types";
|
|
18
18
|
/**
|
|
19
19
|
* Interface to define the analytics configuration for a given site.
|
|
20
20
|
*/
|
|
@@ -31,6 +31,16 @@ export const useEntityList = (staticResponse) => {
|
|
|
31
31
|
const entities = getEntities(staticData, data);
|
|
32
32
|
const shouldDispatchResponse = isDispatchable(exploreMode, data?.apiPath === apiPath, entityListType === tabValue);
|
|
33
33
|
const isFetching = isIdle || isLoading;
|
|
34
|
+
// Reset explore response when token changes - server-side fetched modes only.
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (exploreMode === EXPLORE_MODE.SS_FETCH_SS_FILTERING ||
|
|
37
|
+
exploreMode === EXPLORE_MODE.SS_FETCH_CS_FILTERING) {
|
|
38
|
+
exploreDispatch({
|
|
39
|
+
payload: undefined,
|
|
40
|
+
type: ExploreActionKind.ResetExploreResponse,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}, [exploreDispatch, exploreMode, token]);
|
|
34
44
|
// Fetch entities - on change of filter state - server-side fetching and server-side filtering.
|
|
35
45
|
useEffect(() => {
|
|
36
46
|
if (exploreMode === EXPLORE_MODE.SS_FETCH_SS_FILTERING) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext,
|
|
3
|
-
import { useToken } from "../hooks/authentication/token/useToken";
|
|
2
|
+
import { createContext, useMemo, useReducer, useState, } from "react";
|
|
4
3
|
import { META_COMMAND } from "../hooks/stateSyncManager/hooks/UseMetaCommands/types";
|
|
5
4
|
import { buildCategoryViews, buildNextFilterState, } from "../hooks/useCategoryFilter";
|
|
6
5
|
import { useConfig } from "../hooks/useConfig";
|
|
@@ -40,7 +39,6 @@ export const ExploreStateContext = createContext({
|
|
|
40
39
|
export function ExploreStateProvider({ children, entityListType, }) {
|
|
41
40
|
const { config, defaultEntityListType } = useConfig();
|
|
42
41
|
const { decodedCatalogParam, decodedFeatureFlagParam, decodedFilterParam } = useURLFilterParams();
|
|
43
|
-
const { token } = useToken();
|
|
44
42
|
const entityList = entityListType || defaultEntityListType;
|
|
45
43
|
const [initializerArg] = useState(() => initReducerArguments(config, entityList, decodedFilterParam, decodedCatalogParam, decodedFeatureFlagParam));
|
|
46
44
|
const [exploreState, exploreDispatch] = useReducer((s, a) => exploreReducer(s, a, {
|
|
@@ -51,13 +49,6 @@ export function ExploreStateProvider({ children, entityListType, }) {
|
|
|
51
49
|
const exploreContextValue = useMemo(() => {
|
|
52
50
|
return { exploreDispatch, exploreState };
|
|
53
51
|
}, [exploreDispatch, exploreState]);
|
|
54
|
-
// Reset explore response when token changes.
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
exploreDispatch({
|
|
57
|
-
payload: undefined,
|
|
58
|
-
type: ExploreActionKind.ResetExploreResponse,
|
|
59
|
-
});
|
|
60
|
-
}, [exploreDispatch, token]);
|
|
61
52
|
return (_jsx(ExploreStateContext.Provider, { value: exploreContextValue, children: children }));
|
|
62
53
|
}
|
|
63
54
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { useAuth } from "../../auth/hooks/useAuth";
|
|
3
4
|
import { LoginDialog } from "../../components/common/LoginDialog/loginDialog";
|
|
4
5
|
import { useAuthenticationConfig } from "../../hooks/authentication/config/useAuthenticationConfig";
|
|
5
6
|
import { useConfig } from "../../hooks/useConfig";
|
|
6
|
-
import { useAuth } from "../../auth/hooks/useAuth";
|
|
7
7
|
import { LoginGuardContext } from "./context";
|
|
8
8
|
/**
|
|
9
9
|
* LoginGuardProvider is responsible for intercepting actions that require user authentication.
|
package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ToggleButton } from "@mui/material";
|
|
3
|
-
import { StyledBox } from "./toggleButtonGroup.styles";
|
|
4
3
|
import Link from "next/link";
|
|
5
|
-
import { useAiRoutes } from "../../../../../../hooks/ai/useAiRoutes/hook";
|
|
6
|
-
import { StyledToggleButtonGroup } from "./toggleButtonGroup.styles";
|
|
7
4
|
import { Beta } from "../../../../../../components/common/Chip/components/Beta/beta";
|
|
5
|
+
import { useAiRoutes } from "../../../../../../hooks/ai/useAiRoutes/hook";
|
|
6
|
+
import { StyledBox, StyledToggleButtonGroup } from "./toggleButtonGroup.styles";
|
|
8
7
|
/**
|
|
9
8
|
* ToggleButtonGroup component for navigating between ExploreView and ResearchView.
|
|
10
9
|
* @returns ToggleButtonGroup JSX element, or null if routes are not configured.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { Box, ToggleButtonGroup } from "@mui/material";
|
|
3
|
-
import { bpDownMd } from "../../../../../../styles/common/mixins/breakpoints";
|
|
4
3
|
import { PALETTE } from "../../../../../../styles/common/constants/palette";
|
|
4
|
+
import { bpDownMd } from "../../../../../../styles/common/mixins/breakpoints";
|
|
5
5
|
export const StyledBox = styled(Box) `
|
|
6
6
|
margin-bottom: -16px;
|
|
7
7
|
padding: 16px;
|
|
@@ -23,10 +23,10 @@ import { stateToUrl } from "../../providers/exploreState/actions/stateToUrl/disp
|
|
|
23
23
|
import { urlToState } from "../../providers/exploreState/actions/urlToState/dispatch";
|
|
24
24
|
import { SELECT_CATEGORY_KEY } from "../../providers/exploreState/constants";
|
|
25
25
|
import { TEST_IDS } from "../../tests/testIds";
|
|
26
|
+
import { ToggleButtonGroup } from "./entityList/filters/components/ToggleButtonGroup/toggleButtonGroup";
|
|
27
|
+
import { StyledGrid, StyledStack } from "./entityList/filters/filters.styles";
|
|
26
28
|
import { useUpdateFilterSort } from "./hooks/UseUpdateFilterSort/hook";
|
|
27
29
|
import { buildStateSyncManagerContext } from "./utils";
|
|
28
|
-
import { StyledGrid, StyledStack } from "./entityList/filters/filters.styles";
|
|
29
|
-
import { ToggleButtonGroup } from "./entityList/filters/components/ToggleButtonGroup/toggleButtonGroup";
|
|
30
30
|
export const ExploreView = (props) => {
|
|
31
31
|
const { mdDown } = useBreakpoint();
|
|
32
32
|
const { config, entityConfig } = useConfig(); // Get app level config.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TEST_IDS } from "../../../../../tests/testIds";
|
|
3
|
-
import { StyledDrawer } from "./drawer.styles";
|
|
4
2
|
import { useLayoutSpacing } from "../../../../../hooks/UseLayoutSpacing/hook";
|
|
5
3
|
import { DRAWER_PROPS } from "../../../../../styles/common/mui/drawer";
|
|
4
|
+
import { TEST_IDS } from "../../../../../tests/testIds";
|
|
5
|
+
import { StyledDrawer } from "./drawer.styles";
|
|
6
6
|
/**
|
|
7
7
|
* Renders the drawer component for the research assistant.
|
|
8
8
|
* @param props - Component props.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
|
-
import { RoundedPaper } from "../../../../../components/common/Paper/components/RoundedPaper/roundedPaper";
|
|
3
2
|
import { Box } from "@mui/material";
|
|
3
|
+
import { RoundedPaper } from "../../../../../components/common/Paper/components/RoundedPaper/roundedPaper";
|
|
4
4
|
export const StyledBox = styled(Box) `
|
|
5
5
|
padding: 16px;
|
|
6
6
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Stack } from "@mui/material";
|
|
2
1
|
import styled from "@emotion/styled";
|
|
2
|
+
import { Stack } from "@mui/material";
|
|
3
3
|
import { PALETTE } from "../../../../../../../../../styles/common/constants/palette";
|
|
4
4
|
export const StyledStack = styled(Stack) `
|
|
5
5
|
align-items: flex-start;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useScroll } from "./hooks/UseScroll/hook";
|
|
2
3
|
import { StyledStack } from "./messages.styles";
|
|
3
4
|
import { MessageSelector } from "./selector/messageSelector";
|
|
4
|
-
import { useScroll } from "./hooks/UseScroll/hook";
|
|
5
5
|
/**
|
|
6
6
|
* Renders chat messages, delegating each to the message selector.
|
|
7
7
|
* @param props - Component props.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ToggleButtonGroup } from "../toggleButtonGroup";
|
|
3
2
|
import { ConfigProvider } from "../../../../../../providers/config";
|
|
4
3
|
import { INITIAL_CONFIG } from "../../../stories/args";
|
|
4
|
+
import { ToggleButtonGroup } from "../toggleButtonGroup";
|
|
5
5
|
const meta = {
|
|
6
6
|
component: ToggleButtonGroup,
|
|
7
7
|
decorators: [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ToggleButton } from "@mui/material";
|
|
3
|
-
import { StyledBox, StyledToggleButtonGroup } from "./toggleButtonGroup.styles";
|
|
4
3
|
import Link from "next/link";
|
|
5
|
-
import { useAiRoutes } from "../../../../../hooks/ai/useAiRoutes/hook";
|
|
6
4
|
import { Beta } from "../../../../../components/common/Chip/components/Beta/beta";
|
|
5
|
+
import { useAiRoutes } from "../../../../../hooks/ai/useAiRoutes/hook";
|
|
6
|
+
import { StyledBox, StyledToggleButtonGroup } from "./toggleButtonGroup.styles";
|
|
7
7
|
/**
|
|
8
8
|
* ToggleButtonGroup component for navigating between ResearchView and ExploreView.
|
|
9
9
|
* @returns ToggleButtonGroup JSX element, or null if routes are not configured.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "@mui/material";
|
|
3
|
+
import { ConfigProvider } from "../../../../providers/config";
|
|
3
4
|
import { PALETTE } from "../../../../styles/common/constants/palette";
|
|
4
5
|
import { ChatProvider } from "../../state/provider";
|
|
5
6
|
import { Assistant } from "../assistant";
|
|
6
7
|
import { INITIAL_ARGS, INITIAL_CONFIG } from "./args";
|
|
7
|
-
import { ConfigProvider } from "../../../../providers/config";
|
|
8
8
|
const meta = {
|
|
9
9
|
component: Assistant,
|
|
10
10
|
decorators: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useRef } from "react";
|
|
2
|
-
import { fetchResponse } from "../../../../query/fetch";
|
|
3
|
-
import { useChatDispatch } from "../../../hooks/UseChatDispatch/hook";
|
|
4
2
|
import { track } from "../../../../../../common/analytics/analytics";
|
|
5
3
|
import { EVENT_NAME } from "../../../../../../common/analytics/entities";
|
|
4
|
+
import { fetchResponse } from "../../../../query/fetch";
|
|
5
|
+
import { useChatDispatch } from "../../../hooks/UseChatDispatch/hook";
|
|
6
6
|
/**
|
|
7
7
|
* Hook that manages query submission and abort lifecycle.
|
|
8
8
|
* @param url - The API URL to send queries to.
|
package/package.json
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import { DataLayer } from "@databiosphere/findable-ui/lib/common/analytics/entities";
|
|
2
|
+
import { DataDictionaryAnnotation } from "@databiosphere/findable-ui/lib/common/entities";
|
|
3
|
+
import {
|
|
4
|
+
CustomFeatureColumn,
|
|
5
|
+
CustomFeatureInitialTableState,
|
|
6
|
+
CustomFeatureInstance,
|
|
7
|
+
CustomFeatureOptions,
|
|
8
|
+
CustomFeatureRow,
|
|
9
|
+
CustomFeatureTableState,
|
|
10
|
+
} from "@databiosphere/findable-ui/lib/components/Table/features/entities";
|
|
11
|
+
import { GridTrackSize } from "@databiosphere/findable-ui/lib/config/entities";
|
|
12
|
+
import { SIZE } from "@databiosphere/findable-ui/lib/styles/common/constants/size";
|
|
1
13
|
import {
|
|
2
14
|
Theme as MTheme,
|
|
3
15
|
PaletteColorOptions,
|
|
@@ -19,18 +31,6 @@ import type {} from "@mui/material/Toolbar";
|
|
|
19
31
|
import type {} from "@mui/material/Typography";
|
|
20
32
|
import type { RowData } from "@tanstack/react-table";
|
|
21
33
|
import { Components } from "rehype-react";
|
|
22
|
-
import { DataLayer } from "@databiosphere/findable-ui/lib/common/analytics/entities";
|
|
23
|
-
import { DataDictionaryAnnotation } from "@databiosphere/findable-ui/lib/common/entities";
|
|
24
|
-
import {
|
|
25
|
-
CustomFeatureColumn,
|
|
26
|
-
CustomFeatureInitialTableState,
|
|
27
|
-
CustomFeatureInstance,
|
|
28
|
-
CustomFeatureOptions,
|
|
29
|
-
CustomFeatureRow,
|
|
30
|
-
CustomFeatureTableState,
|
|
31
|
-
} from "@databiosphere/findable-ui/lib/components/Table/features/entities";
|
|
32
|
-
import { GridTrackSize } from "@databiosphere/findable-ui/lib/config/entities";
|
|
33
|
-
import { SIZE } from "@databiosphere/findable-ui/lib/styles/common/constants/size";
|
|
34
34
|
|
|
35
35
|
declare module "@mui/material/Alert" {
|
|
36
36
|
interface AlertProps {
|