@openneuro/app 4.20.5 → 4.20.6-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/fileMock.js +1 -1
- package/package.json +5 -5
- package/pluralize-esm.js +204 -211
- package/src/@types/custom.d.ts +3 -3
- package/src/@types/react.d.ts +3 -4
- package/src/client.jsx +17 -16
- package/src/scripts/__mocks__/config.ts +6 -6
- package/src/scripts/__utils__/mock-app-shell.tsx +9 -8
- package/src/scripts/apm.js +6 -6
- package/src/scripts/app.tsx +7 -7
- package/src/scripts/authentication/__tests__/profile.spec.js +10 -10
- package/src/scripts/authentication/admin-user.jsx +2 -2
- package/src/scripts/authentication/logged-in.jsx +2 -2
- package/src/scripts/authentication/logged-out.jsx +2 -2
- package/src/scripts/authentication/loginCheck.js +2 -2
- package/src/scripts/authentication/loginUrls.ts +1 -1
- package/src/scripts/authentication/profile.ts +7 -7
- package/src/scripts/authentication/regular-user.tsx +3 -3
- package/src/scripts/authentication/signOut.ts +2 -2
- package/src/scripts/authentication/withProfile.jsx +6 -6
- package/src/scripts/common/block-navigation.jsx +3 -4
- package/src/scripts/common/containers/__tests__/header.spec.tsx +16 -16
- package/src/scripts/common/containers/footer.tsx +3 -3
- package/src/scripts/common/containers/header.tsx +30 -30
- package/src/scripts/common/forms/__tests__/warn-button.spec.jsx +6 -6
- package/src/scripts/common/forms/warn-button.jsx +21 -17
- package/src/scripts/common/partials/block-navigation.jsx +3 -4
- package/src/scripts/common/partials/freshdesk-widget.jsx +17 -20
- package/src/scripts/common/partials/toast-content.jsx +2 -2
- package/src/scripts/components/__tests__/data-table.spec.tsx +7 -7
- package/src/scripts/components/data-table.tsx +23 -22
- package/src/scripts/config.ts +2 -2
- package/src/scripts/datalad/dataset/comments-fragments.js +1 -1
- package/src/scripts/datalad/dataset/dataset-context.js +1 -1
- package/src/scripts/datalad/dataset/dataset-query-context.js +1 -1
- package/src/scripts/datalad/dataset/dataset-query-fragments.js +1 -1
- package/src/scripts/datalad/mutations/cache-clear.jsx +7 -6
- package/src/scripts/datalad/mutations/cache-id.js +2 -2
- package/src/scripts/datalad/mutations/delete-comment.jsx +13 -11
- package/src/scripts/datalad/mutations/delete.jsx +10 -9
- package/src/scripts/datalad/mutations/follow.jsx +12 -11
- package/src/scripts/datalad/mutations/publish.jsx +13 -12
- package/src/scripts/datalad/mutations/remove-permissions.jsx +8 -8
- package/src/scripts/datalad/mutations/revalidate.jsx +7 -6
- package/src/scripts/datalad/mutations/snapshot.tsx +7 -7
- package/src/scripts/datalad/mutations/star.jsx +12 -11
- package/src/scripts/datalad/mutations/submit-metadata.jsx +14 -12
- package/src/scripts/datalad/mutations/update-permissions.jsx +14 -13
- package/src/scripts/datalad/mutations/update-ref.jsx +7 -6
- package/src/scripts/datalad/routes/dataset-redirect.tsx +49 -49
- package/src/scripts/datalad/subscriptions/__tests__/files-subscription.spec.jsx +32 -32
- package/src/scripts/datalad/subscriptions/files-subscription.jsx +16 -16
- package/src/scripts/datalad/subscriptions/useDatasetDeletedSubscription.jsx +4 -4
- package/src/scripts/datalad/subscriptions/useDraftSubscription.js +4 -4
- package/src/scripts/datalad/subscriptions/usePermissionsSubscription.js +4 -4
- package/src/scripts/datalad/subscriptions/useSnapshotsUpdatedSubscriptions.js +3 -3
- package/src/scripts/dataset/__tests__/__snapshots__/snapshot-container.spec.tsx.snap +2 -2
- package/src/scripts/dataset/__tests__/snapshot-container.spec.tsx +12 -12
- package/src/scripts/dataset/comments/__tests__/comment.spec.jsx +21 -21
- package/src/scripts/dataset/comments/__tests__/comments.spec.jsx +10 -10
- package/src/scripts/dataset/comments/block-style-controls.jsx +15 -15
- package/src/scripts/dataset/comments/comment-editor.jsx +31 -31
- package/src/scripts/dataset/comments/comment.jsx +50 -50
- package/src/scripts/dataset/comments/comments.jsx +24 -22
- package/src/scripts/dataset/comments/inline-style-controls.jsx +9 -9
- package/src/scripts/dataset/comments/style-button.jsx +8 -9
- package/src/scripts/dataset/common/follow-toggles.tsx +3 -3
- package/src/scripts/dataset/dataset-query-context.js +1 -1
- package/src/scripts/dataset/dataset-query.jsx +34 -31
- package/src/scripts/dataset/dataset-routes.jsx +5 -5
- package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +13 -13
- package/src/scripts/dataset/download/__tests__/download-link.spec.jsx +10 -10
- package/src/scripts/dataset/download/__tests__/download-native.spec.js +7 -7
- package/src/scripts/dataset/download/__tests__/shell-example.spec.jsx +5 -5
- package/src/scripts/dataset/download/download-command-line.jsx +9 -7
- package/src/scripts/dataset/download/download-datalad.jsx +22 -20
- package/src/scripts/dataset/download/download-derivative-datalad.tsx +2 -2
- package/src/scripts/dataset/download/download-derivative-s3.tsx +2 -2
- package/src/scripts/dataset/download/download-link.jsx +6 -6
- package/src/scripts/dataset/download/download-native.js +20 -19
- package/src/scripts/dataset/download/download-query.js +2 -3
- package/src/scripts/dataset/download/download-s3.jsx +8 -8
- package/src/scripts/dataset/download/download-script.tsx +23 -20
- package/src/scripts/dataset/download/native-file-toast.jsx +13 -11
- package/src/scripts/dataset/download/shell-example.jsx +1 -1
- package/src/scripts/dataset/download/track-download.js +5 -5
- package/src/scripts/dataset/draft-container.tsx +104 -102
- package/src/scripts/dataset/draft-snapshot-routes.tsx +3 -3
- package/src/scripts/dataset/files/__tests__/file-tree-unloaded-directory.spec.jsx +23 -23
- package/src/scripts/dataset/files/__tests__/file-tree.spec.jsx +57 -58
- package/src/scripts/dataset/files/__tests__/file-viewer-type.spec.jsx +6 -6
- package/src/scripts/dataset/files/__tests__/file.spec.jsx +15 -15
- package/src/scripts/dataset/files/file-display.jsx +11 -11
- package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +10 -10
- package/src/scripts/dataset/files/file-tree.tsx +27 -27
- package/src/scripts/dataset/files/file-view.jsx +4 -4
- package/src/scripts/dataset/files/file-viewer-type.jsx +21 -21
- package/src/scripts/dataset/files/file.tsx +85 -80
- package/src/scripts/dataset/files/files.tsx +41 -40
- package/src/scripts/dataset/files/index.tsx +2 -2
- package/src/scripts/dataset/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -24
- package/src/scripts/dataset/files/viewers/__tests__/file-viewer-json.spec.jsx +9 -9
- package/src/scripts/dataset/files/viewers/__tests__/parse-tabular.spec.js +8 -8
- package/src/scripts/dataset/files/viewers/file-viewer-csv.jsx +5 -5
- package/src/scripts/dataset/files/viewers/file-viewer-html.jsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +4 -4
- package/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx +4 -4
- package/src/scripts/dataset/files/viewers/file-viewer-table.tsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-text.jsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-tsv.jsx +5 -5
- package/src/scripts/dataset/files/viewers/parse-tabular.js +4 -4
- package/src/scripts/dataset/fragments/__tests__/cancel-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/dataset-alert-draft.spec.tsx +9 -9
- package/src/scripts/dataset/fragments/__tests__/dataset-citation.spec.jsx +10 -10
- package/src/scripts/dataset/fragments/__tests__/doi-link.spec.tsx +29 -29
- package/src/scripts/dataset/fragments/__tests__/edit-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/edit-list.spec.jsx +13 -13
- package/src/scripts/dataset/fragments/__tests__/save-button.spec.tsx +5 -5
- package/src/scripts/dataset/fragments/__tests__/select-input.spec.tsx +26 -26
- package/src/scripts/dataset/fragments/cancel-button.tsx +2 -2
- package/src/scripts/dataset/fragments/comments-fragments.js +1 -1
- package/src/scripts/dataset/fragments/copyable-tooltip.jsx +14 -13
- package/src/scripts/dataset/fragments/dataset-alert-draft.tsx +17 -13
- package/src/scripts/dataset/fragments/dataset-alert-version.tsx +5 -4
- package/src/scripts/dataset/fragments/dataset-citation.jsx +23 -21
- package/src/scripts/dataset/fragments/dataset-history.jsx +12 -12
- package/src/scripts/dataset/fragments/dataset-reviewers.ts +1 -1
- package/src/scripts/dataset/fragments/doi-link.tsx +6 -6
- package/src/scripts/dataset/fragments/edit-button.tsx +2 -2
- package/src/scripts/dataset/fragments/edit-description-field.jsx +23 -21
- package/src/scripts/dataset/fragments/edit-description-list.jsx +8 -8
- package/src/scripts/dataset/fragments/edit-list.jsx +8 -8
- package/src/scripts/dataset/fragments/number-input.tsx +36 -35
- package/src/scripts/dataset/fragments/save-button.tsx +2 -2
- package/src/scripts/dataset/fragments/select-input.tsx +87 -86
- package/src/scripts/dataset/fragments/text-array-input.tsx +38 -37
- package/src/scripts/dataset/fragments/text-input.tsx +79 -78
- package/src/scripts/dataset/mutations/__tests__/cache-id.spec.js +5 -5
- package/src/scripts/dataset/mutations/__tests__/delete-file.spec.jsx +85 -83
- package/src/scripts/dataset/mutations/__tests__/delete.spec.jsx +8 -8
- package/src/scripts/dataset/mutations/__tests__/deprecate-snapshot.spec.tsx +17 -17
- package/src/scripts/dataset/mutations/__tests__/deprecate-version.spec.tsx +19 -19
- package/src/scripts/dataset/mutations/__tests__/description.spec.jsx +51 -51
- package/src/scripts/dataset/mutations/__tests__/remove-permissions.spec.tsx +9 -9
- package/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx +7 -7
- package/src/scripts/dataset/mutations/admin-exports.jsx +13 -12
- package/src/scripts/dataset/mutations/cache-clear.jsx +6 -6
- package/src/scripts/dataset/mutations/cache-id.js +2 -2
- package/src/scripts/dataset/mutations/comment.jsx +25 -23
- package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +36 -30
- package/src/scripts/dataset/mutations/dataset-relations.tsx +28 -29
- package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +7 -8
- package/src/scripts/dataset/mutations/delete-comment.jsx +14 -12
- package/src/scripts/dataset/mutations/delete-dataset-form.jsx +20 -22
- package/src/scripts/dataset/mutations/delete-file.jsx +8 -8
- package/src/scripts/dataset/mutations/delete.jsx +10 -9
- package/src/scripts/dataset/mutations/deprecate-version.tsx +5 -6
- package/src/scripts/dataset/mutations/description.jsx +21 -20
- package/src/scripts/dataset/mutations/flag-annex-object.jsx +10 -9
- package/src/scripts/dataset/mutations/follow.tsx +15 -14
- package/src/scripts/dataset/mutations/import-dataset.tsx +5 -5
- package/src/scripts/dataset/mutations/metadata-form.jsx +94 -97
- package/src/scripts/dataset/mutations/publish.jsx +13 -13
- package/src/scripts/dataset/mutations/readme.jsx +12 -11
- package/src/scripts/dataset/mutations/remove-annex-object.jsx +10 -9
- package/src/scripts/dataset/mutations/remove-permissions.tsx +5 -6
- package/src/scripts/dataset/mutations/revalidate.jsx +7 -7
- package/src/scripts/dataset/mutations/snapshot.tsx +8 -8
- package/src/scripts/dataset/mutations/star.tsx +14 -13
- package/src/scripts/dataset/mutations/submit-metadata.jsx +12 -11
- package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +5 -6
- package/src/scripts/dataset/mutations/update-file.jsx +6 -6
- package/src/scripts/dataset/mutations/update-permissions.tsx +9 -9
- package/src/scripts/dataset/mutations/update-ref.jsx +7 -7
- package/src/scripts/dataset/routes/__tests__/deprecate-snapshot-page.spec.tsx +5 -5
- package/src/scripts/dataset/routes/add-metadata.jsx +19 -20
- package/src/scripts/dataset/routes/admin-datalad.jsx +7 -7
- package/src/scripts/dataset/routes/dataset-default.tsx +12 -10
- package/src/scripts/dataset/routes/delete-page.tsx +12 -12
- package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +8 -8
- package/src/scripts/dataset/routes/derivatives.tsx +10 -10
- package/src/scripts/dataset/routes/download-dataset.tsx +20 -20
- package/src/scripts/dataset/routes/manage-anonymous-reviewers.tsx +37 -35
- package/src/scripts/dataset/routes/manage-permissions.jsx +22 -22
- package/src/scripts/dataset/routes/publish.jsx +32 -30
- package/src/scripts/dataset/routes/snapshot-default.tsx +7 -7
- package/src/scripts/dataset/routes/snapshot.tsx +44 -43
- package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +3 -3
- package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +3 -3
- package/src/scripts/dataset/routes/styles/header-row.tsx +3 -3
- package/src/scripts/dataset/routes/tab-routes-draft.tsx +12 -12
- package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +8 -8
- package/src/scripts/dataset/snapshot-container.tsx +78 -86
- package/src/scripts/errors/403page.tsx +11 -11
- package/src/scripts/errors/404page.tsx +12 -12
- package/src/scripts/errors/errorBoundary.jsx +13 -12
- package/src/scripts/errors/errorRoute.jsx +6 -6
- package/src/scripts/errors/freshdesk-widget.jsx +17 -20
- package/src/scripts/errors/freshdeskInterface.jsx +9 -9
- package/src/scripts/errors/orcid/email.jsx +3 -3
- package/src/scripts/errors/orcid/family.jsx +4 -4
- package/src/scripts/errors/orcid/general.jsx +1 -1
- package/src/scripts/errors/orcid/given.jsx +4 -4
- package/src/scripts/fixtures/dataset-query.ts +119 -119
- package/src/scripts/fixtures/mock-app-wrapper.tsx +4 -4
- package/src/scripts/index.tsx +9 -9
- package/src/scripts/pages/admin/admin.jsx +5 -5
- package/src/scripts/pages/admin/flagged-files.jsx +33 -31
- package/src/scripts/pages/admin/user-fragment.ts +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +13 -11
- package/src/scripts/pages/admin/users.jsx +38 -39
- package/src/scripts/pages/api.jsx +20 -19
- package/src/scripts/pages/citation-page.tsx +4 -4
- package/src/scripts/pages/faq/faq.tsx +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -5
- package/src/scripts/pages/front-page/aggregate-queries/use-participant-count.ts +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/use-publicDatasets-count.ts +2 -2
- package/src/scripts/pages/front-page/front-page-content.ts +42 -42
- package/src/scripts/pages/front-page/front-page.tsx +18 -14
- package/src/scripts/pages/front-page-comp.tsx +3 -3
- package/src/scripts/pages/import-dataset.tsx +10 -10
- package/src/scripts/pages/metadata/dataset-metadata.tsx +15 -14
- package/src/scripts/pages/pet-redirect.tsx +2 -2
- package/src/scripts/queries/dataset.ts +3 -3
- package/src/scripts/resources/__tests__/kibana.spec.js +9 -9
- package/src/scripts/resources/kibana.js +3 -3
- package/src/scripts/resources/strings.js +2 -2
- package/src/scripts/routes.tsx +14 -14
- package/src/scripts/search/__helpers__/search-render.tsx +3 -3
- package/src/scripts/search/__tests__/search-container.spec.tsx +22 -22
- package/src/scripts/search/__tests__/search-params-ctx.spec.tsx +20 -20
- package/src/scripts/search/es-query-builders.ts +21 -5
- package/src/scripts/search/filters-block-container.tsx +14 -16
- package/src/scripts/search/initial-search-params.tsx +45 -45
- package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +23 -23
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +12 -12
- package/src/scripts/search/inputs/age-range-input.tsx +9 -8
- package/src/scripts/search/inputs/author-input.tsx +14 -11
- package/src/scripts/search/inputs/date-radios.tsx +8 -7
- package/src/scripts/search/inputs/diagnosis-select.tsx +6 -6
- package/src/scripts/search/inputs/index.ts +33 -33
- package/src/scripts/search/inputs/keyword-input.tsx +13 -13
- package/src/scripts/search/inputs/modality-select.tsx +33 -30
- package/src/scripts/search/inputs/pet/bodyParts_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +18 -16
- package/src/scripts/search/inputs/pet/tracerNames_input.tsx +16 -15
- package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +18 -16
- package/src/scripts/search/inputs/section-select.tsx +6 -6
- package/src/scripts/search/inputs/sex-radios.tsx +6 -6
- package/src/scripts/search/inputs/show-datasets-radios.tsx +31 -29
- package/src/scripts/search/inputs/sort-by-select.tsx +10 -11
- package/src/scripts/search/inputs/species-select.tsx +6 -6
- package/src/scripts/search/inputs/study-domain-input.tsx +18 -16
- package/src/scripts/search/inputs/subject-count-range-input.tsx +8 -7
- package/src/scripts/search/inputs/task-input.tsx +18 -16
- package/src/scripts/search/search-container.tsx +83 -85
- package/src/scripts/search/search-params-ctx.tsx +40 -38
- package/src/scripts/search/search-routes.tsx +4 -4
- package/src/scripts/search/use-search-results.tsx +125 -99
- package/src/scripts/styles/media.tsx +3 -3
- package/src/scripts/styles/support-modal.jsx +2 -2
- package/src/scripts/sw.ts +12 -11
- package/src/scripts/test-utils.js +4 -4
- package/src/scripts/uploader/add-path-to-files.js +7 -7
- package/src/scripts/uploader/file-select.tsx +3 -3
- package/src/scripts/uploader/file-upload.js +13 -12
- package/src/scripts/uploader/input.jsx +8 -7
- package/src/scripts/uploader/upload-button.jsx +3 -3
- package/src/scripts/uploader/upload-disclaimer-input.tsx +66 -66
- package/src/scripts/uploader/upload-disclaimer.jsx +6 -5
- package/src/scripts/uploader/upload-file-status.jsx +4 -4
- package/src/scripts/uploader/upload-issues.jsx +32 -29
- package/src/scripts/uploader/upload-metadata.jsx +18 -17
- package/src/scripts/uploader/upload-mutation.js +17 -20
- package/src/scripts/uploader/upload-progress-button.jsx +5 -4
- package/src/scripts/uploader/upload-progress.jsx +3 -3
- package/src/scripts/uploader/upload-rename.jsx +6 -5
- package/src/scripts/uploader/upload-resume.jsx +26 -24
- package/src/scripts/uploader/upload-select.jsx +10 -9
- package/src/scripts/uploader/upload-status.jsx +5 -5
- package/src/scripts/uploader/upload-step.jsx +9 -9
- package/src/scripts/uploader/uploader-context.js +1 -1
- package/src/scripts/uploader/uploader-location.js +1 -1
- package/src/scripts/uploader/uploader-modal.jsx +8 -7
- package/src/scripts/uploader/uploader-setup-routes.jsx +10 -10
- package/src/scripts/uploader/uploader-status-routes.jsx +6 -6
- package/src/scripts/uploader/uploader-view.jsx +4 -4
- package/src/scripts/uploader/uploader.jsx +50 -48
- package/src/scripts/users/username.tsx +3 -3
- package/src/scripts/utils/__tests__/csv.spec.ts +16 -16
- package/src/scripts/utils/__tests__/date.spec.js +4 -4
- package/src/scripts/utils/__tests__/json-ld.spec.js +12 -12
- package/src/scripts/utils/__tests__/newid.spec.js +9 -9
- package/src/scripts/utils/__tests__/userNotify.spec.js +10 -10
- package/src/scripts/utils/analytics.tsx +3 -3
- package/src/scripts/utils/cookies.js +1 -1
- package/src/scripts/utils/csv.ts +13 -15
- package/src/scripts/utils/datalad.js +1 -1
- package/src/scripts/utils/dataset-url.js +2 -2
- package/src/scripts/utils/date.js +2 -2
- package/src/scripts/utils/global-polyfill.ts +2 -2
- package/src/scripts/utils/gtag.js +6 -6
- package/src/scripts/utils/json-ld.js +13 -13
- package/src/scripts/utils/newid.js +1 -1
- package/src/scripts/utils/user-login-modal-ctx.tsx +4 -4
- package/src/scripts/utils/userNotify.js +2 -2
- package/src/scripts/validation/validation-panel.jsx +3 -3
- package/src/scripts/validation/validation-results.issues.issue.jsx +9 -9
- package/src/scripts/validation/validation-results.issues.jsx +19 -17
- package/src/scripts/validation/validation-results.jsx +10 -10
- package/src/scripts/validation/validation-status.jsx +19 -17
- package/src/scripts/validation/validation.jsx +5 -5
- package/src/scripts/workers/schema.ts +2 -2
- package/src/scripts/workers/schema.worker.ts +4 -4
- package/src/scripts/workers/validate.ts +2 -2
- package/src/scripts/workers/validate.worker.ts +7 -5
- package/vite.config.js +17 -17
- package/src/dist/assets/activity-icon.9ab0c828.png +0 -0
- package/src/dist/assets/bids.da8810b3.jpg +0 -0
- package/src/dist/assets/brand_mark.28e7645d.png +0 -0
- package/src/dist/assets/close-button.21e700a6.png +0 -0
- package/src/dist/assets/cube-get.39ed5636.png +0 -0
- package/src/dist/assets/cube-share.9b558c29.png +0 -0
- package/src/dist/assets/cube-use.ccf2ddc5.png +0 -0
- package/src/dist/assets/datalad.a35b15b8.jpg +0 -0
- package/src/dist/assets/eeg.1dc1dc54.jpg +0 -0
- package/src/dist/assets/email-header.1cb8bf76.png +0 -0
- package/src/dist/assets/ieeg.f91deb0a.jpg +0 -0
- package/src/dist/assets/index.3db805fb.js +0 -23127
- package/src/dist/assets/index.3db805fb.js.map +0 -1
- package/src/dist/assets/index.5eb79d2c.css +0 -1
- package/src/dist/assets/ljaf.567e9566.png +0 -0
- package/src/dist/assets/logo_app.8c986cf9.png +0 -0
- package/src/dist/assets/logo_cube.5224b745.png +0 -0
- package/src/dist/assets/logo_data.3e1d5743.png +0 -0
- package/src/dist/assets/logo_users.a84a265a.png +0 -0
- package/src/dist/assets/meg.1e1928f8.jpg +0 -0
- package/src/dist/assets/mri.b01e4f42.jpg +0 -0
- package/src/dist/assets/nih-bi-logo.80d76e1d.png +0 -0
- package/src/dist/assets/nih-stanford.2a7c496e.jpg +0 -0
- package/src/dist/assets/nih.78a64d38.png +0 -0
- package/src/dist/assets/nimh.0ec775d8.png +0 -0
- package/src/dist/assets/nru-logo.f3097dc5.png +0 -0
- package/src/dist/assets/nsf.eee1d3f7.png +0 -0
- package/src/dist/assets/nsf.f87e96e7.png +0 -0
- package/src/dist/assets/on-dark-horz.e1f213d0.svg +0 -1
- package/src/dist/assets/on-dark.12f4e2ce.svg +0 -1
- package/src/dist/assets/on-light-horz.23ff22c3.svg +0 -1
- package/src/dist/assets/on-light.50592f7f.svg +0 -1
- package/src/dist/assets/pet-scan.21d98a3d.jpg +0 -0
- package/src/dist/assets/revicons.4ca02b8a.ttf +0 -0
- package/src/dist/assets/revicons.9e4d4c68.eot +0 -0
- package/src/dist/assets/revicons.f7b9c306.woff +0 -0
- package/src/dist/assets/sqm-logo.9cd0cca5.png +0 -0
- package/src/dist/assets/squishymedia.fa3c5919.png +0 -0
- package/src/dist/assets/stanford.5f245936.png +0 -0
- package/src/dist/index.html +0 -25
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Top level dataset queries only, mutations may cause refetches of these
|
|
3
3
|
*/
|
|
4
|
-
import { gql } from
|
|
5
|
-
import * as DatasetQueryFragments from
|
|
6
|
-
import { DATASET_COMMENTS } from
|
|
4
|
+
import { gql } from "@apollo/client"
|
|
5
|
+
import * as DatasetQueryFragments from "../datalad/dataset/dataset-query-fragments.js"
|
|
6
|
+
import { DATASET_COMMENTS } from "../datalad/dataset/comments-fragments.js"
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Generate the dataset page query
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { getKibanaURL } from
|
|
2
|
-
import { vi } from
|
|
1
|
+
import { getKibanaURL } from "../kibana"
|
|
2
|
+
import { vi } from "vitest"
|
|
3
3
|
|
|
4
|
-
vi.mock(
|
|
4
|
+
vi.mock("../../config.ts")
|
|
5
5
|
|
|
6
|
-
describe(
|
|
7
|
-
it(
|
|
6
|
+
describe("getKibanaURL", () => {
|
|
7
|
+
it("returns a valid url when env var ELASTICSEARCH_CLOUD_ID exists", () => {
|
|
8
8
|
const config = {
|
|
9
9
|
elasticsearch: {
|
|
10
10
|
cloudID:
|
|
11
|
-
|
|
11
|
+
"openneuro-staging:dXMtZWFzdC0xLmF3cy5mb3VuZC5pbyRjYjQ2MWUyYzA5ZDU0MDVlODRmM2I0NDJiMDA0NmIzOSRhMjEzNmNkMGU2YjA0NTllOTVhMWU2MDRiNTViOTY0OA==",
|
|
12
12
|
},
|
|
13
13
|
}
|
|
14
14
|
const url = getKibanaURL(config)
|
|
15
15
|
expect(url).toEqual(
|
|
16
|
-
|
|
16
|
+
"https://a2136cd0e6b0459e95a1e604b55b9648.us-east-1.aws.found.io:9243/app/discover#/",
|
|
17
17
|
)
|
|
18
18
|
})
|
|
19
19
|
|
|
20
|
-
it(
|
|
20
|
+
it("returns a localhost url when ELASTICSEARCH_CLOUD_ID does not exist", () => {
|
|
21
21
|
const config = {}
|
|
22
22
|
const url = getKibanaURL(config)
|
|
23
|
-
expect(url).toEqual(
|
|
23
|
+
expect(url).toEqual("http://localhost:5601/app/discover#/")
|
|
24
24
|
})
|
|
25
25
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { config } from
|
|
1
|
+
import { config } from "../config"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Extract kibana deployment uri from ELASTICSEARCH_CLOUD_ID (prod/staging)
|
|
5
5
|
* or use localhost url.
|
|
6
6
|
* For localhost url to be available, the kibana service must be enabled (docker-compose).
|
|
7
7
|
*/
|
|
8
|
-
export const getKibanaURL = config => {
|
|
8
|
+
export const getKibanaURL = (config) => {
|
|
9
9
|
if (config?.elasticsearch?.cloudID) {
|
|
10
10
|
const ELASTICSEARCH_CLOUD_ID = config.elasticsearch.cloudID
|
|
11
11
|
const base64 = /:(.+?==)$/.exec(ELASTICSEARCH_CLOUD_ID)[1]
|
|
@@ -13,7 +13,7 @@ export const getKibanaURL = config => {
|
|
|
13
13
|
const [, hostname, deploymentId] = /^(.+?)\$.+?\$(.+?)$/.exec(decoded)
|
|
14
14
|
return `https://${deploymentId}.${hostname}:9243/app/discover#/`
|
|
15
15
|
} else {
|
|
16
|
-
return
|
|
16
|
+
return "http://localhost:5601/app/discover#/"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
const url = getKibanaURL(config)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const pageTitle =
|
|
1
|
+
export const pageTitle = "OpenNeuro"
|
|
2
2
|
export const pageDescription =
|
|
3
|
-
|
|
3
|
+
"A free and open platform for analyzing and sharing neuroimaging data"
|
package/src/scripts/routes.tsx
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Route, Routes
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Navigate, Route, Routes } from "react-router-dom"
|
|
3
3
|
|
|
4
4
|
// TODO - Re-enable code splitting these when we can
|
|
5
|
-
import DatasetQuery from
|
|
5
|
+
import DatasetQuery from "./dataset/dataset-query"
|
|
6
6
|
//import PreRefactorDatasetProps from './dataset/dataset-pre-refactor-container'
|
|
7
7
|
|
|
8
|
-
import FaqPage from
|
|
9
|
-
import FrontPageContainer from
|
|
10
|
-
import Admin from
|
|
11
|
-
import SearchRoutes from
|
|
12
|
-
import APIKey from
|
|
13
|
-
import ErrorRoute from
|
|
14
|
-
import { PETRedirect } from
|
|
15
|
-
import Citation from
|
|
16
|
-
import FourOFourPage from
|
|
17
|
-
import { ImportDataset } from
|
|
18
|
-
import { DatasetMetadata } from
|
|
8
|
+
import FaqPage from "./pages/faq/faq"
|
|
9
|
+
import FrontPageContainer from "./pages/front-page/front-page"
|
|
10
|
+
import Admin from "./pages/admin/admin"
|
|
11
|
+
import SearchRoutes from "./search/search-routes"
|
|
12
|
+
import APIKey from "./pages/api"
|
|
13
|
+
import ErrorRoute from "./errors/errorRoute"
|
|
14
|
+
import { PETRedirect } from "./pages/pet-redirect"
|
|
15
|
+
import Citation from "./pages/citation-page"
|
|
16
|
+
import FourOFourPage from "./errors/404page"
|
|
17
|
+
import { ImportDataset } from "./pages/import-dataset"
|
|
18
|
+
import { DatasetMetadata } from "./pages/metadata/dataset-metadata"
|
|
19
19
|
|
|
20
20
|
const AppRoutes: React.VoidFunctionComponent = () => (
|
|
21
21
|
<Routes>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SearchParamsCtx } from
|
|
3
|
-
import { render } from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { SearchParamsCtx } from "../search-params-ctx"
|
|
3
|
+
import { render } from "@testing-library/react"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Render with SearchParamsCtx state
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { describe,
|
|
2
|
-
import { setDefaultSearch } from
|
|
1
|
+
import { describe, expect, it, vi } from "vitest"
|
|
2
|
+
import { setDefaultSearch } from "../search-container"
|
|
3
3
|
|
|
4
|
-
describe(
|
|
5
|
-
describe(
|
|
6
|
-
it(
|
|
7
|
-
const context = { modality_selected:
|
|
4
|
+
describe("SearchContainer component", () => {
|
|
5
|
+
describe("setDefaultSearch", () => {
|
|
6
|
+
it("updates default state when a modality is provided differing from the default", () => {
|
|
7
|
+
const context = { modality_selected: "MRI" }
|
|
8
8
|
const setContext = vi.fn()
|
|
9
9
|
setDefaultSearch(
|
|
10
|
-
|
|
10
|
+
"MRI",
|
|
11
11
|
context,
|
|
12
12
|
setContext,
|
|
13
|
-
new URLSearchParams(
|
|
13
|
+
new URLSearchParams("/search"),
|
|
14
14
|
)
|
|
15
15
|
expect(setContext).not.toHaveBeenCalled()
|
|
16
16
|
setDefaultSearch(
|
|
17
|
-
|
|
17
|
+
"PET",
|
|
18
18
|
context,
|
|
19
19
|
setContext,
|
|
20
|
-
new URLSearchParams(
|
|
20
|
+
new URLSearchParams("/search"),
|
|
21
21
|
)
|
|
22
22
|
expect(setContext).toHaveBeenCalled()
|
|
23
23
|
})
|
|
24
24
|
it('sets datasetType_select to my datasets with "mydatasets" parameter', () => {
|
|
25
25
|
let context = {
|
|
26
|
-
modality_selected:
|
|
27
|
-
datasetType_selected:
|
|
26
|
+
modality_selected: "MRI",
|
|
27
|
+
datasetType_selected: "All Public",
|
|
28
28
|
}
|
|
29
|
-
const setContext = vi.fn().mockImplementation(arg => {
|
|
29
|
+
const setContext = vi.fn().mockImplementation((arg) => {
|
|
30
30
|
context = arg(context)
|
|
31
31
|
})
|
|
32
32
|
setDefaultSearch(
|
|
33
|
-
|
|
33
|
+
"MRI",
|
|
34
34
|
context,
|
|
35
35
|
setContext,
|
|
36
|
-
new URLSearchParams(
|
|
36
|
+
new URLSearchParams("mydatasets"),
|
|
37
37
|
)
|
|
38
|
-
expect(context.datasetType_selected).toEqual(
|
|
38
|
+
expect(context.datasetType_selected).toEqual("My Datasets")
|
|
39
39
|
})
|
|
40
40
|
it('sets datasetType_select to my datasets with "bookmarks" parameter', () => {
|
|
41
41
|
let context = {
|
|
42
|
-
modality_selected:
|
|
43
|
-
datasetType_selected:
|
|
42
|
+
modality_selected: "PET",
|
|
43
|
+
datasetType_selected: "All Public",
|
|
44
44
|
}
|
|
45
|
-
const setContext = vi.fn().mockImplementation(arg => {
|
|
45
|
+
const setContext = vi.fn().mockImplementation((arg) => {
|
|
46
46
|
context = arg(context)
|
|
47
47
|
})
|
|
48
48
|
setDefaultSearch(
|
|
49
|
-
|
|
49
|
+
"MRI",
|
|
50
50
|
context,
|
|
51
51
|
setContext,
|
|
52
|
-
new URLSearchParams(
|
|
52
|
+
new URLSearchParams("bookmarks"),
|
|
53
53
|
)
|
|
54
|
-
expect(context.datasetType_selected).toEqual(
|
|
54
|
+
expect(context.datasetType_selected).toEqual("My Bookmarks")
|
|
55
55
|
})
|
|
56
56
|
})
|
|
57
57
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { render, screen
|
|
3
|
-
import {
|
|
4
|
-
import AuthorInput from
|
|
5
|
-
import initialSearchParams from
|
|
6
|
-
import { MemoryRouter } from
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { fireEvent, render, screen } from "@testing-library/react"
|
|
3
|
+
import { SearchParamsCtx, SearchParamsProvider } from "../search-params-ctx"
|
|
4
|
+
import AuthorInput from "../inputs/author-input"
|
|
5
|
+
import initialSearchParams from "../initial-search-params"
|
|
6
|
+
import { MemoryRouter } from "react-router-dom"
|
|
7
7
|
|
|
8
|
-
describe(
|
|
9
|
-
it(
|
|
8
|
+
describe("SearchParamsProvider", () => {
|
|
9
|
+
it("restores URL searchParams state", () => {
|
|
10
10
|
const route = '/search?query={"authors"%3A["Test+Author"]}'
|
|
11
11
|
const wrapper = ({ children }) => (
|
|
12
12
|
<MemoryRouter initialEntries={[route]}>
|
|
@@ -15,15 +15,15 @@ describe('SearchParamsProvider', () => {
|
|
|
15
15
|
)
|
|
16
16
|
render(
|
|
17
17
|
<SearchParamsCtx.Consumer>
|
|
18
|
-
{value => <span>Received: {value.searchParams.authors.pop()}</span>}
|
|
18
|
+
{(value) => <span>Received: {value.searchParams.authors.pop()}</span>}
|
|
19
19
|
</SearchParamsCtx.Consumer>,
|
|
20
20
|
{ wrapper },
|
|
21
21
|
)
|
|
22
22
|
expect(screen.getByText(/^Received:/).textContent).toBe(
|
|
23
|
-
|
|
23
|
+
"Received: Test Author",
|
|
24
24
|
)
|
|
25
25
|
})
|
|
26
|
-
it(
|
|
26
|
+
it("edits array fields correctly", () => {
|
|
27
27
|
const route = '/search?query={"authors"%3A["Test+Author"]}'
|
|
28
28
|
const wrapper = ({ children }) => (
|
|
29
29
|
<MemoryRouter initialEntries={[route]}>
|
|
@@ -32,24 +32,24 @@ describe('SearchParamsProvider', () => {
|
|
|
32
32
|
)
|
|
33
33
|
render(
|
|
34
34
|
<SearchParamsCtx.Consumer>
|
|
35
|
-
{value => (
|
|
35
|
+
{(value) => (
|
|
36
36
|
<>
|
|
37
37
|
<AuthorInput />
|
|
38
|
-
<span>Received: {value.searchParams.authors.join(
|
|
38
|
+
<span>Received: {value.searchParams.authors.join(", ")}</span>
|
|
39
39
|
</>
|
|
40
40
|
)}
|
|
41
41
|
</SearchParamsCtx.Consumer>,
|
|
42
42
|
{ wrapper },
|
|
43
43
|
)
|
|
44
|
-
const textInput = screen.getByRole(
|
|
45
|
-
const button = screen.getByRole(
|
|
46
|
-
fireEvent.change(textInput, { target: { value:
|
|
44
|
+
const textInput = screen.getByRole("textbox")
|
|
45
|
+
const button = screen.getByRole("button")
|
|
46
|
+
fireEvent.change(textInput, { target: { value: "New Author" } })
|
|
47
47
|
fireEvent.click(button)
|
|
48
48
|
expect(screen.getByText(/^Received:/).textContent).toBe(
|
|
49
|
-
|
|
49
|
+
"Received: Test Author, New Author",
|
|
50
50
|
)
|
|
51
51
|
})
|
|
52
|
-
it(
|
|
52
|
+
it("setSearchParams is callable with object argument", () => {
|
|
53
53
|
const route = '/search?query={"authors"%3A["Test+Author"]}'
|
|
54
54
|
const wrapper = ({ children }) => (
|
|
55
55
|
<MemoryRouter initialEntries={[route]}>
|
|
@@ -61,7 +61,7 @@ describe('SearchParamsProvider', () => {
|
|
|
61
61
|
|
|
62
62
|
render(
|
|
63
63
|
<SearchParamsCtx.Consumer>
|
|
64
|
-
{value => {
|
|
64
|
+
{(value) => {
|
|
65
65
|
setSearchParams = value.setSearchParams
|
|
66
66
|
return <span>Received: {value.searchParams.authors.pop()}</span>
|
|
67
67
|
}}
|
|
@@ -69,7 +69,7 @@ describe('SearchParamsProvider', () => {
|
|
|
69
69
|
{ wrapper },
|
|
70
70
|
)
|
|
71
71
|
expect(screen.getByText(/^Received:/).textContent).toBe(
|
|
72
|
-
|
|
72
|
+
"Received: Test Author",
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
expect(() => setSearchParams(initialSearchParams)).not.toThrow()
|
|
@@ -30,7 +30,7 @@ export const simpleQueryString = (
|
|
|
30
30
|
fuzzy = true,
|
|
31
31
|
) => ({
|
|
32
32
|
simple_query_string: {
|
|
33
|
-
query: `${queryString}${fuzzy ?
|
|
33
|
+
query: `${queryString}${fuzzy ? "~" : ""}`,
|
|
34
34
|
fields,
|
|
35
35
|
},
|
|
36
36
|
})
|
|
@@ -50,11 +50,27 @@ export const matchQuery = (
|
|
|
50
50
|
},
|
|
51
51
|
})
|
|
52
52
|
|
|
53
|
+
export const multiMatchQuery = (
|
|
54
|
+
field: string,
|
|
55
|
+
queryStrings: string[],
|
|
56
|
+
fuzziness?: string,
|
|
57
|
+
operator?: string,
|
|
58
|
+
) => {
|
|
59
|
+
return {
|
|
60
|
+
bool: {
|
|
61
|
+
should: queryStrings.map((queryString) =>
|
|
62
|
+
matchQuery(field, queryString, fuzziness, operator)
|
|
63
|
+
),
|
|
64
|
+
minimum_should_match: 1,
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
export const rangeQuery = (
|
|
54
70
|
field,
|
|
55
71
|
gte?: number | string,
|
|
56
72
|
lte?: number | string,
|
|
57
|
-
relation: string =
|
|
73
|
+
relation: string = "INTERSECTS",
|
|
58
74
|
) => ({
|
|
59
75
|
range: {
|
|
60
76
|
[field]: {
|
|
@@ -69,7 +85,7 @@ export const rangeListLengthQuery = (field, gte: number, lte: number) => {
|
|
|
69
85
|
return {
|
|
70
86
|
script: {
|
|
71
87
|
script: {
|
|
72
|
-
lang:
|
|
88
|
+
lang: "painless",
|
|
73
89
|
source: `
|
|
74
90
|
if (doc[params.field].size() != 0) {
|
|
75
91
|
return ( doc[params.field].size() >= params.gte && doc[params.field].size() <= params.lte )
|
|
@@ -86,6 +102,6 @@ export const rangeListLengthQuery = (field, gte: number, lte: number) => {
|
|
|
86
102
|
|
|
87
103
|
/** SimpleQueryString join multiple terms with and `+`. */
|
|
88
104
|
export const sqsJoinWithAND = (list: string[]) =>
|
|
89
|
-
list.map(str => `${str}`).join(
|
|
105
|
+
list.map((str) => `${str}`).join(" + ")
|
|
90
106
|
export const joinWithOR = (list: string[]) =>
|
|
91
|
-
list.map(str => `${str}`).join(
|
|
107
|
+
list.map((str) => `${str}`).join(" | ")
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React, { FC, useContext } from
|
|
2
|
-
import {
|
|
1
|
+
import React, { FC, useContext } from "react"
|
|
2
|
+
import { useNavigate, useParams } from "react-router-dom"
|
|
3
3
|
import {
|
|
4
|
-
SearchParamsCtx,
|
|
5
|
-
removeFilterItem,
|
|
6
4
|
getSelectParams,
|
|
5
|
+
removeFilterItem,
|
|
6
|
+
SearchParamsCtx,
|
|
7
7
|
useCheckIfParamsAreSelected,
|
|
8
|
-
} from
|
|
9
|
-
import { FiltersBlock } from
|
|
10
|
-
import initialSearchParams from
|
|
8
|
+
} from "./search-params-ctx"
|
|
9
|
+
import { FiltersBlock } from "@openneuro/components/search-page"
|
|
10
|
+
import initialSearchParams from "./initial-search-params"
|
|
11
11
|
|
|
12
12
|
interface FiltersBlockContainerProps {
|
|
13
13
|
numTotalResults: number
|
|
@@ -21,22 +21,20 @@ const FiltersBlockContainer: FC<FiltersBlockContainerProps> = ({
|
|
|
21
21
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
22
22
|
const selectedParams = getSelectParams(searchParams)
|
|
23
23
|
|
|
24
|
-
const noFilters = !useCheckIfParamsAreSelected([
|
|
24
|
+
const noFilters = !useCheckIfParamsAreSelected(["modality_selected"])
|
|
25
25
|
|
|
26
26
|
const navigate = useNavigate()
|
|
27
27
|
const { path } = useParams()
|
|
28
|
-
const globalSearchPath =
|
|
28
|
+
const globalSearchPath = "/search"
|
|
29
29
|
|
|
30
|
-
const removeFilter =
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
if (isModality) navigate(globalSearchPath)
|
|
35
|
-
}
|
|
30
|
+
const removeFilter = (isModality: boolean) => (param, value): void => {
|
|
31
|
+
removeFilterItem(setSearchParams)(param, value)
|
|
32
|
+
if (isModality) navigate(globalSearchPath)
|
|
33
|
+
}
|
|
36
34
|
|
|
37
35
|
const removeAllFilters = (): void => {
|
|
38
36
|
// reset params to default values
|
|
39
|
-
setSearchParams(prevState => ({
|
|
37
|
+
setSearchParams((prevState) => ({
|
|
40
38
|
...prevState,
|
|
41
39
|
...getSelectParams(initialSearchParams),
|
|
42
40
|
}))
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { sortBy } from
|
|
1
|
+
import { sortBy } from "@openneuro/components/content"
|
|
2
2
|
|
|
3
3
|
const datasetType_available = [
|
|
4
|
-
{ label:
|
|
5
|
-
{ label:
|
|
6
|
-
{ label:
|
|
7
|
-
{ label:
|
|
4
|
+
{ label: "All Public", value: "All Public" },
|
|
5
|
+
{ label: "Following", value: "Following" },
|
|
6
|
+
{ label: "My Datasets", value: "My Datasets" },
|
|
7
|
+
{ label: "My Bookmarks", value: "My Bookmarks" },
|
|
8
8
|
]
|
|
9
9
|
|
|
10
10
|
const datasetStatus_available = [
|
|
11
|
-
{ label:
|
|
12
|
-
{ label:
|
|
13
|
-
{ label:
|
|
11
|
+
{ label: "Public", value: "Public" },
|
|
12
|
+
{ label: "Shared with Me", value: "Shared with Me" },
|
|
13
|
+
{ label: "Invalid", value: "Invalid" },
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
type ModalityOption = {
|
|
@@ -23,9 +23,9 @@ type ModalityOption = {
|
|
|
23
23
|
|
|
24
24
|
export const modality_available: ModalityOption[] = [
|
|
25
25
|
{
|
|
26
|
-
label:
|
|
27
|
-
value:
|
|
28
|
-
portalPath:
|
|
26
|
+
label: "MRI",
|
|
27
|
+
value: "MRI",
|
|
28
|
+
portalPath: "/search/modality/mri",
|
|
29
29
|
count: null,
|
|
30
30
|
// children: [
|
|
31
31
|
// {
|
|
@@ -55,9 +55,9 @@ export const modality_available: ModalityOption[] = [
|
|
|
55
55
|
// ],
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
label:
|
|
59
|
-
value:
|
|
60
|
-
portalPath:
|
|
58
|
+
label: "PET",
|
|
59
|
+
value: "PET",
|
|
60
|
+
portalPath: "/search/modality/pet",
|
|
61
61
|
count: null,
|
|
62
62
|
// children: [
|
|
63
63
|
// {
|
|
@@ -75,21 +75,21 @@ export const modality_available: ModalityOption[] = [
|
|
|
75
75
|
// ],
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
label:
|
|
79
|
-
value:
|
|
80
|
-
portalPath:
|
|
78
|
+
label: "EEG",
|
|
79
|
+
value: "EEG",
|
|
80
|
+
portalPath: "/search/modality/eeg",
|
|
81
81
|
count: null,
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
label:
|
|
85
|
-
value:
|
|
86
|
-
portalPath:
|
|
84
|
+
label: "iEEG",
|
|
85
|
+
value: "iEEG",
|
|
86
|
+
portalPath: "/search/modality/ieeg",
|
|
87
87
|
count: null,
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
label:
|
|
91
|
-
value:
|
|
92
|
-
portalPath:
|
|
90
|
+
label: "MEG",
|
|
91
|
+
value: "MEG",
|
|
92
|
+
portalPath: "/search/modality/meg",
|
|
93
93
|
count: null,
|
|
94
94
|
},
|
|
95
95
|
]
|
|
@@ -109,16 +109,16 @@ export const flattenedModalities = modality_available.reduce(
|
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
export const sex_list = [
|
|
112
|
-
{ label:
|
|
113
|
-
{ label:
|
|
114
|
-
{ label:
|
|
112
|
+
{ label: "All", value: "All" },
|
|
113
|
+
{ label: "Male", value: "Male" },
|
|
114
|
+
{ label: "Female", value: "Female" },
|
|
115
115
|
]
|
|
116
116
|
|
|
117
117
|
export const date_list = [
|
|
118
|
-
{ label:
|
|
119
|
-
{ label:
|
|
120
|
-
{ label:
|
|
121
|
-
{ label:
|
|
118
|
+
{ label: "All Time", value: "All Time" },
|
|
119
|
+
{ label: "Last 30 days", value: "Last 30 days" },
|
|
120
|
+
{ label: "Last 180 days", value: "Last 180 days" },
|
|
121
|
+
{ label: "Last 12 months", value: "Last 12 months" },
|
|
122
122
|
]
|
|
123
123
|
|
|
124
124
|
type OptionalNumberRange = [number | null, number | null]
|
|
@@ -198,7 +198,7 @@ const TEMPORARY_initialSearchParams: SearchParams = {
|
|
|
198
198
|
keywords: [],
|
|
199
199
|
searchAllDatasets: false,
|
|
200
200
|
datasetType_available,
|
|
201
|
-
datasetType_selected:
|
|
201
|
+
datasetType_selected: "All Public",
|
|
202
202
|
datasetStatus_available,
|
|
203
203
|
datasetStatus_selected: null,
|
|
204
204
|
modality_available,
|
|
@@ -206,28 +206,28 @@ const TEMPORARY_initialSearchParams: SearchParams = {
|
|
|
206
206
|
ageRange: [null, null],
|
|
207
207
|
subjectCountRange: [null, null],
|
|
208
208
|
diagnosis_available: [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
"Healthy / Control",
|
|
210
|
+
"Schizophrenia",
|
|
211
|
+
"ADD/ADHD",
|
|
212
|
+
"Alzheimers",
|
|
213
|
+
"Other",
|
|
214
214
|
],
|
|
215
215
|
diagnosis_selected: null,
|
|
216
216
|
tasks: [],
|
|
217
217
|
authors: [],
|
|
218
218
|
// more
|
|
219
|
-
sex_available: [
|
|
220
|
-
sex_selected:
|
|
219
|
+
sex_available: ["All", "Male", "Female"],
|
|
220
|
+
sex_selected: "All",
|
|
221
221
|
date_available: [
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
"All Time",
|
|
223
|
+
"Last 30 days",
|
|
224
|
+
"Last 180 days",
|
|
225
|
+
"Last 12 months",
|
|
226
226
|
],
|
|
227
|
-
date_selected:
|
|
228
|
-
species_available: [
|
|
227
|
+
date_selected: "All Time",
|
|
228
|
+
species_available: ["Human", "Rat", "Mouse", "Other"],
|
|
229
229
|
species_selected: null,
|
|
230
|
-
section_available: [
|
|
230
|
+
section_available: ["Cross-Sectional", "Longitudinal", "Other"],
|
|
231
231
|
section_selected: null,
|
|
232
232
|
studyDomains: [],
|
|
233
233
|
bodyParts: [],
|