@openneuro/app 4.5.0 → 4.6.0-alpha.1
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/{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/{refactor_2021/dataset → dataset}/draft-container.tsx +15 -53
- 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 +0 -0
- 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 +0 -0
- 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 +4 -15
- 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 +9 -42
- package/src/scripts/{refactor_2021 → errors}/freshdesk-widget.jsx +1 -1
- package/src/scripts/errors/freshdeskInterface.jsx +1 -1
- package/src/scripts/index.tsx +5 -5
- package/src/scripts/pages/admin/admin.jsx +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +1 -1
- package/src/scripts/{refactor_2021/user → pages}/api.jsx +2 -2
- 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/pages/import-dataset.tsx +5 -5
- package/src/scripts/routes.tsx +3 -3
- 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/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/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
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* global globalThis */
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import PropTypes from 'prop-types'
|
|
4
|
-
import { Link, 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
|
-
|
|
10
|
-
interface SnapshotRouteParams {
|
|
11
|
-
datasetId?: string
|
|
12
|
-
snapshotId?: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const DownloadDataset = ({ worker, datasetPermissions }) => {
|
|
16
|
-
const {
|
|
17
|
-
params: { datasetId, snapshotId: snapshotTag },
|
|
18
|
-
} = useRouteMatch<SnapshotRouteParams>()
|
|
19
|
-
const workerId = worker?.split('-').pop()
|
|
20
|
-
return (
|
|
21
|
-
<div>
|
|
22
|
-
<div className="container">
|
|
23
|
-
<div className="grid grid-between">
|
|
24
|
-
<div className="col col-12">
|
|
25
|
-
<h3>How to Download</h3>
|
|
26
|
-
</div>
|
|
27
|
-
<div className="col col-lg">
|
|
28
|
-
{'showDirectoryPicker' in globalThis ? (
|
|
29
|
-
<DownloadLink datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
30
|
-
) : (
|
|
31
|
-
<DownloadCommandLine
|
|
32
|
-
datasetId={datasetId}
|
|
33
|
-
snapshotTag={snapshotTag}
|
|
34
|
-
/>
|
|
35
|
-
)}
|
|
36
|
-
</div>
|
|
37
|
-
<div className="col col-lg">
|
|
38
|
-
<DownloadS3 datasetId={datasetId} />
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<hr />
|
|
42
|
-
<div className="grid grid-between">
|
|
43
|
-
{'showDirectoryPicker' in globalThis && (
|
|
44
|
-
<div className="col col-lg">
|
|
45
|
-
<DownloadCommandLine
|
|
46
|
-
datasetId={datasetId}
|
|
47
|
-
snapshotTag={snapshotTag}
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
<div className="col col-lg">
|
|
52
|
-
<DownloadDatalad
|
|
53
|
-
datasetId={datasetId}
|
|
54
|
-
workerId={workerId}
|
|
55
|
-
datasetPermissions={datasetPermissions}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div className="grid grid-between">
|
|
60
|
-
<div className="col">
|
|
61
|
-
<Link className="return-link m-l-0" to={`/datasets/${datasetId}`}>
|
|
62
|
-
Return to Dataset
|
|
63
|
-
</Link>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
DownloadDataset.propTypes = {
|
|
72
|
-
worker: PropTypes.string,
|
|
73
|
-
datasetPermissions: PropTypes.object,
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export default DownloadDataset
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import semver from 'semver'
|
|
4
|
-
import { Link } from 'react-router-dom'
|
|
5
|
-
import SnapshotDataset from '../mutations/snapshot'
|
|
6
|
-
import ValidationStatus from '../../validation/validation-status'
|
|
7
|
-
import EditList from '../fragments/edit-list.jsx'
|
|
8
|
-
import { Button } from '@openneuro/components/button'
|
|
9
|
-
|
|
10
|
-
export const NoErrors = ({ issues, children }) => {
|
|
11
|
-
const noErrors =
|
|
12
|
-
issues && issues.filter(issue => issue.severity === 'error').length === 0
|
|
13
|
-
// zero authors will cause DOI minting to fail
|
|
14
|
-
const hasAuthor =
|
|
15
|
-
issues && issues.filter(issue => issue.code === 113).length === 0
|
|
16
|
-
if (noErrors && hasAuthor) {
|
|
17
|
-
return children
|
|
18
|
-
} else {
|
|
19
|
-
const correctErrorsMessage =
|
|
20
|
-
'BIDS validation must be complete and all errors corrected'
|
|
21
|
-
const noAuthorMessage =
|
|
22
|
-
'"Authors" must include at least one entry in dataset_description.json'
|
|
23
|
-
const includedMessages = []
|
|
24
|
-
if (!noErrors) includedMessages.push(correctErrorsMessage)
|
|
25
|
-
if (!hasAuthor) includedMessages.push(noAuthorMessage)
|
|
26
|
-
return (
|
|
27
|
-
<span className="text-danger">
|
|
28
|
-
{`${includedMessages.join(' and ')} to create a version`}
|
|
29
|
-
</span>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const SnapshotRoute = ({ datasetId, snapshots, issues, description }) => {
|
|
35
|
-
const [changes, setChanges] = useState([])
|
|
36
|
-
const [semanticLevel, setSemanticLevel] = useState('patch')
|
|
37
|
-
const draftLicense = (description && description.License) || 'none'
|
|
38
|
-
const requiredLicense = 'CC0'
|
|
39
|
-
const updateToCC0 = draftLicense !== requiredLicense
|
|
40
|
-
|
|
41
|
-
const latestSnapshot = snapshots.length && snapshots[snapshots.length - 1]
|
|
42
|
-
const newVersion =
|
|
43
|
-
snapshots.length && semver.valid(latestSnapshot.tag)
|
|
44
|
-
? semver.inc(latestSnapshot.tag, semanticLevel)
|
|
45
|
-
: '1.0.0'
|
|
46
|
-
|
|
47
|
-
const majorActive = semanticLevel === 'major' && 'active'
|
|
48
|
-
const minorActive = semanticLevel === 'minor' && 'active'
|
|
49
|
-
const patchActive = semanticLevel === 'patch' && 'active'
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<div className="dataset-snapshot-form container">
|
|
53
|
-
<div className="dataset-form-header">
|
|
54
|
-
<h3>Create Version</h3>
|
|
55
|
-
<hr />
|
|
56
|
-
</div>
|
|
57
|
-
<div className="dataset-form-body">
|
|
58
|
-
{updateToCC0 && (
|
|
59
|
-
<div className="alert-warning padded-message">
|
|
60
|
-
<span>
|
|
61
|
-
<strong>Notice:</strong>
|
|
62
|
-
{` the current license "${draftLicense}" will be updated to "CC0" when the version is created. Please see FAQ item "Are there any restrictions on the uploaded data?" for details.`}
|
|
63
|
-
</span>
|
|
64
|
-
</div>
|
|
65
|
-
)}
|
|
66
|
-
<ValidationStatus issues={issues} />
|
|
67
|
-
<h4>Version</h4>
|
|
68
|
-
<div className="snapshot-input-group">
|
|
69
|
-
{newVersion}
|
|
70
|
-
<div className="input-group-btn">
|
|
71
|
-
<Button
|
|
72
|
-
secondary={true}
|
|
73
|
-
label="Major"
|
|
74
|
-
size="xsmall"
|
|
75
|
-
className={`btn btn-default ${majorActive}`}
|
|
76
|
-
onClick={() => setSemanticLevel('major')}
|
|
77
|
-
/>
|
|
78
|
-
<Button
|
|
79
|
-
secondary={true}
|
|
80
|
-
label="Minor"
|
|
81
|
-
size="xsmall"
|
|
82
|
-
className={`btn btn-default ${minorActive}`}
|
|
83
|
-
onClick={() => setSemanticLevel('minor')}
|
|
84
|
-
/>
|
|
85
|
-
<Button
|
|
86
|
-
secondary={true}
|
|
87
|
-
label="Patch"
|
|
88
|
-
size="xsmall"
|
|
89
|
-
className={`btn btn-default ${patchActive}`}
|
|
90
|
-
onClick={() => setSemanticLevel('patch')}
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
<h4>Changelog</h4>
|
|
95
|
-
<EditList
|
|
96
|
-
placeholder="Enter new changes here..."
|
|
97
|
-
elements={changes}
|
|
98
|
-
setElements={setChanges}
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
<NoErrors issues={issues}>
|
|
102
|
-
{changes.length ? null : (
|
|
103
|
-
<small className="text-danger">
|
|
104
|
-
You must add at least one change message to create a new version
|
|
105
|
-
</small>
|
|
106
|
-
)}
|
|
107
|
-
</NoErrors>
|
|
108
|
-
<div className="col-xs-12 dataset-form-controls">
|
|
109
|
-
<div className="col-xs-12 modal-actions">
|
|
110
|
-
<NoErrors issues={issues}>
|
|
111
|
-
{changes.length ? (
|
|
112
|
-
<SnapshotDataset
|
|
113
|
-
datasetId={datasetId}
|
|
114
|
-
tag={newVersion}
|
|
115
|
-
changes={changes}
|
|
116
|
-
/>
|
|
117
|
-
) : null}
|
|
118
|
-
</NoErrors>{' '}
|
|
119
|
-
<Link to={`/datasets/${datasetId}`}>
|
|
120
|
-
<Button
|
|
121
|
-
className="return-link"
|
|
122
|
-
nobg={true}
|
|
123
|
-
label="Return to Dataset"
|
|
124
|
-
/>
|
|
125
|
-
</Link>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
SnapshotRoute.propTypes = {
|
|
133
|
-
datasetId: PropTypes.string,
|
|
134
|
-
snapshots: PropTypes.array,
|
|
135
|
-
issues: PropTypes.array,
|
|
136
|
-
description: PropTypes.object,
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export default SnapshotRoute
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { datasets } from '@openneuro/client'
|
|
2
|
-
|
|
3
|
-
export function trackAnalytics(client, datasetId, options) {
|
|
4
|
-
options = options || {}
|
|
5
|
-
return client.mutate({
|
|
6
|
-
mutation: datasets.trackAnalytics,
|
|
7
|
-
variables: {
|
|
8
|
-
datasetId: datasetId,
|
|
9
|
-
tag: options.tag,
|
|
10
|
-
type: options.type,
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*global globalThis*/
|
|
2
|
-
globalThis.dataLayer = globalThis.dataLayer || []
|
|
3
|
-
|
|
4
|
-
function gtag() {
|
|
5
|
-
globalThis.dataLayer.push(arguments)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
gtag('js', new Date())
|
|
9
|
-
|
|
10
|
-
export const initialize = trackingIds =>
|
|
11
|
-
trackingIds.forEach(trackingId => gtag('config', trackingId))
|
|
12
|
-
|
|
13
|
-
export const pageview = path =>
|
|
14
|
-
gtag('event', 'page_view', {
|
|
15
|
-
page_path: path,
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export const event = ({ category, action, label }) =>
|
|
19
|
-
gtag('event', action, {
|
|
20
|
-
event_category: category,
|
|
21
|
-
event_label: label,
|
|
22
|
-
})
|