synapse-react-client 4.0.17 → 4.0.19
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/README.md +5 -3
- package/dist/SWC.index.d.ts +2 -0
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +3 -1
- package/dist/SWC.index.js.map +1 -1
- package/dist/assets/homepage/BlinkingLiveIcon.d.ts +1 -1
- package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
- package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/CertificationRequirement.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/ValidationRequirement.js.map +1 -1
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.d.ts.map +1 -1
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +56 -54
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
- package/dist/components/Authentication/PasswordField.d.ts +1 -1
- package/dist/components/Authentication/PasswordField.d.ts.map +1 -1
- package/dist/components/Authentication/PasswordField.js.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js +1 -2
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
- package/dist/components/Authentication/UsernamePasswordForm.d.ts.map +1 -1
- package/dist/components/Authentication/UsernamePasswordForm.js +32 -29
- package/dist/components/Authentication/UsernamePasswordForm.js.map +1 -1
- package/dist/components/CardContainer/CardLink.d.ts +2 -2
- package/dist/components/CardContainer/CardLink.d.ts.map +1 -1
- package/dist/components/CardDeck/CardDeckCardProps.d.ts.map +1 -1
- package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +106 -103
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/MembershipRequestForm.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/MembershipRequestForm.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.js.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.js +4 -4
- package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
- package/dist/components/CreateTableViewWizard/TableNameForm.js +6 -6
- package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
- package/dist/components/CrispChat/CrispChat.js +4 -4
- package/dist/components/CrispChat/CrispChat.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.css +1 -0
- package/dist/components/DataExplorer/DataExplorer.d.ts +13 -0
- package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -0
- package/dist/components/DataExplorer/DataExplorer.js +119 -0
- package/dist/components/DataExplorer/DataExplorer.js.map +1 -0
- package/dist/components/DataExplorer/DataExplorer.module.js +22 -0
- package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -0
- package/dist/components/DataExplorer/DataExplorer.module.scss +156 -0
- package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/AutocompleteColumn.js +106 -102
- package/dist/components/DataGrid/columns/AutocompleteColumn.js.map +1 -1
- package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js +97 -89
- package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js.map +1 -1
- package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts +19 -8
- package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/useGridAutocompleteState.js +64 -43
- package/dist/components/DataGrid/columns/useGridAutocompleteState.js.map +1 -1
- package/dist/components/DataGrid/components/UploadCsvToGridDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/UploadCsvToGridDialog.js +9 -9
- package/dist/components/DataGrid/components/UploadCsvToGridDialog.js.map +1 -1
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js +8 -1
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js.map +1 -1
- package/dist/components/DataGrid/utils/json-rx/JsonRxResponseComplete.js.map +1 -1
- package/dist/components/DownloadCart/RequestDownloadCard.js +14 -14
- package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
- package/dist/components/EntityCitation/EntityCitationUtils.js.map +1 -1
- package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
- package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
- package/dist/components/EntityFinder/EntityIdTextField.d.ts +17 -0
- package/dist/components/EntityFinder/EntityIdTextField.d.ts.map +1 -0
- package/dist/components/EntityFinder/EntityIdTextField.js +35 -0
- package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -0
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.d.ts.map +1 -1
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js +22 -16
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js.map +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCardGrid.js.map +1 -1
- package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
- package/dist/components/FullWidthAlert/FullWidthAlert.d.ts.map +1 -1
- package/dist/components/FullWidthAlert/FullWidthAlert.js.map +1 -1
- package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.d.ts.map +1 -1
- package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.js.map +1 -1
- package/dist/components/Markdown/widget/MarkdownSynapsePlot.js.map +1 -1
- package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
- package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
- package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
- package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
- package/dist/components/PortalList/CreatePortalModal.d.ts.map +1 -1
- package/dist/components/PortalList/CreatePortalModal.js +34 -33
- package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +67 -65
- 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/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
- package/dist/components/Resources/Resources.Desktop.js.map +1 -1
- 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/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.js.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.d.ts +1 -1
- package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.d.ts.map +1 -1
- package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.d.ts.map +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableUtils.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
- package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js +9 -9
- package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/ColumnModelFormFields/MultiValueField.js +4 -4
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.d.ts.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js +25 -25
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
- package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
- package/dist/components/TextField/TextField.css +1 -1
- package/dist/components/TextField/TextField.d.ts +14 -3
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +41 -43
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.module.js +3 -4
- package/dist/components/TextField/TextField.module.js.map +1 -1
- package/dist/components/TextField/TextField.module.scss +18 -10
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.d.ts.map +1 -1
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js +20 -16
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
- package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
- package/dist/components/UserCardList/UserCardList.js.map +1 -1
- package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.js.map +1 -1
- package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
- package/dist/components/UserSearchBox/UserSearchBox.d.ts.map +1 -1
- package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
- package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
- package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +13 -13
- package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.js +23 -23
- package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +1 -1
- package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
- package/dist/components/index.js +17 -17
- package/dist/components/styled/StyledFormControl.d.ts +15 -0
- package/dist/components/styled/StyledFormControl.d.ts.map +1 -1
- package/dist/components/styled/StyledFormControl.js +1 -0
- package/dist/components/styled/StyledFormControl.js.map +1 -1
- package/dist/components/styled/index.js +3 -3
- package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.d.ts +18 -0
- package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.js +116 -0
- package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.js.map +1 -0
- package/dist/components/table/CsvPreview/CsvPreviewDialog.d.ts +5 -5
- package/dist/components/table/CsvPreview/CsvPreviewDialog.d.ts.map +1 -1
- package/dist/components/table/CsvPreview/CsvPreviewDialog.js +27 -76
- package/dist/components/table/CsvPreview/CsvPreviewDialog.js.map +1 -1
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.d.ts +19 -0
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.js +41 -0
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.js.map +1 -0
- package/dist/components/table/CsvPreview/CsvUploadPreviewContent.d.ts +12 -0
- package/dist/components/table/CsvPreview/CsvUploadPreviewContent.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/CsvUploadPreviewContent.js +25 -0
- package/dist/components/table/CsvPreview/CsvUploadPreviewContent.js.map +1 -0
- package/dist/components/table/CsvPreview/UpdateTableWithCsvDialog.d.ts +18 -0
- package/dist/components/table/CsvPreview/UpdateTableWithCsvDialog.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/UpdateTableWithCsvDialog.js +55 -0
- package/dist/components/table/CsvPreview/UpdateTableWithCsvDialog.js.map +1 -0
- package/dist/components/table/CsvPreview/useCreateTableFromCsv.d.ts +19 -0
- package/dist/components/table/CsvPreview/useCreateTableFromCsv.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/useCreateTableFromCsv.js +35 -0
- package/dist/components/table/CsvPreview/useCreateTableFromCsv.js.map +1 -0
- package/dist/components/table/CsvPreview/useCsvUploadPreview.d.ts +22 -0
- package/dist/components/table/CsvPreview/useCsvUploadPreview.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/useCsvUploadPreview.js +32 -0
- package/dist/components/table/CsvPreview/useCsvUploadPreview.js.map +1 -0
- package/dist/components/table/CsvPreview/useUploadCsvToExistingTable.d.ts +14 -0
- package/dist/components/table/CsvPreview/useUploadCsvToExistingTable.d.ts.map +1 -0
- package/dist/components/table/CsvPreview/useUploadCsvToExistingTable.js +23 -0
- package/dist/components/table/CsvPreview/useUploadCsvToExistingTable.js.map +1 -0
- package/dist/components/utils/ConditionalWrapper.d.ts.map +1 -1
- package/dist/components/utils/ConditionalWrapper.js.map +1 -1
- package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js +69 -62
- package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +27 -26
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js +2 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +44 -43
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts +13 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +398 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -0
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +49 -19
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +49 -25
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +0 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +20 -22
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +25 -27
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.d.ts +29 -0
- package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.js +2 -2
- package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
- package/dist/index.js +17 -17
- package/dist/mockServiceWorker.js +6 -8
- package/dist/mocks/curation/mockCurationTask.d.ts +2 -2
- package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -1
- package/dist/mocks/curation/mockCurationTask.js +9 -5
- package/dist/mocks/curation/mockCurationTask.js.map +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.js +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.js.map +1 -1
- package/dist/style/components/_cards.scss +0 -3
- package/dist/style/components/_data-grid-extra.scss +2 -2
- package/dist/style/components/_login.scss +6 -2
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +2 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-queries/QueryFilterUtils.js.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -0
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js +16 -6
- package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
- package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts.map +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.js.map +1 -1
- package/dist/synapse-queries/file/useFiles.d.ts.map +1 -1
- package/dist/synapse-queries/file/useFiles.js.map +1 -1
- package/dist/synapse-queries/termsOfService/useTermsOfService.d.ts.map +1 -1
- package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
- package/dist/synapse-queries/user/useGetUserChallenges.d.ts.map +1 -1
- package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
- package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
- package/dist/theme/palette/Palettes.d.ts +2 -2
- package/dist/theme/palette/Palettes.d.ts.map +1 -1
- package/dist/theme/palette/Palettes.js +2 -2
- package/dist/theme/palette/Palettes.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/ThemeTypes.d.ts +5 -6
- package/dist/utils/AppUtils/session/SynapseSessionManager.d.ts.map +1 -1
- package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +13 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -0
- package/dist/utils/featureflag/FeatureFlags.js +8 -0
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -0
- package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
- package/dist/utils/functions/queryUtils.js.map +1 -1
- package/dist/utils/hooks/useGetInfoFromIds.d.ts.map +1 -1
- package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
- package/dist/utils/slots/SlotUtils.d.ts.map +1 -1
- package/dist/utils/slots/SlotUtils.js.map +1 -1
- package/package.json +5 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalHomePageHeader.js","names":[],"sources":["../../../src/components/PortalHomePageHeader/PortalHomePageHeader.tsx"],"sourcesContent":["import React from 'react'\nimport { Box, Stack, Typography, Button } from '@mui/material'\n\nexport type PortalHomePageHeaderProps = {\n backgroundCss: string // background of entire header\n buttonLink?: string\n title: React.ReactNode\n subTitle
|
|
1
|
+
{"version":3,"file":"PortalHomePageHeader.js","names":[],"sources":["../../../src/components/PortalHomePageHeader/PortalHomePageHeader.tsx"],"sourcesContent":["import React from 'react'\nimport { Box, Stack, Typography, Button } from '@mui/material'\n\nexport type PortalHomePageHeaderProps = {\n backgroundCss: string // background of entire header\n buttonLink?: string\n title: React.ReactNode\n subTitle?: React.ReactNode\n description: React.ReactNode\n backgroundMp4?: string\n backgroundMp4Css?: string // while video is loading, what should the background color be?\n textAreaWidth?: string // default is 746px. used for md and up screen sizes\n}\n\nconst PortalHomePageHeader = ({\n backgroundCss,\n buttonLink,\n title,\n subTitle,\n description,\n backgroundMp4,\n backgroundMp4Css,\n textAreaWidth = '746px',\n}: PortalHomePageHeaderProps): React.ReactNode => {\n return (\n <Box\n data-testid=\"HeaderContainer\"\n sx={{\n background: backgroundCss,\n padding: { xs: 0, md: '50px 80px' },\n position: 'relative',\n }}\n >\n {backgroundMp4 && (\n <Box\n component=\"video\"\n autoPlay\n loop\n muted\n playsInline\n sx={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n objectFit: 'fill',\n zIndex: -1,\n background: backgroundMp4Css,\n }}\n >\n <source src={backgroundMp4} type=\"video/mp4\" />\n Your browser does not support the video tag.\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'flex-start',\n padding: { xs: '40px', md: '40px 0' },\n gap: '24px',\n width: { sm: '100%', md: textAreaWidth },\n }}\n >\n <Typography\n variant=\"headline2\"\n sx={{\n fontWeight: 300,\n lineHeight: '130%',\n fontSize: { xs: '36px', md: '42px' },\n color: 'grey.1000',\n }}\n >\n {title}\n </Typography>\n {subTitle && (\n <Typography\n variant=\"headline3\"\n sx={{\n fontSize: '24px',\n fontWeight: '400',\n lineHeight: '160%',\n color: 'grey.1000',\n }}\n >\n {subTitle}\n </Typography>\n )}\n <Typography\n sx={{ fontSize: '18px', lineHeight: '140%', color: 'grey.900' }}\n >\n {description}\n </Typography>\n {buttonLink && (\n <Button\n href={buttonLink}\n target=\"_blank\"\n variant=\"contained\"\n role=\"button\"\n sx={theme => ({\n whiteSpace: 'nowrap',\n alignSelf: 'flex-start',\n padding: '6px 24px',\n fontWeight: 600,\n boxShadow:\n '0px 16px 16px 0px rgba(0, 0, 0, 0.10), 0px 4px 4px 0px rgba(0, 0, 0, 0.10), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)',\n '&:hover': {\n boxShadow:\n '0px 16px 16px 0px rgba(0, 0, 0, 0.10), 0px 4px 4px 0px rgba(0, 0, 0, 0.10), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)',\n },\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n })}\n >\n Learn more\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default PortalHomePageHeader\n"],"mappings":";;;;AAcA,IAAM,KAAwB,EAC5B,kBACA,eACA,UACA,aACA,gBACA,kBACA,qBACA,mBAAgB,cAGd,kBAAC,GAAD;CACE,eAAY;CACZ,IAAI;EACF,YAAY;EACZ,SAAS;GAAE,IAAI;GAAG,IAAI;GAAa;EACnC,UAAU;EACX;WANH,CAQG,KACC,kBAAC,GAAD;EACE,WAAU;EACV,UAAA;EACA,MAAA;EACA,OAAA;EACA,aAAA;EACA,IAAI;GACF,UAAU;GACV,KAAK;GACL,MAAM;GACN,OAAO;GACP,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,YAAY;GACb;YAfH,CAiBE,kBAAC,UAAD;GAAQ,KAAK;GAAe,MAAK;GAAc,CAAA,EAAA,+CAE3C;KAER,kBAAC,GAAD;EACE,IAAI;GACF,YAAY;GACZ,SAAS;IAAE,IAAI;IAAQ,IAAI;IAAU;GACrC,KAAK;GACL,OAAO;IAAE,IAAI;IAAQ,IAAI;IAAe;GACzC;YANH;GAQE,kBAAC,GAAD;IACE,SAAQ;IACR,IAAI;KACF,YAAY;KACZ,YAAY;KACZ,UAAU;MAAE,IAAI;MAAQ,IAAI;MAAQ;KACpC,OAAO;KACR;cAEA;IACU,CAAA;GACZ,KACC,kBAAC,GAAD;IACE,SAAQ;IACR,IAAI;KACF,UAAU;KACV,YAAY;KACZ,YAAY;KACZ,OAAO;KACR;cAEA;IACU,CAAA;GAEf,kBAAC,GAAD;IACE,IAAI;KAAE,UAAU;KAAQ,YAAY;KAAQ,OAAO;KAAY;cAE9D;IACU,CAAA;GACZ,KACC,kBAAC,GAAD;IACE,MAAM;IACN,QAAO;IACP,SAAQ;IACR,MAAK;IACL,KAAI,OAAU;KACZ,YAAY;KACZ,WAAW;KACX,SAAS;KACT,YAAY;KACZ,WACE;KACF,WAAW,EACT,WACE,mHACH;MACA,EAAM,YAAY,KAAK,KAAK,GAAG,EAC9B,OAAO,QACR;KACF;cACF;IAEQ,CAAA;GAEL;IACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePortalModal.d.ts","sourceRoot":"","sources":["../../../src/components/PortalList/CreatePortalModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAOzD,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACrC,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,SAAS,GACV,EAAE,sBAAsB,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"CreatePortalModal.d.ts","sourceRoot":"","sources":["../../../src/components/PortalList/CreatePortalModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAOzD,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACrC,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,SAAS,GACV,EAAE,sBAAsB,GAAG,KAAK,CAAC,SAAS,CAgG1C;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -4,8 +4,8 @@ import { ConfirmationDialog as n } from "../ConfirmationDialog/ConfirmationDialo
|
|
|
4
4
|
import "../ToastMessage/index.js";
|
|
5
5
|
import r from "../TextField/TextField.js";
|
|
6
6
|
import { useState as i } from "react";
|
|
7
|
-
import { Alert as a } from "@mui/material";
|
|
8
|
-
import {
|
|
7
|
+
import { Alert as a, Stack as o } from "@mui/material";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/PortalList/CreatePortalModal.tsx
|
|
10
10
|
function l({ open: l, onClose: u, onSuccess: d }) {
|
|
11
11
|
let [f, p] = i(""), [m, h] = i(""), [g, _] = i(), { mutate: v, isPending: y } = t({
|
|
@@ -36,37 +36,38 @@ function l({ open: l, onClose: u, onSuccess: d }) {
|
|
|
36
36
|
return /* @__PURE__ */ s(n, {
|
|
37
37
|
open: l,
|
|
38
38
|
title: "Create a New Portal",
|
|
39
|
-
content: /* @__PURE__ */ c(o, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
content: /* @__PURE__ */ c(o, {
|
|
40
|
+
gap: 2,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ s(r, {
|
|
43
|
+
id: "portalNameInput",
|
|
44
|
+
label: "Portal Name",
|
|
45
|
+
value: f,
|
|
46
|
+
fullWidth: !0,
|
|
47
|
+
required: !0,
|
|
48
|
+
onChange: (e) => {
|
|
49
|
+
p(e.target.value), _(void 0);
|
|
50
|
+
},
|
|
51
|
+
inputProps: { onKeyDown: S }
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ s(r, {
|
|
54
|
+
id: "portalUrlInput",
|
|
55
|
+
label: "Portal URL",
|
|
56
|
+
value: m,
|
|
57
|
+
fullWidth: !0,
|
|
58
|
+
required: !0,
|
|
59
|
+
placeholder: "https://example.synapse.org",
|
|
60
|
+
onChange: (e) => {
|
|
61
|
+
h(e.target.value), _(void 0);
|
|
62
|
+
},
|
|
63
|
+
inputProps: { onKeyDown: S }
|
|
64
|
+
}),
|
|
65
|
+
g && /* @__PURE__ */ s(a, {
|
|
66
|
+
severity: "error",
|
|
67
|
+
children: g
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
70
71
|
confirmButtonProps: {
|
|
71
72
|
children: "Create",
|
|
72
73
|
disabled: y || !f.trim() || !m.trim()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePortalModal.js","names":[],"sources":["../../../src/components/PortalList/CreatePortalModal.tsx"],"sourcesContent":["import { useCreatePortal } from '@/synapse-queries/portal/usePortal'\nimport { Alert } from '@mui/material'\nimport { Portal } from '@sage-bionetworks/synapse-client'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { KeyboardEvent, useState } from 'react'\nimport { ConfirmationDialog } from '../ConfirmationDialog/ConfirmationDialog'\nimport { displayToast } from '../ToastMessage'\nimport TextField from '../TextField/TextField'\n\nexport type CreatePortalModalProps = {\n open: boolean\n onClose: () => void\n onSuccess?: (portal: Portal) => void\n}\n\nexport function CreatePortalModal({\n open,\n onClose,\n onSuccess,\n}: CreatePortalModalProps): React.ReactNode {\n const [portalName, setPortalName] = useState<string>('')\n const [portalUrl, setPortalUrl] = useState<string>('')\n const [errorMessage, setErrorMessage] = useState<string>()\n\n const { mutate: createPortal, isPending } = useCreatePortal({\n onSuccess: portal => {\n displayToast('Portal created successfully', 'success')\n handleClose()\n onSuccess?.(portal)\n },\n onError: (error: SynapseClientError) => {\n setErrorMessage(error.reason || error.message)\n },\n })\n\n const handleClose = () => {\n setPortalName('')\n setPortalUrl('')\n setErrorMessage(undefined)\n onClose()\n }\n\n const handleCreate = () => {\n if (!portalName.trim()) {\n setErrorMessage('Portal name is required')\n return\n }\n if (!portalUrl.trim()) {\n setErrorMessage('Portal URL is required')\n return\n }\n\n const newPortal: Portal = {\n name: portalName.trim(),\n url: portalUrl.trim(),\n }\n\n createPortal(newPortal)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter' && portalName.trim() && portalUrl.trim()) {\n handleCreate()\n }\n }\n\n const dialogContent = (\n
|
|
1
|
+
{"version":3,"file":"CreatePortalModal.js","names":[],"sources":["../../../src/components/PortalList/CreatePortalModal.tsx"],"sourcesContent":["import { useCreatePortal } from '@/synapse-queries/portal/usePortal'\nimport { Alert, Stack } from '@mui/material'\nimport { Portal } from '@sage-bionetworks/synapse-client'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { KeyboardEvent, useState } from 'react'\nimport { ConfirmationDialog } from '../ConfirmationDialog/ConfirmationDialog'\nimport { displayToast } from '../ToastMessage'\nimport TextField from '../TextField/TextField'\n\nexport type CreatePortalModalProps = {\n open: boolean\n onClose: () => void\n onSuccess?: (portal: Portal) => void\n}\n\nexport function CreatePortalModal({\n open,\n onClose,\n onSuccess,\n}: CreatePortalModalProps): React.ReactNode {\n const [portalName, setPortalName] = useState<string>('')\n const [portalUrl, setPortalUrl] = useState<string>('')\n const [errorMessage, setErrorMessage] = useState<string>()\n\n const { mutate: createPortal, isPending } = useCreatePortal({\n onSuccess: portal => {\n displayToast('Portal created successfully', 'success')\n handleClose()\n onSuccess?.(portal)\n },\n onError: (error: SynapseClientError) => {\n setErrorMessage(error.reason || error.message)\n },\n })\n\n const handleClose = () => {\n setPortalName('')\n setPortalUrl('')\n setErrorMessage(undefined)\n onClose()\n }\n\n const handleCreate = () => {\n if (!portalName.trim()) {\n setErrorMessage('Portal name is required')\n return\n }\n if (!portalUrl.trim()) {\n setErrorMessage('Portal URL is required')\n return\n }\n\n const newPortal: Portal = {\n name: portalName.trim(),\n url: portalUrl.trim(),\n }\n\n createPortal(newPortal)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter' && portalName.trim() && portalUrl.trim()) {\n handleCreate()\n }\n }\n\n const dialogContent = (\n <Stack gap={2}>\n <TextField\n id=\"portalNameInput\"\n label=\"Portal Name\"\n value={portalName}\n fullWidth\n required\n onChange={event => {\n setPortalName(event.target.value)\n setErrorMessage(undefined)\n }}\n inputProps={{\n onKeyDown: handleKeyDown,\n }}\n />\n <TextField\n id=\"portalUrlInput\"\n label=\"Portal URL\"\n value={portalUrl}\n fullWidth\n required\n placeholder=\"https://example.synapse.org\"\n onChange={event => {\n setPortalUrl(event.target.value)\n setErrorMessage(undefined)\n }}\n inputProps={{\n onKeyDown: handleKeyDown,\n }}\n />\n {errorMessage && <Alert severity=\"error\">{errorMessage}</Alert>}\n </Stack>\n )\n\n return (\n <ConfirmationDialog\n open={open}\n title=\"Create a New Portal\"\n content={dialogContent}\n confirmButtonProps={{\n children: 'Create',\n disabled: isPending || !portalName.trim() || !portalUrl.trim(),\n }}\n onConfirm={handleCreate}\n onCancel={handleClose}\n maxWidth=\"sm\"\n />\n )\n}\n\nexport default CreatePortalModal\n"],"mappings":";;;;;;;;;AAeA,SAAgB,EAAkB,EAChC,SACA,YACA,gBAC0C;CAC1C,IAAM,CAAC,GAAY,KAAiB,EAAiB,GAAG,EAClD,CAAC,GAAW,KAAgB,EAAiB,GAAG,EAChD,CAAC,GAAc,KAAmB,GAAkB,EAEpD,EAAE,QAAQ,GAAc,iBAAc,EAAg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ACV,UAAS;EACT,CAAA"}
|
|
@@ -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,gGAAgG;IAChG,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC,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,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,gGAAgG;IAChG,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC,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,2CAoNtC"}
|
|
@@ -6,102 +6,104 @@ import { unCamelCase as r } from "../../utils/functions/unCamelCase.js";
|
|
|
6
6
|
import { useGetQueryMetadata as i } from "../QueryWrapper/useGetQueryMetadata.js";
|
|
7
7
|
import { NoContentPlaceholderType as a } from "../SynapseTable/NoContentPlaceholderType.js";
|
|
8
8
|
import o from "./NoContentPlaceholder.js";
|
|
9
|
-
import { QueryVisualizationContextProvider as
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { useQuery as
|
|
13
|
-
import { useDeepCompareMemoize as
|
|
9
|
+
import { QueryVisualizationContextProvider as ee } from "./QueryVisualizationContext.js";
|
|
10
|
+
import { useCallback as s, useEffect as te, useMemo as c, useState as l } from "react";
|
|
11
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
12
|
+
import { useQuery as d } from "@tanstack/react-query";
|
|
13
|
+
import { useDeepCompareMemoize as f } from "use-deep-compare-effect";
|
|
14
14
|
//#region src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let { noContentPlaceholderType:
|
|
18
|
-
...
|
|
15
|
+
var p = [];
|
|
16
|
+
function m(m) {
|
|
17
|
+
let { noContentPlaceholderType: h = a.INTERACTIVE, defaultShowSearchBar: g = !1, defaultShowPlots: _ = !0, hideCopyToClipboard: ne = !1, hideSearchBarControl: v = !1, lockTextMatchesQueryFilterPill: y = !0, unitDescription: b = "result", helpConfiguration: x, hasCustomPlots: S = !1, visibleColumnCount: C = Infinity, enabledExternalAnalysisPlatforms: w = p } = m, T = c(() => m.columnAliases ?? {}, [m.columnAliases]), { getCurrentQueryRequest: E, hasFacetedSelectColumn: D, hasResettableFilters: O, rowDataQueryOptions: k } = t(), { data: A } = i(), { data: j } = d({
|
|
18
|
+
...k,
|
|
19
19
|
select: (e) => e.responseBody?.queryResult?.queryResults.headers,
|
|
20
20
|
placeholderData: (e) => e
|
|
21
|
-
}), { data:
|
|
21
|
+
}), { data: M } = i({
|
|
22
22
|
select: (e) => e.responseBody?.selectColumns,
|
|
23
23
|
placeholderData: (e) => e
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
}), N = f(j ?? M ?? []), [P, re] = l(!1), [F, I] = l(_), [L, R] = l(!ne), [z, B] = l(!0), [V, H, U, W] = e(g && !v, !1), [G, K] = l(!1), [q, J] = l([]), Y = c(() => E(), [E]), X = f(m.hiddenColumns ?? []);
|
|
25
|
+
te(() => {
|
|
26
|
+
let e = new Set(X);
|
|
27
|
+
J(N.filter((t) => !e.has(t.name)).slice(0, C).map((e) => e.name));
|
|
27
28
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
N,
|
|
30
|
+
Y.query.sql,
|
|
31
|
+
C,
|
|
32
|
+
X
|
|
31
33
|
]);
|
|
32
|
-
let Z =
|
|
34
|
+
let Z = s((e, t) => {
|
|
33
35
|
let n = localStorage.getItem("force-display-original-column-names") === "true";
|
|
34
36
|
if (!e || n && !t) return e;
|
|
35
|
-
if (
|
|
37
|
+
if (T[e]) return T[e];
|
|
36
38
|
if (t) {
|
|
37
|
-
let n =
|
|
39
|
+
let n = A?.columnModels?.find((t) => t.name === e);
|
|
38
40
|
if (n?.jsonSubColumns) {
|
|
39
41
|
let e = n.jsonSubColumns.find((e) => e.jsonPath === t);
|
|
40
42
|
if (e) return e.name;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
return r(e);
|
|
44
|
-
}, [
|
|
45
|
-
if (Array.isArray(
|
|
46
|
-
}, [
|
|
47
|
-
type:
|
|
48
|
-
hasResettableFilters:
|
|
49
|
-
}), [
|
|
50
|
-
columnsToShowInTable:
|
|
51
|
-
setColumnsToShowInTable:
|
|
52
|
-
rgbIndex:
|
|
53
|
-
unitDescription:
|
|
54
|
-
showLastUpdatedOn:
|
|
46
|
+
}, [T, A?.columnModels]), Q = s((e, t) => {
|
|
47
|
+
if (Array.isArray(x)) return x.find((n) => n.columnName === e && n.jsonPath === t)?.helpText;
|
|
48
|
+
}, [x]), $ = s(() => /* @__PURE__ */ u(o, {
|
|
49
|
+
type: h,
|
|
50
|
+
hasResettableFilters: O
|
|
51
|
+
}), [h, O]), ie = c(() => ({
|
|
52
|
+
columnsToShowInTable: q,
|
|
53
|
+
setColumnsToShowInTable: J,
|
|
54
|
+
rgbIndex: m.rgbIndex,
|
|
55
|
+
unitDescription: b,
|
|
56
|
+
showLastUpdatedOn: m.showLastUpdatedOn,
|
|
55
57
|
getColumnDisplayName: Z,
|
|
56
58
|
getDisplayValue: n,
|
|
57
59
|
getHelpText: Q,
|
|
58
60
|
NoContentPlaceholder: $,
|
|
59
|
-
isShowingExportToAnalysisPlatformModal:
|
|
60
|
-
setIsShowingExportToAnalysisPlatformModal:
|
|
61
|
-
showFacetFilter:
|
|
62
|
-
setShowFacetFilter:
|
|
63
|
-
hideSearchBarControl:
|
|
64
|
-
lockTextMatchesQueryFilterPill:
|
|
65
|
-
showSearchBar:
|
|
66
|
-
setShowSearchBar:
|
|
67
|
-
showDownloadConfirmation:
|
|
68
|
-
setShowDownloadConfirmation:
|
|
69
|
-
showSqlEditor:
|
|
70
|
-
setShowSqlEditor:
|
|
71
|
-
showPlots:
|
|
72
|
-
setShowPlots:
|
|
73
|
-
showCopyToClipboard:
|
|
74
|
-
setShowCopyToClipboard:
|
|
75
|
-
enabledExternalAnalysisPlatforms:
|
|
61
|
+
isShowingExportToAnalysisPlatformModal: G,
|
|
62
|
+
setIsShowingExportToAnalysisPlatformModal: K,
|
|
63
|
+
showFacetFilter: D ? z : !1,
|
|
64
|
+
setShowFacetFilter: B,
|
|
65
|
+
hideSearchBarControl: v,
|
|
66
|
+
lockTextMatchesQueryFilterPill: y,
|
|
67
|
+
showSearchBar: V,
|
|
68
|
+
setShowSearchBar: H,
|
|
69
|
+
showDownloadConfirmation: U,
|
|
70
|
+
setShowDownloadConfirmation: W,
|
|
71
|
+
showSqlEditor: P,
|
|
72
|
+
setShowSqlEditor: re,
|
|
73
|
+
showPlots: S || D ? F : !1,
|
|
74
|
+
setShowPlots: I,
|
|
75
|
+
showCopyToClipboard: L,
|
|
76
|
+
setShowCopyToClipboard: R,
|
|
77
|
+
enabledExternalAnalysisPlatforms: w
|
|
76
78
|
}), [
|
|
77
79
|
$,
|
|
78
80
|
Z,
|
|
79
81
|
Q,
|
|
80
|
-
|
|
81
|
-
q,
|
|
82
|
-
g.rgbIndex,
|
|
83
|
-
g.showLastUpdatedOn,
|
|
84
|
-
K,
|
|
85
|
-
W,
|
|
86
|
-
z,
|
|
82
|
+
D,
|
|
87
83
|
G,
|
|
88
|
-
|
|
84
|
+
m.rgbIndex,
|
|
85
|
+
m.showLastUpdatedOn,
|
|
86
|
+
W,
|
|
87
|
+
H,
|
|
89
88
|
L,
|
|
90
89
|
U,
|
|
91
|
-
|
|
90
|
+
z,
|
|
91
|
+
F,
|
|
92
|
+
V,
|
|
93
|
+
P,
|
|
94
|
+
b,
|
|
95
|
+
q,
|
|
92
96
|
S,
|
|
93
|
-
Y,
|
|
94
97
|
w,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
children: re
|
|
98
|
+
v,
|
|
99
|
+
y
|
|
100
|
+
]), { children: ae } = m;
|
|
101
|
+
return /* @__PURE__ */ u(ee, {
|
|
102
|
+
queryVisualizationContext: ie,
|
|
103
|
+
children: ae
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
106
|
//#endregion
|
|
105
|
-
export {
|
|
107
|
+
export { m as QueryVisualizationWrapper };
|
|
106
108
|
|
|
107
109
|
//# 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 /** 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,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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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"}
|
|
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] =\n useState(!hideCopyToClipboard)\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 // Deep-compare-memoize so callers passing a fresh array literal\n // (e.g. `hiddenColumns={['topic']}`) don't reset visible columns on every\n // parent render.\n const hiddenColumns = useDeepCompareMemoize(props.hiddenColumns ?? [])\n useEffect(() => {\n // SWC-6030: If sql changes, reset what columns are visible\n const hidden = new Set(hiddenColumns)\n setVisibleColumns(\n selectColumns\n .filter(el => !hidden.has(el.name))\n .slice(0, visibleColumnCount)\n .map(el => el.name),\n )\n }, [\n selectColumns,\n lastQueryRequest.query.sql,\n visibleColumnCount,\n hiddenColumns,\n ])\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,sBAAmB,IACnB,0BAAsB,IACtB,0BAAuB,IACvB,oCAAiC,IACjC,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,GA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,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;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,IAAD;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' | 'lockTextMatchesQueryFilterPill'> & Pick<QueryContextType, 'combineRangeFacetConfig'>;
|
|
41
|
+
} & Omit<TopLevelControlsProps, 'entityId'> & Pick<QueryWrapperPlotNavCustomPlotParams, 'onCustomPlotClick'> & Pick<QueryWrapperProps, 'isRowSelectionVisible' | 'rowSelectionPrimaryKey' | 'isRowSelectionUIFloating' | 'fileIdColumnName' | 'fileNameColumnName' | 'fileVersionColumnName'> & Pick<QueryVisualizationWrapperProps, 'defaultShowPlots' | 'visibleColumnCount' | 'hiddenColumns' | '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
|
-
{"version":3,"file":"QueryWrapperPlotNav.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/QueryWrapperPlotNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAiBlG,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAItE,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAGL,8BAA8B,EAC/B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAiB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAElE,OAAyB,EACvB,qBAAqB,EACrB,aAAa,EACd,MAAM,mDAAmD,CAAA;AAG1D,OAAuB,EACrB,mBAAmB,EACpB,MAAM,qCAAqC,CAAA;AAC5C,OAA4B,EAC1B,wBAAwB,EACzB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAIxE,eAAO,MAAM,0BAA0B,EAAE,MAAgC,CAAA;AACzE,eAAO,MAAM,2BAA2B,EAAE,MAA+B,CAAA;AAEzE,eAAO,MAAM,qBAAqB,EAAE,MAA0B,CAAA;AAE9D,KAAK,2BAA2B,GAAG;IACjC,2HAA2H;IAC3H,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iLAAiL;IACjL,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mFAAmF;IACnF,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9C,2GAA2G;IAC3G,yBAAy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AClC,gCAAgC,CACnC,GACD,IAAI,CAAC,gBAAgB,EAAE,yBAAyB,CAAC,CAAA;AAEnD,MAAM,MAAM,wBAAwB,GAAG,6BAA6B,GAClE,mBAAmB,GACnB,2BAA2B,CAAA;AAE7B,MAAM,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,
|
|
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,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAItE,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAGL,8BAA8B,EAC/B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAiB,EAAE,aA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CAAA;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,2CAsJxC;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAqH1E"}
|
|
@@ -137,6 +137,7 @@ function z(r) {
|
|
|
137
137
|
columnAliases: r.columnAliases,
|
|
138
138
|
helpConfiguration: h,
|
|
139
139
|
visibleColumnCount: r.visibleColumnCount,
|
|
140
|
+
hiddenColumns: r.hiddenColumns,
|
|
140
141
|
defaultShowPlots: r.defaultShowPlots,
|
|
141
142
|
hideCopyToClipboard: r.hideCopyToClipboard,
|
|
142
143
|
defaultShowSearchBar: (r.defaultShowSearchBox || M) && !r.hideSearchBarControl,
|
|
@@ -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 | '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,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,kBACtB,IACA,EACL,GAAG,KAAwB,IAAwB,GAAG,GACrD,IAAuB,6BAA6B;GAEtD,IAAI,EACF,KAAK,EACH,QAAQ,IAAyB,SAAS,KAAA,GAC3C,EACF;aAED,kBAAC,GAAD,EAAA,UAAA;IACG,IACC,kBAAC,GAAD,EAAgB,WAAW,GAAqB,WAAa,CAAA,GAE7D,kBAAC,GAAD;KACE,GAAI;KACU;KACa;KAC3B,CAAA;IAEJ,kBAAC,GAAD,EAAa,CAAA;IACZ,EAA0B,4BACzB,kBAAC,GAAD;KAC4B;KAC1B,eACE,EAA0B,4BAA4B,GAAM;KAE9D,CAA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,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;EA6BC,EA3Bb,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,gCAAgC,EAAM;GACtC,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 | 'hiddenColumns'\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 hiddenColumns={props.hiddenColumns}\n defaultShowPlots={props.defaultShowPlots}\n hideCopyToClipboard={props.hideCopyToClipboard}\n defaultShowSearchBar={\n (props.defaultShowSearchBox || isFullTextSearchEnabled) &&\n !props.hideSearchBarControl\n }\n lockTextMatchesQueryFilterPill={props.lockTextMatchesQueryFilterPill}\n hideSearchBarControl={props.hideSearchBarControl}\n showLastUpdatedOn={showLastUpdatedOn}\n noContentPlaceholderType={NoContentPlaceholderType.INTERACTIVE}\n hasCustomPlots={Array.isArray(customPlots) && customPlots.length > 0}\n enabledExternalAnalysisPlatforms={enabledExternalAnalysisPlatforms}\n >\n <QueryWrapperPlotNavContents\n {...props}\n isFullTextSearchEnabled={isFullTextSearchEnabled}\n remount={remount}\n />\n </QueryVisualizationWrapper>\n </Suspense>\n </QueryWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAa,IAAqC,yBACrC,IAAsC,wBAEtC,IAAgC;AA6F7C,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,kBACtB,IACA,EACL,GAAG,KAAwB,IAAwB,GAAG,GACrD,IAAuB,6BAA6B;GAEtD,IAAI,EACF,KAAK,EACH,QAAQ,IAAyB,SAAS,KAAA,GAC3C,EACF;aAED,kBAAC,GAAD,EAAA,UA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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;EA8BC,EA5Bb,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAA6B,CAAA;YAC/C,kBAAC,GAAD;GACmB;GACjB,UAAU,EAAM;GAChB,eAAe,EAAM;GACF;GACnB,oBAAoB,EAAM;GAC1B,eAAe,EAAM;GACrB,kBAAkB,EAAM;GACxB,qBAAqB,EAAM;GAC3B,uBACG,EAAM,wBAAwB,MAC/B,CAAC,EAAM;GAET,gCAAgC,EAAM;GACtC,sBAAsB,EAAM;GACT;GACnB,0BAA0B,EAAyB;GACnD,gBAAgB,MAAM,QAAQ,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":"RowSetView.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/RowSetView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAWtE,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,EAAE,yBAAyB,CAAA;IAC9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"RowSetView.d.ts","sourceRoot":"","sources":["../../../src/components/QueryWrapperPlotNav/RowSetView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAWtE,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,EAAE,yBAAyB,CAAA;IAC9C,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAiFhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowSetView.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/RowSetView.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { CardContainer } from '../CardContainer/CardContainer'\nimport { SynapseTable, SynapseTableConfiguration } from '../SynapseTable'\nimport { CardConfiguration } from '../CardContainer/CardConfiguration'\nimport LastUpdatedOn from './LastUpdatedOn'\nimport { useDeepCompareMemoize } from 'use-deep-compare-effect'\nimport QueryWrapperLoadingScreen from '../QueryWrapper/QueryWrapperLoadingScreen'\nimport { SynapseErrorBoundary } from '../error'\nimport { useQueryContext } from '../QueryContext'\nimport { Box } from '@mui/material'\nimport { TablePagination } from '../SynapseTable/TablePagination'\nimport { ViewMoreQueryResultsButton } from '../QueryWrapper/ViewMoreQueryResultsButton'\nimport { useRowSet } from './UseRowSet'\n\nexport type RowSetViewProps = {\n tableConfiguration?: SynapseTableConfiguration\n cardConfiguration?: CardConfiguration\n initialLimit?: number\n hideDownload?: boolean\n multiCardList?: boolean\n}\n\n/**\n * Renders a table or cards representing the RowSet. Also displays appropriate pagination controls\n * depending on the value of QueryContext.isInfinite.\n * @param props\n * @constructor\n */\nexport function RowSetView(props: RowSetViewProps) {\n const { cardConfiguration, hideDownload, initialLimit, multiCardList } = props\n\n const [initialLimitIsApplied, setInitialLimitIsApplied] = useState(\n initialLimit != null,\n )\n\n const { isInfinite } = useQueryContext()\n const tableConfiguration = useDeepCompareMemoize(\n props.tableConfiguration\n ? {\n ...props.tableConfiguration,\n hideDownload,\n }\n : undefined,\n )\n\n const {\n rowSet,\n progressMessage,\n isLoading,\n isLoadingNewPage,\n fetchNextPageOfInfiniteData,\n hasNextPageOfInfiniteData,\n } = useRowSet(initialLimitIsApplied ? initialLimit : undefined)\n\n return (\n <SynapseErrorBoundary>\n <div className={`RowSetView`}>\n {isLoading && (\n <QueryWrapperLoadingScreen progressMessage={progressMessage} />\n )}\n {!isLoading
|
|
1
|
+
{"version":3,"file":"RowSetView.js","names":[],"sources":["../../../src/components/QueryWrapperPlotNav/RowSetView.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { CardContainer } from '../CardContainer/CardContainer'\nimport { SynapseTable, SynapseTableConfiguration } from '../SynapseTable'\nimport { CardConfiguration } from '../CardContainer/CardConfiguration'\nimport LastUpdatedOn from './LastUpdatedOn'\nimport { useDeepCompareMemoize } from 'use-deep-compare-effect'\nimport QueryWrapperLoadingScreen from '../QueryWrapper/QueryWrapperLoadingScreen'\nimport { SynapseErrorBoundary } from '../error'\nimport { useQueryContext } from '../QueryContext'\nimport { Box } from '@mui/material'\nimport { TablePagination } from '../SynapseTable/TablePagination'\nimport { ViewMoreQueryResultsButton } from '../QueryWrapper/ViewMoreQueryResultsButton'\nimport { useRowSet } from './UseRowSet'\n\nexport type RowSetViewProps = {\n tableConfiguration?: SynapseTableConfiguration\n cardConfiguration?: CardConfiguration\n initialLimit?: number\n hideDownload?: boolean\n multiCardList?: boolean\n}\n\n/**\n * Renders a table or cards representing the RowSet. Also displays appropriate pagination controls\n * depending on the value of QueryContext.isInfinite.\n * @param props\n * @constructor\n */\nexport function RowSetView(props: RowSetViewProps) {\n const { cardConfiguration, hideDownload, initialLimit, multiCardList } = props\n\n const [initialLimitIsApplied, setInitialLimitIsApplied] = useState(\n initialLimit != null,\n )\n\n const { isInfinite } = useQueryContext()\n const tableConfiguration = useDeepCompareMemoize(\n props.tableConfiguration\n ? {\n ...props.tableConfiguration,\n hideDownload,\n }\n : undefined,\n )\n\n const {\n rowSet,\n progressMessage,\n isLoading,\n isLoadingNewPage,\n fetchNextPageOfInfiniteData,\n hasNextPageOfInfiniteData,\n } = useRowSet(initialLimitIsApplied ? initialLimit : undefined)\n\n return (\n <SynapseErrorBoundary>\n <div className={`RowSetView`}>\n {isLoading && (\n <QueryWrapperLoadingScreen progressMessage={progressMessage} />\n )}\n {!isLoading &&\n rowSet && (\n // even after the rowSet is loaded, a child component may suspend\n <Suspense\n fallback={\n <QueryWrapperLoadingScreen progressMessage={progressMessage} />\n }\n >\n {tableConfiguration && (\n <SynapseTable\n {...tableConfiguration}\n rowSet={rowSet}\n isLoadingNewPage={isLoadingNewPage}\n />\n )}\n {cardConfiguration && (\n <CardContainer\n {...cardConfiguration}\n rowSet={rowSet}\n multiCardList={multiCardList}\n />\n )}\n </Suspense>\n )}\n <Suspense fallback={<></>}>\n {!isInfinite && (\n <Box sx={{ mt: 2, textAlign: 'right' }}>\n <TablePagination />\n </Box>\n )}\n {isInfinite && (\n <ViewMoreQueryResultsButton\n initialLimit={initialLimit}\n initialLimitIsApplied={initialLimitIsApplied}\n onRemoveInitialLimit={() => {\n setInitialLimitIsApplied(false)\n }}\n fetchNextPage={() => {\n void fetchNextPageOfInfiniteData()\n }}\n hasNextPage={hasNextPageOfInfiniteData}\n isFetchingNextPage={isLoadingNewPage}\n />\n )}\n </Suspense>\n <LastUpdatedOn />\n </div>\n </SynapseErrorBoundary>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAgB,EAAW,GAAwB;CACjD,IAAM,EAAE,sBAAmB,iBAAc,iBAAc,qBAAkB,GAEnE,CAAC,GAAuB,KAA4B,EACxD,KAAgB,KACjB,EAEK,EAAE,kBAAe,GAAiB,EAClC,IAAqB,EACzB,EAAM,qBACF;EACE,GAAG,EAAM;EACT;EACD,GACD,KAAA,EACL,EAEK,EACJ,WACA,oBACA,cACA,qBACA,gCACA,iCACE,EAAU,IAAwB,IAAe,KAAA,EAAU;AAE/D,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,OAAD;EAAK,WAAW;YAAhB;GACG,KACC,kBAAC,GAAD,EAA4C,oBAAmB,CAAA;GAEhE,CAAC,KACA,KAEE,kBAAC,GAAD;IACE,UACE,kBAAC,GAAD,EAA4C,oBAAmB,CAAA;cAFnE,CAKG,KACC,kBAAC,GAAD;KACE,GAAI;KACI;KACU;KAClB,CAAA,EAEH,KACC,kBAAC,GAAD;KACE,GAAI;KACI;KACO;KACf,CAAA,CAEK;;GAEf,kBAAC,GAAD;IAAU,UAAU,kBAAA,GAAA,EAAK,CAAA;cAAzB,CACG,CAAC,KACA,kBAAC,GAAD;KAAK,IAAI;MAAE,IAAI;MAAG,WAAW;MAAS;eACpC,kBAAC,GAAD,EAAmB,CAAA;KACf,CAAA,EAEP,KACC,kBAAC,GAAD;KACgB;KACS;KACvB,4BAA4B;AAC1B,QAAyB,GAAM;;KAEjC,qBAAqB;AACd,SAA6B;;KAEpC,aAAa;KACb,oBAAoB;KACpB,CAAA,CAEK;;GACX,kBAAC,GAAD,EAAiB,CAAA;GACb;KACe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resources.Desktop.js","names":[],"sources":["../../../src/components/Resources/Resources.Desktop.tsx"],"sourcesContent":["import { Data } from './Resources'\nimport { useState } from 'react'\nimport MarkdownSynapse from '../Markdown/MarkdownSynapse'\n\nexport type ResourcesDesktopProps = {\n data: Data\n}\n\nexport default function ResourcesDesktop({ data }: ResourcesDesktopProps) {\n const [index, setIndex] = useState(0)\n return (\n <div className=\"control-container\">\n <div className=\"button-container\">\n {data?.map((el, curIndex) => {\n return (\n <button\n className={index === curIndex ? 'isSelected' : ''}\n onClick={() => setIndex(curIndex)}\n key={el.name}\n >\n {el.name}\n </button>\n )\n })}\n {
|
|
1
|
+
{"version":3,"file":"Resources.Desktop.js","names":[],"sources":["../../../src/components/Resources/Resources.Desktop.tsx"],"sourcesContent":["import { Data } from './Resources'\nimport { useState } from 'react'\nimport MarkdownSynapse from '../Markdown/MarkdownSynapse'\n\nexport type ResourcesDesktopProps = {\n data: Data\n}\n\nexport default function ResourcesDesktop({ data }: ResourcesDesktopProps) {\n const [index, setIndex] = useState(0)\n return (\n <div className=\"control-container\">\n <div className=\"button-container\">\n {data?.map((el, curIndex) => {\n return (\n <button\n className={index === curIndex ? 'isSelected' : ''}\n onClick={() => setIndex(curIndex)}\n key={el.name}\n >\n {el.name}\n </button>\n )\n })}\n {/*\n This button keeps the border line in the button container running from top to bottom,\n it doesn't have any functionality.\n */}\n <button className=\"gap-fill\" />\n </div>\n <div className=\"content-container\">\n {data?.map((el, curIndex) => {\n const { ownerId, wikiId } = el\n return (\n <span key={ownerId} className={index === curIndex ? '' : 'hide'}>\n <MarkdownSynapse ownerId={ownerId} wikiId={wikiId} />\n </span>\n )\n })}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;AAQA,SAAwB,EAAiB,EAAE,WAA+B;CACxE,IAAM,CAAC,GAAO,KAAY,EAAS,EAAE;AACrC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACG,GAAM,KAAK,GAAI,MAEZ,kBAAC,UAAD;IACE,WAAW,MAAU,IAAW,eAAe;IAC/C,eAAe,EAAS,EAAS;cAGhC,EAAG;IACG,EAHF,EAAG,KAGD,CAEX,EAKF,kBAAC,UAAD,EAAQ,WAAU,YAAa,CAAA,CAC3B;MACN,kBAAC,OAAD;GAAK,WAAU;aACZ,GAAM,KAAK,GAAI,MAAa;IAC3B,IAAM,EAAE,YAAS,cAAW;AAC5B,WACE,kBAAC,QAAD;KAAoB,WAAW,MAAU,IAAW,KAAK;eACvD,kBAAC,GAAD;MAA0B;MAAiB;MAAU,CAAA;KAChD,EAFI,EAEJ;KAET;GACE,CAAA,CACF"}
|