@openneuro/app 4.33.4 → 4.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/src/client.jsx +2 -1
- package/src/scripts/authentication/signOut.ts +1 -1
- package/src/scripts/common/containers/footer.tsx +1 -1
- package/src/scripts/common/containers/header.tsx +3 -2
- package/src/scripts/common/content/affiliate-content.jsx +72 -0
- package/src/scripts/common/content/assets/affiliates/bids.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/datalad.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/nih-bi-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/brand_mark.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-get.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-share.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-use.png +0 -0
- package/src/scripts/common/content/assets/front-page/ljaf.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_app.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_cube.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_data.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_users.png +0 -0
- package/src/scripts/common/content/assets/front-page/novo-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nru-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nsf.png +0 -0
- package/src/scripts/common/content/assets/front-page/sqm-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/squishymedia.png +0 -0
- package/src/scripts/common/content/assets/front-page/stanford.png +0 -0
- package/src/scripts/common/content/assets/modality-cubes/brain-initiative.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/eeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/ieeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/meg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/mri.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nih_cube.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nirs.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/pet-scan.jpg +0 -0
- package/src/scripts/common/content/assets/portal-content/nih-bi-brand.png +0 -0
- package/src/scripts/common/content/facet-content.jsx +186 -0
- package/src/scripts/common/content/front-page-content.jsx +177 -0
- package/src/scripts/common/content/image-attribution.tsx +3 -3
- package/src/scripts/common/content/modality-cube-content.jsx +92 -0
- package/src/scripts/common/content/portal-content.jsx +149 -0
- package/src/scripts/common/content/portal-grant-content.jsx +30 -0
- package/src/scripts/common/content/sortby-list.jsx +18 -0
- package/src/scripts/common/forms/warn-button.jsx +1 -1
- package/src/scripts/components/accordion/AccordionTab.tsx +68 -0
- package/src/scripts/components/accordion/AccordionWrap.tsx +22 -0
- package/src/scripts/components/accordion/__tests__/AccordionTab.spec.tsx +35 -0
- package/src/scripts/components/accordion/accordion.scss +68 -0
- package/src/scripts/components/activity-slider/ActivitySlider.tsx +121 -0
- package/src/scripts/components/activity-slider/slider.scss +130 -0
- package/src/scripts/components/affiliate-article/AffiliateArticle.tsx +26 -0
- package/src/scripts/components/affiliate-article/affiliate.scss +32 -0
- package/src/scripts/components/aggregate-count/AggregateCount.tsx +20 -0
- package/src/scripts/components/assets/activity-icon.png +0 -0
- package/src/scripts/components/assets/close-button.png +0 -0
- package/src/scripts/components/assets/favicon copy.ico +0 -0
- package/src/scripts/components/assets/favicon.ico +0 -0
- package/src/scripts/components/assets/get_data_browse.png +0 -0
- package/src/scripts/components/assets/get_data_download.png +0 -0
- package/src/scripts/components/assets/ljaf copy.png +0 -0
- package/src/scripts/components/assets/logo_app copy.png +0 -0
- package/src/scripts/components/assets/logo_cube copy.png +0 -0
- package/src/scripts/components/assets/logo_data copy.png +0 -0
- package/src/scripts/components/assets/logo_users copy.png +0 -0
- package/src/scripts/components/assets/mri-scan.jpg +0 -0
- package/src/scripts/components/assets/nih copy.png +0 -0
- package/src/scripts/components/assets/nih-bi-brand.jpg +0 -0
- package/src/scripts/components/assets/nih-stanford.jpg +0 -0
- package/src/scripts/components/assets/nih.png +0 -0
- package/src/scripts/components/assets/nimh.png +0 -0
- package/src/scripts/components/assets/nsf copy.png +0 -0
- package/src/scripts/components/assets/on-dark-horz.svg +1 -0
- package/src/scripts/components/assets/on-dark.svg +1 -0
- package/src/scripts/components/assets/on-light-horz.svg +1 -0
- package/src/scripts/components/assets/on-light.svg +1 -0
- package/src/scripts/components/assets/orcid_24x24 copy.png +0 -0
- package/src/scripts/components/assets/orcid_24x24.png +0 -0
- package/src/scripts/components/assets/share_data_collaborate.png +0 -0
- package/src/scripts/components/assets/share_data_publish.png +0 -0
- package/src/scripts/components/assets/share_data_validate.png +0 -0
- package/src/scripts/components/assets/squishymedia copy.png +0 -0
- package/src/scripts/components/assets/stanford copy.png +0 -0
- package/src/scripts/components/assets/tab-get_data.png +0 -0
- package/src/scripts/components/assets/tab-share_data.png +0 -0
- package/src/scripts/components/assets/tab-use_data.png +0 -0
- package/src/scripts/components/assets/use_data_analyze.png +0 -0
- package/src/scripts/components/assets/use_data_snapshot.png +0 -0
- package/src/scripts/components/button/Button.tsx +113 -0
- package/src/scripts/components/button/__tests__/Button.spec.tsx +21 -0
- package/src/scripts/components/button/button.scss +140 -0
- package/src/scripts/components/count-toggle/CountToggle.tsx +65 -0
- package/src/scripts/components/count-toggle/__tests__/CountToggle.spec.tsx +31 -0
- package/src/scripts/components/count-toggle/count-toggle.scss +34 -0
- package/src/scripts/components/dropdown/Dropdown.tsx +38 -0
- package/src/scripts/components/dropdown/dropdown.scss +29 -0
- package/src/scripts/components/facets/FacetRadio.tsx +43 -0
- package/src/scripts/components/facets/FacetRange.tsx +35 -0
- package/src/scripts/components/facets/FacetSearch.tsx +66 -0
- package/src/scripts/components/facets/FacetSelect.tsx +87 -0
- package/src/scripts/components/facets/SingleSelect.tsx +39 -0
- package/src/scripts/components/facets/__tests__/FacetSelect.spec.tsx +14 -0
- package/src/scripts/components/facets/__tests__/SingleSelect.spec.tsx +58 -0
- package/src/scripts/components/facets/facet.scss +244 -0
- package/src/scripts/components/footer/Footer.tsx +52 -0
- package/src/scripts/components/footer/footer.scss +20 -0
- package/src/scripts/components/formatting/__tests__/modality-label.spec.tsx +34 -0
- package/src/scripts/components/formatting/modality-label.tsx +34 -0
- package/src/scripts/components/front-page/ActivityHeader.tsx +12 -0
- package/src/scripts/components/front-page/AffiliateBlock.tsx +22 -0
- package/src/scripts/components/front-page/Contributors.tsx +28 -0
- package/src/scripts/components/front-page/GetUpdates.tsx +99 -0
- package/src/scripts/components/front-page/Infographic.tsx +36 -0
- package/src/scripts/components/front-page/front-page.scss +295 -0
- package/src/scripts/components/header/Header.tsx +151 -0
- package/src/scripts/components/header/LandingExpandedHeader.tsx +110 -0
- package/src/scripts/components/header/header.scss +409 -0
- package/src/scripts/components/icon/Icon.tsx +55 -0
- package/src/scripts/components/icon/__tests__/Icon.spec.tsx +10 -0
- package/src/scripts/components/icon/icon.scss +8 -0
- package/src/scripts/components/input/Input.tsx +137 -0
- package/src/scripts/components/input/TermSearch.tsx +101 -0
- package/src/scripts/components/input/input.scss +147 -0
- package/src/scripts/components/input/term-search.scss +68 -0
- package/src/scripts/components/json-tree/ExpandableProperty.tsx +35 -0
- package/src/scripts/components/json-tree/RecursiveProperty.tsx +67 -0
- package/src/scripts/components/json-tree/json-tree.scss +19 -0
- package/src/scripts/components/loading/Loading.tsx +19 -0
- package/src/scripts/components/loading/__tests__/Loading.spec.tsx +12 -0
- package/src/scripts/components/loading/loading.scss +141 -0
- package/src/scripts/components/logo/Logo.tsx +44 -0
- package/src/scripts/components/logo/__tests__/Logo.spec.tsx +22 -0
- package/src/scripts/components/modal/Modal.tsx +51 -0
- package/src/scripts/components/modal/ModalExample.tsx +25 -0
- package/src/scripts/components/modal/UserLoginModal.tsx +74 -0
- package/src/scripts/components/modal/__tests__/UserLoginModal.spec.tsx +37 -0
- package/src/scripts/components/modal/modal.scss +60 -0
- package/src/scripts/components/modality-cube/ModalityCube.tsx +60 -0
- package/src/scripts/components/modality-cube/modality-cube.scss +303 -0
- package/src/scripts/components/page/Page.tsx +61 -0
- package/src/scripts/components/page/page.scss +408 -0
- package/src/scripts/components/progress-bar/ProgressBar.tsx +16 -0
- package/src/scripts/components/progress-bar/progress-bar.scss +34 -0
- package/src/scripts/components/radio/Radio.tsx +33 -0
- package/src/scripts/components/radio/RadioGroup.tsx +45 -0
- package/src/scripts/components/radio/__tests__/RadioGroup.spec.tsx +31 -0
- package/src/scripts/components/radio/radio.scss +335 -0
- package/src/scripts/components/range/TwoHandleRange.scss +108 -0
- package/src/scripts/components/range/TwoHandleRange.tsx +128 -0
- package/src/scripts/components/range/__tests__/TwoHandleRange.spec.tsx +34 -0
- package/src/scripts/components/read-more/ReadMore.tsx +50 -0
- package/src/scripts/components/read-more/__tests__/ReadMore.spec.tsx +14 -0
- package/src/scripts/components/read-more/read-more.scss +79 -0
- package/src/scripts/components/scss/_flex-grid.scss +216 -0
- package/src/scripts/components/scss/_helper-classes.scss +162 -0
- package/src/scripts/components/scss/_normalize.scss +614 -0
- package/src/scripts/components/scss/_variables.scss +245 -0
- package/src/scripts/components/scss/global.scss +124 -0
- package/src/scripts/components/scss/toasts.scss +33 -0
- package/src/scripts/components/scss/upload-modal.scss +479 -0
- package/src/scripts/components/search-page/CommunityHeader.tsx +27 -0
- package/src/scripts/components/search-page/FacetBlockContainerExample.tsx +6 -0
- package/src/scripts/components/search-page/FilterDateItem.tsx +44 -0
- package/src/scripts/components/search-page/FilterListItem.tsx +62 -0
- package/src/scripts/components/search-page/FiltersBlock.tsx +277 -0
- package/src/scripts/components/search-page/ModalityHeader.tsx +64 -0
- package/src/scripts/components/search-page/NeurobagelSearch.tsx +59 -0
- package/src/scripts/components/search-page/SearchPage.tsx +114 -0
- package/src/scripts/components/search-page/SearchResultItem.tsx +417 -0
- package/src/scripts/components/search-page/SearchResultsList.tsx +48 -0
- package/src/scripts/components/search-page/SearchSort.tsx +52 -0
- package/src/scripts/components/search-page/SearchSortContainerExample.tsx +9 -0
- package/src/scripts/components/search-page/TermListItem.tsx +41 -0
- package/src/scripts/components/search-page/__tests__/NuerobagelSearch.spec.tsx +17 -0
- package/src/scripts/components/search-page/filters-block.scss +99 -0
- package/src/scripts/components/search-page/neurobagel_logo.svg +75 -0
- package/src/scripts/components/search-page/search-page.scss +505 -0
- package/src/scripts/components/search-page/search-result.scss +117 -0
- package/src/scripts/components/search-page/search-sort.scss +56 -0
- package/src/scripts/components/select/SelectGroup.tsx +41 -0
- package/src/scripts/components/select/__tests__/SelectGroup.spec.tsx +43 -0
- package/src/scripts/components/select/select.scss +40 -0
- package/src/scripts/components/textarea/Textarea.tsx +68 -0
- package/src/scripts/components/textarea/__tests__/Textarea.spec.tsx +53 -0
- package/src/scripts/components/tooltip/Tooltip.tsx +30 -0
- package/src/scripts/components/tooltip/__tests__/Tooltip.spec.tsx +14 -0
- package/src/scripts/components/tooltip/tooltip.scss +159 -0
- package/src/scripts/components/user/UserMenu.tsx +72 -0
- package/src/scripts/components/user/user-menu.scss +88 -0
- package/src/scripts/components/warn-button/WarnButton.tsx +97 -0
- package/src/scripts/components/warn-button/warn-button.scss +39 -0
- package/src/scripts/datalad/dataset/dataset-query-context.js +2 -0
- package/src/scripts/dataset/comments/comment.jsx +1 -1
- package/src/scripts/dataset/components/AnalyzeDropdown.tsx +2 -2
- package/src/scripts/dataset/components/CloneDropdown.tsx +2 -2
- package/src/scripts/dataset/components/DatasetEventItem.tsx +105 -0
- package/src/scripts/dataset/components/DatasetGitAccess.tsx +2 -2
- package/src/scripts/dataset/components/DatasetToolButton.tsx +2 -2
- package/src/scripts/dataset/components/ModalitiesMetaDataBlock.tsx +2 -10
- package/src/scripts/dataset/components/ValidationBlock.tsx +37 -2
- package/src/scripts/dataset/components/VersionList.tsx +1 -1
- package/src/scripts/dataset/components/scss/dataset-events.module.scss +41 -0
- package/src/scripts/dataset/dataset-query.jsx +12 -11
- package/src/scripts/dataset/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +7 -1
- package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +2 -2
- package/src/scripts/dataset/download/download-command-line.jsx +17 -13
- package/src/scripts/dataset/download/download-datalad.jsx +6 -3
- package/src/scripts/dataset/download/download-link.jsx +1 -1
- package/src/scripts/dataset/download/download-s3.jsx +0 -4
- package/src/scripts/dataset/files/file-display.jsx +1 -1
- package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +1 -1
- package/src/scripts/dataset/files/file-tree.tsx +1 -1
- package/src/scripts/dataset/files/file-view.jsx +1 -1
- package/src/scripts/dataset/files/file-viewer-type.jsx +5 -1
- package/src/scripts/dataset/files/file.tsx +2 -2
- package/src/scripts/dataset/files/files.tsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +1 -1
- package/src/scripts/dataset/files/viewers/file-viewer-markdown.tsx +13 -0
- package/src/scripts/dataset/fragments/cancel-button.tsx +1 -1
- package/src/scripts/dataset/fragments/dataset-citation.jsx +2 -2
- package/src/scripts/dataset/fragments/edit-button.tsx +1 -1
- package/src/scripts/dataset/fragments/edit-list.jsx +1 -1
- package/src/scripts/dataset/fragments/save-button.tsx +1 -1
- package/src/scripts/dataset/mutations/admin-exports.jsx +1 -1
- package/src/scripts/dataset/mutations/cache-clear.jsx +1 -1
- package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +2 -2
- package/src/scripts/dataset/mutations/dataset-events.tsx +187 -0
- package/src/scripts/dataset/mutations/dataset-relations.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-comment.jsx +1 -1
- package/src/scripts/dataset/mutations/delete-file.jsx +1 -1
- package/src/scripts/dataset/mutations/deprecate-version.tsx +1 -1
- package/src/scripts/dataset/mutations/flag-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/follow.tsx +1 -1
- package/src/scripts/dataset/mutations/import-dataset.tsx +1 -1
- package/src/scripts/dataset/mutations/publish.jsx +1 -1
- package/src/scripts/dataset/mutations/remove-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/remove-permissions.tsx +1 -1
- package/src/scripts/dataset/mutations/revalidate.jsx +2 -2
- package/src/scripts/dataset/mutations/snapshot.tsx +1 -1
- package/src/scripts/dataset/mutations/star.tsx +1 -1
- package/src/scripts/dataset/mutations/submit-metadata.jsx +1 -1
- package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +2 -2
- package/src/scripts/dataset/mutations/update-permissions.tsx +1 -1
- package/src/scripts/dataset/routes/admin-datalad.jsx +4 -0
- package/src/scripts/dataset/routes/dataset-default.tsx +1 -1
- package/src/scripts/dataset/routes/delete-page.tsx +7 -3
- package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +1 -1
- package/src/scripts/dataset/routes/manage-permissions.jsx +1 -1
- package/src/scripts/dataset/routes/snapshot-default.tsx +1 -1
- package/src/scripts/dataset/routes/snapshot.tsx +1 -1
- package/src/scripts/dataset/snapshot-container.tsx +14 -8
- package/src/scripts/pages/admin/flagged-files.jsx +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +1 -1
- package/src/scripts/pages/admin/users.tsx +2 -2
- package/src/scripts/pages/api.jsx +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -7
- package/src/scripts/pages/front-page/front-page.tsx +7 -9
- package/src/scripts/pages/metadata/dataset-metadata.tsx +1 -1
- package/src/scripts/search/__tests__/search-container.spec.tsx +7 -7
- package/src/scripts/search/filters-block-container.tsx +66 -9
- package/src/scripts/search/initial-search-params.tsx +7 -7
- package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +1 -1
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +1 -1
- package/src/scripts/search/inputs/age-range-input.tsx +3 -2
- package/src/scripts/search/inputs/author-input.tsx +3 -2
- package/src/scripts/search/inputs/dataset-type-select.tsx +3 -2
- package/src/scripts/search/inputs/date-radios.tsx +3 -2
- package/src/scripts/search/inputs/diagnosis-select.tsx +3 -2
- package/src/scripts/search/inputs/initiative-select.tsx +12 -6
- package/src/scripts/search/inputs/keyword-input.tsx +2 -2
- package/src/scripts/search/inputs/modality-select.tsx +28 -26
- package/src/scripts/search/inputs/pet/bodyParts_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +4 -3
- package/src/scripts/search/inputs/section-select.tsx +3 -2
- package/src/scripts/search/inputs/sex-radios.tsx +3 -2
- package/src/scripts/search/inputs/show-datasets-radios.tsx +4 -3
- package/src/scripts/search/inputs/sort-by-select.tsx +1 -1
- package/src/scripts/search/inputs/species-select.tsx +3 -2
- package/src/scripts/search/inputs/study-domain-input.tsx +4 -3
- package/src/scripts/search/inputs/subject-count-range-input.tsx +3 -2
- package/src/scripts/search/inputs/task-input.tsx +4 -3
- package/src/scripts/search/search-container.tsx +14 -17
- package/src/scripts/search/search-params-ctx.tsx +28 -5
- package/src/scripts/search/search-routes.tsx +2 -4
- package/src/scripts/search/use-search-results.tsx +14 -13
- package/src/scripts/uploader/upload-issues.tsx +1 -1
- package/src/scripts/uploader/upload-progress.jsx +1 -1
- package/src/scripts/uploader/uploader-modal.jsx +1 -1
- package/src/scripts/users/components/close-button.tsx +1 -1
- package/src/scripts/users/components/edit-button.tsx +1 -1
- package/src/scripts/users/components/edit-list.tsx +1 -1
- package/src/scripts/users/components/edit-string.tsx +1 -1
- package/src/scripts/users/dataset-card.tsx +2 -2
- package/src/scripts/users/user-notification-accordion.tsx +1 -1
- package/src/scripts/utils/user-login-modal-ctx.tsx +1 -1
- package/src/scripts/validation/validation-issues.tsx +2 -1
- package/src/scripts/validation/validation-panel.tsx +2 -1
- package/src/scripts/validation/validation-results.tsx +4 -3
- package/src/scripts/validation-legacy/validation-panel.jsx +2 -1
- package/src/scripts/validation-legacy/validation-results.issues.jsx +2 -3
- package/src/scripts/validation-legacy/validation-results.tsx +3 -4
- package/tsconfig.json +1 -4
|
@@ -2,9 +2,10 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import useState from "react-usestateref"
|
|
4
4
|
import { removeFilterItem, SearchParamsCtx } from "../../search-params-ctx"
|
|
5
|
-
import { FacetSearch } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { AccordionTab
|
|
5
|
+
import { FacetSearch } from "../../../components/facets/FacetSearch"
|
|
6
|
+
import { Icon } from "../../../components/icon/Icon"
|
|
7
|
+
import { AccordionTab } from "../../../components/accordion/AccordionTab"
|
|
8
|
+
import { AccordionWrap } from "../../../components/accordion/AccordionWrap"
|
|
8
9
|
|
|
9
10
|
const ScannerManufacturersInput: FC = () => {
|
|
10
11
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -2,9 +2,10 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import useState from "react-usestateref"
|
|
4
4
|
import { removeFilterItem, SearchParamsCtx } from "../../search-params-ctx"
|
|
5
|
-
import { FacetSearch } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { AccordionTab
|
|
5
|
+
import { FacetSearch } from "../../../components/facets/FacetSearch"
|
|
6
|
+
import { Icon } from "../../../components/icon/Icon"
|
|
7
|
+
import { AccordionTab } from "../../../components/accordion/AccordionTab"
|
|
8
|
+
import { AccordionWrap } from "../../../components/accordion/AccordionWrap"
|
|
8
9
|
|
|
9
10
|
const TracerNamesInput: FC = () => {
|
|
10
11
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -2,9 +2,10 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import useState from "react-usestateref"
|
|
4
4
|
import { removeFilterItem, SearchParamsCtx } from "../../search-params-ctx"
|
|
5
|
-
import { FacetSearch } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { AccordionTab
|
|
5
|
+
import { FacetSearch } from "../../../components/facets/FacetSearch"
|
|
6
|
+
import { Icon } from "../../../components/icon/Icon"
|
|
7
|
+
import { AccordionTab } from "../../../components/accordion/AccordionTab"
|
|
8
|
+
import { AccordionWrap } from "../../../components/accordion/AccordionWrap"
|
|
8
9
|
|
|
9
10
|
const TracerRadionuclidesInput: FC = () => {
|
|
10
11
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { FacetSelect } from "
|
|
5
|
-
import { AccordionTab
|
|
4
|
+
import { FacetSelect } from "../../components/facets/FacetSelect"
|
|
5
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
6
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
6
7
|
|
|
7
8
|
const SectionSelect: FC = () => {
|
|
8
9
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { FacetRadio } from "
|
|
5
|
-
import { AccordionTab
|
|
4
|
+
import { FacetRadio } from "../../components/facets/FacetRadio"
|
|
5
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
6
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
6
7
|
|
|
7
8
|
const SexRadios: FC = () => {
|
|
8
9
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { RadioGroup } from "
|
|
5
|
-
import { FacetSelect } from "
|
|
4
|
+
import { RadioGroup } from "../../components/radio/RadioGroup"
|
|
5
|
+
import { FacetSelect } from "../../components/facets/FacetSelect"
|
|
6
6
|
import { useCookies } from "react-cookie"
|
|
7
7
|
import { getUnexpiredProfile } from "../../authentication/profile"
|
|
8
|
-
import { AccordionTab
|
|
8
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
9
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
9
10
|
|
|
10
11
|
const ShowDatasetsRadios: FC = () => {
|
|
11
12
|
const [cookies] = useCookies()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { SearchSort } from "
|
|
4
|
+
import { SearchSort } from "../../components/search-page/SearchSort"
|
|
5
5
|
|
|
6
6
|
interface SortBySelectProps {
|
|
7
7
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { FacetSelect } from "
|
|
5
|
-
import { AccordionTab
|
|
4
|
+
import { FacetSelect } from "../../components/facets/FacetSelect"
|
|
5
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
6
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
6
7
|
|
|
7
8
|
const SpeciesSelect: FC = () => {
|
|
8
9
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -2,9 +2,10 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import useState from "react-usestateref"
|
|
4
4
|
import { removeFilterItem, SearchParamsCtx } from "../search-params-ctx"
|
|
5
|
-
import { FacetSearch } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { AccordionTab
|
|
5
|
+
import { FacetSearch } from "../../components/facets/FacetSearch"
|
|
6
|
+
import { Icon } from "../../components/icon/Icon"
|
|
7
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
8
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
8
9
|
|
|
9
10
|
const StudyDomainInput: FC = () => {
|
|
10
11
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { SearchParamsCtx } from "../search-params-ctx"
|
|
4
|
-
import { FacetRange } from "
|
|
5
|
-
import { AccordionTab
|
|
4
|
+
import { FacetRange } from "../../components/facets/FacetRange"
|
|
5
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
6
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
6
7
|
|
|
7
8
|
const SubjectCountRangeInput: FC = () => {
|
|
8
9
|
const min = 0
|
|
@@ -2,9 +2,10 @@ import React, { useContext } from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import useState from "react-usestateref"
|
|
4
4
|
import { removeFilterItem, SearchParamsCtx } from "../search-params-ctx"
|
|
5
|
-
import { FacetSearch } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { AccordionTab
|
|
5
|
+
import { FacetSearch } from "../../components/facets/FacetSearch"
|
|
6
|
+
import { Icon } from "../../components/icon/Icon"
|
|
7
|
+
import { AccordionTab } from "../../components/accordion/AccordionTab"
|
|
8
|
+
import { AccordionWrap } from "../../components/accordion/AccordionWrap"
|
|
8
9
|
|
|
9
10
|
const TaskInput: FC = () => {
|
|
10
11
|
const { searchParams, setSearchParams } = useContext(SearchParamsCtx)
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react"
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { useLocation } from "react-router-dom"
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "@openneuro/components/search-page"
|
|
4
|
+
import { SearchPage } from "../components/search-page/SearchPage"
|
|
5
|
+
import { SearchResultsList } from "../components/search-page/SearchResultsList"
|
|
6
|
+
import { NeurobagelSearch } from "../components/search-page/NeurobagelSearch"
|
|
8
7
|
import {
|
|
9
8
|
getUnexpiredProfile,
|
|
10
9
|
hasEditPermissions,
|
|
11
10
|
} from "../authentication/profile"
|
|
12
|
-
import { Button } from "
|
|
13
|
-
import { Loading } from "
|
|
14
|
-
import { NeurobagelSearch } from "@openneuro/components/search-page"
|
|
11
|
+
import { Button } from "../components/button/Button"
|
|
12
|
+
import { Loading } from "../components/loading/Loading"
|
|
15
13
|
import {
|
|
16
14
|
AgeRangeInput,
|
|
17
15
|
AllDatasetsToggle,
|
|
@@ -81,13 +79,13 @@ export const setDefaultSearch = (
|
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
const modalitiesWithSecondaries = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
mri: ["mri", "Diffusion", "Structural", "Functional", "ASL Perfusion"],
|
|
83
|
+
pet: ["pet", "Static", "Dynamic"],
|
|
84
|
+
eeg: ["eeg"],
|
|
85
|
+
ieeg: ["ieeg"],
|
|
86
|
+
meg: ["meg"],
|
|
87
|
+
nirs: ["nirs"],
|
|
88
|
+
nih: ["nih"],
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
if (
|
|
@@ -144,10 +142,9 @@ const SearchContainer: FC<SearchContainerProps> = ({ portalContent }) => {
|
|
|
144
142
|
])
|
|
145
143
|
|
|
146
144
|
const { loading, data, fetchMore, variables } = useSearchResults()
|
|
147
|
-
const loadMore =
|
|
145
|
+
const loadMore = () => {
|
|
148
146
|
fetchMore({
|
|
149
147
|
variables: {
|
|
150
|
-
// ...variables,
|
|
151
148
|
cursor: data?.datasets?.pageInfo.endCursor,
|
|
152
149
|
},
|
|
153
150
|
})
|
|
@@ -248,7 +245,7 @@ const SearchContainer: FC<SearchContainerProps> = ({ portalContent }) => {
|
|
|
248
245
|
/>
|
|
249
246
|
{/* TODO: make div below into display component. */}
|
|
250
247
|
<div className="grid grid-nogutter" style={{ width: "100%" }}>
|
|
251
|
-
{resultsList.length
|
|
248
|
+
{resultsList.length > 0 || !hasNextPage
|
|
252
249
|
? null
|
|
253
250
|
: (
|
|
254
251
|
<div className="col col-12 load-more m-t-10">
|
|
@@ -20,6 +20,12 @@ export const SearchParamsProvider: React.FC<SearchParamsProviderProps> = ({
|
|
|
20
20
|
const query = searchQuery.get("query")
|
|
21
21
|
if (query) {
|
|
22
22
|
searchParams = JSON.parse(query)
|
|
23
|
+
} else {
|
|
24
|
+
Sentry.addBreadcrumb({
|
|
25
|
+
category: "routing",
|
|
26
|
+
message: "No query found in URL. Using initialSearchParams.",
|
|
27
|
+
level: "info"
|
|
28
|
+
})
|
|
23
29
|
}
|
|
24
30
|
} catch (err) {
|
|
25
31
|
Sentry.captureException(err)
|
|
@@ -28,21 +34,37 @@ export const SearchParamsProvider: React.FC<SearchParamsProviderProps> = ({
|
|
|
28
34
|
const setSearchParams = (
|
|
29
35
|
newParams: SearchParams | ((prevState: SearchParams) => SearchParams),
|
|
30
36
|
): void => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
let computedNewParams
|
|
38
|
+
if (typeof newParams === "function") {
|
|
39
|
+
computedNewParams = newParams(searchParams)
|
|
40
|
+
} else {
|
|
41
|
+
computedNewParams = newParams
|
|
42
|
+
}
|
|
43
|
+
const merged = { ...searchParams, ...computedNewParams }
|
|
44
|
+
|
|
45
|
+
// Filter out keys that match the defaults from initialSearchParams
|
|
46
|
+
const filtered = Object.keys(merged).reduce((acc, key) => {
|
|
47
|
+
if (
|
|
48
|
+
JSON.stringify(merged[key]) !== JSON.stringify(initialSearchParams[key])
|
|
49
|
+
) {
|
|
50
|
+
acc[key] = merged[key]
|
|
51
|
+
}
|
|
52
|
+
return acc
|
|
53
|
+
}, {} as Record<string, unknown>)
|
|
54
|
+
|
|
34
55
|
setSearch(
|
|
35
56
|
{
|
|
36
|
-
query: JSON.stringify(
|
|
57
|
+
query: JSON.stringify(filtered),
|
|
37
58
|
},
|
|
38
59
|
{ replace: true },
|
|
39
60
|
)
|
|
40
61
|
}
|
|
41
62
|
|
|
63
|
+
const finalSearchParams = { ...initialSearchParams, ...searchParams }
|
|
42
64
|
return (
|
|
43
65
|
<SearchParamsCtx.Provider
|
|
44
66
|
value={{
|
|
45
|
-
searchParams:
|
|
67
|
+
searchParams: finalSearchParams,
|
|
46
68
|
setSearchParams,
|
|
47
69
|
}}
|
|
48
70
|
>
|
|
@@ -61,6 +83,7 @@ export const removeFilterItem = (setSearchParams) => (param, value) => {
|
|
|
61
83
|
initialSearchParams["datasetStatus_selected"]
|
|
62
84
|
break
|
|
63
85
|
case "modality_selected":
|
|
86
|
+
case "brain_initiative":
|
|
64
87
|
case "datasetStatus_selected":
|
|
65
88
|
case "ageRange":
|
|
66
89
|
case "subjectCountRange":
|
|
@@ -2,10 +2,8 @@ import React from "react"
|
|
|
2
2
|
import type { FC } from "react"
|
|
3
3
|
import { Route, Routes } from "react-router-dom"
|
|
4
4
|
import SearchContainer from "./search-container"
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
portalGrantContent,
|
|
8
|
-
} from "@openneuro/components/content"
|
|
5
|
+
import { portalContent } from "../common/content/portal-content"
|
|
6
|
+
import { portalGrantContent } from "../common/content/portal-grant-content"
|
|
9
7
|
|
|
10
8
|
const SearchRoutes: FC = () => (
|
|
11
9
|
<Routes>
|
|
@@ -172,28 +172,28 @@ export const useSearchResults = () => {
|
|
|
172
172
|
if (modality_selected) {
|
|
173
173
|
const secondaryModalities = {
|
|
174
174
|
Diffusion: {
|
|
175
|
-
secondary: "
|
|
176
|
-
primary: "
|
|
175
|
+
secondary: "mri_diffusion",
|
|
176
|
+
primary: "mri",
|
|
177
177
|
},
|
|
178
178
|
Structural: {
|
|
179
|
-
secondary: "
|
|
180
|
-
primary: "
|
|
179
|
+
secondary: "mri_structural",
|
|
180
|
+
primary: "mri",
|
|
181
181
|
},
|
|
182
182
|
Functional: {
|
|
183
|
-
secondary: "
|
|
184
|
-
primary: "
|
|
183
|
+
secondary: "mri_functional",
|
|
184
|
+
primary: "mri",
|
|
185
185
|
},
|
|
186
186
|
Perfusion: {
|
|
187
|
-
secondary: "
|
|
188
|
-
primary: "
|
|
187
|
+
secondary: "mri_perfusion",
|
|
188
|
+
primary: "mri",
|
|
189
189
|
},
|
|
190
190
|
Static: {
|
|
191
|
-
secondary: "
|
|
192
|
-
primary: "
|
|
191
|
+
secondary: "pet_static",
|
|
192
|
+
primary: "pet",
|
|
193
193
|
},
|
|
194
194
|
Dynamic: {
|
|
195
|
-
secondary: "
|
|
196
|
-
primary: "
|
|
195
|
+
secondary: "pet_dynamic",
|
|
196
|
+
primary: "pet",
|
|
197
197
|
},
|
|
198
198
|
}
|
|
199
199
|
if (Object.keys(secondaryModalities).includes(modality_selected)) {
|
|
@@ -333,7 +333,7 @@ export const useSearchResults = () => {
|
|
|
333
333
|
matchQuery("metadata.studyDomain", joinWithOR(studyDomains)),
|
|
334
334
|
)
|
|
335
335
|
}
|
|
336
|
-
if (modality_selected === "
|
|
336
|
+
if (modality_selected === "pet" || modality_selected === null) {
|
|
337
337
|
if (bodyParts.length) {
|
|
338
338
|
boolQuery.addClause(
|
|
339
339
|
"must",
|
|
@@ -402,5 +402,6 @@ export const useSearchResults = () => {
|
|
|
402
402
|
// TODO: find better solution
|
|
403
403
|
fetchPolicy: "cache-and-network",
|
|
404
404
|
nextFetchPolicy: "cache-first",
|
|
405
|
+
notifyOnNetworkStatusChange: true,
|
|
405
406
|
})
|
|
406
407
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import pluralize from "pluralize"
|
|
3
|
-
import { Loading } from "
|
|
3
|
+
import { Loading } from "../components/loading/Loading"
|
|
4
4
|
import { ValidationResultsDisplay } from "../validation/validation-results"
|
|
5
5
|
import UploaderContext from "./uploader-context.js"
|
|
6
6
|
import { validation } from "../workers/schema.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import PropTypes from "prop-types"
|
|
3
|
-
import { Modal } from "
|
|
3
|
+
import { Modal } from "../components/modal/Modal"
|
|
4
4
|
|
|
5
5
|
// Show is always {true} because the router unmounts this otherwise
|
|
6
6
|
const UploaderModal = ({ setLocation, location, children, footer }) => (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { formatDistanceToNow, parseISO } from "date-fns"
|
|
3
3
|
import activityPulseIcon from "../../assets/activity-icon.png"
|
|
4
|
-
import { Tooltip } from "
|
|
5
|
-
import { Icon } from "
|
|
4
|
+
import { Tooltip } from "../components/tooltip/Tooltip"
|
|
5
|
+
import { Icon } from "../components/icon/Icon"
|
|
6
6
|
import styles from "./scss/datasetcard.module.scss"
|
|
7
7
|
import type { DatasetCardProps } from "../types/user-types"
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import styles from "./scss/usernotifications.module.scss"
|
|
3
|
-
import { Tooltip } from "
|
|
3
|
+
import { Tooltip } from "../components/tooltip/Tooltip"
|
|
4
4
|
import iconUnread from "../../assets/icon-unread.png"
|
|
5
5
|
import iconSaved from "../../assets/icon-saved.png"
|
|
6
6
|
import iconArchived from "../../assets/icon-archived.png"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useState } from "react"
|
|
2
|
-
import { UserLoginModal } from "
|
|
2
|
+
import { UserLoginModal } from "../components/modal/UserLoginModal"
|
|
3
3
|
import loginUrls from "../authentication/loginUrls"
|
|
4
4
|
|
|
5
5
|
export const UserModalOpenCtx = createContext(null)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { AccordionTab
|
|
2
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
3
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
3
4
|
import type { DatasetIssues, Issue } from "@bids/validator/issues"
|
|
4
5
|
|
|
5
6
|
interface IssueProps {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { AccordionTab
|
|
2
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
3
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
3
4
|
|
|
4
5
|
interface ValidationPanelProps {
|
|
5
6
|
heading: React.ReactNode
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { AccordionTab
|
|
2
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
3
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
3
4
|
import { Issues } from "./validation-issues"
|
|
4
|
-
import { RadioGroup } from "
|
|
5
|
-
import { Loading } from "
|
|
5
|
+
import { RadioGroup } from "../components/radio/RadioGroup"
|
|
6
|
+
import { Loading } from "../components/loading/Loading"
|
|
6
7
|
import styled from "@emotion/styled"
|
|
7
8
|
import type { DatasetIssues } from "@bids/validator/issues"
|
|
8
9
|
import { useValidationResults } from "./validation-results-query"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import PropTypes from "prop-types"
|
|
3
|
-
import { AccordionTab
|
|
3
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
4
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
4
5
|
|
|
5
6
|
class ValidationPanel extends React.Component {
|
|
6
7
|
constructor(props) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// dependencies -----------------------------------------------------------
|
|
2
|
-
|
|
3
1
|
import React from "react"
|
|
4
2
|
import PropTypes from "prop-types"
|
|
5
|
-
import { AccordionTab
|
|
3
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
4
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
6
5
|
|
|
7
6
|
import pluralize from "pluralize"
|
|
8
7
|
import Issue from "./validation-results.issues.issue.jsx"
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
// dependencies -----------------------------------------------------------
|
|
2
|
-
|
|
3
1
|
import React from "react"
|
|
4
2
|
import pluralize from "pluralize"
|
|
5
|
-
import { AccordionTab
|
|
3
|
+
import { AccordionTab } from "../components/accordion/AccordionTab"
|
|
4
|
+
import { AccordionWrap } from "../components/accordion/AccordionWrap"
|
|
6
5
|
import Issues from "./validation-results.issues.jsx"
|
|
7
6
|
import { useLegacyValidationResults } from "./validation-legacy-query.js"
|
|
8
|
-
import { Loading } from "
|
|
7
|
+
import { Loading } from "../components/loading/Loading"
|
|
9
8
|
|
|
10
9
|
function countFiles(issues) {
|
|
11
10
|
let numFiles = 0
|
package/tsconfig.json
CHANGED
|
@@ -6,8 +6,5 @@
|
|
|
6
6
|
"tsBuildInfoFile": "../../.build-cache/app.tsbuildinfo"
|
|
7
7
|
},
|
|
8
8
|
"include": ["./src"],
|
|
9
|
-
"files": ["./src/lerna.json", "./src/scripts/workers/validator-config.json"]
|
|
10
|
-
"references": [
|
|
11
|
-
{ "path": "../openneuro-components" }
|
|
12
|
-
]
|
|
9
|
+
"files": ["./src/lerna.json", "./src/scripts/workers/validator-config.json"]
|
|
13
10
|
}
|