@openneuro/app 4.20.4 → 4.20.6-alpha.2
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/__mocks__/fileMock.js +1 -1
- package/package.json +5 -5
- package/pluralize-esm.js +204 -211
- package/src/@types/custom.d.ts +3 -3
- package/src/@types/react.d.ts +3 -4
- package/src/client.jsx +17 -16
- package/src/scripts/__mocks__/config.ts +6 -6
- package/src/scripts/__utils__/mock-app-shell.tsx +9 -8
- package/src/scripts/apm.js +6 -6
- package/src/scripts/app.tsx +7 -7
- package/src/scripts/authentication/__tests__/profile.spec.js +10 -10
- package/src/scripts/authentication/admin-user.jsx +2 -2
- package/src/scripts/authentication/logged-in.jsx +2 -2
- package/src/scripts/authentication/logged-out.jsx +2 -2
- package/src/scripts/authentication/loginCheck.js +2 -2
- package/src/scripts/authentication/loginUrls.ts +1 -1
- package/src/scripts/authentication/profile.ts +7 -7
- package/src/scripts/authentication/regular-user.tsx +3 -3
- package/src/scripts/authentication/signOut.ts +2 -2
- package/src/scripts/authentication/withProfile.jsx +6 -6
- package/src/scripts/common/block-navigation.jsx +3 -4
- package/src/scripts/common/containers/__tests__/header.spec.tsx +16 -16
- package/src/scripts/common/containers/footer.tsx +3 -3
- package/src/scripts/common/containers/header.tsx +30 -30
- package/src/scripts/common/forms/__tests__/warn-button.spec.jsx +6 -6
- package/src/scripts/common/forms/warn-button.jsx +21 -17
- package/src/scripts/common/partials/block-navigation.jsx +3 -4
- package/src/scripts/common/partials/freshdesk-widget.jsx +17 -20
- package/src/scripts/common/partials/toast-content.jsx +2 -2
- package/src/scripts/components/__tests__/data-table.spec.tsx +7 -7
- package/src/scripts/components/data-table.tsx +23 -22
- package/src/scripts/config.ts +2 -2
- package/src/scripts/datalad/dataset/comments-fragments.js +1 -1
- package/src/scripts/datalad/dataset/dataset-context.js +1 -1
- package/src/scripts/datalad/dataset/dataset-query-context.js +1 -1
- package/src/scripts/datalad/dataset/dataset-query-fragments.js +1 -1
- package/src/scripts/datalad/mutations/cache-clear.jsx +7 -6
- package/src/scripts/datalad/mutations/cache-id.js +2 -2
- package/src/scripts/datalad/mutations/delete-comment.jsx +13 -11
- package/src/scripts/datalad/mutations/delete.jsx +10 -9
- package/src/scripts/datalad/mutations/follow.jsx +12 -11
- package/src/scripts/datalad/mutations/publish.jsx +13 -12
- package/src/scripts/datalad/mutations/remove-permissions.jsx +8 -8
- package/src/scripts/datalad/mutations/revalidate.jsx +7 -6
- package/src/scripts/datalad/mutations/snapshot.tsx +7 -7
- package/src/scripts/datalad/mutations/star.jsx +12 -11
- package/src/scripts/datalad/mutations/submit-metadata.jsx +14 -12
- package/src/scripts/datalad/mutations/update-permissions.jsx +14 -13
- package/src/scripts/datalad/mutations/update-ref.jsx +7 -6
- package/src/scripts/datalad/routes/dataset-redirect.tsx +49 -49
- package/src/scripts/datalad/subscriptions/__tests__/files-subscription.spec.jsx +32 -32
- package/src/scripts/datalad/subscriptions/files-subscription.jsx +16 -16
- package/src/scripts/datalad/subscriptions/useDatasetDeletedSubscription.jsx +4 -4
- package/src/scripts/datalad/subscriptions/useDraftSubscription.js +4 -4
- package/src/scripts/datalad/subscriptions/usePermissionsSubscription.js +4 -4
- package/src/scripts/datalad/subscriptions/useSnapshotsUpdatedSubscriptions.js +3 -3
- package/src/scripts/dataset/__tests__/__snapshots__/snapshot-container.spec.tsx.snap +2 -2
- package/src/scripts/dataset/__tests__/snapshot-container.spec.tsx +12 -12
- package/src/scripts/dataset/comments/__tests__/comment.spec.jsx +21 -21
- package/src/scripts/dataset/comments/__tests__/comments.spec.jsx +10 -10
- package/src/scripts/dataset/comments/block-style-controls.jsx +15 -15
- package/src/scripts/dataset/comments/comment-editor.jsx +31 -31
- package/src/scripts/dataset/comments/comment.jsx +50 -50
- package/src/scripts/dataset/comments/comments.jsx +24 -22
- package/src/scripts/dataset/comments/inline-style-controls.jsx +9 -9
- package/src/scripts/dataset/comments/style-button.jsx +8 -9
- package/src/scripts/dataset/common/follow-toggles.tsx +3 -3
- package/src/scripts/dataset/dataset-query-context.js +1 -1
- package/src/scripts/dataset/dataset-query.jsx +34 -31
- package/src/scripts/dataset/dataset-routes.jsx +5 -5
- package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +13 -13
- package/src/scripts/dataset/download/__tests__/download-link.spec.jsx +10 -10
- package/src/scripts/dataset/download/__tests__/download-native.spec.js +7 -7
- package/src/scripts/dataset/download/__tests__/shell-example.spec.jsx +5 -5
- package/src/scripts/dataset/download/download-command-line.jsx +9 -7
- package/src/scripts/dataset/download/download-datalad.jsx +22 -20
- package/src/scripts/dataset/download/download-derivative-datalad.tsx +2 -2
- package/src/scripts/dataset/download/download-derivative-s3.tsx +2 -2
- package/src/scripts/dataset/download/download-link.jsx +6 -6
- package/src/scripts/dataset/download/download-native.js +20 -19
- package/src/scripts/dataset/download/download-query.js +2 -3
- package/src/scripts/dataset/download/download-s3.jsx +8 -8
- package/src/scripts/dataset/download/download-script.tsx +23 -20
- package/src/scripts/dataset/download/native-file-toast.jsx +13 -11
- package/src/scripts/dataset/download/shell-example.jsx +1 -1
- package/src/scripts/dataset/download/track-download.js +5 -5
- package/src/scripts/dataset/draft-container.tsx +104 -102
- package/src/scripts/dataset/draft-snapshot-routes.tsx +3 -3
- package/src/scripts/dataset/files/__tests__/file-tree-unloaded-directory.spec.jsx +23 -23
- package/src/scripts/dataset/files/__tests__/file-tree.spec.jsx +57 -58
- package/src/scripts/dataset/files/__tests__/file-viewer-type.spec.jsx +6 -6
- package/src/scripts/dataset/files/__tests__/file.spec.jsx +15 -15
- package/src/scripts/dataset/files/file-display.jsx +11 -11
- package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +10 -10
- package/src/scripts/dataset/files/file-tree.tsx +27 -27
- package/src/scripts/dataset/files/file-view.jsx +4 -4
- package/src/scripts/dataset/files/file-viewer-type.jsx +21 -21
- package/src/scripts/dataset/files/file.tsx +85 -80
- package/src/scripts/dataset/files/files.tsx +41 -40
- package/src/scripts/dataset/files/index.tsx +2 -2
- package/src/scripts/dataset/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -24
- package/src/scripts/dataset/files/viewers/__tests__/file-viewer-json.spec.jsx +9 -9
- package/src/scripts/dataset/files/viewers/__tests__/parse-tabular.spec.js +8 -8
- package/src/scripts/dataset/files/viewers/file-viewer-csv.jsx +5 -5
- package/src/scripts/dataset/files/viewers/file-viewer-html.jsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +4 -4
- package/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx +4 -4
- package/src/scripts/dataset/files/viewers/file-viewer-table.tsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-text.jsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-tsv.jsx +5 -5
- package/src/scripts/dataset/files/viewers/parse-tabular.js +4 -4
- package/src/scripts/dataset/fragments/__tests__/cancel-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/dataset-alert-draft.spec.tsx +9 -9
- package/src/scripts/dataset/fragments/__tests__/dataset-citation.spec.jsx +10 -10
- package/src/scripts/dataset/fragments/__tests__/doi-link.spec.tsx +29 -29
- package/src/scripts/dataset/fragments/__tests__/edit-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/edit-list.spec.jsx +13 -13
- package/src/scripts/dataset/fragments/__tests__/save-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/select-input.spec.tsx +26 -26
- package/src/scripts/dataset/fragments/cancel-button.tsx +2 -2
- package/src/scripts/dataset/fragments/comments-fragments.js +1 -1
- package/src/scripts/dataset/fragments/copyable-tooltip.jsx +14 -13
- package/src/scripts/dataset/fragments/dataset-alert-draft.tsx +17 -13
- package/src/scripts/dataset/fragments/dataset-alert-version.tsx +5 -4
- package/src/scripts/dataset/fragments/dataset-citation.jsx +23 -21
- package/src/scripts/dataset/fragments/dataset-history.jsx +12 -12
- package/src/scripts/dataset/fragments/dataset-reviewers.ts +1 -1
- package/src/scripts/dataset/fragments/doi-link.tsx +6 -6
- package/src/scripts/dataset/fragments/edit-button.tsx +2 -2
- package/src/scripts/dataset/fragments/edit-description-field.jsx +23 -21
- package/src/scripts/dataset/fragments/edit-description-list.jsx +8 -8
- package/src/scripts/dataset/fragments/edit-list.jsx +8 -8
- package/src/scripts/dataset/fragments/number-input.tsx +36 -35
- package/src/scripts/dataset/fragments/save-button.tsx +2 -2
- package/src/scripts/dataset/fragments/select-input.tsx +87 -86
- package/src/scripts/dataset/fragments/text-array-input.tsx +38 -37
- package/src/scripts/dataset/fragments/text-input.tsx +79 -78
- package/src/scripts/dataset/mutations/__tests__/cache-id.spec.js +5 -5
- package/src/scripts/dataset/mutations/__tests__/delete-file.spec.jsx +85 -83
- package/src/scripts/dataset/mutations/__tests__/delete.spec.jsx +8 -8
- package/src/scripts/dataset/mutations/__tests__/deprecate-snapshot.spec.tsx +17 -17
- package/src/scripts/dataset/mutations/__tests__/deprecate-version.spec.tsx +19 -19
- package/src/scripts/dataset/mutations/__tests__/description.spec.jsx +51 -51
- package/src/scripts/dataset/mutations/__tests__/remove-permissions.spec.tsx +9 -9
- package/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx +7 -7
- package/src/scripts/dataset/mutations/admin-exports.jsx +13 -12
- package/src/scripts/dataset/mutations/cache-clear.jsx +6 -6
- package/src/scripts/dataset/mutations/cache-id.js +2 -2
- package/src/scripts/dataset/mutations/comment.jsx +25 -23
- package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +36 -30
- package/src/scripts/dataset/mutations/dataset-relations.tsx +28 -29
- package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +7 -8
- package/src/scripts/dataset/mutations/delete-comment.jsx +14 -12
- package/src/scripts/dataset/mutations/delete-dataset-form.jsx +20 -22
- package/src/scripts/dataset/mutations/delete-file.jsx +8 -8
- package/src/scripts/dataset/mutations/delete.jsx +10 -9
- package/src/scripts/dataset/mutations/deprecate-version.tsx +5 -6
- package/src/scripts/dataset/mutations/description.jsx +21 -20
- package/src/scripts/dataset/mutations/flag-annex-object.jsx +10 -9
- package/src/scripts/dataset/mutations/follow.tsx +15 -14
- package/src/scripts/dataset/mutations/import-dataset.tsx +5 -5
- package/src/scripts/dataset/mutations/metadata-form.jsx +94 -97
- package/src/scripts/dataset/mutations/publish.jsx +13 -13
- package/src/scripts/dataset/mutations/readme.jsx +12 -11
- package/src/scripts/dataset/mutations/remove-annex-object.jsx +10 -9
- package/src/scripts/dataset/mutations/remove-permissions.tsx +5 -6
- package/src/scripts/dataset/mutations/revalidate.jsx +7 -7
- package/src/scripts/dataset/mutations/snapshot.tsx +8 -8
- package/src/scripts/dataset/mutations/star.tsx +14 -13
- package/src/scripts/dataset/mutations/submit-metadata.jsx +12 -11
- package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +5 -6
- package/src/scripts/dataset/mutations/update-file.jsx +6 -6
- package/src/scripts/dataset/mutations/update-permissions.tsx +9 -9
- package/src/scripts/dataset/mutations/update-ref.jsx +7 -7
- package/src/scripts/dataset/routes/__tests__/deprecate-snapshot-page.spec.tsx +5 -5
- package/src/scripts/dataset/routes/add-metadata.jsx +19 -20
- package/src/scripts/dataset/routes/admin-datalad.jsx +7 -7
- package/src/scripts/dataset/routes/dataset-default.tsx +12 -10
- package/src/scripts/dataset/routes/delete-page.tsx +12 -12
- package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +8 -8
- package/src/scripts/dataset/routes/derivatives.tsx +10 -10
- package/src/scripts/dataset/routes/download-dataset.tsx +20 -20
- package/src/scripts/dataset/routes/manage-anonymous-reviewers.tsx +37 -35
- package/src/scripts/dataset/routes/manage-permissions.jsx +22 -22
- package/src/scripts/dataset/routes/publish.jsx +32 -30
- package/src/scripts/dataset/routes/snapshot-default.tsx +7 -7
- package/src/scripts/dataset/routes/snapshot.tsx +44 -43
- package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +3 -3
- package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +3 -3
- package/src/scripts/dataset/routes/styles/header-row.tsx +3 -3
- package/src/scripts/dataset/routes/tab-routes-draft.tsx +12 -12
- package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +8 -8
- package/src/scripts/dataset/snapshot-container.tsx +78 -86
- package/src/scripts/errors/403page.tsx +11 -11
- package/src/scripts/errors/404page.tsx +12 -12
- package/src/scripts/errors/errorBoundary.jsx +13 -12
- package/src/scripts/errors/errorRoute.jsx +6 -6
- package/src/scripts/errors/freshdesk-widget.jsx +17 -20
- package/src/scripts/errors/freshdeskInterface.jsx +9 -9
- package/src/scripts/errors/orcid/email.jsx +3 -3
- package/src/scripts/errors/orcid/family.jsx +4 -4
- package/src/scripts/errors/orcid/general.jsx +1 -1
- package/src/scripts/errors/orcid/given.jsx +4 -4
- package/src/scripts/fixtures/dataset-query.ts +119 -119
- package/src/scripts/fixtures/mock-app-wrapper.tsx +4 -4
- package/src/scripts/index.tsx +9 -9
- package/src/scripts/pages/admin/admin.jsx +5 -5
- package/src/scripts/pages/admin/flagged-files.jsx +33 -31
- package/src/scripts/pages/admin/user-fragment.ts +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +13 -11
- package/src/scripts/pages/admin/users.jsx +38 -39
- package/src/scripts/pages/api.jsx +20 -19
- package/src/scripts/pages/citation-page.tsx +4 -4
- package/src/scripts/pages/faq/faq.tsx +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -5
- package/src/scripts/pages/front-page/aggregate-queries/use-participant-count.ts +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/use-publicDatasets-count.ts +2 -2
- package/src/scripts/pages/front-page/front-page-content.ts +42 -42
- package/src/scripts/pages/front-page/front-page.tsx +18 -14
- package/src/scripts/pages/front-page-comp.tsx +3 -3
- package/src/scripts/pages/import-dataset.tsx +10 -10
- package/src/scripts/pages/metadata/dataset-metadata.tsx +15 -14
- package/src/scripts/pages/pet-redirect.tsx +2 -2
- package/src/scripts/queries/dataset.ts +3 -3
- package/src/scripts/resources/__tests__/kibana.spec.js +9 -9
- package/src/scripts/resources/kibana.js +3 -3
- package/src/scripts/resources/strings.js +2 -2
- package/src/scripts/routes.tsx +14 -14
- package/src/scripts/search/__helpers__/search-render.tsx +3 -3
- package/src/scripts/search/__tests__/search-container.spec.tsx +22 -22
- package/src/scripts/search/__tests__/search-params-ctx.spec.tsx +20 -20
- package/src/scripts/search/es-query-builders.ts +21 -5
- package/src/scripts/search/filters-block-container.tsx +14 -16
- package/src/scripts/search/initial-search-params.tsx +45 -45
- package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +23 -23
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +12 -12
- package/src/scripts/search/inputs/age-range-input.tsx +9 -8
- package/src/scripts/search/inputs/author-input.tsx +14 -11
- package/src/scripts/search/inputs/date-radios.tsx +8 -7
- package/src/scripts/search/inputs/diagnosis-select.tsx +6 -6
- package/src/scripts/search/inputs/index.ts +33 -33
- package/src/scripts/search/inputs/keyword-input.tsx +13 -13
- package/src/scripts/search/inputs/modality-select.tsx +33 -30
- package/src/scripts/search/inputs/pet/bodyParts_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/tracerNames_input.tsx +16 -15
- package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +18 -16
- package/src/scripts/search/inputs/section-select.tsx +6 -6
- package/src/scripts/search/inputs/sex-radios.tsx +6 -6
- package/src/scripts/search/inputs/show-datasets-radios.tsx +31 -29
- package/src/scripts/search/inputs/sort-by-select.tsx +10 -11
- package/src/scripts/search/inputs/species-select.tsx +6 -6
- package/src/scripts/search/inputs/study-domain-input.tsx +18 -16
- package/src/scripts/search/inputs/subject-count-range-input.tsx +8 -7
- package/src/scripts/search/inputs/task-input.tsx +18 -16
- package/src/scripts/search/search-container.tsx +83 -85
- package/src/scripts/search/search-params-ctx.tsx +40 -38
- package/src/scripts/search/search-routes.tsx +4 -4
- package/src/scripts/search/use-search-results.tsx +125 -99
- package/src/scripts/styles/media.tsx +3 -3
- package/src/scripts/styles/support-modal.jsx +2 -2
- package/src/scripts/sw.ts +12 -11
- package/src/scripts/test-utils.js +4 -4
- package/src/scripts/uploader/add-path-to-files.js +7 -7
- package/src/scripts/uploader/file-select.tsx +3 -3
- package/src/scripts/uploader/file-upload.js +13 -12
- package/src/scripts/uploader/input.jsx +8 -7
- package/src/scripts/uploader/upload-button.jsx +3 -3
- package/src/scripts/uploader/upload-disclaimer-input.tsx +66 -66
- package/src/scripts/uploader/upload-disclaimer.jsx +6 -5
- package/src/scripts/uploader/upload-file-status.jsx +4 -4
- package/src/scripts/uploader/upload-issues.jsx +32 -29
- package/src/scripts/uploader/upload-metadata.jsx +18 -17
- package/src/scripts/uploader/upload-mutation.js +17 -20
- package/src/scripts/uploader/upload-progress-button.jsx +5 -4
- package/src/scripts/uploader/upload-progress.jsx +3 -3
- package/src/scripts/uploader/upload-rename.jsx +6 -5
- package/src/scripts/uploader/upload-resume.jsx +26 -24
- package/src/scripts/uploader/upload-select.jsx +10 -9
- package/src/scripts/uploader/upload-status.jsx +5 -5
- package/src/scripts/uploader/upload-step.jsx +9 -9
- package/src/scripts/uploader/uploader-context.js +1 -1
- package/src/scripts/uploader/uploader-location.js +1 -1
- package/src/scripts/uploader/uploader-modal.jsx +8 -7
- package/src/scripts/uploader/uploader-setup-routes.jsx +10 -10
- package/src/scripts/uploader/uploader-status-routes.jsx +6 -6
- package/src/scripts/uploader/uploader-view.jsx +4 -4
- package/src/scripts/uploader/uploader.jsx +50 -48
- package/src/scripts/users/username.tsx +3 -3
- package/src/scripts/utils/__tests__/csv.spec.ts +16 -16
- package/src/scripts/utils/__tests__/date.spec.js +4 -4
- package/src/scripts/utils/__tests__/json-ld.spec.js +12 -12
- package/src/scripts/utils/__tests__/newid.spec.js +9 -9
- package/src/scripts/utils/__tests__/userNotify.spec.js +10 -10
- package/src/scripts/utils/analytics.tsx +3 -3
- package/src/scripts/utils/cookies.js +1 -1
- package/src/scripts/utils/csv.ts +13 -15
- package/src/scripts/utils/datalad.js +1 -1
- package/src/scripts/utils/dataset-url.js +2 -2
- package/src/scripts/utils/date.js +2 -2
- package/src/scripts/utils/global-polyfill.ts +2 -2
- package/src/scripts/utils/gtag.js +6 -6
- package/src/scripts/utils/json-ld.js +13 -13
- package/src/scripts/utils/newid.js +1 -1
- package/src/scripts/utils/user-login-modal-ctx.tsx +4 -4
- package/src/scripts/utils/userNotify.js +2 -2
- package/src/scripts/validation/validation-panel.jsx +3 -3
- package/src/scripts/validation/validation-results.issues.issue.jsx +9 -9
- package/src/scripts/validation/validation-results.issues.jsx +19 -17
- package/src/scripts/validation/validation-results.jsx +10 -10
- package/src/scripts/validation/validation-status.jsx +19 -17
- package/src/scripts/validation/validation.jsx +5 -5
- package/src/scripts/workers/schema.ts +2 -2
- package/src/scripts/workers/schema.worker.ts +4 -4
- package/src/scripts/workers/validate.ts +2 -2
- package/src/scripts/workers/validate.worker.ts +7 -5
- package/vite.config.js +17 -17
- package/src/dist/assets/activity-icon.9ab0c828.png +0 -0
- package/src/dist/assets/bids.da8810b3.jpg +0 -0
- package/src/dist/assets/brand_mark.28e7645d.png +0 -0
- package/src/dist/assets/close-button.21e700a6.png +0 -0
- package/src/dist/assets/cube-get.39ed5636.png +0 -0
- package/src/dist/assets/cube-share.9b558c29.png +0 -0
- package/src/dist/assets/cube-use.ccf2ddc5.png +0 -0
- package/src/dist/assets/datalad.a35b15b8.jpg +0 -0
- package/src/dist/assets/eeg.1dc1dc54.jpg +0 -0
- package/src/dist/assets/email-header.1cb8bf76.png +0 -0
- package/src/dist/assets/ieeg.f91deb0a.jpg +0 -0
- package/src/dist/assets/index.3db805fb.js +0 -23127
- package/src/dist/assets/index.3db805fb.js.map +0 -1
- package/src/dist/assets/index.5eb79d2c.css +0 -1
- package/src/dist/assets/ljaf.567e9566.png +0 -0
- package/src/dist/assets/logo_app.8c986cf9.png +0 -0
- package/src/dist/assets/logo_cube.5224b745.png +0 -0
- package/src/dist/assets/logo_data.3e1d5743.png +0 -0
- package/src/dist/assets/logo_users.a84a265a.png +0 -0
- package/src/dist/assets/meg.1e1928f8.jpg +0 -0
- package/src/dist/assets/mri.b01e4f42.jpg +0 -0
- package/src/dist/assets/nih-bi-logo.80d76e1d.png +0 -0
- package/src/dist/assets/nih-stanford.2a7c496e.jpg +0 -0
- package/src/dist/assets/nih.78a64d38.png +0 -0
- package/src/dist/assets/nimh.0ec775d8.png +0 -0
- package/src/dist/assets/nru-logo.f3097dc5.png +0 -0
- package/src/dist/assets/nsf.eee1d3f7.png +0 -0
- package/src/dist/assets/nsf.f87e96e7.png +0 -0
- package/src/dist/assets/on-dark-horz.e1f213d0.svg +0 -1
- package/src/dist/assets/on-dark.12f4e2ce.svg +0 -1
- package/src/dist/assets/on-light-horz.23ff22c3.svg +0 -1
- package/src/dist/assets/on-light.50592f7f.svg +0 -1
- package/src/dist/assets/pet-scan.21d98a3d.jpg +0 -0
- package/src/dist/assets/revicons.4ca02b8a.ttf +0 -0
- package/src/dist/assets/revicons.9e4d4c68.eot +0 -0
- package/src/dist/assets/revicons.f7b9c306.woff +0 -0
- package/src/dist/assets/sqm-logo.9cd0cca5.png +0 -0
- package/src/dist/assets/squishymedia.fa3c5919.png +0 -0
- package/src/dist/assets/stanford.5f245936.png +0 -0
- package/src/dist/index.html +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import styled from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import styled from "@emotion/styled"
|
|
3
3
|
|
|
4
4
|
interface UploadDisclaimerInputProps {
|
|
5
5
|
affirmedDefaced: boolean
|
|
@@ -21,67 +21,67 @@ const DisclaimerLabel = styled.label`
|
|
|
21
21
|
padding-top: 10px;
|
|
22
22
|
`
|
|
23
23
|
|
|
24
|
-
export const UploadDisclaimerInput: React.FunctionComponent<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
24
|
+
export const UploadDisclaimerInput: React.FunctionComponent<
|
|
25
|
+
UploadDisclaimerInputProps
|
|
26
|
+
> = ({ affirmedDefaced, affirmedConsent, onChange }) => {
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<h4>
|
|
30
|
+
By uploading this dataset to OpenNeuro I agree to the following
|
|
31
|
+
conditions:
|
|
32
|
+
</h4>
|
|
33
|
+
<p>
|
|
34
|
+
I am the owner of this dataset and have any necessary ethics permissions
|
|
35
|
+
to share the data publicly. This dataset does not include any
|
|
36
|
+
identifiable personal health information as defined by the{" "}
|
|
37
|
+
<a href="https://www.hhs.gov/hipaa/for-professionals/privacy/laws-regulations/">
|
|
38
|
+
Health Insurance Portability and Accountability Act of 1996
|
|
39
|
+
</a>{" "}
|
|
40
|
+
(including names, zip codes, dates of birth, acquisition dates, etc). I
|
|
41
|
+
agree to destroy any key linking the personal identity of research
|
|
42
|
+
participants to the subject codes used in the dataset.
|
|
43
|
+
</p>
|
|
44
|
+
<p>
|
|
45
|
+
I agree that this dataset will become publicly available under a{" "}
|
|
46
|
+
<a href="https://wiki.creativecommons.org/wiki/CC0">
|
|
47
|
+
Creative Commons CC0
|
|
48
|
+
</a>{" "}
|
|
49
|
+
license after a grace period of 36 months counted from the date of the
|
|
50
|
+
first snapshot creation for this dataset. You will be able to apply for
|
|
51
|
+
up to two 6 month extensions to increase the grace period in case the
|
|
52
|
+
publication of a corresponding paper takes longer than expected. See
|
|
53
|
+
{" "}
|
|
54
|
+
<a href="/faq">FAQ</a> for details.
|
|
55
|
+
</p>
|
|
56
|
+
<p>This dataset is not subject to GDPR protections.</p>
|
|
57
|
+
<p>
|
|
58
|
+
Generally, data should only be uploaded to a single data archive. In the
|
|
59
|
+
rare cases where it is necessary to upload the data to two databases
|
|
60
|
+
(such as the NIMH Data Archive), I agree to ensure that the datasets are
|
|
61
|
+
harmonized across archives.
|
|
62
|
+
</p>
|
|
63
|
+
<p>Please affirm one of the following:</p>
|
|
64
|
+
<DisclaimerLabel>
|
|
65
|
+
<input
|
|
66
|
+
type="checkbox"
|
|
67
|
+
onChange={(): void =>
|
|
68
|
+
onChange({ affirmedDefaced: !affirmedDefaced, affirmedConsent })}
|
|
69
|
+
defaultChecked={affirmedDefaced}
|
|
70
|
+
/>
|
|
71
|
+
All structural scans have been defaced, obscuring any tissue on
|
|
72
|
+
or near the face that could potentially be used to reconstruct the
|
|
73
|
+
facial structure.
|
|
74
|
+
</DisclaimerLabel>
|
|
75
|
+
<DisclaimerLabel>
|
|
76
|
+
<input
|
|
77
|
+
type="checkbox"
|
|
78
|
+
onChange={(): void =>
|
|
79
|
+
onChange({ affirmedDefaced, affirmedConsent: !affirmedConsent })}
|
|
80
|
+
defaultChecked={affirmedConsent}
|
|
81
|
+
/>
|
|
82
|
+
I have explicit participant consent and ethical authorization to
|
|
83
|
+
publish structural scans without defacing.
|
|
84
|
+
</DisclaimerLabel>
|
|
85
|
+
</>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import UploaderContext from
|
|
3
|
-
import { UploadDisclaimerInput } from
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import UploaderContext from "./uploader-context.js"
|
|
3
|
+
import { UploadDisclaimerInput } from "./upload-disclaimer-input"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Defacing/consent input logic
|
|
@@ -16,7 +16,7 @@ const UploadDisclaimer = () => {
|
|
|
16
16
|
const [affirmedConsent, setAffirmedConsent] = useState(false)
|
|
17
17
|
return (
|
|
18
18
|
<UploaderContext.Consumer>
|
|
19
|
-
{uploader => (
|
|
19
|
+
{(uploader) => (
|
|
20
20
|
<div className="disclaimer fade-in">
|
|
21
21
|
<UploadDisclaimerInput
|
|
22
22
|
affirmedDefaced={affirmedDefaced}
|
|
@@ -37,7 +37,8 @@ const UploadDisclaimer = () => {
|
|
|
37
37
|
})
|
|
38
38
|
uploader.upload({ affirmedDefaced, affirmedConsent })
|
|
39
39
|
}}
|
|
40
|
-
disabled={testAffirmed(affirmedDefaced, affirmedConsent)}
|
|
40
|
+
disabled={testAffirmed(affirmedDefaced, affirmedConsent)}
|
|
41
|
+
>
|
|
41
42
|
I Agree
|
|
42
43
|
</button>
|
|
43
44
|
</span>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import PropTypes from "prop-types"
|
|
3
3
|
|
|
4
4
|
const UploadFileStatus = ({ uploadingFiles, failedFiles }) => (
|
|
5
5
|
<>
|
|
6
|
-
<p>{[...uploadingFiles].join(
|
|
6
|
+
<p>{[...uploadingFiles].join(", ")}</p>
|
|
7
7
|
<p>
|
|
8
8
|
{failedFiles.size
|
|
9
|
-
? `Too many failed attempts for '${[...failedFiles].join(
|
|
9
|
+
? `Too many failed attempts for '${[...failedFiles].join(", ")}'`
|
|
10
10
|
: null}
|
|
11
11
|
</p>
|
|
12
12
|
</>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import pluralize from
|
|
4
|
-
import { Loading } from
|
|
5
|
-
import Results from
|
|
6
|
-
import UploaderContext from
|
|
7
|
-
import validate from
|
|
8
|
-
import schemaValidate from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import PropTypes from "prop-types"
|
|
3
|
+
import pluralize from "pluralize"
|
|
4
|
+
import { Loading } from "@openneuro/components/loading"
|
|
5
|
+
import Results from "../validation/validation-results.jsx"
|
|
6
|
+
import UploaderContext from "./uploader-context.js"
|
|
7
|
+
import validate from "../workers/validate"
|
|
8
|
+
import schemaValidate from "../workers/schema"
|
|
9
9
|
|
|
10
10
|
const UploadValidatorStatus = ({ issues, next, reset }) => {
|
|
11
11
|
const errorCount = issues.errors.length
|
|
@@ -23,10 +23,10 @@ const UploadValidatorStatus = ({ issues, next, reset }) => {
|
|
|
23
23
|
} else if (errorCount === 0 && warnCount > 0) {
|
|
24
24
|
return (
|
|
25
25
|
<div className="message warn fade-in">
|
|
26
|
-
We found {warnCount} {pluralize(
|
|
27
|
-
You are not required to fix warnings, but doing so will
|
|
28
|
-
dataset more BIDS compliant. Continue or fix the issues and
|
|
29
|
-
folder again.
|
|
26
|
+
We found {warnCount} {pluralize("warning", warnCount)}{" "}
|
|
27
|
+
in your dataset. You are not required to fix warnings, but doing so will
|
|
28
|
+
make your dataset more BIDS compliant. Continue or fix the issues and
|
|
29
|
+
select folder again.
|
|
30
30
|
<button className="fileupload-btn btn-blue" onClick={next}>
|
|
31
31
|
Continue
|
|
32
32
|
</button>
|
|
@@ -35,19 +35,21 @@ const UploadValidatorStatus = ({ issues, next, reset }) => {
|
|
|
35
35
|
} else {
|
|
36
36
|
return (
|
|
37
37
|
<div className="message error fade-in">
|
|
38
|
-
Your dataset is not a valid BIDS dataset. Fix the{
|
|
38
|
+
Your dataset is not a valid BIDS dataset. Fix the{" "}
|
|
39
39
|
<strong>
|
|
40
|
-
{errorCount} {pluralize(
|
|
41
|
-
</strong>{
|
|
42
|
-
and{
|
|
40
|
+
{errorCount} {pluralize("error", errorCount)}
|
|
41
|
+
</strong>{" "}
|
|
42
|
+
and{" "}
|
|
43
43
|
<a
|
|
44
44
|
href="#"
|
|
45
|
-
onClick={e => {
|
|
45
|
+
onClick={(e) => {
|
|
46
46
|
e.preventDefault()
|
|
47
47
|
reset()
|
|
48
|
-
}}
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
49
50
|
select your folder again.
|
|
50
|
-
</a>
|
|
51
|
+
</a>
|
|
52
|
+
{" "}
|
|
51
53
|
</div>
|
|
52
54
|
)
|
|
53
55
|
}
|
|
@@ -66,9 +68,9 @@ class UploadValidator extends React.Component {
|
|
|
66
68
|
}
|
|
67
69
|
const options = {
|
|
68
70
|
config: {
|
|
69
|
-
error: [
|
|
71
|
+
error: ["NO_AUTHORS", "EMPTY_DATASET_NAME"],
|
|
70
72
|
ignoreSubjectConsistency: true,
|
|
71
|
-
blacklistModalities: [
|
|
73
|
+
blacklistModalities: ["Microscopy"],
|
|
72
74
|
},
|
|
73
75
|
}
|
|
74
76
|
if (this.props.schemaValidator) {
|
|
@@ -77,13 +79,13 @@ class UploadValidator extends React.Component {
|
|
|
77
79
|
// Test for dataset_description.json and use the schemaValidator for DatasetType == 'derivative'
|
|
78
80
|
// Fall back if anything fails
|
|
79
81
|
const dsDescription = Array.from(this.props.files).find(
|
|
80
|
-
f => f.name ===
|
|
82
|
+
(f) => f.name === "dataset_description.json",
|
|
81
83
|
)
|
|
82
84
|
if (dsDescription) {
|
|
83
|
-
dsDescription.text().then(dsDescriptionData => {
|
|
85
|
+
dsDescription.text().then((dsDescriptionData) => {
|
|
84
86
|
try {
|
|
85
87
|
const descriptionFields = JSON.parse(dsDescriptionData)
|
|
86
|
-
if (descriptionFields.DatasetType ===
|
|
88
|
+
if (descriptionFields.DatasetType === "derivative") {
|
|
87
89
|
schemaValidate(this.props.files, options).then(this.done)
|
|
88
90
|
} else {
|
|
89
91
|
validate(this.props.files, options).then(this.done)
|
|
@@ -121,11 +123,12 @@ class UploadValidator extends React.Component {
|
|
|
121
123
|
warnings={this.state.issues.warnings}
|
|
122
124
|
/>
|
|
123
125
|
<span className="bids-link">
|
|
124
|
-
Click to view details on{
|
|
126
|
+
Click to view details on{" "}
|
|
125
127
|
<a
|
|
126
128
|
href="http://bids.neuroimaging.io"
|
|
127
129
|
target="_blank"
|
|
128
|
-
rel="noopener noreferrer"
|
|
130
|
+
rel="noopener noreferrer"
|
|
131
|
+
>
|
|
129
132
|
BIDS specification
|
|
130
133
|
</a>
|
|
131
134
|
</span>
|
|
@@ -145,12 +148,12 @@ UploadValidator.propTypes = {
|
|
|
145
148
|
|
|
146
149
|
const UploadIssues = () => (
|
|
147
150
|
<UploaderContext.Consumer>
|
|
148
|
-
{uploader => (
|
|
151
|
+
{(uploader) => (
|
|
149
152
|
<UploadValidator
|
|
150
153
|
schemaValidator={uploader.schemaValidator}
|
|
151
154
|
files={uploader.selectedFiles}
|
|
152
|
-
next={() => uploader.setLocation(
|
|
153
|
-
reset={() => uploader.setLocation(
|
|
155
|
+
next={() => uploader.setLocation("/upload/metadata")}
|
|
156
|
+
reset={() => uploader.setLocation("/upload")}
|
|
154
157
|
/>
|
|
155
158
|
)}
|
|
156
159
|
</UploaderContext.Consumer>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import MetadataForm from
|
|
3
|
-
import UploaderContext from
|
|
4
|
-
import styled from
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import MetadataForm from "../dataset/mutations/metadata-form.jsx"
|
|
3
|
+
import UploaderContext from "./uploader-context.js"
|
|
4
|
+
import styled from "@emotion/styled"
|
|
5
5
|
|
|
6
6
|
const Container = styled.div`
|
|
7
7
|
&.message.fade-in {
|
|
@@ -11,16 +11,16 @@ const Container = styled.div`
|
|
|
11
11
|
|
|
12
12
|
const UploadMetadata = () => {
|
|
13
13
|
const [values, setValues] = useState({
|
|
14
|
-
associatedPaperDOI:
|
|
15
|
-
species:
|
|
16
|
-
studyLongitudinal:
|
|
17
|
-
studyDomain:
|
|
14
|
+
associatedPaperDOI: "",
|
|
15
|
+
species: "",
|
|
16
|
+
studyLongitudinal: "",
|
|
17
|
+
studyDomain: "",
|
|
18
18
|
trialCount: undefined,
|
|
19
|
-
studyDesign:
|
|
20
|
-
openneuroPaperDOI:
|
|
21
|
-
dxStatus:
|
|
22
|
-
grantFunderName:
|
|
23
|
-
grantIdentifier:
|
|
19
|
+
studyDesign: "",
|
|
20
|
+
openneuroPaperDOI: "",
|
|
21
|
+
dxStatus: "",
|
|
22
|
+
grantFunderName: "",
|
|
23
|
+
grantIdentifier: "",
|
|
24
24
|
})
|
|
25
25
|
const handleInputChange = (name, value) => {
|
|
26
26
|
const newValues = {
|
|
@@ -32,13 +32,13 @@ const UploadMetadata = () => {
|
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<UploaderContext.Consumer>
|
|
35
|
-
{uploader => (
|
|
35
|
+
{(uploader) => (
|
|
36
36
|
<Container className="message fade-in">
|
|
37
37
|
<MetadataForm
|
|
38
38
|
values={values}
|
|
39
39
|
onChange={handleInputChange}
|
|
40
40
|
hideDisabled={true}
|
|
41
|
-
hiddenFields={[
|
|
41
|
+
hiddenFields={["affirmedConsent", "affirmedDefaced"]}
|
|
42
42
|
hasEdit={true}
|
|
43
43
|
/>
|
|
44
44
|
<br />
|
|
@@ -47,8 +47,9 @@ const UploadMetadata = () => {
|
|
|
47
47
|
disabled={false}
|
|
48
48
|
onClick={() => {
|
|
49
49
|
uploader.captureMetadata(values)
|
|
50
|
-
uploader.setLocation(
|
|
51
|
-
}}
|
|
50
|
+
uploader.setLocation("/upload/disclaimer")
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
52
53
|
Continue
|
|
53
54
|
</button>
|
|
54
55
|
</Container>
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { datasets, uploads } from
|
|
2
|
-
import { SUBMIT_METADATA } from
|
|
1
|
+
import { datasets, uploads } from "@openneuro/client"
|
|
2
|
+
import { SUBMIT_METADATA } from "../dataset/mutations/submit-metadata.jsx"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Create a dataset and update the label
|
|
6
6
|
* @param {object} client Apollo client
|
|
7
7
|
*/
|
|
8
8
|
export const createDataset =
|
|
9
|
-
client =>
|
|
10
|
-
({ affirmedDefaced, affirmedConsent }) => {
|
|
9
|
+
(client) => ({ affirmedDefaced, affirmedConsent }) => {
|
|
11
10
|
return client
|
|
12
11
|
.mutate({
|
|
13
12
|
mutation: datasets.createDataset,
|
|
14
13
|
variables: { affirmedDefaced, affirmedConsent },
|
|
15
|
-
errorPolicy:
|
|
14
|
+
errorPolicy: "all",
|
|
16
15
|
})
|
|
17
16
|
.then(({ data }) => data.createDataset.id)
|
|
18
17
|
}
|
|
@@ -21,20 +20,18 @@ export const createDataset =
|
|
|
21
20
|
* Create a dataset and update the label
|
|
22
21
|
* @param {object} client Apollo client
|
|
23
22
|
*/
|
|
24
|
-
export const prepareUpload =
|
|
25
|
-
client
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
}
|
|
23
|
+
export const prepareUpload = (client) => ({ datasetId, uploadId }) => {
|
|
24
|
+
return client.mutate({
|
|
25
|
+
mutation: uploads.prepareUpload,
|
|
26
|
+
variables: { datasetId, uploadId },
|
|
27
|
+
})
|
|
28
|
+
}
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
31
|
* Complete upload
|
|
35
32
|
* @param {object} client Apollo client
|
|
36
33
|
*/
|
|
37
|
-
export const finishUpload = client => uploadId => {
|
|
34
|
+
export const finishUpload = (client) => (uploadId) => {
|
|
38
35
|
return client.mutate({
|
|
39
36
|
mutation: uploads.finishUpload,
|
|
40
37
|
variables: { uploadId },
|
|
@@ -57,7 +54,7 @@ export const mkLevels = (file, parent, tokens) => {
|
|
|
57
54
|
// Nodes are directories
|
|
58
55
|
const dirName = tokens.shift()
|
|
59
56
|
const dirIndex = parent.directories.findIndex(
|
|
60
|
-
dir => dir.name === `${parent.name}/${dirName}`,
|
|
57
|
+
(dir) => dir.name === `${parent.name}/${dirName}`,
|
|
61
58
|
)
|
|
62
59
|
if (dirIndex !== -1) {
|
|
63
60
|
// Directory exists
|
|
@@ -79,12 +76,12 @@ export const mkLevels = (file, parent, tokens) => {
|
|
|
79
76
|
* Convert from an file input list to a FileTreeInput object
|
|
80
77
|
* @param {object} fileList Browser FileList from file input
|
|
81
78
|
*/
|
|
82
|
-
export const treeFromList = fileList => {
|
|
83
|
-
const tree = { name:
|
|
79
|
+
export const treeFromList = (fileList) => {
|
|
80
|
+
const tree = { name: "", files: [], directories: [] }
|
|
84
81
|
|
|
85
82
|
for (const file of fileList) {
|
|
86
83
|
if (file.webkitRelativePath) {
|
|
87
|
-
const tokens = file.webkitRelativePath.split(
|
|
84
|
+
const tokens = file.webkitRelativePath.split("/")
|
|
88
85
|
// Skip the top level, it is created above
|
|
89
86
|
tokens.shift()
|
|
90
87
|
mkLevels(file, tree, tokens)
|
|
@@ -97,7 +94,7 @@ export const treeFromList = fileList => {
|
|
|
97
94
|
return tree
|
|
98
95
|
}
|
|
99
96
|
|
|
100
|
-
export const submitMetadata = client => (datasetId, metadata) => {
|
|
97
|
+
export const submitMetadata = (client) => (datasetId, metadata) => {
|
|
101
98
|
return client.mutate({
|
|
102
99
|
mutation: SUBMIT_METADATA,
|
|
103
100
|
variables: {
|
|
@@ -107,6 +104,6 @@ export const submitMetadata = client => (datasetId, metadata) => {
|
|
|
107
104
|
...metadata,
|
|
108
105
|
},
|
|
109
106
|
},
|
|
110
|
-
errorPolicy:
|
|
107
|
+
errorPolicy: "all",
|
|
111
108
|
})
|
|
112
109
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import UploaderContext from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import UploaderContext from "./uploader-context.js"
|
|
3
3
|
|
|
4
4
|
const UploadProgressButton = () => (
|
|
5
5
|
<UploaderContext.Consumer>
|
|
6
|
-
{uploader => (
|
|
6
|
+
{(uploader) => (
|
|
7
7
|
<a
|
|
8
8
|
className="nav-link nl-upload nl-progress"
|
|
9
|
-
onClick={() => uploader.setLocation(
|
|
9
|
+
onClick={() => uploader.setLocation("/upload")}
|
|
10
|
+
>
|
|
10
11
|
view details
|
|
11
12
|
</a>
|
|
12
13
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { ProgressBar } from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import PropTypes from "prop-types"
|
|
3
|
+
import { ProgressBar } from "@openneuro/components/progress-bar"
|
|
4
4
|
|
|
5
5
|
const UploadProgress = ({ progress }) => {
|
|
6
6
|
return (
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import Input from
|
|
3
|
-
import UploaderContext from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import Input from "./input.jsx"
|
|
3
|
+
import UploaderContext from "./uploader-context.js"
|
|
4
4
|
|
|
5
5
|
const UploadRename = () => (
|
|
6
6
|
<UploaderContext.Consumer>
|
|
7
|
-
{uploader => (
|
|
7
|
+
{(uploader) => (
|
|
8
8
|
<div className="message fade-in">
|
|
9
9
|
Rename your dataset (optional)
|
|
10
10
|
<div className="dir-name has-input clearfix fade-in">
|
|
@@ -22,7 +22,8 @@ const UploadRename = () => (
|
|
|
22
22
|
<button
|
|
23
23
|
className="fileupload-btn btn-blue"
|
|
24
24
|
disabled={false}
|
|
25
|
-
onClick={() => uploader.setLocation(
|
|
25
|
+
onClick={() => uploader.setLocation("/upload/issues")}
|
|
26
|
+
>
|
|
26
27
|
Continue
|
|
27
28
|
</button>
|
|
28
29
|
</div>
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import FileSelect from
|
|
4
|
-
import UploaderContext from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import PropTypes from "prop-types"
|
|
3
|
+
import FileSelect from "./file-select"
|
|
4
|
+
import UploaderContext from "./uploader-context.js"
|
|
5
5
|
|
|
6
6
|
const UploadResume = ({ datasetId }) => (
|
|
7
7
|
<UploaderContext.Consumer>
|
|
8
|
-
{uploader =>
|
|
9
|
-
uploader.uploading
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
{(uploader) =>
|
|
9
|
+
uploader.uploading
|
|
10
|
+
? (
|
|
11
|
+
<button
|
|
12
|
+
className="fileupload-btn btn-admin"
|
|
13
|
+
disabled={true}
|
|
14
|
+
title="Please wait for your current upload to finish before resuming"
|
|
15
|
+
>
|
|
16
|
+
<span>
|
|
17
|
+
<i className="fa fa-repeat" />
|
|
18
|
+
|
|
19
|
+
</span>
|
|
20
|
+
Resume
|
|
21
|
+
</button>
|
|
22
|
+
)
|
|
23
|
+
: (
|
|
24
|
+
<FileSelect
|
|
25
|
+
onChange={uploader.resumeDataset(datasetId)}
|
|
26
|
+
resume
|
|
27
|
+
disabled={uploader.uploading}
|
|
28
|
+
/>
|
|
29
|
+
)}
|
|
28
30
|
</UploaderContext.Consumer>
|
|
29
31
|
)
|
|
30
32
|
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import FileSelect from
|
|
3
|
-
import UploaderContext from
|
|
4
|
-
import AdminUser from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import FileSelect from "./file-select"
|
|
3
|
+
import UploaderContext from "./uploader-context.js"
|
|
4
|
+
import AdminUser from "../authentication/admin-user"
|
|
5
5
|
|
|
6
6
|
const UploadSelect = () => (
|
|
7
7
|
<div>
|
|
8
8
|
<UploaderContext.Consumer>
|
|
9
|
-
{uploader => (
|
|
9
|
+
{(uploader) => (
|
|
10
10
|
<div className="message fade-in">
|
|
11
11
|
<p>
|
|
12
12
|
To protect the privacy of the individuals who have been scanned, we
|
|
13
13
|
require that all scan data be defaced before publishing a dataset.
|
|
14
14
|
</p>
|
|
15
|
-
Select a{
|
|
15
|
+
Select a{" "}
|
|
16
16
|
<a
|
|
17
17
|
href="http://bids.neuroimaging.io"
|
|
18
18
|
target="_blank"
|
|
19
|
-
rel="noopener noreferrer"
|
|
19
|
+
rel="noopener noreferrer"
|
|
20
|
+
>
|
|
20
21
|
BIDS dataset
|
|
21
|
-
</a>{
|
|
22
|
+
</a>{" "}
|
|
22
23
|
to upload
|
|
23
24
|
<FileSelect onChange={uploader.selectFiles} />
|
|
24
25
|
<AdminUser>
|
|
@@ -29,7 +30,7 @@ const UploadSelect = () => (
|
|
|
29
30
|
defaultChecked={uploader.schemaValidator}
|
|
30
31
|
/>
|
|
31
32
|
<label htmlFor="schema-validator-checkbox">
|
|
32
|
-
{
|
|
33
|
+
{" "}
|
|
33
34
|
Use schema based validator
|
|
34
35
|
</label>
|
|
35
36
|
</AdminUser>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import UploaderContext from
|
|
3
|
-
import UploadProgress from
|
|
4
|
-
import UploadFileStatus from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import UploaderContext from "./uploader-context.js"
|
|
3
|
+
import UploadProgress from "./upload-progress.jsx"
|
|
4
|
+
import UploadFileStatus from "./upload-file-status.jsx"
|
|
5
5
|
|
|
6
6
|
const UploadStatus = () => (
|
|
7
7
|
<UploaderContext.Consumer>
|
|
8
|
-
{uploader => (
|
|
8
|
+
{(uploader) => (
|
|
9
9
|
<div>
|
|
10
10
|
<h4>
|
|
11
11
|
{uploader.name} - Uploading {uploader.files.length} files.
|