@openneuro/app 4.2.0 → 4.2.4
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 +9 -18
- package/src/scripts/common/forms/warn-button.jsx +1 -1
- package/src/scripts/pages/citation-page.tsx +41 -0
- package/src/scripts/refactor_2021/admin/admin.jsx +1 -1
- package/src/scripts/refactor_2021/admin/flagged-files.jsx +2 -1
- package/src/scripts/refactor_2021/admin/user-tools.tsx +3 -5
- package/src/scripts/refactor_2021/admin/users.jsx +7 -10
- package/src/scripts/{authentication → refactor_2021/authentication}/__tests__/profile.spec.js +1 -1
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/__snapshots__/comment.spec.jsx.snap +0 -8
- package/src/scripts/refactor_2021/dataset/comments/__tests__/__snapshots__/comments.spec.jsx.snap +129 -0
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/comment.spec.jsx +0 -0
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/comments.spec.jsx +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/download-link.spec.jsx.snap +645 -105
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/shell-example.spec.jsx.snap +6 -3
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-command-line.spec.jsx +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-link.spec.jsx +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-native.spec.js +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/shell-example.spec.jsx +0 -0
- package/src/scripts/refactor_2021/dataset/draft-container.tsx +11 -22
- package/src/scripts/refactor_2021/dataset/files/file-tree.jsx +3 -2
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/cancel-button.spec.tsx.snap +10 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/edit-button.spec.tsx.snap +10 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +24 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/save-button.spec.tsx.snap +10 -0
- package/src/scripts/{datalad/fragments/__tests__/__snapshots__/select-input.spec.jsx.snap → refactor_2021/dataset/fragments/__tests__/__snapshots__/select-input.spec.tsx.snap} +0 -0
- package/src/scripts/{datalad/fragments/__tests__/cancel-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/cancel-button.spec.tsx} +2 -2
- package/src/scripts/{datalad → refactor_2021/dataset}/fragments/__tests__/dataset-citation.spec.jsx +0 -0
- package/src/scripts/{datalad/fragments/__tests__/edit-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/edit-button.spec.tsx} +2 -2
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/edit-list.spec.jsx +27 -0
- package/src/scripts/{datalad/fragments/__tests__/save-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/save-button.spec.tsx} +2 -2
- package/src/scripts/{datalad/fragments/__tests__/select-input.spec.jsx → refactor_2021/dataset/fragments/__tests__/select-input.spec.tsx} +0 -0
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +50 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/__snapshots__/description.spec.jsx.snap +0 -0
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +27 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/cache-id.spec.js +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/delete.spec.jsx +8 -8
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/description.spec.jsx +0 -0
- package/src/scripts/{datalad/mutations/__tests__/remove-permissions.spec.jsx → refactor_2021/dataset/mutations/__tests__/remove-permissions.spec.tsx} +1 -1
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/update-permissions.spec.jsx +28 -0
- package/src/scripts/refactor_2021/dataset/mutations/update-file.jsx +2 -2
- package/src/scripts/refactor_2021/dataset/snapshot-container.tsx +4 -8
- package/src/scripts/refactor_2021/routes.tsx +1 -1
- package/src/scripts/refactor_2021/search/initial-search-params.tsx +7 -7
- package/src/scripts/refactor_2021/search/inputs/index.ts +2 -2
- package/src/scripts/refactor_2021/search/inputs/{gender-radios.tsx → sex-radios.tsx} +10 -10
- package/src/scripts/refactor_2021/search/search-container.tsx +2 -2
- package/src/scripts/refactor_2021/search/search-params-ctx.tsx +3 -3
- package/src/scripts/refactor_2021/search/use-search-results.tsx +3 -3
- package/src/scripts/refactor_2021/user/api.jsx +11 -6
- package/src/sass/_bootstrap-compass.scss +0 -9
- package/src/sass/_bootstrap-mincer.scss +0 -19
- package/src/sass/_bootstrap-sprockets.scss +0 -9
- package/src/sass/_bootstrap.scss +0 -50
- package/src/sass/animate/_attention-seekers/_bounce.scss +0 -15
- package/src/sass/animate/_attention-seekers/_flash.scss +0 -14
- package/src/sass/animate/_attention-seekers/_pulse.scss +0 -17
- package/src/sass/animate/_attention-seekers/_rubberBand.scss +0 -19
- package/src/sass/animate/_attention-seekers/_shake.scss +0 -15
- package/src/sass/animate/_attention-seekers/_swing.scss +0 -19
- package/src/sass/animate/_attention-seekers/_tada.scss +0 -17
- package/src/sass/animate/_attention-seekers/_wobble.scss +0 -21
- package/src/sass/animate/_attention-seekers/attention-seekers.scss +0 -12
- package/src/sass/animate/_bouncing-entrances/_bounceIn.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInDown.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInLeft.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInRight.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInUp.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/bouncing-entrances.scss +0 -9
- package/src/sass/animate/_bouncing-exits/_bounceOut.scss +0 -26
- package/src/sass/animate/_bouncing-exits/_bounceOutDown.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutLeft.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutRight.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutUp.scss +0 -23
- package/src/sass/animate/_bouncing-exits/bouncing-exits.scss +0 -4
- package/src/sass/animate/_fading-entrances/_fadeIn.scss +0 -14
- package/src/sass/animate/_fading-entrances/_fadeInDown.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInDownBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInLeft.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInLeftBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInRight.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInRightBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInUp.scss +0 -19
- package/src/sass/animate/_fading-entrances/_fadeInUpBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/fading-entrances.scss +0 -5
- package/src/sass/animate/_fading-exits/_fadeOut.scss +0 -14
- package/src/sass/animate/_fading-exits/_fadeOutDown.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutDownBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutLeft.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutLeftBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutRight.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutRightBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutUp.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutUpBig.scss +0 -20
- package/src/sass/animate/_fading-exits/fading-exits.scss +0 -5
- package/src/sass/animate/_flippers/_flip.scss +0 -33
- package/src/sass/animate/_flippers/_flipInX.scss +0 -26
- package/src/sass/animate/_flippers/_flipInY.scss +0 -26
- package/src/sass/animate/_flippers/_flipOutX.scss +0 -20
- package/src/sass/animate/_flippers/_flipOutY.scss +0 -20
- package/src/sass/animate/_flippers/flippers.scss +0 -8
- package/src/sass/animate/_lightspeed/_lightSpeedIn.scss +0 -29
- package/src/sass/animate/_lightspeed/_lightSpeedOut.scss +0 -21
- package/src/sass/animate/_lightspeed/lightspeed.scss +0 -3
- package/src/sass/animate/_properties.scss +0 -119
- package/src/sass/animate/_rotating-entrances/_rotateIn.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInDownLeft.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInDownRight.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInUpLeft.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInUpRight.scss +0 -22
- package/src/sass/animate/_rotating-entrances/rotating-entrances.scss +0 -8
- package/src/sass/animate/_rotating-exits/_rotateOut.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutDownLeft.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutDownRight.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutUpLeft.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutUpRight.scss +0 -22
- package/src/sass/animate/_rotating-exits/rotating-exits.scss +0 -8
- package/src/sass/animate/_sliding-entrances/_slideInDown.scss +0 -19
- package/src/sass/animate/_sliding-entrances/_slideInLeft.scss +0 -19
- package/src/sass/animate/_sliding-entrances/_slideInRight.scss +0 -42
- package/src/sass/animate/_sliding-entrances/_slideInUp.scss +0 -19
- package/src/sass/animate/_sliding-entrances/sliding-entrances.scss +0 -7
- package/src/sass/animate/_sliding-exits/_slideOutDown.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutLeft.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutRight.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutUp.scss +0 -19
- package/src/sass/animate/_sliding-exits/sliding-exits.scss +0 -7
- package/src/sass/animate/_specials/_hinge.scss +0 -37
- package/src/sass/animate/_specials/_rollIn.scss +0 -20
- package/src/sass/animate/_specials/_rollOut.scss +0 -22
- package/src/sass/animate/_specials/specials.scss +0 -6
- package/src/sass/animate/_zooming-entrances/_zoomIn.scss +0 -19
- package/src/sass/animate/_zooming-entrances/_zoomInDown.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInLeft.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInRight.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInUp.scss +0 -22
- package/src/sass/animate/_zooming-entrances/zooming-entrances.scss +0 -4
- package/src/sass/animate/_zooming-exits/_zoomOut.scss +0 -22
- package/src/sass/animate/_zooming-exits/_zoomOutDown.scss +0 -23
- package/src/sass/animate/_zooming-exits/_zoomOutLeft.scss +0 -21
- package/src/sass/animate/_zooming-exits/_zoomOutRight.scss +0 -21
- package/src/sass/animate/_zooming-exits/_zoomOutUp.scss +0 -23
- package/src/sass/animate/_zooming-exits/zooming-exits.scss +0 -4
- package/src/sass/animate/animate.css +0 -7497
- package/src/sass/animate/animate.css.map +0 -7
- package/src/sass/animate/animate.min.css +0 -2
- package/src/sass/animate/animate.min.css.map +0 -7
- package/src/sass/animate/animate.scss +0 -30
- package/src/sass/animate/bower.json +0 -22
- package/src/sass/bootstrap/_alerts.scss +0 -70
- package/src/sass/bootstrap/_badges.scss +0 -68
- package/src/sass/bootstrap/_breadcrumbs.scss +0 -26
- package/src/sass/bootstrap/_button-groups.scss +0 -243
- package/src/sass/bootstrap/_buttons.scss +0 -160
- package/src/sass/bootstrap/_carousel.scss +0 -269
- package/src/sass/bootstrap/_close.scss +0 -36
- package/src/sass/bootstrap/_code.scss +0 -69
- package/src/sass/bootstrap/_component-animations.scss +0 -37
- package/src/sass/bootstrap/_dropdowns.scss +0 -223
- package/src/sass/bootstrap/_forms.scss +0 -613
- package/src/sass/bootstrap/_grid.scss +0 -84
- package/src/sass/bootstrap/_input-groups.scss +0 -166
- package/src/sass/bootstrap/_jumbotron.scss +0 -50
- package/src/sass/bootstrap/_labels.scss +0 -66
- package/src/sass/bootstrap/_list-group.scss +0 -124
- package/src/sass/bootstrap/_media.scss +0 -61
- package/src/sass/bootstrap/_mixins.scss +0 -39
- package/src/sass/bootstrap/_modals.scss +0 -150
- package/src/sass/bootstrap/_navbar.scss +0 -647
- package/src/sass/bootstrap/_navs.scss +0 -243
- package/src/sass/bootstrap/_normalize.scss +0 -427
- package/src/sass/bootstrap/_pager.scss +0 -54
- package/src/sass/bootstrap/_pagination.scss +0 -88
- package/src/sass/bootstrap/_panels.scss +0 -265
- package/src/sass/bootstrap/_popovers.scss +0 -135
- package/src/sass/bootstrap/_print.scss +0 -107
- package/src/sass/bootstrap/_progress-bars.scss +0 -87
- package/src/sass/bootstrap/_responsive-embed.scss +0 -35
- package/src/sass/bootstrap/_responsive-utilities.scss +0 -177
- package/src/sass/bootstrap/_scaffolding.scss +0 -162
- package/src/sass/bootstrap/_tables.scss +0 -234
- package/src/sass/bootstrap/_theme.scss +0 -273
- package/src/sass/bootstrap/_thumbnails.scss +0 -38
- package/src/sass/bootstrap/_tooltip.scss +0 -102
- package/src/sass/bootstrap/_type.scss +0 -298
- package/src/sass/bootstrap/_utilities.scss +0 -55
- package/src/sass/bootstrap/_variables.scss +0 -866
- package/src/sass/bootstrap/_wells.scss +0 -29
- package/src/sass/bootstrap/float-label.scss +0 -70
- package/src/sass/bootstrap/mixins/_alerts.scss +0 -14
- package/src/sass/bootstrap/mixins/_background-variant.scss +0 -11
- package/src/sass/bootstrap/mixins/_border-radius.scss +0 -18
- package/src/sass/bootstrap/mixins/_buttons.scss +0 -52
- package/src/sass/bootstrap/mixins/_center-block.scss +0 -7
- package/src/sass/bootstrap/mixins/_clearfix.scss +0 -22
- package/src/sass/bootstrap/mixins/_forms.scss +0 -88
- package/src/sass/bootstrap/mixins/_gradients.scss +0 -58
- package/src/sass/bootstrap/mixins/_grid-framework.scss +0 -81
- package/src/sass/bootstrap/mixins/_grid.scss +0 -122
- package/src/sass/bootstrap/mixins/_hide-text.scss +0 -21
- package/src/sass/bootstrap/mixins/_image.scss +0 -33
- package/src/sass/bootstrap/mixins/_labels.scss +0 -12
- package/src/sass/bootstrap/mixins/_list-group.scss +0 -31
- package/src/sass/bootstrap/mixins/_nav-divider.scss +0 -10
- package/src/sass/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- package/src/sass/bootstrap/mixins/_opacity.scss +0 -8
- package/src/sass/bootstrap/mixins/_pagination.scss +0 -23
- package/src/sass/bootstrap/mixins/_panels.scss +0 -24
- package/src/sass/bootstrap/mixins/_progress-bar.scss +0 -10
- package/src/sass/bootstrap/mixins/_reset-filter.scss +0 -8
- package/src/sass/bootstrap/mixins/_resize.scss +0 -6
- package/src/sass/bootstrap/mixins/_responsive-visibility.scss +0 -21
- package/src/sass/bootstrap/mixins/_size.scss +0 -10
- package/src/sass/bootstrap/mixins/_tab-focus.scss +0 -9
- package/src/sass/bootstrap/mixins/_table-row.scss +0 -28
- package/src/sass/bootstrap/mixins/_text-emphasis.scss +0 -11
- package/src/sass/bootstrap/mixins/_text-overflow.scss +0 -8
- package/src/sass/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- package/src/sass/crn_app/_admin.admin.scss +0 -205
- package/src/sass/crn_app/_admin.graphs.scss +0 -51
- package/src/sass/crn_app/_admin.tools.scss +0 -24
- package/src/sass/crn_app/_api.scss +0 -65
- package/src/sass/crn_app/_bootstrap.overrides.scss +0 -54
- package/src/sass/crn_app/_colors.scss +0 -88
- package/src/sass/crn_app/_common.click-to-edit.scss +0 -187
- package/src/sass/crn_app/_common.modals.scss +0 -686
- package/src/sass/crn_app/_common.pagination.scss +0 -41
- package/src/sass/crn_app/_common.papaya.scss +0 -348
- package/src/sass/crn_app/_common.progress-bar.scss +0 -26
- package/src/sass/crn_app/_common.spinner.scss +0 -63
- package/src/sass/crn_app/_common.status.scss +0 -103
- package/src/sass/crn_app/_common.tooltip.scss +0 -22
- package/src/sass/crn_app/_common.typeahead.scss +0 -31
- package/src/sass/crn_app/_common.variables.scss +0 -16
- package/src/sass/crn_app/_dashboard.datasets.scss +0 -588
- package/src/sass/crn_app/_dataset.comments.scss +0 -201
- package/src/sass/crn_app/_dataset.dataset.scss +0 -161
- package/src/sass/crn_app/_dataset.file-tree.scss +0 -277
- package/src/sass/crn_app/_dataset.jobs.scss +0 -701
- package/src/sass/crn_app/_dataset.sidebar.scss +0 -265
- package/src/sass/crn_app/_dataset.tools.scss +0 -118
- package/src/sass/crn_app/_elements-wrappers.scss +0 -870
- package/src/sass/crn_app/_faq.scss +0 -37
- package/src/sass/crn_app/_frontPage.scss +0 -569
- package/src/sass/crn_app/_nav.navbar.scss +0 -387
- package/src/sass/crn_app/_theme.scss +0 -87
- package/src/sass/crn_app/_upload.upload.scss +0 -393
- package/src/sass/crn_app/_upload.validation.scss +0 -210
- package/src/sass/draft/draft.scss +0 -11
- package/src/sass/draft/rich-editor.scss +0 -73
- package/src/sass/font-awesome/_animated.scss +0 -34
- package/src/sass/font-awesome/_bordered-pulled.scss +0 -25
- package/src/sass/font-awesome/_core.scss +0 -12
- package/src/sass/font-awesome/_fixed-width.scss +0 -6
- package/src/sass/font-awesome/_font-awesome.scss +0 -17
- package/src/sass/font-awesome/_icons.scss +0 -697
- package/src/sass/font-awesome/_larger.scss +0 -13
- package/src/sass/font-awesome/_list.scss +0 -19
- package/src/sass/font-awesome/_mixins.scss +0 -26
- package/src/sass/font-awesome/_path.scss +0 -15
- package/src/sass/font-awesome/_rotated-flipped.scss +0 -20
- package/src/sass/font-awesome/_stacked.scss +0 -20
- package/src/sass/font-awesome/_variables.scss +0 -713
- package/src/sass/main.scss +0 -317
- package/src/sass/pre-refactor-with-wrapper-main.scss +0 -1549
- package/src/scripts/admin/__tests__/__snapshots__/exports.spec.jsx.snap +0 -112
- package/src/scripts/admin/__tests__/exports.spec.jsx +0 -15
- package/src/scripts/admin/__tests__/users.spec.jsx +0 -15
- package/src/scripts/admin/admin.jsx +0 -53
- package/src/scripts/admin/flagged-files.jsx +0 -178
- package/src/scripts/admin/user-fragment.ts +0 -14
- package/src/scripts/admin/user-tools.tsx +0 -83
- package/src/scripts/admin/users.jsx +0 -224
- package/src/scripts/authentication/admin-user.jsx +0 -23
- package/src/scripts/authentication/buttons.jsx +0 -26
- package/src/scripts/authentication/globus-button.jsx +0 -39
- package/src/scripts/authentication/google-button.jsx +0 -32
- package/src/scripts/authentication/logged-in.jsx +0 -12
- package/src/scripts/authentication/logged-out.jsx +0 -12
- package/src/scripts/authentication/loginCheck.js +0 -7
- package/src/scripts/authentication/orcid-button.jsx +0 -32
- package/src/scripts/authentication/withProfile.jsx +0 -22
- package/src/scripts/classic.tsx +0 -18
- package/src/scripts/common/forms/file-select.tsx +0 -71
- package/src/scripts/common/partials/__tests__/__snapshots__/footer.spec.jsx.snap +0 -42
- package/src/scripts/common/partials/__tests__/__snapshots__/metric.spec.jsx.snap +0 -101
- package/src/scripts/common/partials/__tests__/footer.spec.jsx +0 -10
- package/src/scripts/common/partials/__tests__/metric.spec.jsx +0 -31
- package/src/scripts/common/partials/footer.jsx +0 -40
- package/src/scripts/common/partials/login.jsx +0 -99
- package/src/scripts/common/partials/metric.jsx +0 -73
- package/src/scripts/common/partials/spinner.jsx +0 -34
- package/src/scripts/common/partials/status.jsx +0 -96
- package/src/scripts/common/partials/timeout.jsx +0 -47
- package/src/scripts/common/partials/tooltip.jsx +0 -36
- package/src/scripts/components/__tests__/dropdown-button.spec.tsx +0 -49
- package/src/scripts/components/dropdown-button.tsx +0 -42
- package/src/scripts/components/panel-group.tsx +0 -24
- package/src/scripts/components/panel.tsx +0 -42
- package/src/scripts/datalad/__tests__/snapshotVersion.spec.js +0 -21
- package/src/scripts/datalad/comments/__tests__/comment-editor.spec.jsx +0 -19
- package/src/scripts/datalad/comments/block-style-controls.jsx +0 -46
- package/src/scripts/datalad/comments/comment-editor.jsx +0 -79
- package/src/scripts/datalad/comments/inline-style-controls.jsx +0 -34
- package/src/scripts/datalad/comments/style-button.jsx +0 -28
- package/src/scripts/datalad/dashboard/__tests__/__snapshots__/dashboard.spec.jsx.snap +0 -163
- package/src/scripts/datalad/dashboard/__tests__/dashboard.spec.jsx +0 -21
- package/src/scripts/datalad/dashboard/dashboard.jsx +0 -54
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-filter.spec.jsx.snap +0 -20
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-row-skeleton.spec.jsx.snap +0 -13
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-row.spec.jsx.snap +0 -65
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-sorter.spec.jsx.snap +0 -14
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-virtual-scroller.spec.jsx.snap +0 -17
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/uploaded.spec.jsx.snap +0 -27
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-filter.spec.jsx +0 -67
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-query.spec.jsx +0 -72
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-row-skeleton.spec.jsx +0 -9
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-row.spec.jsx +0 -53
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-sorter.spec.jsx +0 -69
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-virtual-scroller.spec.jsx +0 -65
- package/src/scripts/datalad/dashboard/datasets/__tests__/uploaded.spec.jsx +0 -17
- package/src/scripts/datalad/dashboard/datasets/dataset-filter.jsx +0 -78
- package/src/scripts/datalad/dashboard/datasets/dataset-query.jsx +0 -102
- package/src/scripts/datalad/dashboard/datasets/dataset-row-error-boundary.jsx +0 -52
- package/src/scripts/datalad/dashboard/datasets/dataset-row-skeleton.jsx +0 -10
- package/src/scripts/datalad/dashboard/datasets/dataset-row.jsx +0 -58
- package/src/scripts/datalad/dashboard/datasets/dataset-sorter.jsx +0 -148
- package/src/scripts/datalad/dashboard/datasets/dataset-statuses.jsx +0 -44
- package/src/scripts/datalad/dashboard/datasets/dataset-tab.jsx +0 -192
- package/src/scripts/datalad/dashboard/datasets/dataset-virtual-scroller.jsx +0 -126
- package/src/scripts/datalad/dashboard/datasets/row-height.jsx +0 -7
- package/src/scripts/datalad/dashboard/datasets/uploaded.jsx +0 -33
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/comments.spec.jsx.snap +0 -137
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/dataset-page.spec.jsx.snap +0 -69
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/dataset-query.spec.jsx.snap +0 -15
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/left-siderbar.spec.jsx.snap +0 -85
- package/src/scripts/datalad/dataset/__tests__/dataset-page.spec.jsx +0 -33
- package/src/scripts/datalad/dataset/__tests__/dataset-query.spec.jsx +0 -20
- package/src/scripts/datalad/dataset/__tests__/left-siderbar.spec.jsx +0 -106
- package/src/scripts/datalad/dataset/comment.jsx +0 -90
- package/src/scripts/datalad/dataset/comments.jsx +0 -83
- package/src/scripts/datalad/dataset/dataset-description.jsx +0 -111
- package/src/scripts/datalad/dataset/dataset-main.jsx +0 -29
- package/src/scripts/datalad/dataset/dataset-page.jsx +0 -63
- package/src/scripts/datalad/dataset/dataset-query.jsx +0 -192
- package/src/scripts/datalad/dataset/dataset.jsx +0 -22
- package/src/scripts/datalad/dataset/delete-page.tsx +0 -92
- package/src/scripts/datalad/dataset/left-sidebar.jsx +0 -109
- package/src/scripts/datalad/download/__tests__/__snapshots__/download-dataset.spec.jsx.snap +0 -7
- package/src/scripts/datalad/download/__tests__/__snapshots__/download-tool.spec.jsx.snap +0 -26
- package/src/scripts/datalad/download/__tests__/download-dataset.spec.jsx +0 -19
- package/src/scripts/datalad/download/__tests__/download-tool.spec.jsx +0 -19
- package/src/scripts/datalad/download/download-command-line.jsx +0 -43
- package/src/scripts/datalad/download/download-datalad.jsx +0 -58
- package/src/scripts/datalad/download/download-dataset.jsx +0 -61
- package/src/scripts/datalad/download/download-link.jsx +0 -41
- package/src/scripts/datalad/download/download-native.js +0 -118
- package/src/scripts/datalad/download/download-query.js +0 -22
- package/src/scripts/datalad/download/download-s3.jsx +0 -46
- package/src/scripts/datalad/download/download-tool.jsx +0 -44
- package/src/scripts/datalad/download/native-file-toast.jsx +0 -90
- package/src/scripts/datalad/download/shell-example.jsx +0 -9
- package/src/scripts/datalad/download/track-download.js +0 -15
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/cancel-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-analytics.spec.jsx.snap +0 -41
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-authors.spec.jsx.snap +0 -13
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-readme.spec.jsx.snap +0 -49
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-title.spec.jsx.snap +0 -7
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-tools.spec.jsx.snap +0 -346
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-uploaded.spec.jsx.snap +0 -7
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +0 -34
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-readme.spec.jsx.snap +0 -3
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/save-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/dataset-analytics.spec.jsx +0 -16
- package/src/scripts/datalad/fragments/__tests__/dataset-authors.spec.jsx +0 -22
- package/src/scripts/datalad/fragments/__tests__/dataset-prominent-links.spec.jsx +0 -32
- package/src/scripts/datalad/fragments/__tests__/dataset-readme.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/__tests__/dataset-summary.spec.jsx +0 -55
- package/src/scripts/datalad/fragments/__tests__/dataset-title.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/__tests__/dataset-tools.spec.jsx +0 -55
- package/src/scripts/datalad/fragments/__tests__/dataset-uploaded.spec.jsx +0 -16
- package/src/scripts/datalad/fragments/__tests__/edit-list.spec.jsx +0 -25
- package/src/scripts/datalad/fragments/__tests__/edit-readme.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/cancel-button.jsx +0 -24
- package/src/scripts/datalad/fragments/copyable-tooltip.jsx +0 -82
- package/src/scripts/datalad/fragments/dataset-analytics.jsx +0 -27
- package/src/scripts/datalad/fragments/dataset-authors.jsx +0 -16
- package/src/scripts/datalad/fragments/dataset-citation.jsx +0 -77
- package/src/scripts/datalad/fragments/dataset-files.jsx +0 -50
- package/src/scripts/datalad/fragments/dataset-git-access.jsx +0 -56
- package/src/scripts/datalad/fragments/dataset-git-hash.jsx +0 -27
- package/src/scripts/datalad/fragments/dataset-history.jsx +0 -95
- package/src/scripts/datalad/fragments/dataset-modified.jsx +0 -17
- package/src/scripts/datalad/fragments/dataset-prominent-links.jsx +0 -129
- package/src/scripts/datalad/fragments/dataset-readme.jsx +0 -42
- package/src/scripts/datalad/fragments/dataset-summary.jsx +0 -230
- package/src/scripts/datalad/fragments/dataset-title.jsx +0 -10
- package/src/scripts/datalad/fragments/dataset-tools.jsx +0 -190
- package/src/scripts/datalad/fragments/dataset-uploaded.jsx +0 -25
- package/src/scripts/datalad/fragments/edit-button.jsx +0 -24
- package/src/scripts/datalad/fragments/edit-description-field.jsx +0 -54
- package/src/scripts/datalad/fragments/edit-description-list.jsx +0 -49
- package/src/scripts/datalad/fragments/edit-list.jsx +0 -82
- package/src/scripts/datalad/fragments/edit-readme.jsx +0 -44
- package/src/scripts/datalad/fragments/incomplete-dataset.jsx +0 -23
- package/src/scripts/datalad/fragments/metadata-tool.jsx +0 -34
- package/src/scripts/datalad/fragments/number-input.tsx +0 -126
- package/src/scripts/datalad/fragments/save-button.jsx +0 -24
- package/src/scripts/datalad/fragments/select-input.tsx +0 -247
- package/src/scripts/datalad/fragments/share-dataset-button.jsx +0 -32
- package/src/scripts/datalad/fragments/text-array-input.tsx +0 -119
- package/src/scripts/datalad/fragments/text-input.tsx +0 -206
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/comment.spec.jsx.snap +0 -5
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +0 -181
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/manage-permissions.spec.jsx.snap +0 -361
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/subscribe-to-newsletter.spec.jsx.snap +0 -83
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/update-file.spec.jsx.snap +0 -25
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +0 -361
- package/src/scripts/datalad/mutations/__tests__/comment.spec.jsx +0 -154
- package/src/scripts/datalad/mutations/__tests__/manage-permissions.spec.jsx +0 -21
- package/src/scripts/datalad/mutations/__tests__/subscribe-to-newsletter.spec.jsx +0 -10
- package/src/scripts/datalad/mutations/__tests__/update-file.spec.jsx +0 -15
- package/src/scripts/datalad/mutations/__tests__/update-permissions.spec.jsx +0 -21
- package/src/scripts/datalad/mutations/add-metadata.jsx +0 -164
- package/src/scripts/datalad/mutations/comment.jsx +0 -164
- package/src/scripts/datalad/mutations/delete-dataset-form.jsx +0 -82
- package/src/scripts/datalad/mutations/description.jsx +0 -129
- package/src/scripts/datalad/mutations/flag-annex-object.jsx +0 -62
- package/src/scripts/datalad/mutations/metadata-form.jsx +0 -388
- package/src/scripts/datalad/mutations/readme.jsx +0 -53
- package/src/scripts/datalad/mutations/remove-annex-object.jsx +0 -71
- package/src/scripts/datalad/mutations/subscribe-to-newsletter.jsx +0 -26
- package/src/scripts/datalad/mutations/update-file.jsx +0 -51
- package/src/scripts/datalad/routes/__tests__/__snapshots__/manage-permissions.spec.jsx.snap +0 -159
- package/src/scripts/datalad/routes/__tests__/__snapshots__/snapshot.spec.jsx.snap +0 -31
- package/src/scripts/datalad/routes/__tests__/dataset-content.spec.jsx +0 -108
- package/src/scripts/datalad/routes/__tests__/file-display.spec.jsx +0 -22
- package/src/scripts/datalad/routes/__tests__/manage-permissions.spec.jsx +0 -101
- package/src/scripts/datalad/routes/__tests__/snapshot.spec.jsx +0 -49
- package/src/scripts/datalad/routes/admin-datalad.jsx +0 -45
- package/src/scripts/datalad/routes/admin-exports.jsx +0 -125
- package/src/scripts/datalad/routes/dataset-content.jsx +0 -198
- package/src/scripts/datalad/routes/dataset-routes.jsx +0 -162
- package/src/scripts/datalad/routes/file-display.jsx +0 -84
- package/src/scripts/datalad/routes/manage-permissions.jsx +0 -128
- package/src/scripts/datalad/routes/snapshot-content.jsx +0 -135
- package/src/scripts/datalad/routes/snapshot.jsx +0 -131
- package/src/scripts/datalad/snapshotVersion.js +0 -7
- package/src/scripts/datalad/validation/validation-panel.jsx +0 -48
- package/src/scripts/datalad/validation/validation-status.jsx +0 -120
- package/src/scripts/datalad/validation/validation.jsx +0 -40
- package/src/scripts/dataset/dataset.metrics.jsx +0 -61
- package/src/scripts/file-tree/__tests__/__snapshots__/file-tree-unloaded-directory.spec.jsx.snap +0 -26
- package/src/scripts/file-tree/__tests__/__snapshots__/file-tree.spec.jsx.snap +0 -18
- package/src/scripts/file-tree/__tests__/__snapshots__/file.spec.jsx.snap +0 -81
- package/src/scripts/file-tree/__tests__/file-tree-loading.spec.jsx +0 -18
- package/src/scripts/file-tree/__tests__/file-tree-unloaded-directory.spec.jsx +0 -74
- package/src/scripts/file-tree/__tests__/file-tree.spec.jsx +0 -94
- package/src/scripts/file-tree/__tests__/file-viewer-type.spec.jsx +0 -15
- package/src/scripts/file-tree/__tests__/file.spec.jsx +0 -44
- package/src/scripts/file-tree/__tests__/flat-to-tree.spec.js +0 -55
- package/src/scripts/file-tree/file-tree-loading.jsx +0 -64
- package/src/scripts/file-tree/file-tree-unloaded-directory.jsx +0 -108
- package/src/scripts/file-tree/file-tree.jsx +0 -133
- package/src/scripts/file-tree/file-view.jsx +0 -31
- package/src/scripts/file-tree/file-viewer-type.jsx +0 -45
- package/src/scripts/file-tree/file.jsx +0 -123
- package/src/scripts/file-tree/files.jsx +0 -126
- package/src/scripts/file-tree/flat-to-tree.js +0 -49
- package/src/scripts/file-tree/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -51
- package/src/scripts/file-tree/viewers/__tests__/file-viewer-json.spec.jsx +0 -15
- package/src/scripts/file-tree/viewers/__tests__/parse-tabular.spec.js +0 -24
- package/src/scripts/file-tree/viewers/file-viewer-csv.jsx +0 -16
- package/src/scripts/file-tree/viewers/file-viewer-html.jsx +0 -20
- package/src/scripts/file-tree/viewers/file-viewer-json.jsx +0 -50
- package/src/scripts/file-tree/viewers/file-viewer-nifti.jsx +0 -11
- package/src/scripts/file-tree/viewers/file-viewer-table.jsx +0 -34
- package/src/scripts/file-tree/viewers/file-viewer-text.jsx +0 -13
- package/src/scripts/file-tree/viewers/file-viewer-tsv.jsx +0 -16
- package/src/scripts/file-tree/viewers/parse-tabular.js +0 -18
- package/src/scripts/front-page/__tests__/__snapshots__/email-subscription-box.spec.jsx.snap +0 -190
- package/src/scripts/front-page/__tests__/__snapshots__/front-page-stats.spec.jsx.snap +0 -29
- package/src/scripts/front-page/__tests__/__snapshots__/front-page-top-datasets.spec.jsx.snap +0 -464
- package/src/scripts/front-page/__tests__/dataset-count.spec.jsx +0 -33
- package/src/scripts/front-page/__tests__/email-subscription-box.spec.jsx +0 -57
- package/src/scripts/front-page/__tests__/front-page-stats.spec.jsx +0 -10
- package/src/scripts/front-page/__tests__/front-page-top-datasets.spec.jsx +0 -27
- package/src/scripts/front-page/__tests__/participant-count.spec.jsx +0 -31
- package/src/scripts/front-page/dataset-count.jsx +0 -29
- package/src/scripts/front-page/email-subscription-box.jsx +0 -131
- package/src/scripts/front-page/front-page-additional-info.jsx +0 -15
- package/src/scripts/front-page/front-page-collaborators.jsx +0 -117
- package/src/scripts/front-page/front-page-stats.jsx +0 -71
- package/src/scripts/front-page/front-page-support.jsx +0 -30
- package/src/scripts/front-page/front-page-tabs.jsx +0 -166
- package/src/scripts/front-page/front-page-top-datasets.jsx +0 -203
- package/src/scripts/front-page/front-page.jsx +0 -95
- package/src/scripts/front-page/participant-count.jsx +0 -25
- package/src/scripts/hooks/use-measure.js +0 -15
- package/src/scripts/hooks/use-previous.js +0 -7
- package/src/scripts/nav/assets/brand_mark.png +0 -0
- package/src/scripts/nav/assets/favicon-upload.png +0 -0
- package/src/scripts/nav/assets/logo_app.png +0 -0
- package/src/scripts/nav/navbar.jsx +0 -144
- package/src/scripts/nav/navbar.navmenu.jsx +0 -106
- package/src/scripts/nav/navbar.usermenu.jsx +0 -52
- package/src/scripts/pages/citation-page.jsx +0 -43
- package/src/scripts/pet/__tests__/__snapshots__/dummy.spec.jsx.snap +0 -70
- package/src/scripts/pet/__tests__/dummy.spec.jsx +0 -10
- package/src/scripts/pet/dummy.jsx +0 -61
- package/src/scripts/refactor_2021/dataset/dataset-pre-refactor-container.tsx +0 -12
- package/src/scripts/routes.tsx +0 -36
- package/src/scripts/search/search-input.tsx +0 -42
- package/src/scripts/search/search-results.tsx +0 -114
- package/src/scripts/styles/capitalized.jsx +0 -6
- package/src/scripts/styles/uppercase.jsx +0 -6
- package/src/scripts/uploader/__tests__/add-path-to-files.spec.js +0 -29
- package/src/scripts/uploader/__tests__/file-upload.spec.js +0 -116
- package/src/scripts/uploader/__tests__/upload-disclaimer.spec.jsx +0 -67
- package/src/scripts/uploader/__tests__/upload-mutation.spec.js +0 -57
- package/src/scripts/uploader/__tests__/uploader.spec.js +0 -31
- package/src/scripts/uploader/add-path-to-files.js +0 -19
- package/src/scripts/uploader/file-upload.js +0 -88
- package/src/scripts/uploader/upload-button.jsx +0 -18
- package/src/scripts/uploader/upload-disclaimer.jsx +0 -92
- package/src/scripts/uploader/upload-file-status.jsx +0 -20
- package/src/scripts/uploader/upload-issues.jsx +0 -131
- package/src/scripts/uploader/upload-metadata.jsx +0 -59
- package/src/scripts/uploader/upload-mutation.js +0 -111
- package/src/scripts/uploader/upload-progress-button.jsx +0 -20
- package/src/scripts/uploader/upload-progress-class.js +0 -36
- package/src/scripts/uploader/upload-progress.jsx +0 -15
- package/src/scripts/uploader/upload-rename.jsx +0 -33
- package/src/scripts/uploader/upload-resume.jsx +0 -35
- package/src/scripts/uploader/upload-select.jsx +0 -29
- package/src/scripts/uploader/upload-status.jsx +0 -23
- package/src/scripts/uploader/upload-step.jsx +0 -48
- package/src/scripts/uploader/uploader-context.js +0 -6
- package/src/scripts/uploader/uploader-location.js +0 -5
- package/src/scripts/uploader/uploader-modal.jsx +0 -27
- package/src/scripts/uploader/uploader-setup-routes.jsx +0 -52
- package/src/scripts/uploader/uploader-status-routes.jsx +0 -30
- package/src/scripts/uploader/uploader-view.jsx +0 -45
- package/src/scripts/uploader/uploader.jsx +0 -388
- package/src/scripts/user/__mocks__/user.store.js +0 -1
- package/src/scripts/user/api.jsx +0 -132
- package/src/scripts/user/avatar.jsx +0 -40
- package/src/scripts/utils/crn.js +0 -15
- package/src/scripts/utils/request.js +0 -107
- package/src/scripts/utils/user.js +0 -18
- package/src/scripts/validation/validation-results.issues.issue.jsx +0 -90
- package/src/scripts/validation/validation-results.issues.jsx +0 -79
- package/src/scripts/validation/validation-results.jsx +0 -96
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`EditList component renders with default props 1`] = `
|
|
4
|
-
<EditList>
|
|
5
|
-
<div
|
|
6
|
-
className="input-group"
|
|
7
|
-
>
|
|
8
|
-
<input
|
|
9
|
-
className="form-control"
|
|
10
|
-
onChange={[Function]}
|
|
11
|
-
type="text"
|
|
12
|
-
value=""
|
|
13
|
-
/>
|
|
14
|
-
<span
|
|
15
|
-
className="input-group-btn"
|
|
16
|
-
>
|
|
17
|
-
<Styled(button)
|
|
18
|
-
className="btn btn-default"
|
|
19
|
-
onClick={[Function]}
|
|
20
|
-
type="button"
|
|
21
|
-
>
|
|
22
|
-
<button
|
|
23
|
-
className="btn btn-default css-18r3ojf"
|
|
24
|
-
onClick={[Function]}
|
|
25
|
-
type="button"
|
|
26
|
-
>
|
|
27
|
-
Add
|
|
28
|
-
</button>
|
|
29
|
-
</Styled(button)>
|
|
30
|
-
</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div />
|
|
33
|
-
</EditList>
|
|
34
|
-
`;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`SaveButton component renders with default props 1`] = `
|
|
4
|
-
<WarnButton
|
|
5
|
-
action={[Function]}
|
|
6
|
-
cancel={
|
|
7
|
-
<i
|
|
8
|
-
className="fa fa-times"
|
|
9
|
-
/>
|
|
10
|
-
}
|
|
11
|
-
confirm={
|
|
12
|
-
<i
|
|
13
|
-
className="fa fa-check"
|
|
14
|
-
/>
|
|
15
|
-
}
|
|
16
|
-
icon="fa-edit"
|
|
17
|
-
message="Edit"
|
|
18
|
-
tooltip={null}
|
|
19
|
-
warn={false}
|
|
20
|
-
/>
|
|
21
|
-
`;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetAnalytics from '../dataset-analytics.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetAnalytics component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
const wrapper = shallow(<DatasetAnalytics downloads={5} views={50} />)
|
|
8
|
-
expect(wrapper).toMatchSnapshot()
|
|
9
|
-
})
|
|
10
|
-
it('renders for snapshots', () => {
|
|
11
|
-
const wrapper = shallow(
|
|
12
|
-
<DatasetAnalytics downloads={5} views={50} snapshot />,
|
|
13
|
-
)
|
|
14
|
-
expect(wrapper).toMatchSnapshot()
|
|
15
|
-
})
|
|
16
|
-
})
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetAuthors from '../dataset-authors.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetAuthors component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
const wrapper = shallow(<DatasetAuthors authors={['One', 'Two']} />)
|
|
8
|
-
expect(wrapper).toMatchSnapshot()
|
|
9
|
-
})
|
|
10
|
-
it('renders when authors is null', () => {
|
|
11
|
-
const wrapper = shallow(<DatasetAuthors />)
|
|
12
|
-
expect(wrapper).toMatchSnapshot()
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
it('renders null when authors is not an array', () => {
|
|
16
|
-
// Catch the expected PropTypes error
|
|
17
|
-
// eslint-disable-next-line no-console
|
|
18
|
-
console.error = jest.fn()
|
|
19
|
-
const wrapper = shallow(<DatasetAuthors authors={''} />)
|
|
20
|
-
expect(wrapper.getElement()).toBe(null)
|
|
21
|
-
})
|
|
22
|
-
})
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { StaticRouter as Router } from 'react-router-dom'
|
|
3
|
-
import { render, screen } from '@testing-library/react'
|
|
4
|
-
import ProminentLinks from '../dataset-prominent-links.jsx'
|
|
5
|
-
import '@testing-library/jest-dom/extend-expect'
|
|
6
|
-
|
|
7
|
-
describe('DatasetAuthors component', () => {
|
|
8
|
-
const minDataset = {
|
|
9
|
-
id: 'fakeid',
|
|
10
|
-
onBrainlife: null,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
it('does render brainlife button when onBrainlife', () => {
|
|
14
|
-
minDataset.onBrainlife = true
|
|
15
|
-
const wrapper = render(
|
|
16
|
-
<Router initialEntries={['/']}>
|
|
17
|
-
<ProminentLinks dataset={minDataset} />
|
|
18
|
-
</Router>,
|
|
19
|
-
)
|
|
20
|
-
expect(screen.getByText('Analyze on brainlife.io')).toBeInTheDocument()
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('does not render brainlife button when not onBrainlife', () => {
|
|
24
|
-
minDataset.onBrainlife = false
|
|
25
|
-
const wrapper = render(
|
|
26
|
-
<Router initialEntries={['/']}>
|
|
27
|
-
<ProminentLinks dataset={minDataset} />
|
|
28
|
-
</Router>,
|
|
29
|
-
)
|
|
30
|
-
expect(screen.queryByText('Analyze on brainlife.io')).toBeNull()
|
|
31
|
-
})
|
|
32
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetReadme from '../dataset-readme.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetReadme component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
const wrapper = shallow(<DatasetReadme content="markdown goes here" />)
|
|
8
|
-
expect(wrapper).toMatchSnapshot()
|
|
9
|
-
})
|
|
10
|
-
})
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import Summary from '../dataset-summary.jsx'
|
|
4
|
-
|
|
5
|
-
const mockSummary = {
|
|
6
|
-
id: 'f187e25d26ed24ab91842499e06c04ba5a35ccec',
|
|
7
|
-
modalities: ['T1w', 'bold'],
|
|
8
|
-
sessions: ['meg', 'mri'],
|
|
9
|
-
subjects: ['01', '02', '03', '04', '05'],
|
|
10
|
-
tasks: ['one-back task', 'balloon analog risk task'],
|
|
11
|
-
size: 3364126408,
|
|
12
|
-
totalFiles: 1359,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
describe('Dataset/Summary', () => {
|
|
16
|
-
it('displays accurate file count', () => {
|
|
17
|
-
const wrapper = shallow(<Summary summary={mockSummary} />)
|
|
18
|
-
expect(
|
|
19
|
-
wrapper.contains(
|
|
20
|
-
<span>
|
|
21
|
-
<strong> Files: </strong>
|
|
22
|
-
{mockSummary.totalFiles}
|
|
23
|
-
</span>,
|
|
24
|
-
),
|
|
25
|
-
).toBe(true)
|
|
26
|
-
})
|
|
27
|
-
it('displays subject count', () => {
|
|
28
|
-
const wrapper = shallow(<Summary summary={mockSummary} />)
|
|
29
|
-
expect(
|
|
30
|
-
wrapper.contains(
|
|
31
|
-
<span>
|
|
32
|
-
<strong> Subjects: </strong>
|
|
33
|
-
{mockSummary.subjects.length}
|
|
34
|
-
</span>,
|
|
35
|
-
),
|
|
36
|
-
).toBe(true)
|
|
37
|
-
})
|
|
38
|
-
it('lists all tasks', () => {
|
|
39
|
-
const wrapper = shallow(<Summary summary={mockSummary} />)
|
|
40
|
-
expect(wrapper.contains(mockSummary.tasks.join(', '))).toBe(true)
|
|
41
|
-
})
|
|
42
|
-
it('lists all modalities', () => {
|
|
43
|
-
const wrapper = shallow(<Summary summary={mockSummary} />)
|
|
44
|
-
expect(wrapper.contains(mockSummary.modalities.join(', '))).toBe(true)
|
|
45
|
-
})
|
|
46
|
-
it('minimal version renders', () => {
|
|
47
|
-
const wrapper = shallow(<Summary summary={mockSummary} minimal={true} />)
|
|
48
|
-
expect(
|
|
49
|
-
wrapper
|
|
50
|
-
.find('div.minimal-summary')
|
|
51
|
-
.children()
|
|
52
|
-
.find('div').length,
|
|
53
|
-
).toBe(6)
|
|
54
|
-
})
|
|
55
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetTitle from '../dataset-title.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetTitle component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
const wrapper = shallow(<DatasetTitle title="Test Dataset" />)
|
|
8
|
-
expect(wrapper).toMatchSnapshot()
|
|
9
|
-
})
|
|
10
|
-
})
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { MemoryRouter } from 'react-router-dom'
|
|
3
|
-
import { render } from '@testing-library/react'
|
|
4
|
-
import DatasetTools from '../dataset-tools.jsx'
|
|
5
|
-
|
|
6
|
-
describe('DatasetTools component', () => {
|
|
7
|
-
it('renders tools with common props', () => {
|
|
8
|
-
const wrapper = render(
|
|
9
|
-
<MemoryRouter initialEntries={[`/datasets/ds000113`]}>
|
|
10
|
-
<DatasetTools
|
|
11
|
-
dataset={{
|
|
12
|
-
id: 'ds001',
|
|
13
|
-
public: false,
|
|
14
|
-
following: true,
|
|
15
|
-
starred: false,
|
|
16
|
-
snapshots: [],
|
|
17
|
-
}}
|
|
18
|
-
/>
|
|
19
|
-
</MemoryRouter>,
|
|
20
|
-
)
|
|
21
|
-
expect(wrapper).toMatchSnapshot()
|
|
22
|
-
})
|
|
23
|
-
it('renders tools for public datasets', () => {
|
|
24
|
-
const wrapper = render(
|
|
25
|
-
<MemoryRouter initialEntries={[`/datasets/ds000113`]}>
|
|
26
|
-
<DatasetTools
|
|
27
|
-
dataset={{
|
|
28
|
-
id: 'ds001',
|
|
29
|
-
public: true,
|
|
30
|
-
following: true,
|
|
31
|
-
starred: false,
|
|
32
|
-
snapshots: [],
|
|
33
|
-
}}
|
|
34
|
-
/>
|
|
35
|
-
</MemoryRouter>,
|
|
36
|
-
)
|
|
37
|
-
expect(wrapper).toMatchSnapshot()
|
|
38
|
-
})
|
|
39
|
-
it('renders tools for public snapshots', () => {
|
|
40
|
-
const wrapper = render(
|
|
41
|
-
<MemoryRouter initialEntries={[`/datasets/ds000113/versions/1.3.0`]}>
|
|
42
|
-
<DatasetTools
|
|
43
|
-
dataset={{
|
|
44
|
-
id: 'ds001',
|
|
45
|
-
public: true,
|
|
46
|
-
following: true,
|
|
47
|
-
starred: false,
|
|
48
|
-
snapshots: [{ id: 'ds000113:1.3.0' }],
|
|
49
|
-
}}
|
|
50
|
-
/>
|
|
51
|
-
</MemoryRouter>,
|
|
52
|
-
)
|
|
53
|
-
expect(wrapper).toMatchSnapshot()
|
|
54
|
-
})
|
|
55
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetUploaded from '../dataset-uploaded.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetUploaded component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
const wrapper = shallow(
|
|
8
|
-
<DatasetUploaded
|
|
9
|
-
uploader={{ name: 'Tester' }}
|
|
10
|
-
created="2016-11-06"
|
|
11
|
-
testDifference="awhile ago"
|
|
12
|
-
/>,
|
|
13
|
-
)
|
|
14
|
-
expect(wrapper).toMatchSnapshot()
|
|
15
|
-
})
|
|
16
|
-
})
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { mount } from 'enzyme'
|
|
3
|
-
import EditList from '../edit-list.jsx'
|
|
4
|
-
|
|
5
|
-
// Mount is used because enzyme does not yet support hooks
|
|
6
|
-
describe('EditList component', () => {
|
|
7
|
-
it('renders with default props', () => {
|
|
8
|
-
const wrapper = mount(<EditList />)
|
|
9
|
-
expect(wrapper).toMatchSnapshot()
|
|
10
|
-
})
|
|
11
|
-
it('calls setElements when an item is added', () => {
|
|
12
|
-
const setElements = jest.fn()
|
|
13
|
-
const wrapper = mount(<EditList setElements={setElements} />)
|
|
14
|
-
wrapper.find('button[children="Add"]').simulate('click')
|
|
15
|
-
// Added an empty string to an empty list
|
|
16
|
-
expect(setElements).toHaveBeenCalledWith([''])
|
|
17
|
-
})
|
|
18
|
-
it('renders any elements', () => {
|
|
19
|
-
const wrapper = mount(<EditList elements={['One', 'Two']} />)
|
|
20
|
-
const values = wrapper.find('span.input-group-addon')
|
|
21
|
-
expect(values).toHaveLength(2)
|
|
22
|
-
expect(values.at(0).text()).toBe('One')
|
|
23
|
-
expect(values.at(1).text()).toBe('Two')
|
|
24
|
-
})
|
|
25
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { mount } from 'enzyme'
|
|
3
|
-
import EditReadme from '../edit-readme.jsx'
|
|
4
|
-
|
|
5
|
-
describe('EditReadme component', () => {
|
|
6
|
-
it('renders with default props', () => {
|
|
7
|
-
const wrapper = mount(<EditReadme />)
|
|
8
|
-
expect(wrapper).toMatchSnapshot()
|
|
9
|
-
})
|
|
10
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import WarnButton from '../../common/forms/warn-button.jsx'
|
|
3
|
-
import PropTypes from 'prop-types'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* An edit button, calls action when clicked
|
|
7
|
-
*/
|
|
8
|
-
const CancelButton = ({ action }) => (
|
|
9
|
-
<WarnButton
|
|
10
|
-
message="Cancel"
|
|
11
|
-
icon="fa-close"
|
|
12
|
-
warn={false}
|
|
13
|
-
action={cb => {
|
|
14
|
-
action()
|
|
15
|
-
cb()
|
|
16
|
-
}}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
CancelButton.propTypes = {
|
|
21
|
-
action: PropTypes.func,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default CancelButton
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import styled from '@emotion/styled'
|
|
4
|
-
|
|
5
|
-
export const TooltipSpan = styled.span`
|
|
6
|
-
&::before {
|
|
7
|
-
content: attr(data-tip);
|
|
8
|
-
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 20px;
|
|
11
|
-
z-index: 9001;
|
|
12
|
-
height: 24px;
|
|
13
|
-
border: 1px solid #ddd;
|
|
14
|
-
padding: 0px 10px;
|
|
15
|
-
|
|
16
|
-
color: #565656;
|
|
17
|
-
font-size: 12px;
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
line-height: 24px;
|
|
20
|
-
|
|
21
|
-
opacity: 0;
|
|
22
|
-
right: -10000px;
|
|
23
|
-
box-shadow: 0 0 0 #ddd;
|
|
24
|
-
transition: opacity 0.4s ease-out, box-shadow 0.4s ease-out;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:hover::before {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
right: 15px;
|
|
30
|
-
box-shadow: 0 2px 5px #ddd;
|
|
31
|
-
background-color: white;
|
|
32
|
-
}
|
|
33
|
-
`
|
|
34
|
-
const CopyButton = styled('i')({
|
|
35
|
-
cursor: 'copy',
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
function fallbackCopyTextToClipboard(text) {
|
|
39
|
-
const textArea = document.createElement('textarea')
|
|
40
|
-
textArea.value = text
|
|
41
|
-
textArea.style.position = 'fixed'
|
|
42
|
-
document.body.appendChild(textArea)
|
|
43
|
-
textArea.focus()
|
|
44
|
-
textArea.select()
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
const success = document.execCommand('copy')
|
|
48
|
-
console.log(
|
|
49
|
-
`Copying text command was ${success ? 'successful!' : 'unsuccessful.'}`,
|
|
50
|
-
)
|
|
51
|
-
} catch (err) {
|
|
52
|
-
console.error('Could not copy text: ', err)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
document.body.removeChild(textArea)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function copyTextToClipboard(text) {
|
|
59
|
-
if (!navigator.clipboard) fallbackCopyTextToClipboard(text)
|
|
60
|
-
else
|
|
61
|
-
navigator.clipboard.writeText(text).then(
|
|
62
|
-
() => console.log('Copying to clipboard was successful!'),
|
|
63
|
-
err => console.error('Could not copy text: ', err),
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const Tooltip = ({ text, tip }) => (
|
|
68
|
-
<TooltipSpan data-tip={tip}>
|
|
69
|
-
{text}
|
|
70
|
-
<CopyButton
|
|
71
|
-
className="fa fa-copy"
|
|
72
|
-
onClick={() => copyTextToClipboard(tip)}
|
|
73
|
-
/>
|
|
74
|
-
</TooltipSpan>
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
Tooltip.propTypes = {
|
|
78
|
-
text: PropTypes.string,
|
|
79
|
-
tip: PropTypes.string,
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export default Tooltip
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import Metric from '../../common/partials/metric.jsx'
|
|
4
|
-
import styled from '@emotion/styled'
|
|
5
|
-
|
|
6
|
-
const MetricPadding = styled.span`
|
|
7
|
-
padding: 4px;
|
|
8
|
-
`
|
|
9
|
-
|
|
10
|
-
const DatasetAnalytics = ({ downloads, views, snapshot }) => (
|
|
11
|
-
<>
|
|
12
|
-
<MetricPadding>
|
|
13
|
-
<Metric type="downloads" value={downloads} display snapshot={snapshot} />
|
|
14
|
-
</MetricPadding>
|
|
15
|
-
<MetricPadding>
|
|
16
|
-
<Metric type="views" value={views} display snapshot={snapshot} />
|
|
17
|
-
</MetricPadding>
|
|
18
|
-
</>
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
DatasetAnalytics.propTypes = {
|
|
22
|
-
downloads: PropTypes.number,
|
|
23
|
-
views: PropTypes.number,
|
|
24
|
-
snapshot: PropTypes.bool,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default DatasetAnalytics
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
|
|
4
|
-
const DatasetAuthors = ({ authors = [] }) => {
|
|
5
|
-
if (Array.isArray(authors)) {
|
|
6
|
-
return <h6>{`authored by ${authors.join(', ')}`}</h6>
|
|
7
|
-
} else {
|
|
8
|
-
return null
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
DatasetAuthors.propTypes = {
|
|
13
|
-
authors: PropTypes.array,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default DatasetAuthors
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import getYear from 'date-fns/getYear'
|
|
4
|
-
import parseISO from 'date-fns/parseISO'
|
|
5
|
-
import { CopyToClipboard } from 'react-copy-to-clipboard'
|
|
6
|
-
|
|
7
|
-
export const formatCitation = (snapshot, style) => {
|
|
8
|
-
const year = getYear(parseISO(snapshot.created))
|
|
9
|
-
const authors = snapshot.description.Authors
|
|
10
|
-
? snapshot.description.Authors.join(' and ')
|
|
11
|
-
: 'NO AUTHORS FOUND'
|
|
12
|
-
if (style === 'Text') {
|
|
13
|
-
return `${authors} (${year}). ${snapshot.description.Name}. OpenNeuro. [Dataset] doi: ${snapshot.description.DatasetDOI}`
|
|
14
|
-
} else if (style === 'BibTeX') {
|
|
15
|
-
return `@dataset{${snapshot.id},
|
|
16
|
-
author = {${authors}},
|
|
17
|
-
title = {"${snapshot.description.Name}"},
|
|
18
|
-
year = {${year}},
|
|
19
|
-
doi = {${snapshot.description.DatasetDOI}},
|
|
20
|
-
publisher = {OpenNeuro}
|
|
21
|
-
}`
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const DatasetCitation = ({ snapshot }) => {
|
|
26
|
-
const [style, setStyle] = useState('Text')
|
|
27
|
-
const [copied, setCopied] = useState(false)
|
|
28
|
-
const copiedTimeout = () => {
|
|
29
|
-
setCopied(true)
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
setCopied(false)
|
|
32
|
-
}, 3000)
|
|
33
|
-
}
|
|
34
|
-
const citation = formatCitation(snapshot, style)
|
|
35
|
-
return (
|
|
36
|
-
<>
|
|
37
|
-
<div className="description-item">
|
|
38
|
-
<button
|
|
39
|
-
onClick={() => {
|
|
40
|
-
setStyle('Text')
|
|
41
|
-
setCopied(false)
|
|
42
|
-
}}
|
|
43
|
-
className={style === 'Text' ? 'btn active' : 'btn'}>
|
|
44
|
-
Text
|
|
45
|
-
</button>
|
|
46
|
-
<button
|
|
47
|
-
onClick={() => {
|
|
48
|
-
setStyle('BibTeX')
|
|
49
|
-
setCopied(false)
|
|
50
|
-
}}
|
|
51
|
-
className={style === 'BibTeX' ? 'btn active' : 'btn'}>
|
|
52
|
-
BibTeX
|
|
53
|
-
</button>
|
|
54
|
-
<CopyToClipboard
|
|
55
|
-
text={citation}
|
|
56
|
-
onCopy={() => copiedTimeout()}
|
|
57
|
-
className="btn">
|
|
58
|
-
<span className="copy-key">
|
|
59
|
-
<i className="fa fa-link" aria-hidden="true" />{' '}
|
|
60
|
-
{copied ? <span>Copied to clipboard</span> : <span>Copy</span>}
|
|
61
|
-
</span>
|
|
62
|
-
</CopyToClipboard>
|
|
63
|
-
<div className="col-md-12">
|
|
64
|
-
<div className="row">
|
|
65
|
-
<h5>{style === 'BibTeX' ? <pre>{citation}</pre> : citation}</h5>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
DatasetCitation.propTypes = {
|
|
74
|
-
snapshot: PropTypes.object,
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export default DatasetCitation
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import Files from '../../file-tree/files.jsx'
|
|
4
|
-
import ErrorBoundary from '../../errors/errorBoundary.jsx'
|
|
5
|
-
|
|
6
|
-
const DatasetFiles = ({
|
|
7
|
-
datasetId,
|
|
8
|
-
snapshotTag = null,
|
|
9
|
-
datasetName,
|
|
10
|
-
files,
|
|
11
|
-
editMode,
|
|
12
|
-
datasetPermissions,
|
|
13
|
-
}) => (
|
|
14
|
-
<div className="dataset-files">
|
|
15
|
-
<div className="col-xs-12">
|
|
16
|
-
<div className="file-structure fade-in panel-group">
|
|
17
|
-
<div className="panel panel-default">
|
|
18
|
-
<div className="panel-heading">
|
|
19
|
-
<h3 className="panel-title">Dataset File Tree</h3>
|
|
20
|
-
</div>
|
|
21
|
-
<div className="panel-collapse" aria-expanded="false">
|
|
22
|
-
<div className="panel-body">
|
|
23
|
-
<ErrorBoundary subject={'error in dataset filetree'}>
|
|
24
|
-
<Files
|
|
25
|
-
datasetId={datasetId}
|
|
26
|
-
snapshotTag={snapshotTag}
|
|
27
|
-
datasetName={datasetName}
|
|
28
|
-
files={files}
|
|
29
|
-
editMode={editMode}
|
|
30
|
-
datasetPermissions={datasetPermissions}
|
|
31
|
-
/>
|
|
32
|
-
</ErrorBoundary>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
DatasetFiles.propTypes = {
|
|
42
|
-
datasetId: PropTypes.string,
|
|
43
|
-
snapshotTag: PropTypes.string,
|
|
44
|
-
datasetName: PropTypes.string,
|
|
45
|
-
files: PropTypes.array,
|
|
46
|
-
editMode: PropTypes.bool,
|
|
47
|
-
datasetPermissions: PropTypes.object,
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default DatasetFiles
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import styled from '@emotion/styled'
|
|
4
|
-
import { config } from '../../config'
|
|
5
|
-
import Tooltip from '../../common/partials/tooltip.jsx'
|
|
6
|
-
|
|
7
|
-
function copyToClipboard(text) {
|
|
8
|
-
navigator.clipboard.writeText(text)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const GitAccessWrap = styled.div({
|
|
12
|
-
display: 'flex',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
borderRadius: '0',
|
|
15
|
-
marginBottom: '10px',
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const GitAccessUrl = styled.span({
|
|
19
|
-
flexGrow: 1,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const DocumentationLink = styled.a({
|
|
23
|
-
textAlign: 'right',
|
|
24
|
-
padding: '5px',
|
|
25
|
-
textTransform: 'capitalize',
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const DatasetGitAccess = ({ datasetId, worker }) => {
|
|
29
|
-
const workerId = worker.split('-').pop()
|
|
30
|
-
const url = `${config.url}/git/${workerId}/${datasetId}`
|
|
31
|
-
return (
|
|
32
|
-
<div className="col-xs-12">
|
|
33
|
-
<h3 className="metaheader">DataLad/Git URL</h3>
|
|
34
|
-
<GitAccessWrap className="status panel panel-default">
|
|
35
|
-
<Tooltip tooltip="Copy To Clipboard">
|
|
36
|
-
<button
|
|
37
|
-
className="warning btn-warn-component"
|
|
38
|
-
onClick={() => copyToClipboard(url)}>
|
|
39
|
-
<i className="fas fa-clipboard" aria-hidden="true"></i>
|
|
40
|
-
</button>
|
|
41
|
-
</Tooltip>{' '}
|
|
42
|
-
<GitAccessUrl>{url}</GitAccessUrl>
|
|
43
|
-
<DocumentationLink href="https://docs.openneuro.org/git">
|
|
44
|
-
View Documentation
|
|
45
|
-
</DocumentationLink>
|
|
46
|
-
</GitAccessWrap>
|
|
47
|
-
</div>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
DatasetGitAccess.propTypes = {
|
|
52
|
-
datasetId: PropTypes.string,
|
|
53
|
-
worker: PropTypes.string,
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default DatasetGitAccess
|