synapse-react-client 4.0.36 → 4.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.js +1 -1
- package/dist/aridhia-queries/index.js +11 -11
- package/dist/aridhia-queries/useAridhiaQuery.d.ts +1 -0
- package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -1
- package/dist/aridhia-queries/useAridhiaQuery.js +24 -17
- package/dist/aridhia-queries/useAridhiaQuery.js.map +1 -1
- package/dist/assets/icons/emailWithNotification.js +15 -15
- package/dist/assets/icons/emailWithNotification.js.map +1 -1
- package/dist/assets/icons/emailWithNotification.svg +13 -13
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js +124 -117
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +33 -32
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +39 -18
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts +32 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js +285 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.d.ts +4 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.js +17 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.d.ts +27 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.js +96 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.d.ts +28 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.js +128 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.d.ts +4 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.js +17 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts +13 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js +23 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts +11 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +47 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.d.ts +16 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.js +33 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.d.ts +32 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.js +44 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.js.map +1 -0
- package/dist/components/Aridhia/FairLabelField.d.ts +8 -0
- package/dist/components/Aridhia/FairLabelField.d.ts.map +1 -0
- package/dist/components/Aridhia/FairLabelField.js +13 -0
- package/dist/components/Aridhia/FairLabelField.js.map +1 -0
- package/dist/components/Aridhia/fairFormToRjsf.d.ts +36 -0
- package/dist/components/Aridhia/fairFormToRjsf.d.ts.map +1 -0
- package/dist/components/Aridhia/fairFormToRjsf.js +137 -0
- package/dist/components/Aridhia/fairFormToRjsf.js.map +1 -0
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.d.ts.map +1 -1
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js +2 -2
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js.map +1 -1
- package/dist/components/CardContainer/CardContainer.d.ts.map +1 -1
- package/dist/components/CardContainer/CardContainer.js +1 -1
- package/dist/components/CardContainer/CardContainer.js.map +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmission.d.ts.map +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmission.js +2 -2
- package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js +3 -3
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
- package/dist/components/CreateTableViewWizard/CreateTableViewWizard.js +2 -2
- package/dist/components/CreateTableViewWizard/CreateTableViewWizard.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +121 -117
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts +21 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js +73 -29
- package/dist/components/DataGrid/columns/DateTimeColumn.js.map +1 -1
- package/dist/components/DataGrid/columns/NumberColumn.d.ts +31 -0
- package/dist/components/DataGrid/columns/NumberColumn.d.ts.map +1 -0
- package/dist/components/DataGrid/columns/NumberColumn.js +27 -0
- package/dist/components/DataGrid/columns/NumberColumn.js.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsButton.js +17 -16
- package/dist/components/DataGrid/components/ReorderColumnsButton.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts +2 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +104 -65
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +55 -51
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js +9 -8
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js.map +1 -1
- package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts +10 -5
- package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts.map +1 -1
- package/dist/components/DatasetHosting/DatasetDownloadButton.js +66 -74
- package/dist/components/DatasetHosting/DatasetDownloadButton.js.map +1 -1
- package/dist/components/DatasetHosting/DatasetHosting.d.ts +6 -0
- package/dist/components/DatasetHosting/DatasetHosting.d.ts.map +1 -1
- package/dist/components/DatasetHosting/DatasetHosting.js +6 -0
- package/dist/components/DatasetHosting/DatasetHosting.js.map +1 -1
- package/dist/components/DatasetHosting/DatasetHostingAdornment.d.ts +15 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.js +23 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.js.map +1 -0
- package/dist/components/DatasetHosting/index.d.ts +2 -0
- package/dist/components/DatasetHosting/index.d.ts.map +1 -1
- package/dist/components/DatasetHosting/index.js +2 -1
- package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.d.ts.map +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js.map +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.d.ts.map +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.js +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.js.map +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.js +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +176 -170
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts +9 -0
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.js +2 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.js.map +1 -1
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.js +1 -1
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.js.map +1 -1
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.js +6 -6
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.js.map +1 -1
- package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts +9 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts.map +1 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.js +23 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.js.map +1 -0
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.css +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts +3 -2
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js +10 -12
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.js +8 -7
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.scss +12 -2
- package/dist/components/Markdown/MarkdownEditor.js +1 -1
- package/dist/components/Markdown/MarkdownEditor.js.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js +46 -46
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderTranslation.js +1 -1
- package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.js +1 -1
- package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.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 +27 -25
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.d.ts +0 -9
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js +23 -31
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js +5 -4
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.js +6 -5
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +2 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +18 -13
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/StatisticsPlot.d.ts.map +1 -1
- package/dist/components/StatisticsPlot.js +1 -1
- package/dist/components/StatisticsPlot.js.map +1 -1
- package/dist/components/SynapseForm/SynapseFormWrapper.js +1 -1
- package/dist/components/SynapseForm/SynapseFormWrapper.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +9 -9
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +14 -0
- package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js +1 -1
- package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js.map +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPage.js +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPage.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts +4 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +71 -69
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
- package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts +4 -0
- package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts.map +1 -1
- package/dist/components/SynapseTable/table-top/DownloadOptions.js +14 -13
- package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js +4 -4
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js.map +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.d.ts.map +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.js +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.js.map +1 -1
- package/dist/components/TermsAndConditions/TermsAndConditions.js +1 -1
- package/dist/components/TermsAndConditions/TermsAndConditions.js.map +1 -1
- package/dist/components/Webhook/CreateWebhookModal.d.ts.map +1 -1
- package/dist/components/Webhook/CreateWebhookModal.js +1 -1
- package/dist/components/Webhook/CreateWebhookModal.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +172 -63
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.d.ts +3 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +10 -8
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +74 -43
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +5 -5
- package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
- package/dist/components/entity/metadata/EntityModal.js +1 -1
- package/dist/components/entity/metadata/EntityModal.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +2 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/index.js +113 -112
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +1 -1
- package/dist/components/menu/DropdownMenu.js.map +1 -1
- package/dist/components/row_renderers/Dataset.js +1 -1
- package/dist/components/row_renderers/Dataset.js.map +1 -1
- package/dist/components/styled/LeftRightPanel.d.ts +8 -0
- package/dist/components/styled/LeftRightPanel.d.ts.map +1 -1
- package/dist/components/styled/LeftRightPanel.js +10 -1
- package/dist/components/styled/LeftRightPanel.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/index.js +174 -173
- package/dist/index.js.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +73 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.js +119 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.js +4 -4
- package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/userProfileHandlers.js +2 -2
- package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +72 -69
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/components/_terms-and-conditions.scss +25 -3
- package/dist/style/main.css +1 -1
- package/dist/testutils/RjsfFormTestUtils.js +12 -0
- package/dist/testutils/RjsfFormTestUtils.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/QueryFilterUtils.js +1 -1
- package/dist/utils/functions/QueryFilterUtils.js.map +1 -1
- package/dist/utils/functions/SqlFunctions.js +1 -1
- package/dist/utils/functions/SqlFunctions.js.map +1 -1
- package/dist/utils/functions/queryUtils.js +1 -1
- package/dist/utils/functions/queryUtils.js.map +1 -1
- package/dist/utils/hooks/useDetectSSOCode.d.ts.map +1 -1
- package/dist/utils/hooks/useDetectSSOCode.js +1 -1
- package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
- package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js +1 -1
- package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js.map +1 -1
- package/dist/utils/jsonschema/SchemaAnnotationUtils.js +1 -1
- package/dist/utils/jsonschema/SchemaAnnotationUtils.js.map +1 -1
- package/dist/utils/jsonschema/collectTopLevelProperties.d.ts +22 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.d.ts.map +1 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.js +31 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.js.map +1 -0
- package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts.map +1 -1
- package/dist/utils/jsonschema/getSchemaPropertyInfo.js +1 -1
- package/dist/utils/jsonschema/getSchemaPropertyInfo.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeDefaultColumnOrder.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/utils/computeDefaultColumnOrder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"computeDefaultColumnOrder.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/utils/computeDefaultColumnOrder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EAAE,EACrB,UAAU,EAAE,WAAW,GAAG,SAAS,EACnC,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAC9B,MAAM,EAAE,CAuBV"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { collectTopLevelProperties as e } from "../../../utils/jsonschema/collectTopLevelProperties.js";
|
|
1
2
|
//#region src/components/DataGrid/utils/computeDefaultColumnOrder.ts
|
|
2
|
-
function
|
|
3
|
-
let
|
|
4
|
-
let n =
|
|
5
|
-
n !== -1 && !
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
let i = Object.keys(e(n)), a = [], o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
5
|
+
let n = t.indexOf(e);
|
|
6
|
+
n !== -1 && !o.has(n) && (a.push(n), o.add(n));
|
|
6
7
|
};
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
}),
|
|
8
|
+
return r?.forEach(s), i.forEach(s), t.forEach((e, t) => {
|
|
9
|
+
o.has(t) || a.push(t);
|
|
10
|
+
}), a;
|
|
10
11
|
}
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { t as computeDefaultColumnOrder };
|
|
13
14
|
|
|
14
15
|
//# sourceMappingURL=computeDefaultColumnOrder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeDefaultColumnOrder.js","names":["JSONSchema7","computeDefaultColumnOrder","columnNames","jsonSchema","upsertKeyColumnNames","schemaPropertyNames","
|
|
1
|
+
{"version":3,"file":"computeDefaultColumnOrder.js","names":["collectTopLevelProperties","JSONSchema7","computeDefaultColumnOrder","columnNames","jsonSchema","upsertKeyColumnNames","schemaPropertyNames","Object","keys","orderedIndices","seen","Set","addColumnByName","name","index","indexOf","has","push","add","forEach","_"],"sources":["../../../../src/components/DataGrid/utils/computeDefaultColumnOrder.ts"],"sourcesContent":["import { collectTopLevelProperties } from '@/utils/jsonschema/collectTopLevelProperties'\nimport { JSONSchema7 } from 'json-schema'\n\n/**\n * Computes the \"default\" column display order: upsert key columns first (in the order given),\n * then the order properties are defined in the JSON schema, with any remaining columns appended\n * afterward in their identity-index order.\n */\nexport function computeDefaultColumnOrder(\n columnNames: string[],\n jsonSchema: JSONSchema7 | undefined,\n upsertKeyColumnNames?: string[],\n): number[] {\n const schemaPropertyNames = Object.keys(collectTopLevelProperties(jsonSchema))\n const orderedIndices: number[] = []\n const seen = new Set<number>()\n\n const addColumnByName = (name: string) => {\n const index = columnNames.indexOf(name)\n if (index !== -1 && !seen.has(index)) {\n orderedIndices.push(index)\n seen.add(index)\n }\n }\n\n upsertKeyColumnNames?.forEach(addColumnByName)\n schemaPropertyNames.forEach(addColumnByName)\n\n columnNames.forEach((_, index) => {\n if (!seen.has(index)) {\n orderedIndices.push(index)\n }\n })\n\n return orderedIndices\n}\n"],"mappings":";;AAQA,SAAgBE,EACdC,GACAC,GACAC,GACU;CACV,IAAMC,IAAsBC,OAAOC,KAAKR,EAA0BI,CAAU,CAAC,GACvEK,IAA2B,CAAA,GAC3BC,oBAAO,IAAIC,IAAY,GAEvBC,KAAmBC,MAAiB;EACxC,IAAMC,IAAQX,EAAYY,QAAQF,CAAI;EACtC,AAAIC,MAAU,MAAM,CAACJ,EAAKM,IAAIF,CAAK,MACjCL,EAAeQ,KAAKH,CAAK,GACzBJ,EAAKQ,IAAIJ,CAAK;CAElB;CAWA,OATAT,GAAsBc,QAAQP,CAAe,GAC7CN,EAAoBa,QAAQP,CAAe,GAE3CT,EAAYgB,SAASC,GAAGN,MAAU;EAChC,AAAKJ,EAAKM,IAAIF,CAAK,KACjBL,EAAeQ,KAAKH,CAAK;CAE7B,CAAC,GAEML;AACT"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
1
|
import { DatasetHostingType } from './DatasetHosting';
|
|
3
2
|
export type DatasetDownloadButtonProps = {
|
|
4
3
|
/** The dataset entity id (synId); required to offer the download action. */
|
|
5
4
|
entityId?: string;
|
|
6
5
|
/** The dataset name, shown in the download confirmation. */
|
|
7
6
|
name: string;
|
|
8
|
-
/** The dataset version to add to the download list, if any. */
|
|
9
|
-
version?: number;
|
|
10
7
|
/**
|
|
11
8
|
* The dataset's hosting type. Accepts a raw annotation value (possibly blank,
|
|
12
9
|
* null, or unrecognized); anything unrecognized is treated as `synapse`.
|
|
@@ -17,8 +14,16 @@ export type DatasetDownloadButtonProps = {
|
|
|
17
14
|
/** Destination for the action when the dataset is not downloadable (e.g. dbGaP/EGA). */
|
|
18
15
|
externalUrl?: string;
|
|
19
16
|
disabled?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Called when an authenticated user clicks a downloadable-hosting button.
|
|
19
|
+
* Owners of the button render the `EntityDownloadConfirmation` themselves and
|
|
20
|
+
* toggle it from this callback, so the confirmation banner can be shared with
|
|
21
|
+
* other download entry points on the same card (e.g. the customSecondaryLabel
|
|
22
|
+
* "Click here to add to Synapse download list" link).
|
|
23
|
+
*/
|
|
24
|
+
onDownloadClick?: () => void;
|
|
25
|
+
/** Disables the button while an owner-managed download flow is in progress. */
|
|
26
|
+
isDownloading?: boolean;
|
|
22
27
|
};
|
|
23
28
|
/**
|
|
24
29
|
* The hosting-aware primary action for a dataset.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetDownloadButton.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/DatasetDownloadButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatasetDownloadButton.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/DatasetDownloadButton.tsx"],"names":[],"mappings":"AAaA,OAAO,EAGL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAA;AAWzB,MAAM,MAAM,0BAA0B,GAAG;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5C,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA8BD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAsItE;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -4,32 +4,29 @@ import "../../utils/index.js";
|
|
|
4
4
|
import { TargetEnum as n } from "../../utils/html/TargetEnum.js";
|
|
5
5
|
import r from "../GenericCard/GenericCardActionButton.js";
|
|
6
6
|
import { DATASET_HOSTING_CONFIG as i, fillRepository as a, normalizeHosting as o } from "./DatasetHosting.js";
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import y from "@mui/icons-material/AssuredWorkloadOutlined";
|
|
18
|
-
import b from "@mui/icons-material/LoginOutlined";
|
|
19
|
-
import { createPortal as x } from "react-dom";
|
|
7
|
+
import { useState as s } from "react";
|
|
8
|
+
import { Tooltip as c, Typography as l } from "@mui/material";
|
|
9
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
10
|
+
import d from "@mui/icons-material/GetAppTwoTone";
|
|
11
|
+
import f from "@mui/icons-material/PublicOutlined";
|
|
12
|
+
import p from "@mui/icons-material/OpenInNew";
|
|
13
|
+
import m from "@mui/icons-material/LayersOutlined";
|
|
14
|
+
import h from "@mui/icons-material/BlockOutlined";
|
|
15
|
+
import g from "@mui/icons-material/AssuredWorkloadOutlined";
|
|
16
|
+
import _ from "@mui/icons-material/LoginOutlined";
|
|
20
17
|
//#region src/components/DatasetHosting/DatasetDownloadButton.tsx
|
|
21
|
-
var
|
|
22
|
-
download:
|
|
23
|
-
cloud:
|
|
24
|
-
external:
|
|
25
|
-
launch:
|
|
26
|
-
mixed:
|
|
27
|
-
unavailable:
|
|
18
|
+
var v = {
|
|
19
|
+
download: d,
|
|
20
|
+
cloud: g,
|
|
21
|
+
external: f,
|
|
22
|
+
launch: p,
|
|
23
|
+
mixed: m,
|
|
24
|
+
unavailable: h
|
|
28
25
|
};
|
|
29
|
-
function
|
|
26
|
+
function y(e, t) {
|
|
30
27
|
return e.label.includes("{repository}") && !t ? e.labelWithoutRepository ?? e.label : a(e.label, t) ?? e.label;
|
|
31
28
|
}
|
|
32
|
-
var
|
|
29
|
+
var b = "320px", x = {
|
|
33
30
|
overflow: "hidden",
|
|
34
31
|
textOverflow: "ellipsis",
|
|
35
32
|
whiteSpace: "nowrap",
|
|
@@ -37,96 +34,91 @@ var w = "320px", T = {
|
|
|
37
34
|
textTransform: "none",
|
|
38
35
|
color: "inherit"
|
|
39
36
|
};
|
|
40
|
-
function
|
|
41
|
-
let { entityId:
|
|
37
|
+
function S(d) {
|
|
38
|
+
let { entityId: f, name: p, hosting: m, repository: h, externalUrl: g, disabled: S, onDownloadClick: C, isDownloading: w } = d, { isAuthenticated: T } = t(), E = i[o(m)], D = y(E, h), O = a(E.tooltip, h), k = v[E.icon], [A, j] = s(!1), M = /* @__PURE__ */ u(l, {
|
|
42
39
|
variant: "buttonLink",
|
|
43
|
-
sx:
|
|
44
|
-
children:
|
|
45
|
-
}),
|
|
46
|
-
if (
|
|
47
|
-
if (!
|
|
48
|
-
let t =
|
|
40
|
+
sx: x,
|
|
41
|
+
children: D
|
|
42
|
+
}), N = `${D}, ${p}`;
|
|
43
|
+
if (E.downloadable && f) {
|
|
44
|
+
if (!T) {
|
|
45
|
+
let t = A ? _ : k, n = A ? "Sign in to download" : D, i = /* @__PURE__ */ u(r, {
|
|
49
46
|
variant: "outlined",
|
|
50
|
-
color:
|
|
51
|
-
"aria-label": `${n}, ${
|
|
52
|
-
className:
|
|
53
|
-
startIcon: /* @__PURE__ */
|
|
47
|
+
color: A ? "error" : "primary",
|
|
48
|
+
"aria-label": `${n}, ${p}`,
|
|
49
|
+
className: A ? e : void 0,
|
|
50
|
+
startIcon: /* @__PURE__ */ u(t, { sx: { fontSize: "16px" } }),
|
|
54
51
|
onClick: (e) => {
|
|
55
|
-
|
|
52
|
+
A || (e.stopPropagation(), j(!0));
|
|
56
53
|
},
|
|
57
54
|
sx: {
|
|
58
|
-
maxWidth:
|
|
55
|
+
maxWidth: b,
|
|
59
56
|
textTransform: "none"
|
|
60
57
|
},
|
|
61
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ u(l, {
|
|
62
59
|
variant: "buttonLink",
|
|
63
|
-
sx:
|
|
60
|
+
sx: x,
|
|
64
61
|
children: n
|
|
65
62
|
})
|
|
66
63
|
});
|
|
67
|
-
return !
|
|
68
|
-
title:
|
|
64
|
+
return !A && O ? /* @__PURE__ */ u(c, {
|
|
65
|
+
title: O,
|
|
69
66
|
arrow: !0,
|
|
70
67
|
placement: "top",
|
|
71
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ u("span", { children: i })
|
|
72
69
|
}) : i;
|
|
73
70
|
}
|
|
74
|
-
let t = /* @__PURE__ */
|
|
71
|
+
let t = /* @__PURE__ */ u(r, {
|
|
75
72
|
variant: "outlined",
|
|
76
|
-
"aria-label":
|
|
77
|
-
startIcon: /* @__PURE__ */
|
|
78
|
-
onClick:
|
|
79
|
-
disabled:
|
|
73
|
+
"aria-label": N,
|
|
74
|
+
startIcon: /* @__PURE__ */ u(k, { sx: { fontSize: "16px" } }),
|
|
75
|
+
onClick: C,
|
|
76
|
+
disabled: S || w,
|
|
80
77
|
sx: {
|
|
81
|
-
maxWidth:
|
|
78
|
+
maxWidth: b,
|
|
82
79
|
textTransform: "none"
|
|
83
80
|
},
|
|
84
|
-
children:
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onIsLoadingChange: L,
|
|
89
|
-
handleClose: () => F(!1)
|
|
90
|
-
}) : null;
|
|
91
|
-
return /* @__PURE__ */ p(d, { children: [M ? /* @__PURE__ */ f(l, {
|
|
92
|
-
title: M,
|
|
81
|
+
children: M
|
|
82
|
+
});
|
|
83
|
+
return O ? /* @__PURE__ */ u(c, {
|
|
84
|
+
title: O,
|
|
93
85
|
arrow: !0,
|
|
94
86
|
placement: "top",
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
}) : t
|
|
87
|
+
children: /* @__PURE__ */ u("span", { children: t })
|
|
88
|
+
}) : t;
|
|
97
89
|
}
|
|
98
|
-
let
|
|
90
|
+
let P = E.isExternalLink && g ? /* @__PURE__ */ u(r, {
|
|
99
91
|
variant: "outlined",
|
|
100
|
-
"aria-label":
|
|
101
|
-
href:
|
|
92
|
+
"aria-label": N,
|
|
93
|
+
href: g,
|
|
102
94
|
target: n.NEW_WINDOW,
|
|
103
95
|
rel: "noopener noreferrer",
|
|
104
|
-
startIcon: /* @__PURE__ */
|
|
96
|
+
startIcon: /* @__PURE__ */ u(k, { sx: { fontSize: "16px" } }),
|
|
105
97
|
sx: {
|
|
106
|
-
maxWidth:
|
|
98
|
+
maxWidth: b,
|
|
107
99
|
textTransform: "none",
|
|
108
100
|
"&:visited": { color: "primary.main" }
|
|
109
101
|
},
|
|
110
|
-
children:
|
|
111
|
-
}) : /* @__PURE__ */
|
|
102
|
+
children: M
|
|
103
|
+
}) : /* @__PURE__ */ u(r, {
|
|
112
104
|
variant: "outlined",
|
|
113
|
-
"aria-label":
|
|
105
|
+
"aria-label": N,
|
|
114
106
|
disabled: !0,
|
|
115
|
-
startIcon: /* @__PURE__ */
|
|
107
|
+
startIcon: /* @__PURE__ */ u(k, { sx: { fontSize: "16px" } }),
|
|
116
108
|
sx: {
|
|
117
|
-
maxWidth:
|
|
109
|
+
maxWidth: b,
|
|
118
110
|
textTransform: "none"
|
|
119
111
|
},
|
|
120
|
-
children:
|
|
112
|
+
children: M
|
|
121
113
|
});
|
|
122
|
-
return
|
|
123
|
-
title:
|
|
114
|
+
return O ? /* @__PURE__ */ u(c, {
|
|
115
|
+
title: O,
|
|
124
116
|
arrow: !0,
|
|
125
117
|
placement: "top",
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
}) :
|
|
118
|
+
children: /* @__PURE__ */ u("span", { children: P })
|
|
119
|
+
}) : P;
|
|
128
120
|
}
|
|
129
121
|
//#endregion
|
|
130
|
-
export {
|
|
122
|
+
export { S as DatasetDownloadButton, S as default };
|
|
131
123
|
|
|
132
124
|
//# sourceMappingURL=DatasetDownloadButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetDownloadButton.js","names":[],"sources":["../../../src/components/DatasetHosting/DatasetDownloadButton.tsx"],"sourcesContent":["import { Tooltip, Typography } from '@mui/material'\nimport GetAppTwoTone from '@mui/icons-material/GetAppTwoTone'\nimport PublicOutlined from '@mui/icons-material/PublicOutlined'\nimport OpenInNew from '@mui/icons-material/OpenInNew'\nimport LayersOutlined from '@mui/icons-material/LayersOutlined'\nimport BlockOutlined from '@mui/icons-material/BlockOutlined'\nimport AssuredWorkloadOutlined from '@mui/icons-material/AssuredWorkloadOutlined'\nimport LoginOutlined from '@mui/icons-material/LoginOutlined'\nimport { ReactNode, RefObject, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport { SRC_SIGN_IN_CLASS } from '@/utils/SynapseConstants'\nimport { useSynapseContext } from '@/utils'\nimport GenericCardActionButton from '../GenericCard/GenericCardActionButton'\nimport { EntityDownloadConfirmation } from '../EntityDownloadConfirmation'\nimport {\n DATASET_HOSTING_CONFIG,\n DatasetHostingConfig,\n DatasetHostingType,\n fillRepository,\n normalizeHosting,\n} from './DatasetHosting'\n\nconst ICONS = {\n download: GetAppTwoTone,\n cloud: AssuredWorkloadOutlined,\n external: PublicOutlined,\n launch: OpenInNew,\n mixed: LayersOutlined,\n unavailable: BlockOutlined,\n} as const\n\nexport type DatasetDownloadButtonProps = {\n /** The dataset entity id (synId); required to offer the download action. */\n entityId?: string\n /** The dataset name, shown in the download confirmation. */\n name: string\n /** The dataset version to add to the download list, if any. */\n version?: number\n /**\n * The dataset's hosting type. Accepts a raw annotation value (possibly blank,\n * null, or unrecognized); anything unrecognized is treated as `synapse`.\n */\n hosting?: DatasetHostingType | string | null\n /** Name of the external repository (e.g. \"GEO\", \"dbGaP\"), shown in the label/tooltip. */\n repository?: string\n /** Destination for the action when the dataset is not downloadable (e.g. dbGaP/EGA). */\n externalUrl?: string\n disabled?: boolean\n /** Portal target for the download-confirmation dialog (see EntityDownloadConfirmation). */\n downloadConfirmationContainer?: RefObject<HTMLElement | null>\n}\n\nfunction resolveLabel(\n config: DatasetHostingConfig,\n repository?: string,\n): string {\n if (config.label.includes('{repository}') && !repository) {\n return config.labelWithoutRepository ?? config.label\n }\n return fillRepository(config.label, repository) ?? config.label\n}\n\nconst MAX_WIDTH = '320px'\n\nconst ELLIPSIS = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n minWidth: 0,\n} as const\n\n// The composed labels (\"Download from GEO\", \"Access at dbGaP\") are already\n// sentence-cased, so opt out of the theme button's capitalize transform. `color:\n// inherit` lets the label take the button's color so text and icon always match.\nconst LABEL_SX = {\n ...ELLIPSIS,\n textTransform: 'none',\n color: 'inherit',\n} as const\n\n/**\n * The hosting-aware primary action for a dataset.\n * - downloadable types add the dataset to the user's download list.\n * When signed out, the user is prompted to sign in.\n * - `external-access` swaps in an \"Access at {repository}\" link-out\n * - `unavailable` is a disabled, non-actionable indicator\n *\n * Its appearance follows the nearest `CardActionButtonStyleContext` (via\n * `GenericCardActionButton`), so it matches the card's other action buttons.\n */\nexport function DatasetDownloadButton(props: DatasetDownloadButtonProps) {\n const {\n entityId,\n name,\n version,\n hosting,\n repository,\n externalUrl,\n disabled,\n downloadConfirmationContainer,\n } = props\n const { isAuthenticated } = useSynapseContext()\n const config = DATASET_HOSTING_CONFIG[normalizeHosting(hosting)]\n\n const label = resolveLabel(config, repository)\n const caveat = fillRepository(config.tooltip, repository)\n const Icon = ICONS[config.icon]\n\n const [showConfirmation, setShowConfirmation] = useState(false)\n const [isAdding, setIsAdding] = useState(false)\n const [signInPrompt, setSignInPrompt] = useState(false)\n\n const labelEl = (\n <Typography variant=\"buttonLink\" sx={LABEL_SX}>\n {label}\n </Typography>\n )\n // Every card's button shows the same visible label (\"Download\"), so include the\n // dataset name in the accessible name to distinguish them for screen readers.\n const ariaLabel = `${label}, ${name}`\n\n // Downloadable: a single button that adds the dataset to the download list.\n if (config.downloadable && entityId) {\n // Signed out: keep the button clickable as a call to action rather than\n // greying it out. The first click flips it to a red \"Sign in to download\"\n // prompt that opens the app's sign-in modal (SRC_SIGN_IN_CLASS).\n if (!isAuthenticated) {\n const PromptIcon = signInPrompt ? LoginOutlined : Icon\n const promptLabel = signInPrompt ? 'Sign in to download' : label\n const button = (\n <GenericCardActionButton\n variant=\"outlined\"\n color={signInPrompt ? 'error' : 'primary'}\n aria-label={`${promptLabel}, ${name}`}\n className={signInPrompt ? SRC_SIGN_IN_CLASS : undefined}\n startIcon={<PromptIcon sx={{ fontSize: '16px' }} />}\n onClick={event => {\n if (!signInPrompt) {\n // Swallow this first click: React adds SRC_SIGN_IN_CLASS during the\n // flush, before the event bubbles to the window-level sign-in\n // handler, which would otherwise fire on this same click. The next\n // click on the red CTA bubbles through and triggers sign-in.\n event.stopPropagation()\n setSignInPrompt(true)\n }\n }}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n <Typography variant=\"buttonLink\" sx={LABEL_SX}>\n {promptLabel}\n </Typography>\n </GenericCardActionButton>\n )\n // Before the prompt, keep the hosting caveat tooltip; once prompting, the\n // red label is the notice, so no tooltip.\n return !signInPrompt && caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n <span>{button}</span>\n </Tooltip>\n ) : (\n button\n )\n }\n\n // Signed in: add the dataset to the download list.\n const button = (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n onClick={() => setShowConfirmation(value => !value)}\n disabled={disabled || isAdding}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n {labelEl}\n </GenericCardActionButton>\n )\n const confirmation = showConfirmation ? (\n <EntityDownloadConfirmation\n entityId={entityId}\n versionNumber={version}\n onIsLoadingChange={setIsAdding}\n handleClose={() => setShowConfirmation(false)}\n />\n ) : null\n return (\n <>\n {caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n <span>{button}</span>\n </Tooltip>\n ) : (\n button\n )}\n {confirmation &&\n (downloadConfirmationContainer?.current\n ? createPortal(confirmation, downloadConfirmationContainer.current)\n : confirmation)}\n </>\n )\n }\n\n // Not downloadable: link out to the external repository, or a disabled indicator.\n const control: ReactNode =\n config.isExternalLink && externalUrl ? (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n href={externalUrl}\n target={TargetEnum.NEW_WINDOW}\n rel=\"noopener noreferrer\"\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n sx={{\n maxWidth: MAX_WIDTH,\n textTransform: 'none',\n // As an <a>, a visited link would otherwise darken to primary.dark\n // (theme rule); keep the resting color consistent with the buttons.\n '&:visited': { color: 'primary.main' },\n }}\n >\n {labelEl}\n </GenericCardActionButton>\n ) : (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n disabled\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n {labelEl}\n </GenericCardActionButton>\n )\n\n return caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n {/* span lets the tooltip work even when the control is disabled */}\n <span>{control}</span>\n </Tooltip>\n ) : (\n control\n )\n}\n\nexport default DatasetDownloadButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAM,IAAQ;CACZ,UAAU;CACV,OAAO;CACP,UAAU;CACV,QAAQ;CACR,OAAO;CACP,aAAa;AACf;AAuBA,SAAS,EACP,GACA,GACQ;CAIR,OAHI,EAAO,MAAM,SAAS,cAAc,KAAK,CAAC,IACrC,EAAO,0BAA0B,EAAO,QAE1C,EAAe,EAAO,OAAO,CAAU,KAAK,EAAO;AAC5D;AAEA,IAAM,IAAY,SAYZ,IAAW;CATf,UAAU;CACV,cAAc;CACd,YAAY;CACZ,UAAU;CAQV,eAAe;CACf,OAAO;AACT;AAYA,SAAgB,EAAsB,GAAmC;CACvE,IAAM,EACJ,aACA,SACA,YACA,YACA,eACA,gBACA,aACA,qCACE,GACE,EAAE,uBAAoB,EAAkB,GACxC,IAAS,EAAuB,EAAiB,CAAO,IAExD,IAAQ,EAAa,GAAQ,CAAU,GACvC,IAAS,EAAe,EAAO,SAAS,CAAU,GAClD,IAAO,EAAM,EAAO,OAEpB,CAAC,GAAkB,KAAuB,EAAS,EAAK,GACxD,CAAC,GAAU,KAAe,EAAS,EAAK,GACxC,CAAC,GAAc,KAAmB,EAAS,EAAK,GAEhD,IACJ,kBAAC,GAAD;EAAY,SAAQ;EAAa,IAAI;YAClC;CACS,CAAA,GAIR,IAAY,GAAG,EAAM,IAAI;CAG/B,IAAI,EAAO,gBAAgB,GAAU;EAInC,IAAI,CAAC,GAAiB;GACpB,IAAM,IAAa,IAAe,IAAgB,GAC5C,IAAc,IAAe,wBAAwB,GACrD,IACJ,kBAAC,GAAD;IACE,SAAQ;IACR,OAAO,IAAe,UAAU;IAChC,cAAY,GAAG,EAAY,IAAI;IAC/B,WAAW,IAAe,IAAoB,KAAA;IAC9C,WAAW,kBAAC,GAAD,EAAY,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;IAClD,UAAS,MAAS;KAChB,AAAK,MAKH,EAAM,gBAAgB,GACtB,EAAgB,EAAI;IAExB;IACA,IAAI;KAAE,UAAU;KAAW,eAAe;IAAO;cAEjD,kBAAC,GAAD;KAAY,SAAQ;KAAa,IAAI;eAClC;IACS,CAAA;GACW,CAAA;GAI3B,OAAO,CAAC,KAAgB,IACtB,kBAAC,GAAD;IAAS,OAAO;IAAQ,OAAA;IAAM,WAAU;cACtC,kBAAC,QAAD,EAAA,UAAO,EAAa,CAAA;GACb,CAAA,IAET;EAEJ;EAGA,IAAM,IACJ,kBAAC,GAAD;GACE,SAAQ;GACR,cAAY;GACZ,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;GAC5C,eAAe,GAAoB,MAAS,CAAC,CAAK;GAClD,UAAU,KAAY;GACtB,IAAI;IAAE,UAAU;IAAW,eAAe;GAAO;aAEhD;EACsB,CAAA,GAErB,IAAe,IACnB,kBAAC,GAAD;GACY;GACV,eAAe;GACf,mBAAmB;GACnB,mBAAmB,EAAoB,EAAK;EAC7C,CAAA,IACC;EACJ,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,IACC,kBAAC,GAAD;GAAS,OAAO;GAAQ,OAAA;GAAM,WAAU;aACtC,kBAAC,QAAD,EAAA,UAAO,EAAa,CAAA;EACb,CAAA,IAET,GAED,MACE,GAA+B,UAC5B,EAAa,GAAc,EAA8B,OAAO,IAChE,EACN,EAAA,CAAA;CAEN;CAGA,IAAM,IACJ,EAAO,kBAAkB,IACvB,kBAAC,GAAD;EACE,SAAQ;EACR,cAAY;EACZ,MAAM;EACN,QAAQ,EAAW;EACnB,KAAI;EACJ,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;EAC5C,IAAI;GACF,UAAU;GACV,eAAe;GAGf,aAAa,EAAE,OAAO,eAAe;EACvC;YAEC;CACsB,CAAA,IAEzB,kBAAC,GAAD;EACE,SAAQ;EACR,cAAY;EACZ,UAAA;EACA,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;EAC5C,IAAI;GAAE,UAAU;GAAW,eAAe;EAAO;YAEhD;CACsB,CAAA;CAG7B,OAAO,IACL,kBAAC,GAAD;EAAS,OAAO;EAAQ,OAAA;EAAM,WAAU;YAEtC,kBAAC,QAAD,EAAA,UAAO,EAAc,CAAA;CACd,CAAA,IAET;AAEJ"}
|
|
1
|
+
{"version":3,"file":"DatasetDownloadButton.js","names":[],"sources":["../../../src/components/DatasetHosting/DatasetDownloadButton.tsx"],"sourcesContent":["import { Tooltip, Typography } from '@mui/material'\nimport GetAppTwoTone from '@mui/icons-material/GetAppTwoTone'\nimport PublicOutlined from '@mui/icons-material/PublicOutlined'\nimport OpenInNew from '@mui/icons-material/OpenInNew'\nimport LayersOutlined from '@mui/icons-material/LayersOutlined'\nimport BlockOutlined from '@mui/icons-material/BlockOutlined'\nimport AssuredWorkloadOutlined from '@mui/icons-material/AssuredWorkloadOutlined'\nimport LoginOutlined from '@mui/icons-material/LoginOutlined'\nimport { ReactNode, useState } from 'react'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport { SRC_SIGN_IN_CLASS } from '@/utils/SynapseConstants'\nimport { useSynapseContext } from '@/utils'\nimport GenericCardActionButton from '../GenericCard/GenericCardActionButton'\nimport {\n DATASET_HOSTING_CONFIG,\n DatasetHostingConfig,\n DatasetHostingType,\n fillRepository,\n normalizeHosting,\n} from './DatasetHosting'\n\nconst ICONS = {\n download: GetAppTwoTone,\n cloud: AssuredWorkloadOutlined,\n external: PublicOutlined,\n launch: OpenInNew,\n mixed: LayersOutlined,\n unavailable: BlockOutlined,\n} as const\n\nexport type DatasetDownloadButtonProps = {\n /** The dataset entity id (synId); required to offer the download action. */\n entityId?: string\n /** The dataset name, shown in the download confirmation. */\n name: string\n /**\n * The dataset's hosting type. Accepts a raw annotation value (possibly blank,\n * null, or unrecognized); anything unrecognized is treated as `synapse`.\n */\n hosting?: DatasetHostingType | string | null\n /** Name of the external repository (e.g. \"GEO\", \"dbGaP\"), shown in the label/tooltip. */\n repository?: string\n /** Destination for the action when the dataset is not downloadable (e.g. dbGaP/EGA). */\n externalUrl?: string\n disabled?: boolean\n /**\n * Called when an authenticated user clicks a downloadable-hosting button.\n * Owners of the button render the `EntityDownloadConfirmation` themselves and\n * toggle it from this callback, so the confirmation banner can be shared with\n * other download entry points on the same card (e.g. the customSecondaryLabel\n * \"Click here to add to Synapse download list\" link).\n */\n onDownloadClick?: () => void\n /** Disables the button while an owner-managed download flow is in progress. */\n isDownloading?: boolean\n}\n\nfunction resolveLabel(\n config: DatasetHostingConfig,\n repository?: string,\n): string {\n if (config.label.includes('{repository}') && !repository) {\n return config.labelWithoutRepository ?? config.label\n }\n return fillRepository(config.label, repository) ?? config.label\n}\n\nconst MAX_WIDTH = '320px'\n\nconst ELLIPSIS = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n minWidth: 0,\n} as const\n\n// The composed labels (\"Download from GEO\", \"Access at dbGaP\") are already\n// sentence-cased, so opt out of the theme button's capitalize transform. `color:\n// inherit` lets the label take the button's color so text and icon always match.\nconst LABEL_SX = {\n ...ELLIPSIS,\n textTransform: 'none',\n color: 'inherit',\n} as const\n\n/**\n * The hosting-aware primary action for a dataset.\n * - downloadable types add the dataset to the user's download list.\n * When signed out, the user is prompted to sign in.\n * - `external-access` swaps in an \"Access at {repository}\" link-out\n * - `unavailable` is a disabled, non-actionable indicator\n *\n * Its appearance follows the nearest `CardActionButtonStyleContext` (via\n * `GenericCardActionButton`), so it matches the card's other action buttons.\n */\nexport function DatasetDownloadButton(props: DatasetDownloadButtonProps) {\n const {\n entityId,\n name,\n hosting,\n repository,\n externalUrl,\n disabled,\n onDownloadClick,\n isDownloading,\n } = props\n const { isAuthenticated } = useSynapseContext()\n const config = DATASET_HOSTING_CONFIG[normalizeHosting(hosting)]\n\n const label = resolveLabel(config, repository)\n const caveat = fillRepository(config.tooltip, repository)\n const Icon = ICONS[config.icon]\n\n const [signInPrompt, setSignInPrompt] = useState(false)\n\n const labelEl = (\n <Typography variant=\"buttonLink\" sx={LABEL_SX}>\n {label}\n </Typography>\n )\n // Every card's button shows the same visible label (\"Download\"), so include the\n // dataset name in the accessible name to distinguish them for screen readers.\n const ariaLabel = `${label}, ${name}`\n\n // Downloadable: a single button that adds the dataset to the download list.\n if (config.downloadable && entityId) {\n // Signed out: keep the button clickable as a call to action rather than\n // greying it out. The first click flips it to a red \"Sign in to download\"\n // prompt that opens the app's sign-in modal (SRC_SIGN_IN_CLASS).\n if (!isAuthenticated) {\n const PromptIcon = signInPrompt ? LoginOutlined : Icon\n const promptLabel = signInPrompt ? 'Sign in to download' : label\n const button = (\n <GenericCardActionButton\n variant=\"outlined\"\n color={signInPrompt ? 'error' : 'primary'}\n aria-label={`${promptLabel}, ${name}`}\n className={signInPrompt ? SRC_SIGN_IN_CLASS : undefined}\n startIcon={<PromptIcon sx={{ fontSize: '16px' }} />}\n onClick={event => {\n if (!signInPrompt) {\n // Swallow this first click: React adds SRC_SIGN_IN_CLASS during the\n // flush, before the event bubbles to the window-level sign-in\n // handler, which would otherwise fire on this same click. The next\n // click on the red CTA bubbles through and triggers sign-in.\n event.stopPropagation()\n setSignInPrompt(true)\n }\n }}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n <Typography variant=\"buttonLink\" sx={LABEL_SX}>\n {promptLabel}\n </Typography>\n </GenericCardActionButton>\n )\n // Before the prompt, keep the hosting caveat tooltip; once prompting, the\n // red label is the notice, so no tooltip.\n return !signInPrompt && caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n <span>{button}</span>\n </Tooltip>\n ) : (\n button\n )\n }\n\n // Signed in: add the dataset to the download list.\n const button = (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n onClick={onDownloadClick}\n disabled={disabled || isDownloading}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n {labelEl}\n </GenericCardActionButton>\n )\n return caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n <span>{button}</span>\n </Tooltip>\n ) : (\n button\n )\n }\n\n // Not downloadable: link out to the external repository, or a disabled indicator.\n const control: ReactNode =\n config.isExternalLink && externalUrl ? (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n href={externalUrl}\n target={TargetEnum.NEW_WINDOW}\n rel=\"noopener noreferrer\"\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n sx={{\n maxWidth: MAX_WIDTH,\n textTransform: 'none',\n // As an <a>, a visited link would otherwise darken to primary.dark\n // (theme rule); keep the resting color consistent with the buttons.\n '&:visited': { color: 'primary.main' },\n }}\n >\n {labelEl}\n </GenericCardActionButton>\n ) : (\n <GenericCardActionButton\n variant=\"outlined\"\n aria-label={ariaLabel}\n disabled\n startIcon={<Icon sx={{ fontSize: '16px' }} />}\n sx={{ maxWidth: MAX_WIDTH, textTransform: 'none' }}\n >\n {labelEl}\n </GenericCardActionButton>\n )\n\n return caveat ? (\n <Tooltip title={caveat} arrow placement=\"top\">\n {/* span lets the tooltip work even when the control is disabled */}\n <span>{control}</span>\n </Tooltip>\n ) : (\n control\n )\n}\n\nexport default DatasetDownloadButton\n"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,IAAM,IAAQ;CACZ,UAAU;CACV,OAAO;CACP,UAAU;CACV,QAAQ;CACR,OAAO;CACP,aAAa;AACf;AA6BA,SAAS,EACP,GACA,GACQ;CAIR,OAHI,EAAO,MAAM,SAAS,cAAc,KAAK,CAAC,IACrC,EAAO,0BAA0B,EAAO,QAE1C,EAAe,EAAO,OAAO,CAAU,KAAK,EAAO;AAC5D;AAEA,IAAM,IAAY,SAYZ,IAAW;CATf,UAAU;CACV,cAAc;CACd,YAAY;CACZ,UAAU;CAQV,eAAe;CACf,OAAO;AACT;AAYA,SAAgB,EAAsB,GAAmC;CACvE,IAAM,EACJ,aACA,SACA,YACA,eACA,gBACA,aACA,oBACA,qBACE,GACE,EAAE,uBAAoB,EAAkB,GACxC,IAAS,EAAuB,EAAiB,CAAO,IAExD,IAAQ,EAAa,GAAQ,CAAU,GACvC,IAAS,EAAe,EAAO,SAAS,CAAU,GAClD,IAAO,EAAM,EAAO,OAEpB,CAAC,GAAc,KAAmB,EAAS,EAAK,GAEhD,IACJ,kBAAC,GAAD;EAAY,SAAQ;EAAa,IAAI;YAClC;CACS,CAAA,GAIR,IAAY,GAAG,EAAM,IAAI;CAG/B,IAAI,EAAO,gBAAgB,GAAU;EAInC,IAAI,CAAC,GAAiB;GACpB,IAAM,IAAa,IAAe,IAAgB,GAC5C,IAAc,IAAe,wBAAwB,GACrD,IACJ,kBAAC,GAAD;IACE,SAAQ;IACR,OAAO,IAAe,UAAU;IAChC,cAAY,GAAG,EAAY,IAAI;IAC/B,WAAW,IAAe,IAAoB,KAAA;IAC9C,WAAW,kBAAC,GAAD,EAAY,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;IAClD,UAAS,MAAS;KAChB,AAAK,MAKH,EAAM,gBAAgB,GACtB,EAAgB,EAAI;IAExB;IACA,IAAI;KAAE,UAAU;KAAW,eAAe;IAAO;cAEjD,kBAAC,GAAD;KAAY,SAAQ;KAAa,IAAI;eAClC;IACS,CAAA;GACW,CAAA;GAI3B,OAAO,CAAC,KAAgB,IACtB,kBAAC,GAAD;IAAS,OAAO;IAAQ,OAAA;IAAM,WAAU;cACtC,kBAAC,QAAD,EAAA,UAAO,EAAa,CAAA;GACb,CAAA,IAET;EAEJ;EAGA,IAAM,IACJ,kBAAC,GAAD;GACE,SAAQ;GACR,cAAY;GACZ,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;GAC5C,SAAS;GACT,UAAU,KAAY;GACtB,IAAI;IAAE,UAAU;IAAW,eAAe;GAAO;aAEhD;EACsB,CAAA;EAE3B,OAAO,IACL,kBAAC,GAAD;GAAS,OAAO;GAAQ,OAAA;GAAM,WAAU;aACtC,kBAAC,QAAD,EAAA,UAAO,EAAa,CAAA;EACb,CAAA,IAET;CAEJ;CAGA,IAAM,IACJ,EAAO,kBAAkB,IACvB,kBAAC,GAAD;EACE,SAAQ;EACR,cAAY;EACZ,MAAM;EACN,QAAQ,EAAW;EACnB,KAAI;EACJ,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;EAC5C,IAAI;GACF,UAAU;GACV,eAAe;GAGf,aAAa,EAAE,OAAO,eAAe;EACvC;YAEC;CACsB,CAAA,IAEzB,kBAAC,GAAD;EACE,SAAQ;EACR,cAAY;EACZ,UAAA;EACA,WAAW,kBAAC,GAAD,EAAM,IAAI,EAAE,UAAU,OAAO,EAAI,CAAA;EAC5C,IAAI;GAAE,UAAU;GAAW,eAAe;EAAO;YAEhD;CACsB,CAAA;CAG7B,OAAO,IACL,kBAAC,GAAD;EAAS,OAAO;EAAQ,OAAA;EAAM,WAAU;YAEtC,kBAAC,QAAD,EAAA,UAAO,EAAc,CAAA;CACd,CAAA,IAET;AAEJ"}
|
|
@@ -63,6 +63,12 @@ export type DatasetHostingConfig = {
|
|
|
63
63
|
label: string;
|
|
64
64
|
/** Fallback label when the template needs a repository but none was provided. */
|
|
65
65
|
labelWithoutRepository?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Short, scannable label shown as a chip adornment next to the dataset title,
|
|
68
|
+
* summarizing WHERE the data lives (independent of any repository name). Not
|
|
69
|
+
* templated — never mentions a specific repository.
|
|
70
|
+
*/
|
|
71
|
+
chipLabel: string;
|
|
66
72
|
/** Tooltip summarizing the hosting/download caveat. `{repository}` is substituted. */
|
|
67
73
|
tooltip?: string;
|
|
68
74
|
/** MUI Chip color used for the button. `default` = neutral/non-actionable. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetHosting.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/DatasetHosting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB;AAC5B,gGAAgG;AAC9F,SAAS;AACX;;;;GAIG;GACD,gBAAgB;AAClB;;;;GAIG;GACD,mBAAmB;AACrB;;;;GAIG;GACD,iBAAiB;AACnB;;;;;GAKG;GACD,OAAO;AACT;;;;;GAKG;GACD,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;IACjC,6EAA6E;IAC7E,YAAY,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,iFAAiF;IACjF,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8EAA8E;IAC9E,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IACxC;;;;;;;;OAQG;IACH,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,kBAAkB,EAClB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"DatasetHosting.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/DatasetHosting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB;AAC5B,gGAAgG;AAC9F,SAAS;AACX;;;;GAIG;GACD,gBAAgB;AAClB;;;;GAIG;GACD,mBAAmB;AACrB;;;;GAIG;GACD,iBAAiB;AACnB;;;;;GAKG;GACD,OAAO;AACT;;;;;GAKG;GACD,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;IACjC,6EAA6E;IAC7E,YAAY,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,iFAAiF;IACjF,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8EAA8E;IAC9E,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IACxC;;;;;;;;OAQG;IACH,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,kBAAkB,EAClB,oBAAoB,CA0DrB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,kBAAkB,CAM1E;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -3,12 +3,14 @@ var e = {
|
|
|
3
3
|
synapse: {
|
|
4
4
|
downloadable: !0,
|
|
5
5
|
label: "Download",
|
|
6
|
+
chipLabel: "Synapse Hosted",
|
|
6
7
|
color: "primary",
|
|
7
8
|
icon: "download"
|
|
8
9
|
},
|
|
9
10
|
"external-cloud": {
|
|
10
11
|
downloadable: !0,
|
|
11
12
|
label: "Download",
|
|
13
|
+
chipLabel: "External Cloud",
|
|
12
14
|
color: "primary",
|
|
13
15
|
icon: "cloud",
|
|
14
16
|
tooltip: "Files are stored in a cloud bucket maintained by a third party. They can be downloaded through Synapse, but the bucket owner could remove them in the future."
|
|
@@ -17,6 +19,7 @@ var e = {
|
|
|
17
19
|
downloadable: !0,
|
|
18
20
|
label: "Download from {repository}",
|
|
19
21
|
labelWithoutRepository: "Download from external repository",
|
|
22
|
+
chipLabel: "Synapse Indexed",
|
|
20
23
|
color: "primary",
|
|
21
24
|
icon: "external",
|
|
22
25
|
tooltip: "Files are downloaded from an external repository ({repository}). Downloads route through that repository, so they may be slower or occasionally unavailable."
|
|
@@ -26,6 +29,7 @@ var e = {
|
|
|
26
29
|
isExternalLink: !0,
|
|
27
30
|
label: "Access at {repository}",
|
|
28
31
|
labelWithoutRepository: "Access externally",
|
|
32
|
+
chipLabel: "Externally Hosted",
|
|
29
33
|
color: "warning",
|
|
30
34
|
icon: "launch",
|
|
31
35
|
tooltip: "These data are not downloadable through Synapse. Access is managed by {repository} and may require a separate application or process."
|
|
@@ -33,6 +37,7 @@ var e = {
|
|
|
33
37
|
mixed: {
|
|
34
38
|
downloadable: !0,
|
|
35
39
|
label: "Download available files",
|
|
40
|
+
chipLabel: "Mixed Hosting",
|
|
36
41
|
color: "primary",
|
|
37
42
|
icon: "mixed",
|
|
38
43
|
tooltip: "Files in this dataset live in more than one location. Some can be downloaded through Synapse; others are hosted externally and must be obtained separately from {repository}."
|
|
@@ -40,6 +45,7 @@ var e = {
|
|
|
40
45
|
unavailable: {
|
|
41
46
|
downloadable: !1,
|
|
42
47
|
label: "Not available for download",
|
|
48
|
+
chipLabel: "Not Available",
|
|
43
49
|
color: "default",
|
|
44
50
|
icon: "unavailable",
|
|
45
51
|
tooltip: "This dataset is indexed for discovery, but its data is not available for download through Synapse."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetHosting.js","names":[],"sources":["../../../src/components/DatasetHosting/DatasetHosting.ts"],"sourcesContent":["/**\n * Classifies a dataset by where its files are hosted and whether they can be\n * downloaded through Synapse clients. Portals supply this value from a dataset\n * annotation column (e.g. `hostingType`) since dataset cards are query/annotation\n * driven and do not have access to the underlying file handles.\n *\n * The four values map onto two orthogonal realities:\n * - WHERE the files live (Synapse-managed storage vs. a third-party location)\n * - WHETHER Synapse clients can download them (yes vs. access is handled elsewhere)\n *\n * They are collapsed into a single enum so a card can show one predictable,\n * scannable signal.\n */\nexport type DatasetHostingType =\n /** Files are in Synapse/Sage-managed storage (S3/GCP). Standard, fast download. The default. */\n | 'synapse'\n /**\n * Files are in a cloud bucket owned by a third party (non-Sage S3/GCP, external\n * object store). Downloadable identically to Synapse-hosted files, but the bucket\n * owner could remove them.\n */\n | 'external-cloud'\n /**\n * Dataset links to files in an external repository (e.g. GEO, ENA) that are\n * directly downloadable through Synapse clients, but served from an external\n * server — so downloads may be slow or links could become dead over time.\n */\n | 'external-download'\n /**\n * Dataset links to data that is NOT downloadable through Synapse (e.g. dbGaP,\n * EGA). Records are placeholders for data held behind an external access\n * process. No download is offered; the user is sent to the external repository.\n */\n | 'external-access'\n /**\n * Files in the dataset span more than one location — some are downloadable\n * through Synapse and some are hosted/controlled externally. Download is still\n * offered (it retrieves the Synapse-available subset), but the label and tooltip\n * flag that the rest must be obtained separately.\n */\n | 'mixed'\n /**\n * The dataset is a record/placeholder whose data is not downloadable through\n * Synapse, and there is no external repository to send the user to either\n * (unlike `external-access`). No download or link action is offered — the card\n * just signals that the data isn't available for download.\n */\n | 'unavailable'\n\nexport type DatasetHostingConfig = {\n /** Whether the dataset's files can be downloaded through Synapse clients. */\n downloadable: boolean\n /**\n * If true (and not downloadable), the primary action links out to an external\n * repository (uses externalUrl). If false/absent and not downloadable, the card\n * shows a non-actionable \"not available\" chip instead of a link.\n */\n isExternalLink?: boolean\n /**\n * Label shown on the chip-style action button. `{repository}` is substituted\n * with the repository name when provided; if the template references\n * `{repository}` but none is given, `labelWithoutRepository` is used instead.\n */\n label: string\n /** Fallback label when the template needs a repository but none was provided. */\n labelWithoutRepository?: string\n /** Tooltip summarizing the hosting/download caveat. `{repository}` is substituted. */\n tooltip?: string\n /** MUI Chip color used for the button. `default` = neutral/non-actionable. */\n color: 'primary' | 'warning' | 'default'\n /**\n * Icon shown on the button, encoding where the data lives relative to Synapse:\n * - `download`: native, stored in Synapse\n * - `cloud`: third-party managed cloud bucket\n * - `external`: hosted outside Synapse but still downloadable\n * - `launch`: not downloadable here — the user leaves Synapse to access it\n * - `mixed`: files live in more than one location\n * - `unavailable`: not available for download, with no external destination\n */\n icon: 'download' | 'cloud' | 'external' | 'launch' | 'mixed' | 'unavailable'\n}\n\nexport const DATASET_HOSTING_CONFIG: Record<\n DatasetHostingType,\n DatasetHostingConfig\n> = {\n synapse: {\n downloadable: true,\n label: 'Download',\n color: 'primary',\n icon: 'download',\n // No caveat — the default, expected experience.\n },\n 'external-cloud': {\n downloadable: true,\n label: 'Download',\n color: 'primary',\n icon: 'cloud',\n tooltip:\n 'Files are stored in a cloud bucket maintained by a third party. They can be downloaded through Synapse, but the bucket owner could remove them in the future.',\n },\n 'external-download': {\n downloadable: true,\n label: 'Download from {repository}',\n labelWithoutRepository: 'Download from external repository',\n color: 'primary',\n icon: 'external',\n tooltip:\n 'Files are downloaded from an external repository ({repository}). Downloads route through that repository, so they may be slower or occasionally unavailable.',\n },\n 'external-access': {\n downloadable: false,\n isExternalLink: true,\n label: 'Access at {repository}',\n labelWithoutRepository: 'Access externally',\n color: 'warning',\n icon: 'launch',\n tooltip:\n 'These data are not downloadable through Synapse. Access is managed by {repository} and may require a separate application or process.',\n },\n mixed: {\n downloadable: true,\n label: 'Download available files',\n color: 'primary',\n icon: 'mixed',\n tooltip:\n 'Files in this dataset live in more than one location. Some can be downloaded through Synapse; others are hosted externally and must be obtained separately from {repository}.',\n },\n unavailable: {\n downloadable: false,\n label: 'Not available for download',\n color: 'default',\n icon: 'unavailable',\n tooltip:\n 'This dataset is indexed for discovery, but its data is not available for download through Synapse.',\n },\n}\n\n/**\n * Coerces a raw annotation value (which is frequently blank, null, or absent for\n * Synapse-hosted/legacy datasets, and could be an unrecognized string) into a\n * valid hosting type. Anything not explicitly recognized falls back to\n * `synapse` — the safe default, which shows a standard Download button and no badge.\n */\nexport function normalizeHosting(value?: string | null): DatasetHostingType {\n const trimmed = value?.trim()\n if (trimmed && trimmed in DATASET_HOSTING_CONFIG) {\n return trimmed as DatasetHostingType\n }\n return 'synapse'\n}\n\n/** Substitutes the `{repository}` token, falling back to a generic phrase. */\nexport function fillRepository(\n template: string | undefined,\n repository?: string,\n): string | undefined {\n if (!template) {\n return template\n }\n return template.replaceAll(\n '{repository}',\n repository ?? 'the external repository',\n )\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"DatasetHosting.js","names":[],"sources":["../../../src/components/DatasetHosting/DatasetHosting.ts"],"sourcesContent":["/**\n * Classifies a dataset by where its files are hosted and whether they can be\n * downloaded through Synapse clients. Portals supply this value from a dataset\n * annotation column (e.g. `hostingType`) since dataset cards are query/annotation\n * driven and do not have access to the underlying file handles.\n *\n * The four values map onto two orthogonal realities:\n * - WHERE the files live (Synapse-managed storage vs. a third-party location)\n * - WHETHER Synapse clients can download them (yes vs. access is handled elsewhere)\n *\n * They are collapsed into a single enum so a card can show one predictable,\n * scannable signal.\n */\nexport type DatasetHostingType =\n /** Files are in Synapse/Sage-managed storage (S3/GCP). Standard, fast download. The default. */\n | 'synapse'\n /**\n * Files are in a cloud bucket owned by a third party (non-Sage S3/GCP, external\n * object store). Downloadable identically to Synapse-hosted files, but the bucket\n * owner could remove them.\n */\n | 'external-cloud'\n /**\n * Dataset links to files in an external repository (e.g. GEO, ENA) that are\n * directly downloadable through Synapse clients, but served from an external\n * server — so downloads may be slow or links could become dead over time.\n */\n | 'external-download'\n /**\n * Dataset links to data that is NOT downloadable through Synapse (e.g. dbGaP,\n * EGA). Records are placeholders for data held behind an external access\n * process. No download is offered; the user is sent to the external repository.\n */\n | 'external-access'\n /**\n * Files in the dataset span more than one location — some are downloadable\n * through Synapse and some are hosted/controlled externally. Download is still\n * offered (it retrieves the Synapse-available subset), but the label and tooltip\n * flag that the rest must be obtained separately.\n */\n | 'mixed'\n /**\n * The dataset is a record/placeholder whose data is not downloadable through\n * Synapse, and there is no external repository to send the user to either\n * (unlike `external-access`). No download or link action is offered — the card\n * just signals that the data isn't available for download.\n */\n | 'unavailable'\n\nexport type DatasetHostingConfig = {\n /** Whether the dataset's files can be downloaded through Synapse clients. */\n downloadable: boolean\n /**\n * If true (and not downloadable), the primary action links out to an external\n * repository (uses externalUrl). If false/absent and not downloadable, the card\n * shows a non-actionable \"not available\" chip instead of a link.\n */\n isExternalLink?: boolean\n /**\n * Label shown on the chip-style action button. `{repository}` is substituted\n * with the repository name when provided; if the template references\n * `{repository}` but none is given, `labelWithoutRepository` is used instead.\n */\n label: string\n /** Fallback label when the template needs a repository but none was provided. */\n labelWithoutRepository?: string\n /**\n * Short, scannable label shown as a chip adornment next to the dataset title,\n * summarizing WHERE the data lives (independent of any repository name). Not\n * templated — never mentions a specific repository.\n */\n chipLabel: string\n /** Tooltip summarizing the hosting/download caveat. `{repository}` is substituted. */\n tooltip?: string\n /** MUI Chip color used for the button. `default` = neutral/non-actionable. */\n color: 'primary' | 'warning' | 'default'\n /**\n * Icon shown on the button, encoding where the data lives relative to Synapse:\n * - `download`: native, stored in Synapse\n * - `cloud`: third-party managed cloud bucket\n * - `external`: hosted outside Synapse but still downloadable\n * - `launch`: not downloadable here — the user leaves Synapse to access it\n * - `mixed`: files live in more than one location\n * - `unavailable`: not available for download, with no external destination\n */\n icon: 'download' | 'cloud' | 'external' | 'launch' | 'mixed' | 'unavailable'\n}\n\nexport const DATASET_HOSTING_CONFIG: Record<\n DatasetHostingType,\n DatasetHostingConfig\n> = {\n synapse: {\n downloadable: true,\n label: 'Download',\n chipLabel: 'Synapse Hosted',\n color: 'primary',\n icon: 'download',\n // No caveat — the default, expected experience.\n },\n 'external-cloud': {\n downloadable: true,\n label: 'Download',\n chipLabel: 'External Cloud',\n color: 'primary',\n icon: 'cloud',\n tooltip:\n 'Files are stored in a cloud bucket maintained by a third party. They can be downloaded through Synapse, but the bucket owner could remove them in the future.',\n },\n 'external-download': {\n downloadable: true,\n label: 'Download from {repository}',\n labelWithoutRepository: 'Download from external repository',\n chipLabel: 'Synapse Indexed',\n color: 'primary',\n icon: 'external',\n tooltip:\n 'Files are downloaded from an external repository ({repository}). Downloads route through that repository, so they may be slower or occasionally unavailable.',\n },\n 'external-access': {\n downloadable: false,\n isExternalLink: true,\n label: 'Access at {repository}',\n labelWithoutRepository: 'Access externally',\n chipLabel: 'Externally Hosted',\n color: 'warning',\n icon: 'launch',\n tooltip:\n 'These data are not downloadable through Synapse. Access is managed by {repository} and may require a separate application or process.',\n },\n mixed: {\n downloadable: true,\n label: 'Download available files',\n chipLabel: 'Mixed Hosting',\n color: 'primary',\n icon: 'mixed',\n tooltip:\n 'Files in this dataset live in more than one location. Some can be downloaded through Synapse; others are hosted externally and must be obtained separately from {repository}.',\n },\n unavailable: {\n downloadable: false,\n label: 'Not available for download',\n chipLabel: 'Not Available',\n color: 'default',\n icon: 'unavailable',\n tooltip:\n 'This dataset is indexed for discovery, but its data is not available for download through Synapse.',\n },\n}\n\n/**\n * Coerces a raw annotation value (which is frequently blank, null, or absent for\n * Synapse-hosted/legacy datasets, and could be an unrecognized string) into a\n * valid hosting type. Anything not explicitly recognized falls back to\n * `synapse` — the safe default, which shows a standard Download button and no badge.\n */\nexport function normalizeHosting(value?: string | null): DatasetHostingType {\n const trimmed = value?.trim()\n if (trimmed && trimmed in DATASET_HOSTING_CONFIG) {\n return trimmed as DatasetHostingType\n }\n return 'synapse'\n}\n\n/** Substitutes the `{repository}` token, falling back to a generic phrase. */\nexport function fillRepository(\n template: string | undefined,\n repository?: string,\n): string | undefined {\n if (!template) {\n return template\n }\n return template.replaceAll(\n '{repository}',\n repository ?? 'the external repository',\n )\n}\n"],"mappings":";AAwFA,IAAa,IAGT;CACF,SAAS;EACP,cAAc;EACd,OAAO;EACP,WAAW;EACX,OAAO;EACP,MAAM;CAER;CACA,kBAAkB;EAChB,cAAc;EACd,OAAO;EACP,WAAW;EACX,OAAO;EACP,MAAM;EACN,SACE;CACJ;CACA,qBAAqB;EACnB,cAAc;EACd,OAAO;EACP,wBAAwB;EACxB,WAAW;EACX,OAAO;EACP,MAAM;EACN,SACE;CACJ;CACA,mBAAmB;EACjB,cAAc;EACd,gBAAgB;EAChB,OAAO;EACP,wBAAwB;EACxB,WAAW;EACX,OAAO;EACP,MAAM;EACN,SACE;CACJ;CACA,OAAO;EACL,cAAc;EACd,OAAO;EACP,WAAW;EACX,OAAO;EACP,MAAM;EACN,SACE;CACJ;CACA,aAAa;EACX,cAAc;EACd,OAAO;EACP,WAAW;EACX,OAAO;EACP,MAAM;EACN,SACE;CACJ;AACF;AAQA,SAAgB,EAAiB,GAA2C;CAC1E,IAAM,IAAU,GAAO,KAAK;CAI5B,OAHI,KAAW,KAAW,IACjB,IAEF;AACT;AAGA,SAAgB,EACd,GACA,GACoB;CAIpB,OAHK,KAGE,EAAS,WACd,gBACA,KAAc,yBAChB;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DatasetHostingType } from './DatasetHosting';
|
|
2
|
+
export type DatasetHostingAdornmentProps = {
|
|
3
|
+
hostingType: DatasetHostingType;
|
|
4
|
+
/** Use the header variant (outlined + white) for dark header backgrounds. */
|
|
5
|
+
isHeader?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Small scannable chip that summarizes where a dataset's files live
|
|
9
|
+
* (e.g. "Synapse Hosted", "Externally Hosted"). Rendered next to the dataset
|
|
10
|
+
* type on cards and detail-page headers, complementing the hosting-aware action
|
|
11
|
+
* button, which is a CTA rather than a scan target.
|
|
12
|
+
*/
|
|
13
|
+
export declare function DatasetHostingAdornment(props: DatasetHostingAdornmentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default DatasetHostingAdornment;
|
|
15
|
+
//# sourceMappingURL=DatasetHostingAdornment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatasetHostingAdornment.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/DatasetHostingAdornment.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE7E,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,2CAc1E;AAED,eAAe,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DATASET_HOSTING_CONFIG as e } from "./DatasetHosting.js";
|
|
2
|
+
import { Chip as t } from "@mui/material";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/DatasetHosting/DatasetHostingAdornment.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { hostingType: i, isHeader: a = !1 } = r, o = e[i].chipLabel;
|
|
7
|
+
return a ? /* @__PURE__ */ n(t, {
|
|
8
|
+
label: o,
|
|
9
|
+
size: "small",
|
|
10
|
+
variant: "outlined",
|
|
11
|
+
sx: {
|
|
12
|
+
color: "white",
|
|
13
|
+
borderColor: "white"
|
|
14
|
+
}
|
|
15
|
+
}) : /* @__PURE__ */ n(t, {
|
|
16
|
+
label: o,
|
|
17
|
+
size: "small"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as DatasetHostingAdornment, r as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=DatasetHostingAdornment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatasetHostingAdornment.js","names":[],"sources":["../../../src/components/DatasetHosting/DatasetHostingAdornment.tsx"],"sourcesContent":["import { Chip } from '@mui/material'\nimport { DATASET_HOSTING_CONFIG, DatasetHostingType } from './DatasetHosting'\n\nexport type DatasetHostingAdornmentProps = {\n hostingType: DatasetHostingType\n /** Use the header variant (outlined + white) for dark header backgrounds. */\n isHeader?: boolean\n}\n\n/**\n * Small scannable chip that summarizes where a dataset's files live\n * (e.g. \"Synapse Hosted\", \"Externally Hosted\"). Rendered next to the dataset\n * type on cards and detail-page headers, complementing the hosting-aware action\n * button, which is a CTA rather than a scan target.\n */\nexport function DatasetHostingAdornment(props: DatasetHostingAdornmentProps) {\n const { hostingType, isHeader = false } = props\n const label = DATASET_HOSTING_CONFIG[hostingType].chipLabel\n if (isHeader) {\n return (\n <Chip\n label={label}\n size=\"small\"\n variant=\"outlined\"\n sx={{ color: 'white', borderColor: 'white' }}\n />\n )\n }\n return <Chip label={label} size=\"small\" />\n}\n\nexport default DatasetHostingAdornment\n"],"mappings":";;;;AAeA,SAAgB,EAAwB,GAAqC;CAC3E,IAAM,EAAE,gBAAa,cAAW,OAAU,GACpC,IAAQ,EAAuB,GAAa;CAWlD,OAVI,IAEA,kBAAC,GAAD;EACS;EACP,MAAK;EACL,SAAQ;EACR,IAAI;GAAE,OAAO;GAAS,aAAa;EAAQ;CAC5C,CAAA,IAGE,kBAAC,GAAD;EAAa;EAAO,MAAK;CAAS,CAAA;AAC3C"}
|
|
@@ -2,4 +2,6 @@ export { DATASET_HOSTING_CONFIG, fillRepository, normalizeHosting, } from './Dat
|
|
|
2
2
|
export type { DatasetHostingType, DatasetHostingConfig } from './DatasetHosting';
|
|
3
3
|
export { DatasetDownloadButton, default as DatasetDownloadButtonDefault, } from './DatasetDownloadButton';
|
|
4
4
|
export type { DatasetDownloadButtonProps } from './DatasetDownloadButton';
|
|
5
|
+
export { DatasetHostingAdornment, default as DatasetHostingAdornmentDefault, } from './DatasetHostingAdornment';
|
|
6
|
+
export type { DatasetHostingAdornmentProps } from './DatasetHostingAdornment';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,OAAO,IAAI,4BAA4B,GACxC,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatasetHosting/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,OAAO,IAAI,4BAA4B,GACxC,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EACL,uBAAuB,EACvB,OAAO,IAAI,8BAA8B,GAC1C,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DATASET_HOSTING_CONFIG as e, fillRepository as t, normalizeHosting as n } from "./DatasetHosting.js";
|
|
2
2
|
import { DatasetDownloadButton as r } from "./DatasetDownloadButton.js";
|
|
3
|
-
|
|
3
|
+
import { DatasetHostingAdornment as i } from "./DatasetHostingAdornment.js";
|
|
4
|
+
export { e as DATASET_HOSTING_CONFIG, r as DatasetDownloadButton, r as DatasetDownloadButtonDefault, i as DatasetHostingAdornment, i as DatasetHostingAdornmentDefault, t as fillRepository, n as normalizeHosting };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadCartPage.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/DownloadCartPage.tsx"],"names":[],"mappings":"AAkCA;;GAEG;AACH,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DownloadCartPage.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/DownloadCartPage.tsx"],"names":[],"mappings":"AAkCA;;GAEG;AACH,wBAAgB,gBAAgB,4CAse/B;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -47,7 +47,7 @@ function O() {
|
|
|
47
47
|
}, [W, G]);
|
|
48
48
|
let q = (e, t) => t === void 0 ? e.numberOfFilesAvailableForDownload : t === "eligibleForPackaging" ? e.numberOfFilesAvailableForDownloadAndEligibleForPackaging : e.numberOfFilesAvailableForDownload - e.numberOfFilesAvailableForDownloadAndEligibleForPackaging;
|
|
49
49
|
if (h(() => {
|
|
50
|
-
H
|
|
50
|
+
H?.numberOfFilesRequiringAction == 0 && k(1), H?.numberOfFilesAvailableForDownloadAndEligibleForPackaging === 0 && P(!1);
|
|
51
51
|
}, [H]), B) return /* @__PURE__ */ S(r, { error: B });
|
|
52
52
|
let J = async () => {
|
|
53
53
|
await n.clearDownloadListV2(l), K();
|