synapse-react-client 4.0.11 → 4.0.12
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.d.ts +1 -1
- package/dist/SWC.index.js +1 -1
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts +44 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts.map +1 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js +46 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js.map +1 -0
- package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +183 -185
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.js +8 -8
- package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.d.ts.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.js +1 -2
- package/dist/components/EntityAclEditor/InheritanceMessage.js.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.d.ts.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.js +86 -47
- package/dist/components/FullTextSearch/FullTextSearch.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +157 -157
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/HeaderCard.d.ts.map +1 -1
- package/dist/components/HeaderCard.js +131 -130
- package/dist/components/HeaderCard.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts +4 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js +3 -2
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js.map +1 -1
- package/dist/components/QueryContext/QueryContext.d.ts +6 -0
- package/dist/components/QueryContext/QueryContext.d.ts.map +1 -1
- package/dist/components/QueryContext/QueryContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +12 -11
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +5 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +32 -29
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js +4 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +59 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +174 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts +40 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +100 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +56 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +73 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -0
- package/dist/components/ShareThisPage/ShareThisPage.js +1 -1
- package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.js +20 -14
- package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts +3 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +51 -36
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +8 -7
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +16 -0
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts +3 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.js +9 -8
- package/dist/components/SynapseHomepageV2/WordPressNews.js.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts +2 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js +2 -2
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.d.ts +7 -0
- package/dist/components/SynapseTable/SearchV2.d.ts.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.d.ts.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js +6 -5
- package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.js +2 -2
- package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
- package/dist/components/error/ErrorPage.d.ts +0 -4
- package/dist/components/error/ErrorPage.d.ts.map +1 -1
- package/dist/components/error/ErrorPage.js +25 -30
- package/dist/components/error/ErrorPage.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +41 -39
- package/dist/components/widgets/query-filter/FacetFilterControls.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js +2 -2
- package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/dist/mocks/entity/index.d.ts.map +1 -1
- package/dist/mocks/entity/index.js +18 -16
- package/dist/mocks/entity/index.js.map +1 -1
- package/dist/mocks/mockSearchQueryData.d.ts +14 -0
- package/dist/mocks/mockSearchQueryData.d.ts.map +1 -0
- package/dist/mocks/mockSearchQueryData.js +564 -0
- package/dist/mocks/mockSearchQueryData.js.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts +22 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js +63 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +9 -7
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/components/_cards.scss +15 -0
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +7 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +422 -417
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-client/index.js +3 -3
- package/dist/synapse-queries/KeyFactory.d.ts +2 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +3 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +2 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.d.ts.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.js +3 -3
- package/dist/utils/functions/calculateFriendlyFileSize.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryContext.js","names":[],"sources":["../../../src/components/QueryContext/QueryContext.tsx"],"sourcesContent":["import React from 'react'\nimport { LockedColumn } from '@/utils'\nimport { ImmutableTableQueryResult } from '@/utils/hooks/useImmutableTableQuery/useImmutableTableQuery'\nimport { QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { createContext, PropsWithChildren, useContext } from 'react'\nimport { ReadonlyDeep } from 'type-fest'\nimport { TableQueryUseQueryOptions } from '../QueryWrapper/TableQueryUseQueryOptions'\n\nexport type QueryContextType = {\n isInfinite: boolean\n /** The entity ID parsed from the SQL query */\n entityId?: string\n /** The optional version number of the table parsed from the SQL query */\n versionNumber: number | undefined\n currentQueryRequest: ReadonlyDeep<QueryBundleRequest>\n nextQueryRequest: ReadonlyDeep<QueryBundleRequest>\n /** Returns a deep clone of the current query bundle request */\n getCurrentQueryRequest: () => QueryBundleRequest\n /** Returns a deep clone of the initial query bundle request */\n getInitQueryRequest: () => QueryBundleRequest\n /** Updates the current query with the passed request */\n executeQueryRequest: ImmutableTableQueryResult['setQuery']\n /** Resets the query to its initial state, clearing all filters added by the user */\n resetQuery: ImmutableTableQueryResult['resetQuery']\n resetDebounceTimer: ImmutableTableQueryResult['resetDebounceTimer']\n addValueToSelectedFacet: ImmutableTableQueryResult['addValueToSelectedFacet']\n setRangeFacetValue: ImmutableTableQueryResult['setRangeFacetValue']\n removeSelectedFacet: ImmutableTableQueryResult['removeSelectedFacet']\n removeValueFromSelectedFacet: ImmutableTableQueryResult['removeValueFromSelectedFacet']\n /** Removes a matching QueryFilter from the query */\n removeQueryFilter: ImmutableTableQueryResult['removeQueryFilter']\n /** Removes a value from a QueryFilter. If no more values remain in the filter, the filter is also removed */\n removeValueFromQueryFilter: ImmutableTableQueryResult['removeValueFromQueryFilter']\n /** Whether facets are available to be filtered upon based on the current data */\n hasFacetedSelectColumn: boolean\n /** Returns true iff the current request has resettable filters applied via facet filters or additionalFilters. Excludes filters applied to a locked column */\n hasResettableFilters: boolean\n // Either open benefactor entity page in a new window or open the sharing settings dialog (in Synapse.org)\n onViewSharingSettingsClicked?: (benefactorId: string) => void\n /** Combines two faceted columns into a single inclusive range selector */\n combineRangeFacetConfig?: ReadonlyDeep<CombineRangeFacetConfig>\n\n /** react-query UseQueryOptions to fetch the current page of table data */\n rowDataQueryOptions: TableQueryUseQueryOptions['rowDataQueryOptions']\n /** react-query UseInfiniteQueryOptions to fetch infinite rows of table data */\n rowDataInfiniteQueryOptions: TableQueryUseQueryOptions['rowDataInfiniteQueryOptions']\n /** react-query UseQueryOptions to fetch the current query metadata (e.g. column models, facet statistics, total number of rows) */\n queryMetadataQueryOptions: TableQueryUseQueryOptions['queryMetadataQueryOptions']\n\n /** Navigates to a particular page. The first page has value 1. Note that this has no effect if `isInfinite` is true */\n goToPage: (pageNum: number) => void\n /** The current page number, where page 1 is the first page. Note that this has no effect if `isInfinite` is true. */\n currentPage: number\n /** Updates the page size */\n setPageSize: (pageSize: number) => void\n /** The current page size. */\n pageSize: number\n\n /**\n * A column name may be \"locked\" so that it is both (1) not shown to the user that the filter is active, and (2) not modifiable by the user.\n * For example, we may show only the data matching a particular facet value on a Details Page without implying that the shown data is part of a larger table.\n * The presence of a locked filter will result in a client-side modification of the active query and result bundle data.\n */\n lockedColumn: LockedColumn | undefined\n\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row entity ID\n */\n fileIdColumnName: string | undefined\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row (entity) version\n */\n fileVersionColumnName: string | undefined\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row (entity) name\n */\n fileNameColumnName: string | undefined\n}\n\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryContext = createContext<QueryContextType | undefined>(\n undefined,\n)\n\nexport type QueryContextProviderProps = PropsWithChildren<{\n queryContext: QueryContextType\n}>\n\n/**\n * Provides data related to a Synapse table query, and functions for iterating through pages of the data.\n */\nexport const QueryContextProvider = ({\n children,\n queryContext,\n}: QueryContextProviderProps): React.ReactNode => {\n return (\n <QueryContext.Provider value={queryContext}>\n {children}\n </QueryContext.Provider>\n )\n}\n\n/**\n * Returns the QueryContext, including QueryResultBundle\n *\n * @template TIncludedFields - If you know which specific optional fields will be included in the QueryResultBundle,\n * you can specify them in the generic TIncludedFields\n * @template ExcludeOtherFields - If set to true, will remove optional fields besides those specified in TIncludedFields,\n * default false\n */\nexport function useQueryContext(): QueryContextType {\n const context = useContext(QueryContext)\n if (context === undefined) {\n throw new Error('useQueryContext must be used within a QueryWrapper')\n }\n return context\n}\n\nexport type CombineRangeFacetConfig = {\n minFacetColumn: string\n maxFacetColumn: string\n label: string\n}\n\nexport const QueryContextConsumer = QueryContext.Consumer\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"QueryContext.js","names":[],"sources":["../../../src/components/QueryContext/QueryContext.tsx"],"sourcesContent":["import React from 'react'\nimport { LockedColumn } from '@/utils'\nimport { ImmutableTableQueryResult } from '@/utils/hooks/useImmutableTableQuery/useImmutableTableQuery'\nimport { QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { createContext, PropsWithChildren, useContext } from 'react'\nimport { ReadonlyDeep } from 'type-fest'\nimport { TableQueryUseQueryOptions } from '../QueryWrapper/TableQueryUseQueryOptions'\n\nexport type QueryContextType = {\n isInfinite: boolean\n /** The entity ID parsed from the SQL query */\n entityId?: string\n /** The optional version number of the table parsed from the SQL query */\n versionNumber: number | undefined\n currentQueryRequest: ReadonlyDeep<QueryBundleRequest>\n nextQueryRequest: ReadonlyDeep<QueryBundleRequest>\n /** Returns a deep clone of the current query bundle request */\n getCurrentQueryRequest: () => QueryBundleRequest\n /** Returns a deep clone of the initial query bundle request */\n getInitQueryRequest: () => QueryBundleRequest\n /** Updates the current query with the passed request */\n executeQueryRequest: ImmutableTableQueryResult['setQuery']\n /** Resets the query to its initial state, clearing all filters added by the user */\n resetQuery: ImmutableTableQueryResult['resetQuery']\n resetDebounceTimer: ImmutableTableQueryResult['resetDebounceTimer']\n addValueToSelectedFacet: ImmutableTableQueryResult['addValueToSelectedFacet']\n setRangeFacetValue: ImmutableTableQueryResult['setRangeFacetValue']\n removeSelectedFacet: ImmutableTableQueryResult['removeSelectedFacet']\n removeValueFromSelectedFacet: ImmutableTableQueryResult['removeValueFromSelectedFacet']\n /** Removes a matching QueryFilter from the query */\n removeQueryFilter: ImmutableTableQueryResult['removeQueryFilter']\n /** Removes a value from a QueryFilter. If no more values remain in the filter, the filter is also removed */\n removeValueFromQueryFilter: ImmutableTableQueryResult['removeValueFromQueryFilter']\n /** Whether facets are available to be filtered upon based on the current data */\n hasFacetedSelectColumn: boolean\n /** Returns true iff the current request has resettable filters applied via facet filters or additionalFilters. Excludes filters applied to a locked column */\n hasResettableFilters: boolean\n // Either open benefactor entity page in a new window or open the sharing settings dialog (in Synapse.org)\n onViewSharingSettingsClicked?: (benefactorId: string) => void\n /** Combines two faceted columns into a single inclusive range selector */\n combineRangeFacetConfig?: ReadonlyDeep<CombineRangeFacetConfig>\n\n /** react-query UseQueryOptions to fetch the current page of table data */\n rowDataQueryOptions: TableQueryUseQueryOptions['rowDataQueryOptions']\n /** react-query UseInfiniteQueryOptions to fetch infinite rows of table data */\n rowDataInfiniteQueryOptions: TableQueryUseQueryOptions['rowDataInfiniteQueryOptions']\n /** react-query UseQueryOptions to fetch the current query metadata (e.g. column models, facet statistics, total number of rows) */\n queryMetadataQueryOptions: TableQueryUseQueryOptions['queryMetadataQueryOptions']\n\n /** Navigates to a particular page. The first page has value 1. Note that this has no effect if `isInfinite` is true */\n goToPage: (pageNum: number) => void\n /** The current page number, where page 1 is the first page. Note that this has no effect if `isInfinite` is true. */\n currentPage: number\n /** Updates the page size */\n setPageSize: (pageSize: number) => void\n /** The current page size. */\n pageSize: number\n\n /**\n * A column name may be \"locked\" so that it is both (1) not shown to the user that the filter is active, and (2) not modifiable by the user.\n * For example, we may show only the data matching a particular facet value on a Details Page without implying that the shown data is part of a larger table.\n * The presence of a locked filter will result in a client-side modification of the active query and result bundle data.\n */\n lockedColumn: LockedColumn | undefined\n\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row entity ID\n */\n fileIdColumnName: string | undefined\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row (entity) version\n */\n fileVersionColumnName: string | undefined\n /**\n * PORTALS-3071: For Tables that are not entityviews or a datasets, keep track of the column that should be used for the row (entity) name\n */\n fileNameColumnName: string | undefined\n\n /**\n * Optional factory to get react-query options for a given page number without calling the standard\n * table query API. When provided (e.g. by SearchQueryWrapper), usePrefetchTableRows will use this\n * instead of getTableQueryUseQueryOptions so that the correct API is called for prefetching.\n */\n getRowDataQueryOptionsForPage?: (\n pageNumber: number,\n ) => TableQueryUseQueryOptions['rowDataQueryOptions']\n}\n\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryContext = createContext<QueryContextType | undefined>(\n undefined,\n)\n\nexport type QueryContextProviderProps = PropsWithChildren<{\n queryContext: QueryContextType\n}>\n\n/**\n * Provides data related to a Synapse table query, and functions for iterating through pages of the data.\n */\nexport const QueryContextProvider = ({\n children,\n queryContext,\n}: QueryContextProviderProps): React.ReactNode => {\n return (\n <QueryContext.Provider value={queryContext}>\n {children}\n </QueryContext.Provider>\n )\n}\n\n/**\n * Returns the QueryContext, including QueryResultBundle\n *\n * @template TIncludedFields - If you know which specific optional fields will be included in the QueryResultBundle,\n * you can specify them in the generic TIncludedFields\n * @template ExcludeOtherFields - If set to true, will remove optional fields besides those specified in TIncludedFields,\n * default false\n */\nexport function useQueryContext(): QueryContextType {\n const context = useContext(QueryContext)\n if (context === undefined) {\n throw new Error('useQueryContext must be used within a QueryWrapper')\n }\n return context\n}\n\nexport type CombineRangeFacetConfig = {\n minFacetColumn: string\n maxFacetColumn: string\n label: string\n}\n\nexport const QueryContextConsumer = QueryContext.Consumer\n"],"mappings":";;;AA2FA,IAAa,IAAe,EAC1B,KAAA,EACD,EASY,KAAwB,EACnC,aACA,sBAGE,kBAAC,EAAa,UAAd;CAAuB,OAAO;CAC3B;CACqB,CAAA;AAY5B,SAAgB,IAAoC;CAClD,IAAM,IAAU,EAAW,EAAa;AACxC,KAAI,MAAY,KAAA,EACd,OAAU,MAAM,qDAAqD;AAEvE,QAAO;;AAST,IAAa,IAAuB,EAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAA;AAI5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA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CAAA;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;gDAC4C;IAC5C,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC7D,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACpC,CAAA;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CAqMtC"}
|
|
@@ -2,11 +2,11 @@ import e from "../../utils/hooks/useMutuallyExclusiveState.js";
|
|
|
2
2
|
import { useQueryContext as t } from "../QueryContext/QueryContext.js";
|
|
3
3
|
import "../QueryContext/index.js";
|
|
4
4
|
import { getDisplayValue as n } from "../../utils/functions/getDataFromFromStorage.js";
|
|
5
|
-
import { unCamelCase as
|
|
6
|
-
import { useGetQueryMetadata as
|
|
7
|
-
import { NoContentPlaceholderType as
|
|
8
|
-
import
|
|
9
|
-
import { QueryVisualizationContextProvider as
|
|
5
|
+
import { unCamelCase as ee } from "../../utils/functions/unCamelCase.js";
|
|
6
|
+
import { useGetQueryMetadata as r } from "../QueryWrapper/useGetQueryMetadata.js";
|
|
7
|
+
import { NoContentPlaceholderType as i } from "../SynapseTable/NoContentPlaceholderType.js";
|
|
8
|
+
import a from "./NoContentPlaceholder.js";
|
|
9
|
+
import { QueryVisualizationContextProvider as o } from "./QueryVisualizationContext.js";
|
|
10
10
|
import { useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
|
|
11
11
|
import { jsx as d } from "react/jsx-runtime";
|
|
12
12
|
import { useQuery as f } from "@tanstack/react-query";
|
|
@@ -14,11 +14,11 @@ import { useDeepCompareMemoize as p } from "use-deep-compare-effect";
|
|
|
14
14
|
//#region src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx
|
|
15
15
|
var m = [];
|
|
16
16
|
function h(h) {
|
|
17
|
-
let { noContentPlaceholderType: g =
|
|
17
|
+
let { noContentPlaceholderType: g = i.INTERACTIVE, defaultShowSearchBar: _ = !1, defaultShowPlots: v = !0, hideCopyToClipboard: y = !1, hideSearchBarControl: b = !1, unitDescription: x = "result", helpConfiguration: S, hasCustomPlots: C = !1, visibleColumnCount: w = Infinity, enabledExternalAnalysisPlatforms: T = m } = h, E = l(() => h.columnAliases ?? {}, [h.columnAliases]), { getCurrentQueryRequest: D, hasFacetedSelectColumn: O, hasResettableFilters: k, rowDataQueryOptions: A } = t(), { data: j } = r(), { data: M } = f({
|
|
18
18
|
...A,
|
|
19
19
|
select: (e) => e.responseBody?.queryResult?.queryResults.headers,
|
|
20
20
|
placeholderData: (e) => e
|
|
21
|
-
}), { data: N } =
|
|
21
|
+
}), { data: N } = r({
|
|
22
22
|
select: (e) => e.responseBody?.selectColumns,
|
|
23
23
|
placeholderData: (e) => e
|
|
24
24
|
}), P = p(M ?? N ?? []), [F, I] = u(!1), [L, R] = u(v), [z, B] = u(!y), [V, H] = u(!0), [U, W, G, K] = e(_ && !b, !1), [q, J] = u(!1), [Y, X] = u([]);
|
|
@@ -40,10 +40,10 @@ function h(h) {
|
|
|
40
40
|
if (e) return e.name;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return ee(e);
|
|
44
44
|
}, [E, j?.columnModels]), Q = s((e, t) => {
|
|
45
45
|
if (Array.isArray(S)) return S.find((n) => n.columnName === e && n.jsonPath === t)?.helpText;
|
|
46
|
-
}, [S]), $ = s(() => /* @__PURE__ */ d(
|
|
46
|
+
}, [S]), $ = s(() => /* @__PURE__ */ d(a, {
|
|
47
47
|
type: g,
|
|
48
48
|
hasResettableFilters: k
|
|
49
49
|
}), [g, k]), te = l(() => ({
|
|
@@ -91,9 +91,10 @@ function h(h) {
|
|
|
91
91
|
x,
|
|
92
92
|
Y,
|
|
93
93
|
C,
|
|
94
|
-
T
|
|
94
|
+
T,
|
|
95
|
+
b
|
|
95
96
|
]), { children: ne } = h;
|
|
96
|
-
return /* @__PURE__ */ d(
|
|
97
|
+
return /* @__PURE__ */ d(o, {
|
|
97
98
|
queryVisualizationContext: te,
|
|
98
99
|
children: ne
|
|
99
100
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationWrapper.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"sourcesContent":["import { getDisplayValue } from '@/utils/functions/getDataFromFromStorage'\nimport { unCamelCase } from '@/utils/functions/unCamelCase'\nimport useMutuallyExclusiveState from '@/utils/hooks/useMutuallyExclusiveState'\nimport { useQuery } from '@tanstack/react-query'\nimport { ReactNode, useCallback, useEffect, useMemo, useState } from 'react'\nimport { useDeepCompareMemoize } from 'use-deep-compare-effect'\nimport { useQueryContext } from '../QueryContext'\nimport { useGetQueryMetadata } from '../QueryWrapper/useGetQueryMetadata'\nimport { NoContentPlaceholderType } from '../SynapseTable/NoContentPlaceholderType'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\nimport NoContentPlaceholderComponent from './NoContentPlaceholder'\nimport {\n QueryVisualizationContextProvider,\n QueryVisualizationContextType,\n} from './QueryVisualizationContext'\n\n// By default, show no external analysis platforms.\nconst DEFAULT_ENABLED_ANALYSIS_PLATFORMS: ExternalAnalysisPlatform[] = []\n\ntype ColumnOrFacetHelpConfig = {\n /** Text that describes the column or facet */\n helpText: string\n /** The name of the column for which the markdown applies */\n columnName: string\n /** The JSON path matching a described JSON Column facet */\n jsonPath?: string\n}\n\nexport type QueryVisualizationWrapperProps = {\n children: ReactNode | ReactNode[]\n rgbIndex?: number\n /** The singular word to use to describe a what a row represents (e.g. \"file\"). Defaults to \"result\" */\n unitDescription?: string\n /** Mapping from column name to the name that should be shown for the column */\n columnAliases?: Record<string, string>\n visibleColumnCount?: number\n hiddenColumns?: string[]\n defaultShowPlots?: boolean\n hideCopyToClipboard?: boolean\n hideSearchBarControl?: boolean\n defaultShowSearchBar?: boolean\n showLastUpdatedOn?: boolean\n /** Default is INTERACTIVE */\n noContentPlaceholderType?: NoContentPlaceholderType\n isRowSelectionVisible?: boolean\n /** The set of columns that defines a uniqueness constraint on the table for the purposes of filtering based on row selection.\n * Note that Synapse tables have no internal concept of a primary key.\n */\n rowSelectionPrimaryKey?: string[]\n /** Look for additional filters using the given key. If not provided, the entity ID will be used.\n * @deprecated - configure the filter before passing a query */\n additionalFiltersSessionStorageKey?: string\n /** Configuration to add a help popover to each corresponding column header */\n helpConfiguration?: ColumnOrFacetHelpConfig[]\n hasCustomPlots?: boolean\n /** The set of external analysis platform to which the UI will support exporting data.\n * @default [] (no platforms are enabled) */\n enabledExternalAnalysisPlatforms?: ExternalAnalysisPlatform[]\n hideVisualizationsControl?: boolean\n}\n\n/**\n * QueryVisualizationWrapper manages UI state for components that query tables in Synapse. That state can be accessed\n * or updated using QueryVisualizationContext. A QueryVisualizationWrapper must be used within a QueryWrapper.\n */\nexport function QueryVisualizationWrapper(\n props: QueryVisualizationWrapperProps,\n) {\n const {\n noContentPlaceholderType = NoContentPlaceholderType.INTERACTIVE,\n defaultShowSearchBar = false,\n defaultShowPlots = true,\n hideCopyToClipboard = false,\n hideSearchBarControl = false,\n unitDescription = 'result',\n helpConfiguration,\n hasCustomPlots = false,\n visibleColumnCount = Infinity,\n enabledExternalAnalysisPlatforms = DEFAULT_ENABLED_ANALYSIS_PLATFORMS,\n } = props\n\n const columnAliases = useMemo(\n () => props.columnAliases ?? {},\n [props.columnAliases],\n )\n\n const {\n getCurrentQueryRequest,\n hasFacetedSelectColumn,\n hasResettableFilters,\n rowDataQueryOptions,\n } = useQueryContext()\n const { data: queryMetadata } = useGetQueryMetadata()\n\n // Get the selectColumns from either query so that creating the context isn't bottlenecked by one or the other\n // Use the previous result as placeholder data so we don't reset the selectColumns unless they have actually changed.\n const { data: selectColumnsFromRowData } = useQuery({\n ...rowDataQueryOptions,\n select: data => data.responseBody?.queryResult?.queryResults.headers,\n placeholderData: prevData => prevData,\n })\n const { data: selectColumnsFromMetadata } = useGetQueryMetadata({\n select: data => data.responseBody?.selectColumns,\n placeholderData: prevData => prevData,\n })\n // We deep-compare-memoize the selectColumns so we don't reset visible columns if the reference changes, but not the contents (e.g. on page change)\n const selectColumns = useDeepCompareMemoize(\n selectColumnsFromRowData ?? selectColumnsFromMetadata ?? [],\n )\n\n const [showSqlEditor, setShowSqlEditor] = useState(false)\n const [showPlots, setShowPlots] = useState(defaultShowPlots)\n const [showCopyToClipboard, setShowCopyToClipboard] = useState(\n !hideCopyToClipboard,\n )\n const [showFacetFilter, setShowFacetFilter] = useState(true)\n\n // The search bar and download confirmation should not be shown at the same time.\n const [\n showSearchBar,\n setShowSearchBar,\n showDownloadConfirmation,\n setShowDownloadConfirmation,\n ] = useMutuallyExclusiveState(\n defaultShowSearchBar && !hideSearchBarControl,\n false,\n )\n\n const [\n isShowingExportToAnalysisPlatformModal,\n setIsShowingExportToAnalysisPlatformModal,\n ] = useState<boolean>(false)\n\n const [visibleColumns, setVisibleColumns] = useState<string[]>([])\n\n const lastQueryRequest = useMemo(\n () => getCurrentQueryRequest(),\n [getCurrentQueryRequest],\n )\n\n useEffect(() => {\n // SWC-6030: If sql changes, reset what columns are visible\n setVisibleColumns(\n selectColumns.slice(0, visibleColumnCount).map(el => el.name),\n )\n }, [selectColumns, lastQueryRequest.query.sql, visibleColumnCount])\n\n const getColumnDisplayName = useCallback(\n (columnName: string, jsonPath?: string) => {\n // SWC-5982: if force-display-original-column-names is set, then just return the string\n const forceDisplayOriginalColumnName =\n localStorage.getItem('force-display-original-column-names') === 'true'\n\n if (!columnName || (forceDisplayOriginalColumnName && !jsonPath)) {\n return columnName\n }\n if (columnAliases[columnName]) {\n return columnAliases[columnName]\n }\n if (jsonPath) {\n const columnModel = queryMetadata?.columnModels?.find(\n cm => cm.name === columnName,\n )\n if (columnModel?.jsonSubColumns) {\n const jsonSubColumn = columnModel.jsonSubColumns.find(\n jsc => jsc.jsonPath === jsonPath,\n )\n if (jsonSubColumn) {\n return jsonSubColumn.name\n }\n }\n }\n return unCamelCase(columnName)\n },\n [columnAliases, queryMetadata?.columnModels],\n )\n\n const getHelpText = useCallback(\n (columnName: string, jsonPath?: string): string | undefined => {\n if (Array.isArray(helpConfiguration)) {\n const helpConfig = helpConfiguration.find(\n config =>\n config.columnName === columnName && config.jsonPath === jsonPath,\n )\n return helpConfig?.helpText\n }\n return undefined\n },\n [helpConfiguration],\n )\n\n const NoContentPlaceholder = useCallback(\n () => (\n <NoContentPlaceholderComponent\n type={noContentPlaceholderType}\n hasResettableFilters={hasResettableFilters}\n />\n ),\n [noContentPlaceholderType, hasResettableFilters],\n )\n\n const context: QueryVisualizationContextType = useMemo(\n () => ({\n columnsToShowInTable: visibleColumns,\n setColumnsToShowInTable: setVisibleColumns,\n rgbIndex: props.rgbIndex,\n unitDescription: unitDescription,\n showLastUpdatedOn: props.showLastUpdatedOn,\n getColumnDisplayName,\n getDisplayValue,\n getHelpText,\n NoContentPlaceholder,\n isShowingExportToAnalysisPlatformModal:\n isShowingExportToAnalysisPlatformModal,\n setIsShowingExportToAnalysisPlatformModal:\n setIsShowingExportToAnalysisPlatformModal,\n showFacetFilter: hasFacetedSelectColumn ? showFacetFilter : false,\n setShowFacetFilter,\n hideSearchBarControl,\n showSearchBar,\n setShowSearchBar,\n showDownloadConfirmation,\n setShowDownloadConfirmation,\n showSqlEditor,\n setShowSqlEditor,\n showPlots: hasCustomPlots || hasFacetedSelectColumn ? showPlots : false,\n setShowPlots,\n showCopyToClipboard,\n setShowCopyToClipboard,\n enabledExternalAnalysisPlatforms,\n }),\n [\n NoContentPlaceholder,\n getColumnDisplayName,\n getHelpText,\n hasFacetedSelectColumn,\n isShowingExportToAnalysisPlatformModal,\n props.rgbIndex,\n props.showLastUpdatedOn,\n setShowDownloadConfirmation,\n setShowSearchBar,\n showCopyToClipboard,\n showDownloadConfirmation,\n showFacetFilter,\n showPlots,\n showSearchBar,\n showSqlEditor,\n unitDescription,\n visibleColumns,\n hasCustomPlots,\n enabledExternalAnalysisPlatforms,\n ],\n )\n /**\n * Render the children without any formatting\n */\n const { children } = props\n return (\n <QueryVisualizationContextProvider queryVisualizationContext={context}>\n {children}\n </QueryVisualizationContextProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAM,IAAiE,EAAE;AAgDzE,SAAgB,EACd,GACA;CACA,IAAM,EACJ,8BAA2B,EAAyB,aACpD,0BAAuB,IACvB,sBAAmB,IACnB,yBAAsB,IACtB,0BAAuB,IACvB,qBAAkB,UAClB,sBACA,oBAAiB,IACjB,wBAAqB,UACrB,sCAAmC,MACjC,GAEE,IAAgB,QACd,EAAM,iBAAiB,EAAE,EAC/B,CAAC,EAAM,cAAc,CACtB,EAEK,EACJ,2BACA,2BACA,yBACA,2BACE,GAAiB,EACf,EAAE,MAAM,MAAkB,GAAqB,EAI/C,EAAE,MAAM,MAA6B,EAAS;EAClD,GAAG;EACH,SAAQ,MAAQ,EAAK,cAAc,aAAa,aAAa;EAC7D,kBAAiB,MAAY;EAC9B,CAAC,EACI,EAAE,MAAM,MAA8B,EAAoB;EAC9D,SAAQ,MAAQ,EAAK,cAAc;EACnC,kBAAiB,MAAY;EAC9B,CAAC,EAEI,IAAgB,EACpB,KAA4B,KAA6B,EAAE,CAC5D,EAEK,CAAC,GAAe,KAAoB,EAAS,GAAM,EACnD,CAAC,GAAW,KAAgB,EAAS,EAAiB,EACtD,CAAC,GAAqB,KAA0B,EACpD,CAAC,EACF,EACK,CAAC,GAAiB,KAAsB,EAAS,GAAK,EAGtD,CACJ,GACA,GACA,GACA,KACE,EACF,KAAwB,CAAC,GACzB,GACD,EAEK,CACJ,GACA,KACE,EAAkB,GAAM,EAEtB,CAAC,GAAgB,KAAqB,EAAmB,EAAE,CAAC;AAOlE,SAAgB;AAEd,IACE,EAAc,MAAM,GAAG,EAAmB,CAAC,KAAI,MAAM,EAAG,KAAK,CAC9D;IACA;EAAC;EAVqB,QACjB,GAAwB,EAC9B,CAAC,EAAuB,CAQP,CAAiB,MAAM;EAAK;EAAmB,CAAC;CAEnE,IAAM,IAAuB,GAC1B,GAAoB,MAAsB;EAEzC,IAAM,IACJ,aAAa,QAAQ,sCAAsC,KAAK;AAElE,MAAI,CAAC,KAAe,KAAkC,CAAC,EACrD,QAAO;AAET,MAAI,EAAc,GAChB,QAAO,EAAc;AAEvB,MAAI,GAAU;GACZ,IAAM,IAAc,GAAe,cAAc,MAC/C,MAAM,EAAG,SAAS,EACnB;AACD,OAAI,GAAa,gBAAgB;IAC/B,IAAM,IAAgB,EAAY,eAAe,MAC/C,MAAO,EAAI,aAAa,EACzB;AACD,QAAI,EACF,QAAO,EAAc;;;AAI3B,SAAO,EAAY,EAAW;IAEhC,CAAC,GAAe,GAAe,aAAa,CAC7C,EAEK,IAAc,GACjB,GAAoB,MAA0C;AAC7D,MAAI,MAAM,QAAQ,EAAkB,CAKlC,QAJmB,EAAkB,MACnC,MACE,EAAO,eAAe,KAAc,EAAO,aAAa,EAErD,EAAY;IAIvB,CAAC,EAAkB,CACpB,EAEK,IAAuB,QAEzB,kBAAC,GAAD;EACE,MAAM;EACgB;EACtB,CAAA,EAEJ,CAAC,GAA0B,EAAqB,CACjD,EAEK,KAAyC,SACtC;EACL,sBAAsB;EACtB,yBAAyB;EACzB,UAAU,EAAM;EACC;EACjB,mBAAmB,EAAM;EACzB;EACA;EACA;EACA,sBAAA;EAEE;EAEA;EACF,iBAAiB,IAAyB,IAAkB;EAC5D;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW,KAAkB,IAAyB,IAAY;EAClE;EACA;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA,EAAM;EACN,EAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF,EAIK,EAAE,iBAAa;AACrB,QACE,kBAAC,IAAD;EAAmC,2BAA2B;EAC3D;EACiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"QueryVisualizationWrapper.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"sourcesContent":["import { getDisplayValue } from '@/utils/functions/getDataFromFromStorage'\nimport { unCamelCase } from '@/utils/functions/unCamelCase'\nimport useMutuallyExclusiveState from '@/utils/hooks/useMutuallyExclusiveState'\nimport { useQuery } from '@tanstack/react-query'\nimport { ReactNode, useCallback, useEffect, useMemo, useState } from 'react'\nimport { useDeepCompareMemoize } from 'use-deep-compare-effect'\nimport { useQueryContext } from '../QueryContext'\nimport { useGetQueryMetadata } from '../QueryWrapper/useGetQueryMetadata'\nimport { NoContentPlaceholderType } from '../SynapseTable/NoContentPlaceholderType'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\nimport NoContentPlaceholderComponent from './NoContentPlaceholder'\nimport {\n QueryVisualizationContextProvider,\n QueryVisualizationContextType,\n} from './QueryVisualizationContext'\n\n// By default, show no external analysis platforms.\nconst DEFAULT_ENABLED_ANALYSIS_PLATFORMS: ExternalAnalysisPlatform[] = []\n\ntype ColumnOrFacetHelpConfig = {\n /** Text that describes the column or facet */\n helpText: string\n /** The name of the column for which the markdown applies */\n columnName: string\n /** The JSON path matching a described JSON Column facet */\n jsonPath?: string\n}\n\nexport type QueryVisualizationWrapperProps = {\n children: ReactNode | ReactNode[]\n rgbIndex?: number\n /** The singular word to use to describe a what a row represents (e.g. \"file\"). Defaults to \"result\" */\n unitDescription?: string\n /** Mapping from column name to the name that should be shown for the column */\n columnAliases?: Record<string, string>\n visibleColumnCount?: number\n hiddenColumns?: string[]\n defaultShowPlots?: boolean\n hideCopyToClipboard?: boolean\n hideSearchBarControl?: boolean\n defaultShowSearchBar?: boolean\n showLastUpdatedOn?: boolean\n /** Default is INTERACTIVE */\n noContentPlaceholderType?: NoContentPlaceholderType\n isRowSelectionVisible?: boolean\n /** The set of columns that defines a uniqueness constraint on the table for the purposes of filtering based on row selection.\n * Note that Synapse tables have no internal concept of a primary key.\n */\n rowSelectionPrimaryKey?: string[]\n /** Look for additional filters using the given key. If not provided, the entity ID will be used.\n * @deprecated - configure the filter before passing a query */\n additionalFiltersSessionStorageKey?: string\n /** Configuration to add a help popover to each corresponding column header */\n helpConfiguration?: ColumnOrFacetHelpConfig[]\n hasCustomPlots?: boolean\n /** The set of external analysis platform to which the UI will support exporting data.\n * @default [] (no platforms are enabled) */\n enabledExternalAnalysisPlatforms?: ExternalAnalysisPlatform[]\n hideVisualizationsControl?: boolean\n}\n\n/**\n * QueryVisualizationWrapper manages UI state for components that query tables in Synapse. That state can be accessed\n * or updated using QueryVisualizationContext. A QueryVisualizationWrapper must be used within a QueryWrapper.\n */\nexport function QueryVisualizationWrapper(\n props: QueryVisualizationWrapperProps,\n) {\n const {\n noContentPlaceholderType = NoContentPlaceholderType.INTERACTIVE,\n defaultShowSearchBar = false,\n defaultShowPlots = true,\n hideCopyToClipboard = false,\n hideSearchBarControl = false,\n unitDescription = 'result',\n helpConfiguration,\n hasCustomPlots = false,\n visibleColumnCount = Infinity,\n enabledExternalAnalysisPlatforms = DEFAULT_ENABLED_ANALYSIS_PLATFORMS,\n } = props\n\n const columnAliases = useMemo(\n () => props.columnAliases ?? {},\n [props.columnAliases],\n )\n\n const {\n getCurrentQueryRequest,\n hasFacetedSelectColumn,\n hasResettableFilters,\n rowDataQueryOptions,\n } = useQueryContext()\n const { data: queryMetadata } = useGetQueryMetadata()\n\n // Get the selectColumns from either query so that creating the context isn't bottlenecked by one or the other\n // Use the previous result as placeholder data so we don't reset the selectColumns unless they have actually changed.\n const { data: selectColumnsFromRowData } = useQuery({\n ...rowDataQueryOptions,\n select: data => data.responseBody?.queryResult?.queryResults.headers,\n placeholderData: prevData => prevData,\n })\n const { data: selectColumnsFromMetadata } = useGetQueryMetadata({\n select: data => data.responseBody?.selectColumns,\n placeholderData: prevData => prevData,\n })\n // We deep-compare-memoize the selectColumns so we don't reset visible columns if the reference changes, but not the contents (e.g. on page change)\n const selectColumns = useDeepCompareMemoize(\n selectColumnsFromRowData ?? selectColumnsFromMetadata ?? [],\n )\n\n const [showSqlEditor, setShowSqlEditor] = useState(false)\n const [showPlots, setShowPlots] = useState(defaultShowPlots)\n const [showCopyToClipboard, setShowCopyToClipboard] = useState(\n !hideCopyToClipboard,\n )\n const [showFacetFilter, setShowFacetFilter] = useState(true)\n\n // The search bar and download confirmation should not be shown at the same time.\n const [\n showSearchBar,\n setShowSearchBar,\n showDownloadConfirmation,\n setShowDownloadConfirmation,\n ] = useMutuallyExclusiveState(\n defaultShowSearchBar && !hideSearchBarControl,\n false,\n )\n\n const [\n isShowingExportToAnalysisPlatformModal,\n setIsShowingExportToAnalysisPlatformModal,\n ] = useState<boolean>(false)\n\n const [visibleColumns, setVisibleColumns] = useState<string[]>([])\n\n const lastQueryRequest = useMemo(\n () => getCurrentQueryRequest(),\n [getCurrentQueryRequest],\n )\n\n useEffect(() => {\n // SWC-6030: If sql changes, reset what columns are visible\n setVisibleColumns(\n selectColumns.slice(0, visibleColumnCount).map(el => el.name),\n )\n }, [selectColumns, lastQueryRequest.query.sql, visibleColumnCount])\n\n const getColumnDisplayName = useCallback(\n (columnName: string, jsonPath?: string) => {\n // SWC-5982: if force-display-original-column-names is set, then just return the string\n const forceDisplayOriginalColumnName =\n localStorage.getItem('force-display-original-column-names') === 'true'\n\n if (!columnName || (forceDisplayOriginalColumnName && !jsonPath)) {\n return columnName\n }\n if (columnAliases[columnName]) {\n return columnAliases[columnName]\n }\n if (jsonPath) {\n const columnModel = queryMetadata?.columnModels?.find(\n cm => cm.name === columnName,\n )\n if (columnModel?.jsonSubColumns) {\n const jsonSubColumn = columnModel.jsonSubColumns.find(\n jsc => jsc.jsonPath === jsonPath,\n )\n if (jsonSubColumn) {\n return jsonSubColumn.name\n }\n }\n }\n return unCamelCase(columnName)\n },\n [columnAliases, queryMetadata?.columnModels],\n )\n\n const getHelpText = useCallback(\n (columnName: string, jsonPath?: string): string | undefined => {\n if (Array.isArray(helpConfiguration)) {\n const helpConfig = helpConfiguration.find(\n config =>\n config.columnName === columnName && config.jsonPath === jsonPath,\n )\n return helpConfig?.helpText\n }\n return undefined\n },\n [helpConfiguration],\n )\n\n const NoContentPlaceholder = useCallback(\n () => (\n <NoContentPlaceholderComponent\n type={noContentPlaceholderType}\n hasResettableFilters={hasResettableFilters}\n />\n ),\n [noContentPlaceholderType, hasResettableFilters],\n )\n\n const context: QueryVisualizationContextType = useMemo(\n () => ({\n columnsToShowInTable: visibleColumns,\n setColumnsToShowInTable: setVisibleColumns,\n rgbIndex: props.rgbIndex,\n unitDescription: unitDescription,\n showLastUpdatedOn: props.showLastUpdatedOn,\n getColumnDisplayName,\n getDisplayValue,\n getHelpText,\n NoContentPlaceholder,\n isShowingExportToAnalysisPlatformModal:\n isShowingExportToAnalysisPlatformModal,\n setIsShowingExportToAnalysisPlatformModal:\n setIsShowingExportToAnalysisPlatformModal,\n showFacetFilter: hasFacetedSelectColumn ? showFacetFilter : false,\n setShowFacetFilter,\n hideSearchBarControl,\n showSearchBar,\n setShowSearchBar,\n showDownloadConfirmation,\n setShowDownloadConfirmation,\n showSqlEditor,\n setShowSqlEditor,\n showPlots: hasCustomPlots || hasFacetedSelectColumn ? showPlots : false,\n setShowPlots,\n showCopyToClipboard,\n setShowCopyToClipboard,\n enabledExternalAnalysisPlatforms,\n }),\n [\n NoContentPlaceholder,\n getColumnDisplayName,\n getHelpText,\n hasFacetedSelectColumn,\n isShowingExportToAnalysisPlatformModal,\n props.rgbIndex,\n props.showLastUpdatedOn,\n setShowDownloadConfirmation,\n setShowSearchBar,\n showCopyToClipboard,\n showDownloadConfirmation,\n showFacetFilter,\n showPlots,\n showSearchBar,\n showSqlEditor,\n unitDescription,\n visibleColumns,\n hasCustomPlots,\n enabledExternalAnalysisPlatforms,\n hideSearchBarControl,\n ],\n )\n /**\n * Render the children without any formatting\n */\n const { children } = props\n return (\n <QueryVisualizationContextProvider queryVisualizationContext={context}>\n {children}\n </QueryVisualizationContextProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAM,IAAiE,EAAE;AAgDzE,SAAgB,EACd,GACA;CACA,IAAM,EACJ,8BAA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,IAAc,GAAe,cAAc,MAC/C,MAAM,EAAG,SAAS,EACnB;AACD,OAAI,GAAa,gBAAgB;IAC/B,IAAM,IAAgB,EAAY,eAAe,MAC/C,MAAO,EAAI,aAAa,EACzB;AACD,QAAI,EACF,QAAO,EAAc;;;AAI3B,SAAO,GAAY,EAAW;IAEhC,CAAC,GAAe,GAAe,aAAa,CAC7C,EAEK,IAAc,GACjB,GAAoB,MAA0C;AAC7D,MAAI,MAAM,QAAQ,EAAkB,CAKlC,QAJmB,EAAkB,MACnC,MACE,EAAO,eAAe,KAAc,EAAO,aAAa,EAErD,EAAY;IAIvB,CAAC,EAAkB,CACpB,EAEK,IAAuB,QAEzB,kBAAC,GAAD;EACE,MAAM;EACgB;EACtB,CAAA,EAEJ,CAAC,GAA0B,EAAqB,CACjD,EAEK,KAAyC,SACtC;EACL,sBAAsB;EACtB,yBAAyB;EACzB,UAAU,EAAM;EACC;EACjB,mBAAmB,EAAM;EACzB;EACA;EACA;EACA,sBAAA;EAEE;EAEA;EACF,iBAAiB,IAAyB,IAAkB;EAC5D;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW,KAAkB,IAAyB,IAAY;EAClE;EACA;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA,EAAM;EACN,EAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF,EAIK,EAAE,iBAAa;AACrB,QACE,kBAAC,GAAD;EAAmC,2BAA2B;EAC3D;EACiC,CAAA"}
|
|
@@ -40,6 +40,11 @@ type QueryWrapperPlotNavOwnProps = {
|
|
|
40
40
|
hideTopLevelControls?: boolean;
|
|
41
41
|
} & Omit<TopLevelControlsProps, 'entityId'> & Pick<QueryWrapperPlotNavCustomPlotParams, 'onCustomPlotClick'> & Pick<QueryWrapperProps, 'isRowSelectionVisible' | 'rowSelectionPrimaryKey' | 'isRowSelectionUIFloating' | 'fileIdColumnName' | 'fileNameColumnName' | 'fileVersionColumnName'> & Pick<QueryVisualizationWrapperProps, 'defaultShowPlots' | 'visibleColumnCount' | 'columnAliases' | 'rgbIndex' | 'showLastUpdatedOn' | 'noContentPlaceholderType' | 'unitDescription' | 'additionalFiltersSessionStorageKey' | 'helpConfiguration' | 'hideCopyToClipboard' | 'hideSearchBarControl' | 'hideVisualizationsControl' | 'enabledExternalAnalysisPlatforms'> & Pick<QueryContextType, 'combineRangeFacetConfig'>;
|
|
42
42
|
export type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams & PlotsContainerProps & QueryWrapperPlotNavOwnProps;
|
|
43
|
+
export type QueryWrapperPlotNavContentsProps = Pick<QueryWrapperPlotNavProps, 'tableConfiguration' | 'name' | 'cardConfiguration' | 'facetsToPlot' | 'availableFacets' | 'initialExpandedFacetControls' | 'hideDownload' | 'hideQueryCount' | 'hideSqlEditorControl' | 'hideVisualizationsControl' | 'searchConfiguration' | 'enabledExternalAnalysisPlatforms' | 'cavaticaConnectAccountURL' | 'customControls' | 'customPlots' | 'fileIdColumnName' | 'fileNameColumnName' | 'fileVersionColumnName' | 'initialLimit' | 'initialPlotTypeByFacetColumnName' | 'hideTopLevelControls'> & {
|
|
44
|
+
isFullTextSearchEnabled: boolean;
|
|
45
|
+
remount?: () => void;
|
|
46
|
+
};
|
|
47
|
+
export declare function QueryWrapperPlotNavContents(props: QueryWrapperPlotNavContentsProps): import("react/jsx-runtime").JSX.Element;
|
|
43
48
|
export default function QueryWrapperPlotNav(props: QueryWrapperPlotNavProps): import("react/jsx-runtime").JSX.Element;
|
|
44
49
|
export {};
|
|
45
50
|
//# sourceMappingURL=QueryWrapperPlotNav.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryWrapperPlotNav.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAiBlG,O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2BAA2B,CAC7C,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,eAAe,CAAC,EAAE,wBAAwB,CAAC,iBAAiB,CAAC,CAAA;IAC7D,4BAA4B,CAAC,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,CAAA;IACvF,WAAW,CAAC,EAAE,4BAA4B,EAAE,CAAA;IAC5C,cAAc,CAAC,EAAE,aAAa,EAAE,CAAA;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAA;IAChD,4BAA4B,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GAAG,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,GACzC,IAAI,CAAC,mCAAmC,EAAE,mBAAmB,CAAC,GAC9D,IAAI,CACF,iBAAiB,EACf,uBAAuB,GACvB,wBAAwB,GACxB,0BAA0B,GAC1B,kBAAkB,GAClB,oBAAoB,GACpB,uBAAuB,CAC1B,GACD,IAAI,CACF,8BAA8B,EAC5B,kBAAkB,GAClB,oBAAoB,GACpB,eAAe,GACf,UAAU,GACV,mBAAmB,GACnB,0BAA0B,GAC1B,iBAAiB,GACjB,oCAAoC,GACpC,mBAAmB,GACnB,qBAAqB,GACrB,sBAAsB,GACtB,2BAA2B,GAC3B,kCAAkC,CACrC,GACD,IAAI,CAAC,gBAAgB,EAAE,yBAAyB,CAAC,CAAA;AAEnD,MAAM,MAAM,wBAAwB,GAAG,6BAA6B,GAClE,mBAAmB,GACnB,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryWrapperPlotNav.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx"],"names":[],"mappings":"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,oBAAoB,GACpB,MAAM,GACN,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,8BAA8B,GAC9B,cAAc,GACd,gBAAgB,GAChB,sBAAsB,GACtB,2BAA2B,GAC3B,qBAAqB,GACrB,kCAAkC,GAClC,2BAA2B,GAC3B,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,oBAAoB,GACpB,uBAAuB,GACvB,cAAc,GACd,kCAAkC,GAClC,sBAAsB,CACzB,GAAG;IACF,uBAAuB,EAAE,OAAO,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,2CAsJxC;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAmH1E"}
|
|
@@ -38,62 +38,65 @@ import { useAtomValue as P } from "jotai";
|
|
|
38
38
|
//#region src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx
|
|
39
39
|
var F = "isShowingFacetFilters", I = "isHidingFacetFilters", L = "hasSelectedRows";
|
|
40
40
|
function R(e) {
|
|
41
|
-
let { tableConfiguration: t, name: n, cardConfiguration: i, facetsToPlot: s, availableFacets: l, initialExpandedFacetControls: d, hideDownload: g, hideQueryCount:
|
|
41
|
+
let { tableConfiguration: t, name: n, cardConfiguration: i, facetsToPlot: s, availableFacets: l, initialExpandedFacetControls: d, hideDownload: g, hideQueryCount: E, hideSqlEditorControl: D, hideVisualizationsControl: R, searchConfiguration: z, cavaticaConnectAccountURL: B, customControls: V, remount: H = () => {}, isFullTextSearchEnabled: U, customPlots: ee, initialLimit: W, initialPlotTypeByFacetColumnName: G, hideTopLevelControls: K } = e, q = o(), [J, Y] = O(!1), { hasFacetedSelectColumn: X, queryMetadataQueryOptions: Z } = q, { isLoading: Q } = N(Z), te = P(u), $ = q.currentQueryRequest, ne = $?.query.selectedFacets !== void 0 && $.query.selectedFacets.length > 0 || $?.query.additionalFilters !== void 0 && $?.query.additionalFilters.length > 0, re = y();
|
|
42
42
|
return /* @__PURE__ */ j(c, { children: (e) => {
|
|
43
43
|
if (e === void 0) throw Error("No queryVisualizationContext found when using QueryVisualizationContextConsumer");
|
|
44
44
|
return /* @__PURE__ */ j(k, {
|
|
45
|
-
className: `QueryWrapperPlotNav ${e.showFacetFilter ? F : I} ${
|
|
46
|
-
sx: { "*": { cursor:
|
|
45
|
+
className: `QueryWrapperPlotNav ${e.showFacetFilter ? F : I} ${te ? L : ""} ${K ? "isHidingTopLevelControls" : ""}`,
|
|
46
|
+
sx: { "*": { cursor: Q ? "wait" : void 0 } },
|
|
47
47
|
children: /* @__PURE__ */ M(m, { children: [
|
|
48
|
-
|
|
49
|
-
...
|
|
50
|
-
queryContext:
|
|
48
|
+
U ? /* @__PURE__ */ j(b, { ftsConfig: z?.ftsConfig }) : /* @__PURE__ */ j(x, {
|
|
49
|
+
...z,
|
|
50
|
+
queryContext: q,
|
|
51
51
|
queryVisualizationContext: e
|
|
52
52
|
}),
|
|
53
53
|
/* @__PURE__ */ j(p, {}),
|
|
54
54
|
e.showDownloadConfirmation && /* @__PURE__ */ j(a, {
|
|
55
|
-
addToDownloadListRequest:
|
|
55
|
+
addToDownloadListRequest: re,
|
|
56
56
|
onClose: () => e.setShowDownloadConfirmation(!1)
|
|
57
57
|
}),
|
|
58
|
-
!
|
|
58
|
+
!K && /* @__PURE__ */ j(r, { children: /* @__PURE__ */ j(S, {
|
|
59
59
|
showColumnSelection: t !== void 0,
|
|
60
60
|
name: n,
|
|
61
61
|
hideDownload: g,
|
|
62
|
-
hideQueryCount:
|
|
63
|
-
hideFacetFilterControl: !
|
|
64
|
-
hideVisualizationsControl: !
|
|
65
|
-
hideSqlEditorControl:
|
|
66
|
-
cavaticaConnectAccountURL:
|
|
67
|
-
remount:
|
|
68
|
-
customControls:
|
|
62
|
+
hideQueryCount: E,
|
|
63
|
+
hideFacetFilterControl: !X,
|
|
64
|
+
hideVisualizationsControl: !X || R,
|
|
65
|
+
hideSqlEditorControl: D,
|
|
66
|
+
cavaticaConnectAccountURL: B,
|
|
67
|
+
remount: H,
|
|
68
|
+
customControls: V
|
|
69
69
|
}) }),
|
|
70
|
-
|
|
70
|
+
X && /* @__PURE__ */ j(A, { children: /* @__PURE__ */ j(v, {
|
|
71
71
|
availableFacets: l,
|
|
72
72
|
initialExpandedFacetControls: d
|
|
73
73
|
}) }),
|
|
74
|
-
/* @__PURE__ */ j(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
/* @__PURE__ */ j(T, {
|
|
75
|
+
fallback: null,
|
|
76
|
+
children: /* @__PURE__ */ j(f, {
|
|
77
|
+
frontText: "",
|
|
78
|
+
endText: ne ? "filtered by" : "",
|
|
79
|
+
hideIfUnfiltered: !0
|
|
80
|
+
})
|
|
78
81
|
}),
|
|
79
82
|
/* @__PURE__ */ j(C, {
|
|
80
|
-
customControls:
|
|
81
|
-
remount:
|
|
83
|
+
customControls: V,
|
|
84
|
+
remount: H
|
|
82
85
|
}),
|
|
83
86
|
/* @__PURE__ */ j(w, {
|
|
84
87
|
facetsToPlot: s,
|
|
85
|
-
customPlots:
|
|
86
|
-
initialPlotTypeByFacetColumnName:
|
|
88
|
+
customPlots: ee,
|
|
89
|
+
initialPlotTypeByFacetColumnName: G
|
|
87
90
|
}),
|
|
88
91
|
/* @__PURE__ */ j(_, {
|
|
89
92
|
tableConfiguration: t,
|
|
90
93
|
hideDownload: g,
|
|
91
94
|
cardConfiguration: i,
|
|
92
|
-
initialLimit:
|
|
95
|
+
initialLimit: W
|
|
93
96
|
}),
|
|
94
|
-
|
|
95
|
-
getLastQueryRequest:
|
|
96
|
-
onClose: () =>
|
|
97
|
+
J && /* @__PURE__ */ j(h, {
|
|
98
|
+
getLastQueryRequest: q?.getCurrentQueryRequest,
|
|
99
|
+
onClose: () => Y(!1)
|
|
97
100
|
})
|
|
98
101
|
] })
|
|
99
102
|
});
|
|
@@ -151,6 +154,6 @@ function z(r) {
|
|
|
151
154
|
}));
|
|
152
155
|
}
|
|
153
156
|
//#endregion
|
|
154
|
-
export { L as HAS_SELECTED_ROWS_CSS, I as QUERY_FILTERS_COLLAPSED_CSS, F as QUERY_FILTERS_EXPANDED_CSS, z as default };
|
|
157
|
+
export { L as HAS_SELECTED_ROWS_CSS, I as QUERY_FILTERS_COLLAPSED_CSS, F as QUERY_FILTERS_EXPANDED_CSS, R as QueryWrapperPlotNavContents, z as default };
|
|
155
158
|
|
|
156
159
|
//# 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 onViewSharingSettingsClicked?: (benefactorId: string) => void\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 | 'columnAliases'\n | 'rgbIndex'\n | 'showLastUpdatedOn'\n | 'noContentPlaceholderType'\n | 'unitDescription'\n | 'additionalFiltersSessionStorageKey'\n | 'helpConfiguration'\n | 'hideCopyToClipboard'\n | 'hideSearchBarControl'\n | 'hideVisualizationsControl'\n | 'enabledExternalAnalysisPlatforms'\n > &\n Pick<QueryContextType, 'combineRangeFacetConfig'>\n\nexport type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams &\n PlotsContainerProps &\n QueryWrapperPlotNavOwnProps\n\ntype QueryWrapperPlotNavContentsProps = Pick<\n QueryWrapperPlotNavProps,\n | 'tableConfiguration'\n | 'name'\n | 'cardConfiguration'\n | 'facetsToPlot'\n | 'availableFacets'\n | 'initialExpandedFacetControls'\n | 'hideDownload'\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\nfunction QueryWrapperPlotNavContents(props: QueryWrapperPlotNavContentsProps) {\n const {\n tableConfiguration,\n name,\n cardConfiguration,\n facetsToPlot,\n availableFacets,\n initialExpandedFacetControls,\n hideDownload,\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 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 <TotalQueryResults\n frontText={''}\n endText={hasFacetsOrFilters ? 'filtered by' : ''}\n hideIfUnfiltered={true}\n />\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 helpConfiguration={helpConfiguration}\n visibleColumnCount={props.visibleColumnCount}\n defaultShowPlots={props.defaultShowPlots}\n hideCopyToClipboard={props.hideCopyToClipboard}\n defaultShowSearchBar={\n (props.defaultShowSearchBox || isFullTextSearchEnabled) &&\n !props.hideSearchBarControl\n }\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;AA2F7C,SAAS,EAA4B,GAAyC;CAC5E,IAAM,EACJ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ACmB;GACjB,UAAU,EAAM;GAChB,eAAe,EAAM;GACF;GACnB,oBAAoB,EAAM;GAC1B,kBAAkB,EAAM;GACxB,qBAAqB,EAAM;GAC3B,uBACG,EAAM,wBAAwB,MAC/B,CAAC,EAAM;GAET,sBAAsB,EAAM;GACT;GACnB,0BAA0B,EAAyB;GACnD,gBAAgB,MAAM,QAAQ,EAAY,IAAI,EAAY,SAAS;GACjC;aAElC,kBAAC,GAAD;IACE,GAAI;IACqB;IAChB;IACT,CAAA;GACwB,CAAA;EACnB,CAAA,CACE"}
|
|
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 onViewSharingSettingsClicked?: (benefactorId: string) => void\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 | 'columnAliases'\n | 'rgbIndex'\n | 'showLastUpdatedOn'\n | 'noContentPlaceholderType'\n | 'unitDescription'\n | 'additionalFiltersSessionStorageKey'\n | 'helpConfiguration'\n | 'hideCopyToClipboard'\n | 'hideSearchBarControl'\n | 'hideVisualizationsControl'\n | 'enabledExternalAnalysisPlatforms'\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 | '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 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 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 helpConfiguration={helpConfiguration}\n visibleColumnCount={props.visibleColumnCount}\n defaultShowPlots={props.defaultShowPlots}\n hideCopyToClipboard={props.hideCopyToClipboard}\n defaultShowSearchBar={\n (props.defaultShowSearchBox || isFullTextSearchEnabled) &&\n !props.hideSearchBarControl\n }\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,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AAK;EACO;EA4BC,EA1Bb,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAA6B,CAAA;YAC/C,kBAAC,GAAD;GACmB;GACjB,UAAU,EAAM;GAChB,eAAe,EAAM;GACF;GACnB,oBAAoB,EAAM;GAC1B,kBAAkB,EAAM;GACxB,qBAAqB,EAAM;GAC3B,uBACG,EAAM,wBAAwB,MAC/B,CAAC,EAAM;GAET,sBAAsB,EAAM;GACT;GACnB,0BAA0B,EAAyB;GACnD,gBAAgB,MAAM,QAAQ,EAAY,IAAI,EAAY,SAAS;GACjC;aAElC,kBAAC,GAAD;IACE,GAAI;IACqB;IAChB;IACT,CAAA;GACwB,CAAA;EACnB,CAAA,CACE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseRowSet.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/UseRowSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"UseRowSet.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/UseRowSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AA2ExD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM;;;;;;;EAyC9C"}
|
|
@@ -30,7 +30,10 @@ function s() {
|
|
|
30
30
|
...r,
|
|
31
31
|
enabled: !n,
|
|
32
32
|
placeholderData: (t) => {
|
|
33
|
-
if (t
|
|
33
|
+
if (t) {
|
|
34
|
+
let n = t.requestBody?.query;
|
|
35
|
+
if (n && e(n, i().query)) return t;
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
}),
|
|
36
39
|
paginatedQueryProgressMessage: a({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseRowSet.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/UseRowSet.ts"],"sourcesContent":["import { queryRequestsHaveSameTotalResults } from '@/utils/functions/queryUtils'\nimport { RowSet } from '@sage-bionetworks/synapse-types'\nimport { useInfiniteQuery, useQuery } from '@tanstack/react-query'\nimport { cloneDeep } from 'lodash-es'\nimport { useMemo } from 'react'\nimport { useQueryContext } from '../QueryContext'\n\nfunction useGetInfiniteRowSet() {\n const { isInfinite, rowDataInfiniteQueryOptions } = useQueryContext()\n const infiniteQuery = useInfiniteQuery({\n ...rowDataInfiniteQueryOptions,\n enabled: isInfinite,\n })\n\n const infiniteQueryProgressMessage = useInfiniteQuery({\n ...rowDataInfiniteQueryOptions,\n select: asyncJob => asyncJob.pages[0].progressMessage,\n enabled: isInfinite,\n })\n\n const infiniteQueryRowSet: RowSet | undefined = useMemo(() => {\n const rowSet = cloneDeep(\n infiniteQuery.data?.pages[0]?.responseBody?.queryResult?.queryResults,\n )\n if (rowSet) {\n rowSet.rows =\n infiniteQuery.data?.pages.flatMap(\n page => page.responseBody?.queryResult?.queryResults.rows || [],\n ) || []\n }\n return rowSet\n }, [infiniteQuery.data?.pages])\n\n return {\n infiniteQuery,\n infiniteQueryRowSet,\n infiniteQueryProgressMessage,\n }\n}\n\nfunction useGetPaginatedRowSet() {\n const { isInfinite, rowDataQueryOptions, getCurrentQueryRequest } =\n useQueryContext()\n const paginatedQuery = useQuery({\n ...rowDataQueryOptions,\n enabled: !isInfinite,\n // Keep the previous data when fetching a new page. We will use `UseQueryResult.isPlaceholderData` to trigger a showing placeholder UI\n placeholderData: prevData => {\n if (prevData) {\n // Check that only the page/sort changed; if the filters/sql changed, then don't hold on to the old data\n if (\n queryRequestsHaveSameTotalResults(\n
|
|
1
|
+
{"version":3,"file":"UseRowSet.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/UseRowSet.ts"],"sourcesContent":["import { queryRequestsHaveSameTotalResults } from '@/utils/functions/queryUtils'\nimport { RowSet } from '@sage-bionetworks/synapse-types'\nimport { useInfiniteQuery, useQuery } from '@tanstack/react-query'\nimport { cloneDeep } from 'lodash-es'\nimport { useMemo } from 'react'\nimport { useQueryContext } from '../QueryContext'\n\nfunction useGetInfiniteRowSet() {\n const { isInfinite, rowDataInfiniteQueryOptions } = useQueryContext()\n const infiniteQuery = useInfiniteQuery({\n ...rowDataInfiniteQueryOptions,\n enabled: isInfinite,\n })\n\n const infiniteQueryProgressMessage = useInfiniteQuery({\n ...rowDataInfiniteQueryOptions,\n select: asyncJob => asyncJob.pages[0].progressMessage,\n enabled: isInfinite,\n })\n\n const infiniteQueryRowSet: RowSet | undefined = useMemo(() => {\n const rowSet = cloneDeep(\n infiniteQuery.data?.pages[0]?.responseBody?.queryResult?.queryResults,\n )\n if (rowSet) {\n rowSet.rows =\n infiniteQuery.data?.pages.flatMap(\n page => page.responseBody?.queryResult?.queryResults.rows || [],\n ) || []\n }\n return rowSet\n }, [infiniteQuery.data?.pages])\n\n return {\n infiniteQuery,\n infiniteQueryRowSet,\n infiniteQueryProgressMessage,\n }\n}\n\nfunction useGetPaginatedRowSet() {\n const { isInfinite, rowDataQueryOptions, getCurrentQueryRequest } =\n useQueryContext()\n const paginatedQuery = useQuery({\n ...rowDataQueryOptions,\n enabled: !isInfinite,\n // Keep the previous data when fetching a new page. We will use `UseQueryResult.isPlaceholderData` to trigger a showing placeholder UI\n placeholderData: prevData => {\n if (prevData) {\n const prevQuery = prevData.requestBody?.query\n // Check that only the page/sort changed; if the filters/sql changed, then don't hold on to the old data\n // prevQuery may be undefined when the requestBody is not a QueryBundleRequest (e.g. SearchQueryWrapper)\n if (\n prevQuery &&\n queryRequestsHaveSameTotalResults(\n prevQuery,\n getCurrentQueryRequest().query,\n )\n ) {\n return prevData\n }\n }\n return undefined\n },\n })\n const paginatedQueryProgressMessage = useQuery({\n ...rowDataQueryOptions,\n select: asyncJob => asyncJob.progressMessage,\n enabled: !isInfinite,\n // Keep the previous data when fetching a new page. We will use `isPlaceholderData` to trigger a showing placeholder UI\n placeholderData: prevData => prevData,\n })\n\n return { paginatedQuery, paginatedQueryProgressMessage }\n}\n\n/**\n * Fetches the row data for a query and returns a RowSet that can be rendered as cards or a table. Respects the value of\n * QueryContext.isInfinite.\n * @param initialLimit\n */\nexport function useRowSet(initialLimit?: number) {\n const { isInfinite } = useQueryContext()\n\n const { paginatedQuery, paginatedQueryProgressMessage } =\n useGetPaginatedRowSet()\n const { infiniteQuery, infiniteQueryRowSet, infiniteQueryProgressMessage } =\n useGetInfiniteRowSet()\n\n const rowSet = useMemo(() => {\n let rowSet: RowSet | undefined\n if (isInfinite) {\n rowSet = infiniteQueryRowSet\n } else {\n rowSet = paginatedQuery.data\n }\n if (rowSet && initialLimit != null) {\n rowSet = { ...rowSet, rows: rowSet.rows.slice(0, initialLimit) }\n }\n return rowSet\n }, [infiniteQueryRowSet, initialLimit, isInfinite, paginatedQuery.data])\n\n const progressMessage: string | undefined = isInfinite\n ? infiniteQueryProgressMessage.data\n : paginatedQueryProgressMessage.data\n\n const isLoading = isInfinite\n ? infiniteQuery.isLoading\n : paginatedQuery.isLoading\n\n const isLoadingNewPage = isInfinite\n ? infiniteQuery.isFetchingNextPage\n : paginatedQuery.isPlaceholderData\n\n return {\n rowSet,\n progressMessage,\n isLoading,\n isLoadingNewPage,\n fetchNextPageOfInfiniteData: infiniteQuery.fetchNextPage,\n hasNextPageOfInfiniteData: infiniteQuery.hasNextPage,\n }\n}\n"],"mappings":";;;;;;;AAOA,SAAS,IAAuB;CAC9B,IAAM,EAAE,eAAY,mCAAgC,GAAiB,EAC/D,IAAgB,EAAiB;EACrC,GAAG;EACH,SAAS;EACV,CAAC,EAEI,IAA+B,EAAiB;EACpD,GAAG;EACH,SAAQ,MAAY,EAAS,MAAM,GAAG;EACtC,SAAS;EACV,CAAC;AAeF,QAAO;EACL;EACA,qBAf8C,QAAc;GAC5D,IAAM,IAAS,EACb,EAAc,MAAM,MAAM,IAAI,cAAc,aAAa,aAC1D;AAOD,UANI,MACF,EAAO,OACL,EAAc,MAAM,MAAM,SACxB,MAAQ,EAAK,cAAc,aAAa,aAAa,QAAQ,EAAE,CAChE,IAAI,EAAE,GAEJ;KACN,CAAC,EAAc,MAAM,MAAM,CAI5B;EACA;EACD;;AAGH,SAAS,IAAwB;CAC/B,IAAM,EAAE,eAAY,wBAAqB,8BACvC,GAAiB;AA+BnB,QAAO;EAAE,gBA9Bc,EAAS;GAC9B,GAAG;GACH,SAAS,CAAC;GAEV,kBAAiB,MAAY;AAC3B,QAAI,GAAU;KACZ,IAAM,IAAY,EAAS,aAAa;AAGxC,SACE,KACA,EACE,GACA,GAAwB,CAAC,MAC1B,CAED,QAAO;;;GAKd,CASQ;EAAgB,+BARa,EAAS;GAC7C,GAAG;GACH,SAAQ,MAAY,EAAS;GAC7B,SAAS,CAAC;GAEV,kBAAiB,MAAY;GAC9B,CAEwB;EAA+B;;AAQ1D,SAAgB,EAAU,GAAuB;CAC/C,IAAM,EAAE,kBAAe,GAAiB,EAElC,EAAE,mBAAgB,qCACtB,GAAuB,EACnB,EAAE,kBAAe,wBAAqB,oCAC1C,GAAsB;AA2BxB,QAAO;EACL,QA1Ba,QAAc;GAC3B,IAAI;AASJ,UARA,AAGE,IAHE,IACO,IAEA,EAAe,MAEtB,KAAU,KAAgB,SAC5B,IAAS;IAAE,GAAG;IAAQ,MAAM,EAAO,KAAK,MAAM,GAAG,EAAa;IAAE,GAE3D;KACN;GAAC;GAAqB;GAAc;GAAY,EAAe;GAAK,CAerE;EACA,iBAd0C,IACxC,EAA6B,OAC7B,EAA8B;EAahC,WAXgB,IACd,EAAc,YACd,EAAe;EAUjB,kBARuB,IACrB,EAAc,qBACd,EAAe;EAOjB,6BAA6B,EAAc;EAC3C,2BAA2B,EAAc;EAC1C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AsynchronousJobStatus, ColumnModel, QueryBundleRequest, QueryResultBundle, RowSet } from '@sage-bionetworks/synapse-types';
|
|
2
|
+
import type { SearchIndexQuery, SearchQueryResults, SynapseClientError } from '@sage-bionetworks/synapse-client';
|
|
3
|
+
import { InfiniteData, QueryKey, UseInfiniteQueryOptions, UseSuspenseQueryOptions } from '@tanstack/react-query';
|
|
4
|
+
import { KeyFactory } from '@/synapse-queries/KeyFactory';
|
|
5
|
+
/**
|
|
6
|
+
* TanStack Query options for the SearchQueryServicesApi, mirroring TableQueryUseQueryOptions
|
|
7
|
+
* but parameterised over SearchIndexQuery rather than QueryBundleRequest. This eliminates
|
|
8
|
+
* `as unknown as` casts inside the implementation. A single cast to TableQueryUseQueryOptions
|
|
9
|
+
* is still required at the boundary where SearchQueryWrapper assigns these into QueryContextType.
|
|
10
|
+
*/
|
|
11
|
+
export type SearchTableQueryUseQueryOptions = {
|
|
12
|
+
rowDataQueryOptions: UseSuspenseQueryOptions<AsynchronousJobStatus<SearchIndexQuery, QueryResultBundle>, SynapseClientError, RowSet | undefined>;
|
|
13
|
+
rowDataInfiniteQueryOptions: UseInfiniteQueryOptions<AsynchronousJobStatus<SearchIndexQuery, QueryResultBundle>, SynapseClientError, InfiniteData<AsynchronousJobStatus<SearchIndexQuery, QueryResultBundle>>, QueryKey, string | number | undefined>;
|
|
14
|
+
queryMetadataQueryOptions: UseSuspenseQueryOptions<AsynchronousJobStatus<SearchIndexQuery, QueryResultBundle>, SynapseClientError, Omit<QueryResultBundle, 'queryResult'>>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Converts a QueryBundleRequest (used internally for state management) into a SearchIndexQuery
|
|
18
|
+
* that can be sent to the SearchQueryServicesApi.
|
|
19
|
+
*
|
|
20
|
+
* Mapping:
|
|
21
|
+
* - columnModels (facetType defined) → facetRequests (columns to aggregate as facets, with optional sort config)
|
|
22
|
+
* - query.selectedFacets (enumeration) → termsFilters (IN-clause filters)
|
|
23
|
+
* - query.selectedFacets (range) → rangeFilters (range filters)
|
|
24
|
+
* - query.sort → sort (SortItem { column, direction } → SearchSortField { columnName, direction })
|
|
25
|
+
* - query.limit → limit
|
|
26
|
+
* - query.offset → offset
|
|
27
|
+
* - partMask → dropped (SearchIndexQuery has no bitmask concept)
|
|
28
|
+
*/
|
|
29
|
+
export declare function toSearchIndexQuery(queryBundleRequest: QueryBundleRequest, searchIndexId: string, columnModels?: ColumnModel[]): SearchIndexQuery;
|
|
30
|
+
/**
|
|
31
|
+
* Converts a SearchQueryResults (the actual API response) into a QueryResultBundle
|
|
32
|
+
* so that existing subcomponents (FacetFilterControls, RowSetView, etc.) work unchanged.
|
|
33
|
+
*
|
|
34
|
+
* Mapping:
|
|
35
|
+
* - totalHits → queryCount
|
|
36
|
+
* - hits → queryResult.queryResults (rows derived from hit.rowId/rowVersion/fields)
|
|
37
|
+
* - facets → facets (same FacetColumnResult type)
|
|
38
|
+
*/
|
|
39
|
+
export declare function searchQueryResultsToQueryResultBundle(results: SearchQueryResults | undefined, query: SearchIndexQuery, columnModels?: ColumnModel[]): QueryResultBundle;
|
|
40
|
+
export declare function getSearchQueryUseQueryOptions(queryBundleRequest: QueryBundleRequest, keyFactory: KeyFactory, accessToken: string | undefined, searchIndexId: string, columnModels?: ColumnModel[]): SearchTableQueryUseQueryOptions;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a stable callback that fetches autocomplete suggestions for a search input
|
|
43
|
+
* using the synchronous `POST /search/autocomplete` endpoint.
|
|
44
|
+
*
|
|
45
|
+
* The query is built from the current `searchIndexId` and `autocompleteFieldName`:
|
|
46
|
+
* - `searchQuery.queryText` is set to the user-entered search text
|
|
47
|
+
* - `searchQuery.queryFields` is set to `[autocompleteFieldName]` so the server
|
|
48
|
+
* only returns values for that single field
|
|
49
|
+
*
|
|
50
|
+
* When `autocompleteFieldName` is undefined, the returned callback immediately returns `[]`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useGetSuggestionsForSearchIndex(searchIndexId: string, autocompleteFieldName: string | undefined): (searchText: string) => Promise<string[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns TanStack Query options that call the SearchQueryServicesApi (instead of the
|
|
55
|
+
* standard Table Query API) but return data in the same QueryResultBundle format, allowing
|
|
56
|
+
* all existing subcomponents (FacetFilterControls, RowSetView, etc.) to work unchanged.
|
|
57
|
+
*/
|
|
58
|
+
export declare function useSearchQueryUseQueryOptions(queryBundleRequest: QueryBundleRequest, searchIndexId: string, synapseId?: string): SearchTableQueryUseQueryOptions;
|
|
59
|
+
//# sourceMappingURL=SearchQueryUseQueryOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchQueryUseQueryOptions.d.ts","sourceRoot":"","sources":["../../../src/components/SearchQueryWrapper/SearchQueryUseQueryOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACrB,WAAW,EAKX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EAIP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAGV,gBAAgB,EAEhB,kBAAkB,EAGlB,kBAAkB,EACnB,MAAM,kCAAkC,CAAA;AAKzC,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,mBAAmB,EAAE,uBAAuB,CAC1C,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAC1D,kBAAkB,EAClB,MAAM,GAAG,SAAS,CACnB,CAAA;IACD,2BAA2B,EAAE,uBAAuB,CAClD,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAC1D,kBAAkB,EAClB,YAAY,CAAC,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC,EACxE,QAAQ,EACR,MAAM,GAAG,MAAM,GAAG,SAAS,CAC5B,CAAA;IACD,yBAAyB,EAAE,uBAAuB,CAChD,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAC1D,kBAAkB,EAClB,IAAI,CAAC,iB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