synapse-react-client 4.0.31 → 4.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js +48 -36
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +217 -143
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DocumentTemplate.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DocumentTemplate.js +28 -24
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DocumentTemplate.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +180 -94
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/styles.d.ts +3 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/styles.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/styles.js +9 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/styles.js.map +1 -0
- package/dist/components/CopyToClipboardIcon.d.ts +2 -1
- package/dist/components/CopyToClipboardIcon.d.ts.map +1 -1
- package/dist/components/CopyToClipboardIcon.js +6 -6
- package/dist/components/CopyToClipboardIcon.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +230 -215
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.js +3 -3
- package/dist/components/DataGrid/SyncGridWithSourceButton.js.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts +10 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.js +37 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.js.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts +12 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +93 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -0
- package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js +1 -1
- package/dist/components/DataGrid/utils/applyModelChange.d.ts +3 -0
- package/dist/components/DataGrid/utils/applyModelChange.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/applyModelChange.js +5 -0
- package/dist/components/DataGrid/utils/applyModelChange.js.map +1 -1
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.d.ts +8 -0
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.d.ts.map +1 -0
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js +14 -0
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js.map +1 -0
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js +1 -1
- package/dist/components/EntityFinder/details/view/DetailsView.d.ts.map +1 -1
- package/dist/components/EntityFinder/details/view/DetailsView.js +119 -122
- package/dist/components/EntityFinder/details/view/DetailsView.js.map +1 -1
- package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.d.ts +5 -1
- package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.d.ts.map +1 -1
- package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.js +7 -7
- package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.js.map +1 -1
- package/dist/components/EntityLink.d.ts +2 -0
- package/dist/components/EntityLink.d.ts.map +1 -1
- package/dist/components/EntityLink.js +15 -11
- package/dist/components/EntityLink.js.map +1 -1
- package/dist/components/EntitySidebar/AccessAndPermissions.css +1 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.d.ts +7 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.d.ts.map +1 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.js +75 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.js.map +1 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.module.js +15 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.module.js.map +1 -0
- package/dist/components/EntitySidebar/AccessAndPermissions.module.scss +58 -0
- package/dist/components/EntitySidebar/EntitySidebar.css +1 -1
- package/dist/components/EntitySidebar/EntitySidebar.d.ts.map +1 -1
- package/dist/components/EntitySidebar/EntitySidebar.js +54 -42
- package/dist/components/EntitySidebar/EntitySidebar.js.map +1 -1
- package/dist/components/EntitySidebar/EntitySidebar.module.js +10 -11
- package/dist/components/EntitySidebar/EntitySidebar.module.js.map +1 -1
- package/dist/components/EntitySidebar/EntitySidebar.module.scss +6 -13
- package/dist/components/EntityTreeTable/EntityTreeTable.css +1 -1
- package/dist/components/EntityTreeTable/EntityTreeTable.module.js +1 -1
- package/dist/components/EntityTreeTable/EntityTreeTable.module.js.map +1 -1
- package/dist/components/EntityTreeTable/EntityTreeTable.module.scss +18 -0
- package/dist/components/EntityTreeTable/components/ColumnHeaders.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/components/ColumnHeaders.js +20 -7
- package/dist/components/EntityTreeTable/components/ColumnHeaders.js.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.js +3 -1
- package/dist/components/EntityTreeTable/components/EntityNameCell.js.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityTreeTableView.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/components/EntityTreeTableView.js +4 -1
- package/dist/components/EntityTreeTable/components/EntityTreeTableView.js.map +1 -1
- package/dist/components/EntityTreeTable/components/IdColumnHeader.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/components/IdColumnHeader.js +3 -1
- package/dist/components/EntityTreeTable/components/IdColumnHeader.js.map +1 -1
- package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/hooks/useTableColumns.js +24 -19
- package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
- package/dist/components/Forum/DiscussionEmpty.css +1 -1
- package/dist/components/Forum/DiscussionEmpty.module.js +4 -4
- package/dist/components/Forum/DiscussionEmpty.module.js.map +1 -1
- package/dist/components/Forum/DiscussionEmpty.module.scss +3 -6
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.css +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.d.ts +29 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.js +229 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.module.js +9 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.module.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPicker.module.scss +19 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPickerModal.d.ts +23 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPickerModal.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPickerModal.js +39 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaPickerModal.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaVersionSelectionContext.d.ts +14 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaVersionSelectionContext.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaVersionSelectionContext.js +12 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/JsonSchemaVersionSelectionContext.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/VersionSelectionType.d.ts +17 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/VersionSelectionType.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/VersionSelectionType.js +8 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/VersionSelectionType.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/index.d.ts +6 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/index.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/index.js +4 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaOrganizations.d.ts +20 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaOrganizations.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaOrganizations.js +25 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaOrganizations.js.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaSelection.d.ts +35 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaSelection.d.ts.map +1 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaSelection.js +60 -0
- package/dist/components/JsonSchema/JsonSchemaPicker/useJsonSchemaSelection.js.map +1 -0
- package/dist/components/ProjectInfo/ProjectInfo.css +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.module.js +5 -5
- package/dist/components/ProjectInfo/ProjectInfo.module.js.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.module.scss +2 -4
- package/dist/components/ProjectInfo/ProjectInfoPopover.d.ts.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfoPopover.js +17 -16
- package/dist/components/ProjectInfo/ProjectInfoPopover.js.map +1 -1
- package/dist/components/ProjectStorage/ProjectDataAvailability.d.ts.map +1 -1
- package/dist/components/ProjectStorage/ProjectDataAvailability.js +16 -16
- package/dist/components/ProjectStorage/ProjectDataAvailability.js.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js +95 -95
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js +2 -2
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +116 -91
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +41 -41
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +3 -2
- package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.css +1 -1
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.d.ts.map +1 -1
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.js +0 -7
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.js.map +1 -1
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.js +2 -2
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.js.map +1 -1
- package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.scss +12 -2
- package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.css +1 -1
- package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.js +3 -3
- package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.js.map +1 -1
- package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.scss +5 -1
- package/dist/components/TanStackTable/ColumnHeader.d.ts +7 -0
- package/dist/components/TanStackTable/ColumnHeader.d.ts.map +1 -1
- package/dist/components/TanStackTable/ColumnHeader.js +10 -9
- package/dist/components/TanStackTable/ColumnHeader.js.map +1 -1
- package/dist/components/TanStackTable/StyledVirtualTanStackTable.d.ts +8 -0
- package/dist/components/TanStackTable/StyledVirtualTanStackTable.d.ts.map +1 -1
- package/dist/components/TanStackTable/StyledVirtualTanStackTable.js +31 -22
- package/dist/components/TanStackTable/StyledVirtualTanStackTable.js.map +1 -1
- package/dist/components/TanStackTable/useFetchNextPageOnScrollToBottom.d.ts +21 -0
- package/dist/components/TanStackTable/useFetchNextPageOnScrollToBottom.d.ts.map +1 -0
- package/dist/components/TanStackTable/useFetchNextPageOnScrollToBottom.js +22 -0
- package/dist/components/TanStackTable/useFetchNextPageOnScrollToBottom.js.map +1 -0
- package/dist/components/entity/metadata/AnnotationsTable.js +2 -2
- package/dist/components/entity/metadata/AnnotationsTable.js.map +1 -1
- package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.d.ts.map +1 -1
- package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js +8 -8
- package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts +0 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +22 -22
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.d.ts.map +1 -1
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +62 -68
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
- package/dist/components/styled/StyledTableContainer.d.ts +1 -0
- package/dist/components/styled/StyledTableContainer.d.ts.map +1 -1
- package/dist/components/styled/StyledTableContainer.js +3 -3
- package/dist/components/styled/StyledTableContainer.js.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +131 -131
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.js +21 -18
- package/dist/features/entity/metadata-task/create-task/useCurationTaskFormState.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/dueDate.d.ts +1 -1
- package/dist/features/entity/metadata-task/utils/dueDate.js.map +1 -1
- package/dist/mocks/eDuc/mockEDucTemplates.d.ts +7 -0
- package/dist/mocks/eDuc/mockEDucTemplates.d.ts.map +1 -0
- package/dist/mocks/eDuc/mockEDucTemplates.js +18 -0
- package/dist/mocks/eDuc/mockEDucTemplates.js.map +1 -0
- package/dist/mocks/jsonschema/mockJsonSchemaListing.d.ts +31 -0
- package/dist/mocks/jsonschema/mockJsonSchemaListing.d.ts.map +1 -0
- package/dist/mocks/jsonschema/mockJsonSchemaListing.js +101 -0
- package/dist/mocks/jsonschema/mockJsonSchemaListing.js.map +1 -0
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.d.ts +2 -0
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.js +14 -0
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers/jsonSchemaListingHandlers.d.ts +8 -0
- package/dist/mocks/msw/handlers/jsonSchemaListingHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/jsonSchemaListingHandlers.js +30 -0
- package/dist/mocks/msw/handlers/jsonSchemaListingHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +55 -51
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/abstracts/_cssVariables.scss +13 -0
- package/dist/style/components/entity_finder/_details-view.scss +0 -10
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +2 -6
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +3 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +9 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +3 -3
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +40 -35
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/entity/index.d.ts +0 -2
- package/dist/synapse-queries/entity/index.d.ts.map +1 -1
- package/dist/synapse-queries/entity/index.js +8 -10
- package/dist/synapse-queries/index.d.ts +1 -0
- package/dist/synapse-queries/index.d.ts.map +1 -1
- package/dist/synapse-queries/index.js +136 -128
- package/dist/synapse-queries/index.js.map +1 -1
- package/dist/synapse-queries/jsonschema/index.d.ts +6 -0
- package/dist/synapse-queries/jsonschema/index.d.ts.map +1 -0
- package/dist/synapse-queries/jsonschema/index.js +6 -0
- package/dist/synapse-queries/jsonschema/useEntityBoundSchema.d.ts.map +1 -0
- package/dist/synapse-queries/{entity → jsonschema}/useEntityBoundSchema.js +1 -1
- package/dist/synapse-queries/jsonschema/useEntityBoundSchema.js.map +1 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemaVersions.d.ts +26 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemaVersions.d.ts.map +1 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemaVersions.js +36 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemaVersions.js.map +1 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemasInfinite.d.ts +8 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemasInfinite.d.ts.map +1 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemasInfinite.js +21 -0
- package/dist/synapse-queries/jsonschema/useListJsonSchemasInfinite.js.map +1 -0
- package/dist/synapse-queries/jsonschema/useListOrganizations.d.ts +8 -0
- package/dist/synapse-queries/jsonschema/useListOrganizations.d.ts.map +1 -0
- package/dist/synapse-queries/jsonschema/useListOrganizations.js +22 -0
- package/dist/synapse-queries/jsonschema/useListOrganizations.js.map +1 -0
- package/dist/synapse-queries/jsonschema/useSchema.d.ts.map +1 -0
- package/dist/synapse-queries/{entity → jsonschema}/useSchema.js +1 -1
- package/dist/synapse-queries/jsonschema/useSchema.js.map +1 -0
- package/dist/testutils/VirtualizedTableTestUtils.js +17 -0
- package/dist/testutils/VirtualizedTableTestUtils.js.map +1 -0
- package/dist/theme/palette/Palettes.d.ts.map +1 -1
- package/dist/theme/palette/Palettes.js +13 -0
- package/dist/theme/palette/Palettes.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +1 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/package.json +4 -4
- package/dist/synapse-queries/entity/useEntityBoundSchema.d.ts.map +0 -1
- package/dist/synapse-queries/entity/useEntityBoundSchema.js.map +0 -1
- package/dist/synapse-queries/entity/useSchema.d.ts.map +0 -1
- package/dist/synapse-queries/entity/useSchema.js.map +0 -1
- /package/dist/synapse-queries/{entity → jsonschema}/useEntityBoundSchema.d.ts +0 -0
- /package/dist/synapse-queries/{entity → jsonschema}/useSchema.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Once the user has scrolled within this many pixels of the bottom, fetch the next page. */
|
|
2
|
+
export declare const SCROLL_FETCH_THRESHOLD_PX = 500;
|
|
3
|
+
export type UseFetchNextPageOnScrollToBottomParams = {
|
|
4
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
hasNextPage?: boolean;
|
|
6
|
+
isFetchingNextPage?: boolean;
|
|
7
|
+
fetchNextPage?: () => Promise<unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Re-checks the scroll position whenever this changes, in case the container is already
|
|
10
|
+
* scrolled to the bottom -- e.g. on mount, or right after a fetch resolves with data that
|
|
11
|
+
* didn't fill the container.
|
|
12
|
+
*/
|
|
13
|
+
data: unknown;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Returns a scroll-event callback that fetches the next page of a paginated/infinite query once
|
|
17
|
+
* `containerRef`'s element is within {@link SCROLL_FETCH_THRESHOLD_PX} of its bottom. Also
|
|
18
|
+
* re-runs that check whenever `data` changes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useFetchNextPageOnScrollToBottom(params: UseFetchNextPageOnScrollToBottomParams): (containerRefElement?: HTMLDivElement | null) => void;
|
|
21
|
+
//# sourceMappingURL=useFetchNextPageOnScrollToBottom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchNextPageOnScrollToBottom.d.ts","sourceRoot":"","sources":["../../../src/components/TanStackTable/useFetchNextPageOnScrollToBottom.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAE5C,MAAM,MAAM,sCAAsC,GAAG;IACnD,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACpD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sCAAsC,0BAMrB,cAAc,GAAG,IAAI,UAsB/C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t } from "react";
|
|
2
|
+
//#region src/components/TanStackTable/useFetchNextPageOnScrollToBottom.ts
|
|
3
|
+
var n = 500;
|
|
4
|
+
function r(n) {
|
|
5
|
+
let { containerRef: r, hasNextPage: i, isFetchingNextPage: a, fetchNextPage: o, data: s } = n, c = e((e) => {
|
|
6
|
+
if (e) {
|
|
7
|
+
let { scrollHeight: t, scrollTop: n, clientHeight: r } = e;
|
|
8
|
+
t - n - r < 500 && !a && i && o && o();
|
|
9
|
+
}
|
|
10
|
+
}, [
|
|
11
|
+
o,
|
|
12
|
+
a,
|
|
13
|
+
i
|
|
14
|
+
]);
|
|
15
|
+
return t(() => {
|
|
16
|
+
c(r.current);
|
|
17
|
+
}, [s, c]), c;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as SCROLL_FETCH_THRESHOLD_PX, r as useFetchNextPageOnScrollToBottom };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=useFetchNextPageOnScrollToBottom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchNextPageOnScrollToBottom.js","names":[],"sources":["../../../src/components/TanStackTable/useFetchNextPageOnScrollToBottom.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\n\n/** Once the user has scrolled within this many pixels of the bottom, fetch the next page. */\nexport const SCROLL_FETCH_THRESHOLD_PX = 500\n\nexport type UseFetchNextPageOnScrollToBottomParams = {\n containerRef: React.RefObject<HTMLDivElement | null>\n hasNextPage?: boolean\n isFetchingNextPage?: boolean\n fetchNextPage?: () => Promise<unknown>\n /**\n * Re-checks the scroll position whenever this changes, in case the container is already\n * scrolled to the bottom -- e.g. on mount, or right after a fetch resolves with data that\n * didn't fill the container.\n */\n data: unknown\n}\n\n/**\n * Returns a scroll-event callback that fetches the next page of a paginated/infinite query once\n * `containerRef`'s element is within {@link SCROLL_FETCH_THRESHOLD_PX} of its bottom. Also\n * re-runs that check whenever `data` changes.\n */\nexport function useFetchNextPageOnScrollToBottom(\n params: UseFetchNextPageOnScrollToBottomParams,\n) {\n const { containerRef, hasNextPage, isFetchingNextPage, fetchNextPage, data } =\n params\n\n const fetchMoreOnBottomReached = useCallback(\n (containerRefElement?: HTMLDivElement | null) => {\n if (containerRefElement) {\n const { scrollHeight, scrollTop, clientHeight } = containerRefElement\n if (\n scrollHeight - scrollTop - clientHeight < SCROLL_FETCH_THRESHOLD_PX &&\n !isFetchingNextPage &&\n hasNextPage &&\n fetchNextPage\n ) {\n void fetchNextPage()\n }\n }\n },\n [fetchNextPage, isFetchingNextPage, hasNextPage],\n )\n\n useEffect(() => {\n fetchMoreOnBottomReached(containerRef.current)\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, [data, fetchMoreOnBottomReached])\n\n return fetchMoreOnBottomReached\n}\n"],"mappings":";;AAGA,IAAa,IAA4B;AAoBzC,SAAgB,EACd,GACA;CACA,IAAM,EAAE,iBAAc,gBAAa,uBAAoB,kBAAe,YACpE,GAEI,IAA2B,GAC9B,MAAgD;EAC/C,IAAI,GAAqB;GACvB,IAAM,EAAE,iBAAc,cAAW,oBAAiB;GAClD,AACE,IAAe,IAAY,IAAA,OAC3B,CAAC,KACD,KACA,KAEA,EAAmB;EAEvB;CACF,GACA;EAAC;EAAe;EAAoB;CAAW,CACjD;CAOA,OALA,QAAgB;EACd,EAAyB,EAAa,OAAO;CAE/C,GAAG,CAAC,GAAM,CAAwB,CAAC,GAE5B;AACT"}
|
|
@@ -2,8 +2,8 @@ import { BackendDestinationEnum as e, getEndpoint as t } from "../../../utils/fu
|
|
|
2
2
|
import { convertToEntityType as n, entityTypeToFriendlyName as r } from "../../../utils/functions/EntityTypeUtils.js";
|
|
3
3
|
import i from "../../FullWidthAlert/index.js";
|
|
4
4
|
import { useGetJson as a } from "../../../synapse-queries/entity/useEntity.js";
|
|
5
|
-
import { useGetSchemaBinding as o, useGetValidationResults as s } from "../../../synapse-queries/
|
|
6
|
-
import { useGetSchema as c } from "../../../synapse-queries/
|
|
5
|
+
import { useGetSchemaBinding as o, useGetValidationResults as s } from "../../../synapse-queries/jsonschema/useEntityBoundSchema.js";
|
|
6
|
+
import { useGetSchema as c } from "../../../synapse-queries/jsonschema/useSchema.js";
|
|
7
7
|
import { SkeletonTable as l } from "../../Skeleton/SkeletonTable.js";
|
|
8
8
|
import "../../Skeleton/index.js";
|
|
9
9
|
import { formatDate as u } from "../../../utils/functions/DateFormatter.js";
|
|
@@ -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/
|
|
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 void refetchEntityData(),\n // Refetch the validation information, which we use to determine if derived annotations may still be pending\n void 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,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EAAY,EAAc,IACrC,EAAY,GACT,IAAI,CAAsB,EAC1B,KAAK,IAAI,IACZ,EACE,EAAY,EAId;IACF,CAAA,CACF;MA1BK,CA0BL,CAEP,GACF,IACC,kBAAC,MAAD;IAAI,WAAU;cAAd,CACE,kBAAC,MAAD;KAAI,WAAU;eAAoC;IAE9C,CAAA,GACJ,kBAAC,MAAD;KAAI,WAAU;eACZ,kBAAC,KAAD;MACE,MAAM,GAAG,EACP,EAAuB,aACzB,EAAE,kCACA,EAAa,sBAAsB;MAErC,QAAO;MACP,KAAI;gBAEH,EAAa,sBAAsB;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityPageBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityPageBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAyBD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,KAAK,EAAE,0BAA0B,2CAWlC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { Breadcrumbs as e } from "../../../Breadcrumbs/Breadcrumbs.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.tsx
|
|
4
|
-
var n = 32, r =
|
|
4
|
+
var n = 32, r = {
|
|
5
5
|
marginTop: "0px",
|
|
6
6
|
padding: "20px 32px",
|
|
7
7
|
"& .MuiTypography-root": {
|
|
8
8
|
fontWeight: 440,
|
|
9
9
|
lineHeight: "20px",
|
|
10
|
-
color:
|
|
10
|
+
color: "greyV2.800"
|
|
11
11
|
},
|
|
12
|
-
"& .MuiLink-root": { "&:visited": { color:
|
|
12
|
+
"& .MuiLink-root": { "&:visited": { color: "greyV2.800" } },
|
|
13
13
|
"& .MuiSvgIcon-root": {
|
|
14
14
|
fontWeight: "300",
|
|
15
|
-
color:
|
|
15
|
+
color: "greyV2.800"
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
function
|
|
19
|
-
let { items: a } =
|
|
18
|
+
function i(i) {
|
|
19
|
+
let { items: a } = i;
|
|
20
20
|
return /* @__PURE__ */ t(e, {
|
|
21
21
|
items: a,
|
|
22
|
-
sx:
|
|
22
|
+
sx: r,
|
|
23
23
|
maxBreadcrumbLength: n,
|
|
24
24
|
iconVariant: "outlined"
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
export {
|
|
28
|
+
export { i as default };
|
|
29
29
|
|
|
30
30
|
//# sourceMappingURL=EntityPageBreadcrumbs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityPageBreadcrumbs.js","names":[],"sources":["../../../../../src/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.tsx"],"sourcesContent":["import {\n Breadcrumbs,\n BreadcrumbItem,\n} from '@/components/Breadcrumbs/Breadcrumbs'\nimport { SxProps } from '@mui/material'\n\ntype EntityPageBreadcrumbsProps = {\n items: BreadcrumbItem[]\n sx?: SxProps\n}\n\nconst ENTITY_PAGE_MAX_BREADCRUMB_LENGTH = 32\
|
|
1
|
+
{"version":3,"file":"EntityPageBreadcrumbs.js","names":[],"sources":["../../../../../src/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.tsx"],"sourcesContent":["import {\n Breadcrumbs,\n BreadcrumbItem,\n} from '@/components/Breadcrumbs/Breadcrumbs'\nimport { SxProps } from '@mui/material'\n\ntype EntityPageBreadcrumbsProps = {\n items: BreadcrumbItem[]\n sx?: SxProps\n}\n\nconst ENTITY_PAGE_MAX_BREADCRUMB_LENGTH = 32\n\nconst breadcrumbTextStyle: SxProps = {\n fontWeight: 440,\n lineHeight: '20px',\n color: 'greyV2.800',\n}\n\nconst entityPageBreadcrumbStyle: SxProps = {\n marginTop: '0px',\n padding: '20px 32px',\n ['& .MuiTypography-root']: breadcrumbTextStyle,\n ['& .MuiLink-root']: {\n '&:visited': {\n color: 'greyV2.800',\n },\n },\n ['& .MuiSvgIcon-root']: {\n fontWeight: '300',\n color: 'greyV2.800',\n },\n}\n\nexport default function EntityPageBreadcrumbs(\n props: EntityPageBreadcrumbsProps,\n) {\n const { items } = props\n return (\n <Breadcrumbs\n items={items}\n sx={entityPageBreadcrumbStyle}\n maxBreadcrumbLength={ENTITY_PAGE_MAX_BREADCRUMB_LENGTH}\n iconVariant=\"outlined\"\n />\n )\n}\n"],"mappings":";;;AAWA,IAAM,IAAoC,IAQpC,IAAqC;CACzC,WAAW;CACX,SAAS;CACR,yBAA0B;EAR3B,YAAY;EACZ,YAAY;EACZ,OAAO;CAMoB;CAC1B,mBAAoB,EACnB,aAAa,EACX,OAAO,aACT,EACF;CACC,sBAAuB;EACtB,YAAY;EACZ,OAAO;CACT;AACF;AAEA,SAAwB,EACtB,GACA;CACA,IAAM,EAAE,aAAU;CAClB,OACE,kBAAC,GAAD;EACS;EACP,IAAI;EACJ,qBAAqB;EACrB,aAAY;CACb,CAAA;AAEL"}
|
|
@@ -5,7 +5,6 @@ export type EntityPageTitleBarProps = {
|
|
|
5
5
|
entityActionMenuProps?: EntityActionMenuProps;
|
|
6
6
|
onActMemberClickAddConditionsForUse: () => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const FAVORITE_BUTTON_ICON_COLOR = "#9EAAB7";
|
|
9
8
|
/**
|
|
10
9
|
* The EntityPageTitleBar component is shown on every Entity page in Synapse, and shows an Entity's metadata and
|
|
11
10
|
* provides controls to view and manipulate the Entity.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityPageTitleBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"names":[],"mappings":"AAMA,OAAyB,EACvB,qBAAqB,EACtB,MAAM,iCAAiC,CAAA;AAKxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAE7C,mCAAmC,EAAE,MAAM,IAAI,CAAA;CAChD,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityPageTitleBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"names":[],"mappings":"AAMA,OAAyB,EACvB,qBAAqB,EACtB,MAAM,iCAAiC,CAAA;AAKxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAE7C,mCAAmC,EAAE,MAAM,IAAI,CAAA;CAChD,CAAA;AAKD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAuHxE"}
|
|
@@ -11,13 +11,13 @@ import { CopyToClipboardString as l } from "../../../CopyToClipboardString/CopyT
|
|
|
11
11
|
import { Avatar as u, Box as d, Skeleton as f, Stack as p, Typography as m } from "@mui/material";
|
|
12
12
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/entity/page/title_bar/EntityPageTitleBar.tsx
|
|
14
|
-
var _ = "#
|
|
15
|
-
function
|
|
16
|
-
let { entityId:
|
|
14
|
+
var _ = "#EAF0F5", v = "#497097";
|
|
15
|
+
function y(y) {
|
|
16
|
+
let { entityId: b, versionNumber: x, entityActionMenuProps: S } = y, C = S?.actionConfiguration.SHOW_VERSION_HISTORY?.onClick, { data: w, isLoading: T } = t(b, x), E = w?.entity && e(w.entity) ? w.entity.repositoryName : w?.entity?.name;
|
|
17
17
|
return /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(d, {
|
|
18
18
|
sx: {
|
|
19
19
|
padding: "20px 40px",
|
|
20
|
-
backgroundColor:
|
|
20
|
+
backgroundColor: _,
|
|
21
21
|
borderRadius: "5px"
|
|
22
22
|
},
|
|
23
23
|
children: /* @__PURE__ */ g(p, {
|
|
@@ -35,12 +35,12 @@ function S(_) {
|
|
|
35
35
|
flexGrow: 1
|
|
36
36
|
},
|
|
37
37
|
children: [/* @__PURE__ */ h(i, {
|
|
38
|
-
condition:
|
|
38
|
+
condition: T,
|
|
39
39
|
wrapper: f,
|
|
40
40
|
wrapperProps: { variant: "circular" },
|
|
41
41
|
children: /* @__PURE__ */ h(u, {
|
|
42
42
|
sx: {
|
|
43
|
-
bgcolor:
|
|
43
|
+
bgcolor: v,
|
|
44
44
|
height: 68,
|
|
45
45
|
width: 68,
|
|
46
46
|
borderRadius: "3px",
|
|
@@ -50,8 +50,8 @@ function S(_) {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
variant: "square",
|
|
53
|
-
children:
|
|
54
|
-
icon:
|
|
53
|
+
children: w?.entityType && /* @__PURE__ */ h(n, {
|
|
54
|
+
icon: w?.entityType ? r[w.entityType] : "file",
|
|
55
55
|
wrap: !1
|
|
56
56
|
})
|
|
57
57
|
})
|
|
@@ -68,42 +68,42 @@ function S(_) {
|
|
|
68
68
|
gap: "3px"
|
|
69
69
|
},
|
|
70
70
|
children: [/* @__PURE__ */ h(i, {
|
|
71
|
-
condition:
|
|
71
|
+
condition: T,
|
|
72
72
|
wrapper: f,
|
|
73
73
|
children: /* @__PURE__ */ h(m, {
|
|
74
74
|
variant: "headline2",
|
|
75
75
|
sx: {
|
|
76
|
-
color:
|
|
76
|
+
color: "greyV2.950",
|
|
77
77
|
fontWeight: 540
|
|
78
78
|
},
|
|
79
|
-
children:
|
|
79
|
+
children: E ?? "Name not set"
|
|
80
80
|
})
|
|
81
|
-
}),
|
|
82
|
-
entityId:
|
|
83
|
-
iconColor: "
|
|
81
|
+
}), w?.entity?.id && /* @__PURE__ */ h(a, {
|
|
82
|
+
entityId: w.entity.id,
|
|
83
|
+
iconColor: "greyV2.400"
|
|
84
84
|
})]
|
|
85
85
|
}),
|
|
86
86
|
/* @__PURE__ */ h(s, {
|
|
87
|
-
entityId:
|
|
88
|
-
versionNumber:
|
|
89
|
-
toggleShowVersionHistory:
|
|
87
|
+
entityId: b,
|
|
88
|
+
versionNumber: x,
|
|
89
|
+
toggleShowVersionHistory: C
|
|
90
90
|
}),
|
|
91
91
|
/* @__PURE__ */ h(l, {
|
|
92
|
-
value:
|
|
92
|
+
value: b,
|
|
93
93
|
icon: "rounded",
|
|
94
94
|
sx: { "& .MuiTypography-root": {
|
|
95
|
-
color:
|
|
95
|
+
color: "greyV2.800",
|
|
96
96
|
fontWeight: 440,
|
|
97
97
|
lineHeight: "20px"
|
|
98
98
|
} }
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
})]
|
|
102
|
-
}),
|
|
102
|
+
}), S && /* @__PURE__ */ h(o, { ...S })]
|
|
103
103
|
})
|
|
104
|
-
}), /* @__PURE__ */ h(c, { ...
|
|
104
|
+
}), /* @__PURE__ */ h(c, { ...y })] });
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
107
|
-
export {
|
|
107
|
+
export { y as default };
|
|
108
108
|
|
|
109
109
|
//# sourceMappingURL=EntityPageTitleBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityPageTitleBar.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { useGetEntityBundle } from '@/synapse-queries'\nimport { isDockerRepository } from '@/utils/types/IsType'\nimport { Avatar, Box, Skeleton, Stack, Typography } from '@mui/material'\nimport FavoriteButton from '../../../favorites/FavoriteButton'\nimport IconSvg, { type2SvgIconName } from '../../../IconSvg/IconSvg'\nimport EntityActionMenu, {\n EntityActionMenuProps,\n} from '../action_menu/EntityActionMenu'\nimport { EntityTitleBarVersionInfo } from './EntityTitleBarVersionInfo'\nimport TitleBarProperties from './TitleBarProperties'\nimport CopyToClipboardString from '@/components/CopyToClipboardString/CopyToClipboardString'\n\nexport type EntityPageTitleBarProps = {\n entityId: string\n versionNumber?: number\n /* Props that will be passed through to an EntityActionMenu component */\n entityActionMenuProps?: EntityActionMenuProps\n /* Callback invoked when an ACT member clicks \"Add Conditions for Use\". */\n onActMemberClickAddConditionsForUse: () => void\n}\n\
|
|
1
|
+
{"version":3,"file":"EntityPageTitleBar.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { useGetEntityBundle } from '@/synapse-queries'\nimport { isDockerRepository } from '@/utils/types/IsType'\nimport { Avatar, Box, Skeleton, Stack, Typography } from '@mui/material'\nimport FavoriteButton from '../../../favorites/FavoriteButton'\nimport IconSvg, { type2SvgIconName } from '../../../IconSvg/IconSvg'\nimport EntityActionMenu, {\n EntityActionMenuProps,\n} from '../action_menu/EntityActionMenu'\nimport { EntityTitleBarVersionInfo } from './EntityTitleBarVersionInfo'\nimport TitleBarProperties from './TitleBarProperties'\nimport CopyToClipboardString from '@/components/CopyToClipboardString/CopyToClipboardString'\n\nexport type EntityPageTitleBarProps = {\n entityId: string\n versionNumber?: number\n /* Props that will be passed through to an EntityActionMenu component */\n entityActionMenuProps?: EntityActionMenuProps\n /* Callback invoked when an ACT member clicks \"Add Conditions for Use\". */\n onActMemberClickAddConditionsForUse: () => void\n}\n\nconst TITLE_BAR_BACKGROUND_COLOR = '#EAF0F5'\nconst AVATAR_BACKGROUND_COLOR = '#497097'\n\n/**\n * The EntityPageTitleBar component is shown on every Entity page in Synapse, and shows an Entity's metadata and\n * provides controls to view and manipulate the Entity.\n */\nexport default function EntityPageTitleBar(props: EntityPageTitleBarProps) {\n const { entityId, versionNumber, entityActionMenuProps } = props\n\n const toggleShowVersionHistory =\n entityActionMenuProps?.actionConfiguration['SHOW_VERSION_HISTORY']?.onClick\n\n const { data: bundle, isLoading } = useGetEntityBundle(\n entityId,\n versionNumber,\n )\n\n const name =\n bundle?.entity && isDockerRepository(bundle.entity)\n ? bundle.entity.repositoryName\n : bundle?.entity?.name\n\n return (\n <div>\n <Box\n sx={{\n padding: '20px 40px',\n backgroundColor: TITLE_BAR_BACKGROUND_COLOR,\n borderRadius: '5px',\n }}\n >\n <Stack\n sx={{\n flexDirection: { xs: 'column', md: 'row' },\n alignItems: 'center',\n }}\n >\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n flexGrow: 1,\n }}\n >\n <ConditionalWrapper\n condition={isLoading}\n wrapper={Skeleton}\n wrapperProps={{\n variant: 'circular',\n }}\n >\n <Avatar\n sx={{\n bgcolor: AVATAR_BACKGROUND_COLOR,\n height: 68,\n width: 68,\n borderRadius: '3px',\n svg: {\n height: '36px',\n width: '36px',\n },\n }}\n variant={'square'}\n >\n {bundle?.entityType && (\n <IconSvg\n icon={\n bundle?.entityType\n ? type2SvgIconName[bundle.entityType]\n : 'file'\n }\n wrap={false}\n />\n )}\n </Avatar>\n </ConditionalWrapper>\n <Box sx={{ marginLeft: '10px', flexGrow: 1 }}>\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n gap: '3px',\n }}\n >\n <ConditionalWrapper condition={isLoading} wrapper={Skeleton}>\n <Typography\n variant={'headline2'}\n sx={{ color: 'greyV2.950', fontWeight: 540 }}\n >\n {name ?? 'Name not set'}\n </Typography>\n </ConditionalWrapper>\n {bundle?.entity?.id && (\n <FavoriteButton\n entityId={bundle.entity.id}\n iconColor={'greyV2.400'}\n />\n )}\n </Stack>\n <EntityTitleBarVersionInfo\n entityId={entityId}\n versionNumber={versionNumber}\n toggleShowVersionHistory={toggleShowVersionHistory}\n />\n <CopyToClipboardString\n value={entityId}\n icon=\"rounded\"\n sx={{\n '& .MuiTypography-root': {\n color: 'greyV2.800',\n fontWeight: 440,\n lineHeight: '20px',\n },\n }}\n />\n </Box>\n </Stack>\n {entityActionMenuProps && (\n <EntityActionMenu {...entityActionMenuProps} />\n )}\n </Stack>\n </Box>\n <TitleBarProperties {...props} />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAsBA,IAAM,IAA6B,WAC7B,IAA0B;AAMhC,SAAwB,EAAmB,GAAgC;CACzE,IAAM,EAAE,aAAU,kBAAe,6BAA0B,GAErD,IACJ,GAAuB,oBAAoB,sBAAyB,SAEhE,EAAE,MAAM,GAAQ,iBAAc,EAClC,GACA,CACF,GAEM,IACJ,GAAQ,UAAU,EAAmB,EAAO,MAAM,IAC9C,EAAO,OAAO,iBACd,GAAQ,QAAQ;CAEtB,OACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,iBAAiB;GACjB,cAAc;EAChB;YAEA,k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ntityTitleBarProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useGetEntityTitleBarProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAO3C,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACrB,cAAc,EAAE,CA8KlB"}
|
|
@@ -4,136 +4,130 @@ import { useGetEntityChildren as r } from "../../../../synapse-queries/entity/us
|
|
|
4
4
|
import "../../../../synapse-queries/index.js";
|
|
5
5
|
import { useGetDOIAssociation as i } from "../../../../synapse-queries/doi/useDOI.js";
|
|
6
6
|
import a from "../../../GenericCard/Linkify.js";
|
|
7
|
-
import
|
|
8
|
-
import s from "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { DoiObjectType as v, EntityType as y } from "@sage-bionetworks/synapse-client";
|
|
7
|
+
import o from "../../../../utils/hooks/useGetEntityMetadata.js";
|
|
8
|
+
import { useDataCiteUsage as s } from "./useDataCiteUsage.js";
|
|
9
|
+
import { useGetMentions as c } from "./useGetMentions.js";
|
|
10
|
+
import { CitationsDialog as l } from "./CitationsDialog.js";
|
|
11
|
+
import { CopyToClipboardString as u } from "../../../CopyToClipboardString/CopyToClipboardString.js";
|
|
12
|
+
import { useState as d } from "react";
|
|
13
|
+
import { Box as f, Link as p } from "@mui/material";
|
|
14
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
15
|
+
import { DoiObjectType as _, EntityType as v } from "@sage-bionetworks/synapse-client";
|
|
17
16
|
//#region src/components/entity/page/title_bar/useGetEntityTitleBarProperties.tsx
|
|
18
|
-
function
|
|
19
|
-
let { entityBundle:
|
|
20
|
-
parentId:
|
|
21
|
-
includeTypes: Object.values(
|
|
17
|
+
function y(y, b) {
|
|
18
|
+
let { entityBundle: x, fileHandle: S, downloadAlias: C, isContainer: w, fileHandleStorageInfo: T, uploadDestinationString: E } = o(y, b), [D, O] = d(!1), [k, A] = d(!1), { data: j } = r({
|
|
19
|
+
parentId: y,
|
|
20
|
+
includeTypes: Object.values(v),
|
|
22
21
|
includeTotalChildCount: !0
|
|
23
|
-
}, { enabled:
|
|
24
|
-
id:
|
|
22
|
+
}, { enabled: w }), M = x && !x.doiAssociation && n(x.entity) && x.entity.isLatestVersion, { data: N } = i({
|
|
23
|
+
id: y,
|
|
25
24
|
version: void 0,
|
|
26
|
-
type:
|
|
27
|
-
}, { enabled:
|
|
25
|
+
type: _.ENTITY
|
|
26
|
+
}, { enabled: M }), P = S?.contentSize && e(S.contentSize), F = T && "location" in T && T.location, I = T && "endpoint" in T && T.endpoint, L = T && "bucket" in T && T.bucket, R = T && "fileKey" in T && T.fileKey, z = T && "url" in T && T.url, B = S?.contentMd5, V = M ? N : x?.doiAssociation, { data: H } = s(V?.doiUri), U = V && `https://doi.org/${V?.doiUri}`, W = !!H && H.citationCount > 0, G = j?.totalChildCount, K = x?.entity && t(x.entity) ? ((x?.entity).items ?? []).length : null, { data: q } = c(y), J = !!q && q.length > 0;
|
|
28
27
|
return [
|
|
29
28
|
{
|
|
30
29
|
key: "id",
|
|
31
30
|
title: "SynID",
|
|
32
|
-
value: /* @__PURE__ */
|
|
31
|
+
value: /* @__PURE__ */ h(u, { value: y })
|
|
33
32
|
},
|
|
34
|
-
{
|
|
35
|
-
key: "access",
|
|
36
|
-
title: "Access",
|
|
37
|
-
value: /* @__PURE__ */ g(o, { entityId: b })
|
|
38
|
-
},
|
|
39
|
-
F && {
|
|
33
|
+
P && {
|
|
40
34
|
key: "fileSize",
|
|
41
35
|
title: "Size",
|
|
42
|
-
value:
|
|
36
|
+
value: P
|
|
43
37
|
},
|
|
44
|
-
|
|
38
|
+
G != null && {
|
|
45
39
|
key: "containerItems",
|
|
46
40
|
title: "Items",
|
|
47
|
-
value:
|
|
41
|
+
value: G.toLocaleString()
|
|
48
42
|
},
|
|
49
|
-
|
|
43
|
+
K != null && {
|
|
50
44
|
key: "entityRefCollectionItems",
|
|
51
45
|
title: "Items",
|
|
52
|
-
value:
|
|
46
|
+
value: K.toLocaleString()
|
|
53
47
|
},
|
|
54
|
-
|
|
48
|
+
U && {
|
|
55
49
|
key: "doi",
|
|
56
50
|
title: "DOI",
|
|
57
|
-
value: /* @__PURE__ */
|
|
58
|
-
value:
|
|
59
|
-
href:
|
|
51
|
+
value: /* @__PURE__ */ h(u, {
|
|
52
|
+
value: U,
|
|
53
|
+
href: U,
|
|
60
54
|
icon: "rounded"
|
|
61
55
|
})
|
|
62
56
|
},
|
|
63
|
-
|
|
57
|
+
W && {
|
|
64
58
|
key: "citations",
|
|
65
59
|
title: "Citations",
|
|
66
|
-
value: /* @__PURE__ */
|
|
67
|
-
onClick: () =>
|
|
68
|
-
children: [
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
-
open:
|
|
71
|
-
onClose: () =>
|
|
72
|
-
citations:
|
|
60
|
+
value: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(p, {
|
|
61
|
+
onClick: () => O(!0),
|
|
62
|
+
children: [H.citationCount.toLocaleString(), H.citationCount == 500 && "+"]
|
|
63
|
+
}), /* @__PURE__ */ h(l, {
|
|
64
|
+
open: D,
|
|
65
|
+
onClose: () => O(!1),
|
|
66
|
+
citations: H.citations
|
|
73
67
|
})] })
|
|
74
68
|
},
|
|
75
|
-
|
|
69
|
+
J && {
|
|
76
70
|
key: "mentions",
|
|
77
71
|
title: "Mentions",
|
|
78
|
-
value: /* @__PURE__ */
|
|
79
|
-
onClick: () =>
|
|
80
|
-
children:
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
-
open:
|
|
83
|
-
onClose: () =>
|
|
84
|
-
citations:
|
|
72
|
+
value: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
|
|
73
|
+
onClick: () => A(!0),
|
|
74
|
+
children: q.length.toLocaleString()
|
|
75
|
+
}), /* @__PURE__ */ h(l, {
|
|
76
|
+
open: k,
|
|
77
|
+
onClose: () => A(!1),
|
|
78
|
+
citations: q,
|
|
85
79
|
title: "Mentioned in"
|
|
86
80
|
})] })
|
|
87
81
|
},
|
|
88
|
-
|
|
82
|
+
B && {
|
|
89
83
|
key: "fileMd5",
|
|
90
84
|
title: "MD5",
|
|
91
|
-
value: /* @__PURE__ */
|
|
85
|
+
value: /* @__PURE__ */ h(u, { value: B })
|
|
92
86
|
},
|
|
93
|
-
!
|
|
87
|
+
!w && F && {
|
|
94
88
|
key: "fileStorageLocation",
|
|
95
89
|
title: "Storage Location",
|
|
96
|
-
value:
|
|
90
|
+
value: F
|
|
97
91
|
},
|
|
98
|
-
|
|
92
|
+
w && E && {
|
|
99
93
|
key: "uploadDestination",
|
|
100
94
|
title: "Upload Destination",
|
|
101
|
-
value:
|
|
95
|
+
value: E
|
|
102
96
|
},
|
|
103
|
-
|
|
97
|
+
I && {
|
|
104
98
|
key: "externalFileEndpoint",
|
|
105
99
|
title: "Endpoint",
|
|
106
|
-
value:
|
|
100
|
+
value: I
|
|
107
101
|
},
|
|
108
|
-
|
|
102
|
+
z && {
|
|
109
103
|
key: "externalUrl",
|
|
110
104
|
title: "URL",
|
|
111
|
-
value: /* @__PURE__ */
|
|
105
|
+
value: /* @__PURE__ */ h(a, { text: z })
|
|
112
106
|
},
|
|
113
|
-
|
|
107
|
+
L && {
|
|
114
108
|
key: "externalFileBucket",
|
|
115
109
|
title: "Bucket",
|
|
116
|
-
value:
|
|
110
|
+
value: L
|
|
117
111
|
},
|
|
118
|
-
|
|
112
|
+
R && {
|
|
119
113
|
key: "externalFileKey",
|
|
120
114
|
title: "File Key",
|
|
121
|
-
value:
|
|
115
|
+
value: R
|
|
122
116
|
},
|
|
123
|
-
|
|
117
|
+
C && {
|
|
124
118
|
key: "fileAlias",
|
|
125
119
|
title: "Alias",
|
|
126
|
-
value: /* @__PURE__ */
|
|
120
|
+
value: /* @__PURE__ */ g(m, { children: ["Name when downloaded will be: ", /* @__PURE__ */ h(f, {
|
|
127
121
|
sx: {
|
|
128
122
|
display: "inline",
|
|
129
123
|
fontFamily: "monospace"
|
|
130
124
|
},
|
|
131
|
-
children:
|
|
125
|
+
children: C
|
|
132
126
|
})] })
|
|
133
127
|
}
|
|
134
128
|
].filter((e) => !!e);
|
|
135
129
|
}
|
|
136
130
|
//#endregion
|
|
137
|
-
export {
|
|
131
|
+
export { y as useGetEntityTitleBarProperties };
|
|
138
132
|
|
|
139
133
|
//# sourceMappingURL=useGetEntityTitleBarProperties.js.map
|
|
@@ -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 isEntityRefCollectionView,\n isVersionableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport useGetEntityMetadata from '@/utils/hooks/useGetEntityMetadata'\nimport { Box, Link } 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 {
|
|
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 isEntityRefCollectionView,\n isVersionableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport useGetEntityMetadata from '@/utils/hooks/useGetEntityMetadata'\nimport { Box, Link } 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'\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 // 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 ].filter(item => !!item) as EntityProperty[]\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,EACd,GACA,GACkB;CAClB,IAA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B;GACf,KAAK;GACL,OAAO;GACP,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,kCACD,kBAAC,GAAD;IAAK,IAAI;KAAE,SAAS;KAAU,YAAY;IAAY;cACnD;GACE,CAAA,CACL,EAAA,CAAA;EAEN;CACF,EAAE,QAAO,MAAQ,CAAC,CAAC,CAAI;AACzB"}
|
|
@@ -12,6 +12,7 @@ export type StyledTableContainerProps = BoxProps & {
|
|
|
12
12
|
* @default false
|
|
13
13
|
*/
|
|
14
14
|
noStripedRows?: boolean;
|
|
15
|
+
noBackgroundColor?: boolean;
|
|
15
16
|
['data-testid']?: string;
|
|
16
17
|
};
|
|
17
18
|
export declare const StyledTableContainer: StyledComponent<StyledTableContainerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../src/components/styled/StyledTableContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAO,QAAQ,EAAU,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"StyledTableContainer.d.ts","sourceRoot":"","sources":["../../../src/components/styled/StyledTableContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAO,QAAQ,EAAU,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,yBAAyB,CAsFzE,CAAA"}
|