@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openneuro/app",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0-alpha.1",
|
|
4
4
|
"description": "React JS web frontend for the OpenNeuro platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "public/client.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@elastic/apm-rum": "5.9.1",
|
|
20
20
|
"@emotion/react": "11.6.0",
|
|
21
21
|
"@emotion/styled": "11.6.0",
|
|
22
|
-
"@openneuro/client": "^4.
|
|
23
|
-
"@openneuro/components": "^4.
|
|
22
|
+
"@openneuro/client": "^4.6.0-alpha.1",
|
|
23
|
+
"@openneuro/components": "^4.6.0-alpha.1",
|
|
24
24
|
"babel-runtime": "^6.26.0",
|
|
25
|
-
"bids-validator": "1.9.
|
|
25
|
+
"bids-validator": "1.9.3",
|
|
26
26
|
"bytes": "^3.0.0",
|
|
27
27
|
"comlink": "^4.0.5",
|
|
28
28
|
"core-js": "^3.3.2",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"access": "public"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "43f49a6f1c5d20f6ea0ddc30be58ab10fecf8957"
|
|
120
120
|
}
|
package/src/scripts/{refactor_2021/authentication → authentication}/__tests__/profile.spec.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React, { FC, useContext } from 'react'
|
|
2
2
|
import useState from 'react-usestateref'
|
|
3
|
-
import UploaderContext from '
|
|
4
|
-
import UploadProgress from '
|
|
3
|
+
import UploaderContext from '../../uploader/uploader-context.js'
|
|
4
|
+
import UploadProgress from '../../uploader/upload-progress.jsx'
|
|
5
5
|
import { Header, LandingExpandedHeader } from '@openneuro/components/header'
|
|
6
6
|
import { Input } from '@openneuro/components/input'
|
|
7
|
-
import ModalitySelect from '
|
|
8
|
-
import { SearchParamsCtx } from '
|
|
9
|
-
import initialSearchParams from '
|
|
10
|
-
import { UserModalOpenCtx } from '
|
|
7
|
+
import ModalitySelect from '../../search/inputs/modality-select'
|
|
8
|
+
import { SearchParamsCtx } from '../../search/search-params-ctx'
|
|
9
|
+
import initialSearchParams from '../../search/initial-search-params'
|
|
10
|
+
import { UserModalOpenCtx } from '../../utils/user-login-modal-ctx'
|
|
11
11
|
import { useLocation, useHistory } from 'react-router-dom'
|
|
12
12
|
import { useCookies } from 'react-cookie'
|
|
13
|
-
import signOut from '
|
|
14
|
-
import { getUnexpiredProfile } from '
|
|
15
|
-
import FreshdeskWidget from '../freshdesk-widget'
|
|
16
|
-
import AggregateCountsContainer from '
|
|
17
|
-
import loginUrls from '
|
|
18
|
-
import UploaderView from '
|
|
19
|
-
import UploadButton from '
|
|
20
|
-
import UploadProgressButton from '
|
|
13
|
+
import signOut from '../../authentication/signOut'
|
|
14
|
+
import { getUnexpiredProfile } from '../../authentication/profile'
|
|
15
|
+
import FreshdeskWidget from '../partials/freshdesk-widget'
|
|
16
|
+
import AggregateCountsContainer from '../../pages/front-page/aggregate-queries/aggregate-counts-container'
|
|
17
|
+
import loginUrls from '../../authentication/loginUrls'
|
|
18
|
+
import UploaderView from '../../uploader/uploader-view.jsx'
|
|
19
|
+
import UploadButton from '../../uploader/upload-button.jsx'
|
|
20
|
+
import UploadProgressButton from '../../uploader/upload-progress-button.jsx'
|
|
21
21
|
const HeaderContainer: FC = () => {
|
|
22
22
|
const history = useHistory()
|
|
23
23
|
|
|
@@ -134,7 +134,9 @@ const HeaderContainer: FC = () => {
|
|
|
134
134
|
onSearch={() => {
|
|
135
135
|
handleSubmit()
|
|
136
136
|
}}
|
|
137
|
-
clearSearchParams={() => {
|
|
137
|
+
clearSearchParams={() => {
|
|
138
|
+
clearSearchParams()
|
|
139
|
+
}}
|
|
138
140
|
/>
|
|
139
141
|
)}
|
|
140
142
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { useCookies } from 'react-cookie'
|
|
4
|
-
import { getProfile } from '../../
|
|
4
|
+
import { getProfile } from '../../authentication/profile'
|
|
5
5
|
import { config } from '../../config'
|
|
6
6
|
|
|
7
7
|
const buildCustomQuery = (customText, prepopulatedFields) => {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ import Comment from './comment.jsx'
|
|
|
5
5
|
import CommentEditor from './comment-editor.jsx'
|
|
6
6
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
7
7
|
import LoggedOut from '../../authentication/logged-out.jsx'
|
|
8
|
-
import ErrorBoundary from '
|
|
8
|
+
import ErrorBoundary from '../../errors/errorBoundary.jsx'
|
|
9
9
|
|
|
10
10
|
import ToastContent from '../../common/partials/toast-content.jsx'
|
|
11
11
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { apm } from '
|
|
1
|
+
import { apm } from '../apm'
|
|
2
2
|
import React, { useEffect } from 'react'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import { useQuery, gql, useApolloClient } from '@apollo/client'
|
|
5
5
|
import { Loading } from '@openneuro/components/loading'
|
|
6
6
|
|
|
7
|
-
import DatasetQueryContext from '
|
|
8
|
-
import DatasetContext from '
|
|
7
|
+
import DatasetQueryContext from '../datalad/dataset/dataset-query-context.js'
|
|
8
|
+
import DatasetContext from '../datalad/dataset/dataset-context.js'
|
|
9
9
|
import DatasetRoutes from './dataset-routes'
|
|
10
|
-
import FilesSubscription from '
|
|
11
|
-
import usePermissionsSubscription from '
|
|
12
|
-
import useSnapshotsUpdatedSubscriptions from '
|
|
10
|
+
import FilesSubscription from '../datalad/subscriptions/files-subscription.jsx'
|
|
11
|
+
import usePermissionsSubscription from '../datalad/subscriptions/usePermissionsSubscription'
|
|
12
|
+
import useSnapshotsUpdatedSubscriptions from '../datalad/subscriptions/useSnapshotsUpdatedSubscriptions'
|
|
13
13
|
import useDatasetDeletedSubscription, {
|
|
14
14
|
datasetDeletedToast,
|
|
15
|
-
} from '
|
|
16
|
-
import useDraftSubscription from '
|
|
17
|
-
import * as DatasetQueryFragments from '
|
|
18
|
-
import { DATASET_COMMENTS } from '
|
|
15
|
+
} from '../datalad/subscriptions/useDatasetDeletedSubscription.jsx'
|
|
16
|
+
import useDraftSubscription from '../datalad/subscriptions/useDraftSubscription.js'
|
|
17
|
+
import * as DatasetQueryFragments from '../datalad/dataset/dataset-query-fragments.js'
|
|
18
|
+
import { DATASET_COMMENTS } from '../datalad/dataset/comments-fragments.js'
|
|
19
19
|
import ErrorBoundary, {
|
|
20
20
|
ErrorBoundaryAssertionFailureException,
|
|
21
|
-
} from '
|
|
22
|
-
import DatasetRedirect from '
|
|
23
|
-
import { trackAnalytics } from '
|
|
24
|
-
import FourOFourPage from '
|
|
25
|
-
import FourOThreePage from '
|
|
21
|
+
} from '../errors/errorBoundary.jsx'
|
|
22
|
+
import DatasetRedirect from '../datalad/routes/dataset-redirect'
|
|
23
|
+
import { trackAnalytics } from '../utils/datalad'
|
|
24
|
+
import FourOFourPage from '../errors/404page'
|
|
25
|
+
import FourOThreePage from '../errors/403page'
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Generate the dataset page query
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import { Route, Switch } from 'react-router-dom'
|
|
4
|
+
import SnapshotContainer from './snapshot-container'
|
|
5
|
+
import DraftContainer from './draft-container'
|
|
6
|
+
|
|
7
|
+
const DatasetRoutes = ({ dataset, error }) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (error) {
|
|
10
|
+
throw error
|
|
11
|
+
}
|
|
12
|
+
}, [dataset, error])
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Switch>
|
|
16
|
+
<Route
|
|
17
|
+
path="/datasets/:datasetId/versions/:tag"
|
|
18
|
+
render={({
|
|
19
|
+
match: {
|
|
20
|
+
params: { tag },
|
|
21
|
+
},
|
|
22
|
+
}) => {
|
|
23
|
+
return <SnapshotContainer dataset={dataset} tag={tag} />
|
|
24
|
+
}}
|
|
25
|
+
/>
|
|
26
|
+
<Route
|
|
27
|
+
path="/datasets/:datasetId"
|
|
28
|
+
render={() => <DraftContainer dataset={dataset} />}
|
|
29
|
+
/>
|
|
30
|
+
</Switch>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
DatasetRoutes.propTypes = {
|
|
35
|
+
dataset: PropTypes.object,
|
|
36
|
+
error: PropTypes.object,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default DatasetRoutes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-link.spec.jsx
RENAMED
|
File without changes
|
package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-native.spec.js
RENAMED
|
File without changes
|
package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/shell-example.spec.jsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import ShellExample from './shell-example.jsx'
|
|
4
|
-
import { getConfig } from '
|
|
4
|
+
import { getConfig } from '../../config'
|
|
5
5
|
|
|
6
6
|
export const DownloadSampleS3 = ({ datasetId, s3Bucket }) => (
|
|
7
7
|
<ShellExample>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,16 +5,15 @@ import pluralize from 'pluralize'
|
|
|
5
5
|
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
|
|
6
6
|
import parseISO from 'date-fns/parseISO'
|
|
7
7
|
|
|
8
|
+
import { DatasetPageTabContainer } from './routes/styles/dataset-page-tab-container'
|
|
8
9
|
import Validation from '../validation/validation.jsx'
|
|
9
|
-
import
|
|
10
|
-
import { config } from '../../config'
|
|
10
|
+
import { config } from '../config'
|
|
11
11
|
import {
|
|
12
12
|
getUnexpiredProfile,
|
|
13
13
|
hasEditPermissions,
|
|
14
14
|
hasDatasetAdminPermissions,
|
|
15
15
|
} from '../authentication/profile'
|
|
16
16
|
import { useCookies } from 'react-cookie'
|
|
17
|
-
import Comments from './comments/comments.jsx'
|
|
18
17
|
import { DatasetAlertDraft } from './fragments/dataset-alert-draft'
|
|
19
18
|
import {
|
|
20
19
|
MetaDataBlock,
|
|
@@ -28,7 +27,6 @@ import {
|
|
|
28
27
|
VersionList,
|
|
29
28
|
DatasetTools,
|
|
30
29
|
} from '@openneuro/components/dataset'
|
|
31
|
-
import { ReadMore } from '@openneuro/components/read-more'
|
|
32
30
|
|
|
33
31
|
import { FollowDataset } from './mutations/follow'
|
|
34
32
|
import { StarDataset } from './mutations/star'
|
|
@@ -37,6 +35,8 @@ import EditDescriptionField from './fragments/edit-description-field.jsx'
|
|
|
37
35
|
import EditDescriptionList from './fragments/edit-description-list.jsx'
|
|
38
36
|
import { DOILink } from './fragments/doi-link'
|
|
39
37
|
|
|
38
|
+
import { TabRoutesDraft } from './routes/tab-routes-draft'
|
|
39
|
+
|
|
40
40
|
export interface DraftContainerProps {
|
|
41
41
|
dataset
|
|
42
42
|
tag?: string
|
|
@@ -120,7 +120,7 @@ const DraftContainer: React.FC<DraftContainerProps> = ({ dataset }) => {
|
|
|
120
120
|
<div className="col col-8 col-lg">
|
|
121
121
|
{summary && (
|
|
122
122
|
<DatasetHeaderMeta
|
|
123
|
-
size={
|
|
123
|
+
size={dataset.draft.size}
|
|
124
124
|
totalFiles={summary.totalFiles}
|
|
125
125
|
datasetId={datasetId}
|
|
126
126
|
/>
|
|
@@ -169,55 +169,17 @@ const DraftContainer: React.FC<DraftContainerProps> = ({ dataset }) => {
|
|
|
169
169
|
}
|
|
170
170
|
/>
|
|
171
171
|
</div>
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
isDatasetAdmin={isDatasetAdmin}
|
|
180
|
-
/>
|
|
181
|
-
</div>
|
|
182
|
-
<ReadMore
|
|
183
|
-
fileTree={true}
|
|
184
|
-
id="collapse-tree"
|
|
185
|
-
expandLabel="Expand File Tree"
|
|
186
|
-
collapseLabel="Collapse File Tree">
|
|
187
|
-
<Files
|
|
188
|
-
datasetId={datasetId}
|
|
189
|
-
snapshotTag={null}
|
|
190
|
-
datasetName={dataset.draft.description.Name}
|
|
191
|
-
files={dataset.draft.files}
|
|
192
|
-
editMode={hasEdit}
|
|
193
|
-
datasetPermissions={dataset.permissions}
|
|
194
|
-
/>
|
|
195
|
-
</ReadMore>
|
|
196
|
-
<MetaDataBlock
|
|
197
|
-
heading="README"
|
|
198
|
-
className="dataset-readme markdown-body"
|
|
199
|
-
item={dataset.draft.readme}
|
|
200
|
-
renderEditor={() => (
|
|
201
|
-
<EditDescriptionField
|
|
202
|
-
datasetId={datasetId}
|
|
203
|
-
field="readme"
|
|
204
|
-
rows={12}
|
|
205
|
-
description={dataset.draft.readme}
|
|
206
|
-
editMode={hasEdit}>
|
|
207
|
-
<ReadMore
|
|
208
|
-
id="readme"
|
|
209
|
-
expandLabel="Read More"
|
|
210
|
-
collapseLabel="Collapse">
|
|
211
|
-
<Markdown>{dataset.draft.readme || 'N/A'}</Markdown>
|
|
212
|
-
</ReadMore>
|
|
213
|
-
</EditDescriptionField>
|
|
214
|
-
)}
|
|
215
|
-
/>
|
|
216
|
-
<Comments
|
|
217
|
-
datasetId={dataset.id}
|
|
218
|
-
uploader={dataset.uploader}
|
|
219
|
-
comments={dataset.comments}
|
|
172
|
+
<DatasetTools
|
|
173
|
+
hasEdit={hasEdit}
|
|
174
|
+
isPublic={dataset.public}
|
|
175
|
+
datasetId={datasetId}
|
|
176
|
+
isAdmin={isAdmin}
|
|
177
|
+
hasSnapshot={dataset.snapshots.length !== 0}
|
|
178
|
+
isDatasetAdmin={isDatasetAdmin}
|
|
220
179
|
/>
|
|
180
|
+
<DatasetPageTabContainer>
|
|
181
|
+
<TabRoutesDraft dataset={dataset} hasEdit={hasEdit} />
|
|
182
|
+
</DatasetPageTabContainer>
|
|
221
183
|
</div>
|
|
222
184
|
<div className="col sidebar">
|
|
223
185
|
{' '}
|
|
File without changes
|
|
File without changes
|
|
@@ -22,7 +22,7 @@ exports[`File component renders for dataset snapshots 1`] = `
|
|
|
22
22
|
<span
|
|
23
23
|
class=" "
|
|
24
24
|
data-flow="up"
|
|
25
|
-
data-tooltip="Download"
|
|
25
|
+
data-tooltip="Download: 500B"
|
|
26
26
|
>
|
|
27
27
|
<span
|
|
28
28
|
class="edit-file download-file"
|
|
@@ -83,7 +83,7 @@ exports[`File component renders with common props 1`] = `
|
|
|
83
83
|
<span
|
|
84
84
|
class=" "
|
|
85
85
|
data-flow="up"
|
|
86
|
-
data-tooltip="Download"
|
|
86
|
+
data-tooltip="Download: 500B"
|
|
87
87
|
>
|
|
88
88
|
<span
|
|
89
89
|
class="edit-file download-file"
|
package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-loading.spec.jsx
RENAMED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render, screen, fireEvent } from '@testing-library/react'
|
|
3
|
-
import DatasetQueryContext from '
|
|
3
|
+
import DatasetQueryContext from '../../../datalad/dataset/dataset-query-context.js'
|
|
4
4
|
import FileTreeUnloadedDirectory, {
|
|
5
5
|
mergeNewFiles,
|
|
6
6
|
} from '../file-tree-unloaded-directory.jsx'
|
|
File without changes
|
package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-viewer-type.spec.jsx
RENAMED
|
File without changes
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render, screen } from '@testing-library/react'
|
|
3
3
|
import { MemoryRouter } from 'react-router-dom'
|
|
4
|
-
import File from '../file
|
|
4
|
+
import File from '../file'
|
|
5
5
|
|
|
6
6
|
describe('File component', () => {
|
|
7
7
|
it('renders with common props', () => {
|
|
8
8
|
const { asFragment } = render(
|
|
9
|
-
<File datasetId="ds001" path="" filename="README" />,
|
|
9
|
+
<File datasetId="ds001" path="" filename="README" size={500} />,
|
|
10
10
|
{ wrapper: MemoryRouter },
|
|
11
11
|
)
|
|
12
12
|
expect(asFragment()).toMatchSnapshot()
|
|
13
13
|
})
|
|
14
14
|
it('renders for dataset snapshots', () => {
|
|
15
15
|
const { asFragment } = render(
|
|
16
|
-
<File
|
|
16
|
+
<File
|
|
17
|
+
datasetId="ds001"
|
|
18
|
+
snapshotTag="1.0.0"
|
|
19
|
+
path=""
|
|
20
|
+
filename="README"
|
|
21
|
+
size={500}
|
|
22
|
+
/>,
|
|
17
23
|
{ wrapper: MemoryRouter },
|
|
18
24
|
)
|
|
19
25
|
expect(asFragment()).toMatchSnapshot()
|
|
20
26
|
})
|
|
21
27
|
it('generates correct download links for top level files', () => {
|
|
22
|
-
render(<File datasetId="ds001" path="" filename="README" />, {
|
|
28
|
+
render(<File datasetId="ds001" path="" filename="README" size={500} />, {
|
|
23
29
|
wrapper: MemoryRouter,
|
|
24
30
|
})
|
|
25
31
|
expect(screen.getByRole('link', { name: 'download file' })).toHaveAttribute(
|
|
@@ -33,6 +39,7 @@ describe('File component', () => {
|
|
|
33
39
|
datasetId="ds001"
|
|
34
40
|
path="sub-01:anat"
|
|
35
41
|
filename="sub-01_T1w.nii.gz"
|
|
42
|
+
size={2000000}
|
|
36
43
|
/>,
|
|
37
44
|
{ wrapper: MemoryRouter },
|
|
38
45
|
)
|
|
File without changes
|
|
@@ -2,9 +2,9 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { Link } from 'react-router-dom'
|
|
4
4
|
import FileView from './file-view.jsx'
|
|
5
|
-
import { apiPath } from './file
|
|
5
|
+
import { apiPath } from './file'
|
|
6
6
|
import styled from '@emotion/styled'
|
|
7
|
-
import { Media } from '
|
|
7
|
+
import { Media } from '../../styles/media'
|
|
8
8
|
|
|
9
9
|
const PathBreadcrumb = styled.div`
|
|
10
10
|
font-size: 14px;
|
|
File without changes
|
package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-unloaded-directory.jsx
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useContext, useEffect } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import DatasetQueryContext from '
|
|
3
|
+
import DatasetQueryContext from '../../datalad/dataset/dataset-query-context.js'
|
|
4
4
|
import FileTreeLoading from './file-tree-loading.jsx'
|
|
5
5
|
import { gql } from '@apollo/client'
|
|
6
6
|
import { AccordionTab } from '@openneuro/components/accordion'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import File from './file
|
|
3
|
+
import File from './file'
|
|
4
4
|
import UpdateFile from '../mutations/update-file.jsx'
|
|
5
5
|
import DeleteDir from '../mutations/delete-dir.jsx'
|
|
6
6
|
import FileTreeUnloadedDirectory from './file-tree-unloaded-directory.jsx'
|
|
7
|
-
import { Media } from '
|
|
7
|
+
import { Media } from '../../styles/media'
|
|
8
8
|
import { AccordionTab } from '@openneuro/components/accordion'
|
|
9
9
|
|
|
10
10
|
export const sortByFilename = (a, b) => a.filename.localeCompare(b.filename)
|
|
@@ -66,6 +66,7 @@ const FileTree = ({
|
|
|
66
66
|
datasetId={datasetId}
|
|
67
67
|
snapshotTag={snapshotTag}
|
|
68
68
|
path={path}
|
|
69
|
+
size={file.size}
|
|
69
70
|
editMode={editMode}
|
|
70
71
|
toggleFileToDelete={toggleFileToDelete}
|
|
71
72
|
isFileToBeDeleted={isFileToBeDeleted}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { Loading } from '@openneuro/components/loading'
|
|
3
|
-
import { apiPath } from './file
|
|
3
|
+
import { apiPath } from './file'
|
|
4
4
|
import FileViewerType from './file-viewer-type.jsx'
|
|
5
5
|
|
|
6
6
|
const FileView = ({ datasetId, snapshotTag, path }) => {
|
|
File without changes
|