synapse-react-client 4.0.38 → 4.0.40
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/dist/SWC.index.js +1 -1
- package/dist/aridhia-queries/useAridhiaQuery.d.ts +6 -2
- package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -1
- package/dist/aridhia-queries/useAridhiaQuery.js +3 -0
- package/dist/aridhia-queries/useAridhiaQuery.js.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts +2 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +60 -37
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts +12 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts.map +1 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.js +56 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts.map +1 -1
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js +38 -30
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +15 -14
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -1
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts +11 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts.map +1 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.js +37 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.js.map +1 -0
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +2 -2
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
- package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts +10 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts.map +1 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.js +11 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.js.map +1 -0
- package/dist/components/Aridhia/rdcaDapConstants.d.ts +3 -0
- package/dist/components/Aridhia/rdcaDapConstants.d.ts.map +1 -0
- package/dist/components/Aridhia/rdcaDapConstants.js +6 -0
- package/dist/components/Aridhia/rdcaDapConstants.js.map +1 -0
- package/dist/components/DataExplorer/DataExplorer.css +1 -1
- package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.js +50 -50
- package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
- package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.scss +29 -6
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts +16 -7
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js +79 -57
- package/dist/components/DataGrid/columns/DateTimeColumn.js.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +11 -8
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +10 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.js +18 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
- package/dist/components/EntityCitation/EntityCitation.js +8 -5
- package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
- package/dist/components/HasAccess/AccessIcon.d.ts +3 -1
- package/dist/components/HasAccess/AccessIcon.d.ts.map +1 -1
- package/dist/components/HasAccess/AccessIcon.js +11 -1
- package/dist/components/HasAccess/AccessIcon.js.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +2 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +81 -53
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.d.ts.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.js +3 -2
- package/dist/components/ProjectInfo/ProjectInfo.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.css +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts +6 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.js +257 -0
- package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.js +17 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.js.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.scss +106 -0
- package/dist/components/QueryBuilder/FilterGroupNode.css +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts +7 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.js +100 -0
- package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.js +15 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.js.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.scss +83 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.css +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts +21 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.js +138 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.js +17 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.scss +79 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +39 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.js +19 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +14 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.js +89 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderId.d.ts +2 -0
- package/dist/components/QueryBuilder/queryBuilderId.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderId.js +9 -0
- package/dist/components/QueryBuilder/queryBuilderId.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +24 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.js +91 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts +58 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.js +200 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +3 -2
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderTranslation.js +82 -84
- package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
- package/dist/components/QueryBuilder/useQBCombinedSql.d.ts +11 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.d.ts.map +1 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.js +29 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.js.map +1 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts +18 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts.map +1 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js +27 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js.map +1 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +14 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +185 -120
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.d.ts +1 -0
- package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.js +11 -11
- package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts +7 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +76 -71
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts +3 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js +24 -13
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
- package/dist/components/SynapseChat/portalChatSessionStorage.d.ts +23 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.d.ts.map +1 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.js +29 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.js.map +1 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts +6 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +92 -79
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +3 -4
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +9 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
- package/dist/components/menu/ComplexMenu.js +1 -1
- package/dist/components/menu/ComplexMenu.js.map +1 -1
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +4 -0
- package/dist/components/menu/DropdownMenu.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts +10 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js +20 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +29 -20
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +16 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.js +70 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +7 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +47 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts +24 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.js +62 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +18 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.js +39 -33
- package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts +5 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.js +65 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +49 -47
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/abstracts/_cssVariables.scss +7 -0
- package/dist/style/components/_query-wrapper-plot-nav.scss +9 -0
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +6 -1
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +17 -2
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/chat/useChat.d.ts.map +1 -1
- package/dist/synapse-queries/chat/useChat.js +2 -4
- package/dist/synapse-queries/chat/useChat.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.d.ts +2 -0
- package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +5 -3
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts +41 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts.map +1 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.js +63 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -0
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts +21 -0
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts.map +1 -0
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js +34 -0
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js.map +1 -0
- package/dist/synapse-queries/index.js +190 -180
- package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +0 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/jsonschema/getType.d.ts.map +1 -1
- package/dist/utils/jsonschema/getType.js +4 -1
- package/dist/utils/jsonschema/getType.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,165 +1,230 @@
|
|
|
1
1
|
import "../../utils/SynapseConstants.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isFilterGroup as e } from "../../utils/types/IsType.js";
|
|
3
|
+
import { isTable as t } from "../../utils/functions/EntityTypeUtils.js";
|
|
4
|
+
import { getAdditionalFilters as n, parseEntityIdAndVersionFromSqlStatement as r } from "../../utils/functions/SqlFunctions.js";
|
|
4
5
|
import "../../utils/functions/index.js";
|
|
5
|
-
import { SynapseErrorBoundary as
|
|
6
|
+
import { SynapseErrorBoundary as i } from "../error/ErrorBanner.js";
|
|
6
7
|
import "../../utils/index.js";
|
|
7
|
-
import { useGetEntity as
|
|
8
|
+
import { useGetEntity as a } from "../../synapse-queries/entity/useEntity.js";
|
|
8
9
|
import "../../synapse-queries/index.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
10
|
+
import { ConfirmationDialog as o } from "../ConfirmationDialog/ConfirmationDialog.js";
|
|
11
|
+
import "../ConfirmationDialog/index.js";
|
|
12
|
+
import s from "../download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert.js";
|
|
13
|
+
import { useQueryContext as c } from "../QueryContext/QueryContext.js";
|
|
11
14
|
import "../QueryContext/index.js";
|
|
12
|
-
import { NoContentPlaceholderType as
|
|
13
|
-
import { QueryVisualizationContextConsumer as
|
|
14
|
-
import { QueryVisualizationWrapper as
|
|
15
|
+
import { NoContentPlaceholderType as l } from "../SynapseTable/NoContentPlaceholderType.js";
|
|
16
|
+
import { QueryVisualizationContextConsumer as u } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
|
|
17
|
+
import { QueryVisualizationWrapper as d } from "../QueryVisualizationWrapper/QueryVisualizationWrapper.js";
|
|
15
18
|
import "../QueryVisualizationWrapper/index.js";
|
|
16
|
-
import { isRowSelectionVisibleAtom as
|
|
17
|
-
import { QueryWrapper as
|
|
19
|
+
import { isRowSelectionVisibleAtom as f } from "../QueryWrapper/TableRowSelectionState.js";
|
|
20
|
+
import { QueryWrapper as p } from "../QueryWrapper/QueryWrapper.js";
|
|
18
21
|
import "../QueryWrapper/index.js";
|
|
19
22
|
import "../error/index.js";
|
|
20
|
-
import
|
|
21
|
-
import { SqlEditor as
|
|
22
|
-
import { QueryWrapperErrorBoundary as
|
|
23
|
-
import { ModalDownload as
|
|
24
|
-
import
|
|
25
|
-
import { RowSetView as
|
|
26
|
-
import
|
|
27
|
-
import { useGetAddToDownloadListRequestForCurrentQuery as
|
|
28
|
-
import { FullTextSearch as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { CustomControls as
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
23
|
+
import m from "../TotalQueryResults.js";
|
|
24
|
+
import { SqlEditor as h } from "../SynapseTable/SqlEditor.js";
|
|
25
|
+
import { QueryWrapperErrorBoundary as g } from "../QueryWrapperErrorBoundary.js";
|
|
26
|
+
import { ModalDownload as _ } from "../ModalDownload/ModalDownload.js";
|
|
27
|
+
import v from "../QueryWrapper/QueryWrapperLoadingScreen.js";
|
|
28
|
+
import { RowSetView as y } from "./RowSetView.js";
|
|
29
|
+
import b from "../widgets/query-filter/FacetFilterControls.js";
|
|
30
|
+
import { useGetAddToDownloadListRequestForCurrentQuery as x } from "../QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.js";
|
|
31
|
+
import { FullTextSearch as S } from "../FullTextSearch/FullTextSearch.js";
|
|
32
|
+
import C from "../SynapseTable/SearchV2.js";
|
|
33
|
+
import w from "../SynapseTable/TopLevelControls/TopLevelControls.js";
|
|
34
|
+
import { CustomControls as T } from "../SynapseTable/CustomControls/CustomControls.js";
|
|
35
|
+
import E from "../widgets/facet-nav/PlotsContainer.js";
|
|
36
|
+
import { defaultQBGroup as D, hasCompleteCondition as O } from "../QueryBuilder/queryBuilderOperations.js";
|
|
37
|
+
import { qbNodeToApiFilter as ee, selectedFacetsToQBGroup as te } from "../QueryBuilder/queryBuilderTranslation.js";
|
|
38
|
+
import { QueryBuilderControls as ne } from "../QueryBuilder/QueryBuilderControls.js";
|
|
39
|
+
import { Suspense as k, createElement as A, useMemo as j, useState as M } from "react";
|
|
40
|
+
import { Box as re } from "@mui/material";
|
|
41
|
+
import { jsx as N, jsxs as ie } from "react/jsx-runtime";
|
|
42
|
+
import { useQuery as ae } from "@tanstack/react-query";
|
|
43
|
+
import { useAtomValue as oe } from "jotai";
|
|
38
44
|
//#region src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
let { tableConfiguration:
|
|
42
|
-
|
|
45
|
+
var P = "isShowingFacetFilters", F = "isHidingFacetFilters", I = "hasSelectedRows";
|
|
46
|
+
function L(t) {
|
|
47
|
+
let { tableConfiguration: n, name: r, cardConfiguration: a, facetsToPlot: l, availableFacets: d, initialExpandedFacetControls: p, hideDownload: v, hideAddToDownloadListMenuItem: A, hideProgrammaticOptionsMenuItem: j, hideQueryCount: L, hideSqlEditorControl: R, hideVisualizationsControl: se, searchConfiguration: z, cavaticaConnectAccountURL: ce, customControls: B, remount: V = () => {}, isFullTextSearchEnabled: le, customPlots: ue, initialLimit: H, initialPlotTypeByFacetColumnName: de, hideTopLevelControls: U, showQueryBuilderControl: fe = !1, defaultShowQueryBuilder: pe = !1 } = t, W = c(), [me, he] = M(!1), [G, K] = M(pe), [q, J] = M(() => D()), [ge, Y] = M(!1), { hasFacetedSelectColumn: X, queryMetadataQueryOptions: _e } = W, { executeQueryRequest: Z } = W, { isLoading: ve, data: ye } = ae(_e), be = () => {
|
|
48
|
+
let t = W.currentQueryRequest.query.selectedFacets;
|
|
49
|
+
if (t && t.length > 0) {
|
|
50
|
+
let n = te(t, ye?.columnModels), r = ee(n);
|
|
51
|
+
J(n), Z((t) => ({
|
|
52
|
+
...t,
|
|
53
|
+
query: {
|
|
54
|
+
...t.query,
|
|
55
|
+
selectedFacets: void 0,
|
|
56
|
+
additionalFilters: r ? [...(t.query.additionalFilters ?? []).filter((t) => !e(t)), r] : t.query.additionalFilters
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
K(!0);
|
|
61
|
+
}, Q = () => {
|
|
62
|
+
J(D()), Z((t) => ({
|
|
63
|
+
...t,
|
|
64
|
+
query: {
|
|
65
|
+
...t.query,
|
|
66
|
+
additionalFilters: t.query.additionalFilters?.filter((t) => !e(t))
|
|
67
|
+
}
|
|
68
|
+
})), K(!1);
|
|
69
|
+
}, xe = () => {
|
|
70
|
+
if (!G) {
|
|
71
|
+
be();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let t = W.currentQueryRequest.query.additionalFilters?.some(e) ?? !1;
|
|
75
|
+
if (O(q) || t) {
|
|
76
|
+
Y(!0);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
Q();
|
|
80
|
+
}, Se = oe(f), $ = W.currentQueryRequest, Ce = $?.query.selectedFacets !== void 0 && $.query.selectedFacets.length > 0 || $?.query.additionalFilters !== void 0 && $?.query.additionalFilters.length > 0, we = x();
|
|
81
|
+
return /* @__PURE__ */ N(u, { children: (e) => {
|
|
43
82
|
if (e === void 0) throw Error("No queryVisualizationContext found when using QueryVisualizationContextConsumer");
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
className: `QueryWrapperPlotNav ${e.showFacetFilter ?
|
|
46
|
-
sx: { "*": { cursor:
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
...
|
|
50
|
-
queryContext:
|
|
83
|
+
return /* @__PURE__ */ N(re, {
|
|
84
|
+
className: `QueryWrapperPlotNav ${e.showFacetFilter && !G ? P : F} ${Se ? I : ""} ${U ? "isHidingTopLevelControls" : ""} ${G ? "isShowingQueryBuilder" : ""}`,
|
|
85
|
+
sx: { "*": { cursor: ve ? "wait" : void 0 } },
|
|
86
|
+
children: /* @__PURE__ */ ie(g, { children: [
|
|
87
|
+
le ? /* @__PURE__ */ N(S, { ftsConfig: z?.ftsConfig }) : /* @__PURE__ */ N(C, {
|
|
88
|
+
...z,
|
|
89
|
+
queryContext: W,
|
|
51
90
|
queryVisualizationContext: e
|
|
52
91
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
e.showDownloadConfirmation && /* @__PURE__ */
|
|
55
|
-
addToDownloadListRequest:
|
|
92
|
+
/* @__PURE__ */ N(h, {}),
|
|
93
|
+
e.showDownloadConfirmation && /* @__PURE__ */ N(s, {
|
|
94
|
+
addToDownloadListRequest: we,
|
|
56
95
|
onClose: () => e.setShowDownloadConfirmation(!1)
|
|
57
96
|
}),
|
|
58
|
-
!
|
|
59
|
-
showColumnSelection:
|
|
60
|
-
name:
|
|
61
|
-
hideDownload:
|
|
62
|
-
hideAddToDownloadListMenuItem:
|
|
63
|
-
hideProgrammaticOptionsMenuItem:
|
|
64
|
-
hideQueryCount:
|
|
65
|
-
hideFacetFilterControl: !
|
|
66
|
-
hideVisualizationsControl: !
|
|
67
|
-
hideSqlEditorControl:
|
|
68
|
-
cavaticaConnectAccountURL:
|
|
69
|
-
remount:
|
|
70
|
-
customControls:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
initialExpandedFacetControls: d
|
|
97
|
+
!U && /* @__PURE__ */ N(i, { children: /* @__PURE__ */ N(w, {
|
|
98
|
+
showColumnSelection: n !== void 0,
|
|
99
|
+
name: r,
|
|
100
|
+
hideDownload: v,
|
|
101
|
+
hideAddToDownloadListMenuItem: A,
|
|
102
|
+
hideProgrammaticOptionsMenuItem: j,
|
|
103
|
+
hideQueryCount: L,
|
|
104
|
+
hideFacetFilterControl: !X || G,
|
|
105
|
+
hideVisualizationsControl: !X || se,
|
|
106
|
+
hideSqlEditorControl: R,
|
|
107
|
+
cavaticaConnectAccountURL: ce,
|
|
108
|
+
remount: V,
|
|
109
|
+
customControls: B,
|
|
110
|
+
showQueryBuilderControl: fe,
|
|
111
|
+
showQueryBuilder: G,
|
|
112
|
+
onToggleQueryBuilder: xe
|
|
75
113
|
}) }),
|
|
76
|
-
/* @__PURE__ */
|
|
114
|
+
G ? /* @__PURE__ */ N(k, {
|
|
77
115
|
fallback: null,
|
|
78
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ N("div", {
|
|
117
|
+
className: "QueryBuilderControls",
|
|
118
|
+
children: /* @__PURE__ */ N(ne, {
|
|
119
|
+
tree: q,
|
|
120
|
+
onTreeChange: J
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
}) : X && /* @__PURE__ */ N(b, {
|
|
124
|
+
availableFacets: d,
|
|
125
|
+
initialExpandedFacetControls: p
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ N(k, {
|
|
128
|
+
fallback: null,
|
|
129
|
+
children: /* @__PURE__ */ N(m, {
|
|
79
130
|
frontText: "",
|
|
80
|
-
endText:
|
|
131
|
+
endText: Ce ? "filtered by" : "",
|
|
81
132
|
hideIfUnfiltered: !0
|
|
82
133
|
})
|
|
83
134
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
customControls:
|
|
86
|
-
remount:
|
|
135
|
+
/* @__PURE__ */ N(T, {
|
|
136
|
+
customControls: B,
|
|
137
|
+
remount: V
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ N(E, {
|
|
140
|
+
facetsToPlot: l,
|
|
141
|
+
customPlots: ue,
|
|
142
|
+
initialPlotTypeByFacetColumnName: de
|
|
87
143
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
144
|
+
/* @__PURE__ */ N(y, {
|
|
145
|
+
tableConfiguration: n,
|
|
146
|
+
hideDownload: v,
|
|
147
|
+
cardConfiguration: a,
|
|
148
|
+
initialLimit: H
|
|
92
149
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cardConfiguration: i,
|
|
97
|
-
initialLimit: K
|
|
150
|
+
me && /* @__PURE__ */ N(_, {
|
|
151
|
+
getLastQueryRequest: W?.getCurrentQueryRequest,
|
|
152
|
+
onClose: () => he(!1)
|
|
98
153
|
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
154
|
+
/* @__PURE__ */ N(o, {
|
|
155
|
+
open: ge,
|
|
156
|
+
title: "Hide Query Builder?",
|
|
157
|
+
content: "Hiding the Query Builder will clear the conditions you've built. This can't be undone.",
|
|
158
|
+
confirmButtonProps: {
|
|
159
|
+
children: "Hide Query Builder",
|
|
160
|
+
color: "error",
|
|
161
|
+
variant: "contained"
|
|
162
|
+
},
|
|
163
|
+
onConfirm: () => {
|
|
164
|
+
Y(!1), Q();
|
|
165
|
+
},
|
|
166
|
+
onCancel: () => Y(!1)
|
|
102
167
|
})
|
|
103
168
|
] })
|
|
104
169
|
});
|
|
105
170
|
} });
|
|
106
171
|
}
|
|
107
|
-
function
|
|
108
|
-
let { sql:
|
|
109
|
-
sql:
|
|
110
|
-
additionalFilters:
|
|
111
|
-
limit:
|
|
172
|
+
function R(e) {
|
|
173
|
+
let { sql: i, tableConfiguration: o, isInfinite: s = !o, limit: c = 25, showLastUpdatedOn: u, unitDescription: f, additionalFiltersSessionStorageKey: m, helpConfiguration: h, customPlots: g, enabledExternalAnalysisPlatforms: _ } = e, { entityId: y, versionNumber: b } = r(e.query?.sql ?? i ?? ""), x = j(() => e.query ? e.query : e.initQueryJson ? JSON.parse(e.initQueryJson) : {
|
|
174
|
+
sql: i,
|
|
175
|
+
additionalFilters: n(e.searchParams, e.sqlOperator, m),
|
|
176
|
+
limit: c,
|
|
112
177
|
offset: 0
|
|
113
178
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
179
|
+
e.query,
|
|
180
|
+
e.initQueryJson,
|
|
181
|
+
e.searchParams,
|
|
182
|
+
e.sqlOperator,
|
|
118
183
|
m,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]), [S, C] =
|
|
184
|
+
i,
|
|
185
|
+
c
|
|
186
|
+
]), [S, C] = M(1), w = () => {
|
|
122
187
|
C(S + 1);
|
|
123
|
-
}, { data:
|
|
188
|
+
}, { data: T } = a(y, b), E = {
|
|
124
189
|
entityId: y ?? "",
|
|
125
190
|
concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
|
|
126
191
|
partMask: 255,
|
|
127
192
|
query: x
|
|
128
|
-
},
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
...
|
|
131
|
-
initQueryRequest:
|
|
132
|
-
key:
|
|
133
|
-
isInfinite:
|
|
134
|
-
}, /* @__PURE__ */
|
|
135
|
-
fallback: /* @__PURE__ */
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
-
unitDescription:
|
|
138
|
-
rgbIndex:
|
|
139
|
-
columnAliases:
|
|
140
|
-
renderFacetValue:
|
|
141
|
-
dataUseModifiersColumnName:
|
|
193
|
+
}, D = (T && t(T) && T.isSearchEnabled) ?? !1, O = `${JSON.stringify(E)}-${S}`;
|
|
194
|
+
return /* @__PURE__ */ A(p, {
|
|
195
|
+
...e,
|
|
196
|
+
initQueryRequest: E,
|
|
197
|
+
key: O,
|
|
198
|
+
isInfinite: s
|
|
199
|
+
}, /* @__PURE__ */ N(k, {
|
|
200
|
+
fallback: /* @__PURE__ */ N(v, {}),
|
|
201
|
+
children: /* @__PURE__ */ N(d, {
|
|
202
|
+
unitDescription: f,
|
|
203
|
+
rgbIndex: e.rgbIndex,
|
|
204
|
+
columnAliases: e.columnAliases,
|
|
205
|
+
renderFacetValue: e.renderFacetValue,
|
|
206
|
+
dataUseModifiersColumnName: e.cardConfiguration?.genericCardSchema?.dataUseModifiersColumnName,
|
|
142
207
|
helpConfiguration: h,
|
|
143
|
-
visibleColumnCount:
|
|
144
|
-
hiddenColumns:
|
|
145
|
-
defaultShowPlots:
|
|
146
|
-
hideCopyToClipboard:
|
|
147
|
-
defaultShowSearchBar: (
|
|
148
|
-
lockTextMatchesQueryFilterPill:
|
|
149
|
-
hideSearchBarControl:
|
|
150
|
-
showLastUpdatedOn:
|
|
151
|
-
noContentPlaceholderType:
|
|
152
|
-
hasCustomPlots: Array.isArray(
|
|
153
|
-
enabledExternalAnalysisPlatforms:
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
-
...
|
|
156
|
-
isFullTextSearchEnabled:
|
|
208
|
+
visibleColumnCount: e.visibleColumnCount,
|
|
209
|
+
hiddenColumns: e.hiddenColumns,
|
|
210
|
+
defaultShowPlots: e.defaultShowPlots,
|
|
211
|
+
hideCopyToClipboard: e.hideCopyToClipboard,
|
|
212
|
+
defaultShowSearchBar: (e.defaultShowSearchBox || D) && !e.hideSearchBarControl,
|
|
213
|
+
lockTextMatchesQueryFilterPill: e.lockTextMatchesQueryFilterPill,
|
|
214
|
+
hideSearchBarControl: e.hideSearchBarControl,
|
|
215
|
+
showLastUpdatedOn: u,
|
|
216
|
+
noContentPlaceholderType: l.INTERACTIVE,
|
|
217
|
+
hasCustomPlots: Array.isArray(g) && g.length > 0,
|
|
218
|
+
enabledExternalAnalysisPlatforms: _,
|
|
219
|
+
children: /* @__PURE__ */ N(L, {
|
|
220
|
+
...e,
|
|
221
|
+
isFullTextSearchEnabled: D,
|
|
157
222
|
remount: w
|
|
158
223
|
})
|
|
159
224
|
})
|
|
160
225
|
}));
|
|
161
226
|
}
|
|
162
227
|
//#endregion
|
|
163
|
-
export {
|
|
228
|
+
export { I as HAS_SELECTED_ROWS_CSS, F as QUERY_FILTERS_COLLAPSED_CSS, P as QUERY_FILTERS_EXPANDED_CSS, L as QueryWrapperPlotNavContents, R as default };
|
|
164
229
|
|
|
165
230
|
//# sourceMappingURL=QueryWrapperPlotNav.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryWrapperPlotNav.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx"],"sourcesContent":["import { QueryOrDeprecatedSearchParams } from '@/components/CardContainerLogic/CardContainerLogic'\nimport AddToDownloadListConfirmationAlert from '@/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'\nimport { useGetAddToDownloadListRequestForCurrentQuery } from '@/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery'\nimport { NoContentPlaceholderType } from '@/components/SynapseTable/NoContentPlaceholderType'\nimport { useGetEntity } from '@/synapse-queries'\nimport { SynapseConstants } from '@/utils'\nimport {\n getAdditionalFilters,\n parseEntityIdAndVersionFromSqlStatement,\n} from '@/utils/functions'\nimport { isTable } from '@/utils/functions/EntityTypeUtils'\nimport { DEFAULT_PAGE_SIZE } from '@/utils/SynapseConstants'\nimport { Box } from '@mui/material'\nimport { Query, QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { useQuery } from '@tanstack/react-query'\nimport { useAtomValue } from 'jotai'\nimport { Suspense, useMemo, useState } from 'react'\nimport { CardConfiguration } from '../CardContainer/CardConfiguration'\nimport { SynapseErrorBoundary } from '../error'\nimport FullTextSearch from '../FullTextSearch/FullTextSearch'\nimport ModalDownload from '../ModalDownload/ModalDownload'\nimport { QueryWrapperPlotNavCustomPlotParams } from '../Plot/SynapsePlot'\nimport { QueryContextType, useQueryContext } from '../QueryContext'\nimport {\n QueryVisualizationContextConsumer,\n QueryVisualizationWrapper,\n QueryVisualizationWrapperProps,\n} from '../QueryVisualizationWrapper'\nimport { QueryWrapper, QueryWrapperProps } from '../QueryWrapper'\nimport { isRowSelectionVisibleAtom } from '../QueryWrapper/TableRowSelectionState'\nimport { QueryWrapperErrorBoundary } from '../QueryWrapperErrorBoundary'\nimport { SynapseTableConfiguration } from '../SynapseTable'\nimport SearchV2, { SearchV2Props } from '../SynapseTable/SearchV2'\nimport SqlEditor from '../SynapseTable/SqlEditor'\nimport TopLevelControls, {\n TopLevelControlsProps,\n CustomControl,\n} from '../SynapseTable/TopLevelControls/TopLevelControls'\nimport { CustomControls } from '../SynapseTable/CustomControls/CustomControls'\nimport TotalQueryResults from '../TotalQueryResults'\nimport PlotsContainer, {\n PlotsContainerProps,\n} from '../widgets/facet-nav/PlotsContainer'\nimport FacetFilterControls, {\n FacetFilterControlsProps,\n} from '../widgets/query-filter/FacetFilterControls'\nimport { QueryWrapperSynapsePlotProps } from './QueryWrapperSynapsePlot'\nimport { RowSetView } from './RowSetView'\nimport QueryWrapperLoadingScreen from '../QueryWrapper/QueryWrapperLoadingScreen'\n\nexport const QUERY_FILTERS_EXPANDED_CSS: string = 'isShowingFacetFilters'\nexport const QUERY_FILTERS_COLLAPSED_CSS: string = 'isHidingFacetFilters'\n\nexport const HAS_SELECTED_ROWS_CSS: string = 'hasSelectedRows'\n\ntype QueryWrapperPlotNavOwnProps = {\n /** Whether the displayed results should be paginated or infinite. Default for cards is true, default for table is false */\n isInfinite?: boolean\n /** Set to true when you want the query to be saved in the URL search parameters. If you are controlling the view (such as in PortalSearch), you'll want to set this to false */\n shouldDeepLink?: boolean\n /** If onQueryChange is set, the callback will be invoked when the Query changes */\n onQueryChange?: (newQueryJson: string) => void\n /** If onQueryResultBundleChange is set, the callback will be invoked when the QueryResultBundle changes */\n onQueryResultBundleChange?: (newQueryResultBundleJson: string) => void\n /** If initQueryJson is set, it will be the Query used in the initial QueryBundleRequest */\n initQueryJson?: string\n tableConfiguration?: SynapseTableConfiguration\n cardConfiguration?: CardConfiguration\n searchConfiguration?: Omit<\n SearchV2Props,\n 'queryContext' | 'queryVisualizationContext'\n >\n facetsToPlot?: string[]\n availableFacets?: FacetFilterControlsProps['availableFacets']\n initialExpandedFacetControls?: FacetFilterControlsProps['initialExpandedFacetControls']\n customPlots?: QueryWrapperSynapsePlotProps[]\n customControls?: CustomControl[]\n defaultColumn?: string\n defaultShowSearchBox?: boolean\n lockedColumn?: QueryWrapperProps['lockedColumn']\n initialLimit?: number\n hideTopLevelControls?: boolean\n} & Omit<TopLevelControlsProps, 'entityId'> &\n Pick<QueryWrapperPlotNavCustomPlotParams, 'onCustomPlotClick'> &\n Pick<\n QueryWrapperProps,\n | 'isRowSelectionVisible'\n | 'rowSelectionPrimaryKey'\n | 'isRowSelectionUIFloating'\n | 'fileIdColumnName'\n | 'fileNameColumnName'\n | 'fileVersionColumnName'\n > &\n Pick<\n QueryVisualizationWrapperProps,\n | 'defaultShowPlots'\n | 'visibleColumnCount'\n | 'hiddenColumns'\n | 'columnAliases'\n | 'renderFacetValue'\n | 'rgbIndex'\n | 'showLastUpdatedOn'\n | 'noContentPlaceholderType'\n | 'unitDescription'\n | 'additionalFiltersSessionStorageKey'\n | 'helpConfiguration'\n | 'hideCopyToClipboard'\n | 'hideSearchBarControl'\n | 'hideVisualizationsControl'\n | 'enabledExternalAnalysisPlatforms'\n | 'lockTextMatchesQueryFilterPill'\n > &\n Pick<QueryContextType, 'combineRangeFacetConfig'>\n\nexport type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams &\n PlotsContainerProps &\n QueryWrapperPlotNavOwnProps\n\nexport type QueryWrapperPlotNavContentsProps = Pick<\n QueryWrapperPlotNavProps,\n | 'tableConfiguration'\n | 'name'\n | 'cardConfiguration'\n | 'facetsToPlot'\n | 'availableFacets'\n | 'initialExpandedFacetControls'\n | 'hideDownload'\n | 'hideAddToDownloadListMenuItem'\n | 'hideProgrammaticOptionsMenuItem'\n | 'hideQueryCount'\n | 'hideSqlEditorControl'\n | 'hideVisualizationsControl'\n | 'searchConfiguration'\n | 'enabledExternalAnalysisPlatforms'\n | 'cavaticaConnectAccountURL'\n | 'customControls'\n | 'customPlots'\n | 'fileIdColumnName'\n | 'fileNameColumnName'\n | 'fileVersionColumnName'\n | 'initialLimit'\n | 'initialPlotTypeByFacetColumnName'\n | 'hideTopLevelControls'\n> & {\n isFullTextSearchEnabled: boolean\n remount?: () => void\n}\n\nexport function QueryWrapperPlotNavContents(\n props: QueryWrapperPlotNavContentsProps,\n) {\n const {\n tableConfiguration,\n name,\n cardConfiguration,\n facetsToPlot,\n availableFacets,\n initialExpandedFacetControls,\n hideDownload,\n hideAddToDownloadListMenuItem,\n hideProgrammaticOptionsMenuItem,\n hideQueryCount,\n hideSqlEditorControl,\n hideVisualizationsControl,\n searchConfiguration,\n cavaticaConnectAccountURL,\n customControls,\n remount = () => {},\n isFullTextSearchEnabled,\n customPlots,\n initialLimit,\n initialPlotTypeByFacetColumnName,\n hideTopLevelControls,\n } = props\n const queryContext = useQueryContext()\n const [showExportMetadata, setShowExportMetadata] = useState(false)\n const { hasFacetedSelectColumn: isFaceted, queryMetadataQueryOptions } =\n queryContext\n const { isLoading: isLoadingQueryMetadata } = useQuery(\n queryMetadataQueryOptions,\n )\n\n const isRowSelectionVisible = useAtomValue(isRowSelectionVisibleAtom)\n\n const currentQueryRequest = queryContext.currentQueryRequest\n\n const hasFacetsOrFilters =\n (currentQueryRequest?.query.selectedFacets !== undefined &&\n currentQueryRequest.query.selectedFacets.length > 0) ||\n (currentQueryRequest?.query.additionalFilters !== undefined &&\n currentQueryRequest?.query.additionalFilters.length > 0)\n\n const addToDownloadListRequest =\n useGetAddToDownloadListRequestForCurrentQuery()\n\n return (\n <QueryVisualizationContextConsumer>\n {queryVisualizationContext => {\n if (queryVisualizationContext === undefined) {\n throw new Error(\n 'No queryVisualizationContext found when using QueryVisualizationContextConsumer',\n )\n }\n\n return (\n <Box\n className={`QueryWrapperPlotNav ${\n queryVisualizationContext.showFacetFilter\n ? QUERY_FILTERS_EXPANDED_CSS\n : QUERY_FILTERS_COLLAPSED_CSS\n } ${isRowSelectionVisible ? HAS_SELECTED_ROWS_CSS : ''} ${\n hideTopLevelControls ? 'isHidingTopLevelControls' : ''\n }`}\n sx={{\n '*': {\n cursor: isLoadingQueryMetadata ? 'wait' : undefined,\n },\n }}\n >\n <QueryWrapperErrorBoundary>\n {isFullTextSearchEnabled ? (\n <FullTextSearch ftsConfig={searchConfiguration?.ftsConfig} />\n ) : (\n <SearchV2\n {...searchConfiguration}\n queryContext={queryContext}\n queryVisualizationContext={queryVisualizationContext}\n />\n )}\n <SqlEditor />\n {queryVisualizationContext.showDownloadConfirmation && (\n <AddToDownloadListConfirmationAlert\n addToDownloadListRequest={addToDownloadListRequest}\n onClose={() =>\n queryVisualizationContext.setShowDownloadConfirmation(false)\n }\n />\n )}\n {!hideTopLevelControls && (\n <SynapseErrorBoundary>\n <TopLevelControls\n showColumnSelection={tableConfiguration !== undefined}\n name={name}\n hideDownload={hideDownload}\n hideAddToDownloadListMenuItem={\n hideAddToDownloadListMenuItem\n }\n hideProgrammaticOptionsMenuItem={\n hideProgrammaticOptionsMenuItem\n }\n hideQueryCount={hideQueryCount}\n hideFacetFilterControl={!isFaceted}\n hideVisualizationsControl={\n !isFaceted || hideVisualizationsControl\n }\n hideSqlEditorControl={hideSqlEditorControl}\n cavaticaConnectAccountURL={cavaticaConnectAccountURL}\n remount={remount}\n customControls={customControls}\n />\n </SynapseErrorBoundary>\n )}\n {isFaceted && (\n <>\n <FacetFilterControls\n availableFacets={availableFacets}\n initialExpandedFacetControls={initialExpandedFacetControls}\n />\n </>\n )}\n {/* Isolated Suspense so that metadata loading does not hide the table */}\n <Suspense fallback={null}>\n <TotalQueryResults\n frontText={''}\n endText={hasFacetsOrFilters ? 'filtered by' : ''}\n hideIfUnfiltered={true}\n />\n </Suspense>\n <CustomControls\n customControls={customControls}\n remount={remount}\n />\n <PlotsContainer\n facetsToPlot={facetsToPlot}\n customPlots={customPlots}\n initialPlotTypeByFacetColumnName={\n initialPlotTypeByFacetColumnName\n }\n />\n <RowSetView\n tableConfiguration={tableConfiguration}\n hideDownload={hideDownload}\n cardConfiguration={cardConfiguration}\n initialLimit={initialLimit}\n />\n {showExportMetadata && (\n <ModalDownload\n getLastQueryRequest={queryContext?.getCurrentQueryRequest}\n onClose={() => setShowExportMetadata(false)}\n />\n )}\n </QueryWrapperErrorBoundary>\n </Box>\n )\n }}\n </QueryVisualizationContextConsumer>\n )\n}\n\nexport default function QueryWrapperPlotNav(props: QueryWrapperPlotNavProps) {\n const {\n sql: deprecatedSql,\n tableConfiguration,\n isInfinite = !tableConfiguration,\n limit = DEFAULT_PAGE_SIZE,\n showLastUpdatedOn,\n unitDescription,\n additionalFiltersSessionStorageKey,\n helpConfiguration,\n customPlots,\n enabledExternalAnalysisPlatforms,\n } = props\n\n const sql = props.query?.sql ?? deprecatedSql ?? ''\n const { entityId, versionNumber } =\n parseEntityIdAndVersionFromSqlStatement(sql)\n\n const query: Query = useMemo(() => {\n if (props.query) {\n // use query if set\n return props.query\n } else if (props.initQueryJson) {\n // Otherwise use initQueryJson\n return JSON.parse(props.initQueryJson) as Query\n } else {\n // use the deprecated sql, searchParams, and sqlOperator\n const additionalFilters = getAdditionalFilters(\n props.searchParams,\n props.sqlOperator,\n additionalFiltersSessionStorageKey,\n )\n return {\n sql: deprecatedSql!,\n additionalFilters,\n limit: limit,\n offset: 0,\n }\n }\n }, [\n props.query,\n props.initQueryJson,\n props.searchParams,\n props.sqlOperator,\n additionalFiltersSessionStorageKey,\n deprecatedSql,\n limit,\n ])\n\n const [componentKey, setComponentKey] = useState(1)\n const remount = () => {\n setComponentKey(componentKey + 1)\n }\n\n const { data: entity } = useGetEntity(entityId, versionNumber)\n const initQueryRequest: QueryBundleRequest = {\n entityId: entityId ?? '',\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS |\n SynapseConstants.BUNDLE_MASK_QUERY_COUNT |\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE |\n SynapseConstants.BUNDLE_MASK_QUERY_COLUMN_MODELS |\n SynapseConstants.BUNDLE_MASK_QUERY_FACETS |\n SynapseConstants.BUNDLE_MASK_SUM_FILES_SIZE_BYTES |\n SynapseConstants.BUNDLE_MASK_LAST_UPDATED_ON,\n query,\n }\n const isFullTextSearchEnabled =\n (entity && isTable(entity) && entity.isSearchEnabled) ?? false\n\n /**\n * Fully re-render the uncontrolled QueryWrapper component when the initial query changes. This eliminates a class of\n * bugs where our 'derived' state (the current query), which should be reset, is out of sync with props.\n *\n * See https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key\n */\n const queryWrapperKey = `${JSON.stringify(initQueryRequest)}-${componentKey}`\n\n return (\n <QueryWrapper\n {...props}\n initQueryRequest={initQueryRequest}\n key={queryWrapperKey}\n isInfinite={isInfinite}\n >\n <Suspense fallback={<QueryWrapperLoadingScreen />}>\n <QueryVisualizationWrapper\n unitDescription={unitDescription}\n rgbIndex={props.rgbIndex}\n columnAliases={props.columnAliases}\n renderFacetValue={props.renderFacetValue}\n dataUseModifiersColumnName={\n props.cardConfiguration?.genericCardSchema\n ?.dataUseModifiersColumnName\n }\n helpConfiguration={helpConfiguration}\n visibleColumnCount={props.visibleColumnCount}\n hiddenColumns={props.hiddenColumns}\n defaultShowPlots={props.defaultShowPlots}\n hideCopyToClipboard={props.hideCopyToClipboard}\n defaultShowSearchBar={\n (props.defaultShowSearchBox || isFullTextSearchEnabled) &&\n !props.hideSearchBarControl\n }\n lockTextMatchesQueryFilterPill={props.lockTextMatchesQueryFilterPill}\n hideSearchBarControl={props.hideSearchBarControl}\n showLastUpdatedOn={showLastUpdatedOn}\n noContentPlaceholderType={NoContentPlaceholderType.INTERACTIVE}\n hasCustomPlots={Array.isArray(customPlots) && customPlots.length > 0}\n enabledExternalAnalysisPlatforms={enabledExternalAnalysisPlatforms}\n >\n <QueryWrapperPlotNavContents\n {...props}\n isFullTextSearchEnabled={isFullTextSearchEnabled}\n remount={remount}\n />\n </QueryVisualizationWrapper>\n </Suspense>\n </QueryWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAa,IAAqC,yBACrC,IAAsC,wBAEtC,IAAgC;AA+F7C,SAAgB,EACd,GACA;CACA,IAAM,EACJ,uBACA,SACA,sBACA,iBACA,oBACA,iCACA,iBACA,kCACA,oCACA,mBACA,yBACA,8BACA,wBACA,8BACA,mBACA,mBAAgB,CAAC,GACjB,6BACA,gBACA,iBACA,qCACA,4BACE,GACE,IAAe,EAAgB,GAC/B,CAAC,GAAoB,KAAyB,EAAS,EAAK,GAC5D,EAAE,wBAAwB,GAAW,kCACzC,GACI,EAAE,WAAW,OAA2B,EAC5C,EACF,GAEM,KAAwB,EAAa,CAAyB,GAE9D,IAAsB,EAAa,qBAEnC,KACH,GAAqB,MAAM,mBAAmB,K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,sBAAsB,EAAM;GACT;GACnB,0BAA0B,EAAyB;GACnD,gBAAgB,MAAM,QAAQ,CAAW,KAAK,EAAY,SAAS;GACjC;aAElC,kBAAC,GAAD;IACE,GAAI;IACqB;IAChB;GACV,CAAA;EACwB,CAAA;CACnB,CAAA,CACE;AAElB"}
|
|
1
|
+
{"version":3,"file":"QueryWrapperPlotNav.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx"],"sourcesContent":["import { QueryOrDeprecatedSearchParams } from '@/components/CardContainerLogic/CardContainerLogic'\nimport AddToDownloadListConfirmationAlert from '@/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'\nimport { useGetAddToDownloadListRequestForCurrentQuery } from '@/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery'\nimport { NoContentPlaceholderType } from '@/components/SynapseTable/NoContentPlaceholderType'\nimport { useGetEntity } from '@/synapse-queries'\nimport { SynapseConstants } from '@/utils'\nimport {\n getAdditionalFilters,\n parseEntityIdAndVersionFromSqlStatement,\n} from '@/utils/functions'\nimport { isTable } from '@/utils/functions/EntityTypeUtils'\nimport { DEFAULT_PAGE_SIZE } from '@/utils/SynapseConstants'\nimport { Box } from '@mui/material'\nimport { Query, QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { useQuery } from '@tanstack/react-query'\nimport { useAtomValue } from 'jotai'\nimport { Suspense, useMemo, useState } from 'react'\nimport { CardConfiguration } from '../CardContainer/CardConfiguration'\nimport { SynapseErrorBoundary } from '../error'\nimport FullTextSearch from '../FullTextSearch/FullTextSearch'\nimport ModalDownload from '../ModalDownload/ModalDownload'\nimport { QueryWrapperPlotNavCustomPlotParams } from '../Plot/SynapsePlot'\nimport { QueryContextType, useQueryContext } from '../QueryContext'\nimport {\n QueryVisualizationContextConsumer,\n QueryVisualizationWrapper,\n QueryVisualizationWrapperProps,\n} from '../QueryVisualizationWrapper'\nimport { QueryWrapper, QueryWrapperProps } from '../QueryWrapper'\nimport { isRowSelectionVisibleAtom } from '../QueryWrapper/TableRowSelectionState'\nimport { QueryWrapperErrorBoundary } from '../QueryWrapperErrorBoundary'\nimport { SynapseTableConfiguration } from '../SynapseTable'\nimport SearchV2, { SearchV2Props } from '../SynapseTable/SearchV2'\nimport SqlEditor from '../SynapseTable/SqlEditor'\nimport TopLevelControls, {\n TopLevelControlsProps,\n CustomControl,\n} from '../SynapseTable/TopLevelControls/TopLevelControls'\nimport { CustomControls } from '../SynapseTable/CustomControls/CustomControls'\nimport TotalQueryResults from '../TotalQueryResults'\nimport PlotsContainer, {\n PlotsContainerProps,\n} from '../widgets/facet-nav/PlotsContainer'\nimport FacetFilterControls, {\n FacetFilterControlsProps,\n} from '../widgets/query-filter/FacetFilterControls'\nimport { QueryBuilderControls } from '../QueryBuilder/QueryBuilderControls'\nimport {\n defaultQBGroup,\n hasCompleteCondition,\n} from '../QueryBuilder/queryBuilderOperations'\nimport {\n qbNodeToApiFilter,\n selectedFacetsToQBGroup,\n} from '../QueryBuilder/queryBuilderTranslation'\nimport { QBGroup } from '../QueryBuilder/QueryBuilderTypes'\nimport { ConfirmationDialog } from '../ConfirmationDialog'\nimport { isFilterGroup } from '../../utils/types/IsType'\nimport { QueryWrapperSynapsePlotProps } from './QueryWrapperSynapsePlot'\nimport { RowSetView } from './RowSetView'\nimport QueryWrapperLoadingScreen from '../QueryWrapper/QueryWrapperLoadingScreen'\n\nexport const QUERY_FILTERS_EXPANDED_CSS: string = 'isShowingFacetFilters'\nexport const QUERY_FILTERS_COLLAPSED_CSS: string = 'isHidingFacetFilters'\n\nexport const HAS_SELECTED_ROWS_CSS: string = 'hasSelectedRows'\n\ntype QueryWrapperPlotNavOwnProps = {\n /** Whether the displayed results should be paginated or infinite. Default for cards is true, default for table is false */\n isInfinite?: boolean\n /** Set to true when you want the query to be saved in the URL search parameters. If you are controlling the view (such as in PortalSearch), you'll want to set this to false */\n shouldDeepLink?: boolean\n /** If onQueryChange is set, the callback will be invoked when the Query changes */\n onQueryChange?: (newQueryJson: string) => void\n /** If onQueryResultBundleChange is set, the callback will be invoked when the QueryResultBundle changes */\n onQueryResultBundleChange?: (newQueryResultBundleJson: string) => void\n /** If initQueryJson is set, it will be the Query used in the initial QueryBundleRequest */\n initQueryJson?: string\n tableConfiguration?: SynapseTableConfiguration\n cardConfiguration?: CardConfiguration\n searchConfiguration?: Omit<\n SearchV2Props,\n 'queryContext' | 'queryVisualizationContext'\n >\n facetsToPlot?: string[]\n availableFacets?: FacetFilterControlsProps['availableFacets']\n initialExpandedFacetControls?: FacetFilterControlsProps['initialExpandedFacetControls']\n customPlots?: QueryWrapperSynapsePlotProps[]\n customControls?: CustomControl[]\n defaultColumn?: string\n defaultShowSearchBox?: boolean\n lockedColumn?: QueryWrapperProps['lockedColumn']\n initialLimit?: number\n hideTopLevelControls?: boolean\n /**\n * When true, shows a `Show / Hide Query Builder` toggle in `TopLevelControls`.\n * The QB and the facet nav are mutually exclusive — turning the QB on hides\n * the facet nav entirely.\n */\n showQueryBuilderControl?: boolean\n /**\n * When true, the QB is shown by default. When `showQueryBuilderControl` is\n * also true, the user can toggle it back off from `TopLevelControls`. When\n * `showQueryBuilderControl` is false the QB is permanently displayed with\n * no toggle button.\n */\n defaultShowQueryBuilder?: boolean\n} & Omit<TopLevelControlsProps, 'entityId'> &\n Pick<QueryWrapperPlotNavCustomPlotParams, 'onCustomPlotClick'> &\n Pick<\n QueryWrapperProps,\n | 'isRowSelectionVisible'\n | 'rowSelectionPrimaryKey'\n | 'isRowSelectionUIFloating'\n | 'fileIdColumnName'\n | 'fileNameColumnName'\n | 'fileVersionColumnName'\n > &\n Pick<\n QueryVisualizationWrapperProps,\n | 'defaultShowPlots'\n | 'visibleColumnCount'\n | 'hiddenColumns'\n | 'columnAliases'\n | 'renderFacetValue'\n | 'rgbIndex'\n | 'showLastUpdatedOn'\n | 'noContentPlaceholderType'\n | 'unitDescription'\n | 'additionalFiltersSessionStorageKey'\n | 'helpConfiguration'\n | 'hideCopyToClipboard'\n | 'hideSearchBarControl'\n | 'hideVisualizationsControl'\n | 'enabledExternalAnalysisPlatforms'\n | 'lockTextMatchesQueryFilterPill'\n > &\n Pick<QueryContextType, 'combineRangeFacetConfig'>\n\nexport type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams &\n PlotsContainerProps &\n QueryWrapperPlotNavOwnProps\n\nexport type QueryWrapperPlotNavContentsProps = Pick<\n QueryWrapperPlotNavProps,\n | 'tableConfiguration'\n | 'name'\n | 'cardConfiguration'\n | 'facetsToPlot'\n | 'availableFacets'\n | 'initialExpandedFacetControls'\n | 'hideDownload'\n | 'hideAddToDownloadListMenuItem'\n | 'hideProgrammaticOptionsMenuItem'\n | 'hideQueryCount'\n | 'hideSqlEditorControl'\n | 'hideVisualizationsControl'\n | 'searchConfiguration'\n | 'enabledExternalAnalysisPlatforms'\n | 'cavaticaConnectAccountURL'\n | 'customControls'\n | 'customPlots'\n | 'fileIdColumnName'\n | 'fileNameColumnName'\n | 'fileVersionColumnName'\n | 'initialLimit'\n | 'initialPlotTypeByFacetColumnName'\n | 'hideTopLevelControls'\n | 'showQueryBuilderControl'\n | 'defaultShowQueryBuilder'\n> & {\n isFullTextSearchEnabled: boolean\n remount?: () => void\n}\n\nexport function QueryWrapperPlotNavContents(\n props: QueryWrapperPlotNavContentsProps,\n) {\n const {\n tableConfiguration,\n name,\n cardConfiguration,\n facetsToPlot,\n availableFacets,\n initialExpandedFacetControls,\n hideDownload,\n hideAddToDownloadListMenuItem,\n hideProgrammaticOptionsMenuItem,\n hideQueryCount,\n hideSqlEditorControl,\n hideVisualizationsControl,\n searchConfiguration,\n cavaticaConnectAccountURL,\n customControls,\n remount = () => {},\n isFullTextSearchEnabled,\n customPlots,\n initialLimit,\n initialPlotTypeByFacetColumnName,\n hideTopLevelControls,\n showQueryBuilderControl = false,\n defaultShowQueryBuilder = false,\n } = props\n const queryContext = useQueryContext()\n const [showExportMetadata, setShowExportMetadata] = useState(false)\n const [showQueryBuilder, setShowQueryBuilder] = useState(\n defaultShowQueryBuilder,\n )\n const [qbTree, setQbTree] = useState<QBGroup>(() => defaultQBGroup())\n const [isConfirmingHideQb, setIsConfirmingHideQb] = useState(false)\n const { hasFacetedSelectColumn: isFaceted, queryMetadataQueryOptions } =\n queryContext\n const { executeQueryRequest } = queryContext\n const { isLoading: isLoadingQueryMetadata, data: queryMetadata } = useQuery(\n queryMetadataQueryOptions,\n )\n\n // Facets ↔ QB transitions: switching FF → QB silently translates\n // selectedFacets into the QB tree and swaps them for a FilterGroup in\n // additionalFilters so results stay stable. Switching QB → FF prompts if\n // the QB has meaningful state (a completed condition or an applied filter),\n // since we can't losslessly reverse the translation.\n const enterQueryBuilder = () => {\n const selectedFacets = queryContext.currentQueryRequest.query.selectedFacets\n if (selectedFacets && selectedFacets.length > 0) {\n const translated = selectedFacetsToQBGroup(\n selectedFacets,\n queryMetadata?.columnModels,\n )\n const asFilter = qbNodeToApiFilter(translated)\n setQbTree(translated)\n executeQueryRequest(prev => ({\n ...prev,\n query: {\n ...prev.query,\n selectedFacets: undefined,\n additionalFilters: asFilter\n ? [\n ...(prev.query.additionalFilters ?? []).filter(\n f => !isFilterGroup(f),\n ),\n asFilter,\n ]\n : prev.query.additionalFilters,\n },\n }))\n }\n setShowQueryBuilder(true)\n }\n\n const exitQueryBuilder = () => {\n setQbTree(defaultQBGroup())\n executeQueryRequest(prev => ({\n ...prev,\n query: {\n ...prev.query,\n additionalFilters: prev.query.additionalFilters?.filter(\n f => !isFilterGroup(f),\n ),\n },\n }))\n setShowQueryBuilder(false)\n }\n\n const handleToggleQueryBuilder = () => {\n if (!showQueryBuilder) {\n enterQueryBuilder()\n return\n }\n const hasFilterGroupApplied =\n queryContext.currentQueryRequest.query.additionalFilters?.some(\n isFilterGroup,\n ) ?? false\n if (hasCompleteCondition(qbTree) || hasFilterGroupApplied) {\n setIsConfirmingHideQb(true)\n return\n }\n exitQueryBuilder()\n }\n\n const isRowSelectionVisible = useAtomValue(isRowSelectionVisibleAtom)\n\n const currentQueryRequest = queryContext.currentQueryRequest\n\n const hasFacetsOrFilters =\n (currentQueryRequest?.query.selectedFacets !== undefined &&\n currentQueryRequest.query.selectedFacets.length > 0) ||\n (currentQueryRequest?.query.additionalFilters !== undefined &&\n currentQueryRequest?.query.additionalFilters.length > 0)\n\n const addToDownloadListRequest =\n useGetAddToDownloadListRequestForCurrentQuery()\n\n return (\n <QueryVisualizationContextConsumer>\n {queryVisualizationContext => {\n if (queryVisualizationContext === undefined) {\n throw new Error(\n 'No queryVisualizationContext found when using QueryVisualizationContextConsumer',\n )\n }\n\n return (\n <Box\n className={`QueryWrapperPlotNav ${\n queryVisualizationContext.showFacetFilter && !showQueryBuilder\n ? QUERY_FILTERS_EXPANDED_CSS\n : QUERY_FILTERS_COLLAPSED_CSS\n } ${isRowSelectionVisible ? HAS_SELECTED_ROWS_CSS : ''} ${\n hideTopLevelControls ? 'isHidingTopLevelControls' : ''\n } ${showQueryBuilder ? 'isShowingQueryBuilder' : ''}`}\n sx={{\n '*': {\n cursor: isLoadingQueryMetadata ? 'wait' : undefined,\n },\n }}\n >\n <QueryWrapperErrorBoundary>\n {isFullTextSearchEnabled ? (\n <FullTextSearch ftsConfig={searchConfiguration?.ftsConfig} />\n ) : (\n <SearchV2\n {...searchConfiguration}\n queryContext={queryContext}\n queryVisualizationContext={queryVisualizationContext}\n />\n )}\n <SqlEditor />\n {queryVisualizationContext.showDownloadConfirmation && (\n <AddToDownloadListConfirmationAlert\n addToDownloadListRequest={addToDownloadListRequest}\n onClose={() =>\n queryVisualizationContext.setShowDownloadConfirmation(false)\n }\n />\n )}\n {!hideTopLevelControls && (\n <SynapseErrorBoundary>\n <TopLevelControls\n showColumnSelection={tableConfiguration !== undefined}\n name={name}\n hideDownload={hideDownload}\n hideAddToDownloadListMenuItem={\n hideAddToDownloadListMenuItem\n }\n hideProgrammaticOptionsMenuItem={\n hideProgrammaticOptionsMenuItem\n }\n hideQueryCount={hideQueryCount}\n hideFacetFilterControl={!isFaceted || showQueryBuilder}\n hideVisualizationsControl={\n !isFaceted || hideVisualizationsControl\n }\n hideSqlEditorControl={hideSqlEditorControl}\n cavaticaConnectAccountURL={cavaticaConnectAccountURL}\n remount={remount}\n customControls={customControls}\n showQueryBuilderControl={showQueryBuilderControl}\n showQueryBuilder={showQueryBuilder}\n onToggleQueryBuilder={handleToggleQueryBuilder}\n />\n </SynapseErrorBoundary>\n )}\n {showQueryBuilder ? (\n <Suspense fallback={null}>\n <div className=\"QueryBuilderControls\">\n <QueryBuilderControls\n tree={qbTree}\n onTreeChange={setQbTree}\n />\n </div>\n </Suspense>\n ) : (\n isFaceted && (\n <FacetFilterControls\n availableFacets={availableFacets}\n initialExpandedFacetControls={initialExpandedFacetControls}\n />\n )\n )}\n {/* Isolated Suspense so that metadata loading does not hide the table */}\n <Suspense fallback={null}>\n <TotalQueryResults\n frontText={''}\n endText={hasFacetsOrFilters ? 'filtered by' : ''}\n hideIfUnfiltered={true}\n />\n </Suspense>\n <CustomControls\n customControls={customControls}\n remount={remount}\n />\n <PlotsContainer\n facetsToPlot={facetsToPlot}\n customPlots={customPlots}\n initialPlotTypeByFacetColumnName={\n initialPlotTypeByFacetColumnName\n }\n />\n <RowSetView\n tableConfiguration={tableConfiguration}\n hideDownload={hideDownload}\n cardConfiguration={cardConfiguration}\n initialLimit={initialLimit}\n />\n {showExportMetadata && (\n <ModalDownload\n getLastQueryRequest={queryContext?.getCurrentQueryRequest}\n onClose={() => setShowExportMetadata(false)}\n />\n )}\n <ConfirmationDialog\n open={isConfirmingHideQb}\n title=\"Hide Query Builder?\"\n content=\"Hiding the Query Builder will clear the conditions you've built. This can't be undone.\"\n confirmButtonProps={{\n children: 'Hide Query Builder',\n color: 'error',\n variant: 'contained',\n }}\n onConfirm={() => {\n setIsConfirmingHideQb(false)\n exitQueryBuilder()\n }}\n onCancel={() => setIsConfirmingHideQb(false)}\n />\n </QueryWrapperErrorBoundary>\n </Box>\n )\n }}\n </QueryVisualizationContextConsumer>\n )\n}\n\nexport default function QueryWrapperPlotNav(props: QueryWrapperPlotNavProps) {\n const {\n sql: deprecatedSql,\n tableConfiguration,\n isInfinite = !tableConfiguration,\n limit = DEFAULT_PAGE_SIZE,\n showLastUpdatedOn,\n unitDescription,\n additionalFiltersSessionStorageKey,\n helpConfiguration,\n customPlots,\n enabledExternalAnalysisPlatforms,\n } = props\n\n const sql = props.query?.sql ?? deprecatedSql ?? ''\n const { entityId, versionNumber } =\n parseEntityIdAndVersionFromSqlStatement(sql)\n\n const query: Query = useMemo(() => {\n if (props.query) {\n // use query if set\n return props.query\n } else if (props.initQueryJson) {\n // Otherwise use initQueryJson\n return JSON.parse(props.initQueryJson) as Query\n } else {\n // use the deprecated sql, searchParams, and sqlOperator\n const additionalFilters = getAdditionalFilters(\n props.searchParams,\n props.sqlOperator,\n additionalFiltersSessionStorageKey,\n )\n return {\n sql: deprecatedSql!,\n additionalFilters,\n limit: limit,\n offset: 0,\n }\n }\n }, [\n props.query,\n props.initQueryJson,\n props.searchParams,\n props.sqlOperator,\n additionalFiltersSessionStorageKey,\n deprecatedSql,\n limit,\n ])\n\n const [componentKey, setComponentKey] = useState(1)\n const remount = () => {\n setComponentKey(componentKey + 1)\n }\n\n const { data: entity } = useGetEntity(entityId, versionNumber)\n const initQueryRequest: QueryBundleRequest = {\n entityId: entityId ?? '',\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS |\n SynapseConstants.BUNDLE_MASK_QUERY_COUNT |\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE |\n SynapseConstants.BUNDLE_MASK_QUERY_COLUMN_MODELS |\n SynapseConstants.BUNDLE_MASK_QUERY_FACETS |\n SynapseConstants.BUNDLE_MASK_SUM_FILES_SIZE_BYTES |\n SynapseConstants.BUNDLE_MASK_LAST_UPDATED_ON,\n query,\n }\n const isFullTextSearchEnabled =\n (entity && isTable(entity) && entity.isSearchEnabled) ?? false\n\n /**\n * Fully re-render the uncontrolled QueryWrapper component when the initial query changes. This eliminates a class of\n * bugs where our 'derived' state (the current query), which should be reset, is out of sync with props.\n *\n * See https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key\n */\n const queryWrapperKey = `${JSON.stringify(initQueryRequest)}-${componentKey}`\n\n return (\n <QueryWrapper\n {...props}\n initQueryRequest={initQueryRequest}\n key={queryWrapperKey}\n isInfinite={isInfinite}\n >\n <Suspense fallback={<QueryWrapperLoadingScreen />}>\n <QueryVisualizationWrapper\n unitDescription={unitDescription}\n rgbIndex={props.rgbIndex}\n columnAliases={props.columnAliases}\n renderFacetValue={props.renderFacetValue}\n dataUseModifiersColumnName={\n props.cardConfiguration?.genericCardSchema\n ?.dataUseModifiersColumnName\n }\n helpConfiguration={helpConfiguration}\n visibleColumnCount={props.visibleColumnCount}\n hiddenColumns={props.hiddenColumns}\n defaultShowPlots={props.defaultShowPlots}\n hideCopyToClipboard={props.hideCopyToClipboard}\n defaultShowSearchBar={\n (props.defaultShowSearchBox || isFullTextSearchEnabled) &&\n !props.hideSearchBarControl\n }\n lockTextMatchesQueryFilterPill={props.lockTextMatchesQueryFilterPill}\n hideSearchBarControl={props.hideSearchBarControl}\n showLastUpdatedOn={showLastUpdatedOn}\n noContentPlaceholderType={NoContentPlaceholderType.INTERACTIVE}\n hasCustomPlots={Array.isArray(customPlots) && customPlots.length > 0}\n enabledExternalAnalysisPlatforms={enabledExternalAnalysisPlatforms}\n >\n <QueryWrapperPlotNavContents\n {...props}\n isFullTextSearchEnabled={isFullTextSearchEnabled}\n remount={remount}\n />\n </QueryVisualizationWrapper>\n </Suspense>\n </QueryWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,IAAa,IAAqC,yBACrC,IAAsC,w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M,EAAE,MAAM,MAAW,EAAa,GAAU,CAAa,GACvD,IAAuC;EAC3C,UAAU,KAAY;EACtB,cAAc;EACd,UACE;EAQF;CACF,GACM,KACH,KAAU,EAAQ,CAAM,KAAK,EAAO,oBAAoB,IAQrD,IAAkB,GAAG,KAAK,UAAU,CAAgB,EAAE,GAAG;CAE/D,OACE,kBAAC,GAAD;EACE,GAAI;EACc;EAClB,KAAK;EACO;CAmCA,GAjCZ,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,CAA4B,CAAA;YAC9C,kBAAC,GAAD;GACmB;GACjB,UAAU,EAAM;GAChB,eAAe,EAAM;GACrB,kBAAkB,EAAM;GACxB,4BACE,EAAM,mBAAmB,mBACrB;GAEa;GACnB,oBAAoB,EAAM;GAC1B,eAAe,EAAM;GACrB,kBAAkB,EAAM;GACxB,qBAAqB,EAAM;GAC3B,uBACG,EAAM,wBAAwB,MAC/B,CAAC,EAAM;GAET,gCAAgC,EAAM;GACtC,sBAAsB,EAAM;GACT;GACnB,0BAA0B,EAAyB;GACnD,gBAAgB,MAAM,QAAQ,CAAW,KAAK,EAAY,SAAS;GACjC;aAElC,kBAAC,GAAD;IACE,GAAI;IACqB;IAChB;GACV,CAAA;EACwB,CAAA;CACnB,CAAA,CACE;AAElB"}
|
|
@@ -11,6 +11,7 @@ export type RssFeedCardsProps = {
|
|
|
11
11
|
mailChimpListName?: string;
|
|
12
12
|
mailChimpUrl?: string;
|
|
13
13
|
viewAllNewsButtonText?: string;
|
|
14
|
+
hideDate?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export declare function RssFeedCards(props: RssFeedCardsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default RssFeedCards;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RssFeedCards.d.ts","sourceRoot":"","sources":["../../../src/components/RssFeedCards/RssFeedCards.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAA0B,MAAM,uBAAuB,CAAA;A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CAAC,CAGf"}
|
|
@@ -23,8 +23,8 @@ function m(e) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function h(s) {
|
|
26
|
-
let { url: d, filter: f, itemsToShow: h, allowCategories: g, mailChimpListName: _, mailChimpUrl: v, viewAllNewsButtonText: y } = s, { allItemsUrl:
|
|
27
|
-
return
|
|
26
|
+
let { url: d, filter: f, itemsToShow: h, allowCategories: g, mailChimpListName: _, mailChimpUrl: v, viewAllNewsButtonText: y, hideDate: b } = s, { allItemsUrl: x, feedUrl: S } = p(d, f), { data: C, isError: w } = c(m(S)), [T, E] = r(!1);
|
|
27
|
+
return C?.items?.length === 0 ? /* @__PURE__ */ o("div", {
|
|
28
28
|
className: "text-center SRCBorderedPanel SRCBorderedPanel--padded2x",
|
|
29
29
|
children: [e, /* @__PURE__ */ a("div", {
|
|
30
30
|
style: {
|
|
@@ -35,11 +35,11 @@ function h(s) {
|
|
|
35
35
|
})]
|
|
36
36
|
}) : /* @__PURE__ */ o(i, { children: [v && /* @__PURE__ */ o("div", {
|
|
37
37
|
className: "FeedSubscribe",
|
|
38
|
-
children: [!
|
|
38
|
+
children: [!T && /* @__PURE__ */ o("a", {
|
|
39
39
|
className: "FeedSubscribeToNewsLink SRC-no-border-bottom-imp",
|
|
40
|
-
onClick: () =>
|
|
40
|
+
onClick: () => E(!0),
|
|
41
41
|
children: [/* @__PURE__ */ a(n, { title: "Subscribe to News" }), "Subscribe to News"]
|
|
42
|
-
}),
|
|
42
|
+
}), T && /* @__PURE__ */ o("div", {
|
|
43
43
|
className: "MailchimpSubscribeContainer",
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ a(n, { title: "Subscribe to News" }),
|
|
@@ -59,7 +59,7 @@ function h(s) {
|
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ a("div", {
|
|
61
61
|
className: "FeedItems",
|
|
62
|
-
children:
|
|
62
|
+
children: C?.items && C.items.map((e, t) => {
|
|
63
63
|
if (!(t >= h)) return /* @__PURE__ */ a("div", {
|
|
64
64
|
className: "FeedItem",
|
|
65
65
|
children: /* @__PURE__ */ o("div", { children: [
|
|
@@ -68,7 +68,7 @@ function h(s) {
|
|
|
68
68
|
children: e.categories?.map((t) => {
|
|
69
69
|
let n = t.toLowerCase();
|
|
70
70
|
return g?.findIndex((e) => n === e.toLowerCase()) === -1 ? null : /* @__PURE__ */ a("a", {
|
|
71
|
-
href: `${
|
|
71
|
+
href: `${C.link}/tag/${t.replace(" ", "-")}`,
|
|
72
72
|
className: "SRC-no-border-bottom-imp",
|
|
73
73
|
target: "_blank",
|
|
74
74
|
rel: "noopener noreferrer",
|
|
@@ -79,7 +79,7 @@ function h(s) {
|
|
|
79
79
|
}, `${e.guid}_${t}`);
|
|
80
80
|
})
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */ a("p", {
|
|
82
|
+
!b && /* @__PURE__ */ a("p", {
|
|
83
83
|
className: "FeedItemDate",
|
|
84
84
|
children: l(e.isoDate).format("MMMM YYYY")
|
|
85
85
|
}),
|
|
@@ -102,17 +102,17 @@ function h(s) {
|
|
|
102
102
|
}, e.guid);
|
|
103
103
|
})
|
|
104
104
|
}),
|
|
105
|
-
|
|
105
|
+
C?.items && C.items.length > h && x && /* @__PURE__ */ a("div", {
|
|
106
106
|
className: "FeedViewAllNewsButtonContainer",
|
|
107
107
|
children: /* @__PURE__ */ a(t, {
|
|
108
108
|
color: "secondary",
|
|
109
109
|
variant: "contained",
|
|
110
|
-
onClick: () => window.open(
|
|
110
|
+
onClick: () => window.open(x, "_blank", "noopener"),
|
|
111
111
|
target: "_blank",
|
|
112
112
|
children: y ?? "View All News"
|
|
113
113
|
})
|
|
114
114
|
}),
|
|
115
|
-
|
|
115
|
+
w && /* @__PURE__ */ o("div", { children: ["Unable to load feed: ", d] })
|
|
116
116
|
]
|
|
117
117
|
})] });
|
|
118
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RssFeedCards.js","names":[],"sources":["../../../src/components/RssFeedCards/RssFeedCards.tsx"],"sourcesContent":["import NoData from '@/assets/icons/NoData'\nimport { ReactComponent as SubscribePlus } from '@/assets/icons/subscribe_plus.svg'\nimport LargeButton from '@/components/styled/LargeButton'\nimport dayjs from 'dayjs'\nimport MailchimpSubscribe from 'react-mailchimp-subscribe'\nimport Parser from 'rss-parser'\nimport { QueryClient, queryOptions, useQuery } from '@tanstack/react-query'\nimport { useState } from 'react'\n\nconst rssParser = new Parser()\n\nexport type RssFilter = {\n type?: 'tag' | 'category'\n value: string\n}\n\nexport type RssFeedCardsProps = {\n url: string\n filter?: RssFilter // optional tag or category to use as a filter\n itemsToShow: number\n allowCategories?: string[]\n mailChimpListName?: string\n mailChimpUrl?: string\n viewAllNewsButtonText?: string\n}\n\nfunction buildRssFeedUrl(url: string, filter?: RssFilter) {\n const filterValue = filter?.value\n const filterType = filter?.type\n const tagPath = filterValue\n ? `/${filterType ?? 'tag'}/${filterValue.replace(' ', '-')}`\n : ''\n const allItemsUrl = `${url}${tagPath}`\n const feedUrl = `${allItemsUrl}/?feed=rss2`\n return { allItemsUrl, feedUrl }\n}\n\nfunction getRssFeedQueryOptions(feedUrl: string) {\n return queryOptions({\n queryKey: ['rssFeed', feedUrl],\n queryFn: () =>\n fetch(feedUrl)\n .then(response => response.text())\n .then(responseData => rssParser.parseString(responseData)),\n })\n}\n\nexport function RssFeedCards(props: RssFeedCardsProps) {\n const {\n url,\n filter,\n itemsToShow,\n allowCategories,\n mailChimpListName,\n mailChimpUrl,\n viewAllNewsButtonText,\n } = props\n\n const { allItemsUrl, feedUrl } = buildRssFeedUrl(url, filter)\n\n const { data: rssFeed, isError } = useQuery(getRssFeedQueryOptions(feedUrl))\n\n const [isShowingSubscribeUI, setIsShowingSubscribeUI] = useState(false)\n\n if (rssFeed?.items?.length === 0) {\n return (\n <div className=\"text-center SRCBorderedPanel SRCBorderedPanel--padded2x\">\n {NoData}\n <div style={{ marginTop: '20px', fontStyle: 'italic' }}>\n There are no items currently available\n </div>\n </div>\n )\n }\n return (\n <>\n {mailChimpUrl && (\n <div className=\"FeedSubscribe\">\n {!isShowingSubscribeUI && (\n <a\n className=\"FeedSubscribeToNewsLink SRC-no-border-bottom-imp\"\n onClick={() => setIsShowingSubscribeUI(true)}\n >\n <SubscribePlus title=\"Subscribe to News\" />\n Subscribe to News\n </a>\n )}\n {isShowingSubscribeUI && (\n <div className=\"MailchimpSubscribeContainer\">\n <SubscribePlus title=\"Subscribe to News\" />\n <p>\n Subscribe to receive the {mailChimpListName} by e-mail, which\n provides information and updates related to the Portal. You can\n opt out at any time by using the unsubscribe link within the\n e-mail. We will not share your information with any third\n parties or use it for any other purposes.\n </p>\n <div className=\"SRC-marginBottomTop\">\n <MailchimpSubscribe url={mailChimpUrl} />\n </div>\n </div>\n )}\n </div>\n )}\n <div className=\"Feed\">\n <div className=\"FeedItems\">\n {rssFeed?.items &&\n rssFeed.items.map((item, index) => {\n // The other is to hide the large number of items in a particular feed (usually a max of 10 are returned). See state.isShowingMoreItems\n if (index >= itemsToShow) {\n return\n }\n\n return (\n <div key={item.guid} className={`FeedItem`}>\n <div>\n {allowCategories && allowCategories.length > 0 && (\n <div className=\"FeedItemCategories\">\n {item.categories?.map((categoryName: string) => {\n // are we allowed to show this category/tag?\n const categoryNameLowerCase =\n categoryName.toLowerCase()\n if (\n allowCategories?.findIndex(\n item =>\n categoryNameLowerCase === item.toLowerCase(),\n ) === -1\n )\n return null\n // else\n return (\n <a\n href={`${rssFeed.link}/tag/${categoryName.replace(\n ' ',\n '-',\n )}`}\n className=\"SRC-no-border-bottom-imp\"\n key={`${item.guid}_${categoryName}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <div className=\"FeedItemCategory\">\n {categoryName}\n </div>\n </a>\n )\n })}\n </div>\n )}\n <p className=\"FeedItemDate\">\n {dayjs(item.isoDate).format('MMMM YYYY')}\n </p>\n <p className=\"FeedItemTitle\">{item.title}</p>\n <div className=\"FeedItemDescription\">\n {item.contentSnippet?.replace(/\\[...\\]|\\[…\\]/gm, '…')}\n </div>\n <a\n className=\"FeedItemLink\"\n href={item.link}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Continue reading\n </a>\n </div>\n </div>\n )\n })}\n </div>\n {rssFeed?.items &&\n rssFeed.items.length > itemsToShow &&\n allItemsUrl && (\n <div className=\"FeedViewAllNewsButtonContainer\">\n <LargeButton\n color=\"secondary\"\n variant=\"contained\"\n onClick={() => window.open(allItemsUrl, '_blank', 'noopener')}\n // @ts-expect-error - target prop exists, but TS doesn't recognize on styled component\n target=\"_blank\"\n >\n {viewAllNewsButtonText ?? 'View All News'}\n </LargeButton>\n </div>\n )}\n {isError && <div>Unable to load feed: {url}</div>}\n </div>\n </>\n )\n}\n\nexport default RssFeedCards\n\n/**\n * Prefetches the RSS feed into a QueryClient for use with HydrationBoundary.\n * Uses the same query key as the RssFeedCards component.\n */\nexport async function prefetchRssFeed(\n queryClient: QueryClient,\n url: string,\n filter?: RssFilter,\n): Promise<void> {\n const { feedUrl } = buildRssFeedUrl(url, filter)\n await queryClient.prefetchQuery(getRssFeedQueryOptions(feedUrl))\n}\n"],"mappings":";;;;;;;;;;AASA,IAAM,IAAY,IAAI,EAAO;AAiB7B,SAAS,EAAgB,GAAa,GAAoB;CACxD,IAAM,IAAc,GAAQ,OACtB,IAAa,GAAQ,MAIrB,IAAc,GAAG,IAHP,IACZ,IAAI,KAAc,MAAM,GAAG,EAAY,QAAQ,KAAK,GAAG,MACvD;CAGJ,OAAO;EAAE;EAAa,SAAA,GADH,EAAY;CACD;AAChC;AAEA,SAAS,EAAuB,GAAiB;CAC/C,OAAO,EAAa;EAClB,UAAU,CAAC,WAAW,CAAO;EAC7B,eACE,MAAM,CAAO,EACV,MAAK,MAAY,EAAS,KAAK,CAAC,EAChC,MAAK,MAAgB,EAAU,YAAY,CAAY,CAAC;CAC/D,CAAC;AACH;AAEA,SAAgB,EAAa,GAA0B;CACrD,IAAM,EACJ,QACA,W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OAAO,EAAa,QACxC,KACA,GACF;UACA,WAAU;UAEV,QAAO;UACP,KAAI;oBAEJ,kBAAC,OAAD;WAAK,WAAU;qBACZ;UACE,CAAA;SACJ,GAPI,GAAG,EAAK,KAAK,GAAG,GAOpB;QAEP,CAAC;OACE,CAAA;OAEP,kBAAC,KAAD;QAAG,WAAU;kBACV,EAAM,EAAK,OAAO,EAAE,OAAO,WAAW;OACtC,CAAA;OACH,kBAAC,KAAD;QAAG,WAAU;kBAAiB,EAAK;OAAS,CAAA;OAC5C,kBAAC,OAAD;QAAK,WAAU;kBACZ,EAAK,gBAAgB,QAAQ,mBAAmB,GAAG;OACjD,CAAA;OACL,kBAAC,KAAD;QACE,WAAU;QACV,MAAM,EAAK;QACX,QAAO;QACP,KAAI;kBACL;OAEE,CAAA;MACA,EAAA,CAAA;KACF,GAnDK,EAAK,IAmDV;IAET,CAAC;GACA,CAAA;GACJ,GAAS,SACR,EAAQ,MAAM,SAAS,KACvB,KACE,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD;KACE,OAAM;KACN,SAAQ;KACR,eAAe,OAAO,KAAK,GAAa,UAAU,UAAU;KAE5D,QAAO;eAEN,KAAyB;IACf,CAAA;GACV,CAAA;GAER,KAAW,kBAAC,OAAD,EAAA,UAAA,CAAK,yBAAsB,CAAS,EAAA,CAAA;EAC7C;GACL,EAAA,CAAA;AAEN;AAQA,eAAsB,EACpB,GACA,GACA,GACe;CACf,IAAM,EAAE,eAAY,EAAgB,GAAK,CAAM;CAC/C,MAAM,EAAY,cAAc,EAAuB,CAAO,CAAC;AACjE"}
|
|
1
|
+
{"version":3,"file":"RssFeedCards.js","names":[],"sources":["../../../src/components/RssFeedCards/RssFeedCards.tsx"],"sourcesContent":["import NoData from '@/assets/icons/NoData'\nimport { ReactComponent as SubscribePlus } from '@/assets/icons/subscribe_plus.svg'\nimport LargeButton from '@/components/styled/LargeButton'\nimport dayjs from 'dayjs'\nimport MailchimpSubscribe from 'react-mailchimp-subscribe'\nimport Parser from 'rss-parser'\nimport { QueryClient, queryOptions, useQuery } from '@tanstack/react-query'\nimport { useState } from 'react'\n\nconst rssParser = new Parser()\n\nexport type RssFilter = {\n type?: 'tag' | 'category'\n value: string\n}\n\nexport type RssFeedCardsProps = {\n url: string\n filter?: RssFilter // optional tag or category to use as a filter\n itemsToShow: number\n allowCategories?: string[]\n mailChimpListName?: string\n mailChimpUrl?: string\n viewAllNewsButtonText?: string\n hideDate?: boolean\n}\n\nfunction buildRssFeedUrl(url: string, filter?: RssFilter) {\n const filterValue = filter?.value\n const filterType = filter?.type\n const tagPath = filterValue\n ? `/${filterType ?? 'tag'}/${filterValue.replace(' ', '-')}`\n : ''\n const allItemsUrl = `${url}${tagPath}`\n const feedUrl = `${allItemsUrl}/?feed=rss2`\n return { allItemsUrl, feedUrl }\n}\n\nfunction getRssFeedQueryOptions(feedUrl: string) {\n return queryOptions({\n queryKey: ['rssFeed', feedUrl],\n queryFn: () =>\n fetch(feedUrl)\n .then(response => response.text())\n .then(responseData => rssParser.parseString(responseData)),\n })\n}\n\nexport function RssFeedCards(props: RssFeedCardsProps) {\n const {\n url,\n filter,\n itemsToShow,\n allowCategories,\n mailChimpListName,\n mailChimpUrl,\n viewAllNewsButtonText,\n hideDate,\n } = props\n\n const { allItemsUrl, feedUrl } = buildRssFeedUrl(url, filter)\n\n const { data: rssFeed, isError } = useQuery(getRssFeedQueryOptions(feedUrl))\n\n const [isShowingSubscribeUI, setIsShowingSubscribeUI] = useState(false)\n\n if (rssFeed?.items?.length === 0) {\n return (\n <div className=\"text-center SRCBorderedPanel SRCBorderedPanel--padded2x\">\n {NoData}\n <div style={{ marginTop: '20px', fontStyle: 'italic' }}>\n There are no items currently available\n </div>\n </div>\n )\n }\n return (\n <>\n {mailChimpUrl && (\n <div className=\"FeedSubscribe\">\n {!isShowingSubscribeUI && (\n <a\n className=\"FeedSubscribeToNewsLink SRC-no-border-bottom-imp\"\n onClick={() => setIsShowingSubscribeUI(true)}\n >\n <SubscribePlus title=\"Subscribe to News\" />\n Subscribe to News\n </a>\n )}\n {isShowingSubscribeUI && (\n <div className=\"MailchimpSubscribeContainer\">\n <SubscribePlus title=\"Subscribe to News\" />\n <p>\n Subscribe to receive the {mailChimpListName} by e-mail, which\n provides information and updates related to the Portal. You can\n opt out at any time by using the unsubscribe link within the\n e-mail. We will not share your information with any third\n parties or use it for any other purposes.\n </p>\n <div className=\"SRC-marginBottomTop\">\n <MailchimpSubscribe url={mailChimpUrl} />\n </div>\n </div>\n )}\n </div>\n )}\n <div className=\"Feed\">\n <div className=\"FeedItems\">\n {rssFeed?.items &&\n rssFeed.items.map((item, index) => {\n // The other is to hide the large number of items in a particular feed (usually a max of 10 are returned). See state.isShowingMoreItems\n if (index >= itemsToShow) {\n return\n }\n\n return (\n <div key={item.guid} className={`FeedItem`}>\n <div>\n {allowCategories && allowCategories.length > 0 && (\n <div className=\"FeedItemCategories\">\n {item.categories?.map((categoryName: string) => {\n // are we allowed to show this category/tag?\n const categoryNameLowerCase =\n categoryName.toLowerCase()\n if (\n allowCategories?.findIndex(\n item =>\n categoryNameLowerCase === item.toLowerCase(),\n ) === -1\n )\n return null\n // else\n return (\n <a\n href={`${rssFeed.link}/tag/${categoryName.replace(\n ' ',\n '-',\n )}`}\n className=\"SRC-no-border-bottom-imp\"\n key={`${item.guid}_${categoryName}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <div className=\"FeedItemCategory\">\n {categoryName}\n </div>\n </a>\n )\n })}\n </div>\n )}\n {!hideDate && (\n <p className=\"FeedItemDate\">\n {dayjs(item.isoDate).format('MMMM YYYY')}\n </p>\n )}\n <p className=\"FeedItemTitle\">{item.title}</p>\n <div className=\"FeedItemDescription\">\n {item.contentSnippet?.replace(/\\[...\\]|\\[…\\]/gm, '…')}\n </div>\n <a\n className=\"FeedItemLink\"\n href={item.link}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Continue reading\n </a>\n </div>\n </div>\n )\n })}\n </div>\n {rssFeed?.items &&\n rssFeed.items.length > itemsToShow &&\n allItemsUrl && (\n <div className=\"FeedViewAllNewsButtonContainer\">\n <LargeButton\n color=\"secondary\"\n variant=\"contained\"\n onClick={() => window.open(allItemsUrl, '_blank', 'noopener')}\n // @ts-expect-error - target prop exists, but TS doesn't recognize on styled component\n target=\"_blank\"\n >\n {viewAllNewsButtonText ?? 'View All News'}\n </LargeButton>\n </div>\n )}\n {isError && <div>Unable to load feed: {url}</div>}\n </div>\n </>\n )\n}\n\nexport default RssFeedCards\n\n/**\n * Prefetches the RSS feed into a QueryClient for use with HydrationBoundary.\n * Uses the same query key as the RssFeedCards component.\n */\nexport async function prefetchRssFeed(\n queryClient: QueryClient,\n url: string,\n filter?: RssFilter,\n): Promise<void> {\n const { feedUrl } = buildRssFeedUrl(url, filter)\n await queryClient.prefetchQuery(getRssFeedQueryOptions(feedUrl))\n}\n"],"mappings":";;;;;;;;;;AASA,IAAM,IAAY,IAAI,EAAO;AAkB7B,SAAS,EAAgB,GAAa,GAAoB;CACxD,IAAM,IAAc,GAAQ,OACtB,IAAa,GAAQ,MAIrB,IAAc,GAAG,IAHP,IACZ,IAAI,KAAc,MAAM,GAAG,EAAY,QAAQ,KAAK,GAAG,MACvD;CAGJ,OAAO;EAAE;EAAa,SAAA,GADH,EAAY;CACD;AAChC;AAEA,SAAS,EAAuB,GAAiB;CAC/C,OAAO,EAAa;EAClB,UAAU,CAAC,WAAW,CAAO;EAC7B,eACE,MAAM,CAAO,EACV,MAAK,MAAY,EAAS,KAAK,CAAC,EAChC,MAAK,MAAgB,EAAU,YAAY,CAAY,CAAC;CAC/D,CAAC;AACH;AAEA,SAAgB,EAAa,GAA0B;CACrD,IAAM,EACJ,QACA,WACA,gBACA,oBACA,sBACA,iBACA,0BACA,gBACE,GAEE,EAAE,gBAAa,eAAY,EAAgB,GAAK,CAAM,GAEtD,EAAE,MAAM,GAAS,eAAY,EAAS,EAAuB,CAAO,CAAC,GAErE,CAAC,GAAsB,KAA2B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