synapse-react-client 4.0.44 → 4.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.d.ts +1 -1
- package/dist/SWC.index.js +2 -2
- package/dist/SWC.index.js.map +1 -1
- package/dist/aridhia-queries/AridhiaKeyFactory.d.ts +1 -0
- package/dist/aridhia-queries/AridhiaKeyFactory.d.ts.map +1 -1
- package/dist/aridhia-queries/AridhiaKeyFactory.js +3 -0
- package/dist/aridhia-queries/AridhiaKeyFactory.js.map +1 -1
- package/dist/aridhia-queries/aridhiaTokenExchange.js +6 -6
- package/dist/aridhia-queries/index.d.ts +1 -0
- package/dist/aridhia-queries/index.d.ts.map +1 -1
- package/dist/aridhia-queries/index.js +11 -10
- package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.d.ts +19 -0
- package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.js +14 -0
- package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.js.map +1 -0
- package/dist/components/AccessRequirementList/AccessApprovalCheckMark.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js +6 -4
- package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +2 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js +126 -125
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +28 -16
- 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 +99 -97
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +11 -8
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/RequestDataStep.d.ts +1 -4
- package/dist/components/AccessRequirementList/RequestDataStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/RequestDataStep.js +15 -18
- package/dist/components/AccessRequirementList/RequestDataStep.js.map +1 -1
- package/dist/components/AccessTokenPage/AccessTokenPage.js +1 -1
- package/dist/components/AccessTokenPage/AccessTokenPage.js.map +1 -1
- package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js +1 -1
- package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js +17 -13
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts +3 -3
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +33 -34
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -1
- package/dist/components/Aridhia/fairFormToRjsf.js +1 -1
- package/dist/components/Aridhia/fairFormToRjsf.js.map +1 -1
- package/dist/components/Authentication/LastLoginInfo.js +1 -1
- package/dist/components/Authentication/LastLoginInfo.js.map +1 -1
- package/dist/components/CertificationQuiz/CertificationQuiz.js +1 -1
- package/dist/components/CertificationQuiz/CertificationQuiz.js.map +1 -1
- package/dist/components/ChallengeSubmission/AvailableEvaluationQueueList.js +1 -1
- package/dist/components/ChallengeSubmission/AvailableEvaluationQueueList.js.map +1 -1
- package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js +1 -1
- package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js.map +1 -1
- package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js +6 -6
- package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.js +4 -4
- package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/SelectChallengeTeam.js +4 -4
- package/dist/components/CitationPopover/CitationPopoverContent.js +4 -4
- package/dist/components/CitationPopover/CitationPopoverContent.js.map +1 -1
- package/dist/components/ComponentCollapse.d.ts.map +1 -1
- package/dist/components/ComponentCollapse.js +2 -1
- package/dist/components/ComponentCollapse.js.map +1 -1
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.d.ts.map +1 -1
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js +52 -49
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +231 -219
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts.map +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.js +5 -4
- package/dist/components/DataGrid/SyncGridWithSourceButton.js.map +1 -1
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +7 -5
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
- package/dist/components/DataGrid/components/ExportCsvFromGridButton.js +4 -4
- package/dist/components/DataGrid/components/ExportCsvFromGridButton.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsButton.js +4 -4
- package/dist/components/DataGrid/components/ReorderColumnsButton.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +12 -8
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
- package/dist/components/DataGrid/components/UploadCsvToGridButton.js +1 -1
- package/dist/components/DataGrid/components/UploadCsvToGridButton.js.map +1 -1
- package/dist/components/DataGrid/hooks/useGridUndoRedo.js +5 -5
- package/dist/components/DataGrid/utils/applyModelChange.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/applyModelChange.js +14 -14
- package/dist/components/DataGrid/utils/applyModelChange.js.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DataGrid/utils/splitPatch.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/splitPatch.js +22 -13
- package/dist/components/DataGrid/utils/splitPatch.js.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +2 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.scss +1 -3
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js +16 -10
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
- package/dist/components/EntityDownloadButton/EntityDownloadButton.js +1 -1
- package/dist/components/EntityDownloadButton/EntityDownloadButton.js.map +1 -1
- package/dist/components/EntityFinder/EntityFinder.js +4 -4
- package/dist/components/EntityFinder/EntityIdTextField.js +1 -1
- package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.d.ts.map +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.js +5 -4
- package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
- package/dist/components/EntityHeaderTable/EntityHeaderTable.js +1 -1
- package/dist/components/EntityHeaderTable/EntityHeaderTable.js.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.js +2 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.js.map +1 -1
- package/dist/components/EntityUpload/FileUploadProgress.d.ts.map +1 -1
- package/dist/components/EntityUpload/FileUploadProgress.js +11 -7
- package/dist/components/EntityUpload/FileUploadProgress.js.map +1 -1
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.d.ts.map +1 -1
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.js +4 -3
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.js.map +1 -1
- package/dist/components/ExperimentalMode/ExperimentalMode.js +1 -1
- package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
- package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js +1 -1
- package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js.map +1 -1
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js +2 -1
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js.map +1 -1
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +2 -1
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -1
- package/dist/components/FormTemplateEditor/FieldLibrary.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/FieldLibrary.js +2 -1
- package/dist/components/FormTemplateEditor/FieldLibrary.js.map +1 -1
- package/dist/components/FormTemplateEditor/FieldLibraryRow.js +4 -4
- package/dist/components/FormTemplateEditor/FieldLibraryRow.js.map +1 -1
- package/dist/components/FormTemplateEditor/FormStructurePanel.js +1 -1
- package/dist/components/FormTemplateEditor/FormStructurePanel.js.map +1 -1
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js +1 -1
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js.map +1 -1
- package/dist/components/FormTemplateEditor/StepCard.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/StepCard.js +15 -10
- package/dist/components/FormTemplateEditor/StepCard.js.map +1 -1
- package/dist/components/FormTemplateEditor/StepFieldRow.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/StepFieldRow.js +11 -6
- package/dist/components/FormTemplateEditor/StepFieldRow.js.map +1 -1
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.js +2 -1
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.js.map +1 -1
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -1
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.d.ts +9 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.d.ts.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.js +45 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.js.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.d.ts +22 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.d.ts.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.js +139 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.js.map +1 -0
- package/dist/components/Forum/ForumTable.d.ts +17 -5
- package/dist/components/Forum/ForumTable.d.ts.map +1 -1
- package/dist/components/Forum/ForumTable.js +94 -77
- package/dist/components/Forum/ForumTable.js.map +1 -1
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +45 -45
- package/dist/components/GenericCard/PortalDOI/PortalDOI.js +5 -5
- package/dist/components/GenericCard/PortalDOI/PortalDOI.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/HelpPopover/HelpPopover.js +1 -1
- package/dist/components/HelpPopover/HelpPopover.js.map +1 -1
- package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
- package/dist/components/IconSvg/IconSvg.js +154 -47
- package/dist/components/IconSvg/IconSvg.js.map +1 -1
- package/dist/components/JsonSchemaForm/templates/ButtonTemplate.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/ButtonTemplate.js +19 -16
- package/dist/components/JsonSchemaForm/templates/ButtonTemplate.js.map +1 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js +2 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
- package/dist/components/JsonSchemaForm/widgets/PhoneWidget.d.ts +9 -0
- package/dist/components/JsonSchemaForm/widgets/PhoneWidget.d.ts.map +1 -0
- package/dist/components/JsonSchemaForm/widgets/PhoneWidget.js +21 -0
- package/dist/components/JsonSchemaForm/widgets/PhoneWidget.js.map +1 -0
- package/dist/components/Markdown/MarkdownCollapse.d.ts.map +1 -1
- package/dist/components/Markdown/MarkdownCollapse.js +3 -1
- package/dist/components/Markdown/MarkdownCollapse.js.map +1 -1
- package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js +1 -1
- package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js.map +1 -1
- package/dist/components/OAuthClientManagement/OAuthManagement.js +14 -13
- package/dist/components/OAuthClientManagement/OAuthManagement.js.map +1 -1
- package/dist/components/PortalList/PortalCard.d.ts.map +1 -1
- package/dist/components/PortalList/PortalCard.js +6 -5
- package/dist/components/PortalList/PortalCard.js.map +1 -1
- package/dist/components/PortalList/PortalList.js +4 -4
- package/dist/components/PortalList/PortalList.js.map +1 -1
- package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js +6 -6
- package/dist/components/QueryBuilder/FilterConditionRow.js +4 -4
- package/dist/components/QueryCountButton/QueryCountButton.js +5 -5
- package/dist/components/QueryCountButton/QueryCountButton.js.map +1 -1
- package/dist/components/ReleaseCard/ReleaseCardLarge.js +5 -5
- package/dist/components/ReleaseCard/ReleaseCardLarge.js.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js +142 -108
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.d.ts.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.js +15 -15
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.js.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +57 -55
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/ShareThisPage/ShareThisPage.js +4 -4
- package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
- package/dist/components/SustainabilityScorecard/DialLayout.js +1 -1
- package/dist/components/SustainabilityScorecard/DialLayout.js.map +1 -1
- package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js +1 -1
- package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +1 -1
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js +2 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
- package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js +1 -1
- package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js.map +1 -1
- package/dist/components/SynapseFooter/SynapseFooter.js +1 -1
- package/dist/components/SynapseFooter/SynapseFooter.js.map +1 -1
- package/dist/components/SynapseHomepageV2/SynapseFeaturedDatasetItem.js +1 -1
- package/dist/components/SynapseHomepageV2/SynapseFeaturedDatasetItem.js.map +1 -1
- package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.js +2 -1
- package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.js.map +1 -1
- package/dist/components/SynapseHomepageV2/SynapseInActionItem.js +4 -4
- package/dist/components/SynapseHomepageV2/SynapseInActionItem.js.map +1 -1
- package/dist/components/SynapseHomepageV2/SynapseTrendingProjectsItem.js +1 -1
- package/dist/components/SynapseHomepageV2/SynapseTrendingProjectsItem.js.map +1 -1
- package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts.map +1 -1
- package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js +4 -1
- package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js.map +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js.map +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.d.ts.map +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js +12 -9
- package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js.map +1 -1
- package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +4 -4
- package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
- package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js +140 -140
- package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js +1 -1
- package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js +1 -1
- package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js +9 -9
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.d.ts.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.js +6 -4
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.js.map +1 -1
- package/dist/components/TanStackTable/ColumnHeader.js +1 -1
- package/dist/components/TanStackTable/ColumnHeader.js.map +1 -1
- package/dist/components/TeamSubjectsSelector/TeamBadgeOrError.js +1 -1
- package/dist/components/TeamSubjectsSelector/TeamBadgeOrError.js.map +1 -1
- package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.d.ts.map +1 -1
- package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js +4 -3
- package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js.map +1 -1
- package/dist/components/Webhook/WebhookDashboard.js +1 -1
- package/dist/components/Webhook/WebhookDashboard.js.map +1 -1
- package/dist/components/dataaccess/AccessRequirementDashboard.js +4 -4
- package/dist/components/dataaccess/AccessRequirementDashboard.js.map +1 -1
- package/dist/components/dataaccess/AccessRequirementTable.js +1 -1
- package/dist/components/dataaccess/AccessRequirementTable.js.map +1 -1
- package/dist/components/dataaccess/EDucTemplateTable.d.ts.map +1 -1
- package/dist/components/dataaccess/EDucTemplateTable.js +13 -11
- package/dist/components/dataaccess/EDucTemplateTable.js.map +1 -1
- package/dist/components/dataaccess/FormTemplateTable.js +6 -6
- package/dist/components/dataaccess/FormTemplateTable.js.map +1 -1
- package/dist/components/dataaccess/ReviewerDashboard.js +17 -17
- package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
- package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js +4 -4
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +4 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
- package/dist/components/download_list/DownloadDetails.d.ts.map +1 -1
- package/dist/components/download_list/DownloadDetails.js +12 -10
- package/dist/components/download_list/DownloadDetails.js.map +1 -1
- package/dist/components/entity/metadata/AnnotationsTable.js +1 -1
- package/dist/components/entity/metadata/AnnotationsTable.js.map +1 -1
- package/dist/components/entity/page/CreatedByModifiedBy.js +1 -1
- package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +1 -1
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
- package/dist/components/error/ErrorChip.d.ts.map +1 -1
- package/dist/components/error/ErrorChip.js +2 -1
- package/dist/components/error/ErrorChip.js.map +1 -1
- package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.js +14 -14
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.js +4 -4
- package/dist/components/table/CsvPreview/CsvPreviewWithOptions.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/features/curator/dashboard/components/NextStepButton.d.ts.map +1 -1
- package/dist/features/curator/dashboard/components/NextStepButton.js +7 -6
- package/dist/features/curator/dashboard/components/NextStepButton.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +8 -8
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +4 -4
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +4 -4
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/CurateTaskForm.js +4 -4
- package/dist/features/entity/metadata-task/create-task/CurateTaskForm.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/TaskCategoryCard.js +1 -1
- package/dist/features/entity/metadata-task/create-task/TaskCategoryCard.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/TaskFormHeader.js +1 -1
- package/dist/features/entity/metadata-task/create-task/TaskFormHeader.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/curationTaskFlowRoutes.js +10 -10
- package/dist/features/entity/metadata-task/create-task/curationTaskFlowRoutes.js.map +1 -1
- package/dist/features/team/invitation/components/OpenInvitationsToUserCard.js +1 -1
- package/dist/features/team/invitation/components/OpenInvitationsToUserCard.js.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +5 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +37 -26
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +8 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.js +52 -41
- package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/discussionHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/discussionHandlers.js +40 -33
- package/dist/mocks/msw/handlers/discussionHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.js +70 -67
- package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/gridHandlers.js +2 -2
- package/dist/mocks/msw/handlers/gridHandlers.js.map +1 -1
- package/dist/mocks/msw/server.d.ts.map +1 -1
- package/dist/mocks/msw/server.js +4 -2
- package/dist/mocks/msw/server.js.map +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +10 -0
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +486 -482
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-client/index.js +3 -3
- package/dist/synapse-queries/KeyFactory.d.ts +13 -1
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +11 -1
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +4 -4
- package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js +4 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +19 -5
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +29 -21
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts +12 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useFormTemplate.js +52 -30
- package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -1
- package/dist/synapse-queries/forum/useForum.d.ts +5 -1
- package/dist/synapse-queries/forum/useForum.d.ts.map +1 -1
- package/dist/synapse-queries/forum/useForum.js +23 -1
- package/dist/synapse-queries/forum/useForum.js.map +1 -1
- package/dist/synapse-queries/index.js +185 -184
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts +5 -3
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts.map +1 -1
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js +12 -15
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.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/theme/DefaultTheme.d.ts.map +1 -1
- package/dist/theme/DefaultTheme.js +4 -1
- package/dist/theme/DefaultTheme.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/AppUtils/AppUtils.js +1 -1
- package/dist/utils/AppUtils/AppUtils.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/EntityTypeUtils.d.ts.map +1 -1
- package/dist/utils/functions/EntityTypeUtils.js.map +1 -1
- package/dist/utils/functions/getEndpoint.d.ts +1 -0
- package/dist/utils/functions/getEndpoint.d.ts.map +1 -1
- package/dist/utils/functions/getEndpoint.js +3 -3
- package/dist/utils/functions/getEndpoint.js.map +1 -1
- package/dist/utils/types/RequestableAccessRequirement.d.ts +8 -0
- package/dist/utils/types/RequestableAccessRequirement.d.ts.map +1 -0
- package/dist/utils/types/RequestableAccessRequirement.js +9 -0
- package/dist/utils/types/RequestableAccessRequirement.js.map +1 -0
- package/package.json +6 -5
- package/dist/testutils/ReactQueryMockUtils.js +0 -676
- package/dist/testutils/ReactQueryMockUtils.js.map +0 -1
|
@@ -6,13 +6,15 @@ import "../SynapseTable/SynapseTableConstants.js";
|
|
|
6
6
|
import { useEffect as i, useState as a } from "react";
|
|
7
7
|
import { Tooltip as o } from "@mui/material";
|
|
8
8
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import u from "dayjs";
|
|
10
|
+
import d from "dayjs/plugin/relativeTime";
|
|
11
|
+
import f from "@mui/icons-material/InsertDriveFileTwoTone";
|
|
12
|
+
import p from "@mui/icons-material/LayersTwoTone";
|
|
13
|
+
import m from "@mui/icons-material/WatchLaterTwoTone";
|
|
12
14
|
import h from "dayjs/plugin/duration";
|
|
13
|
-
|
|
14
|
-
function g(
|
|
15
|
-
let { numFiles: h, numBytes: g } =
|
|
15
|
+
u.extend(h), u.extend(d);
|
|
16
|
+
function g(d) {
|
|
17
|
+
let { numFiles: h, numBytes: g } = d, { accessToken: _, isAuthenticated: v } = t(), y = !!g, [b, x] = a({
|
|
16
18
|
isLoading: y,
|
|
17
19
|
downloadSpeed: 0
|
|
18
20
|
}), { isLoading: S, downloadSpeed: C } = b;
|
|
@@ -24,18 +26,18 @@ function g(m) {
|
|
|
24
26
|
});
|
|
25
27
|
});
|
|
26
28
|
}, [v, _]);
|
|
27
|
-
let w = S || C === 0 || !g ? 0 : g / C, T = w === 0, E = T ? "" :
|
|
29
|
+
let w = S || C === 0 || !g ? 0 : g / C, T = w === 0, E = T ? "" : u.duration({ seconds: w }).humanize(), D = h === 0, O = D ? "SRC-inactive" : "SRC-primary-text-color", k = T ? "SRC-inactive" : "SRC-primary-text-color";
|
|
28
30
|
return /* @__PURE__ */ l("span", {
|
|
29
31
|
className: "download-details-container",
|
|
30
32
|
children: [
|
|
31
|
-
h != null && /* @__PURE__ */ l("span", { children: [/* @__PURE__ */ c(
|
|
33
|
+
h != null && /* @__PURE__ */ l("span", { children: [/* @__PURE__ */ c(f, { className: O }), D ? /* @__PURE__ */ c(n, { width: 50 }) : /* @__PURE__ */ l(s, { children: [h.toLocaleString(), "\xA0files"] })] }),
|
|
32
34
|
y && /* @__PURE__ */ c(o, {
|
|
33
35
|
title: "This is the total size of all files. Zipped package(s) will likely be smaller.",
|
|
34
36
|
enterNextDelay: 500,
|
|
35
37
|
placement: "top",
|
|
36
38
|
children: /* @__PURE__ */ l("span", {
|
|
37
39
|
"data-testid": "numBytesUI",
|
|
38
|
-
children: [/* @__PURE__ */ c(
|
|
40
|
+
children: [/* @__PURE__ */ c(p, { className: k }), T ? /* @__PURE__ */ c(n, { width: 50 }) : e(g)]
|
|
39
41
|
})
|
|
40
42
|
}),
|
|
41
43
|
y && /* @__PURE__ */ c(o, {
|
|
@@ -44,7 +46,7 @@ function g(m) {
|
|
|
44
46
|
placement: "top",
|
|
45
47
|
children: /* @__PURE__ */ l("span", {
|
|
46
48
|
"data-testid": "downloadTimeEstimateUI",
|
|
47
|
-
children: [/* @__PURE__ */ c(
|
|
49
|
+
children: [/* @__PURE__ */ c(m, { className: k }), S && h != null && h > 0 ? /* @__PURE__ */ c(n, { width: 50 }) : E]
|
|
48
50
|
})
|
|
49
51
|
})
|
|
50
52
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadDetails.js","names":[],"sources":["../../../src/components/download_list/DownloadDetails.tsx"],"sourcesContent":["import { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport { testDownloadSpeed } from '@/utils/functions/testDownloadSpeed'\nimport
|
|
1
|
+
{"version":3,"file":"DownloadDetails.js","names":[],"sources":["../../../src/components/download_list/DownloadDetails.tsx"],"sourcesContent":["import { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport { testDownloadSpeed } from '@/utils/functions/testDownloadSpeed'\nimport InsertDriveFileTwoTone from '@mui/icons-material/InsertDriveFileTwoTone'\nimport LayersTwoTone from '@mui/icons-material/LayersTwoTone'\nimport WatchLaterTwoTone from '@mui/icons-material/WatchLaterTwoTone'\nimport { Tooltip } from '@mui/material'\nimport dayjs from 'dayjs'\nimport duration from 'dayjs/plugin/duration'\nimport relativeTime from 'dayjs/plugin/relativeTime'\nimport { useEffect, useState } from 'react'\nimport { SkeletonInlineBlock } from '../Skeleton/SkeletonInlineBlock'\nimport { TOOLTIP_DELAY_SHOW } from '../SynapseTable/SynapseTableConstants'\n\ndayjs.extend(duration)\ndayjs.extend(relativeTime)\n\nexport type DownloadDetailsProps = {\n numFiles?: number\n numBytes?: number\n}\n\ntype State = {\n isLoading: boolean\n downloadSpeed: number\n}\n\n/**\n * Displays download information including number of files, size of download, and time to download.\n * Prefer to use {@link ../DownloadCart/DownloadDetails} instead, particularly when you have information about file packaging in/eligibility\n * @param props\n * @returns\n */\nexport default function DownloadDetails(props: DownloadDetailsProps) {\n const { numFiles, numBytes } = props\n const { accessToken, isAuthenticated } = useSynapseContext()\n const hasNumBytes = !!numBytes\n\n const [state, setState] = useState<State>({\n isLoading: hasNumBytes, // figure out the estimated download time iff we were given a byte count\n downloadSpeed: 0,\n })\n const { isLoading, downloadSpeed } = state\n\n useEffect(() => {\n if (isAuthenticated) {\n testDownloadSpeed(accessToken!).then(speed => {\n setState({\n isLoading: false,\n downloadSpeed: speed,\n })\n })\n }\n }, [isAuthenticated, accessToken])\n\n const timeEstimateInSeconds =\n isLoading || downloadSpeed === 0 || !numBytes ? 0 : numBytes / downloadSpeed\n const isTimeEstimateLoading = timeEstimateInSeconds === 0\n const friendlyTime = isTimeEstimateLoading\n ? ''\n : dayjs.duration({ seconds: timeEstimateInSeconds }).humanize()\n\n const isZeroFiles = numFiles === 0\n const fileCountIconClass = isZeroFiles\n ? 'SRC-inactive'\n : 'SRC-primary-text-color'\n\n const timeEstimateIconClass = isTimeEstimateLoading\n ? 'SRC-inactive'\n : 'SRC-primary-text-color'\n return (\n <span className=\"download-details-container\">\n {numFiles != null && (\n <span>\n <InsertDriveFileTwoTone className={fileCountIconClass} />\n {isZeroFiles ? (\n <SkeletonInlineBlock width={50} />\n ) : (\n <>{numFiles.toLocaleString()} files</>\n )}\n </span>\n )}\n {hasNumBytes && (\n <Tooltip\n title=\"This is the total size of all files. Zipped package(s) will likely be smaller.\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n placement=\"top\"\n >\n <span data-testid=\"numBytesUI\">\n <LayersTwoTone className={timeEstimateIconClass} />\n {isTimeEstimateLoading ? (\n <SkeletonInlineBlock width={50} />\n ) : (\n calculateFriendlyFileSize(numBytes)\n )}\n </span>\n </Tooltip>\n )}\n {hasNumBytes && (\n <Tooltip\n title=\"This is an estimate of how long package download will take.\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n placement=\"top\"\n >\n <span data-testid=\"downloadTimeEstimateUI\">\n <WatchLaterTwoTone className={timeEstimateIconClass} />\n {isLoading && numFiles != null && numFiles > 0 ? (\n <SkeletonInlineBlock width={50} />\n ) : (\n friendlyTime\n )}\n </span>\n </Tooltip>\n )}\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,EAAM,OAAO,CAAQ,GACrB,EAAM,OAAO,CAAY;AAkBzB,SAAwB,EAAgB,GAA6B;CACnE,IAAM,EAAE,aAAU,gBAAa,GACzB,EAAE,gBAAa,uBAAoB,EAAkB,GACrD,IAAc,CAAC,CAAC,GAEhB,CAAC,GAAO,KAAY,EAAgB;EACxC,WAAW;EACX,eAAe;CACjB,CAAC,GACK,EAAE,cAAW,qBAAkB;CAErC,QAAgB;EACd,AAAI,KACF,EAAkB,CAAY,EAAE,MAAK,MAAS;GAC5C,EAAS;IACP,WAAW;IACX,eAAe;GACjB,CAAC;EACH,CAAC;CAEL,GAAG,CAAC,GAAiB,CAAW,CAAC;CAEjC,IAAM,IACJ,KAAa,MAAkB,KAAK,CAAC,IAAW,IAAI,IAAW,GAC3D,IAAwB,MAA0B,GAClD,IAAe,IACjB,KACA,EAAM,SAAS,EAAE,SAAS,EAAsB,CAAC,EAAE,SAAS,GAE1D,IAAc,MAAa,GAC3B,IAAqB,IACvB,iBACA,0BAEE,IAAwB,IAC1B,iBACA;CACJ,OACE,kBAAC,QAAD;EAAM,WAAU;YAAhB;GACG,KAAY,QACX,kBAAC,QAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAwB,WAAW,EAAqB,CAAA,GACvD,IACC,kBAAC,GAAD,EAAqB,OAAO,GAAK,CAAA,IAEjC,kBAAA,GAAA,EAAA,UAAA,CAAG,EAAS,eAAe,GAAE,WAAa,EAAA,CAAA,CAExC,EAAA,CAAA;GAEP,KACC,kBAAC,GAAD;IACE,OAAM;IACN,gBAAA;IACA,WAAU;cAEV,kBAAC,QAAD;KAAM,eAAY;eAAlB,CACE,kBAAC,GAAD,EAAe,WAAW,EAAwB,CAAA,GACjD,IACC,kBAAC,GAAD,EAAqB,OAAO,GAAK,CAAA,IAEjC,EAA0B,CAAQ,CAEhC;;GACC,CAAA;GAEV,KACC,kBAAC,GAAD;IACE,OAAM;IACN,gBAAA;IACA,WAAU;cAEV,kBAAC,QAAD;KAAM,eAAY;eAAlB,CACE,kBAAC,GAAD,EAAmB,WAAW,EAAwB,CAAA,GACrD,KAAa,KAAY,QAAQ,IAAW,IAC3C,kBAAC,GAAD,EAAqB,OAAO,GAAK,CAAA,IAEjC,CAEE;;GACC,CAAA;EAEP;;AAEV"}
|
|
@@ -21,7 +21,7 @@ function C(e) {
|
|
|
21
21
|
function w(u) {
|
|
22
22
|
let { entityId: f, versionNumber: w } = u, [T, E] = _(!1), { data: D, isLoading: O, refetch: k } = a(f, w, !0), A = D?.entityMetadata, j = D?.annotations, { data: M, isLoading: N } = o(f), { data: P, isLoading: F } = c(M?.jsonSchemaVersionInfo.$id, { enabled: !!M }), { data: I, isLoading: L } = h(D?.entity, P), { data: R, refetch: z } = s(f, { enabled: !!M }), B = !!M, V = !!A && !!R && S(A.modifiedOn).diff(S(R.validatedOn)) > 0, H = g(async () => {
|
|
23
23
|
E(!0);
|
|
24
|
-
let e = [
|
|
24
|
+
let e = [k(), z()];
|
|
25
25
|
await Promise.allSettled(e), E(!1);
|
|
26
26
|
}, [k, z]);
|
|
27
27
|
return O || N || F || L || T ? /* @__PURE__ */ b(l, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationsTable.js","names":[],"sources":["../../../../src/components/entity/metadata/AnnotationsTable.tsx"],"sourcesContent":["import { EntityAnnotationKey } from '@/components/entity/metadata/EntityAnnotationKey'\nimport { useGetJson } from '@/synapse-queries/entity/useEntity'\nimport { useGetSchema } from '@/synapse-queries/jsonschema/useSchema'\nimport {\n useGetSchemaBinding,\n useGetValidationResults,\n} from '@/synapse-queries/jsonschema/useEntityBoundSchema'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport { isISOTimestamp } from '@/utils/functions/DateTimeUtils'\nimport {\n convertToEntityType,\n entityTypeToFriendlyName,\n} from '@/utils/functions/EntityTypeUtils'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n} from '@/utils/functions/getEndpoint'\nimport {\n getDisplayedAnnotationDescription,\n getDisplayedAnnotationTitle,\n useGetAnnotatedJsonInstance,\n} from '@/utils/jsonschema/SchemaAnnotationUtils'\nimport { Json } from '@sage-bionetworks/synapse-client'\nimport dayjs from 'dayjs'\nimport { isEmpty } from 'lodash-es'\nimport { useCallback, useState } from 'react'\nimport FullWidthAlert from '../../FullWidthAlert'\nimport { SkeletonTable } from '../../Skeleton'\n\nexport type AnnotationsTableProps = {\n readonly entityId: string\n readonly versionNumber?: number\n}\n\nexport function getDisplayedAnnotation(\n value: string | number | boolean,\n): string {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString()\n } else if (isISOTimestamp(value)) {\n return formatDate(dayjs(value))\n }\n return value\n}\n\nexport function AnnotationsTable(props: AnnotationsTableProps) {\n const { entityId, versionNumber } = props\n const [isManuallyRefetching, setIsManuallyRefetching] = useState(false)\n\n const {\n data: entityData,\n isLoading: isLoadingEntityData,\n refetch: refetchEntityData,\n } = useGetJson(entityId, versionNumber, true)\n const entityMetadata = entityData?.entityMetadata\n const annotations = entityData?.annotations\n\n const { data: boundSchema, isLoading: isLoadingSchemaBinding } =\n useGetSchemaBinding(entityId)\n const { data: validationSchema, isLoading: isLoadingValidationSchema } =\n useGetSchema(boundSchema?.jsonSchemaVersionInfo.$id!, {\n enabled: Boolean(boundSchema),\n })\n\n const { data: annotatedInstance, isLoading: isLoadingSchemaAnnotations } =\n useGetAnnotatedJsonInstance(entityData?.entity as Json, validationSchema)\n\n const { data: validationResults, refetch: refetchValidationInformation } =\n useGetValidationResults(entityId, {\n enabled: Boolean(boundSchema),\n })\n\n const showSchemaInformation = Boolean(boundSchema)\n\n // If the entity has not yet been validated since the last fetch, then derived annotations may not have been calculated.\n const recentChangesHaveNotBeenValidated =\n !!entityMetadata &&\n !!validationResults &&\n dayjs(entityMetadata.modifiedOn).diff(\n dayjs(validationResults.validatedOn),\n ) > 0\n\n const onRefetch = useCallback(async () => {\n setIsManuallyRefetching(true)\n const promises = [\n // Refetch the annotations, which may have changed if new derived annotations have been calculated\n
|
|
1
|
+
{"version":3,"file":"AnnotationsTable.js","names":[],"sources":["../../../../src/components/entity/metadata/AnnotationsTable.tsx"],"sourcesContent":["import { EntityAnnotationKey } from '@/components/entity/metadata/EntityAnnotationKey'\nimport { useGetJson } from '@/synapse-queries/entity/useEntity'\nimport { useGetSchema } from '@/synapse-queries/jsonschema/useSchema'\nimport {\n useGetSchemaBinding,\n useGetValidationResults,\n} from '@/synapse-queries/jsonschema/useEntityBoundSchema'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport { isISOTimestamp } from '@/utils/functions/DateTimeUtils'\nimport {\n convertToEntityType,\n entityTypeToFriendlyName,\n} from '@/utils/functions/EntityTypeUtils'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n} from '@/utils/functions/getEndpoint'\nimport {\n getDisplayedAnnotationDescription,\n getDisplayedAnnotationTitle,\n useGetAnnotatedJsonInstance,\n} from '@/utils/jsonschema/SchemaAnnotationUtils'\nimport { Json } from '@sage-bionetworks/synapse-client'\nimport dayjs from 'dayjs'\nimport { isEmpty } from 'lodash-es'\nimport { useCallback, useState } from 'react'\nimport FullWidthAlert from '../../FullWidthAlert'\nimport { SkeletonTable } from '../../Skeleton'\n\nexport type AnnotationsTableProps = {\n readonly entityId: string\n readonly versionNumber?: number\n}\n\nexport function getDisplayedAnnotation(\n value: string | number | boolean,\n): string {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString()\n } else if (isISOTimestamp(value)) {\n return formatDate(dayjs(value))\n }\n return value\n}\n\nexport function AnnotationsTable(props: AnnotationsTableProps) {\n const { entityId, versionNumber } = props\n const [isManuallyRefetching, setIsManuallyRefetching] = useState(false)\n\n const {\n data: entityData,\n isLoading: isLoadingEntityData,\n refetch: refetchEntityData,\n } = useGetJson(entityId, versionNumber, true)\n const entityMetadata = entityData?.entityMetadata\n const annotations = entityData?.annotations\n\n const { data: boundSchema, isLoading: isLoadingSchemaBinding } =\n useGetSchemaBinding(entityId)\n const { data: validationSchema, isLoading: isLoadingValidationSchema } =\n useGetSchema(boundSchema?.jsonSchemaVersionInfo.$id!, {\n enabled: Boolean(boundSchema),\n })\n\n const { data: annotatedInstance, isLoading: isLoadingSchemaAnnotations } =\n useGetAnnotatedJsonInstance(entityData?.entity as Json, validationSchema)\n\n const { data: validationResults, refetch: refetchValidationInformation } =\n useGetValidationResults(entityId, {\n enabled: Boolean(boundSchema),\n })\n\n const showSchemaInformation = Boolean(boundSchema)\n\n // If the entity has not yet been validated since the last fetch, then derived annotations may not have been calculated.\n const recentChangesHaveNotBeenValidated =\n !!entityMetadata &&\n !!validationResults &&\n dayjs(entityMetadata.modifiedOn).diff(\n dayjs(validationResults.validatedOn),\n ) > 0\n\n const onRefetch = useCallback(async () => {\n setIsManuallyRefetching(true)\n const promises = [\n // Refetch the annotations, which may have changed if new derived annotations have been calculated\n refetchEntityData(),\n // Refetch the validation information, which we use to determine if derived annotations may still be pending\n refetchValidationInformation(),\n ]\n await Promise.allSettled(promises)\n setIsManuallyRefetching(false)\n }, [refetchEntityData, refetchValidationInformation])\n\n const isLoading =\n isLoadingEntityData ||\n isLoadingSchemaBinding ||\n isLoadingValidationSchema ||\n isLoadingSchemaAnnotations\n\n return isLoading || isManuallyRefetching ? (\n <SkeletonTable numRows={3} numCols={2} />\n ) : (\n <>\n {entityMetadata && annotations && isEmpty(annotations) ? (\n <div className=\"placeholder\">\n This{' '}\n {entityTypeToFriendlyName(\n convertToEntityType(entityMetadata.concreteType),\n )}{' '}\n has no annotations.\n </div>\n ) : null}\n <table className=\"AnnotationsTable\">\n <tbody>\n {annotations &&\n Object.keys(annotations).map((annotationKey: string) => {\n return (\n <tr key={annotationKey} className=\"AnnotationsTable__Row\">\n <td className=\"AnnotationsTable__Row__Key\">\n <EntityAnnotationKey\n annotationKey={annotationKey}\n title={getDisplayedAnnotationTitle(\n annotationKey,\n annotatedInstance,\n )}\n description={getDisplayedAnnotationDescription(\n annotationKey,\n annotatedInstance,\n )}\n />\n </td>\n <td className=\"AnnotationsTable__Row__Value\">\n {Array.isArray(annotations[annotationKey])\n ? annotations[annotationKey]\n .map(getDisplayedAnnotation)\n .join(', ')\n : getDisplayedAnnotation(\n annotations[annotationKey] as\n | string\n | number\n | boolean,\n )}\n </td>\n </tr>\n )\n })}\n {showSchemaInformation ? (\n <tr className=\"AnnotationsTable__Row\">\n <td className=\"AnnotationsTable__Row__Key Schema\">\n Validation Schema\n </td>\n <td className=\"AnnotationsTable__Row__Value\">\n <a\n href={`${getEndpoint(\n BackendDestinationEnum.REPO_ENDPOINT,\n )}/repo/v1/schema/type/registered/${\n boundSchema!.jsonSchemaVersionInfo.$id\n }`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {boundSchema!.jsonSchemaVersionInfo.schemaName}\n </a>\n </td>\n </tr>\n ) : null}\n </tbody>\n </table>\n {entityMetadata &&\n showSchemaInformation &&\n recentChangesHaveNotBeenValidated && (\n <FullWidthAlert\n variant=\"warning\"\n description={`This ${entityTypeToFriendlyName(\n convertToEntityType(entityMetadata.concreteType),\n )} has changed since it has been last validated. If this ${entityTypeToFriendlyName(\n convertToEntityType(entityMetadata.concreteType),\n )} is expected to have annotations derived from the Validation Schema, they may not yet be visible.`}\n primaryButtonConfig={{\n text: 'Reload Annotations',\n onClick: () => {\n onRefetch()\n },\n }}\n isGlobal={false}\n />\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,SAAgB,EACd,GACQ;CAMR,OALI,OAAO,KAAU,YAAY,OAAO,KAAU,YACzC,EAAM,SAAS,IACb,EAAe,CAAK,IACtB,EAAW,EAAM,CAAK,CAAC,IAEzB;AACT;AAEA,SAAgB,EAAiB,GAA8B;CAC7D,IAAM,EAAE,aAAU,qBAAkB,GAC9B,CAAC,GAAsB,KAA2B,EAAS,EAAK,GAEhE,EACJ,MAAM,GACN,WAAW,GACX,SAAS,MACP,EAAW,GAAU,GAAe,EAAI,GACtC,IAAiB,GAAY,gBAC7B,IAAc,GAAY,aAE1B,EAAE,MAAM,GAAa,WAAW,MACpC,EAAoB,CAAQ,GACxB,EAAE,MAAM,GAAkB,WAAW,MACzC,EAAa,GAAa,sBAAsB,KAAM,EACpD,SAAS,EAAQ,EACnB,CAAC,GAEG,EAAE,MAAM,GAAmB,WAAW,MAC1C,EAA4B,GAAY,QAAgB,CAAgB,GAEpE,EAAE,MAAM,GAAmB,SAAS,MACxC,EAAwB,GAAU,EAChC,SAAS,EAAQ,EACnB,CAAC,GAEG,IAAwB,EAAQ,GAGhC,IACJ,CAAC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KACnC,CAAA;IACD,CAAA,CACF;QACF,IACC,EAAA,CAAA;EACF,CAAA;EACN,KACC,KACA,KACE,kBAAC,GAAD;GACE,SAAQ;GACR,aAAa,QAAQ,EACnB,EAAoB,EAAe,YAAY,CACjD,EAAE,yDAAyD,EACzD,EAAoB,EAAe,YAAY,CACjD,EAAE;GACF,qBAAqB;IACnB,MAAM;IACN,eAAe;KACb,EAAU;IACZ;GACF;GACA,UAAU;EACX,CAAA;CAEL,EAAA,CAAA;AAEN"}
|
|
@@ -9,7 +9,7 @@ import { UserBadge as c } from "../../UserCard/UserBadge.js";
|
|
|
9
9
|
import { INFO_ICON_SX as l, getTableLastRebuiltTooltip as u, getTableModifiedOnAccessibleLabel as d, getTableModifiedOnTooltip as f } from "./createdByModifiedByTooltips.js";
|
|
10
10
|
import { Box as p, Breadcrumbs as m, Skeleton as h, Tooltip as g, Typography as _, useMediaQuery as v, useTheme as y } from "@mui/material";
|
|
11
11
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
-
import
|
|
12
|
+
import S from "@mui/icons-material/InfoTwoTone";
|
|
13
13
|
import C from "dayjs";
|
|
14
14
|
//#region src/components/entity/page/CreatedByModifiedBy.tsx
|
|
15
15
|
function w() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatedByModifiedBy.js","names":[],"sources":["../../../../src/components/entity/page/CreatedByModifiedBy.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport {\n useGetEntity,\n useGetQueryResultBundleWithAsyncStatus,\n} from '@/synapse-queries'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport {\n convertToEntityType,\n entityTypeToFriendlyName,\n isDataset,\n isTable,\n} from '@/utils/functions/EntityTypeUtils'\nimport { BUNDLE_MASK_LAST_UPDATED_ON } from '@/utils/SynapseConstants'\nimport
|
|
1
|
+
{"version":3,"file":"CreatedByModifiedBy.js","names":[],"sources":["../../../../src/components/entity/page/CreatedByModifiedBy.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport {\n useGetEntity,\n useGetQueryResultBundleWithAsyncStatus,\n} from '@/synapse-queries'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport {\n convertToEntityType,\n entityTypeToFriendlyName,\n isDataset,\n isTable,\n} from '@/utils/functions/EntityTypeUtils'\nimport { BUNDLE_MASK_LAST_UPDATED_ON } from '@/utils/SynapseConstants'\nimport InfoTwoTone from '@mui/icons-material/InfoTwoTone'\nimport {\n Box,\n Breadcrumbs,\n Skeleton,\n Tooltip,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material'\nimport dayjs from 'dayjs'\nimport { UserBadge } from '../../UserCard/UserBadge'\nimport {\n DATASET_CREATED_BY_TOOLTIP,\n INFO_ICON_SX,\n getTableLastRebuiltTooltip,\n getTableModifiedOnAccessibleLabel,\n getTableModifiedOnTooltip,\n} from './createdByModifiedByTooltips'\n\nexport type CreatedByModifiedByProps = {\n entityId: string\n versionNumber?: number\n}\n\nfunction Separator() {\n const theme = useTheme()\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'))\n if (isSmallScreen) {\n return null\n }\n return (\n <Typography variant={'breadcrumb1'} sx={{ color: 'grey.700' }}>\n /\n </Typography>\n )\n}\n\nexport function CreatedByModifiedBy(props: CreatedByModifiedByProps) {\n const { entityId, versionNumber } = props\n const entityIdWithVersion = `${entityId}${\n versionNumber ? `.${versionNumber}` : ''\n }`\n\n const { data: entity } = useGetEntity(entityId, versionNumber)\n\n const { data: tableQueryResult } = useGetQueryResultBundleWithAsyncStatus(\n {\n entityId,\n query: {\n sql: `SELECT * FROM ${entityIdWithVersion} LIMIT 0`,\n },\n partMask: BUNDLE_MASK_LAST_UPDATED_ON,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n },\n { enabled: !!(entity && isTable(entity)) },\n )\n\n const tableLastRebuilt = tableQueryResult?.responseBody?.lastUpdatedOn\n const friendlyName = entity\n ? entityTypeToFriendlyName(convertToEntityType(entity.concreteType))\n : ''\n\n const createdByTooltipId = `${entityIdWithVersion}-createdByTooltip`\n const modifiedByTooltipId = `${entityIdWithVersion}-modifiedByTooltip`\n const lastUpdatedTooltipId = `${entityIdWithVersion}-lastUpdatedTooltip`\n\n return (\n <Box\n sx={theme => ({\n bgcolor: 'grey.100',\n p: '10px',\n [theme.breakpoints.down('sm')]: {\n p: '24px 40px',\n },\n })}\n >\n <Breadcrumbs\n separator={<Separator />}\n sx={theme => ({\n '& .MuiBreadcrumbs-ol': {\n justifyContent: 'center',\n [theme.breakpoints.down('sm')]: {\n gap: '4px',\n },\n },\n })}\n >\n <ConditionalWrapper condition={!entity} wrapper={Skeleton}>\n <Typography\n sx={{ color: 'grey.700' }}\n variant={'breadcrumb1'}\n aria-describedby={createdByTooltipId}\n >\n {friendlyName} created by <UserBadge userId={entity?.createdBy} />{' '}\n on {formatDate(dayjs(entity?.createdOn))}\n {entity && isDataset(entity) && (\n <Tooltip\n id={createdByTooltipId}\n title={DATASET_CREATED_BY_TOOLTIP}\n >\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Typography>\n </ConditionalWrapper>\n <ConditionalWrapper condition={!entity} wrapper={Skeleton}>\n <Typography\n sx={{ color: 'grey.700' }}\n variant={'breadcrumb1'}\n aria-describedby={modifiedByTooltipId}\n >\n {entity && isTable(entity) ? 'Configuration' : friendlyName} last\n modified by <UserBadge userId={entity?.modifiedBy} /> on{' '}\n {formatDate(dayjs(entity?.modifiedOn))}\n {entity && isTable(entity) && (\n <Tooltip\n id={modifiedByTooltipId}\n title={getTableModifiedOnTooltip(friendlyName)}\n aria-label={getTableModifiedOnAccessibleLabel(friendlyName)}\n >\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Typography>\n </ConditionalWrapper>\n {tableLastRebuilt && (\n <Typography\n sx={{ color: 'grey.700' }}\n variant={'breadcrumb1'}\n aria-describedby={lastUpdatedTooltipId}\n >\n {friendlyName} last rebuilt on {formatDate(dayjs(tableLastRebuilt))}\n <Tooltip\n title={getTableLastRebuiltTooltip(friendlyName)}\n id={lastUpdatedTooltipId}\n >\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n </Typography>\n )}\n </Breadcrumbs>\n </Box>\n )\n}\n\nexport default CreatedByModifiedBy\n"],"mappings":";;;;;;;;;;;;;;AAsCA,SAAS,IAAY;CAMnB,OAJsB,EADR,EACsB,EAAM,YAAY,KAAK,IAAI,CAC3D,IACK,OAGP,kBAAC,GAAD;EAAY,SAAS;EAAe,IAAI,EAAE,OAAO,WAAW;YAAG;CAEnD,CAAA;AAEhB;AAEA,SAAgB,EAAoB,GAAiC;CACnE,IAAM,EAAE,aAAU,qBAAkB,GAC9B,IAAsB,GAAG,IAC7B,IAAgB,IAAI,MAAkB,MAGlC,EAAE,MAAM,MAAW,EAAa,GAAU,CAAa,GAEvD,EAAE,MAAM,MAAqB,EACjC;EACE;EACA,OAAO,EACL,KAAK,iBAAiB,EAAoB,UAC5C;EACA,UAAA;EACA,cAAc;CAChB,GACA,EAAE,SAAS,CAAC,EAAE,KAAU,EAAQ,CAAM,GAAG,CAC3C,GAEM,IAAmB,GAAkB,cAAc,eACnD,IAAe,IACjB,EAAyB,EAAoB,EAAO,YAAY,CAAC,IACjE,IAEE,IAAqB,GAAG,EAAoB,oBAC5C,IAAsB,GAAG,EAAoB,qBAC7C,IAAuB,GAAG,EAAoB;CAEpD,OACE,kBAAC,GAAD;EACE,KAAI,OAAU;GACZ,SAAS;GACT,GAAG;IACF,EAAM,YAAY,KAAK,IAAI,IAAI,EAC9B,GAAG,YACL;EACF;YAEA,kBAAC,GAAD;GACE,WAAW,kBAAC,GAAD,CAAY,CAAA;GACvB,KAAI,OAAU,EACZ,wBAAwB;IACtB,gBAAgB;KACf,EAAM,YAAY,KAAK,IAAI,IAAI,EAC9B,KAAK,MACP;GACF,EACF;aATF;IAWE,kBAAC,GAAD;KAAoB,WAAW,CAAC;KAAQ,SAAS;eAC/C,kBAAC,GAAD;MACE,IAAI,EAAE,OAAO,WAAW;MACxB,SAAS;MACT,oBAAkB;gBAHpB;OAKG;OAAa;OAAY,kBAAC,GAAD,EAAW,QAAQ,GAAQ,UAAY,CAAA;OAAE;OAAI;OACnE,EAAW,EAAM,GAAQ,SAAS,CAAC;OACtC,KAAU,EAAU,CAAM,KACzB,kBAAC,GAAD;QACE,IAAI;QACJ,OAAA;kBAEA,kBAAC,GAAD,EAAa,IAAI,EAAe,CAAA;OACzB,CAAA;MAED;;IACM,CAAA;IACpB,kBAAC,GAAD;KAAoB,WAAW,CAAC;KAAQ,SAAS;eAC/C,kBAAC,GAAD;MACE,IAAI,EAAE,OAAO,WAAW;MACxB,SAAS;MACT,oBAAkB;gBAHpB;OAKG,KAAU,EAAQ,CAAM,IAAI,kBAAkB;OAAa;OAChD,kBAAC,GAAD,EAAW,QAAQ,GAAQ,WAAa,CAAA;OAAC;OAAI;OACxD,EAAW,EAAM,GAAQ,UAAU,CAAC;OACpC,KAAU,EAAQ,CAAM,KACvB,kBAAC,GAAD;QACE,IAAI;QACJ,OAAO,EAA0B,CAAY;QAC7C,cAAY,EAAkC,CAAY;kBAE1D,kBAAC,GAAD,EAAa,IAAI,EAAe,CAAA;OACzB,CAAA;MAED;;IACM,CAAA;IACnB,KACC,kBAAC,GAAD;KACE,IAAI,EAAE,OAAO,WAAW;KACxB,SAAS;KACT,oBAAkB;eAHpB;MAKG;MAAa;MAAkB,EAAW,EAAM,CAAgB,CAAC;MAClE,kBAAC,GAAD;OACE,OAAO,EAA2B,CAAY;OAC9C,IAAI;iBAEJ,kBAAC,GAAD,EAAa,IAAI,EAAe,CAAA;MACzB,CAAA;KACC;;GAEH;;CACV,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"names":[],"mappings":"A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AAe,EAAE,CAAA;IAChC,mBAAmB,EAAE,eAAe,EAAE,EAAE,CAAA;IACxC,kBAAkB,EAAE,eAAe,EAAE,EAAE,CAAA;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAElC,mBAAmB,EAAE,sBAAsB,CAAA;IAE3C,iBAAiB,EAAE,oBAAoB,CAAA;IAEvC,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAA;AAMD,iBAAS,kBAAkB,CACzB,mBAAmB,EAAE,sBAAsB,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAmBxB;AAED;;;;;GAKG;AACH,iBAAS,4BAA4B,CACnC,KAAK,EAAE,eAAe,EAAE,EACxB,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,CAqBpB;AAED;;;;;;GAMG;AACH,iBAAS,sBAAsB,CAC7B,WAAW,EAAE,eAAe,EAAE,EAAE,EAChC,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,EAAE,CAYtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"EntityActionMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAgB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OA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;IACvB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAElC,mBAAmB,EAAE,sBAAsB,CAAA;IAE3C,iBAAiB,EAAE,oBAAoB,CAAA;IAEvC,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAA;AAMD,iBAAS,kBAAkB,CACzB,mBAAmB,EAAE,sBAAsB,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAmBxB;AAED;;;;;GAKG;AACH,iBAAS,4BAA4B,CACnC,KAAK,EAAE,eAAe,EAAE,EACxB,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,CAqBpB;AAED;;;;;;GAMG;AACH,iBAAS,sBAAsB,CAC7B,WAAW,EAAE,eAAe,EAAE,EAAE,EAChC,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,EAAE,CAYtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAmJpE;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityActionMenu.js","names":[],"sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"sourcesContent":["import { Box, ButtonProps, SxProps, Theme } from '@mui/material'\nimport { ComplexMenu, ComplexMenuButtonProps } from '../../../menu/ComplexMenu'\nimport IconSvg, { IconName } from '../../../IconSvg/IconSvg'\nimport { DropdownMenuItem, DropdownMenuProps } from '../../../menu/DropdownMenu'\nimport { MouseEvent } from 'react'\nimport { SystemStyleObject } from '@mui/system'\n\nconst outlinedButtonHoverBackgroundColor = 'rgba(0, 0, 0, 0.01)'\n\n// Represents the two types of dropdown menus that will be displayed on the entity page\ntype EntityActionMenuDropdownMenuType = 'DOWNLOAD' | 'PRIMARY'\n\ntype EntityActionMenuDropdownMenuConfiguration = {\n visible: boolean\n tooltipText?: string\n disabled?: boolean\n showFileAccessRequestNotice?: boolean\n}\n\nexport type ActionConfiguration = {\n visible: boolean\n text: string\n disabled?: boolean\n tooltipText?: string\n onClick?: (e: MouseEvent) => void\n href?: string\n}\n\nexport type ActionConfigurationMap = Record<string, ActionConfiguration>\n\nexport type MenuConfigurationMap = Record<\n EntityActionMenuDropdownMenuType,\n EntityActionMenuDropdownMenuConfiguration\n>\n\nexport type ActionViewProps = {\n action: string\n icon?: IconName\n textSx?: SxProps\n iconSx?: SxProps\n variant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuLayout = {\n buttonActions: ActionViewProps[]\n downloadMenuActions: ActionViewProps[][]\n primaryMenuActions: ActionViewProps[][]\n primaryMenuText: string\n primaryMenuEndIcon: IconName\n primaryMenuEndIconSx?: SxProps\n menuButtonSx?: SystemStyleObject<Theme>\n downloadMenuVariant?: ButtonProps['variant']\n primaryMenuVariant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuProps = {\n /* Maps a unique action string to a dynamic configuration for that particular action */\n actionConfiguration: ActionConfigurationMap\n /* Maps each dropdown menu to a dynamic configuration for that particular menu */\n menuConfiguration: MenuConfigurationMap\n /* Defines the layout of the actions. Typically depends on just the entity type and area. */\n layout: EntityActionMenuLayout\n}\n\n/*\n * All visible actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\nfunction getUnmappedActions(\n actionConfiguration: ActionConfigurationMap,\n layout: EntityActionMenuLayout,\n): ActionConfigurationMap {\n return Object.fromEntries(\n Object.entries(actionConfiguration).filter(([action, config]) => {\n // We don't care about actions that are not configured or should not be visible\n if (!config || !config.visible) {\n return false\n }\n\n const allLayoutActions: ActionViewProps[] = [\n ...layout.buttonActions,\n ...layout.primaryMenuActions.flat(),\n ...layout.downloadMenuActions.flat(),\n ]\n // Action is unmapped if it's visible and the layout doesn't have it\n return !allLayoutActions.some(\n layoutAction => layoutAction.action === action,\n )\n }),\n )\n}\n\n/**\n * Given a group of dropdown menu items and an action configuration,\n * return a list of dropdown menu items with non-visible and non-configured actions removed.\n * @param group\n * @param actionConfiguration\n */\nfunction mapAndFilterItemsInMenuGroup(\n group: ActionViewProps[],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[] {\n return group.reduce(\n (itemAcc: DropdownMenuItem[], actionViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[actionViewProps.action]\n // Only show the item if it's configured + visible\n if (configForAction?.visible) {\n itemAcc.push({\n text: configForAction.text ?? actionViewProps.action,\n onClick: configForAction.onClick,\n href: configForAction.href,\n tooltipText: configForAction.tooltipText,\n disabled: configForAction.disabled,\n icon: actionViewProps.icon,\n textSx: actionViewProps.textSx,\n iconSx: actionViewProps.iconSx,\n })\n }\n return itemAcc\n },\n [],\n )\n}\n\n/**\n * Given a list of groups of dropdown menu actions, returns a list of dropdown menu item\n * groups where non-visible actions have been removed, and groups with no visible actions\n * have been removed.\n * @param menuActions\n * @param actionConfiguration\n */\nfunction mapAndFilterMenuGroups(\n menuActions: ActionViewProps[][],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[][] {\n return menuActions.reduce(\n (groupAcc: DropdownMenuItem[][], group: ActionViewProps[]) => {\n const itemGroup = mapAndFilterItemsInMenuGroup(group, actionConfiguration)\n // Only show the group if it contains visible items\n if (itemGroup.length > 0) {\n groupAcc.push(itemGroup)\n }\n return groupAcc\n },\n [],\n )\n}\n\n/**\n * The EntityActionMenu renders a menu that displays the actions that can be invoked on an Entity page.\n */\nexport default function EntityActionMenu(props: EntityActionMenuProps) {\n const { actionConfiguration, menuConfiguration, layout } = props\n\n /*\n * All actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\n const unmappedActions = getUnmappedActions(actionConfiguration, layout)\n // Warn if unmapped actions were found and push them on to the layout.\n if (Object.entries(unmappedActions).length > 0) {\n console.warn(\n 'Actions are visible but have not been configured in the layout:',\n Object.entries(unmappedActions).map(entry => entry[0]),\n )\n // Modify the layout: put the unmapped actions in their own group at the top of the menu\n layout.primaryMenuActions.unshift(\n Object.entries(unmappedActions).map(\n (entry): ActionViewProps => ({\n action: entry[0],\n }),\n ),\n )\n }\n\n // Map button actions to a button configuration and omit non-visible actions\n const iconButtonConfigs: ComplexMenuButtonProps[] =\n layout.buttonActions.reduce(\n (acc: ComplexMenuButtonProps[], buttonViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[buttonViewProps.action]\n if (configForAction?.visible) {\n let onClick = configForAction.onClick\n if (onClick == null && !configForAction.href) {\n console.warn(`No handler registered for ${buttonViewProps.action}`)\n onClick = () => {\n console.warn(\n `No handler registered for ${buttonViewProps.action}`,\n )\n }\n }\n acc.push({\n icon: buttonViewProps.icon as IconName,\n onClick: onClick,\n tooltipText: configForAction.text,\n text: configForAction.text,\n variant: buttonViewProps.variant,\n iconSx: buttonViewProps.iconSx,\n disabled: configForAction.disabled,\n href: configForAction.href,\n })\n }\n return acc\n },\n [],\n )\n\n const downloadMenuConfig: DropdownMenuProps = {\n dropdownButtonText: 'Download Options',\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.downloadMenuVariant,\n showFileAccessRequestNotice:\n menuConfiguration.DOWNLOAD.showFileAccessRequestNotice ?? false,\n paperSx: {\n borderRadius: '5px',\n border: '1px solid #E2E4EA',\n width: '279px',\n padding: '12px 16px',\n },\n elevation: 3,\n buttonTooltip: menuConfiguration.DOWNLOAD.tooltipText,\n buttonProps: {\n disabled: menuConfiguration.DOWNLOAD.disabled,\n endIcon: <IconSvg icon={'expandMore'} wrap={false} />,\n },\n items: mapAndFilterMenuGroups(\n layout.downloadMenuActions,\n actionConfiguration,\n ),\n }\n\n const primaryMenuConfig: DropdownMenuProps = {\n dropdownButtonText: layout.primaryMenuText,\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.primaryMenuVariant,\n buttonProps: {\n endIcon: (\n <IconSvg\n icon={layout.primaryMenuEndIcon}\n wrap={false}\n sx={layout.primaryMenuEndIconSx}\n />\n ),\n },\n items: mapAndFilterMenuGroups(\n layout.primaryMenuActions,\n actionConfiguration,\n ),\n }\n\n const menuButtonSx = layout.menuButtonSx ?? {}\n\n return (\n <Box\n sx={{\n '& .MuiButton-root': {\n borderRadius: '6px',\n fontWeight: 540,\n padding: '8px',\n height: '28px',\n\n '& svg': {\n fontSize: '16px',\n },\n },\n // Optional per-layout overrides (e.g. background/border color for entity\n // menu buttons).\n '& .MuiButton-outlined': {\n ...menuButtonSx,\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n },\n },\n '& .MuiButton-text': {\n ...menuButtonSx,\n backgroundColor: 'transparent',\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n textDecoration: 'none',\n },\n },\n '& .MuiButton-root .MuiTypography-root': {\n fontWeight: 540,\n fontSize: '12px',\n lineHeight: '12px',\n letterSpacing: '-0.24px',\n },\n }}\n >\n <ComplexMenu\n iconButtons={iconButtonConfigs}\n dropdownMenus={[primaryMenuConfig, downloadMenuConfig]}\n />\n </Box>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = {\n getUnmappedActions,\n mapAndFilterItemsInMenuGroup,\n mapAndFilterMenuGroups,\n}\n"],"mappings":";;;;;AAOA,IAAM,IAAqC;AA6D3C,SAAS,EACP,GACA,GACwB;CACxB,OAAO,OAAO,YACZ,OAAO,QAAQ,CAAmB,EAAE,QAAQ,CAAC,GAAQ,OAE/C,CAAC,KAAU,CAAC,EAAO,UACd,KASF,CAAC;EALN,GAAG,EAAO;EACV,GAAG,EAAO,mBAAmB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ACb,eAAe,CAAC,GAAmB,CAAkB;EACtD,CAAA;CACE,CAAA;AAET;AAEA,IAAa,IAA4B;CACvC;CACA;CACA;AACF"}
|
|
1
|
+
{"version":3,"file":"EntityActionMenu.js","names":[],"sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"sourcesContent":["import { Box, ButtonProps, SxProps, Theme } from '@mui/material'\nimport { ComplexMenu, ComplexMenuButtonProps } from '../../../menu/ComplexMenu'\nimport IconSvg, { IconName } from '../../../IconSvg/IconSvg'\nimport { DropdownMenuItem, DropdownMenuProps } from '../../../menu/DropdownMenu'\nimport { MouseEvent } from 'react'\nimport { SystemStyleObject } from '@mui/system'\n\nconst outlinedButtonHoverBackgroundColor = 'rgba(0, 0, 0, 0.01)'\n\n// Represents the two types of dropdown menus that will be displayed on the entity page\ntype EntityActionMenuDropdownMenuType = 'DOWNLOAD' | 'PRIMARY'\n\ntype EntityActionMenuDropdownMenuConfiguration = {\n visible: boolean\n tooltipText?: string\n disabled?: boolean\n showFileAccessRequestNotice?: boolean\n}\n\nexport type ActionConfiguration = {\n visible: boolean\n text: string\n disabled?: boolean\n tooltipText?: string\n onClick?: (e: MouseEvent) => void\n href?: string\n}\n\nexport type ActionConfigurationMap = Record<string, ActionConfiguration>\n\nexport type MenuConfigurationMap = Record<\n EntityActionMenuDropdownMenuType,\n EntityActionMenuDropdownMenuConfiguration\n>\n\nexport type ActionViewProps = {\n action: string\n icon?: IconName\n textSx?: SxProps\n iconSx?: SxProps\n variant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuLayout = {\n buttonActions: ActionViewProps[]\n downloadMenuActions: ActionViewProps[][]\n primaryMenuActions: ActionViewProps[][]\n primaryMenuText: string\n primaryMenuEndIcon: IconName\n primaryMenuEndIconSx?: SxProps\n menuButtonSx?: SystemStyleObject<Theme>\n downloadMenuVariant?: ButtonProps['variant']\n primaryMenuVariant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuProps = {\n /* Maps a unique action string to a dynamic configuration for that particular action */\n actionConfiguration: ActionConfigurationMap\n /* Maps each dropdown menu to a dynamic configuration for that particular menu */\n menuConfiguration: MenuConfigurationMap\n /* Defines the layout of the actions. Typically depends on just the entity type and area. */\n layout: EntityActionMenuLayout\n}\n\n/*\n * All visible actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\nfunction getUnmappedActions(\n actionConfiguration: ActionConfigurationMap,\n layout: EntityActionMenuLayout,\n): ActionConfigurationMap {\n return Object.fromEntries(\n Object.entries(actionConfiguration).filter(([action, config]) => {\n // We don't care about actions that are not configured or should not be visible\n if (!config || !config.visible) {\n return false\n }\n\n const allLayoutActions: ActionViewProps[] = [\n ...layout.buttonActions,\n ...layout.primaryMenuActions.flat(),\n ...layout.downloadMenuActions.flat(),\n ]\n // Action is unmapped if it's visible and the layout doesn't have it\n return !allLayoutActions.some(\n layoutAction => layoutAction.action === action,\n )\n }),\n )\n}\n\n/**\n * Given a group of dropdown menu items and an action configuration,\n * return a list of dropdown menu items with non-visible and non-configured actions removed.\n * @param group\n * @param actionConfiguration\n */\nfunction mapAndFilterItemsInMenuGroup(\n group: ActionViewProps[],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[] {\n return group.reduce(\n (itemAcc: DropdownMenuItem[], actionViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[actionViewProps.action]\n // Only show the item if it's configured + visible\n if (configForAction?.visible) {\n itemAcc.push({\n text: configForAction.text ?? actionViewProps.action,\n onClick: configForAction.onClick,\n href: configForAction.href,\n tooltipText: configForAction.tooltipText,\n disabled: configForAction.disabled,\n icon: actionViewProps.icon,\n textSx: actionViewProps.textSx,\n iconSx: actionViewProps.iconSx,\n })\n }\n return itemAcc\n },\n [],\n )\n}\n\n/**\n * Given a list of groups of dropdown menu actions, returns a list of dropdown menu item\n * groups where non-visible actions have been removed, and groups with no visible actions\n * have been removed.\n * @param menuActions\n * @param actionConfiguration\n */\nfunction mapAndFilterMenuGroups(\n menuActions: ActionViewProps[][],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[][] {\n return menuActions.reduce(\n (groupAcc: DropdownMenuItem[][], group: ActionViewProps[]) => {\n const itemGroup = mapAndFilterItemsInMenuGroup(group, actionConfiguration)\n // Only show the group if it contains visible items\n if (itemGroup.length > 0) {\n groupAcc.push(itemGroup)\n }\n return groupAcc\n },\n [],\n )\n}\n\n/**\n * The EntityActionMenu renders a menu that displays the actions that can be invoked on an Entity page.\n */\nexport default function EntityActionMenu(props: EntityActionMenuProps) {\n const { actionConfiguration, menuConfiguration, layout } = props\n\n /*\n * All actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\n const unmappedActions = getUnmappedActions(actionConfiguration, layout)\n // Warn if unmapped actions were found and push them on to the layout.\n if (Object.entries(unmappedActions).length > 0) {\n console.warn(\n 'Actions are visible but have not been configured in the layout:',\n Object.entries(unmappedActions).map(entry => entry[0]),\n )\n // Modify the layout: put the unmapped actions in their own group at the top of the menu\n layout.primaryMenuActions.unshift(\n Object.entries(unmappedActions).map((entry): ActionViewProps => ({\n action: entry[0],\n })),\n )\n }\n\n // Map button actions to a button configuration and omit non-visible actions\n const iconButtonConfigs: ComplexMenuButtonProps[] =\n layout.buttonActions.reduce(\n (acc: ComplexMenuButtonProps[], buttonViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[buttonViewProps.action]\n if (configForAction?.visible) {\n let onClick = configForAction.onClick\n if (onClick == null && !configForAction.href) {\n console.warn(`No handler registered for ${buttonViewProps.action}`)\n onClick = () => {\n console.warn(\n `No handler registered for ${buttonViewProps.action}`,\n )\n }\n }\n acc.push({\n icon: buttonViewProps.icon as IconName,\n onClick: onClick,\n tooltipText: configForAction.text,\n text: configForAction.text,\n variant: buttonViewProps.variant,\n iconSx: buttonViewProps.iconSx,\n disabled: configForAction.disabled,\n href: configForAction.href,\n })\n }\n return acc\n },\n [],\n )\n\n const downloadMenuConfig: DropdownMenuProps = {\n dropdownButtonText: 'Download Options',\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.downloadMenuVariant,\n showFileAccessRequestNotice:\n menuConfiguration.DOWNLOAD.showFileAccessRequestNotice ?? false,\n paperSx: {\n borderRadius: '5px',\n border: '1px solid #E2E4EA',\n width: '279px',\n padding: '12px 16px',\n },\n elevation: 3,\n buttonTooltip: menuConfiguration.DOWNLOAD.tooltipText,\n buttonProps: {\n disabled: menuConfiguration.DOWNLOAD.disabled,\n endIcon: <IconSvg icon={'expandMore'} wrap={false} />,\n },\n items: mapAndFilterMenuGroups(\n layout.downloadMenuActions,\n actionConfiguration,\n ),\n }\n\n const primaryMenuConfig: DropdownMenuProps = {\n dropdownButtonText: layout.primaryMenuText,\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.primaryMenuVariant,\n buttonProps: {\n endIcon: (\n <IconSvg\n icon={layout.primaryMenuEndIcon}\n wrap={false}\n sx={layout.primaryMenuEndIconSx}\n />\n ),\n },\n items: mapAndFilterMenuGroups(\n layout.primaryMenuActions,\n actionConfiguration,\n ),\n }\n\n const menuButtonSx = layout.menuButtonSx ?? {}\n\n return (\n <Box\n sx={{\n '& .MuiButton-root': {\n borderRadius: '6px',\n fontWeight: 540,\n padding: '8px',\n height: '28px',\n\n '& svg': {\n fontSize: '16px',\n },\n },\n // Optional per-layout overrides (e.g. background/border color for entity\n // menu buttons).\n '& .MuiButton-outlined': {\n ...menuButtonSx,\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n },\n },\n '& .MuiButton-text': {\n ...menuButtonSx,\n backgroundColor: 'transparent',\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n textDecoration: 'none',\n },\n },\n '& .MuiButton-root .MuiTypography-root': {\n fontWeight: 540,\n fontSize: '12px',\n lineHeight: '12px',\n letterSpacing: '-0.24px',\n },\n }}\n >\n <ComplexMenu\n iconButtons={iconButtonConfigs}\n dropdownMenus={[primaryMenuConfig, downloadMenuConfig]}\n />\n </Box>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = {\n getUnmappedActions,\n mapAndFilterItemsInMenuGroup,\n mapAndFilterMenuGroups,\n}\n"],"mappings":";;;;;AAOA,IAAM,IAAqC;AA6D3C,SAAS,EACP,GACA,GACwB;CACxB,OAAO,OAAO,YACZ,OAAO,QAAQ,CAAmB,EAAE,QAAQ,CAAC,GAAQ,OAE/C,CAAC,KAAU,CAAC,EAAO,UACd,KASF,CAAC;EALN,GAAG,EAAO;EACV,GAAG,EAAO,mBAAmB,KAAK;EAClC,GAAG,EAAO,oBAAoB,KAAK;CAG7B,EAAiB,MACvB,MAAgB,EAAa,WAAW,CAC1C,CACD,CACH;AACF;AAQA,SAAS,EACP,GACA,GACoB;CACpB,OAAO,EAAM,QACV,GAA6B,MAAqC;EACjE,IAAM,IAAkB,EAAoB,EAAgB;EAc5D,OAZI,GAAiB,WACnB,EAAQ,KAAK;GACX,MAAM,EAAgB,QAAQ,EAAgB;GAC9C,SAAS,EAAgB;GACzB,MAAM,EAAgB;GACtB,aAAa,EAAgB;GAC7B,UAAU,EAAgB;GAC1B,MAAM,EAAgB;GACtB,QAAQ,EAAgB;GACxB,QAAQ,EAAgB;EAC1B,CAAC,GAEI;CACT,GACA,CAAC,CACH;AACF;AASA,SAAS,EACP,GACA,GACsB;CACtB,OAAO,EAAY,QAChB,GAAgC,MAA6B;EAC5D,IAAM,IAAY,EAA6B,GAAO,CAAmB;EAKzE,OAHI,EAAU,SAAS,KACrB,EAAS,KAAK,CAAS,GAElB;CACT,GACA,CAAC,CACH;AACF;AAKA,SAAwB,EAAiB,GAA8B;CACrE,IAAM,EAAE,wBAAqB,sBAAmB,cAAW,GAMrD,IAAkB,EAAmB,GAAqB,CAAM;CAEtE,AAAI,OAAO,QAAQ,CAAe,EAAE,SAAS,MAC3C,QAAQ,KACN,mEACA,OAAO,QAAQ,CAAe,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OACE,kBAAC,GAAD;EACE,IAAI;GACF,qBAAqB;IACnB,cAAc;IACd,YAAY;IACZ,SAAS;IACT,QAAQ;IAER,SAAS,EACP,UAAU,OACZ;GACF;GAGA,yBAAyB;IACvB,GAAG;IAEH,WAAW;KACT,GAAG;KACH,iBAAiB;IACnB;GACF;GACA,qBAAqB;IACnB,GAAG;IACH,iBAAiB;IAEjB,WAAW;KACT,GAAG;KACH,iBAAiB;KACjB,gBAAgB;IAClB;GACF;GACA,yCAAyC;IACvC,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;EACF;YAEA,kBAAC,GAAD;GACE,aAAa;GACb,eAAe,CAAC,GAAmB,CAAkB;EACtD,CAAA;CACE,CAAA;AAET;AAEA,IAAa,IAA4B;CACvC;CACA;CACA;AACF"}
|
|
@@ -18,7 +18,7 @@ import { useState as m } from "react";
|
|
|
18
18
|
import { Box as h, Link as g, Tooltip as _ } from "@mui/material";
|
|
19
19
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
20
20
|
import { DoiObjectType as se, EntityType as x } from "@sage-bionetworks/synapse-client";
|
|
21
|
-
import
|
|
21
|
+
import S from "@mui/icons-material/InfoTwoTone";
|
|
22
22
|
import C from "dayjs";
|
|
23
23
|
//#region src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx
|
|
24
24
|
function w(w, T) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetEntityTitleBarProperties.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx"],"sourcesContent":["import { useGetEntityChildren } from '@/synapse-queries'\nimport { useGetDOIAssociation } from '@/synapse-queries/doi/useDOI'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport {\n isDataset,\n isEntityRefCollectionView,\n isVersionableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport useGetEntityMetadata from '@/utils/hooks/useGetEntityMetadata'\nimport { Box, Link, Tooltip } from '@mui/material'\nimport { DoiObjectType, EntityType } from '@sage-bionetworks/synapse-client'\nimport { EntityRefCollectionView } from '@sage-bionetworks/synapse-types'\nimport { ReactNode, useState } from 'react'\nimport CopyToClipboardString from '../../../CopyToClipboardString/CopyToClipboardString'\nimport { CitationsDialog } from './CitationsDialog'\nimport { maxCitationCount, useDataCiteUsage } from './useDataCiteUsage'\nimport { useGetMentions } from './useGetMentions'\nimport Linkify from '@/components/GenericCard/Linkify'\nimport { isTable } from '@/utils/functions/EntityTypeUtils'\nimport { BUNDLE_MASK_LAST_UPDATED_ON } from '@/utils/SynapseConstants'\nimport { useGetQueryResultBundleWithAsyncStatus } from '@/synapse-queries'\nimport { entityTypeToFriendlyName } from '@/utils/functions/EntityTypeUtils'\nimport { UserBadge } from '@/components/UserCard/UserBadge'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport { InfoTwoTone } from '@mui/icons-material'\nimport dayjs from 'dayjs'\nimport {\n DATASET_CREATED_BY_TOOLTIP,\n INFO_ICON_SX,\n getTableModifiedOnTooltip,\n getTableModifiedOnAccessibleLabel,\n getTableLastRebuiltTooltip,\n} from '../createdByModifiedByTooltips'\n\nexport type EntityProperty = {\n key: string\n title: string\n value: ReactNode\n}\n\n/**\n * This hook fetches all the entity metadata shown on the Entity page, and transforms the data into an ordered list of\n * render-able key-value pairs.\n * @param entityId\n * @param versionNumber\n */\nexport function useGetEntityTitleBarProperties(\n entityId: string,\n versionNumber?: number,\n): EntityProperty[] {\n const {\n entityBundle: bundle,\n fileHandle: dataFileHandle,\n downloadAlias,\n isContainer,\n fileHandleStorageInfo,\n uploadDestinationString,\n } = useGetEntityMetadata(entityId, versionNumber)\n const [dataCiteCitationsDialogOpen, setDataCiteCitationsDialogOpen] =\n useState(false)\n const [mentionsDialogOpen, setMentionsDialogOpen] = useState(false)\n const { data: entityChildrenResponse } = useGetEntityChildren(\n {\n parentId: entityId,\n includeTypes: Object.values(EntityType),\n includeTotalChildCount: true,\n },\n { enabled: isContainer },\n )\n\n const entity = bundle?.entity\n const isTableLike = !!entity && isTable(entity)\n const friendlyName = bundle ? entityTypeToFriendlyName(bundle.entityType) : ''\n\n const { data: tableQueryResult } = useGetQueryResultBundleWithAsyncStatus(\n {\n entityId,\n query: {\n sql: `SELECT * FROM ${entityId}${versionNumber ? `.${versionNumber}` : ''} LIMIT 0`,\n },\n partMask: BUNDLE_MASK_LAST_UPDATED_ON,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n },\n { enabled: !!(entity && isTable(entity)) },\n )\n\n const tableLastRebuilt = tableQueryResult?.responseBody?.lastUpdatedOn\n\n // If this is the latest entity version, show the \"versionless\" DOI if it exists.\n const useFallbackVersionlessDOI =\n bundle &&\n !bundle.doiAssociation &&\n isVersionableEntity(bundle.entity) &&\n bundle.entity.isLatestVersion\n const { data: versionlessDOIAssociation } = useGetDOIAssociation(\n { id: entityId, version: undefined, type: DoiObjectType.ENTITY },\n {\n enabled: useFallbackVersionlessDOI,\n },\n )\n\n const size =\n dataFileHandle?.contentSize &&\n calculateFriendlyFileSize(dataFileHandle.contentSize)\n const storageLocation =\n fileHandleStorageInfo &&\n 'location' in fileHandleStorageInfo &&\n fileHandleStorageInfo.location\n const endpoint =\n fileHandleStorageInfo &&\n 'endpoint' in fileHandleStorageInfo &&\n fileHandleStorageInfo.endpoint\n const bucket =\n fileHandleStorageInfo &&\n 'bucket' in fileHandleStorageInfo &&\n fileHandleStorageInfo.bucket\n const fileKey =\n fileHandleStorageInfo &&\n 'fileKey' in fileHandleStorageInfo &&\n fileHandleStorageInfo.fileKey\n const externalUrl =\n fileHandleStorageInfo &&\n 'url' in fileHandleStorageInfo &&\n fileHandleStorageInfo.url\n\n const md5 = dataFileHandle?.contentMd5\n\n // If there is no version-specific DOI, fall back to the versionless DOI\n const doiAssociation = useFallbackVersionlessDOI\n ? versionlessDOIAssociation\n : bundle?.doiAssociation\n const { data: dataCiteUsage } = useDataCiteUsage(doiAssociation?.doiUri)\n const doi = doiAssociation && `https://doi.org/${doiAssociation?.doiUri}`\n const isDoiUsage = !!dataCiteUsage && dataCiteUsage.citationCount > 0\n const containerItems = entityChildrenResponse?.totalChildCount\n\n const datasetItems =\n bundle?.entity && isEntityRefCollectionView(bundle.entity)\n ? ((bundle.entity as EntityRefCollectionView).items ?? []).length\n : null\n\n const { data: mentions } = useGetMentions(entityId)\n const isMentions = !!mentions && mentions.length > 0\n return [\n {\n key: 'id',\n title: 'SynID',\n value: <CopyToClipboardString value={entityId} />,\n },\n size && { key: 'fileSize', title: 'Size', value: size },\n containerItems != null && {\n key: 'containerItems',\n title: 'Items',\n value: containerItems.toLocaleString(),\n },\n datasetItems != null && {\n key: 'entityRefCollectionItems',\n title: 'Items',\n value: datasetItems.toLocaleString(),\n },\n doi && {\n key: 'doi',\n title: 'DOI',\n value: <CopyToClipboardString value={doi} href={doi} icon=\"rounded\" />,\n },\n isDoiUsage && {\n key: 'citations',\n title: 'Citations',\n value: (\n <>\n <Link onClick={() => setDataCiteCitationsDialogOpen(true)}>\n {dataCiteUsage.citationCount.toLocaleString()}\n {dataCiteUsage.citationCount == maxCitationCount && '+'}\n </Link>\n <CitationsDialog\n open={dataCiteCitationsDialogOpen}\n onClose={() => setDataCiteCitationsDialogOpen(false)}\n citations={dataCiteUsage.citations}\n />\n </>\n ),\n },\n isMentions && {\n key: 'mentions',\n title: 'Mentions',\n value: (\n <>\n <Link onClick={() => setMentionsDialogOpen(true)}>\n {mentions.length.toLocaleString()}\n </Link>\n <CitationsDialog\n open={mentionsDialogOpen}\n onClose={() => setMentionsDialogOpen(false)}\n citations={mentions}\n title=\"Mentioned in\"\n />\n </>\n ),\n },\n md5 && {\n key: 'fileMd5',\n title: 'MD5',\n value: <CopyToClipboardString value={md5} />,\n },\n !isContainer &&\n storageLocation && {\n key: 'fileStorageLocation',\n title: 'Storage Location',\n value: storageLocation,\n },\n isContainer &&\n uploadDestinationString && {\n key: 'uploadDestination',\n title: 'Upload Destination',\n value: uploadDestinationString,\n },\n endpoint && {\n key: 'externalFileEndpoint',\n title: 'Endpoint',\n value: endpoint,\n },\n externalUrl && {\n key: 'externalUrl',\n title: 'URL',\n value: <Linkify text={externalUrl} />,\n },\n bucket && { key: 'externalFileBucket', title: 'Bucket', value: bucket },\n fileKey && { key: 'externalFileKey', title: 'File Key', value: fileKey },\n downloadAlias && {\n key: 'fileAlias',\n title: 'Alias',\n value: (\n <>\n {'Name when downloaded will be: '}\n <Box sx={{ display: 'inline', fontFamily: 'monospace' }}>\n {downloadAlias}\n </Box>\n </>\n ),\n },\n entity && {\n key: 'createdBy',\n title: 'Created By',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '4px' }}>\n <UserBadge userId={entity.createdBy} />\n <span>on {formatDate(dayjs(entity.createdOn))}</span>\n {isDataset(entity) && (\n <Tooltip title={DATASET_CREATED_BY_TOOLTIP}>\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Box>\n ),\n },\n entity && {\n key: 'modifiedBy',\n title: isTableLike ? 'Configuration Last Modified' : 'Modified By',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '4px' }}>\n <UserBadge userId={entity.modifiedBy} />\n <span>on {formatDate(dayjs(entity.modifiedOn))}</span>\n {isTableLike && (\n <Tooltip\n title={getTableModifiedOnTooltip(friendlyName)}\n aria-label={getTableModifiedOnAccessibleLabel(friendlyName)}\n >\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Box>\n ),\n },\n tableLastRebuilt && {\n key: 'lastRebuilt',\n title: 'Last Rebuilt On',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n {formatDate(dayjs(tableLastRebuilt))}\n <Tooltip title={getTableLastRebuiltTooltip(friendlyName)}>\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n </Box>\n ),\n },\n ].filter(item => !!item) as EntityProperty[]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA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C,cAAY,GAAkC,CAAY;gBAE1D,kBAAC,GAAD,EAAa,IAAI,EAAe,CAAA;KACzB,CAAA;IAER;;EAET;EACA,KAAoB;GAClB,KAAK;GACL,OAAO;GACP,OACE,kBAAC,GAAD;IAAK,IAAI;KAAE,SAAS;KAAQ,YAAY;IAAS;cAAjD,CACG,EAAW,EAAM,CAAgB,CAAC,GACnC,kBAAC,GAAD;KAAS,OAAO,EAA2B,CAAY;eACrD,kBAAC,GAAD,EAAa,IAAI,EAAe,CAAA;IACzB,CAAA,CACN;;EAET;CACF,EAAE,QAAO,MAAQ,CAAC,CAAC,CAAI;AACzB"}
|
|
1
|
+
{"version":3,"file":"useGetEntityTitleBarProperties.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx"],"sourcesContent":["import { useGetEntityChildren } from '@/synapse-queries'\nimport { useGetDOIAssociation } from '@/synapse-queries/doi/useDOI'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport {\n isDataset,\n isEntityRefCollectionView,\n isVersionableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport useGetEntityMetadata from '@/utils/hooks/useGetEntityMetadata'\nimport { Box, Link, Tooltip } from '@mui/material'\nimport { DoiObjectType, EntityType } from '@sage-bionetworks/synapse-client'\nimport { EntityRefCollectionView } from '@sage-bionetworks/synapse-types'\nimport { ReactNode, useState } from 'react'\nimport CopyToClipboardString from '../../../CopyToClipboardString/CopyToClipboardString'\nimport { CitationsDialog } from './CitationsDialog'\nimport { maxCitationCount, useDataCiteUsage } from './useDataCiteUsage'\nimport { useGetMentions } from './useGetMentions'\nimport Linkify from '@/components/GenericCard/Linkify'\nimport { isTable } from '@/utils/functions/EntityTypeUtils'\nimport { BUNDLE_MASK_LAST_UPDATED_ON } from '@/utils/SynapseConstants'\nimport { useGetQueryResultBundleWithAsyncStatus } from '@/synapse-queries'\nimport { entityTypeToFriendlyName } from '@/utils/functions/EntityTypeUtils'\nimport { UserBadge } from '@/components/UserCard/UserBadge'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport InfoTwoTone from '@mui/icons-material/InfoTwoTone'\nimport dayjs from 'dayjs'\nimport {\n DATASET_CREATED_BY_TOOLTIP,\n INFO_ICON_SX,\n getTableModifiedOnTooltip,\n getTableModifiedOnAccessibleLabel,\n getTableLastRebuiltTooltip,\n} from '../createdByModifiedByTooltips'\n\nexport type EntityProperty = {\n key: string\n title: string\n value: ReactNode\n}\n\n/**\n * This hook fetches all the entity metadata shown on the Entity page, and transforms the data into an ordered list of\n * render-able key-value pairs.\n * @param entityId\n * @param versionNumber\n */\nexport function useGetEntityTitleBarProperties(\n entityId: string,\n versionNumber?: number,\n): EntityProperty[] {\n const {\n entityBundle: bundle,\n fileHandle: dataFileHandle,\n downloadAlias,\n isContainer,\n fileHandleStorageInfo,\n uploadDestinationString,\n } = useGetEntityMetadata(entityId, versionNumber)\n const [dataCiteCitationsDialogOpen, setDataCiteCitationsDialogOpen] =\n useState(false)\n const [mentionsDialogOpen, setMentionsDialogOpen] = useState(false)\n const { data: entityChildrenResponse } = useGetEntityChildren(\n {\n parentId: entityId,\n includeTypes: Object.values(EntityType),\n includeTotalChildCount: true,\n },\n { enabled: isContainer },\n )\n\n const entity = bundle?.entity\n const isTableLike = !!entity && isTable(entity)\n const friendlyName = bundle ? entityTypeToFriendlyName(bundle.entityType) : ''\n\n const { data: tableQueryResult } = useGetQueryResultBundleWithAsyncStatus(\n {\n entityId,\n query: {\n sql: `SELECT * FROM ${entityId}${versionNumber ? `.${versionNumber}` : ''} LIMIT 0`,\n },\n partMask: BUNDLE_MASK_LAST_UPDATED_ON,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n },\n { enabled: !!(entity && isTable(entity)) },\n )\n\n const tableLastRebuilt = tableQueryResult?.responseBody?.lastUpdatedOn\n\n // If this is the latest entity version, show the \"versionless\" DOI if it exists.\n const useFallbackVersionlessDOI =\n bundle &&\n !bundle.doiAssociation &&\n isVersionableEntity(bundle.entity) &&\n bundle.entity.isLatestVersion\n const { data: versionlessDOIAssociation } = useGetDOIAssociation(\n { id: entityId, version: undefined, type: DoiObjectType.ENTITY },\n {\n enabled: useFallbackVersionlessDOI,\n },\n )\n\n const size =\n dataFileHandle?.contentSize &&\n calculateFriendlyFileSize(dataFileHandle.contentSize)\n const storageLocation =\n fileHandleStorageInfo &&\n 'location' in fileHandleStorageInfo &&\n fileHandleStorageInfo.location\n const endpoint =\n fileHandleStorageInfo &&\n 'endpoint' in fileHandleStorageInfo &&\n fileHandleStorageInfo.endpoint\n const bucket =\n fileHandleStorageInfo &&\n 'bucket' in fileHandleStorageInfo &&\n fileHandleStorageInfo.bucket\n const fileKey =\n fileHandleStorageInfo &&\n 'fileKey' in fileHandleStorageInfo &&\n fileHandleStorageInfo.fileKey\n const externalUrl =\n fileHandleStorageInfo &&\n 'url' in fileHandleStorageInfo &&\n fileHandleStorageInfo.url\n\n const md5 = dataFileHandle?.contentMd5\n\n // If there is no version-specific DOI, fall back to the versionless DOI\n const doiAssociation = useFallbackVersionlessDOI\n ? versionlessDOIAssociation\n : bundle?.doiAssociation\n const { data: dataCiteUsage } = useDataCiteUsage(doiAssociation?.doiUri)\n const doi = doiAssociation && `https://doi.org/${doiAssociation?.doiUri}`\n const isDoiUsage = !!dataCiteUsage && dataCiteUsage.citationCount > 0\n const containerItems = entityChildrenResponse?.totalChildCount\n\n const datasetItems =\n bundle?.entity && isEntityRefCollectionView(bundle.entity)\n ? ((bundle.entity as EntityRefCollectionView).items ?? []).length\n : null\n\n const { data: mentions } = useGetMentions(entityId)\n const isMentions = !!mentions && mentions.length > 0\n return [\n {\n key: 'id',\n title: 'SynID',\n value: <CopyToClipboardString value={entityId} />,\n },\n size && { key: 'fileSize', title: 'Size', value: size },\n containerItems != null && {\n key: 'containerItems',\n title: 'Items',\n value: containerItems.toLocaleString(),\n },\n datasetItems != null && {\n key: 'entityRefCollectionItems',\n title: 'Items',\n value: datasetItems.toLocaleString(),\n },\n doi && {\n key: 'doi',\n title: 'DOI',\n value: <CopyToClipboardString value={doi} href={doi} icon=\"rounded\" />,\n },\n isDoiUsage && {\n key: 'citations',\n title: 'Citations',\n value: (\n <>\n <Link onClick={() => setDataCiteCitationsDialogOpen(true)}>\n {dataCiteUsage.citationCount.toLocaleString()}\n {dataCiteUsage.citationCount == maxCitationCount && '+'}\n </Link>\n <CitationsDialog\n open={dataCiteCitationsDialogOpen}\n onClose={() => setDataCiteCitationsDialogOpen(false)}\n citations={dataCiteUsage.citations}\n />\n </>\n ),\n },\n isMentions && {\n key: 'mentions',\n title: 'Mentions',\n value: (\n <>\n <Link onClick={() => setMentionsDialogOpen(true)}>\n {mentions.length.toLocaleString()}\n </Link>\n <CitationsDialog\n open={mentionsDialogOpen}\n onClose={() => setMentionsDialogOpen(false)}\n citations={mentions}\n title=\"Mentioned in\"\n />\n </>\n ),\n },\n md5 && {\n key: 'fileMd5',\n title: 'MD5',\n value: <CopyToClipboardString value={md5} />,\n },\n !isContainer &&\n storageLocation && {\n key: 'fileStorageLocation',\n title: 'Storage Location',\n value: storageLocation,\n },\n isContainer &&\n uploadDestinationString && {\n key: 'uploadDestination',\n title: 'Upload Destination',\n value: uploadDestinationString,\n },\n endpoint && {\n key: 'externalFileEndpoint',\n title: 'Endpoint',\n value: endpoint,\n },\n externalUrl && {\n key: 'externalUrl',\n title: 'URL',\n value: <Linkify text={externalUrl} />,\n },\n bucket && { key: 'externalFileBucket', title: 'Bucket', value: bucket },\n fileKey && { key: 'externalFileKey', title: 'File Key', value: fileKey },\n downloadAlias && {\n key: 'fileAlias',\n title: 'Alias',\n value: (\n <>\n {'Name when downloaded will be: '}\n <Box sx={{ display: 'inline', fontFamily: 'monospace' }}>\n {downloadAlias}\n </Box>\n </>\n ),\n },\n entity && {\n key: 'createdBy',\n title: 'Created By',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '4px' }}>\n <UserBadge userId={entity.createdBy} />\n <span>on {formatDate(dayjs(entity.createdOn))}</span>\n {isDataset(entity) && (\n <Tooltip title={DATASET_CREATED_BY_TOOLTIP}>\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Box>\n ),\n },\n entity && {\n key: 'modifiedBy',\n title: isTableLike ? 'Configuration Last Modified' : 'Modified By',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '4px' }}>\n <UserBadge userId={entity.modifiedBy} />\n <span>on {formatDate(dayjs(entity.modifiedOn))}</span>\n {isTableLike && (\n <Tooltip\n title={getTableModifiedOnTooltip(friendlyName)}\n aria-label={getTableModifiedOnAccessibleLabel(friendlyName)}\n >\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n )}\n </Box>\n ),\n },\n tableLastRebuilt && {\n key: 'lastRebuilt',\n title: 'Last Rebuilt On',\n value: (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n {formatDate(dayjs(tableLastRebuilt))}\n <Tooltip title={getTableLastRebuiltTooltip(friendlyName)}>\n <InfoTwoTone sx={INFO_ICON_SX} />\n </Tooltip>\n </Box>\n ),\n },\n ].filter(item => !!item) as EntityProperty[]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,EACd,GACA,GACkB;CAClB,IAAM,EACJ,cAAc,GACd,YAAY,GACZ,kBACA,gBACA,0BACA,+BACE,EAAqB,GAAU,CAAa,GAC1C,CAAC,IAA6B,KAClC,EAAS,EAAK,GACV,CAAC,IAAoB,KAAyB,EAAS,EAAK,GAC5D,EAAE,MAAM,OAA2B,EACvC;EACE,UAAU;EACV,cAAc,OAAO,OAAO,CAAU;EACtC,wBAAwB;CAC1B,GACA,EAAE,SAAS,EAAY,CACzB,GAEM,IAAS,GAAQ,QACjB,IAAc,CAAC,CAAC,KAAU,EAAQ,CAAM,GACxC,IAAe,IAAS,GAAyB,EAAO,UAAU,IAAI,IAEtE,EAAE,MAAM,MAAqB,EACjC;EACE;EACA,OAAO,EACL,KAAK,iBA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rorChip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorChip.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorChip.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAA;AAG7F,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,kBAAkB,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CAwCtD"}
|
|
@@ -2,7 +2,8 @@ import { SignInPrompt as e, YOU_ARE_NOT_AUTHORIZED_MESSAGE as t } from "./ErrorB
|
|
|
2
2
|
import { useSynapseContext as n } from "../../utils/context/SynapseContext.js";
|
|
3
3
|
import { Avatar as r, Chip as i, Tooltip as a } from "@mui/material";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
5
|
+
import s from "@mui/icons-material/ErrorOutlined";
|
|
6
|
+
import c from "@mui/icons-material/LockOutlined";
|
|
6
7
|
//#region src/components/error/ErrorChip.tsx
|
|
7
8
|
function l(l) {
|
|
8
9
|
let { chipText: u, error: d } = l, { isAuthenticated: f } = n(), p = (d.status === 403 || d.status === 401) && !f, m = d.status === 403 && f, h = p ? "warning" : "error", g, _;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorChip.js","names":[],"sources":["../../../src/components/error/ErrorChip.tsx"],"sourcesContent":["import { useSynapseContext } from '@/utils/context/SynapseContext'\nimport
|
|
1
|
+
{"version":3,"file":"ErrorChip.js","names":[],"sources":["../../../src/components/error/ErrorChip.tsx"],"sourcesContent":["import { useSynapseContext } from '@/utils/context/SynapseContext'\nimport ErrorOutlined from '@mui/icons-material/ErrorOutlined'\nimport LockOutlined from '@mui/icons-material/LockOutlined'\nimport { Avatar, Chip, Tooltip } from '@mui/material'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { SignInPrompt, YOU_ARE_NOT_AUTHORIZED_MESSAGE } from './ErrorBanner'\n\nexport type ErrorChipProps = {\n chipText: string\n error: SynapseClientError\n}\n\n/**\n * A chip component for handling inline errors, where some information can be shown (e.g. an ID) without breaking an entire component.\n * @constructor\n */\nexport default function ErrorChip(props: ErrorChipProps) {\n const { chipText, error } = props\n const { isAuthenticated } = useSynapseContext()\n\n const loginError =\n (error.status === 403 || error.status === 401) && !isAuthenticated\n const accessDenied = error.status === 403 && isAuthenticated\n\n const variant = loginError ? 'warning' : 'error'\n let avatar\n let icon\n if (loginError || accessDenied) {\n avatar = (\n <Avatar sx={{ bgcolor: `${variant}.main` }}>\n <LockOutlined sx={{ color: 'white', width: '18px' }} />\n </Avatar>\n )\n } else {\n icon = loginError || accessDenied ? undefined : <ErrorOutlined />\n }\n let tooltipText\n if (loginError) {\n tooltipText = <SignInPrompt />\n } else if (accessDenied) {\n tooltipText = YOU_ARE_NOT_AUTHORIZED_MESSAGE\n } else {\n tooltipText = error.reason\n }\n\n return (\n <Tooltip title={tooltipText}>\n <Chip\n avatar={avatar}\n color={variant}\n variant=\"outlined\"\n icon={icon}\n label={chipText}\n />\n </Tooltip>\n )\n}\n"],"mappings":";;;;;;;AAgBA,SAAwB,EAAU,GAAuB;CACvD,IAAM,EAAE,aAAU,aAAU,GACtB,EAAE,uBAAoB,EAAkB,GAExC,KACH,EAAM,WAAW,OAAO,EAAM,WAAW,QAAQ,CAAC,GAC/C,IAAe,EAAM,WAAW,OAAO,GAEvC,IAAU,IAAa,YAAY,SACrC,GACA;CACJ,AAAI,KAAc,IAChB,IACE,kBAAC,GAAD;EAAQ,IAAI,EAAE,SAAS,GAAG,EAAQ,OAAO;YACvC,kBAAC,GAAD,EAAc,IAAI;GAAE,OAAO;GAAS,OAAO;EAAO,EAAI,CAAA;CAChD,CAAA,IAGV,IAAO,KAAc,IAAe,KAAA,IAAY,kBAAC,GAAD,CAAgB,CAAA;CAElE,IAAI;CASJ,OARA,AAKE,IALE,IACY,kBAAC,GAAD,CAAe,CAAA,IACpB,IACK,IAEA,EAAM,QAIpB,kBAAC,GAAD;EAAS,OAAO;YACd,kBAAC,GAAD;GACU;GACR,OAAO;GACP,SAAQ;GACF;GACN,OAAO;EACR,CAAA;CACM,CAAA;AAEb"}
|
|
@@ -8,11 +8,11 @@ import { useCallback as s, useRef as c, useState as l } from "react";
|
|
|
8
8
|
import { isUndefined as u, omitBy as d } from "lodash-es";
|
|
9
9
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
import { EntityType as h } from "@sage-bionetworks/synapse-client";
|
|
11
|
-
import g from "@mui/material/
|
|
12
|
-
import _ from "@mui/material/
|
|
13
|
-
import v from "@mui/material/
|
|
14
|
-
import y from "@mui/material/
|
|
15
|
-
import b from "@mui/
|
|
11
|
+
import g from "@mui/icons-material/ExpandMore";
|
|
12
|
+
import _ from "@mui/material/Typography";
|
|
13
|
+
import v from "@mui/material/TextField";
|
|
14
|
+
import y from "@mui/material/Stack";
|
|
15
|
+
import b from "@mui/material/Button";
|
|
16
16
|
import x from "@mui/material/Accordion";
|
|
17
17
|
import S from "@mui/material/AccordionDetails";
|
|
18
18
|
import C from "@mui/material/AccordionSummary";
|
|
@@ -44,23 +44,23 @@ function w(w) {
|
|
|
44
44
|
}, [z]), V = s(() => {
|
|
45
45
|
let e = k.csvPreviewData?.suggestedColumns;
|
|
46
46
|
e && (F(e.map((e) => d(e, u))), j(1));
|
|
47
|
-
}, [k.csvPreviewData, j]), H = /* @__PURE__ */ m(
|
|
47
|
+
}, [k.csvPreviewData, j]), H = /* @__PURE__ */ m(y, {
|
|
48
48
|
spacing: 2,
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */ p(
|
|
50
|
+
/* @__PURE__ */ p(v, {
|
|
51
51
|
required: !0,
|
|
52
52
|
label: "Table Name",
|
|
53
53
|
value: M,
|
|
54
54
|
onChange: (e) => N(e.target.value),
|
|
55
55
|
fullWidth: !0
|
|
56
56
|
}),
|
|
57
|
-
/* @__PURE__ */ p(
|
|
57
|
+
/* @__PURE__ */ p(_, {
|
|
58
58
|
variant: "body1",
|
|
59
59
|
children: "Use the schema options button to make changes to the columns of the table. Use the create button to finish building the table."
|
|
60
60
|
}),
|
|
61
61
|
/* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(C, {
|
|
62
|
-
expandIcon: /* @__PURE__ */ p(
|
|
63
|
-
children: /* @__PURE__ */ p(
|
|
62
|
+
expandIcon: /* @__PURE__ */ p(g, {}),
|
|
63
|
+
children: /* @__PURE__ */ p(_, {
|
|
64
64
|
variant: "headline3",
|
|
65
65
|
children: "Schema Options"
|
|
66
66
|
})
|
|
@@ -79,7 +79,7 @@ function w(w) {
|
|
|
79
79
|
open: T,
|
|
80
80
|
content: /* @__PURE__ */ m(f, { children: [A === 0 && /* @__PURE__ */ p(i, { workflow: k }), A === 1 && H] }),
|
|
81
81
|
actions: /* @__PURE__ */ m(f, { children: [
|
|
82
|
-
/* @__PURE__ */ p(
|
|
82
|
+
/* @__PURE__ */ p(b, {
|
|
83
83
|
variant: "outlined",
|
|
84
84
|
disabled: k.isLoadingPreview,
|
|
85
85
|
onClick: () => {
|
|
@@ -87,17 +87,17 @@ function w(w) {
|
|
|
87
87
|
},
|
|
88
88
|
children: "Cancel"
|
|
89
89
|
}),
|
|
90
|
-
A === 0 && k.step === r.COLUMN_PREVIEW && /* @__PURE__ */ p(
|
|
90
|
+
A === 0 && k.step === r.COLUMN_PREVIEW && /* @__PURE__ */ p(b, {
|
|
91
91
|
disabled: k.isLoadingPreview,
|
|
92
92
|
variant: "contained",
|
|
93
93
|
onClick: V,
|
|
94
94
|
children: "Next"
|
|
95
95
|
}),
|
|
96
|
-
A === 1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
96
|
+
A === 1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(b, {
|
|
97
97
|
variant: "outlined",
|
|
98
98
|
onClick: () => j(0),
|
|
99
99
|
children: "Back"
|
|
100
|
-
}), /* @__PURE__ */ p(
|
|
100
|
+
}), /* @__PURE__ */ p(b, {
|
|
101
101
|
variant: "contained",
|
|
102
102
|
onClick: () => I.current?.submit(),
|
|
103
103
|
loading: R,
|
|
@@ -3,8 +3,8 @@ import t from "./CsvPreview.js";
|
|
|
3
3
|
import { useRef as n } from "react";
|
|
4
4
|
import { Accordion as r, AccordionDetails as i, AccordionSummary as a, Button as o, Stack as s, Typography as c } from "@mui/material";
|
|
5
5
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
7
|
-
import f from "@mui/icons-material/
|
|
6
|
+
import d from "@mui/icons-material/ExpandMore";
|
|
7
|
+
import f from "@mui/icons-material/RefreshTwoTone";
|
|
8
8
|
//#region src/components/table/CsvPreview/CsvPreviewWithOptions.tsx
|
|
9
9
|
function p({ fileHandleId: p, csvTableDescriptor: m, onCsvTableDescriptorChange: h, onCsvPreviewDataChange: g, onIsLoadingChange: _ }) {
|
|
10
10
|
let v = n(null);
|
|
@@ -16,7 +16,7 @@ function p({ fileHandleId: p, csvTableDescriptor: m, onCsvTableDescriptorChange:
|
|
|
16
16
|
onCsvPreviewDataChange: g,
|
|
17
17
|
onIsLoadingChange: _
|
|
18
18
|
}), /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(a, {
|
|
19
|
-
expandIcon: /* @__PURE__ */ l(
|
|
19
|
+
expandIcon: /* @__PURE__ */ l(d, {}),
|
|
20
20
|
children: /* @__PURE__ */ l(c, {
|
|
21
21
|
variant: "headline3",
|
|
22
22
|
children: "Show Options"
|
|
@@ -26,7 +26,7 @@ function p({ fileHandleId: p, csvTableDescriptor: m, onCsvTableDescriptorChange:
|
|
|
26
26
|
ref: v
|
|
27
27
|
}), /* @__PURE__ */ l(o, {
|
|
28
28
|
variant: "outlined",
|
|
29
|
-
startIcon: /* @__PURE__ */ l(
|
|
29
|
+
startIcon: /* @__PURE__ */ l(f, {}),
|
|
30
30
|
sx: { mt: 2 },
|
|
31
31
|
onClick: () => {
|
|
32
32
|
v.current && h(v.current.getFormData());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CsvPreviewWithOptions.js","names":[],"sources":["../../../../src/components/table/CsvPreview/CsvPreviewWithOptions.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"CsvPreviewWithOptions.js","names":[],"sources":["../../../../src/components/table/CsvPreview/CsvPreviewWithOptions.tsx"],"sourcesContent":["import RefreshTwoTone from '@mui/icons-material/RefreshTwoTone'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Button,\n Stack,\n Typography,\n} from '@mui/material'\nimport {\n CsvTableDescriptor,\n UploadToTablePreviewResult,\n} from '@sage-bionetworks/synapse-client'\nimport CsvTableDescriptorForm, {\n CsvTableDescriptorFormHandle,\n} from '@/components/table/CsvTableDescriptorForm/CsvTableDescriptorForm'\nimport { useRef } from 'react'\nimport CsvPreview from '@/components/table/CsvPreview/CsvPreview'\n\nexport type CsvPreviewWithOptionsProps = {\n /** File handle ID of the uploaded CSV, or null if not yet uploaded */\n fileHandleId: string | null\n /** Current CSV parsing configuration */\n csvTableDescriptor: CsvTableDescriptor\n /** Called when the user clicks \"Refresh Preview\" with the form's current values */\n onCsvTableDescriptorChange: (descriptor: CsvTableDescriptor) => void\n /** Called when the CSV preview data is fetched */\n onCsvPreviewDataChange?: (data: UploadToTablePreviewResult) => void\n /** Called when the preview load state changes */\n onIsLoadingChange?: (isLoading: boolean) => void\n}\n\n/**\n * Displays a CSV preview table with expandable parsing options.\n * For upload/preview flows, prefer useCsvUploadPreview with CsvUploadPreviewContent.\n */\nexport default function CsvPreviewWithOptions({\n fileHandleId,\n csvTableDescriptor,\n onCsvTableDescriptorChange,\n onCsvPreviewDataChange,\n onIsLoadingChange,\n}: CsvPreviewWithOptionsProps) {\n const csvDescriptorFormRef = useRef<CsvTableDescriptorFormHandle | null>(null)\n\n return (\n <Stack spacing={2}>\n {fileHandleId && (\n <CsvPreview\n fileHandleId={fileHandleId}\n csvTableDescriptor={csvTableDescriptor}\n onCsvPreviewDataChange={onCsvPreviewDataChange}\n onIsLoadingChange={onIsLoadingChange}\n />\n )}\n <Accordion>\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n <Typography variant={'headline3'}>Show Options</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <CsvTableDescriptorForm\n defaultValue={csvTableDescriptor}\n ref={csvDescriptorFormRef}\n />\n <Button\n variant={'outlined'}\n startIcon={<RefreshTwoTone />}\n sx={{ mt: 2 }}\n onClick={() => {\n if (csvDescriptorFormRef.current) {\n onCsvTableDescriptorChange(\n csvDescriptorFormRef.current.getFormData(),\n )\n }\n }}\n >\n Refresh Preview\n </Button>\n </AccordionDetails>\n </Accordion>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;AAqCA,SAAwB,EAAsB,EAC5C,iBACA,uBACA,+BACA,2BACA,wBAC6B;CAC7B,IAAM,IAAuB,EAA4C,IAAI;CAE7E,OACE,kBAAC,GAAD;EAAO,SAAS;YAAhB,CACG,KACC,kBAAC,GAAD;GACgB;GACM;GACI;GACL;EACpB,CAAA,GAEH,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;GAAkB,YAAY,kBAAC,GAAD,CAAiB,CAAA;aAC7C,kBAAC,GAAD;IAAY,SAAS;cAAa;GAAwB,CAAA;EAC1C,CAAA,GAClB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;GACE,cAAc;GACd,KAAK;EACN,CAAA,GACD,kBAAC,GAAD;GACE,SAAS;GACT,WAAW,kBAAC,GAAD,CAAiB,CAAA;GAC5B,IAAI,EAAE,IAAI,EAAE;GACZ,eAAe;IACb,AAAI,EAAqB,WACvB,EACE,EAAqB,QAAQ,YAAY,CAC3C;GAEJ;aACD;EAEO,CAAA,CACQ,EAAA,CAAA,CACT,EAAA,CAAA,CACN;;AAEX"}
|
|
@@ -20,7 +20,7 @@ import { Box as y, InputLabel as b, MenuItem as x, Select as S, Stack as C, Tool
|
|
|
20
20
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
21
21
|
import { ColumnTypeEnum as O } from "@sage-bionetworks/synapse-types";
|
|
22
22
|
import { useQuery as k } from "@tanstack/react-query";
|
|
23
|
-
import
|
|
23
|
+
import A from "@mui/icons-material/InfoOutlined";
|
|
24
24
|
import { useMeasure as j } from "@react-hookz/web";
|
|
25
25
|
//#region src/components/widgets/facet-nav/FacetNavPanel.tsx
|
|
26
26
|
var M = 19, N = 150, P = 300;
|