@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,192 +0,0 @@
|
|
|
1
|
-
import { apm } from '../../../apm'
|
|
2
|
-
import React, { useEffect } from 'react'
|
|
3
|
-
import PropTypes from 'prop-types'
|
|
4
|
-
import Helmet from 'react-helmet'
|
|
5
|
-
import { pageTitle } from '../../../resources/strings'
|
|
6
|
-
import Spinner from '../../../common/partials/spinner.jsx'
|
|
7
|
-
import SearchInput from '../../../search/search-input'
|
|
8
|
-
import DatasetVirtualScroller from './dataset-virtual-scroller.jsx'
|
|
9
|
-
import DatasetSorter from './dataset-sorter.jsx'
|
|
10
|
-
import DatasetFilter from './dataset-filter.jsx'
|
|
11
|
-
import ErrorBoundary from '../../../errors/errorBoundary.jsx'
|
|
12
|
-
import styled from '@emotion/styled'
|
|
13
|
-
import { Media } from '../../../styles/media'
|
|
14
|
-
|
|
15
|
-
const FullHeightFlexDiv = styled.div`
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
flex: 0 1 auto;
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
const MobileLabel = styled.label`
|
|
22
|
-
text-transform: uppercase;
|
|
23
|
-
font-size: 10px;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
color: #777;
|
|
26
|
-
margin: 10px 10px 7px 10px;
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
const title = (isPublic, isSaved) =>
|
|
30
|
-
isPublic
|
|
31
|
-
? 'Public Dataset Results'
|
|
32
|
-
: isSaved
|
|
33
|
-
? 'Saved Datasets'
|
|
34
|
-
: 'My Datasets'
|
|
35
|
-
|
|
36
|
-
const DatasetTabLoaded = ({ datasets, loadMoreRows, publicDashboard }) => {
|
|
37
|
-
if (datasets && datasets.edges && datasets.edges.length) {
|
|
38
|
-
return (
|
|
39
|
-
<DatasetVirtualScroller
|
|
40
|
-
datasets={datasets.edges}
|
|
41
|
-
pageInfo={datasets.pageInfo}
|
|
42
|
-
loadMoreRows={loadMoreRows}
|
|
43
|
-
publicDashboard={publicDashboard}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
} else {
|
|
47
|
-
return (
|
|
48
|
-
<div className="panel panel-heading text-center">
|
|
49
|
-
<h4>Zero datasets found</h4>
|
|
50
|
-
No datasets match your current filters.
|
|
51
|
-
</div>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const DatasetTabSortWrap = ({ children }) => (
|
|
57
|
-
<>
|
|
58
|
-
<Media at="small">
|
|
59
|
-
<div>{children}</div>
|
|
60
|
-
</Media>
|
|
61
|
-
<Media greaterThanOrEqual="medium">
|
|
62
|
-
<div className="filters-sort-wrap clearfix">{children}</div>
|
|
63
|
-
</Media>
|
|
64
|
-
</>
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
DatasetTabSortWrap.propTypes = {
|
|
68
|
-
children: PropTypes.element.isRequired,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const DatasetTabSortClearfix = ({ children }) => (
|
|
72
|
-
<>
|
|
73
|
-
<Media at="small">
|
|
74
|
-
<div>{children}</div>
|
|
75
|
-
</Media>
|
|
76
|
-
<Media greaterThanOrEqual="medium">
|
|
77
|
-
<div className="sort clearfix">{children}</div>
|
|
78
|
-
</Media>
|
|
79
|
-
</>
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
DatasetTabSortClearfix.propTypes = {
|
|
83
|
-
children: PropTypes.element.isRequired,
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const DatasetTab = ({
|
|
87
|
-
data,
|
|
88
|
-
loadMoreRows,
|
|
89
|
-
refetch,
|
|
90
|
-
queryVariables,
|
|
91
|
-
loading,
|
|
92
|
-
error,
|
|
93
|
-
publicDashboard,
|
|
94
|
-
savedDashboard,
|
|
95
|
-
}) => {
|
|
96
|
-
useEffect(() => {
|
|
97
|
-
if (error) {
|
|
98
|
-
if (data.datasets) {
|
|
99
|
-
// show datasets
|
|
100
|
-
apm.captureError(error)
|
|
101
|
-
} else {
|
|
102
|
-
// direct to freshdesk
|
|
103
|
-
throw error
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}, [error, data])
|
|
107
|
-
return (
|
|
108
|
-
<FullHeightFlexDiv className="dashboard-dataset-teasers datasets datasets-private">
|
|
109
|
-
<Helmet>
|
|
110
|
-
<title>
|
|
111
|
-
{title(publicDashboard, savedDashboard)} - {pageTitle}
|
|
112
|
-
</title>
|
|
113
|
-
</Helmet>
|
|
114
|
-
<div className="header-filter-sort clearfix">
|
|
115
|
-
<div className="admin header-wrap clearfix">
|
|
116
|
-
<div className="row">
|
|
117
|
-
<Media at="small">
|
|
118
|
-
<div className="col-md-7">
|
|
119
|
-
<SearchInput />
|
|
120
|
-
</div>
|
|
121
|
-
</Media>
|
|
122
|
-
<div className="col-md-5">
|
|
123
|
-
<h2>{title(publicDashboard, savedDashboard)}</h2>
|
|
124
|
-
<Media at="small">
|
|
125
|
-
{!loading && (
|
|
126
|
-
<h6>
|
|
127
|
-
{data.datasets
|
|
128
|
-
? `Results ${data.datasets.pageInfo.count}`
|
|
129
|
-
: 'Zero results'}{' '}
|
|
130
|
-
</h6>
|
|
131
|
-
)}
|
|
132
|
-
</Media>
|
|
133
|
-
</div>
|
|
134
|
-
<Media greaterThanOrEqual="medium">
|
|
135
|
-
<div className="col-md-7">
|
|
136
|
-
<SearchInput />
|
|
137
|
-
</div>
|
|
138
|
-
</Media>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
<DatasetTabSortWrap>
|
|
142
|
-
<>
|
|
143
|
-
<DatasetTabSortClearfix>
|
|
144
|
-
<>
|
|
145
|
-
<Media greaterThanOrEqual="medium">
|
|
146
|
-
<label>Sort by:</label>
|
|
147
|
-
</Media>
|
|
148
|
-
<DatasetSorter
|
|
149
|
-
refetch={refetch}
|
|
150
|
-
queryVariables={queryVariables}
|
|
151
|
-
/>
|
|
152
|
-
</>
|
|
153
|
-
</DatasetTabSortClearfix>
|
|
154
|
-
{publicDashboard || savedDashboard ? null : (
|
|
155
|
-
<div className="filters">
|
|
156
|
-
<MobileLabel>Filter by:</MobileLabel>
|
|
157
|
-
<DatasetFilter
|
|
158
|
-
refetch={refetch}
|
|
159
|
-
queryVariables={queryVariables}
|
|
160
|
-
/>
|
|
161
|
-
</div>
|
|
162
|
-
)}
|
|
163
|
-
</>
|
|
164
|
-
</DatasetTabSortWrap>
|
|
165
|
-
</div>
|
|
166
|
-
{loading ? (
|
|
167
|
-
<Spinner text="Loading Datasets" active />
|
|
168
|
-
) : (
|
|
169
|
-
<ErrorBoundary subject={'error in dashboard dataset tab'}>
|
|
170
|
-
<DatasetTabLoaded
|
|
171
|
-
datasets={data.datasets}
|
|
172
|
-
loadMoreRows={loadMoreRows}
|
|
173
|
-
publicDashboard={publicDashboard}
|
|
174
|
-
/>
|
|
175
|
-
</ErrorBoundary>
|
|
176
|
-
)}
|
|
177
|
-
</FullHeightFlexDiv>
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
DatasetTab.propTypes = {
|
|
182
|
-
data: PropTypes.object,
|
|
183
|
-
loadMoreRows: PropTypes.func,
|
|
184
|
-
refetch: PropTypes.func,
|
|
185
|
-
queryVariables: PropTypes.object,
|
|
186
|
-
loading: PropTypes.bool,
|
|
187
|
-
publicDashboard: PropTypes.bool,
|
|
188
|
-
savedDashboard: PropTypes.bool,
|
|
189
|
-
error: PropTypes.object,
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export default DatasetTab
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
4
|
-
InfiniteLoader,
|
|
5
|
-
List,
|
|
6
|
-
AutoSizer,
|
|
7
|
-
WindowScroller,
|
|
8
|
-
} from 'react-virtualized'
|
|
9
|
-
import DatasetRow from './dataset-row.jsx'
|
|
10
|
-
import DatasetRowSkeleton from './dataset-row-skeleton.jsx'
|
|
11
|
-
import DatasetRowErrorBoundary from './dataset-row-error-boundary.jsx'
|
|
12
|
-
import styled from '@emotion/styled'
|
|
13
|
-
|
|
14
|
-
const FlexParent = styled.div`
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-flow: column;
|
|
17
|
-
height: 100%;
|
|
18
|
-
flex: 1 1 auto;
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
const FlexFullHeight = styled.div`
|
|
22
|
-
flex: 1 1 auto;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
@media (max-width: 765px) {
|
|
25
|
-
width: 100%;
|
|
26
|
-
}
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
class DatasetVirtualScroller extends React.Component {
|
|
30
|
-
_isRowLoaded = ({ index }) => {
|
|
31
|
-
return index < this.props.datasets.length
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
_rowRender = ({ key, index, style }) => {
|
|
35
|
-
if (this._isRowLoaded({ index })) {
|
|
36
|
-
return (
|
|
37
|
-
<div key={key} style={style}>
|
|
38
|
-
<DatasetRowErrorBoundary
|
|
39
|
-
datasetId={this.props.datasets[index].node.id}>
|
|
40
|
-
<DatasetRow
|
|
41
|
-
dataset={this.props.datasets[index].node}
|
|
42
|
-
publicDashboard={this.props.publicDashboard}
|
|
43
|
-
/>
|
|
44
|
-
</DatasetRowErrorBoundary>
|
|
45
|
-
</div>
|
|
46
|
-
)
|
|
47
|
-
} else {
|
|
48
|
-
return (
|
|
49
|
-
<div key={key} style={style}>
|
|
50
|
-
<DatasetRowSkeleton />
|
|
51
|
-
</div>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
_autosizeRender = (onRowsRendered, registerChild, height, scrollTop) => ({
|
|
57
|
-
width,
|
|
58
|
-
}) => (
|
|
59
|
-
<List
|
|
60
|
-
className="fade-in"
|
|
61
|
-
autoHeight
|
|
62
|
-
height={height}
|
|
63
|
-
onRowsRendered={onRowsRendered}
|
|
64
|
-
ref={registerChild}
|
|
65
|
-
rowCount={this.props.pageInfo.count}
|
|
66
|
-
rowHeight={94}
|
|
67
|
-
rowRenderer={this._rowRender}
|
|
68
|
-
width={width}
|
|
69
|
-
scrollTop={scrollTop}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
_windowScrollerRender = (onRowsRendered, registerChild) => ({
|
|
74
|
-
height,
|
|
75
|
-
scrollTop,
|
|
76
|
-
}) => (
|
|
77
|
-
<AutoSizer disableHeight defaultHeight={2048} defaultWidth={1024}>
|
|
78
|
-
{this._autosizeRender(onRowsRendered, registerChild, height, scrollTop)}
|
|
79
|
-
</AutoSizer>
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
_loaderRender = ({ onRowsRendered, registerChild }) => (
|
|
83
|
-
<WindowScroller serverHeight={2048} serverWidth={1024}>
|
|
84
|
-
{this._windowScrollerRender(onRowsRendered, registerChild)}
|
|
85
|
-
</WindowScroller>
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
shouldComponentUpdate(nextProps) {
|
|
89
|
-
if (this.props.datasets.length !== nextProps.datasets.length) {
|
|
90
|
-
return true
|
|
91
|
-
}
|
|
92
|
-
if (
|
|
93
|
-
this.props.datasets[0].id !== nextProps.datasets[0].id ||
|
|
94
|
-
this.props.datasets.slice(-1)[0].id !== nextProps.datasets.slice(-1)[0].id
|
|
95
|
-
) {
|
|
96
|
-
return true
|
|
97
|
-
}
|
|
98
|
-
return false
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
render() {
|
|
102
|
-
return (
|
|
103
|
-
<FlexParent>
|
|
104
|
-
<FlexFullHeight>
|
|
105
|
-
<InfiniteLoader
|
|
106
|
-
isRowLoaded={this._isRowLoaded}
|
|
107
|
-
loadMoreRows={this.props.loadMoreRows}
|
|
108
|
-
rowCount={this.props.pageInfo.count}
|
|
109
|
-
minimumBatchSize={25}
|
|
110
|
-
threshold={7}>
|
|
111
|
-
{this._loaderRender}
|
|
112
|
-
</InfiniteLoader>
|
|
113
|
-
</FlexFullHeight>
|
|
114
|
-
</FlexParent>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
DatasetVirtualScroller.propTypes = {
|
|
120
|
-
datasets: PropTypes.array,
|
|
121
|
-
pageInfo: PropTypes.object,
|
|
122
|
-
loadMoreRows: PropTypes.func,
|
|
123
|
-
publicDashboard: PropTypes.bool,
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export default DatasetVirtualScroller
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import parseISO from 'date-fns/parseISO'
|
|
4
|
-
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
|
|
5
|
-
|
|
6
|
-
class Uploaded extends React.PureComponent {
|
|
7
|
-
render() {
|
|
8
|
-
const fullname = this.props.uploader ? this.props.uploader.name : ''
|
|
9
|
-
const dateAdded = this.props.created
|
|
10
|
-
? new Date(this.props.created).toISOString().split('T')[0]
|
|
11
|
-
: ''
|
|
12
|
-
const timeago = this.props.created
|
|
13
|
-
? formatDistanceToNow(parseISO(this.props.created))
|
|
14
|
-
: ''
|
|
15
|
-
return (
|
|
16
|
-
<div className="meta-container">
|
|
17
|
-
<p className="date">
|
|
18
|
-
uploaded {this.props.uploader ? 'by ' : ''}
|
|
19
|
-
<span className="name">{fullname}</span> on{' '}
|
|
20
|
-
<span className="time-ago">
|
|
21
|
-
{dateAdded} - {timeago} ago
|
|
22
|
-
</span>
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Uploaded.propTypes = {
|
|
30
|
-
uploader: PropTypes.object,
|
|
31
|
-
created: PropTypes.string,
|
|
32
|
-
}
|
|
33
|
-
export default Uploaded
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Comments component recursively renders a tree of comments 1`] = `
|
|
4
|
-
<Comments
|
|
5
|
-
comments={
|
|
6
|
-
Array [
|
|
7
|
-
Object {
|
|
8
|
-
"id": "xyz",
|
|
9
|
-
"replies": Array [
|
|
10
|
-
Object {
|
|
11
|
-
"id": "xyz",
|
|
12
|
-
"replies": Array [],
|
|
13
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
14
|
-
"user": Object {
|
|
15
|
-
"email": "example@example.com",
|
|
16
|
-
"id": "1234",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
21
|
-
"user": Object {
|
|
22
|
-
"email": "example@example.com",
|
|
23
|
-
"id": "1234",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
datasetId="ds000001"
|
|
29
|
-
>
|
|
30
|
-
<div
|
|
31
|
-
className="col-xs-12"
|
|
32
|
-
>
|
|
33
|
-
<div
|
|
34
|
-
className="dataset-comments"
|
|
35
|
-
>
|
|
36
|
-
<h2>
|
|
37
|
-
Comments
|
|
38
|
-
</h2>
|
|
39
|
-
<ErrorBoundary
|
|
40
|
-
subject="error in dataset comments"
|
|
41
|
-
>
|
|
42
|
-
<LoggedIn />
|
|
43
|
-
<LoggedOut>
|
|
44
|
-
<div>
|
|
45
|
-
Please sign in to contribute to the discussion.
|
|
46
|
-
</div>
|
|
47
|
-
</LoggedOut>
|
|
48
|
-
<CommentTree
|
|
49
|
-
commentMap={
|
|
50
|
-
Object {
|
|
51
|
-
"xyz": Object {
|
|
52
|
-
"id": "xyz",
|
|
53
|
-
"replies": Array [
|
|
54
|
-
Object {
|
|
55
|
-
"id": "xyz",
|
|
56
|
-
"replies": Array [],
|
|
57
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
58
|
-
"user": Object {
|
|
59
|
-
"email": "example@example.com",
|
|
60
|
-
"id": "1234",
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
65
|
-
"user": Object {
|
|
66
|
-
"email": "example@example.com",
|
|
67
|
-
"id": "1234",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
comments={Array []}
|
|
73
|
-
datasetId="ds000001"
|
|
74
|
-
/>
|
|
75
|
-
</ErrorBoundary>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</Comments>
|
|
79
|
-
`;
|
|
80
|
-
|
|
81
|
-
exports[`Comments component renders one top level comment 1`] = `
|
|
82
|
-
<Comments
|
|
83
|
-
comments={
|
|
84
|
-
Array [
|
|
85
|
-
Object {
|
|
86
|
-
"id": "xyz",
|
|
87
|
-
"replies": Array [],
|
|
88
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
89
|
-
"user": Object {
|
|
90
|
-
"email": "example@example.com",
|
|
91
|
-
"id": "1234",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
datasetId="ds000001"
|
|
97
|
-
>
|
|
98
|
-
<div
|
|
99
|
-
className="col-xs-12"
|
|
100
|
-
>
|
|
101
|
-
<div
|
|
102
|
-
className="dataset-comments"
|
|
103
|
-
>
|
|
104
|
-
<h2>
|
|
105
|
-
Comments
|
|
106
|
-
</h2>
|
|
107
|
-
<ErrorBoundary
|
|
108
|
-
subject="error in dataset comments"
|
|
109
|
-
>
|
|
110
|
-
<LoggedIn />
|
|
111
|
-
<LoggedOut>
|
|
112
|
-
<div>
|
|
113
|
-
Please sign in to contribute to the discussion.
|
|
114
|
-
</div>
|
|
115
|
-
</LoggedOut>
|
|
116
|
-
<CommentTree
|
|
117
|
-
commentMap={
|
|
118
|
-
Object {
|
|
119
|
-
"xyz": Object {
|
|
120
|
-
"id": "xyz",
|
|
121
|
-
"replies": Array [],
|
|
122
|
-
"text": "{\\"blocks\\":[{\\"key\\":\\"3sm42\\",\\"text\\":\\"\\",\\"type\\":\\"unstyled\\",\\"depth\\":0,\\"inlineStyleRanges\\":[],\\"entityRanges\\":[],\\"data\\":{}}],\\"entityMap\\":{}}",
|
|
123
|
-
"user": Object {
|
|
124
|
-
"email": "example@example.com",
|
|
125
|
-
"id": "1234",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
comments={Array []}
|
|
131
|
-
datasetId="ds000001"
|
|
132
|
-
/>
|
|
133
|
-
</ErrorBoundary>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</Comments>
|
|
137
|
-
`;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`DatasetPage component renders with common props 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="page dataset"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
className="open dataset-container"
|
|
9
|
-
>
|
|
10
|
-
<LeftSidebar
|
|
11
|
-
dataset={
|
|
12
|
-
Object {
|
|
13
|
-
"draft": Object {
|
|
14
|
-
"modified": "2018-10-10",
|
|
15
|
-
},
|
|
16
|
-
"id": "1234",
|
|
17
|
-
"snapshots": Array [],
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
datasetId="1234"
|
|
21
|
-
draftModified="2018-10-10"
|
|
22
|
-
snapshots={Array []}
|
|
23
|
-
/>
|
|
24
|
-
<span
|
|
25
|
-
className="show-nav-btn"
|
|
26
|
-
onClick={[Function]}
|
|
27
|
-
>
|
|
28
|
-
<i
|
|
29
|
-
aria-hidden="true"
|
|
30
|
-
className="fa fa-angle-double-left"
|
|
31
|
-
/>
|
|
32
|
-
</span>
|
|
33
|
-
<DatasetTools
|
|
34
|
-
dataset={
|
|
35
|
-
Object {
|
|
36
|
-
"draft": Object {
|
|
37
|
-
"modified": "2018-10-10",
|
|
38
|
-
},
|
|
39
|
-
"id": "1234",
|
|
40
|
-
"snapshots": Array [],
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/>
|
|
44
|
-
<div
|
|
45
|
-
className="fade-in inner-route dataset-route light"
|
|
46
|
-
>
|
|
47
|
-
<div
|
|
48
|
-
className="clearfix dataset-wrap"
|
|
49
|
-
>
|
|
50
|
-
<div
|
|
51
|
-
className="dataset-animation dataset-inner"
|
|
52
|
-
>
|
|
53
|
-
<DatasetMain
|
|
54
|
-
dataset={
|
|
55
|
-
Object {
|
|
56
|
-
"draft": Object {
|
|
57
|
-
"modified": "2018-10-10",
|
|
58
|
-
},
|
|
59
|
-
"id": "1234",
|
|
60
|
-
"snapshots": Array [],
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`DatasetQuery component renders with common params 1`] = `
|
|
4
|
-
<Fragment>
|
|
5
|
-
<DatasetRedirect />
|
|
6
|
-
<ErrorBoundaryAssertionFailureException
|
|
7
|
-
subject="error in dataset query"
|
|
8
|
-
>
|
|
9
|
-
<DatasetQueryHook
|
|
10
|
-
datasetId="ds000001"
|
|
11
|
-
draft={true}
|
|
12
|
-
/>
|
|
13
|
-
</ErrorBoundaryAssertionFailureException>
|
|
14
|
-
</Fragment>
|
|
15
|
-
`;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`LeftSidebar component SidebarRow renders draft version correctly 1`] = `
|
|
4
|
-
<li
|
|
5
|
-
key="draft"
|
|
6
|
-
>
|
|
7
|
-
<Link
|
|
8
|
-
className=""
|
|
9
|
-
to="/datasets/ds000001"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
className="clearfix"
|
|
13
|
-
>
|
|
14
|
-
<div
|
|
15
|
-
className=" col-xs-12"
|
|
16
|
-
>
|
|
17
|
-
<span
|
|
18
|
-
className="dataset-type"
|
|
19
|
-
/>
|
|
20
|
-
<span
|
|
21
|
-
className="date-modified"
|
|
22
|
-
>
|
|
23
|
-
2019-04-02
|
|
24
|
-
</span>
|
|
25
|
-
<span
|
|
26
|
-
className="icons"
|
|
27
|
-
/>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</Link>
|
|
31
|
-
</li>
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
exports[`LeftSidebar component SidebarRow renders snapshot version correctly 1`] = `
|
|
35
|
-
<li
|
|
36
|
-
key="ds000001:1.0.0"
|
|
37
|
-
>
|
|
38
|
-
<Link
|
|
39
|
-
className="active"
|
|
40
|
-
to="/datasets/ds000001/versions/undefined"
|
|
41
|
-
>
|
|
42
|
-
<div
|
|
43
|
-
className="clearfix"
|
|
44
|
-
>
|
|
45
|
-
<div
|
|
46
|
-
className=" col-xs-12"
|
|
47
|
-
>
|
|
48
|
-
<span
|
|
49
|
-
className="dataset-type"
|
|
50
|
-
/>
|
|
51
|
-
<span
|
|
52
|
-
className="date-modified"
|
|
53
|
-
>
|
|
54
|
-
2019-04-02
|
|
55
|
-
</span>
|
|
56
|
-
<span
|
|
57
|
-
className="icons"
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</Link>
|
|
62
|
-
</li>
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
exports[`LeftSidebar component renders with basic props 1`] = `
|
|
66
|
-
<div
|
|
67
|
-
className="left-sidebar"
|
|
68
|
-
>
|
|
69
|
-
<span
|
|
70
|
-
className="slide"
|
|
71
|
-
>
|
|
72
|
-
<div
|
|
73
|
-
className="snapshot-select"
|
|
74
|
-
role="presentation"
|
|
75
|
-
>
|
|
76
|
-
<span>
|
|
77
|
-
<h3>
|
|
78
|
-
Versions
|
|
79
|
-
</h3>
|
|
80
|
-
<ul />
|
|
81
|
-
</span>
|
|
82
|
-
</div>
|
|
83
|
-
</span>
|
|
84
|
-
</div>
|
|
85
|
-
`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import DatasetPage from '../dataset-page.jsx'
|
|
4
|
-
|
|
5
|
-
describe('DatasetPage component', () => {
|
|
6
|
-
it('renders with common props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
shallow(
|
|
9
|
-
<DatasetPage
|
|
10
|
-
dataset={{
|
|
11
|
-
id: '1234',
|
|
12
|
-
snapshots: [],
|
|
13
|
-
draft: { modified: '2018-10-10' },
|
|
14
|
-
}}
|
|
15
|
-
/>,
|
|
16
|
-
),
|
|
17
|
-
).toMatchSnapshot()
|
|
18
|
-
})
|
|
19
|
-
it('hides sidebar when clicked', () => {
|
|
20
|
-
const wrapper = shallow(
|
|
21
|
-
<DatasetPage
|
|
22
|
-
dataset={{
|
|
23
|
-
id: '1234',
|
|
24
|
-
snapshots: [],
|
|
25
|
-
draft: { modified: '2018-10-10' },
|
|
26
|
-
}}
|
|
27
|
-
/>,
|
|
28
|
-
)
|
|
29
|
-
expect(wrapper.find('.dataset-container').hasClass('open')).toBe(true)
|
|
30
|
-
wrapper.find('.show-nav-btn').simulate('click')
|
|
31
|
-
expect(wrapper.find('.dataset-container').hasClass('open')).toBe(false)
|
|
32
|
-
})
|
|
33
|
-
})
|