@openneuro/app 4.4.9 → 4.5.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/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/common/partials/papaya.jsx +1 -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/{refactor_2021/dataset → dataset}/dataset-routes.jsx +0 -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 +420 -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 +2 -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/{refactor_2021/dataset → dataset}/fragments/dataset-history.jsx +0 -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/{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 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/dataset-relations.tsx +2 -3
- 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 +0 -0
- 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 -0
- 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 +1 -1
- 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 +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/admin-datalad.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/admin-exports.jsx +3 -5
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/delete-page.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/deprecate-snapshot-page.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/download-dataset.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-anonymous-reviewers.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-permissions.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/publish.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/snapshot.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/snapshot-container.tsx +101 -115
- 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 +0 -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 +2 -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/draft-container.tsx +0 -435
- package/src/scripts/refactor_2021/utils/datalad.js +0 -13
- package/src/scripts/refactor_2021/utils/gtag.js +0 -22
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Markdown from 'markdown-to-jsx'
|
|
3
|
-
import { useLocation, Redirect } from 'react-router-dom'
|
|
4
|
-
import pluralize from 'pluralize'
|
|
5
|
-
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
|
|
6
|
-
import parseISO from 'date-fns/parseISO'
|
|
7
|
-
|
|
8
|
-
import Validation from '../validation/validation.jsx'
|
|
9
|
-
import Files from './files'
|
|
10
|
-
import { config } from '../../config'
|
|
11
|
-
import {
|
|
12
|
-
getUnexpiredProfile,
|
|
13
|
-
hasEditPermissions,
|
|
14
|
-
hasDatasetAdminPermissions,
|
|
15
|
-
} from '../authentication/profile'
|
|
16
|
-
import { useCookies } from 'react-cookie'
|
|
17
|
-
import Comments from './comments/comments.jsx'
|
|
18
|
-
import { DatasetAlertDraft } from './fragments/dataset-alert-draft'
|
|
19
|
-
import {
|
|
20
|
-
MetaDataBlock,
|
|
21
|
-
ModalitiesMetaDataBlock,
|
|
22
|
-
BrainLifeButton,
|
|
23
|
-
ValidationBlock,
|
|
24
|
-
CloneDropdown,
|
|
25
|
-
DatasetHeader,
|
|
26
|
-
DatasetHeaderMeta,
|
|
27
|
-
DatasetPage,
|
|
28
|
-
DatasetGitAccess,
|
|
29
|
-
VersionList,
|
|
30
|
-
DatasetTools,
|
|
31
|
-
} from '@openneuro/components/dataset'
|
|
32
|
-
import { ReadMore } from '@openneuro/components/read-more'
|
|
33
|
-
|
|
34
|
-
import { FollowDataset } from './mutations/follow'
|
|
35
|
-
import { StarDataset } from './mutations/star'
|
|
36
|
-
|
|
37
|
-
import EditDescriptionField from './fragments/edit-description-field.jsx'
|
|
38
|
-
import EditDescriptionList from './fragments/edit-description-list.jsx'
|
|
39
|
-
import { DOILink } from './fragments/doi-link'
|
|
40
|
-
|
|
41
|
-
export interface DraftContainerProps {
|
|
42
|
-
dataset
|
|
43
|
-
tag?: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const formatDate = dateObject =>
|
|
47
|
-
new Date(dateObject).toISOString().split('T')[0]
|
|
48
|
-
|
|
49
|
-
// Helper function for getting version from URL
|
|
50
|
-
const snapshotVersion = location => {
|
|
51
|
-
const matches = location.pathname.match(/versions\/(.*?)(\/|$)/)
|
|
52
|
-
return matches && matches[1]
|
|
53
|
-
}
|
|
54
|
-
const DraftContainer: React.FC<DraftContainerProps> = ({ dataset }) => {
|
|
55
|
-
const location = useLocation()
|
|
56
|
-
const activeDataset = snapshotVersion(location) || 'draft'
|
|
57
|
-
|
|
58
|
-
const [selectedVersion, setSelectedVersion] = React.useState(activeDataset)
|
|
59
|
-
|
|
60
|
-
const summary = dataset.draft.summary
|
|
61
|
-
const description = dataset.draft.description
|
|
62
|
-
const datasetId = dataset.id
|
|
63
|
-
|
|
64
|
-
const numSessions =
|
|
65
|
-
summary && summary.sessions.length > 0 ? summary.sessions.length : 1
|
|
66
|
-
|
|
67
|
-
const dateAdded = formatDate(dataset.created)
|
|
68
|
-
const dateAddedDifference = formatDistanceToNow(parseISO(dataset.created))
|
|
69
|
-
const dateModified = formatDate(dataset.draft.modified)
|
|
70
|
-
const dateUpdatedDifference = formatDistanceToNow(
|
|
71
|
-
parseISO(dataset.draft.modified),
|
|
72
|
-
)
|
|
73
|
-
const isSnapshot = activeDataset !== 'draft'
|
|
74
|
-
|
|
75
|
-
const [cookies] = useCookies()
|
|
76
|
-
const profile = getUnexpiredProfile(cookies)
|
|
77
|
-
const isAdmin = profile?.admin
|
|
78
|
-
const hasEdit =
|
|
79
|
-
hasEditPermissions(dataset.permissions, profile?.sub) || isAdmin
|
|
80
|
-
const hasDraftChanges =
|
|
81
|
-
dataset.snapshots.length === 0 ||
|
|
82
|
-
dataset.draft.head !==
|
|
83
|
-
dataset.snapshots[dataset.snapshots.length - 1].hexsha
|
|
84
|
-
const isDatasetAdmin =
|
|
85
|
-
hasDatasetAdminPermissions(dataset.permissions, profile?.sub) || isAdmin
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<>
|
|
89
|
-
{dataset.snapshots && !hasEdit && (
|
|
90
|
-
<Redirect
|
|
91
|
-
to={`/datasets/${dataset.id}/versions/${
|
|
92
|
-
dataset.snapshots.length &&
|
|
93
|
-
dataset.snapshots[dataset.snapshots.length - 1].tag
|
|
94
|
-
}`}
|
|
95
|
-
/>
|
|
96
|
-
)}
|
|
97
|
-
<DatasetPage
|
|
98
|
-
modality={summary?.modalities[0] || ''}
|
|
99
|
-
renderHeader={() => (
|
|
100
|
-
<>
|
|
101
|
-
<DatasetHeader
|
|
102
|
-
pageHeading={description.Name}
|
|
103
|
-
modality={summary?.modalities[0] || null}
|
|
104
|
-
renderEditor={() => (
|
|
105
|
-
<EditDescriptionField
|
|
106
|
-
datasetId={datasetId}
|
|
107
|
-
field="Name"
|
|
108
|
-
rows={2}
|
|
109
|
-
description={description.Name}
|
|
110
|
-
editMode={hasEdit}>
|
|
111
|
-
{description.Name}
|
|
112
|
-
</EditDescriptionField>
|
|
113
|
-
)}
|
|
114
|
-
/>
|
|
115
|
-
</>
|
|
116
|
-
)}
|
|
117
|
-
renderAlert={() => (
|
|
118
|
-
<>
|
|
119
|
-
{hasEdit && (
|
|
120
|
-
<DatasetAlertDraft
|
|
121
|
-
isPrivate={!dataset.public}
|
|
122
|
-
datasetId={dataset.id}
|
|
123
|
-
hasDraftChanges={hasDraftChanges}
|
|
124
|
-
hasSnapshot={dataset.snapshots.length !== 0}
|
|
125
|
-
/>
|
|
126
|
-
)}
|
|
127
|
-
</>
|
|
128
|
-
)}
|
|
129
|
-
renderHeaderMeta={() => (
|
|
130
|
-
<>
|
|
131
|
-
{summary && (
|
|
132
|
-
<DatasetHeaderMeta
|
|
133
|
-
size={summary.size}
|
|
134
|
-
totalFiles={summary.totalFiles}
|
|
135
|
-
datasetId={datasetId}
|
|
136
|
-
/>
|
|
137
|
-
)}
|
|
138
|
-
</>
|
|
139
|
-
)}
|
|
140
|
-
renderFollowBookmark={() => (
|
|
141
|
-
<>
|
|
142
|
-
<FollowDataset
|
|
143
|
-
profile={profile}
|
|
144
|
-
datasetId={dataset.id}
|
|
145
|
-
following={dataset.following}
|
|
146
|
-
followers={dataset.followers.length}
|
|
147
|
-
/>
|
|
148
|
-
<StarDataset
|
|
149
|
-
profile={profile}
|
|
150
|
-
datasetId={dataset.id}
|
|
151
|
-
starred={dataset.starred}
|
|
152
|
-
stars={dataset.stars.length}
|
|
153
|
-
/>
|
|
154
|
-
</>
|
|
155
|
-
)}
|
|
156
|
-
renderBrainLifeButton={() => (
|
|
157
|
-
<BrainLifeButton
|
|
158
|
-
datasetId={datasetId}
|
|
159
|
-
onBrainlife={dataset.onBrainlife}
|
|
160
|
-
/>
|
|
161
|
-
)}
|
|
162
|
-
renderValidationBlock={() => (
|
|
163
|
-
<ValidationBlock>
|
|
164
|
-
<Validation datasetId={dataset.id} issues={dataset.draft.issues} />
|
|
165
|
-
</ValidationBlock>
|
|
166
|
-
)}
|
|
167
|
-
renderCloneDropdown={() => (
|
|
168
|
-
<CloneDropdown
|
|
169
|
-
gitAccess={
|
|
170
|
-
<DatasetGitAccess
|
|
171
|
-
hasEdit={hasEdit}
|
|
172
|
-
configGithub={config.github}
|
|
173
|
-
configUrl={config.url}
|
|
174
|
-
worker={dataset.worker}
|
|
175
|
-
datasetId={datasetId}
|
|
176
|
-
gitHash={dataset.draft.head}
|
|
177
|
-
/>
|
|
178
|
-
}
|
|
179
|
-
/>
|
|
180
|
-
)}
|
|
181
|
-
renderToolButtons={() => (
|
|
182
|
-
<DatasetTools
|
|
183
|
-
hasEdit={hasEdit}
|
|
184
|
-
isPublic={dataset.public}
|
|
185
|
-
datasetId={datasetId}
|
|
186
|
-
isAdmin={isAdmin}
|
|
187
|
-
hasSnapshot={dataset.snapshots.length !== 0}
|
|
188
|
-
isDatasetAdmin={isDatasetAdmin}
|
|
189
|
-
/>
|
|
190
|
-
)}
|
|
191
|
-
renderFiles={() => (
|
|
192
|
-
<ReadMore
|
|
193
|
-
fileTree={true}
|
|
194
|
-
id="collapse-tree"
|
|
195
|
-
expandLabel="Expand File Tree"
|
|
196
|
-
collapseLabel="Collapse File Tree">
|
|
197
|
-
<Files
|
|
198
|
-
datasetId={datasetId}
|
|
199
|
-
snapshotTag={null}
|
|
200
|
-
datasetName={dataset.draft.description.Name}
|
|
201
|
-
files={dataset.draft.files}
|
|
202
|
-
editMode={hasEdit}
|
|
203
|
-
datasetPermissions={dataset.permissions}
|
|
204
|
-
/>
|
|
205
|
-
</ReadMore>
|
|
206
|
-
)}
|
|
207
|
-
renderReadMe={() => (
|
|
208
|
-
<MetaDataBlock
|
|
209
|
-
heading="README"
|
|
210
|
-
className="dataset-readme markdown-body"
|
|
211
|
-
item={dataset.draft.readme}
|
|
212
|
-
renderEditor={() => (
|
|
213
|
-
<EditDescriptionField
|
|
214
|
-
datasetId={datasetId}
|
|
215
|
-
field="readme"
|
|
216
|
-
rows={12}
|
|
217
|
-
description={dataset.draft.readme}
|
|
218
|
-
editMode={hasEdit}>
|
|
219
|
-
<ReadMore
|
|
220
|
-
id="readme"
|
|
221
|
-
expandLabel="Read More"
|
|
222
|
-
collapseLabel="Collapse">
|
|
223
|
-
<Markdown>{dataset.draft.readme || 'N/A'}</Markdown>
|
|
224
|
-
</ReadMore>
|
|
225
|
-
</EditDescriptionField>
|
|
226
|
-
)}
|
|
227
|
-
/>
|
|
228
|
-
)}
|
|
229
|
-
renderSidebar={() => (
|
|
230
|
-
<>
|
|
231
|
-
<EditDescriptionList
|
|
232
|
-
className="dmb-inline-list"
|
|
233
|
-
datasetId={datasetId}
|
|
234
|
-
field="Authors"
|
|
235
|
-
heading="Authors"
|
|
236
|
-
description={description.Authors}
|
|
237
|
-
editMode={hasEdit}>
|
|
238
|
-
{description?.Authors?.length ? description.Authors : ['N/A']}
|
|
239
|
-
</EditDescriptionList>
|
|
240
|
-
|
|
241
|
-
{summary && (
|
|
242
|
-
<ModalitiesMetaDataBlock
|
|
243
|
-
items={summary.modalities}
|
|
244
|
-
className="dmb-modalities"
|
|
245
|
-
/>
|
|
246
|
-
)}
|
|
247
|
-
|
|
248
|
-
<MetaDataBlock
|
|
249
|
-
heading={dataset.snapshots.length ? 'Versions' : 'Version'}
|
|
250
|
-
item={
|
|
251
|
-
<div className="version-block">
|
|
252
|
-
<VersionList
|
|
253
|
-
datasetId={datasetId}
|
|
254
|
-
hasEdit={hasEdit}
|
|
255
|
-
items={dataset.snapshots}
|
|
256
|
-
className="version-dropdown"
|
|
257
|
-
activeDataset={activeDataset}
|
|
258
|
-
dateModified={dateModified}
|
|
259
|
-
selected={selectedVersion}
|
|
260
|
-
setSelected={setSelectedVersion}
|
|
261
|
-
/>
|
|
262
|
-
</div>
|
|
263
|
-
}
|
|
264
|
-
/>
|
|
265
|
-
{summary && (
|
|
266
|
-
<MetaDataBlock
|
|
267
|
-
heading="Tasks"
|
|
268
|
-
item={summary.tasks.length ? summary.tasks.join(', ') : 'N/A'}
|
|
269
|
-
className="dmb-inline-list"
|
|
270
|
-
/>
|
|
271
|
-
)}
|
|
272
|
-
{summary?.modalities.includes('pet') ||
|
|
273
|
-
summary?.modalities.includes('Pet') ||
|
|
274
|
-
(summary?.modalities.includes('PET') && (
|
|
275
|
-
<>
|
|
276
|
-
<MetaDataBlock
|
|
277
|
-
heading={pluralize('Target', summary.pet?.BodyPart)}
|
|
278
|
-
item={summary.pet?.BodyPart}
|
|
279
|
-
/>
|
|
280
|
-
<MetaDataBlock
|
|
281
|
-
heading={pluralize(
|
|
282
|
-
'Scanner Manufacturer',
|
|
283
|
-
summary.pet?.ScannerManufacturer,
|
|
284
|
-
)}
|
|
285
|
-
item={
|
|
286
|
-
summary.pet?.ScannerManufacturer
|
|
287
|
-
? summary.pet?.ScannerManufacturer
|
|
288
|
-
: 'N/A'
|
|
289
|
-
}
|
|
290
|
-
/>
|
|
291
|
-
|
|
292
|
-
<MetaDataBlock
|
|
293
|
-
heading={pluralize(
|
|
294
|
-
'Scanner Model',
|
|
295
|
-
summary.pet?.ScannerManufacturersModelName,
|
|
296
|
-
)}
|
|
297
|
-
item={
|
|
298
|
-
summary.pet?.ScannerManufacturersModelName
|
|
299
|
-
? summary.pet?.ScannerManufacturersModelName
|
|
300
|
-
: 'N/A'
|
|
301
|
-
}
|
|
302
|
-
/>
|
|
303
|
-
<MetaDataBlock
|
|
304
|
-
heading={pluralize(
|
|
305
|
-
'Radionuclide',
|
|
306
|
-
summary.pet?.TracerRadionuclide,
|
|
307
|
-
)}
|
|
308
|
-
item={
|
|
309
|
-
summary.pet?.TracerRadionuclide
|
|
310
|
-
? summary.pet?.TracerRadionuclide
|
|
311
|
-
: 'N/A'
|
|
312
|
-
}
|
|
313
|
-
/>
|
|
314
|
-
<MetaDataBlock
|
|
315
|
-
heading={pluralize('Radiotracer', summary.pet?.TracerName)}
|
|
316
|
-
item={
|
|
317
|
-
summary.pet?.TracerName ? summary.pet?.TracerName : 'N/A'
|
|
318
|
-
}
|
|
319
|
-
/>
|
|
320
|
-
</>
|
|
321
|
-
))}
|
|
322
|
-
|
|
323
|
-
<MetaDataBlock
|
|
324
|
-
heading="Uploaded by"
|
|
325
|
-
item={
|
|
326
|
-
<>
|
|
327
|
-
{dataset.uploader.name} on {dateAdded} - {dateAddedDifference}{' '}
|
|
328
|
-
ago
|
|
329
|
-
</>
|
|
330
|
-
}
|
|
331
|
-
/>
|
|
332
|
-
|
|
333
|
-
{dataset.snapshots?.length ? (
|
|
334
|
-
<MetaDataBlock
|
|
335
|
-
heading="Last Updated"
|
|
336
|
-
item={
|
|
337
|
-
<>
|
|
338
|
-
{dateModified} - {dateUpdatedDifference} ago
|
|
339
|
-
</>
|
|
340
|
-
}
|
|
341
|
-
/>
|
|
342
|
-
) : null}
|
|
343
|
-
<MetaDataBlock heading="Sessions" item={numSessions} />
|
|
344
|
-
<>
|
|
345
|
-
{summary && (
|
|
346
|
-
<MetaDataBlock
|
|
347
|
-
heading="Participants"
|
|
348
|
-
item={summary.subjects.length}
|
|
349
|
-
/>
|
|
350
|
-
)}
|
|
351
|
-
</>
|
|
352
|
-
|
|
353
|
-
<MetaDataBlock
|
|
354
|
-
heading="Dataset DOI"
|
|
355
|
-
item={<DOILink DOI={description.DatasetDOI} />}
|
|
356
|
-
/>
|
|
357
|
-
<MetaDataBlock heading="License" item={description.License} />
|
|
358
|
-
|
|
359
|
-
<MetaDataBlock
|
|
360
|
-
heading="Acknowledgements"
|
|
361
|
-
item={description.Acknowledgements}
|
|
362
|
-
renderEditor={() => (
|
|
363
|
-
<EditDescriptionField
|
|
364
|
-
datasetId={datasetId}
|
|
365
|
-
field="Acknowledgements"
|
|
366
|
-
rows={2}
|
|
367
|
-
description={description.Acknowledgements}
|
|
368
|
-
editMode={hasEdit}>
|
|
369
|
-
<Markdown>{description.Acknowledgements || 'N/A'}</Markdown>
|
|
370
|
-
</EditDescriptionField>
|
|
371
|
-
)}
|
|
372
|
-
/>
|
|
373
|
-
|
|
374
|
-
<MetaDataBlock
|
|
375
|
-
heading="How to Acknowledge"
|
|
376
|
-
item={description.HowToAcknowledge}
|
|
377
|
-
renderEditor={() => (
|
|
378
|
-
<EditDescriptionField
|
|
379
|
-
datasetId={datasetId}
|
|
380
|
-
field="HowToAcknowledge"
|
|
381
|
-
rows={2}
|
|
382
|
-
description={description.HowToAcknowledge}
|
|
383
|
-
editMode={hasEdit}>
|
|
384
|
-
<Markdown>{description.HowToAcknowledge || 'N/A'}</Markdown>
|
|
385
|
-
</EditDescriptionField>
|
|
386
|
-
)}
|
|
387
|
-
/>
|
|
388
|
-
|
|
389
|
-
<EditDescriptionList
|
|
390
|
-
className="dmb-list"
|
|
391
|
-
datasetId={datasetId}
|
|
392
|
-
field="Funding"
|
|
393
|
-
heading="Funding"
|
|
394
|
-
description={description.Funding}
|
|
395
|
-
editMode={hasEdit}>
|
|
396
|
-
{description.Funding?.length ? description.Funding : ['N/A']}
|
|
397
|
-
</EditDescriptionList>
|
|
398
|
-
|
|
399
|
-
<EditDescriptionList
|
|
400
|
-
className="dmb-list"
|
|
401
|
-
datasetId={datasetId}
|
|
402
|
-
field="ReferencesAndLinks"
|
|
403
|
-
heading="References and Links"
|
|
404
|
-
description={description.ReferencesAndLinks}
|
|
405
|
-
editMode={hasEdit}>
|
|
406
|
-
{description.ReferencesAndLinks?.length
|
|
407
|
-
? description.ReferencesAndLinks
|
|
408
|
-
: ['N/A']}
|
|
409
|
-
</EditDescriptionList>
|
|
410
|
-
|
|
411
|
-
<EditDescriptionList
|
|
412
|
-
className="dmb-list"
|
|
413
|
-
datasetId={datasetId}
|
|
414
|
-
field="EthicsApprovals"
|
|
415
|
-
heading="Ethics Approvals"
|
|
416
|
-
description={description.EthicsApprovals}
|
|
417
|
-
editMode={hasEdit}>
|
|
418
|
-
{description.EthicsApprovals?.length
|
|
419
|
-
? description.EthicsApprovals
|
|
420
|
-
: ['N/A']}
|
|
421
|
-
</EditDescriptionList>
|
|
422
|
-
</>
|
|
423
|
-
)}
|
|
424
|
-
renderComments={() => (
|
|
425
|
-
<Comments
|
|
426
|
-
datasetId={dataset.id}
|
|
427
|
-
uploader={dataset.uploader}
|
|
428
|
-
comments={dataset.comments}
|
|
429
|
-
/>
|
|
430
|
-
)}
|
|
431
|
-
/>
|
|
432
|
-
</>
|
|
433
|
-
)
|
|
434
|
-
}
|
|
435
|
-
export default DraftContainer
|
|
@@ -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
|
-
})
|