@openneuro/app 4.4.10 → 4.6.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 +5 -5
- package/src/scripts/app.tsx +1 -1
- package/src/scripts/{refactor_2021/authentication → authentication}/__tests__/profile.spec.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/admin-user.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/logged-in.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/logged-out.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/loginCheck.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/loginUrls.ts +1 -1
- package/src/scripts/{refactor_2021/authentication → authentication}/profile.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/signOut.ts +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/withProfile.jsx +0 -0
- package/src/scripts/{refactor_2021/common → common}/block-navigation.jsx +0 -0
- package/src/scripts/{refactor_2021 → common}/containers/footer.tsx +0 -0
- package/src/scripts/{refactor_2021 → common}/containers/header.tsx +17 -15
- package/src/scripts/{datalad/fragments → common/partials}/freshdesk-widget.jsx +1 -1
- package/src/scripts/datalad/dataset/dataset-query-fragments.js +2 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comment.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comments.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comment.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comments.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/block-style-controls.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment-editor.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comments.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/inline-style-controls.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/style-button.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query-context.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query.jsx +15 -15
- package/src/scripts/dataset/dataset-routes.jsx +39 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-link.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/shell-example.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-command-line.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-link.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-native.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/shell-example.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-command-line.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-datalad.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-link.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-native.js +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-query.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-s3.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/native-file-toast.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/shell-example.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/track-download.js +0 -0
- package/src/scripts/dataset/draft-container.tsx +382 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/draft-snapshot-routes.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file-tree.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file.spec.jsx.snap +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-loading.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-unloaded-directory.spec.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-viewer-type.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file.spec.jsx +11 -4
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/flat-to-tree.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-display.jsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-loading.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-unloaded-directory.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree.jsx +3 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-view.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-viewer-type.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset/files/file.jsx → dataset/files/file.tsx} +30 -13
- package/src/scripts/{refactor_2021/dataset → dataset}/files/files.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/flat-to-tree.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/index.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/file-viewer-json.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/parse-tabular.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-csv.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-html.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-json.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-nifti.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-table.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-text.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-tsv.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/parse-tabular.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/cancel-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/save-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/select-input.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/cancel-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-alert-draft.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-citation.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/doi-link.spec.tsx +38 -8
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-list.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/save-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/select-input.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/cancel-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/comments-fragments.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/copyable-tooltip.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-draft.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-citation.jsx +2 -4
- package/src/scripts/dataset/fragments/dataset-history.jsx +99 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-reviewers.ts +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/doi-link.tsx +9 -6
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-field.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-list.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-list.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/number-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/save-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/select-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-array-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-snapshot.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-version.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/description.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/cache-id.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/delete.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-snapshot.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-version.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/description.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/remove-permissions.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/update-permissions.spec.jsx +0 -0
- package/src/scripts/dataset/mutations/admin-exports.jsx +70 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-clear.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-id.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/comment.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/create-anonymous-reviewer.tsx +0 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/dataset-relations.tsx +6 -18
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-anonymous-reviewer.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-comment.jsx +2 -4
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dataset-form.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dir.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-file.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/deprecate-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/description.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/flag-annex-object.jsx +1 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/follow.tsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/import-dataset.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/metadata-form.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/publish.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/readme.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-annex-object.jsx +0 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-permissions.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/revalidate.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/snapshot.tsx +17 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/star.tsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/submit-metadata.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/undo-deprecate-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-file.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-permissions.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-ref.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/__snapshots__/publish.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/publish.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/add-metadata.jsx +21 -25
- package/src/scripts/dataset/routes/admin-datalad.jsx +40 -0
- package/src/scripts/dataset/routes/dataset-default.tsx +54 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/delete-page.tsx +5 -9
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/deprecate-snapshot-page.tsx +6 -7
- package/src/scripts/dataset/routes/download-dataset.tsx +53 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-anonymous-reviewers.tsx +9 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-permissions.jsx +7 -10
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/publish.jsx +10 -12
- package/src/scripts/dataset/routes/snapshot-default.tsx +44 -0
- package/src/scripts/dataset/routes/snapshot.jsx +148 -0
- package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +8 -0
- package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +8 -0
- package/src/scripts/dataset/routes/styles/draft-background.tsx +7 -0
- package/src/scripts/dataset/routes/styles/header-row.tsx +12 -0
- package/src/scripts/dataset/routes/tab-routes-draft.tsx +88 -0
- package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +57 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/snapshot-container.tsx +75 -122
- package/src/scripts/{refactor_2021 → errors}/freshdesk-widget.jsx +1 -1
- package/src/scripts/errors/freshdeskInterface.jsx +1 -1
- package/src/scripts/index.tsx +6 -6
- package/src/scripts/{refactor_2021 → pages}/admin/admin.jsx +1 -1
- package/src/scripts/{refactor_2021 → pages}/admin/flagged-files.jsx +0 -0
- package/src/scripts/{refactor_2021 → pages}/admin/user-fragment.ts +0 -0
- package/src/scripts/{refactor_2021 → pages}/admin/user-tools.tsx +1 -1
- package/src/scripts/{refactor_2021 → pages}/admin/users.jsx +0 -0
- package/src/scripts/{refactor_2021/user → pages}/api.jsx +2 -2
- package/src/scripts/pages/citation-page.tsx +1 -1
- package/src/scripts/{faq → pages/faq}/__tests__/__snapshots__/faq.spec.jsx.snap +1 -1
- package/src/scripts/{faq → pages/faq}/__tests__/faq.spec.jsx +0 -0
- package/src/scripts/{faq → pages/faq}/faq-content.js +3 -5
- package/src/scripts/{faq → pages/faq}/faq.jsx +1 -1
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/aggregate-counts-container.tsx +0 -0
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-participant-count.ts +0 -0
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-publicDatasets-count.ts +0 -0
- package/src/scripts/{front-page → pages/front-page}/front-page-content.ts +10 -10
- package/src/scripts/{refactor_2021/containers/front-page-container.tsx → pages/front-page/front-page.tsx} +53 -32
- package/src/scripts/pages/front-page-comp.tsx +57 -0
- package/src/scripts/pages/import-dataset.tsx +5 -5
- package/src/scripts/{pet/redirect.tsx → pages/pet-redirect.tsx} +0 -0
- package/src/scripts/{refactor_2021/routes.tsx → routes.tsx} +8 -8
- package/src/scripts/{refactor_2021/search → search}/__tests__/search-container.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/__tests__/search-params-ctx.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/es-query-builders.ts +0 -0
- package/src/scripts/{refactor_2021/search → search}/filters-block-container.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/initial-search-params.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/__tests__/sort-by-select.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/admin-allDatasets-toggle.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/age-range-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/author-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/date-radios.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/diagnosis-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/index.ts +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/keyword-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/modality-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/bodyParts_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturersModelNames_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturers_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerNames_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerRadionuclides_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/section-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/sex-radios.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/show-datasets-radios.tsx +2 -4
- package/src/scripts/{refactor_2021/search → search}/inputs/sort-by-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/species-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/study-domain-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/subject-count-range-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/task-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/search-container.tsx +1 -1
- package/src/scripts/{refactor_2021/search → search}/search-params-ctx.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/search-routes.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/use-search-results.tsx +1 -0
- package/src/scripts/test-utils.js +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/add-path-to-files.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/file-select.tsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/file-upload.js +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/input.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-button.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer-input.tsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-file-status.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-issues.jsx +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-metadata.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-mutation.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-button.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-class.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-rename.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-resume.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-select.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-status.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-step.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-context.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-location.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-modal.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-setup-routes.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-status-routes.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-view.jsx +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader.jsx +1 -1
- package/src/scripts/{refactor_2021/utils → utils}/cookies.js +0 -0
- package/src/scripts/{refactor_2021 → utils}/user-login-modal-ctx.tsx +1 -2
- package/src/scripts/{refactor_2021/validation → validation}/validation-panel.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.issue.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-status.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation.jsx +1 -1
- package/src/scripts/front-page/assets/get_data_browse.png +0 -0
- package/src/scripts/front-page/assets/get_data_download.png +0 -0
- package/src/scripts/front-page/assets/ljaf.png +0 -0
- package/src/scripts/front-page/assets/logo_app.png +0 -0
- package/src/scripts/front-page/assets/logo_cube.png +0 -0
- package/src/scripts/front-page/assets/logo_data.png +0 -0
- package/src/scripts/front-page/assets/logo_users.png +0 -0
- package/src/scripts/front-page/assets/nih.png +0 -0
- package/src/scripts/front-page/assets/nsf.png +0 -0
- package/src/scripts/front-page/assets/share_data_collaborate.png +0 -0
- package/src/scripts/front-page/assets/share_data_publish.png +0 -0
- package/src/scripts/front-page/assets/share_data_validate.png +0 -0
- package/src/scripts/front-page/assets/squishymedia.png +0 -0
- package/src/scripts/front-page/assets/stanford.png +0 -0
- package/src/scripts/front-page/assets/tab-get_data.png +0 -0
- package/src/scripts/front-page/assets/tab-share_data.png +0 -0
- package/src/scripts/front-page/assets/tab-use_data.png +0 -0
- package/src/scripts/front-page/assets/use_data_analyze.png +0 -0
- package/src/scripts/front-page/assets/use_data_snapshot.png +0 -0
- package/src/scripts/mobile/collapsible-wrapper.tsx +0 -93
- package/src/scripts/refactor_2021/common/partials/toast-content.jsx +0 -18
- package/src/scripts/refactor_2021/dataset/dataset-routes.jsx +0 -163
- package/src/scripts/refactor_2021/dataset/draft-container.tsx +0 -435
- package/src/scripts/refactor_2021/dataset/fragments/dataset-history.jsx +0 -103
- package/src/scripts/refactor_2021/dataset/routes/admin-datalad.jsx +0 -47
- package/src/scripts/refactor_2021/dataset/routes/admin-exports.jsx +0 -132
- package/src/scripts/refactor_2021/dataset/routes/download-dataset.tsx +0 -76
- package/src/scripts/refactor_2021/dataset/routes/snapshot.jsx +0 -139
- package/src/scripts/refactor_2021/utils/datalad.js +0 -13
- package/src/scripts/refactor_2021/utils/gtag.js +0 -22
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { gql } from '@apollo/client'
|
|
4
4
|
import { Mutation } from '@apollo/client/react/components'
|
|
5
|
-
import { DATASET_METADATA } from '
|
|
5
|
+
import { DATASET_METADATA } from '../../datalad/dataset/dataset-query-fragments'
|
|
6
6
|
import { datasetCacheId } from './cache-id.js'
|
|
7
7
|
import { Button } from '@openneuro/components/button'
|
|
8
8
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
3
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
4
4
|
import { useCookies } from 'react-cookie'
|
|
5
5
|
import MetadataForm from '../mutations/metadata-form.jsx'
|
|
6
6
|
import { DatasetRelations } from '../mutations/dataset-relations'
|
|
7
7
|
import SubmitMetadata from '../mutations/submit-metadata.jsx'
|
|
8
8
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
9
9
|
import { hasEditPermissions, getProfile } from '../../authentication/profile.js'
|
|
10
|
-
import { getDatasetUrl } from '
|
|
10
|
+
import { getDatasetUrl } from '../../utils/dataset-url'
|
|
11
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
12
|
+
import { HeaderRow3, HeaderRow4 } from './styles/header-row'
|
|
11
13
|
|
|
12
14
|
export const compileMetadata = dataset => {
|
|
13
15
|
const getFromMetadata = key => dataset.metadata && dataset.metadata[key]
|
|
@@ -119,25 +121,15 @@ const AddMetadata = ({ dataset }) => {
|
|
|
119
121
|
hasEditPermissions(dataset.permissions, user && user.sub)
|
|
120
122
|
|
|
121
123
|
return (
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
hideDisabled={false}
|
|
132
|
-
hasEdit={hasEdit}
|
|
133
|
-
validationErrors={validationErrors}
|
|
134
|
-
/>
|
|
135
|
-
{hasEdit && (
|
|
136
|
-
<div className="col col-6">
|
|
137
|
-
<DatasetRelations datasetId={dataset.id} hasEdit={hasEdit} />
|
|
138
|
-
</div>
|
|
139
|
-
)}
|
|
140
|
-
</div>
|
|
124
|
+
<DatasetPageBorder className="metadata-form">
|
|
125
|
+
<HeaderRow3>{hasEdit && 'Add '}Metadata</HeaderRow3>
|
|
126
|
+
<MetadataForm
|
|
127
|
+
values={values}
|
|
128
|
+
onChange={handleInputChange}
|
|
129
|
+
hideDisabled={false}
|
|
130
|
+
hasEdit={hasEdit}
|
|
131
|
+
validationErrors={validationErrors}
|
|
132
|
+
/>
|
|
141
133
|
<div className="dataset-form-controls ">
|
|
142
134
|
{hasEdit && (
|
|
143
135
|
<LoggedIn>
|
|
@@ -149,11 +141,15 @@ const AddMetadata = ({ dataset }) => {
|
|
|
149
141
|
/>
|
|
150
142
|
</LoggedIn>
|
|
151
143
|
)}
|
|
152
|
-
<Link className="return-link " to={`/datasets/${dataset.id}`}>
|
|
153
|
-
Return to Dataset
|
|
154
|
-
</Link>
|
|
155
144
|
</div>
|
|
156
|
-
|
|
145
|
+
<hr />
|
|
146
|
+
{hasEdit && (
|
|
147
|
+
<>
|
|
148
|
+
<HeaderRow4>Relations</HeaderRow4>
|
|
149
|
+
<DatasetRelations datasetId={dataset.id} hasEdit={hasEdit} />
|
|
150
|
+
</>
|
|
151
|
+
)}
|
|
152
|
+
</DatasetPageBorder>
|
|
157
153
|
)
|
|
158
154
|
}
|
|
159
155
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import DatasetHistory from '../fragments/dataset-history.jsx'
|
|
4
|
+
import CacheClear from '../mutations/cache-clear.jsx'
|
|
5
|
+
import AdminExports from '../mutations/admin-exports'
|
|
6
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
7
|
+
import { HeaderRow3, HeaderRow4 } from './styles/header-row'
|
|
8
|
+
|
|
9
|
+
const AdminDataset = ({ dataset }) => (
|
|
10
|
+
<DatasetPageBorder className="datalad-dataset-form">
|
|
11
|
+
<HeaderRow3>Site Admin Tools</HeaderRow3>
|
|
12
|
+
<p>
|
|
13
|
+
Delete dataset cache drops this dataset's caches (snapshot index,
|
|
14
|
+
draft/snapshot file listings, current dataset description) and the cache
|
|
15
|
+
is repopulated on the next API call.
|
|
16
|
+
</p>
|
|
17
|
+
<div className="dataset-form-controls">
|
|
18
|
+
<CacheClear datasetId={dataset.id} />
|
|
19
|
+
</div>
|
|
20
|
+
<hr />
|
|
21
|
+
<HeaderRow4>Rerun Exports</HeaderRow4>
|
|
22
|
+
<p>
|
|
23
|
+
Correct most temporary issues with a dataset export by reattempting to
|
|
24
|
+
push to S3 and GitHub.
|
|
25
|
+
</p>
|
|
26
|
+
<div className="dataset-form-controls">
|
|
27
|
+
<AdminExports />
|
|
28
|
+
</div>
|
|
29
|
+
<hr />
|
|
30
|
+
<HeaderRow4>Draft Head</HeaderRow4>
|
|
31
|
+
{dataset.draft.head}
|
|
32
|
+
<DatasetHistory datasetId={dataset.id} />
|
|
33
|
+
</DatasetPageBorder>
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
AdminDataset.propTypes = {
|
|
37
|
+
dataset: PropTypes.object,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default AdminDataset
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Markdown from 'markdown-to-jsx'
|
|
3
|
+
import { ReadMore } from '@openneuro/components/read-more'
|
|
4
|
+
import { MetaDataBlock } from '@openneuro/components/dataset'
|
|
5
|
+
import Files from '../files/files'
|
|
6
|
+
import Comments from '../comments/comments'
|
|
7
|
+
import EditDescriptionField from '../fragments/edit-description-field'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Default tab for dataset draft pages
|
|
11
|
+
*/
|
|
12
|
+
export const DatasetDefault = ({ dataset, hasEdit }) => (
|
|
13
|
+
<>
|
|
14
|
+
<ReadMore
|
|
15
|
+
fileTree={true}
|
|
16
|
+
id="collapse-tree"
|
|
17
|
+
expandLabel="Expand File Tree"
|
|
18
|
+
collapseLabel="Collapse File Tree">
|
|
19
|
+
<Files
|
|
20
|
+
datasetId={dataset.id}
|
|
21
|
+
snapshotTag={null}
|
|
22
|
+
datasetName={dataset.draft.description.Name}
|
|
23
|
+
files={dataset.draft.files}
|
|
24
|
+
editMode={hasEdit}
|
|
25
|
+
datasetPermissions={dataset.permissions}
|
|
26
|
+
/>
|
|
27
|
+
</ReadMore>
|
|
28
|
+
<MetaDataBlock
|
|
29
|
+
heading="README"
|
|
30
|
+
className="dataset-readme markdown-body"
|
|
31
|
+
item={dataset.draft.readme}
|
|
32
|
+
renderEditor={() => (
|
|
33
|
+
<EditDescriptionField
|
|
34
|
+
datasetId={dataset.id}
|
|
35
|
+
field="readme"
|
|
36
|
+
rows={12}
|
|
37
|
+
description={dataset.draft.readme}
|
|
38
|
+
editMode={hasEdit}>
|
|
39
|
+
<ReadMore
|
|
40
|
+
id="readme"
|
|
41
|
+
expandLabel="Read More"
|
|
42
|
+
collapseLabel="Collapse">
|
|
43
|
+
<Markdown>{dataset.draft.readme || 'N/A'}</Markdown>
|
|
44
|
+
</ReadMore>
|
|
45
|
+
</EditDescriptionField>
|
|
46
|
+
)}
|
|
47
|
+
/>
|
|
48
|
+
<Comments
|
|
49
|
+
datasetId={dataset.id}
|
|
50
|
+
uploader={dataset.uploader}
|
|
51
|
+
comments={dataset.comments}
|
|
52
|
+
/>
|
|
53
|
+
</>
|
|
54
|
+
)
|
|
@@ -6,8 +6,8 @@ import DeleteDatasetForm from '../mutations/delete-dataset-form.jsx'
|
|
|
6
6
|
import DeleteDataset from '../mutations/delete.jsx'
|
|
7
7
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
8
8
|
import { hasEditPermissions, getProfile } from '../../authentication/profile.js'
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
11
11
|
|
|
12
12
|
interface DeletePageProps extends RouteComponentProps {
|
|
13
13
|
dataset: {
|
|
@@ -35,9 +35,8 @@ const DeletePage = ({ dataset }: DeletePageProps): React.ReactElement => {
|
|
|
35
35
|
hasEditPermissions(dataset.permissions, user && user.sub)
|
|
36
36
|
const datasetId = dataset.id
|
|
37
37
|
return (
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<hr />
|
|
38
|
+
<DatasetPageBorder>
|
|
39
|
+
<HeaderRow3>Delete Dataset</HeaderRow3>
|
|
41
40
|
<DeleteDatasetForm
|
|
42
41
|
values={values}
|
|
43
42
|
onChange={handleInputChange}
|
|
@@ -54,11 +53,8 @@ const DeletePage = ({ dataset }: DeletePageProps): React.ReactElement => {
|
|
|
54
53
|
<LoggedIn>
|
|
55
54
|
<DeleteDataset datasetId={datasetId} metadata={values} />
|
|
56
55
|
</LoggedIn>
|
|
57
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
58
|
-
Return to Dataset
|
|
59
|
-
</Link>
|
|
60
56
|
</div>
|
|
61
|
-
</
|
|
57
|
+
</DatasetPageBorder>
|
|
62
58
|
)
|
|
63
59
|
}
|
|
64
60
|
|
|
@@ -3,6 +3,8 @@ import { Link, useRouteMatch } from 'react-router-dom'
|
|
|
3
3
|
import { DeprecateVersion } from '../mutations/deprecate-version'
|
|
4
4
|
import { Input } from '@openneuro/components/input'
|
|
5
5
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
6
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
7
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
6
8
|
|
|
7
9
|
interface DeprecateSnapshotRouteParams {
|
|
8
10
|
datasetId: string
|
|
@@ -16,8 +18,8 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
16
18
|
const [reason, setReason] = useState('')
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
+
<DatasetPageBorder>
|
|
22
|
+
<HeaderRow3>Deprecate Version</HeaderRow3>
|
|
21
23
|
<p>
|
|
22
24
|
{`Deprecate ${datasetId} version ${snapshotTag} to let other users know about an issue with this version. The reason provided will be displayed for users visiting the version.`}
|
|
23
25
|
</p>
|
|
@@ -28,7 +30,7 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
28
30
|
labelStyle="default"
|
|
29
31
|
setValue={setReason}
|
|
30
32
|
/>
|
|
31
|
-
<
|
|
33
|
+
<br />
|
|
32
34
|
<div className="dataset-form-controls">
|
|
33
35
|
<LoggedIn>
|
|
34
36
|
<DeprecateVersion
|
|
@@ -37,10 +39,7 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
37
39
|
reason={reason}
|
|
38
40
|
/>
|
|
39
41
|
</LoggedIn>
|
|
40
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
41
|
-
Return to Dataset
|
|
42
|
-
</Link>
|
|
43
42
|
</div>
|
|
44
|
-
</
|
|
43
|
+
</DatasetPageBorder>
|
|
45
44
|
)
|
|
46
45
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* global globalThis */
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import { useRouteMatch } from 'react-router-dom'
|
|
5
|
+
import DownloadLink from '../download/download-link.jsx'
|
|
6
|
+
import DownloadS3 from '../download/download-s3.jsx'
|
|
7
|
+
import DownloadCommandLine from '../download/download-command-line.jsx'
|
|
8
|
+
import DownloadDatalad from '../download/download-datalad.jsx'
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
11
|
+
|
|
12
|
+
interface SnapshotRouteParams {
|
|
13
|
+
datasetId?: string
|
|
14
|
+
snapshotId?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const DownloadDataset = ({ worker, datasetPermissions }) => {
|
|
18
|
+
const {
|
|
19
|
+
params: { datasetId, snapshotId: snapshotTag },
|
|
20
|
+
} = useRouteMatch<SnapshotRouteParams>()
|
|
21
|
+
const workerId = worker?.split('-').pop()
|
|
22
|
+
return (
|
|
23
|
+
<DatasetPageBorder>
|
|
24
|
+
<HeaderRow3>How to Download</HeaderRow3>
|
|
25
|
+
<div className="grid grid-between">
|
|
26
|
+
{'showDirectoryPicker' in globalThis ? (
|
|
27
|
+
<DownloadLink datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
28
|
+
) : (
|
|
29
|
+
<DownloadCommandLine
|
|
30
|
+
datasetId={datasetId}
|
|
31
|
+
snapshotTag={snapshotTag}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
<DownloadS3 datasetId={datasetId} />
|
|
35
|
+
</div>
|
|
36
|
+
{'showDirectoryPicker' in globalThis && (
|
|
37
|
+
<DownloadCommandLine datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
38
|
+
)}
|
|
39
|
+
<DownloadDatalad
|
|
40
|
+
datasetId={datasetId}
|
|
41
|
+
workerId={workerId}
|
|
42
|
+
datasetPermissions={datasetPermissions}
|
|
43
|
+
/>
|
|
44
|
+
</DatasetPageBorder>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
DownloadDataset.propTypes = {
|
|
49
|
+
worker: PropTypes.string,
|
|
50
|
+
datasetPermissions: PropTypes.object,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default DownloadDataset
|
|
@@ -2,6 +2,8 @@ import React, { FC } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { DeleteReviewerLink } from '../mutations/delete-anonymous-reviewer'
|
|
4
4
|
import { CreateReviewLink } from '../mutations/create-anonymous-reviewer'
|
|
5
|
+
import { HeaderRow4 } from './styles/header-row'
|
|
6
|
+
|
|
5
7
|
const formatDate = dateObject =>
|
|
6
8
|
new Date(dateObject).toISOString().split('T')[0]
|
|
7
9
|
|
|
@@ -18,12 +20,16 @@ export const AnonymousReviewer: FC<AnonymousReviewerProps> = ({
|
|
|
18
20
|
reviewers,
|
|
19
21
|
}) => {
|
|
20
22
|
return (
|
|
21
|
-
<div className="dataset-anonymous-form
|
|
23
|
+
<div className="dataset-anonymous-form">
|
|
22
24
|
<div className="dataset-form-header">
|
|
23
25
|
<div className="form-group">
|
|
24
|
-
<
|
|
26
|
+
<HeaderRow4>Create Anonymous Reviewer Link</HeaderRow4>
|
|
27
|
+
<p>
|
|
28
|
+
Create an anonymous review link to share this dataset for anonymous
|
|
29
|
+
access. A review user has read only access and tokens are valid for
|
|
30
|
+
one year or until they are removed.
|
|
31
|
+
</p>
|
|
25
32
|
</div>
|
|
26
|
-
<hr />
|
|
27
33
|
<CreateReviewLink datasetId={datasetId} />
|
|
28
34
|
{reviewers.length ? (
|
|
29
35
|
<div className="dataset-form-body">
|
|
@@ -6,6 +6,8 @@ import { Button } from '@openneuro/components/button'
|
|
|
6
6
|
import { RemovePermissions } from '../mutations/remove-permissions'
|
|
7
7
|
import { UpdateDatasetPermissions } from '../mutations/update-permissions'
|
|
8
8
|
import { AnonymousReviewer } from './manage-anonymous-reviewers'
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
9
11
|
|
|
10
12
|
const description = {
|
|
11
13
|
admin: 'Edit dataset and edit permissions',
|
|
@@ -71,15 +73,13 @@ const Share = ({ datasetId, permissions, reviewers }) => {
|
|
|
71
73
|
const adminActive = access === 'admin' && 'active'
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
|
-
|
|
75
|
-
<div className="dataset-share-form
|
|
76
|
+
<DatasetPageBorder>
|
|
77
|
+
<div className="dataset-share-form">
|
|
76
78
|
<div className="dataset-form-header">
|
|
77
79
|
<div className="form-group">
|
|
78
|
-
<
|
|
80
|
+
<HeaderRow3>Share Dataset</HeaderRow3>
|
|
79
81
|
</div>
|
|
80
|
-
<hr />
|
|
81
82
|
<div className="dataset-form-body">
|
|
82
|
-
<h3>Dataset shared with:</h3>
|
|
83
83
|
<ShareTable datasetId={datasetId} permissions={permissions} />
|
|
84
84
|
<p>
|
|
85
85
|
Enter a user's email address and select access level to share
|
|
@@ -123,15 +123,12 @@ const Share = ({ datasetId, permissions, reviewers }) => {
|
|
|
123
123
|
metadata={access}
|
|
124
124
|
done={() => setUserEmail('')}
|
|
125
125
|
/>
|
|
126
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
127
|
-
Return to Dataset
|
|
128
|
-
</Link>
|
|
129
126
|
</div>
|
|
130
127
|
</div>
|
|
131
128
|
</div>
|
|
132
|
-
<
|
|
129
|
+
<hr />
|
|
133
130
|
<AnonymousReviewer datasetId={datasetId} reviewers={reviewers} />
|
|
134
|
-
|
|
131
|
+
</DatasetPageBorder>
|
|
135
132
|
)
|
|
136
133
|
}
|
|
137
134
|
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
3
|
+
import { Redirect } from 'react-router-dom'
|
|
4
4
|
import PublishDataset from '../mutations/publish.jsx'
|
|
5
|
-
import {
|
|
5
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
6
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
7
|
+
|
|
6
8
|
const hasExpectedMetadata = metadata =>
|
|
7
9
|
typeof metadata === 'object' && metadata !== null
|
|
8
10
|
|
|
9
11
|
const Publish = ({ datasetId, metadata }) =>
|
|
10
12
|
hasExpectedMetadata(metadata) ? (
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<div className="col-xs-12 dataset-form-body">
|
|
13
|
+
<DatasetPageBorder className="dataset-form">
|
|
14
|
+
<HeaderRow3>Publish</HeaderRow3>
|
|
15
|
+
<div className="dataset-form-body">
|
|
15
16
|
<p className="text-danger">
|
|
16
17
|
All existing and future snapshots of this dataset will be released
|
|
17
18
|
publicly under a{' '}
|
|
18
19
|
<a href="https://wiki.creativecommons.org/wiki/CC0">CC0 license</a>.
|
|
19
20
|
</p>
|
|
20
21
|
</div>
|
|
21
|
-
<div className="
|
|
22
|
-
<div className="
|
|
22
|
+
<div className="dataset-form-controls">
|
|
23
|
+
<div className="modal-actions">
|
|
23
24
|
<PublishDataset datasetId={datasetId} />
|
|
24
|
-
<Link to={`/datasets/${datasetId}`}>
|
|
25
|
-
<Button nobg={true} label="Return to Dataset" />
|
|
26
|
-
</Link>
|
|
27
25
|
</div>
|
|
28
26
|
</div>
|
|
29
|
-
</
|
|
27
|
+
</DatasetPageBorder>
|
|
30
28
|
) : (
|
|
31
29
|
<Redirect
|
|
32
30
|
to={{
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Markdown from 'markdown-to-jsx'
|
|
3
|
+
import { ReadMore } from '@openneuro/components/read-more'
|
|
4
|
+
import { MetaDataBlock } from '@openneuro/components/dataset'
|
|
5
|
+
import Files from '../files/files'
|
|
6
|
+
import Comments from '../comments/comments'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Default tab for snapshot pages
|
|
10
|
+
*/
|
|
11
|
+
export const SnapshotDefault = ({ dataset, snapshot }) => (
|
|
12
|
+
<>
|
|
13
|
+
<ReadMore
|
|
14
|
+
fileTree={true}
|
|
15
|
+
id="collapse-tree"
|
|
16
|
+
expandLabel="Read More"
|
|
17
|
+
collapseLabel="Collapse">
|
|
18
|
+
<Files
|
|
19
|
+
datasetId={dataset.id}
|
|
20
|
+
snapshotTag={snapshot.tag}
|
|
21
|
+
datasetName={snapshot.description.Name}
|
|
22
|
+
files={snapshot.files}
|
|
23
|
+
editMode={false}
|
|
24
|
+
datasetPermissions={dataset.permissions}
|
|
25
|
+
/>
|
|
26
|
+
</ReadMore>
|
|
27
|
+
<MetaDataBlock
|
|
28
|
+
heading="README"
|
|
29
|
+
item={
|
|
30
|
+
<ReadMore id="readme" expandLabel="Read More" collapseLabel="Collapse">
|
|
31
|
+
<Markdown>
|
|
32
|
+
{snapshot.readme == null ? 'N/A' : snapshot.readme}
|
|
33
|
+
</Markdown>
|
|
34
|
+
</ReadMore>
|
|
35
|
+
}
|
|
36
|
+
className="dataset-readme markdown-body"
|
|
37
|
+
/>
|
|
38
|
+
<Comments
|
|
39
|
+
datasetId={dataset.id}
|
|
40
|
+
uploader={dataset.uploader}
|
|
41
|
+
comments={dataset.comments}
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
44
|
+
)
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import semver from 'semver'
|
|
4
|
+
import SnapshotDataset from '../mutations/snapshot'
|
|
5
|
+
import EditList from '../fragments/edit-list.jsx'
|
|
6
|
+
import { Button } from '@openneuro/components/button'
|
|
7
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
8
|
+
import { HeaderRow4 } from './styles/header-row'
|
|
9
|
+
import FileView from '../files/file-view'
|
|
10
|
+
import styled from '@emotion/styled'
|
|
11
|
+
|
|
12
|
+
const FormRow = styled.div`
|
|
13
|
+
margin-top: 0;
|
|
14
|
+
margin-bottom: 1.3em;
|
|
15
|
+
`
|
|
16
|
+
|
|
17
|
+
export const NoErrors = ({ issues, children }) => {
|
|
18
|
+
const noErrors =
|
|
19
|
+
issues && issues.filter(issue => issue.severity === 'error').length === 0
|
|
20
|
+
// zero authors will cause DOI minting to fail
|
|
21
|
+
const hasAuthor =
|
|
22
|
+
issues && issues.filter(issue => issue.code === 113).length === 0
|
|
23
|
+
if (noErrors && hasAuthor) {
|
|
24
|
+
return children
|
|
25
|
+
} else {
|
|
26
|
+
const correctErrorsMessage =
|
|
27
|
+
'BIDS validation must be complete and all errors corrected'
|
|
28
|
+
const noAuthorMessage =
|
|
29
|
+
'"Authors" must include at least one entry in dataset_description.json'
|
|
30
|
+
const includedMessages = []
|
|
31
|
+
if (!noErrors) includedMessages.push(correctErrorsMessage)
|
|
32
|
+
if (!hasAuthor) includedMessages.push(noAuthorMessage)
|
|
33
|
+
return (
|
|
34
|
+
<span className="text-danger">
|
|
35
|
+
{`${includedMessages.join(' and ')} to create a version`}
|
|
36
|
+
</span>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const SnapshotRoute = ({ datasetId, snapshots, issues, description }) => {
|
|
42
|
+
const [changes, setChanges] = useState([])
|
|
43
|
+
const [semanticLevel, setSemanticLevel] = useState('patch')
|
|
44
|
+
const draftLicense = (description && description.License) || 'none'
|
|
45
|
+
const requiredLicense = 'CC0'
|
|
46
|
+
const updateToCC0 = draftLicense !== requiredLicense
|
|
47
|
+
|
|
48
|
+
const latestSnapshot = snapshots.length && snapshots[snapshots.length - 1]
|
|
49
|
+
const newVersion =
|
|
50
|
+
snapshots.length && semver.valid(latestSnapshot.tag)
|
|
51
|
+
? semver.inc(latestSnapshot.tag, semanticLevel)
|
|
52
|
+
: '1.0.0'
|
|
53
|
+
|
|
54
|
+
const majorActive = semanticLevel === 'major' && 'active'
|
|
55
|
+
const minorActive = semanticLevel === 'minor' && 'active'
|
|
56
|
+
const patchActive = semanticLevel === 'patch' && 'active'
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<DatasetPageBorder>
|
|
60
|
+
<div className="dataset-snapshot-form">
|
|
61
|
+
<div className="dataset-form-body">
|
|
62
|
+
<HeaderRow4>New Version</HeaderRow4>
|
|
63
|
+
{updateToCC0 && (
|
|
64
|
+
<p>
|
|
65
|
+
<strong>Notice:</strong> The current license{' '}
|
|
66
|
+
<i>"e;{draftLicense}"e;</i> will be updated to
|
|
67
|
+
"e;CC0"e; when the version is created. Please see FAQ item
|
|
68
|
+
"e;Are there any restrictions on the uploaded data?"e; for
|
|
69
|
+
details.
|
|
70
|
+
</p>
|
|
71
|
+
)}
|
|
72
|
+
<p>
|
|
73
|
+
Create a new version of this dataset for download and public access.
|
|
74
|
+
This will begin an export of this dataset to GitHub and S3 if it has
|
|
75
|
+
been made public.
|
|
76
|
+
</p>
|
|
77
|
+
<FormRow className="snapshot-input-group">
|
|
78
|
+
{newVersion}
|
|
79
|
+
<div className="input-group-btn">
|
|
80
|
+
<Button
|
|
81
|
+
secondary={true}
|
|
82
|
+
label="Major"
|
|
83
|
+
size="xsmall"
|
|
84
|
+
className={`btn btn-default ${majorActive}`}
|
|
85
|
+
onClick={() => setSemanticLevel('major')}
|
|
86
|
+
/>
|
|
87
|
+
<Button
|
|
88
|
+
secondary={true}
|
|
89
|
+
label="Minor"
|
|
90
|
+
size="xsmall"
|
|
91
|
+
className={`btn btn-default ${minorActive}`}
|
|
92
|
+
onClick={() => setSemanticLevel('minor')}
|
|
93
|
+
/>
|
|
94
|
+
<Button
|
|
95
|
+
secondary={true}
|
|
96
|
+
label="Patch"
|
|
97
|
+
size="xsmall"
|
|
98
|
+
className={`btn btn-default ${patchActive}`}
|
|
99
|
+
onClick={() => setSemanticLevel('patch')}
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</FormRow>
|
|
103
|
+
{latestSnapshot ? (
|
|
104
|
+
<FormRow>
|
|
105
|
+
<HeaderRow4>Current Changelog</HeaderRow4>
|
|
106
|
+
<FileView
|
|
107
|
+
datasetId={datasetId}
|
|
108
|
+
snapshotTag={latestSnapshot.tag}
|
|
109
|
+
path="CHANGES"
|
|
110
|
+
/>
|
|
111
|
+
</FormRow>
|
|
112
|
+
) : null}
|
|
113
|
+
<HeaderRow4>New Changelog</HeaderRow4>
|
|
114
|
+
<p>Add CHANGES file lines describing the new version.</p>
|
|
115
|
+
<EditList
|
|
116
|
+
placeholder="Enter new changes here..."
|
|
117
|
+
elements={changes}
|
|
118
|
+
setElements={setChanges}
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
<NoErrors issues={issues}>
|
|
122
|
+
{changes.length ? null : (
|
|
123
|
+
<small className="text-danger">
|
|
124
|
+
You must add at least one change message to create a new version
|
|
125
|
+
</small>
|
|
126
|
+
)}
|
|
127
|
+
</NoErrors>
|
|
128
|
+
<div className="dataset-form-controls">
|
|
129
|
+
<SnapshotDataset
|
|
130
|
+
datasetId={datasetId}
|
|
131
|
+
tag={newVersion}
|
|
132
|
+
changes={changes}
|
|
133
|
+
disabled={changes.length < 1}
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</DatasetPageBorder>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
SnapshotRoute.propTypes = {
|
|
142
|
+
datasetId: PropTypes.string,
|
|
143
|
+
snapshots: PropTypes.array,
|
|
144
|
+
issues: PropTypes.array,
|
|
145
|
+
description: PropTypes.object,
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export default SnapshotRoute
|