synapse-react-client 4.0.15-SWC-7835 → 4.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.js +1 -1
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js +1 -0
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts +2 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts +2 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +53 -51
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +1 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +38 -23
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -1
- package/dist/components/widgets/Range.d.ts.map +1 -1
- package/dist/components/widgets/Range.js +51 -41
- package/dist/components/widgets/Range.js.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts +3 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js +3 -3
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.d.ts +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js +11 -11
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.d.ts +9 -2
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.js +21 -14
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.js +16 -10
- package/dist/features/curator/dashboard/components/CurationTaskCard.js.map +1 -1
- package/dist/features/curator/dashboard/components/UserOrTeamChip.css +1 -1
- package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js +1 -1
- package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js.map +1 -1
- package/dist/features/curator/dashboard/components/UserOrTeamChip.module.scss +5 -2
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +9 -0
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
- package/dist/style/components/_total-query-results.scss +4 -0
- package/dist/style/main.css +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/SWC.index.js
CHANGED
|
@@ -109,7 +109,7 @@ var x = { BackendDestinationEnum: r }, S = {
|
|
|
109
109
|
sendSearchResultsReturnedEvent: y,
|
|
110
110
|
sendSearchResultReturnedEvent: v,
|
|
111
111
|
sendSearchResultClickedEvent: _
|
|
112
|
-
}, T = "4.0.
|
|
112
|
+
}, T = "4.0.16";
|
|
113
113
|
//#endregion
|
|
114
114
|
export { w as Analytics, a as HttpClient, d as Palettes, o as SynapseClient, C as SynapseComponents, n as SynapseConstants, S as SynapseContext, x as SynapseEnums, m as SynapseQueries, T as SynapseReactClientVersion, p as SynapseSessionManager, i as xssOptions };
|
|
115
115
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetSchemaForGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/hooks/useGetSchemaForGrid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAEZ,MAAM,kCAAkC,CAAA;AAUzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"useGetSchemaForGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/hooks/useGetSchemaForGrid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAEZ,MAAM,kCAAkC,CAAA;AAUzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AA0DzC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,2BAmCtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetSchemaForGrid.js","names":["useGetEntity","useGetSchema","GridSession","instanceOfEntityView","createComparator","createMerger","createShallowAllOfMerge","createDeduplicator","createIntersector","JSONSchema7","isObject","useMemo","compareSchemaDefinitions","compareSchemaValues","mergeArrayOfSchemaDefinitions","intersectJson","deduplicateJsonSchemaDef","shallowAllOfMerge","GRID_ENTITY_READONLY_PROPERTIES","addReadonlyToEntityProperties","jsonSchema","properties","updatedProperties","propertiesToMakeReadonly","forEach","prop","readOnly","useGetSchemaForGrid","session","$","_c","t0","gridJsonSchema$Id","t1","enabled","data","t2","sourceEntityId","t3","entityData","undefined","includeBaseEntitySchema","t4","select","entityJsonSchema","t5","t6","allOf"],"sources":["../../../../src/components/DataGrid/hooks/useGetSchemaForGrid.ts"],"sourcesContent":["import { useGetEntity, useGetSchema } from '@/synapse-queries/index'\nimport {\n GridSession,\n instanceOfEntityView,\n} from '@sage-bionetworks/synapse-client'\nimport {\n createComparator,\n createMerger,\n createShallowAllOfMerge,\n} from '@x0k/json-schema-merge'\nimport {\n createDeduplicator,\n createIntersector,\n} from '@x0k/json-schema-merge/lib/array'\nimport { JSONSchema7 } from 'json-schema'\nimport isObject from 'lodash-es/isObject'\nimport { useMemo } from 'react'\n\nconst { compareSchemaDefinitions, compareSchemaValues } = createComparator()\nconst { mergeArrayOfSchemaDefinitions } = createMerger({\n intersectJson: createIntersector(compareSchemaValues),\n deduplicateJsonSchemaDef: createDeduplicator(compareSchemaDefinitions),\n})\nconst shallowAllOfMerge = createShallowAllOfMerge(mergeArrayOfSchemaDefinitions)\n\nconst GRID_ENTITY_READONLY_PROPERTIES = [\n 'id',\n 'createdBy',\n 'createdOn',\n 'modifiedBy',\n 'modifiedOn',\n 'etag',\n 'concreteType',\n 'parentId',\n 'path',\n 'type',\n 'currentVersion',\n 'benefactorId',\n]\n\n/**\n * The Synapse JSON Schemas for entities do not indicate which properties should be readOnly.\n * Amend the schema to mark certain properties as readOnly so they cannot be edited in the grid.\n */\nfunction addReadonlyToEntityProperties(jsonSchema: JSONSchema7): JSONSchema7 {\n if (!jsonSchema.properties) {\n return jsonSchema\n }\n\n const updatedProperties = { ...jsonSchema.properties }\n\n // List of properties to mark as read-only\n const propertiesToMakeReadonly = GRID_ENTITY_READONLY_PROPERTIES\n\n propertiesToMakeReadonly.forEach(prop => {\n if (updatedProperties[prop]) {\n updatedProperties[prop] = {\n ...(isObject(updatedProperties[prop]) ? updatedProperties[prop] : {}),\n readOnly: true,\n }\n } else {\n updatedProperties[prop] = { readOnly: true }\n }\n })\n\n return {\n ...jsonSchema,\n properties: updatedProperties,\n }\n}\n\n/**\n * Hook to get the JSON schema for a Data Grid, merging in the base Entity schema if the source entity is an EntityView.\n * @param session - The GridSession object.\n */\nexport default function useGetSchemaForGrid(session: GridSession | null) {\n const { data: jsonSchema } = useGetSchema(session?.gridJsonSchema$Id ?? '', {\n enabled: !!session?.gridJsonSchema$Id,\n })\n\n const { data: entityData } = useGetEntity(\n session?.sourceEntityId,\n undefined,\n {\n enabled: !!session?.sourceEntityId,\n },\n )\n\n let includeBaseEntitySchema = false\n if (entityData && instanceOfEntityView(entityData)) {\n includeBaseEntitySchema = true\n }\n\n const { data: entityJsonSchema } = useGetSchema(\n 'org.sagebionetworks-repo.model.Entity',\n {\n enabled: includeBaseEntitySchema,\n select: addReadonlyToEntityProperties,\n },\n )\n\n return useMemo(() => {\n if (jsonSchema && entityJsonSchema) {\n return shallowAllOfMerge({\n allOf: [entityJsonSchema, jsonSchema],\n }) as JSONSchema7\n } else {\n return jsonSchema\n }\n }, [jsonSchema, entityJsonSchema])\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAM,EAAEY,6BAA0BC,2BAAwBT,GAAkB,EACtE,EAAEU,qCAAkCT,EAAa;CACrDU,eAAeP,EAAkBK,EAAoB;CACrDG,0BAA0BT,EAAmBK,EAAwB;CACtE,CAAC,EACIK,IAAoBX,EAAwBQ,EAA8B,EAE1EI,IAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAMD,SAASC,EAA8BC,GAAsC;AAC3E,KAAI,CAACA,EAAWC,WACd,QAAOD;CAGT,IAAME,IAAoB,EAAE,GAAGF,EAAWC,YAAY;AAgBtD,QAXAE,EAAyBC,SAAQC,MAAQ;AACvC,EAAIH,EAAkBG,KACpBH,EAAkBG,KAAQ;GACxB,GAA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FgB,IAAOC;OAIPD,KAAOzB;AACR,QAPIyB"}
|
|
1
|
+
{"version":3,"file":"useGetSchemaForGrid.js","names":["useGetEntity","useGetSchema","GridSession","instanceOfEntityView","createComparator","createMerger","createShallowAllOfMerge","createDeduplicator","createIntersector","JSONSchema7","isObject","useMemo","compareSchemaDefinitions","compareSchemaValues","mergeArrayOfSchemaDefinitions","intersectJson","deduplicateJsonSchemaDef","shallowAllOfMerge","GRID_ENTITY_READONLY_PROPERTIES","addReadonlyToEntityProperties","jsonSchema","properties","updatedProperties","propertiesToMakeReadonly","forEach","prop","readOnly","useGetSchemaForGrid","session","$","_c","t0","gridJsonSchema$Id","t1","enabled","data","t2","sourceEntityId","t3","entityData","undefined","includeBaseEntitySchema","t4","select","entityJsonSchema","t5","t6","allOf"],"sources":["../../../../src/components/DataGrid/hooks/useGetSchemaForGrid.ts"],"sourcesContent":["import { useGetEntity, useGetSchema } from '@/synapse-queries/index'\nimport {\n GridSession,\n instanceOfEntityView,\n} from '@sage-bionetworks/synapse-client'\nimport {\n createComparator,\n createMerger,\n createShallowAllOfMerge,\n} from '@x0k/json-schema-merge'\nimport {\n createDeduplicator,\n createIntersector,\n} from '@x0k/json-schema-merge/lib/array'\nimport { JSONSchema7 } from 'json-schema'\nimport isObject from 'lodash-es/isObject'\nimport { useMemo } from 'react'\n\nconst { compareSchemaDefinitions, compareSchemaValues } = createComparator()\nconst { mergeArrayOfSchemaDefinitions } = createMerger({\n intersectJson: createIntersector(compareSchemaValues),\n deduplicateJsonSchemaDef: createDeduplicator(compareSchemaDefinitions),\n})\nconst shallowAllOfMerge = createShallowAllOfMerge(mergeArrayOfSchemaDefinitions)\n\nconst GRID_ENTITY_READONLY_PROPERTIES = [\n 'name',\n 'id',\n 'createdBy',\n 'createdOn',\n 'modifiedBy',\n 'modifiedOn',\n 'etag',\n 'concreteType',\n 'parentId',\n 'path',\n 'type',\n 'currentVersion',\n 'benefactorId',\n]\n\n/**\n * The Synapse JSON Schemas for entities do not indicate which properties should be readOnly.\n * Amend the schema to mark certain properties as readOnly so they cannot be edited in the grid.\n */\nfunction addReadonlyToEntityProperties(jsonSchema: JSONSchema7): JSONSchema7 {\n if (!jsonSchema.properties) {\n return jsonSchema\n }\n\n const updatedProperties = { ...jsonSchema.properties }\n\n // List of properties to mark as read-only\n const propertiesToMakeReadonly = GRID_ENTITY_READONLY_PROPERTIES\n\n propertiesToMakeReadonly.forEach(prop => {\n if (updatedProperties[prop]) {\n updatedProperties[prop] = {\n ...(isObject(updatedProperties[prop]) ? updatedProperties[prop] : {}),\n readOnly: true,\n }\n } else {\n updatedProperties[prop] = { readOnly: true }\n }\n })\n\n return {\n ...jsonSchema,\n properties: updatedProperties,\n }\n}\n\n/**\n * Hook to get the JSON schema for a Data Grid, merging in the base Entity schema if the source entity is an EntityView.\n * @param session - The GridSession object.\n */\nexport default function useGetSchemaForGrid(session: GridSession | null) {\n const { data: jsonSchema } = useGetSchema(session?.gridJsonSchema$Id ?? '', {\n enabled: !!session?.gridJsonSchema$Id,\n })\n\n const { data: entityData } = useGetEntity(\n session?.sourceEntityId,\n undefined,\n {\n enabled: !!session?.sourceEntityId,\n },\n )\n\n let includeBaseEntitySchema = false\n if (entityData && instanceOfEntityView(entityData)) {\n includeBaseEntitySchema = true\n }\n\n const { data: entityJsonSchema } = useGetSchema(\n 'org.sagebionetworks-repo.model.Entity',\n {\n enabled: includeBaseEntitySchema,\n select: addReadonlyToEntityProperties,\n },\n )\n\n return useMemo(() => {\n if (jsonSchema && entityJsonSchema) {\n return shallowAllOfMerge({\n allOf: [entityJsonSchema, jsonSchema],\n }) as JSONSchema7\n } else {\n return jsonSchema\n }\n }, [jsonSchema, entityJsonSchema])\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAM,EAAEY,6BAA0BC,2BAAwBT,GAAkB,EACtE,EAAEU,qCAAkCT,EAAa;CACrDU,eAAeP,EAAkBK,EAAoB;CACrDG,0BAA0BT,EAAmBK,EAAwB;CACtE,CAAC,EACIK,IAA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H,IAAA,EAAAP,MAAAS,MAAmC3C,EACjC,yCACAyC,EAID,EAAAG;AAGC,KAAIzB,KAAAwB,GAA8B;EAAA,IAAAE;AAChCD,EADgChB,EAAA,OAAAe,KAAAf,EAAA,OAAAT,KACzB0B,IAAA7B,EAAkB,EAAA8B,OAChB,CAACH,GAAkBxB,EAAU,EACrC,CAAC,EAAAS,EAAA,KAAAe,GAAAf,EAAA,KAAAT,GAAAS,EAAA,KAAAiB,KAAAA,IAAAjB,EAAA,IAFFgB,IAAOC;OAIPD,KAAOzB;AACR,QAPIyB"}
|
|
@@ -28,6 +28,8 @@ export type QueryVisualizationContextType = {
|
|
|
28
28
|
showFacetFilter: boolean;
|
|
29
29
|
setShowFacetFilter: Dispatch<SetStateAction<boolean>>;
|
|
30
30
|
hideSearchBarControl: boolean;
|
|
31
|
+
/** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */
|
|
32
|
+
lockTextMatchesQueryFilterPill: boolean;
|
|
31
33
|
showSearchBar: boolean;
|
|
32
34
|
setShowSearchBar: Dispatch<SetStateAction<boolean>>;
|
|
33
35
|
showDownloadConfirmation: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationContext.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,cAAc,EAEf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AAEpG,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,uBAAuB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,EAAE,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AAA;IAClB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAChD,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,yBAAyB,0DAE1B,CAAA;AACZ,MAAM,MAAM,sCAAsC,GAAG,iBAAiB,CAAC;IACrE,yBAAyB,EAAE,6BAA6B,CAAA;CACzD,CAAC,CAAA;AACF;;GAEG;AACH,eAAO,MAAM,iCAAiC,GAAI,0CAG/C,sCAAsC,KAAG,KAAK,CAAC,SAMjD,CAAA;AAED,wBAAgB,4BAA4B,IAAI,6BAA6B,CAQ5E;AAED,eAAO,MAAM,iCAAiC,2DACV,CAAA"}
|
|
1
|
+
{"version":3,"file":"QueryVisualizationContext.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,cAAc,EAEf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AAEpG,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,uBAAuB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,kEAAkE;IAClE,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACvE,yEAAyE;IACzE,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG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,iCAAiC,GAAI,0CAG/C,sCAAsC,KAAG,KAAK,CAAC,SAMjD,CAAA;AAED,wBAAgB,4BAA4B,IAAI,6BAA6B,CAQ5E;AAED,eAAO,MAAM,iCAAiC,2DACV,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationContext.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"sourcesContent":["import React from 'react'\nimport { ColumnType } from '@sage-bionetworks/synapse-types'\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n ReactNode,\n SetStateAction,\n useContext,\n} from 'react'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\n\nexport type QueryVisualizationContextType = {\n columnsToShowInTable: string[]\n setColumnsToShowInTable: (newState: string[]) => void\n rgbIndex?: number\n unitDescription: string\n /** Whether to show when the table or view was last updated. */\n showLastUpdatedOn?: boolean\n /** Given a column name, return the display name for the column */\n getColumnDisplayName: (columnName: string, jsonPath?: string) => string\n /** Given a column name or JSON facet, return the configured help text */\n getHelpText: (columnName: string, jsonPath?: string) => string | undefined\n /** Given a cell value and a column type, returns the displayed value for the data */\n getDisplayValue: (value: string, columnType: ColumnType) => string\n /** React node to display in place of cards/table when there are no results. */\n NoContentPlaceholder: () => ReactNode\n /** The set of external analysis platforms where this component allows users to export data. If this list is empty, then\n * controls will not be shown. */\n enabledExternalAnalysisPlatforms: ExternalAnalysisPlatform[]\n /** If true, a dialog guiding the user through exporting table query data to an external platform is shown. If this\n * is true, enabledExternalAnalysisPlatforms must be non-empty */\n isShowingExportToAnalysisPlatformModal: boolean\n /** Allows toggling isShowingExportToAnalysisPlatformModal */\n setIsShowingExportToAnalysisPlatformModal: Dispatch<SetStateAction<boolean>>\n showFacetFilter: boolean\n setShowFacetFilter: Dispatch<SetStateAction<boolean>>\n hideSearchBarControl: boolean\n showSearchBar: boolean\n setShowSearchBar: Dispatch<SetStateAction<boolean>>\n showDownloadConfirmation: boolean\n setShowDownloadConfirmation: Dispatch<SetStateAction<boolean>>\n showSqlEditor: boolean\n setShowSqlEditor: Dispatch<SetStateAction<boolean>>\n showCopyToClipboard: boolean\n setShowCopyToClipboard: Dispatch<SetStateAction<boolean>>\n showPlots: boolean\n setShowPlots: Dispatch<SetStateAction<boolean>>\n}\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryVisualizationContext = createContext<\n QueryVisualizationContextType | undefined\n>(undefined)\nexport type QueryVisualizationContextProviderProps = PropsWithChildren<{\n queryVisualizationContext: QueryVisualizationContextType\n}>\n/**\n * Provides fields and functions related to visualizing a Synapse table query. For actual query data, see QueryContextProvider.\n */\nexport const QueryVisualizationContextProvider = ({\n children,\n queryVisualizationContext,\n}: QueryVisualizationContextProviderProps): React.ReactNode => {\n return (\n <QueryVisualizationContext.Provider value={queryVisualizationContext}>\n {children}\n </QueryVisualizationContext.Provider>\n )\n}\n\nexport function useQueryVisualizationContext(): QueryVisualizationContextType {\n const context = useContext(QueryVisualizationContext)\n if (context === undefined) {\n throw new Error(\n 'useQueryVisualizationContext must be used within a QueryVisualizationWrapper',\n )\n }\n return context\n}\n\nexport const QueryVisualizationContextConsumer =\n QueryVisualizationContext.Consumer\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"QueryVisualizationContext.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"sourcesContent":["import React from 'react'\nimport { ColumnType } from '@sage-bionetworks/synapse-types'\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n ReactNode,\n SetStateAction,\n useContext,\n} from 'react'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\n\nexport type QueryVisualizationContextType = {\n columnsToShowInTable: string[]\n setColumnsToShowInTable: (newState: string[]) => void\n rgbIndex?: number\n unitDescription: string\n /** Whether to show when the table or view was last updated. */\n showLastUpdatedOn?: boolean\n /** Given a column name, return the display name for the column */\n getColumnDisplayName: (columnName: string, jsonPath?: string) => string\n /** Given a column name or JSON facet, return the configured help text */\n getHelpText: (columnName: string, jsonPath?: string) => string | undefined\n /** Given a cell value and a column type, returns the displayed value for the data */\n getDisplayValue: (value: string, columnType: ColumnType) => string\n /** React node to display in place of cards/table when there are no results. */\n NoContentPlaceholder: () => ReactNode\n /** The set of external analysis platforms where this component allows users to export data. If this list is empty, then\n * controls will not be shown. */\n enabledExternalAnalysisPlatforms: ExternalAnalysisPlatform[]\n /** If true, a dialog guiding the user through exporting table query data to an external platform is shown. If this\n * is true, enabledExternalAnalysisPlatforms must be non-empty */\n isShowingExportToAnalysisPlatformModal: boolean\n /** Allows toggling isShowingExportToAnalysisPlatformModal */\n setIsShowingExportToAnalysisPlatformModal: Dispatch<SetStateAction<boolean>>\n showFacetFilter: boolean\n setShowFacetFilter: Dispatch<SetStateAction<boolean>>\n hideSearchBarControl: boolean\n /** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */\n lockTextMatchesQueryFilterPill: boolean\n showSearchBar: boolean\n setShowSearchBar: Dispatch<SetStateAction<boolean>>\n showDownloadConfirmation: boolean\n setShowDownloadConfirmation: Dispatch<SetStateAction<boolean>>\n showSqlEditor: boolean\n setShowSqlEditor: Dispatch<SetStateAction<boolean>>\n showCopyToClipboard: boolean\n setShowCopyToClipboard: Dispatch<SetStateAction<boolean>>\n showPlots: boolean\n setShowPlots: Dispatch<SetStateAction<boolean>>\n}\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryVisualizationContext = createContext<\n QueryVisualizationContextType | undefined\n>(undefined)\nexport type QueryVisualizationContextProviderProps = PropsWithChildren<{\n queryVisualizationContext: QueryVisualizationContextType\n}>\n/**\n * Provides fields and functions related to visualizing a Synapse table query. For actual query data, see QueryContextProvider.\n */\nexport const QueryVisualizationContextProvider = ({\n children,\n queryVisualizationContext,\n}: QueryVisualizationContextProviderProps): React.ReactNode => {\n return (\n <QueryVisualizationContext.Provider value={queryVisualizationContext}>\n {children}\n </QueryVisualizationContext.Provider>\n )\n}\n\nexport function useQueryVisualizationContext(): QueryVisualizationContextType {\n const context = useContext(QueryVisualizationContext)\n if (context === undefined) {\n throw new Error(\n 'useQueryVisualizationContext must be used within a QueryVisualizationWrapper',\n )\n }\n return context\n}\n\nexport const QueryVisualizationContextConsumer =\n QueryVisualizationContext.Consumer\n"],"mappings":";;;AAsDA,IAAa,IAA4B,EAEvC,KAAA,EAAU,EAOC,KAAqC,EAChD,aACA,mCAGE,kBAAC,EAA0B,UAA3B;CAAoC,OAAO;CACxC;CACkC,CAAA;AAIzC,SAAgB,IAA8D;CAC5E,IAAM,IAAU,EAAW,EAA0B;AACrD,KAAI,MAAY,KAAA,EACd,OAAU,MACR,+EACD;AAEH,QAAO;;AAGT,IAAa,IACX,EAA0B"}
|
|
@@ -21,6 +21,8 @@ export type QueryVisualizationWrapperProps = {
|
|
|
21
21
|
defaultShowPlots?: boolean;
|
|
22
22
|
hideCopyToClipboard?: boolean;
|
|
23
23
|
hideSearchBarControl?: boolean;
|
|
24
|
+
/** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */
|
|
25
|
+
lockTextMatchesQueryFilterPill?: boolean;
|
|
24
26
|
defaultShowSearchBar?: boolean;
|
|
25
27
|
showLastUpdatedOn?: boolean;
|
|
26
28
|
/** Default is INTERACTIVE */
|
|
@@ -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;AAUpG,KAAK,uBAAuB,GAAG;IAC7B,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uGAAuG;IACvG,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,6BAA6B;IAC7B,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC;mEAC+D;IAC/D,kCAAkC,CAAC,EAAE,MAAM,CAAA;IAC3C,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,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,
|
|
1
|
+
{"version":3,"file":"QueryVisualizationWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAA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AAgC,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC7D,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACpC,CAAA;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CAwMtC"}
|
|
@@ -2,84 +2,85 @@ 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
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { useQuery as
|
|
13
|
-
import { useDeepCompareMemoize as
|
|
5
|
+
import { unCamelCase as r } from "../../utils/functions/unCamelCase.js";
|
|
6
|
+
import { useGetQueryMetadata as i } from "../QueryWrapper/useGetQueryMetadata.js";
|
|
7
|
+
import { NoContentPlaceholderType as a } from "../SynapseTable/NoContentPlaceholderType.js";
|
|
8
|
+
import o from "./NoContentPlaceholder.js";
|
|
9
|
+
import { QueryVisualizationContextProvider as s } from "./QueryVisualizationContext.js";
|
|
10
|
+
import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
|
|
11
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
12
|
+
import { useQuery as p } from "@tanstack/react-query";
|
|
13
|
+
import { useDeepCompareMemoize as m } from "use-deep-compare-effect";
|
|
14
14
|
//#region src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let { noContentPlaceholderType:
|
|
18
|
-
...
|
|
15
|
+
var h = [];
|
|
16
|
+
function g(g) {
|
|
17
|
+
let { noContentPlaceholderType: _ = a.INTERACTIVE, defaultShowSearchBar: v = !1, defaultShowPlots: ee = !0, hideCopyToClipboard: y = !1, hideSearchBarControl: b = !1, lockTextMatchesQueryFilterPill: x = !0, unitDescription: S = "result", helpConfiguration: C, hasCustomPlots: w = !1, visibleColumnCount: T = Infinity, enabledExternalAnalysisPlatforms: E = h } = g, D = u(() => g.columnAliases ?? {}, [g.columnAliases]), { getCurrentQueryRequest: O, hasFacetedSelectColumn: k, hasResettableFilters: A, rowDataQueryOptions: j } = t(), { data: M } = i(), { data: N } = p({
|
|
18
|
+
...j,
|
|
19
19
|
select: (e) => e.responseBody?.queryResult?.queryResults.headers,
|
|
20
20
|
placeholderData: (e) => e
|
|
21
|
-
}), { data:
|
|
21
|
+
}), { data: P } = i({
|
|
22
22
|
select: (e) => e.responseBody?.selectColumns,
|
|
23
23
|
placeholderData: (e) => e
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
X(
|
|
24
|
+
}), F = m(N ?? P ?? []), [I, te] = d(!1), [L, R] = d(ee), [z, B] = d(!y), [V, H] = d(!0), [U, W, G, K] = e(v && !b, !1), [q, J] = d(!1), [Y, X] = d([]);
|
|
25
|
+
l(() => {
|
|
26
|
+
X(F.slice(0, T).map((e) => e.name));
|
|
27
27
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
F,
|
|
29
|
+
u(() => O(), [O]).query.sql,
|
|
30
|
+
T
|
|
31
31
|
]);
|
|
32
|
-
let Z =
|
|
32
|
+
let Z = c((e, t) => {
|
|
33
33
|
let n = localStorage.getItem("force-display-original-column-names") === "true";
|
|
34
34
|
if (!e || n && !t) return e;
|
|
35
|
-
if (
|
|
35
|
+
if (D[e]) return D[e];
|
|
36
36
|
if (t) {
|
|
37
|
-
let n =
|
|
37
|
+
let n = M?.columnModels?.find((t) => t.name === e);
|
|
38
38
|
if (n?.jsonSubColumns) {
|
|
39
39
|
let e = n.jsonSubColumns.find((e) => e.jsonPath === t);
|
|
40
40
|
if (e) return e.name;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
return
|
|
44
|
-
}, [
|
|
45
|
-
if (Array.isArray(
|
|
46
|
-
}, [
|
|
47
|
-
type:
|
|
48
|
-
hasResettableFilters:
|
|
49
|
-
}), [
|
|
43
|
+
return r(e);
|
|
44
|
+
}, [D, M?.columnModels]), Q = c((e, t) => {
|
|
45
|
+
if (Array.isArray(C)) return C.find((n) => n.columnName === e && n.jsonPath === t)?.helpText;
|
|
46
|
+
}, [C]), $ = c(() => /* @__PURE__ */ f(o, {
|
|
47
|
+
type: _,
|
|
48
|
+
hasResettableFilters: A
|
|
49
|
+
}), [_, A]), ne = u(() => ({
|
|
50
50
|
columnsToShowInTable: Y,
|
|
51
51
|
setColumnsToShowInTable: X,
|
|
52
|
-
rgbIndex:
|
|
53
|
-
unitDescription:
|
|
54
|
-
showLastUpdatedOn:
|
|
52
|
+
rgbIndex: g.rgbIndex,
|
|
53
|
+
unitDescription: S,
|
|
54
|
+
showLastUpdatedOn: g.showLastUpdatedOn,
|
|
55
55
|
getColumnDisplayName: Z,
|
|
56
56
|
getDisplayValue: n,
|
|
57
57
|
getHelpText: Q,
|
|
58
58
|
NoContentPlaceholder: $,
|
|
59
59
|
isShowingExportToAnalysisPlatformModal: q,
|
|
60
60
|
setIsShowingExportToAnalysisPlatformModal: J,
|
|
61
|
-
showFacetFilter:
|
|
61
|
+
showFacetFilter: k ? V : !1,
|
|
62
62
|
setShowFacetFilter: H,
|
|
63
63
|
hideSearchBarControl: b,
|
|
64
|
+
lockTextMatchesQueryFilterPill: x,
|
|
64
65
|
showSearchBar: U,
|
|
65
66
|
setShowSearchBar: W,
|
|
66
67
|
showDownloadConfirmation: G,
|
|
67
68
|
setShowDownloadConfirmation: K,
|
|
68
|
-
showSqlEditor:
|
|
69
|
-
setShowSqlEditor:
|
|
70
|
-
showPlots:
|
|
69
|
+
showSqlEditor: I,
|
|
70
|
+
setShowSqlEditor: te,
|
|
71
|
+
showPlots: w || k ? L : !1,
|
|
71
72
|
setShowPlots: R,
|
|
72
73
|
showCopyToClipboard: z,
|
|
73
74
|
setShowCopyToClipboard: B,
|
|
74
|
-
enabledExternalAnalysisPlatforms:
|
|
75
|
+
enabledExternalAnalysisPlatforms: E
|
|
75
76
|
}), [
|
|
76
77
|
$,
|
|
77
78
|
Z,
|
|
78
79
|
Q,
|
|
79
|
-
|
|
80
|
+
k,
|
|
80
81
|
q,
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
g.rgbIndex,
|
|
83
|
+
g.showLastUpdatedOn,
|
|
83
84
|
K,
|
|
84
85
|
W,
|
|
85
86
|
z,
|
|
@@ -87,19 +88,20 @@ function h(h) {
|
|
|
87
88
|
V,
|
|
88
89
|
L,
|
|
89
90
|
U,
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
I,
|
|
92
|
+
S,
|
|
92
93
|
Y,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
b
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
w,
|
|
95
|
+
E,
|
|
96
|
+
b,
|
|
97
|
+
x
|
|
98
|
+
]), { children: re } = g;
|
|
99
|
+
return /* @__PURE__ */ f(s, {
|
|
100
|
+
queryVisualizationContext: ne,
|
|
101
|
+
children: re
|
|
100
102
|
});
|
|
101
103
|
}
|
|
102
104
|
//#endregion
|
|
103
|
-
export {
|
|
105
|
+
export { g as QueryVisualizationWrapper };
|
|
104
106
|
|
|
105
107
|
//# sourceMappingURL=QueryVisualizationWrapper.js.map
|
|
@@ -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 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,8BAA2B,EAAyB,aACpD,0BAAuB,IACvB,sBAAmB,IACnB,yBAAsB,IACtB,0BAAuB,IACvB,qBAAkB,UAClB,sBACA,oBAAiB,IACjB,wBAAqB,UACrB,sCAAmC,MACjC,GAEE,IA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AI,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"}
|
|
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 /** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */\n lockTextMatchesQueryFilterPill?: 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 lockTextMatchesQueryFilterPill = true,\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 lockTextMatchesQueryFilterPill,\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 lockTextMatchesQueryFilterPill,\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;AAkDzE,SAAgB,EACd,GACA;CACA,IAAM,EACJ,8BAA2B,EAAyB,aACpD,0BAAuB,IACvB,uBAAmB,IACnB,yBAAsB,IACtB,0BAAuB,IACvB,oCAAiC,IACjC,qBAAkB,UAClB,sBACA,oBAAiB,IACjB,wBAAqB,UACrB,sCAAmC,MACjC,GAE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D,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;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;EACA;EACD,CACF,EAIK,EAAE,iBAAa;AACrB,QACE,kBAAC,GAAD;EAAmC,2BAA2B;EAC3D;EACiC,CAAA"}
|
|
@@ -38,7 +38,7 @@ type QueryWrapperPlotNavOwnProps = {
|
|
|
38
38
|
onViewSharingSettingsClicked?: (benefactorId: string) => void;
|
|
39
39
|
initialLimit?: number;
|
|
40
40
|
hideTopLevelControls?: boolean;
|
|
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'>;
|
|
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' | 'lockTextMatchesQueryFilterPill'> & Pick<QueryContextType, 'combineRangeFacetConfig'>;
|
|
42
42
|
export type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams & PlotsContainerProps & QueryWrapperPlotNavOwnProps;
|
|
43
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
44
|
isFullTextSearchEnabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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AAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,wBAAwB,EACtB,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,2CAoH1E"}
|
|
@@ -140,6 +140,7 @@ function z(r) {
|
|
|
140
140
|
defaultShowPlots: r.defaultShowPlots,
|
|
141
141
|
hideCopyToClipboard: r.hideCopyToClipboard,
|
|
142
142
|
defaultShowSearchBar: (r.defaultShowSearchBox || M) && !r.hideSearchBarControl,
|
|
143
|
+
lockTextMatchesQueryFilterPill: r.lockTextMatchesQueryFilterPill,
|
|
143
144
|
hideSearchBarControl: r.hideSearchBarControl,
|
|
144
145
|
showLastUpdatedOn: f,
|
|
145
146
|
noContentPlaceholderType: s.INTERACTIVE,
|
|
@@ -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\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,IAAgC;AA2F7C,SAAgB,EACd,GACA;CACA,IAAM,EACJ,uBACA,SACA,sBACA,iBACA,oBACA,iCACA,iBACA,mBACA,yBACA,8BACA,wBACA,8BACA,mBACA,mBAAgB,IAChB,4BACA,iBACA,iBACA,qCACA,4BACE,GACE,IAAe,GAAiB,EAChC,CAAC,GAAoB,KAAyB,EAAS,GAAM,EAC7D,EAAE,wBAAwB,GAAW,iCACzC,GACI,EAAE,WAAW,MAA2B,EAC5C,EACD,EAEK,KAAwB,EAAa,EAA0B,EAE/D,IAAsB,EAAa,qBAEnC,KACH,GAAqB,MAAM,mBAAmB,KAAA,KAC7C,EAAoB,MAAM,eAAe,SAAS,KACnD,GAAqB,MAAM,sBAAsB,KAAA,KAChD,GAAqB,MAAM,kBAAkB,SAAS,GAEpD,KACJ,GAA+C;AAEjD,QACE,kBAAC,GAAD,EAAA,WACG,MAA6B;AAC5B,MAAI,MAA8B,KAAA,EAChC,OAAU,MACR,kFACD;AAGH,SACE,kBAAC,GAAD;GACE,WAAW,uBACT,EAA0B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KAAiB,GAEH,EAExC,IAAe,QACf,EAAM,QAED,EAAM,QACJ,EAAM,gBAER,KAAK,MAAM,EAAM,cAAc,GAQ/B;EACL,KAAK;EACL,mBAPwB,EACxB,EAAM,cACN,EAAM,aACN,EAIA;EACO;EACP,QAAQ;EACT,EAEF;EACD,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;EACN;EACA;EACA;EACD,CAAC,EAEI,CAAC,GAAc,KAAmB,EAAS,EAAE,EAC7C,UAAgB;AACpB,IAAgB,IAAe,EAAE;IAG7B,EAAE,MAAM,MAAW,EAAa,GAAU,EAAc,EACxD,IAAuC;EAC3C,UAAU,KAAY;EACtB,cAAc;EACd,UACE;EAQF;EACD,EACK,KACH,KAAU,EAAQ,EAAO,IAAI,EAAO,oBAAoB,IAQrD,IAAkB,GAAG,KAAK,UAAU,EAAiB,CAAC,GAAG;AAE/D,QACE,kBAAC,GAAD;EACE,GAAI;EACc;EAClB,KAAK;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
|
+
{"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 | 'lockTextMatchesQueryFilterPill'\n > &\n Pick<QueryContextType, 'combineRangeFacetConfig'>\n\nexport type QueryWrapperPlotNavProps = QueryOrDeprecatedSearchParams &\n PlotsContainerProps &\n QueryWrapperPlotNavOwnProps\n\nexport type QueryWrapperPlotNavContentsProps = Pick<\n QueryWrapperPlotNavProps,\n | 'tableConfiguration'\n | 'name'\n | 'cardConfiguration'\n | 'facetsToPlot'\n | 'availableFacets'\n | 'initialExpandedFacetControls'\n | 'hideDownload'\n | '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 lockTextMatchesQueryFilterPill={props.lockTextMatchesQueryFilterPill}\n hideSearchBarControl={props.hideSearchBarControl}\n showLastUpdatedOn={showLastUpdatedOn}\n noContentPlaceholderType={NoContentPlaceholderType.INTERACTIVE}\n hasCustomPlots={Array.isArray(customPlots) && customPlots.length > 0}\n enabledExternalAnalysisPlatforms={enabledExternalAnalysisPlatforms}\n >\n <QueryWrapperPlotNavContents\n {...props}\n isFullTextSearchEnabled={isFullTextSearchEnabled}\n remount={remount}\n />\n </QueryVisualizationWrapper>\n </Suspense>\n </QueryWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAa,IAAqC,yBACrC,IAAsC,wBAEtC,IAAgC;AA4F7C,SAAgB,EACd,GACA;CACA,IAAM,EACJ,uBACA,SACA,sBACA,iBACA,oBACA,iCACA,iBACA,mBACA,yBACA,8BACA,wBACA,8BACA,mBACA,mBAAgB,IAChB,4BACA,iBACA,iBACA,qCACA,4BACE,GACE,IAAe,GAAiB,EAChC,CAAC,GAAoB,KAAyB,EAAS,GAAM,EAC7D,EAAE,wBAAwB,GAAW,iCACzC,GACI,EAAE,WAAW,MAA2B,EAC5C,EACD,EAEK,KAAwB,EAAa,EAA0B,EAE/D,IAAsB,EAAa,qBAEnC,KACH,GAAqB,MAAM,mBAAmB,KAAA,KAC7C,EAAoB,MAAM,eAAe,SAAS,KACnD,GAAqB,MAAM,sBAAsB,KAAA,KAChD,GAAqB,MAAM,kBA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1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchQueryUseQueryOptions.d.ts","sourceRoot":"","sources":["../../../src/components/SearchQueryWrapper/SearchQueryUseQueryOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACrB,WAAW,
|
|
1
|
+
{"version":3,"file":"SearchQueryUseQueryOptions.d.ts","sourceRoot":"","sources":["../../../src/components/SearchQueryWrapper/SearchQueryUseQueryOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACrB,WAAW,EAMX,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;AAI9B,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,iBAAiB,EAAE,aAAa,CAAC,CACvC,CAAA;CACF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBA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