@openneuro/app 4.33.4 → 4.34.0-alpha.0
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/package.json +4 -3
- package/src/client.jsx +2 -1
- package/src/scripts/authentication/signOut.ts +1 -1
- package/src/scripts/common/containers/footer.tsx +1 -1
- package/src/scripts/common/containers/header.tsx +3 -2
- package/src/scripts/common/content/affiliate-content.jsx +72 -0
- package/src/scripts/common/content/assets/affiliates/bids.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/datalad.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/nih-bi-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/brand_mark.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-get.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-share.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-use.png +0 -0
- package/src/scripts/common/content/assets/front-page/ljaf.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_app.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_cube.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_data.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_users.png +0 -0
- package/src/scripts/common/content/assets/front-page/novo-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nru-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nsf.png +0 -0
- package/src/scripts/common/content/assets/front-page/sqm-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/squishymedia.png +0 -0
- package/src/scripts/common/content/assets/front-page/stanford.png +0 -0
- package/src/scripts/common/content/assets/modality-cubes/brain-initiative.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/eeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/ieeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/meg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/mri.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nih_cube.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nirs.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/pet-scan.jpg +0 -0
- package/src/scripts/common/content/assets/portal-content/nih-bi-brand.png +0 -0
- package/src/scripts/common/content/facet-content.jsx +186 -0
- package/src/scripts/common/content/front-page-content.jsx +177 -0
- package/src/scripts/common/content/image-attribution.tsx +3 -3
- package/src/scripts/common/content/modality-cube-content.jsx +92 -0
- package/src/scripts/common/content/portal-content.jsx +149 -0
- package/src/scripts/common/content/portal-grant-content.jsx +30 -0
- package/src/scripts/common/content/sortby-list.jsx +18 -0
- package/src/scripts/common/forms/warn-button.jsx +1 -1
- package/src/scripts/components/accordion/AccordionTab.tsx +68 -0
- package/src/scripts/components/accordion/AccordionWrap.tsx +22 -0
- package/src/scripts/components/accordion/__tests__/AccordionTab.spec.tsx +35 -0
- package/src/scripts/components/accordion/accordion.scss +68 -0
- package/src/scripts/components/activity-slider/ActivitySlider.tsx +121 -0
- package/src/scripts/components/activity-slider/slider.scss +130 -0
- package/src/scripts/components/affiliate-article/AffiliateArticle.tsx +26 -0
- package/src/scripts/components/affiliate-article/affiliate.scss +32 -0
- package/src/scripts/components/aggregate-count/AggregateCount.tsx +20 -0
- package/src/scripts/components/assets/activity-icon.png +0 -0
- package/src/scripts/components/assets/close-button.png +0 -0
- package/src/scripts/components/assets/favicon copy.ico +0 -0
- package/src/scripts/components/assets/favicon.ico +0 -0
- package/src/scripts/components/assets/get_data_browse.png +0 -0
- package/src/scripts/components/assets/get_data_download.png +0 -0
- package/src/scripts/components/assets/ljaf copy.png +0 -0
- package/src/scripts/components/assets/logo_app copy.png +0 -0
- package/src/scripts/components/assets/logo_cube copy.png +0 -0
- package/src/scripts/components/assets/logo_data copy.png +0 -0
- package/src/scripts/components/assets/logo_users copy.png +0 -0
- package/src/scripts/components/assets/mri-scan.jpg +0 -0
- package/src/scripts/components/assets/nih copy.png +0 -0
- package/src/scripts/components/assets/nih-bi-brand.jpg +0 -0
- package/src/scripts/components/assets/nih-stanford.jpg +0 -0
- package/src/scripts/components/assets/nih.png +0 -0
- package/src/scripts/components/assets/nimh.png +0 -0
- package/src/scripts/components/assets/nsf copy.png +0 -0
- package/src/scripts/components/assets/on-dark-horz.svg +1 -0
- package/src/scripts/components/assets/on-dark.svg +1 -0
- package/src/scripts/components/assets/on-light-horz.svg +1 -0
- package/src/scripts/components/assets/on-light.svg +1 -0
- package/src/scripts/components/assets/orcid_24x24 copy.png +0 -0
- package/src/scripts/components/assets/orcid_24x24.png +0 -0
- package/src/scripts/components/assets/share_data_collaborate.png +0 -0
- package/src/scripts/components/assets/share_data_publish.png +0 -0
- package/src/scripts/components/assets/share_data_validate.png +0 -0
- package/src/scripts/components/assets/squishymedia copy.png +0 -0
- package/src/scripts/components/assets/stanford copy.png +0 -0
- package/src/scripts/components/assets/tab-get_data.png +0 -0
- package/src/scripts/components/assets/tab-share_data.png +0 -0
- package/src/scripts/components/assets/tab-use_data.png +0 -0
- package/src/scripts/components/assets/use_data_analyze.png +0 -0
- package/src/scripts/components/assets/use_data_snapshot.png +0 -0
- package/src/scripts/components/button/Button.tsx +113 -0
- package/src/scripts/components/button/__tests__/Button.spec.tsx +21 -0
- package/src/scripts/components/button/button.scss +140 -0
- package/src/scripts/components/count-toggle/CountToggle.tsx +65 -0
- package/src/scripts/components/count-toggle/__tests__/CountToggle.spec.tsx +31 -0
- package/src/scripts/components/count-toggle/count-toggle.scss +34 -0
- package/src/scripts/components/dropdown/Dropdown.tsx +38 -0
- package/src/scripts/components/dropdown/dropdown.scss +29 -0
- package/src/scripts/components/facets/FacetRadio.tsx +43 -0
- package/src/scripts/components/facets/FacetRange.tsx +35 -0
- package/src/scripts/components/facets/FacetSearch.tsx +66 -0
- package/src/scripts/components/facets/FacetSelect.tsx +87 -0
- package/src/scripts/components/facets/SingleSelect.tsx +39 -0
- package/src/scripts/components/facets/__tests__/FacetSelect.spec.tsx +14 -0
- package/src/scripts/components/facets/__tests__/SingleSelect.spec.tsx +58 -0
- package/src/scripts/components/facets/facet.scss +244 -0
- package/src/scripts/components/footer/Footer.tsx +52 -0
- package/src/scripts/components/footer/footer.scss +20 -0
- package/src/scripts/components/formatting/__tests__/modality-label.spec.tsx +34 -0
- package/src/scripts/components/formatting/modality-label.tsx +34 -0
- package/src/scripts/components/front-page/ActivityHeader.tsx +12 -0
- package/src/scripts/components/front-page/AffiliateBlock.tsx +22 -0
- package/src/scripts/components/front-page/Contributors.tsx +28 -0
- package/src/scripts/components/front-page/GetUpdates.tsx +99 -0
- package/src/scripts/components/front-page/Infographic.tsx +36 -0
- package/src/scripts/components/front-page/front-page.scss +295 -0
- package/src/scripts/components/header/Header.tsx +151 -0
- package/src/scripts/components/header/LandingExpandedHeader.tsx +110 -0
- package/src/scripts/components/header/header.scss +409 -0
- package/src/scripts/components/icon/Icon.tsx +55 -0
- package/src/scripts/components/icon/__tests__/Icon.spec.tsx +10 -0
- package/src/scripts/components/icon/icon.scss +8 -0
- package/src/scripts/components/input/Input.tsx +137 -0
- package/src/scripts/components/input/TermSearch.tsx +101 -0
- package/src/scripts/components/input/input.scss +147 -0
- package/src/scripts/components/input/term-search.scss +68 -0
- package/src/scripts/components/json-tree/ExpandableProperty.tsx +35 -0
- package/src/scripts/components/json-tree/RecursiveProperty.tsx +67 -0
- package/src/scripts/components/json-tree/json-tree.scss +19 -0
- package/src/scripts/components/loading/Loading.tsx +19 -0
- package/src/scripts/components/loading/__tests__/Loading.spec.tsx +12 -0
- package/src/scripts/components/loading/loading.scss +141 -0
- package/src/scripts/components/logo/Logo.tsx +44 -0
- package/src/scripts/components/logo/__tests__/Logo.spec.tsx +22 -0
- package/src/scripts/components/modal/Modal.tsx +51 -0
- package/src/scripts/components/modal/ModalExample.tsx +25 -0
- package/src/scripts/components/modal/UserLoginModal.tsx +74 -0
- package/src/scripts/components/modal/__tests__/UserLoginModal.spec.tsx +37 -0
- package/src/scripts/components/modal/modal.scss +60 -0
- package/src/scripts/components/modality-cube/ModalityCube.tsx +60 -0
- package/src/scripts/components/modality-cube/modality-cube.scss +303 -0
- package/src/scripts/components/page/Page.tsx +61 -0
- package/src/scripts/components/page/page.scss +408 -0
- package/src/scripts/components/progress-bar/ProgressBar.tsx +16 -0
- package/src/scripts/components/progress-bar/progress-bar.scss +34 -0
- package/src/scripts/components/radio/Radio.tsx +33 -0
- package/src/scripts/components/radio/RadioGroup.tsx +45 -0
- package/src/scripts/components/radio/__tests__/RadioGroup.spec.tsx +31 -0
- package/src/scripts/components/radio/radio.scss +335 -0
- package/src/scripts/components/range/TwoHandleRange.scss +108 -0
- package/src/scripts/components/range/TwoHandleRange.tsx +128 -0
- package/src/scripts/components/range/__tests__/TwoHandleRange.spec.tsx +34 -0
- package/src/scripts/components/read-more/ReadMore.tsx +50 -0
- package/src/scripts/components/read-more/__tests__/ReadMore.spec.tsx +14 -0
- package/src/scripts/components/read-more/read-more.scss +79 -0
- package/src/scripts/components/scss/_flex-grid.scss +216 -0
- package/src/scripts/components/scss/_helper-classes.scss +162 -0
- package/src/scripts/components/scss/_normalize.scss +614 -0
- package/src/scripts/components/scss/_variables.scss +245 -0
- package/src/scripts/components/scss/global.scss +124 -0
- package/src/scripts/components/scss/toasts.scss +33 -0
- package/src/scripts/components/scss/upload-modal.scss +479 -0
- package/src/scripts/components/search-page/CommunityHeader.tsx +27 -0
- package/src/scripts/components/search-page/FacetBlockContainerExample.tsx +6 -0
- package/src/scripts/components/search-page/FilterDateItem.tsx +44 -0
- package/src/scripts/components/search-page/FilterListItem.tsx +62 -0
- package/src/scripts/components/search-page/FiltersBlock.tsx +277 -0
- package/src/scripts/components/search-page/ModalityHeader.tsx +64 -0
- package/src/scripts/components/search-page/NeurobagelSearch.tsx +59 -0
- package/src/scripts/components/search-page/SearchPage.tsx +114 -0
- package/src/scripts/components/search-page/SearchResultItem.tsx +417 -0
- package/src/scripts/components/search-page/SearchResultsList.tsx +48 -0
- package/src/scripts/components/search-page/SearchSort.tsx +52 -0
- package/src/scripts/components/search-page/SearchSortContainerExample.tsx +9 -0
- package/src/scripts/components/search-page/TermListItem.tsx +41 -0
- package/src/scripts/components/search-page/__tests__/NuerobagelSearch.spec.tsx +17 -0
- package/src/scripts/components/search-page/filters-block.scss +99 -0
- package/src/scripts/components/search-page/neurobagel_logo.svg +75 -0
- package/src/scripts/components/search-page/search-page.scss +505 -0
- package/src/scripts/components/search-page/search-result.scss +117 -0
- package/src/scripts/components/search-page/search-sort.scss +56 -0
- package/src/scripts/components/select/SelectGroup.tsx +41 -0
- package/src/scripts/components/select/__tests__/SelectGroup.spec.tsx +43 -0
- package/src/scripts/components/select/select.scss +40 -0
- package/src/scripts/components/textarea/Textarea.tsx +68 -0
- package/src/scripts/components/textarea/__tests__/Textarea.spec.tsx +53 -0
- package/src/scripts/components/tooltip/Tooltip.tsx +30 -0
- package/src/scripts/components/tooltip/__tests__/Tooltip.spec.tsx +14 -0
- package/src/scripts/components/tooltip/tooltip.scss +159 -0
- package/src/scripts/components/user/UserMenu.tsx +72 -0
- package/src/scripts/components/user/user-menu.scss +88 -0
- package/src/scripts/components/warn-button/WarnButton.tsx +97 -0
- package/src/scripts/components/warn-button/warn-button.scss +39 -0
- package/src/scripts/datalad/dataset/dataset-query-context.js +2 -0
- package/src/scripts/dataset/comments/comment.jsx +1 -1
- package/src/scripts/dataset/components/AnalyzeDropdown.tsx +2 -2
- package/src/scripts/dataset/components/CloneDropdown.tsx +2 -2
- package/src/scripts/dataset/components/DatasetEventItem.tsx +105 -0
- package/src/scripts/dataset/components/DatasetGitAccess.tsx +2 -2
- package/src/scripts/dataset/components/DatasetToolButton.tsx +2 -2
- package/src/scripts/dataset/components/ModalitiesMetaDataBlock.tsx +2 -10
- package/src/scripts/dataset/components/ValidationBlock.tsx +37 -2
- package/src/scripts/dataset/components/VersionList.tsx +1 -1
- package/src/scripts/dataset/components/scss/dataset-events.module.scss +41 -0
- package/src/scripts/dataset/dataset-query.jsx +12 -11
- package/src/scripts/dataset/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +7 -1
- package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +2 -2
- package/src/scripts/dataset/download/download-command-line.jsx +17 -13
- package/src/scripts/dataset/download/download-datalad.jsx +6 -3
- package/src/scripts/dataset/download/download-link.jsx +1 -1
- package/src/scripts/dataset/download/download-s3.jsx +0 -4
- package/src/scripts/dataset/files/file-display.jsx +1 -1
- package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +1 -1
- package/src/scripts/dataset/files/file-tree.tsx +1 -1
- package/src/scripts/dataset/files/file-view.jsx +1 -1
- package/src/scripts/dataset/files/file-viewer-type.jsx +5 -1
- package/src/scripts/dataset/files/file.tsx +2 -2
- package/src/scripts/dataset/files/files.tsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +1 -1
- package/src/scripts/dataset/files/viewers/file-viewer-markdown.tsx +13 -0
- package/src/scripts/dataset/fragments/cancel-button.tsx +1 -1
- package/src/scripts/dataset/fragments/dataset-citation.jsx +2 -2
- package/src/scripts/dataset/fragments/edit-button.tsx +1 -1
- package/src/scripts/dataset/fragments/edit-list.jsx +1 -1
- package/src/scripts/dataset/fragments/save-button.tsx +1 -1
- package/src/scripts/dataset/mutations/admin-exports.jsx +1 -1
- package/src/scripts/dataset/mutations/cache-clear.jsx +1 -1
- package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +2 -2
- package/src/scripts/dataset/mutations/dataset-events.tsx +187 -0
- package/src/scripts/dataset/mutations/dataset-relations.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-comment.jsx +1 -1
- package/src/scripts/dataset/mutations/delete-file.jsx +1 -1
- package/src/scripts/dataset/mutations/deprecate-version.tsx +1 -1
- package/src/scripts/dataset/mutations/flag-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/follow.tsx +1 -1
- package/src/scripts/dataset/mutations/import-dataset.tsx +1 -1
- package/src/scripts/dataset/mutations/publish.jsx +1 -1
- package/src/scripts/dataset/mutations/remove-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/remove-permissions.tsx +1 -1
- package/src/scripts/dataset/mutations/revalidate.jsx +2 -2
- package/src/scripts/dataset/mutations/snapshot.tsx +1 -1
- package/src/scripts/dataset/mutations/star.tsx +1 -1
- package/src/scripts/dataset/mutations/submit-metadata.jsx +1 -1
- package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +2 -2
- package/src/scripts/dataset/mutations/update-permissions.tsx +1 -1
- package/src/scripts/dataset/routes/admin-datalad.jsx +4 -0
- package/src/scripts/dataset/routes/dataset-default.tsx +1 -1
- package/src/scripts/dataset/routes/delete-page.tsx +7 -3
- package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +1 -1
- package/src/scripts/dataset/routes/manage-permissions.jsx +1 -1
- package/src/scripts/dataset/routes/snapshot-default.tsx +1 -1
- package/src/scripts/dataset/routes/snapshot.tsx +1 -1
- package/src/scripts/dataset/snapshot-container.tsx +14 -8
- package/src/scripts/pages/admin/flagged-files.jsx +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +1 -1
- package/src/scripts/pages/admin/users.tsx +2 -2
- package/src/scripts/pages/api.jsx +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -7
- package/src/scripts/pages/front-page/front-page.tsx +7 -9
- package/src/scripts/pages/metadata/dataset-metadata.tsx +1 -1
- package/src/scripts/search/__tests__/search-container.spec.tsx +7 -7
- package/src/scripts/search/filters-block-container.tsx +66 -9
- package/src/scripts/search/initial-search-params.tsx +7 -7
- package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +1 -1
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +1 -1
- package/src/scripts/search/inputs/age-range-input.tsx +3 -2
- package/src/scripts/search/inputs/author-input.tsx +3 -2
- package/src/scripts/search/inputs/dataset-type-select.tsx +3 -2
- package/src/scripts/search/inputs/date-radios.tsx +3 -2
- package/src/scripts/search/inputs/diagnosis-select.tsx +3 -2
- package/src/scripts/search/inputs/initiative-select.tsx +12 -6
- package/src/scripts/search/inputs/keyword-input.tsx +2 -2
- package/src/scripts/search/inputs/modality-select.tsx +28 -26
- package/src/scripts/search/inputs/pet/bodyParts_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +4 -3
- package/src/scripts/search/inputs/section-select.tsx +3 -2
- package/src/scripts/search/inputs/sex-radios.tsx +3 -2
- package/src/scripts/search/inputs/show-datasets-radios.tsx +4 -3
- package/src/scripts/search/inputs/sort-by-select.tsx +1 -1
- package/src/scripts/search/inputs/species-select.tsx +3 -2
- package/src/scripts/search/inputs/study-domain-input.tsx +4 -3
- package/src/scripts/search/inputs/subject-count-range-input.tsx +3 -2
- package/src/scripts/search/inputs/task-input.tsx +4 -3
- package/src/scripts/search/search-container.tsx +14 -17
- package/src/scripts/search/search-params-ctx.tsx +28 -5
- package/src/scripts/search/search-routes.tsx +2 -4
- package/src/scripts/search/use-search-results.tsx +14 -13
- package/src/scripts/uploader/upload-issues.tsx +1 -1
- package/src/scripts/uploader/upload-progress.jsx +1 -1
- package/src/scripts/uploader/uploader-modal.jsx +1 -1
- package/src/scripts/users/components/close-button.tsx +1 -1
- package/src/scripts/users/components/edit-button.tsx +1 -1
- package/src/scripts/users/components/edit-list.tsx +1 -1
- package/src/scripts/users/components/edit-string.tsx +1 -1
- package/src/scripts/users/dataset-card.tsx +2 -2
- package/src/scripts/users/user-notification-accordion.tsx +1 -1
- package/src/scripts/utils/user-login-modal-ctx.tsx +1 -1
- package/src/scripts/validation/validation-issues.tsx +2 -1
- package/src/scripts/validation/validation-panel.tsx +2 -1
- package/src/scripts/validation/validation-results.tsx +4 -3
- package/src/scripts/validation-legacy/validation-panel.jsx +2 -1
- package/src/scripts/validation-legacy/validation-results.issues.jsx +2 -3
- package/src/scripts/validation-legacy/validation-results.tsx +3 -4
- package/tsconfig.json +1 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { FC } from "react"
|
|
3
|
+
import "./warn-button.scss"
|
|
4
|
+
import { Tooltip } from "../tooltip/Tooltip"
|
|
5
|
+
import { Button } from "../button/Button"
|
|
6
|
+
|
|
7
|
+
export interface WarnButtonProps {
|
|
8
|
+
message?: string
|
|
9
|
+
icon?: string
|
|
10
|
+
className?: string
|
|
11
|
+
disabled?: boolean
|
|
12
|
+
tooltip?: string
|
|
13
|
+
iconOnly?: boolean
|
|
14
|
+
onConfirmedClick?: () => void
|
|
15
|
+
displayOptions?: boolean
|
|
16
|
+
setDisplayOptions?(cb: (currentState: boolean) => boolean): void
|
|
17
|
+
withLabel?: boolean
|
|
18
|
+
}
|
|
19
|
+
export const WarnButton: FC<WarnButtonProps> = ({
|
|
20
|
+
message,
|
|
21
|
+
icon,
|
|
22
|
+
className,
|
|
23
|
+
disabled,
|
|
24
|
+
tooltip,
|
|
25
|
+
iconOnly,
|
|
26
|
+
onConfirmedClick,
|
|
27
|
+
displayOptions,
|
|
28
|
+
setDisplayOptions,
|
|
29
|
+
withLabel,
|
|
30
|
+
}) => {
|
|
31
|
+
if (displayOptions === undefined || displayOptions === null) {
|
|
32
|
+
;[displayOptions, setDisplayOptions] = React.useState(false as boolean)
|
|
33
|
+
}
|
|
34
|
+
const viewAction = (
|
|
35
|
+
<div
|
|
36
|
+
className={withLabel ? "warn-btn-group with-label" : "warn-btn-group"}
|
|
37
|
+
role="group"
|
|
38
|
+
>
|
|
39
|
+
<div className="slide-in">
|
|
40
|
+
<Button
|
|
41
|
+
className="btn-warn-component cancel"
|
|
42
|
+
iconSize="12px"
|
|
43
|
+
iconOnly={iconOnly}
|
|
44
|
+
icon="fa fa-times"
|
|
45
|
+
color="#fff"
|
|
46
|
+
backgroundColor="#c00342"
|
|
47
|
+
onClick={() => setDisplayOptions((currentState) => !currentState)}
|
|
48
|
+
size="xsmall"
|
|
49
|
+
label="cancel"
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
<Button
|
|
53
|
+
className="btn-warn-component success"
|
|
54
|
+
iconSize="12px"
|
|
55
|
+
icon="fa fa-check"
|
|
56
|
+
color="#fff"
|
|
57
|
+
iconOnly={iconOnly}
|
|
58
|
+
backgroundColor="#00b489"
|
|
59
|
+
onClick={() => {
|
|
60
|
+
onConfirmedClick()
|
|
61
|
+
setDisplayOptions((currentState) => !currentState)
|
|
62
|
+
}}
|
|
63
|
+
size="xsmall"
|
|
64
|
+
label="confirm"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const hideAction = (
|
|
71
|
+
<span className={disabled ? " disabled warn-btn-click" : "warn-btn-click"}>
|
|
72
|
+
<Button
|
|
73
|
+
className="btn-warn-component"
|
|
74
|
+
iconSize="12px"
|
|
75
|
+
icon={"fa " + icon}
|
|
76
|
+
label={message}
|
|
77
|
+
onClick={() =>
|
|
78
|
+
setDisplayOptions((currentState) => !currentState)}
|
|
79
|
+
disabled={disabled}
|
|
80
|
+
/>
|
|
81
|
+
</span>
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
const button = displayOptions ? viewAction : hideAction
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div className={"warn-btn " + (className || "")}>
|
|
88
|
+
{tooltip
|
|
89
|
+
? (
|
|
90
|
+
<Tooltip flow="up" tooltip={tooltip}>
|
|
91
|
+
{button}
|
|
92
|
+
</Tooltip>
|
|
93
|
+
)
|
|
94
|
+
: button}
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.warn-btn {
|
|
2
|
+
.btn-warn-component {
|
|
3
|
+
padding: 10px;
|
|
4
|
+
}
|
|
5
|
+
.slide-in {
|
|
6
|
+
display: flex;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
.warn-btn-group {
|
|
10
|
+
opacity: 1;
|
|
11
|
+
transition: opacity 0.3s;
|
|
12
|
+
animation: fade 0.4s;
|
|
13
|
+
animation-iteration-count: 1;
|
|
14
|
+
animation-fill-mode: forwards;
|
|
15
|
+
button {
|
|
16
|
+
margin: 5px;
|
|
17
|
+
padding: 6px;
|
|
18
|
+
width: 26px;
|
|
19
|
+
height: 26px;
|
|
20
|
+
&:hover {
|
|
21
|
+
opacity: 0.8;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&.with-label {
|
|
25
|
+
button {
|
|
26
|
+
width: auto;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes fade {
|
|
33
|
+
0% {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -10,7 +10,7 @@ import AdminUser from "../../authentication/admin-user.jsx"
|
|
|
10
10
|
import LoggedIn from "../../authentication/logged-in.jsx"
|
|
11
11
|
import { toast } from "react-toastify"
|
|
12
12
|
import ToastContent from "../../common/partials/toast-content"
|
|
13
|
-
import { Icon } from "
|
|
13
|
+
import { Icon } from "../../components/icon/Icon"
|
|
14
14
|
import { Username } from "../../users/username"
|
|
15
15
|
|
|
16
16
|
const Comment = ({ datasetId, data, children }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { Dropdown } from "
|
|
3
|
-
import { Button } from "
|
|
2
|
+
import { Dropdown } from "../../components/dropdown/Dropdown"
|
|
3
|
+
import { Button } from "../../components/button/Button"
|
|
4
4
|
import styled from "@emotion/styled"
|
|
5
5
|
import BrainlifeIcon from "../../../assets/external/brainlife.png"
|
|
6
6
|
import NemarIcon from "../../../assets/external/nemar.png"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { Dropdown } from "
|
|
3
|
-
import { Button } from "
|
|
2
|
+
import { Dropdown } from "../../components/dropdown/Dropdown"
|
|
3
|
+
import { Button } from "../../components/button/Button"
|
|
4
4
|
|
|
5
5
|
export interface CloneDropdownProps {
|
|
6
6
|
gitAccess: React.ReactNode
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react"
|
|
2
|
+
import styles from "./scss/dataset-events.module.scss"
|
|
3
|
+
|
|
4
|
+
interface Event {
|
|
5
|
+
id: string
|
|
6
|
+
timestamp: string
|
|
7
|
+
note?: string
|
|
8
|
+
event: { type: string }
|
|
9
|
+
user?: { name?: string; email?: string }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface DatasetEventItemProps {
|
|
13
|
+
event: Event
|
|
14
|
+
editingNoteId: string | null
|
|
15
|
+
updatedNote: string
|
|
16
|
+
startEditingNote: (id: string, note: string) => void
|
|
17
|
+
handleUpdateNote: () => void
|
|
18
|
+
setUpdatedNote: (note: string) => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const DatasetEventItem: React.FC<DatasetEventItemProps> = ({
|
|
22
|
+
event,
|
|
23
|
+
editingNoteId,
|
|
24
|
+
updatedNote,
|
|
25
|
+
startEditingNote,
|
|
26
|
+
handleUpdateNote,
|
|
27
|
+
setUpdatedNote,
|
|
28
|
+
}) => {
|
|
29
|
+
const textareaRef = useRef<HTMLTextAreaElement | null>(null)
|
|
30
|
+
|
|
31
|
+
// Function to adjust/resize the height
|
|
32
|
+
const adjustTextareaHeight = () => {
|
|
33
|
+
if (textareaRef.current) {
|
|
34
|
+
textareaRef.current.style.height = "auto"
|
|
35
|
+
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
adjustTextareaHeight()
|
|
41
|
+
}, [updatedNote])
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<li>
|
|
45
|
+
<div className="grid faux-table">
|
|
46
|
+
<div className="col-lg col col-5">
|
|
47
|
+
{editingNoteId === event.id
|
|
48
|
+
? (
|
|
49
|
+
<textarea
|
|
50
|
+
ref={textareaRef}
|
|
51
|
+
className={styles.dse_inlineForm}
|
|
52
|
+
value={updatedNote}
|
|
53
|
+
onChange={(e) => {
|
|
54
|
+
setUpdatedNote(e.target.value)
|
|
55
|
+
adjustTextareaHeight()
|
|
56
|
+
}}
|
|
57
|
+
style={{ overflow: "hidden", resize: "none" }}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
: event.event.type === "note"
|
|
61
|
+
? (
|
|
62
|
+
<pre
|
|
63
|
+
style={{
|
|
64
|
+
whiteSpace: "pre-wrap",
|
|
65
|
+
margin: 0,
|
|
66
|
+
background: "transparent",
|
|
67
|
+
overflow: "visible",
|
|
68
|
+
border: 0,
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
{event.note}
|
|
72
|
+
</pre>
|
|
73
|
+
)
|
|
74
|
+
: (
|
|
75
|
+
event.event.type
|
|
76
|
+
)}
|
|
77
|
+
</div>
|
|
78
|
+
<div className="col-lg col col-3">
|
|
79
|
+
{new Date(event.timestamp).toLocaleString()}
|
|
80
|
+
</div>
|
|
81
|
+
<div className="col-lg col col-3">
|
|
82
|
+
{event.user?.name || event.user?.email || "Unknown"}
|
|
83
|
+
</div>
|
|
84
|
+
<div className="col-lg col col-1">
|
|
85
|
+
{event.event.type === "note" && editingNoteId !== event.id && (
|
|
86
|
+
<button
|
|
87
|
+
onClick={() => startEditingNote(event.id, event.note || "")}
|
|
88
|
+
className="on-button on-button--small on-button--primary"
|
|
89
|
+
>
|
|
90
|
+
Edit
|
|
91
|
+
</button>
|
|
92
|
+
)}
|
|
93
|
+
{editingNoteId === event.id && (
|
|
94
|
+
<button
|
|
95
|
+
onClick={handleUpdateNote}
|
|
96
|
+
className="on-button on-button--small on-button--primary"
|
|
97
|
+
>
|
|
98
|
+
Save
|
|
99
|
+
</button>
|
|
100
|
+
)}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</li>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { Tooltip } from "
|
|
3
|
-
import { Button } from "
|
|
2
|
+
import { Tooltip } from "../../components/tooltip/Tooltip"
|
|
3
|
+
import { Button } from "../../components/button/Button"
|
|
4
4
|
|
|
5
5
|
function copyToClipboard(text) {
|
|
6
6
|
navigator.clipboard.writeText(text)
|
|
@@ -2,8 +2,8 @@ import React from "react"
|
|
|
2
2
|
import styled from "@emotion/styled"
|
|
3
3
|
import type { StyledComponent } from "@emotion/styled"
|
|
4
4
|
import { Link } from "react-router-dom"
|
|
5
|
-
import { Tooltip } from "
|
|
6
|
-
import { Icon } from "
|
|
5
|
+
import { Tooltip } from "../../components/tooltip/Tooltip"
|
|
6
|
+
import { Icon } from "../../components/icon/Icon"
|
|
7
7
|
import { useLocation } from "react-router-dom"
|
|
8
8
|
|
|
9
9
|
interface DatasetToolStyleProps {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Link } from "react-router-dom"
|
|
3
|
+
import { ModalityLabel } from "../../components/formatting/modality-label"
|
|
3
4
|
|
|
4
5
|
export interface ModalitiesMetaDataBlockProps {
|
|
5
6
|
items: string[]
|
|
@@ -10,21 +11,12 @@ export const ModalitiesMetaDataBlock = ({
|
|
|
10
11
|
items,
|
|
11
12
|
className,
|
|
12
13
|
}: ModalitiesMetaDataBlockProps) => {
|
|
13
|
-
const customCase = {
|
|
14
|
-
mri: "MRI",
|
|
15
|
-
ieeg: "iEEG",
|
|
16
|
-
pet: "PET",
|
|
17
|
-
eeg: "EEG",
|
|
18
|
-
meg: "MEG",
|
|
19
|
-
}
|
|
20
14
|
return (
|
|
21
15
|
<div className={"dataset-meta-block " + className}>
|
|
22
16
|
<h2 className="dmb-heading">Available Modalities</h2>
|
|
23
17
|
{items.map((item, index) => (
|
|
24
18
|
<Link key={index} to={"/search/modality/" + item.toLowerCase()}>
|
|
25
|
-
{item
|
|
26
|
-
? customCase[item.toLowerCase()]
|
|
27
|
-
: item}
|
|
19
|
+
<ModalityLabel modality={item} />
|
|
28
20
|
</Link>
|
|
29
21
|
))}
|
|
30
22
|
</div>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { useContext } from "react"
|
|
2
|
+
import * as Sentry from "@sentry/react"
|
|
2
3
|
import { Validation, ValidationPending } from "../../validation/validation"
|
|
3
4
|
import LegacyValidation from "../../validation-legacy/validation.jsx"
|
|
4
5
|
import type { Issue } from "@bids/validator/issues"
|
|
6
|
+
import DatasetQueryContext from "../../datalad/dataset/dataset-query-context.js"
|
|
5
7
|
|
|
6
8
|
// TODO - Generate from GraphQL
|
|
7
9
|
interface CodeMessageInput {
|
|
@@ -38,6 +40,40 @@ export const ValidationBlock: React.FC<ValidationBlockProps> = ({
|
|
|
38
40
|
issuesStatus,
|
|
39
41
|
validation,
|
|
40
42
|
}) => {
|
|
43
|
+
const { stopPolling, startPolling } = useContext(DatasetQueryContext)
|
|
44
|
+
|
|
45
|
+
// Function to stop polling if issuesStatus or validation exists
|
|
46
|
+
const stopPollingValidation = () => {
|
|
47
|
+
if (issuesStatus || validation) {
|
|
48
|
+
if (typeof stopPolling === "function") {
|
|
49
|
+
try {
|
|
50
|
+
stopPolling()
|
|
51
|
+
} catch (error) {
|
|
52
|
+
Sentry.captureException(error)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Function to start polling if ValidationPending is shown.
|
|
59
|
+
const startPollingValidation = () => {
|
|
60
|
+
if (!issuesStatus && !validation) {
|
|
61
|
+
if (typeof startPolling === "function") {
|
|
62
|
+
try {
|
|
63
|
+
startPolling(10000) // 10s poll interval
|
|
64
|
+
} catch (error) {
|
|
65
|
+
Sentry.captureException(error)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Stop polling on render if validation or issuesStatus exists.
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
stopPollingValidation()
|
|
74
|
+
startPollingValidation()
|
|
75
|
+
}, [issuesStatus, validation, stopPolling, startPolling])
|
|
76
|
+
|
|
41
77
|
if (issuesStatus) {
|
|
42
78
|
return (
|
|
43
79
|
<div className="validation-accordion">
|
|
@@ -49,7 +85,6 @@ export const ValidationBlock: React.FC<ValidationBlockProps> = ({
|
|
|
49
85
|
</div>
|
|
50
86
|
)
|
|
51
87
|
} else {
|
|
52
|
-
// If data exists, populate this. Otherwise we show pending.
|
|
53
88
|
if (validation) {
|
|
54
89
|
return (
|
|
55
90
|
<div className="validation-accordion">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Link } from "react-router-dom"
|
|
3
|
-
import { Dropdown } from "
|
|
3
|
+
import { Dropdown } from "../../components/dropdown/Dropdown"
|
|
4
4
|
import { formatDate } from "../../utils/date"
|
|
5
5
|
|
|
6
6
|
export interface VersionListProps {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.datasetEvents {
|
|
2
|
+
.datasetEventHeader {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
ul {
|
|
8
|
+
list-style: none;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
li {
|
|
12
|
+
padding: 0;
|
|
13
|
+
&:nth-child(odd) {
|
|
14
|
+
background-color: #f4f4f4;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
.addEventForm {
|
|
19
|
+
width: 50%;
|
|
20
|
+
margin: 10px auto 30px;
|
|
21
|
+
text-align: right;
|
|
22
|
+
input {
|
|
23
|
+
min-width: 100%;
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
textarea {
|
|
27
|
+
margin: 20px 0 10px;
|
|
28
|
+
min-width: 100%;
|
|
29
|
+
display: block;
|
|
30
|
+
min-height: 100px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dse_inlineForm{
|
|
36
|
+
width: 100%;
|
|
37
|
+
margin:0 0 0 -20px;
|
|
38
|
+
padding: 10px 20px;
|
|
39
|
+
line-height: 20px;
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -3,7 +3,7 @@ import * as Sentry from "@sentry/react"
|
|
|
3
3
|
import PropTypes from "prop-types"
|
|
4
4
|
import { useNavigate, useParams } from "react-router-dom"
|
|
5
5
|
import { useApolloClient, useQuery } from "@apollo/client"
|
|
6
|
-
import { Loading } from "
|
|
6
|
+
import { Loading } from "../components/loading/Loading"
|
|
7
7
|
|
|
8
8
|
import DatasetQueryContext from "../datalad/dataset/dataset-query-context.js"
|
|
9
9
|
import DatasetContext from "../datalad/dataset/dataset-context.js"
|
|
@@ -25,15 +25,15 @@ import { getDatasetPage, getDraftPage } from "../queries/dataset"
|
|
|
25
25
|
*/
|
|
26
26
|
export const DatasetQueryHook = ({ datasetId, draft }) => {
|
|
27
27
|
const navigate = useNavigate()
|
|
28
|
-
const { data, loading, error, fetchMore } =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
const { data, loading, error, fetchMore, stopPolling, startPolling } =
|
|
29
|
+
useQuery(
|
|
30
|
+
draft ? getDraftPage : getDatasetPage,
|
|
31
|
+
{
|
|
32
|
+
variables: { datasetId },
|
|
33
|
+
fetchPolicy: "cache-and-network",
|
|
34
|
+
nextFetchPolicy: "cache-first",
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
37
|
if (error) {
|
|
38
38
|
if (error.message === "You do not have access to read this dataset.") {
|
|
39
39
|
return <FourOThreePage />
|
|
@@ -61,7 +61,6 @@ export const DatasetQueryHook = ({ datasetId, draft }) => {
|
|
|
61
61
|
)
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
64
|
return (
|
|
66
65
|
<DatasetContext.Provider value={data.dataset}>
|
|
67
66
|
<ErrorBoundary subject={"error in dataset page"}>
|
|
@@ -70,6 +69,8 @@ export const DatasetQueryHook = ({ datasetId, draft }) => {
|
|
|
70
69
|
datasetId,
|
|
71
70
|
fetchMore,
|
|
72
71
|
error,
|
|
72
|
+
stopPolling,
|
|
73
|
+
startPolling,
|
|
73
74
|
}}
|
|
74
75
|
>
|
|
75
76
|
<DatasetRoutes dataset={data.dataset} />
|
package/src/scripts/dataset/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap
CHANGED
|
@@ -6,7 +6,13 @@ exports[`dataset/download > DownloadSampleCommand component > renders successful
|
|
|
6
6
|
class="css-xak41w"
|
|
7
7
|
role="figure"
|
|
8
8
|
>
|
|
9
|
-
|
|
9
|
+
# Login by following the prompts
|
|
10
|
+
<br />
|
|
11
|
+
deno run -A jsr:@openneuro/cli login
|
|
12
|
+
<br />
|
|
13
|
+
# Download the repository
|
|
14
|
+
<br />
|
|
15
|
+
deno run -A jsr:@openneuro/cli download --draft ds000001 ds000001-download/
|
|
10
16
|
</pre>
|
|
11
17
|
</DocumentFragment>
|
|
12
18
|
`;
|
|
@@ -13,11 +13,11 @@ describe("dataset/download", () => {
|
|
|
13
13
|
it("drafts show draft flag", () => {
|
|
14
14
|
render(<DownloadSampleCommand {...defProps} />)
|
|
15
15
|
expect(screen.getByRole("figure")).toHaveTextContent("--draft")
|
|
16
|
-
expect(screen.queryByText("--
|
|
16
|
+
expect(screen.queryByText("--version")).not.toBeInTheDocument()
|
|
17
17
|
})
|
|
18
18
|
it("snapshots show snapshot flag", () => {
|
|
19
19
|
render(<DownloadSampleCommand {...defProps} snapshotTag="1.0.0" />)
|
|
20
|
-
expect(screen.getByRole("figure")).toHaveTextContent("--
|
|
20
|
+
expect(screen.getByRole("figure")).toHaveTextContent("--version")
|
|
21
21
|
expect(screen.queryByText("--draft")).not.toBeInTheDocument()
|
|
22
22
|
})
|
|
23
23
|
})
|
|
@@ -4,9 +4,12 @@ import ShellExample from "./shell-example.jsx"
|
|
|
4
4
|
|
|
5
5
|
export const DownloadSampleCommand = ({ datasetId, snapshotTag }) => (
|
|
6
6
|
<ShellExample role="figure">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
# Login by following the prompts<br />
|
|
8
|
+
deno run -A jsr:@openneuro/cli login<br />
|
|
9
|
+
# Download the repository<br />
|
|
10
|
+
deno run -A jsr:@openneuro/cli download{" "}
|
|
11
|
+
{snapshotTag ? `--version ${snapshotTag}` : "--draft"} {datasetId}{" "}
|
|
12
|
+
{datasetId}
|
|
10
13
|
-download/
|
|
11
14
|
</ShellExample>
|
|
12
15
|
)
|
|
@@ -18,22 +21,23 @@ DownloadSampleCommand.propTypes = {
|
|
|
18
21
|
|
|
19
22
|
const DownloadCommandLine = ({ datasetId, snapshotTag }) => (
|
|
20
23
|
<div>
|
|
21
|
-
<h4>Download with
|
|
24
|
+
<h4>Download with Deno</h4>
|
|
22
25
|
<p>
|
|
23
|
-
Using{" "}
|
|
24
|
-
<a href="https://www.npmjs.com/package/@openneuro/cli">@openneuro/cli</a>
|
|
25
|
-
{" "}
|
|
26
|
+
Using <a href="https://jsr.io/@openneuro/cli">@openneuro/cli</a>{" "}
|
|
26
27
|
you can download this dataset from the command line using{" "}
|
|
27
|
-
<a href="https://
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
<a href="https://docs.deno.com/runtime/getting_started/installation/">
|
|
29
|
+
Deno
|
|
30
|
+
</a>.
|
|
30
31
|
</p>
|
|
31
32
|
<DownloadSampleCommand datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
32
33
|
<p>
|
|
33
|
-
This will download to {datasetId}
|
|
34
|
-
-download/ in the current directory.
|
|
35
|
-
|
|
34
|
+
This will download a DataLad dataset to {datasetId}
|
|
35
|
+
-download/ in the current directory. To download annexed files, use
|
|
36
|
+
datalad or git-annex.
|
|
36
37
|
</p>
|
|
38
|
+
<ShellExample>
|
|
39
|
+
cd {datasetId}-download && datalad get [PATH]
|
|
40
|
+
</ShellExample>
|
|
37
41
|
</div>
|
|
38
42
|
)
|
|
39
43
|
|
|
@@ -27,9 +27,12 @@ const DownloadDataladExample = ({
|
|
|
27
27
|
.git
|
|
28
28
|
</ShellExample>
|
|
29
29
|
{hasEdit && (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<>
|
|
31
|
+
<p>Directly from OpenNeuro:</p>
|
|
32
|
+
<ShellExample>
|
|
33
|
+
datalad install {config.url}/git/{workerId}/{datasetId}
|
|
34
|
+
</ShellExample>
|
|
35
|
+
</>
|
|
33
36
|
)}
|
|
34
37
|
</>
|
|
35
38
|
)
|
|
@@ -2,7 +2,7 @@ import React from "react"
|
|
|
2
2
|
import PropTypes from "prop-types"
|
|
3
3
|
import { downloadNative } from "./download-native.js"
|
|
4
4
|
import { useApolloClient } from "@apollo/client"
|
|
5
|
-
import { Button } from "
|
|
5
|
+
import { Button } from "../../components/button/Button"
|
|
6
6
|
|
|
7
7
|
const DownloadLink = ({ datasetId, snapshotTag }) => {
|
|
8
8
|
const client = useApolloClient()
|
|
@@ -25,10 +25,6 @@ const DownloadS3Instructions = ({ datasetId, s3Bucket }) => (
|
|
|
25
25
|
uses <a href="https://aws.amazon.com/cli/">AWS CLI.</a>
|
|
26
26
|
</p>
|
|
27
27
|
<DownloadSampleS3 datasetId={datasetId} s3Bucket={s3Bucket} />
|
|
28
|
-
<p>
|
|
29
|
-
To download unpublished datasets or older snapshots, see advanced methods
|
|
30
|
-
below.
|
|
31
|
-
</p>
|
|
32
28
|
</div>
|
|
33
29
|
)
|
|
34
30
|
|
|
@@ -8,7 +8,7 @@ import { Media } from "../../styles/media"
|
|
|
8
8
|
import { DatasetPageBorder } from "../routes/styles/dataset-page-border"
|
|
9
9
|
import DatasetQueryContext from "../../datalad/dataset/dataset-query-context"
|
|
10
10
|
import { fetchMoreDirectory } from "./file-tree-unloaded-directory.jsx"
|
|
11
|
-
import { Loading } from "
|
|
11
|
+
import { Loading } from "../../components/loading/Loading"
|
|
12
12
|
|
|
13
13
|
const PathBreadcrumb = styled.div`
|
|
14
14
|
font-size: 14px;
|
|
@@ -2,7 +2,7 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import PropTypes from "prop-types"
|
|
3
3
|
import DatasetQueryContext from "../../datalad/dataset/dataset-query-context.js"
|
|
4
4
|
import { gql } from "@apollo/client"
|
|
5
|
-
import { AccordionTab } from "
|
|
5
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
6
6
|
|
|
7
7
|
export const DRAFT_FILES_QUERY = gql`
|
|
8
8
|
query dataset($datasetId: ID!, $tree: String!) {
|
|
@@ -4,7 +4,7 @@ import UpdateFile from "../mutations/update-file.jsx"
|
|
|
4
4
|
import DeleteFile from "../mutations/delete-file.jsx"
|
|
5
5
|
import FileTreeUnloadedDirectory from "./file-tree-unloaded-directory.jsx"
|
|
6
6
|
import { Media } from "../../styles/media"
|
|
7
|
-
import { AccordionTab } from "
|
|
7
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
8
8
|
import type { DatasetFile } from "../../types/dataset-file"
|
|
9
9
|
|
|
10
10
|
export const unescapePath = (path: string): string => path.replace(/:/g, "/")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react"
|
|
2
|
-
import { Loading } from "
|
|
2
|
+
import { Loading } from "../../components/loading/Loading"
|
|
3
3
|
import FileViewerType from "./file-viewer-type.jsx"
|
|
4
4
|
import { isNifti, isNwb } from "./file-types"
|
|
5
5
|
|