@openneuro/app 4.5.0 → 4.6.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/package.json +5 -5
  2. package/src/scripts/{refactor_2021/authentication → authentication}/__tests__/profile.spec.js +0 -0
  3. package/src/scripts/{refactor_2021/authentication → authentication}/admin-user.jsx +0 -0
  4. package/src/scripts/{refactor_2021/authentication → authentication}/logged-in.jsx +0 -0
  5. package/src/scripts/{refactor_2021/authentication → authentication}/logged-out.jsx +0 -0
  6. package/src/scripts/{refactor_2021/authentication → authentication}/loginCheck.js +0 -0
  7. package/src/scripts/{refactor_2021/authentication → authentication}/loginUrls.ts +1 -1
  8. package/src/scripts/{refactor_2021/authentication → authentication}/profile.js +0 -0
  9. package/src/scripts/{refactor_2021/authentication → authentication}/signOut.ts +0 -0
  10. package/src/scripts/{refactor_2021/authentication → authentication}/withProfile.jsx +0 -0
  11. package/src/scripts/{refactor_2021/common → common}/block-navigation.jsx +0 -0
  12. package/src/scripts/{refactor_2021 → common}/containers/footer.tsx +0 -0
  13. package/src/scripts/{refactor_2021 → common}/containers/header.tsx +17 -15
  14. package/src/scripts/{datalad/fragments → common/partials}/freshdesk-widget.jsx +1 -1
  15. package/src/scripts/datalad/dataset/dataset-query-fragments.js +2 -0
  16. package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comment.spec.jsx.snap +0 -0
  17. package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comments.spec.jsx.snap +0 -0
  18. package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comment.spec.jsx +0 -0
  19. package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comments.spec.jsx +0 -0
  20. package/src/scripts/{refactor_2021/dataset → dataset}/comments/block-style-controls.jsx +0 -0
  21. package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment-editor.jsx +0 -0
  22. package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment.jsx +0 -0
  23. package/src/scripts/{refactor_2021/dataset → dataset}/comments/comments.jsx +1 -1
  24. package/src/scripts/{refactor_2021/dataset → dataset}/comments/inline-style-controls.jsx +0 -0
  25. package/src/scripts/{refactor_2021/dataset → dataset}/comments/style-button.jsx +0 -0
  26. package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query-context.js +0 -0
  27. package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query.jsx +15 -15
  28. package/src/scripts/dataset/dataset-routes.jsx +39 -0
  29. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +0 -0
  30. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-link.spec.jsx.snap +0 -0
  31. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/shell-example.spec.jsx.snap +0 -0
  32. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-command-line.spec.jsx +0 -0
  33. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-link.spec.jsx +0 -0
  34. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-native.spec.js +0 -0
  35. package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/shell-example.spec.jsx +0 -0
  36. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-command-line.jsx +0 -0
  37. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-datalad.jsx +1 -1
  38. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-link.jsx +0 -0
  39. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-native.js +1 -1
  40. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-query.js +0 -0
  41. package/src/scripts/{refactor_2021/dataset → dataset}/download/download-s3.jsx +1 -1
  42. package/src/scripts/{refactor_2021/dataset → dataset}/download/native-file-toast.jsx +0 -0
  43. package/src/scripts/{refactor_2021/dataset → dataset}/download/shell-example.jsx +0 -0
  44. package/src/scripts/{refactor_2021/dataset → dataset}/download/track-download.js +0 -0
  45. package/src/scripts/{refactor_2021/dataset → dataset}/draft-container.tsx +15 -53
  46. package/src/scripts/{refactor_2021/dataset → dataset}/draft-snapshot-routes.tsx +0 -0
  47. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file-tree.spec.jsx.snap +0 -0
  48. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file.spec.jsx.snap +2 -2
  49. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-loading.spec.jsx +0 -0
  50. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-unloaded-directory.spec.jsx +1 -1
  51. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree.spec.jsx +0 -0
  52. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-viewer-type.spec.jsx +0 -0
  53. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file.spec.jsx +11 -4
  54. package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/flat-to-tree.spec.js +0 -0
  55. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-display.jsx +2 -2
  56. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-loading.jsx +0 -0
  57. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-unloaded-directory.jsx +1 -1
  58. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree.jsx +3 -2
  59. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-view.jsx +1 -1
  60. package/src/scripts/{refactor_2021/dataset → dataset}/files/file-viewer-type.jsx +0 -0
  61. package/src/scripts/{refactor_2021/dataset/files/file.jsx → dataset/files/file.tsx} +30 -13
  62. package/src/scripts/{refactor_2021/dataset → dataset}/files/files.jsx +1 -1
  63. package/src/scripts/{refactor_2021/dataset → dataset}/files/flat-to-tree.js +0 -0
  64. package/src/scripts/{refactor_2021/dataset → dataset}/files/index.tsx +0 -0
  65. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -0
  66. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/file-viewer-json.spec.jsx +0 -0
  67. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/parse-tabular.spec.js +0 -0
  68. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-csv.jsx +0 -0
  69. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-html.jsx +0 -0
  70. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-json.jsx +0 -0
  71. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-nifti.jsx +1 -1
  72. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-table.jsx +0 -0
  73. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-text.jsx +0 -0
  74. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-tsv.jsx +0 -0
  75. package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/parse-tabular.js +0 -0
  76. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/cancel-button.spec.tsx.snap +0 -0
  77. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-button.spec.tsx.snap +0 -0
  78. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +0 -0
  79. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/save-button.spec.tsx.snap +0 -0
  80. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/select-input.spec.tsx.snap +0 -0
  81. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/cancel-button.spec.tsx +0 -0
  82. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-alert-draft.spec.tsx +0 -0
  83. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-citation.spec.jsx +0 -0
  84. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/doi-link.spec.tsx +0 -0
  85. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-button.spec.tsx +0 -0
  86. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-list.spec.jsx +0 -0
  87. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/save-button.spec.tsx +0 -0
  88. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/select-input.spec.tsx +0 -0
  89. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/cancel-button.tsx +0 -0
  90. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/comments-fragments.js +0 -0
  91. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/copyable-tooltip.jsx +0 -0
  92. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-draft.tsx +0 -0
  93. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-version.tsx +0 -0
  94. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-citation.jsx +2 -4
  95. package/src/scripts/dataset/fragments/dataset-history.jsx +99 -0
  96. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-reviewers.ts +1 -1
  97. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/doi-link.tsx +0 -0
  98. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-button.tsx +0 -0
  99. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-field.jsx +0 -0
  100. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-list.jsx +0 -0
  101. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-list.jsx +0 -0
  102. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/number-input.tsx +0 -0
  103. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/save-button.tsx +0 -0
  104. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/select-input.tsx +0 -0
  105. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-array-input.tsx +0 -0
  106. package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-input.tsx +0 -0
  107. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +0 -0
  108. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-snapshot.spec.tsx.snap +0 -0
  109. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-version.spec.tsx.snap +0 -0
  110. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/description.spec.jsx.snap +0 -0
  111. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +0 -0
  112. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/cache-id.spec.js +0 -0
  113. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/delete.spec.jsx +0 -0
  114. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-snapshot.spec.tsx +0 -0
  115. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-version.spec.tsx +0 -0
  116. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/description.spec.jsx +0 -0
  117. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/remove-permissions.spec.tsx +0 -0
  118. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/update-permissions.spec.jsx +0 -0
  119. package/src/scripts/dataset/mutations/admin-exports.jsx +70 -0
  120. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-clear.jsx +0 -0
  121. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-id.js +0 -0
  122. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/comment.jsx +0 -0
  123. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/create-anonymous-reviewer.tsx +0 -3
  124. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/dataset-relations.tsx +4 -15
  125. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-anonymous-reviewer.tsx +0 -0
  126. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-comment.jsx +2 -4
  127. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dataset-form.jsx +0 -0
  128. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dir.jsx +0 -0
  129. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-file.jsx +0 -0
  130. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete.jsx +0 -0
  131. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/deprecate-version.tsx +0 -0
  132. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/description.jsx +1 -1
  133. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/flag-annex-object.jsx +1 -2
  134. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/follow.tsx +2 -2
  135. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/import-dataset.tsx +0 -0
  136. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/metadata-form.jsx +1 -1
  137. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/publish.jsx +0 -0
  138. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/readme.jsx +1 -1
  139. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-annex-object.jsx +0 -1
  140. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-permissions.tsx +0 -0
  141. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/revalidate.jsx +0 -0
  142. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/snapshot.tsx +17 -3
  143. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/star.tsx +2 -2
  144. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/submit-metadata.jsx +1 -1
  145. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/undo-deprecate-version.tsx +0 -0
  146. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-file.jsx +0 -0
  147. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-permissions.tsx +0 -0
  148. package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-ref.jsx +0 -0
  149. package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/__snapshots__/publish.spec.jsx.snap +0 -0
  150. package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/publish.spec.jsx +0 -0
  151. package/src/scripts/{refactor_2021/dataset → dataset}/routes/add-metadata.jsx +21 -25
  152. package/src/scripts/dataset/routes/admin-datalad.jsx +40 -0
  153. package/src/scripts/dataset/routes/dataset-default.tsx +54 -0
  154. package/src/scripts/{refactor_2021/dataset → dataset}/routes/delete-page.tsx +5 -9
  155. package/src/scripts/{refactor_2021/dataset → dataset}/routes/deprecate-snapshot-page.tsx +6 -7
  156. package/src/scripts/dataset/routes/download-dataset.tsx +53 -0
  157. package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-anonymous-reviewers.tsx +9 -3
  158. package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-permissions.jsx +7 -10
  159. package/src/scripts/{refactor_2021/dataset → dataset}/routes/publish.jsx +10 -12
  160. package/src/scripts/dataset/routes/snapshot-default.tsx +44 -0
  161. package/src/scripts/dataset/routes/snapshot.jsx +148 -0
  162. package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +8 -0
  163. package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +8 -0
  164. package/src/scripts/dataset/routes/styles/draft-background.tsx +7 -0
  165. package/src/scripts/dataset/routes/styles/header-row.tsx +12 -0
  166. package/src/scripts/dataset/routes/tab-routes-draft.tsx +88 -0
  167. package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +57 -0
  168. package/src/scripts/{refactor_2021/dataset → dataset}/snapshot-container.tsx +9 -42
  169. package/src/scripts/{refactor_2021 → errors}/freshdesk-widget.jsx +1 -1
  170. package/src/scripts/errors/freshdeskInterface.jsx +1 -1
  171. package/src/scripts/index.tsx +5 -5
  172. package/src/scripts/pages/admin/admin.jsx +1 -1
  173. package/src/scripts/pages/admin/user-tools.tsx +1 -1
  174. package/src/scripts/{refactor_2021/user → pages}/api.jsx +2 -2
  175. package/src/scripts/{faq → pages/faq}/__tests__/__snapshots__/faq.spec.jsx.snap +1 -1
  176. package/src/scripts/{faq → pages/faq}/__tests__/faq.spec.jsx +0 -0
  177. package/src/scripts/{faq → pages/faq}/faq-content.js +3 -5
  178. package/src/scripts/{faq → pages/faq}/faq.jsx +1 -1
  179. package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/aggregate-counts-container.tsx +0 -0
  180. package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-participant-count.ts +0 -0
  181. package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-publicDatasets-count.ts +0 -0
  182. package/src/scripts/pages/import-dataset.tsx +5 -5
  183. package/src/scripts/routes.tsx +3 -3
  184. package/src/scripts/{refactor_2021/search → search}/__tests__/search-container.spec.tsx +0 -0
  185. package/src/scripts/{refactor_2021/search → search}/__tests__/search-params-ctx.spec.tsx +0 -0
  186. package/src/scripts/{refactor_2021/search → search}/es-query-builders.ts +0 -0
  187. package/src/scripts/{refactor_2021/search → search}/filters-block-container.tsx +0 -0
  188. package/src/scripts/{refactor_2021/search → search}/initial-search-params.tsx +0 -0
  189. package/src/scripts/{refactor_2021/search → search}/inputs/__tests__/sort-by-select.spec.tsx +0 -0
  190. package/src/scripts/{refactor_2021/search → search}/inputs/admin-allDatasets-toggle.tsx +0 -0
  191. package/src/scripts/{refactor_2021/search → search}/inputs/age-range-input.tsx +0 -0
  192. package/src/scripts/{refactor_2021/search → search}/inputs/author-input.tsx +0 -0
  193. package/src/scripts/{refactor_2021/search → search}/inputs/date-radios.tsx +0 -0
  194. package/src/scripts/{refactor_2021/search → search}/inputs/diagnosis-select.tsx +0 -0
  195. package/src/scripts/{refactor_2021/search → search}/inputs/index.ts +0 -0
  196. package/src/scripts/{refactor_2021/search → search}/inputs/keyword-input.tsx +0 -0
  197. package/src/scripts/{refactor_2021/search → search}/inputs/modality-select.tsx +0 -0
  198. package/src/scripts/{refactor_2021/search → search}/inputs/pet/bodyParts_input.tsx +0 -0
  199. package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturersModelNames_input.tsx +0 -0
  200. package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturers_input.tsx +0 -0
  201. package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerNames_input.tsx +0 -0
  202. package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerRadionuclides_input.tsx +0 -0
  203. package/src/scripts/{refactor_2021/search → search}/inputs/section-select.tsx +0 -0
  204. package/src/scripts/{refactor_2021/search → search}/inputs/sex-radios.tsx +0 -0
  205. package/src/scripts/{refactor_2021/search → search}/inputs/show-datasets-radios.tsx +2 -4
  206. package/src/scripts/{refactor_2021/search → search}/inputs/sort-by-select.tsx +0 -0
  207. package/src/scripts/{refactor_2021/search → search}/inputs/species-select.tsx +0 -0
  208. package/src/scripts/{refactor_2021/search → search}/inputs/study-domain-input.tsx +0 -0
  209. package/src/scripts/{refactor_2021/search → search}/inputs/subject-count-range-input.tsx +0 -0
  210. package/src/scripts/{refactor_2021/search → search}/inputs/task-input.tsx +0 -0
  211. package/src/scripts/{refactor_2021/search → search}/search-container.tsx +1 -1
  212. package/src/scripts/{refactor_2021/search → search}/search-params-ctx.tsx +0 -0
  213. package/src/scripts/{refactor_2021/search → search}/search-routes.tsx +0 -0
  214. package/src/scripts/{refactor_2021/search → search}/use-search-results.tsx +1 -0
  215. package/src/scripts/test-utils.js +1 -1
  216. package/src/scripts/{refactor_2021/uploader → uploader}/add-path-to-files.js +0 -0
  217. package/src/scripts/{refactor_2021/uploader → uploader}/file-select.tsx +0 -0
  218. package/src/scripts/{refactor_2021/uploader → uploader}/file-upload.js +1 -1
  219. package/src/scripts/{refactor_2021/uploader → uploader}/input.jsx +0 -0
  220. package/src/scripts/{refactor_2021/uploader → uploader}/upload-button.jsx +0 -0
  221. package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer-input.tsx +0 -0
  222. package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer.jsx +0 -0
  223. package/src/scripts/{refactor_2021/uploader → uploader}/upload-file-status.jsx +0 -0
  224. package/src/scripts/{refactor_2021/uploader → uploader}/upload-issues.jsx +1 -1
  225. package/src/scripts/{refactor_2021/uploader → uploader}/upload-metadata.jsx +0 -0
  226. package/src/scripts/{refactor_2021/uploader → uploader}/upload-mutation.js +0 -0
  227. package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-button.jsx +0 -0
  228. package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-class.js +0 -0
  229. package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress.jsx +0 -0
  230. package/src/scripts/{refactor_2021/uploader → uploader}/upload-rename.jsx +0 -0
  231. package/src/scripts/{refactor_2021/uploader → uploader}/upload-resume.jsx +0 -0
  232. package/src/scripts/{refactor_2021/uploader → uploader}/upload-select.jsx +0 -0
  233. package/src/scripts/{refactor_2021/uploader → uploader}/upload-status.jsx +0 -0
  234. package/src/scripts/{refactor_2021/uploader → uploader}/upload-step.jsx +0 -0
  235. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-context.js +0 -0
  236. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-location.js +0 -0
  237. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-modal.jsx +0 -0
  238. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-setup-routes.jsx +0 -0
  239. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-status-routes.jsx +0 -0
  240. package/src/scripts/{refactor_2021/uploader → uploader}/uploader-view.jsx +1 -1
  241. package/src/scripts/{refactor_2021/uploader → uploader}/uploader.jsx +1 -1
  242. package/src/scripts/{refactor_2021/utils → utils}/cookies.js +0 -0
  243. package/src/scripts/{refactor_2021 → utils}/user-login-modal-ctx.tsx +1 -2
  244. package/src/scripts/{refactor_2021/validation → validation}/validation-panel.jsx +0 -0
  245. package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.issue.jsx +0 -0
  246. package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.jsx +0 -0
  247. package/src/scripts/{refactor_2021/validation → validation}/validation-results.jsx +0 -0
  248. package/src/scripts/{refactor_2021/validation → validation}/validation-status.jsx +0 -0
  249. package/src/scripts/{refactor_2021/validation → validation}/validation.jsx +1 -1
  250. package/src/scripts/refactor_2021/common/partials/toast-content.jsx +0 -18
  251. package/src/scripts/refactor_2021/dataset/dataset-routes.jsx +0 -163
  252. package/src/scripts/refactor_2021/dataset/fragments/dataset-history.jsx +0 -103
  253. package/src/scripts/refactor_2021/dataset/routes/admin-datalad.jsx +0 -47
  254. package/src/scripts/refactor_2021/dataset/routes/admin-exports.jsx +0 -132
  255. package/src/scripts/refactor_2021/dataset/routes/download-dataset.tsx +0 -76
  256. package/src/scripts/refactor_2021/dataset/routes/snapshot.jsx +0 -139
  257. package/src/scripts/refactor_2021/utils/datalad.js +0 -13
  258. package/src/scripts/refactor_2021/utils/gtag.js +0 -22
@@ -35,8 +35,7 @@ const ShowDatasetsRadios: FC = () => {
35
35
  className={
36
36
  datasetType_selected.replace(/\s/g, '') +
37
37
  ' btn-group-wrapper facet-radio'
38
- }
39
- >
38
+ }>
40
39
  <RadioGroup
41
40
  radioArr={datasetType_available}
42
41
  layout="btn-group"
@@ -50,8 +49,7 @@ const ShowDatasetsRadios: FC = () => {
50
49
  <AccordionTab
51
50
  accordionStyle="plain"
52
51
  label="My Datasets Status"
53
- startOpen={true}
54
- >
52
+ startOpen={true}>
55
53
  <FacetSelect
56
54
  selected={datasetStatus_selected}
57
55
  setSelected={setShowMyUploadsSelected}
@@ -33,7 +33,7 @@ import {
33
33
  SortBySelect,
34
34
  } from './inputs'
35
35
  import FiltersBlockContainer from './filters-block-container'
36
- import AggregateCountsContainer from '../aggregate-queries/aggregate-counts-container'
36
+ import AggregateCountsContainer from '../pages/front-page/aggregate-queries/aggregate-counts-container'
37
37
  import { useCookies } from 'react-cookie'
38
38
  import { useSearchResults } from './use-search-results'
39
39
  import { SearchParamsCtx } from './search-params-ctx'
@@ -59,6 +59,7 @@ const searchQuery = gql`
59
59
  ages
60
60
  }
61
61
  latestSnapshot {
62
+ size
62
63
  summary {
63
64
  modalities
64
65
  secondaryModalities
@@ -1,4 +1,4 @@
1
- import cookies from './refactor_2021/utils/cookies.js'
1
+ import cookies from './utils/cookies.js'
2
2
 
3
3
  /**
4
4
  * Sets a login cookie during a test run
@@ -1,4 +1,4 @@
1
- import { config } from '../../config'
1
+ import { config } from '../config'
2
2
  import { uploads } from '@openneuro/client'
3
3
 
4
4
  /**
@@ -4,7 +4,7 @@ import pluralize from 'pluralize'
4
4
  import { Loading } from '@openneuro/components/loading'
5
5
  import Results from '../validation/validation-results.jsx'
6
6
  import UploaderContext from './uploader-context.js'
7
- import validate from '../../workers/validate'
7
+ import validate from '../workers/validate'
8
8
 
9
9
  const UploadValidatorStatus = ({ issues, next, reset }) => {
10
10
  const errorCount = issues.errors.length
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import BlockNavigation from '../../common/partials/block-navigation.jsx'
2
+ import BlockNavigation from '../common/partials/block-navigation.jsx'
3
3
  import UploaderContext from './uploader-context.js'
4
4
  import UploaderSetupRoutes from './uploader-setup-routes.jsx'
5
5
  import UploaderStatusRoutes from './uploader-status-routes.jsx'
@@ -1,4 +1,4 @@
1
- import { apm } from '../../apm'
1
+ import { apm } from '../apm'
2
2
  import { toast } from 'react-toastify'
3
3
  import ToastContent from '../common/partials/toast-content.jsx'
4
4
  import React from 'react'
@@ -1,7 +1,6 @@
1
1
  import React, { createContext, useState, FC, ReactNode } from 'react'
2
2
  import { UserLoginModal } from '@openneuro/components/modal'
3
- import loginUrls from './authentication/loginUrls'
4
- import { useLocation } from 'react-router-dom'
3
+ import loginUrls from '../authentication/loginUrls'
5
4
 
6
5
  export const UserModalOpenCtx = createContext(null)
7
6
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import ValidationStatus from './validation-status.jsx'
4
- import ErrorBoundary from '../../errors/errorBoundary.jsx'
4
+ import ErrorBoundary from '../errors/errorBoundary.jsx'
5
5
 
6
6
  const Validation = ({ issues }) => (
7
7
  <>
@@ -1,18 +0,0 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
-
4
- const ToastContent = ({ title, body, children }) => (
5
- <span>
6
- <h3>{title}</h3>
7
- <h4>{body}</h4>
8
- {children}
9
- </span>
10
- )
11
-
12
- ToastContent.propTypes = {
13
- title: PropTypes.string,
14
- body: PropTypes.string,
15
- children: PropTypes.node,
16
- }
17
-
18
- export default ToastContent
@@ -1,163 +0,0 @@
1
- import React, { useEffect } from 'react'
2
- import PropTypes from 'prop-types'
3
- import { Route, Switch } from 'react-router-dom'
4
- import AdminDataset from './routes/admin-datalad.jsx'
5
- import AdminExports from './routes/admin-exports.jsx'
6
-
7
- import SnapshotContainer from './snapshot-container'
8
- import DraftContainer from './draft-container'
9
- import DownloadDataset from './routes/download-dataset'
10
- import Publish from './routes/publish.jsx'
11
- import Share from './routes/manage-permissions.jsx'
12
- import Snapshot from './routes/snapshot.jsx'
13
- import AddMetadata from './routes/add-metadata.jsx'
14
- import DeletePage from './routes/delete-page'
15
- import { DeprecateSnapshotPage } from './routes/deprecate-snapshot-page'
16
- import { FileDisplay } from './files'
17
-
18
- //TODO imports
19
-
20
- const stubComponent = () => null
21
-
22
- const DatasetRoutes = ({ dataset, error }) => {
23
- useEffect(() => {
24
- if (error) {
25
- throw error
26
- }
27
- }, [dataset, error])
28
-
29
- return (
30
- <Switch>
31
- <Route
32
- exact
33
- path="/datasets/:datasetId"
34
- render={() => <DraftContainer dataset={dataset} />}
35
- />
36
- <Route
37
- exact
38
- path="/datasets/:datasetId/download"
39
- component={() => (
40
- <DownloadDataset
41
- worker={dataset.worker}
42
- datasetPermissions={dataset.permissions}
43
- />
44
- )}
45
- />
46
- <Route
47
- exact
48
- path="/datasets/:datasetId/admin-datalad"
49
- component={() => <AdminDataset dataset={dataset} />}
50
- />
51
- <Route
52
- exact
53
- path="/datasets/:datasetId/admin-exports"
54
- component={() => <AdminExports dataset={dataset} />}
55
- />
56
- <Route
57
- exact
58
- path="/datasets/:datasetId/publish"
59
- component={() => (
60
- <Publish datasetId={dataset.id} metadata={dataset.metadata} />
61
- )}
62
- />
63
- <Route
64
- exact
65
- path="/datasets/:datasetId/snapshot"
66
- component={() => (
67
- <Snapshot
68
- datasetId={dataset.id}
69
- snapshots={dataset.snapshots}
70
- issues={dataset.draft.issues}
71
- description={dataset.draft.description}
72
- />
73
- )}
74
- />
75
- <Route
76
- exact
77
- path="/datasets/:datasetId/share"
78
- component={() => (
79
- <Share
80
- datasetId={dataset.id}
81
- permissions={dataset.permissions}
82
- reviewers={dataset.reviewers}
83
- />
84
- )}
85
- />
86
- <Route
87
- exact
88
- path="/datasets/:datasetId/file-edit"
89
- component={stubComponent}
90
- />
91
- <Route
92
- path="/datasets/:datasetId/file-display/:filePath"
93
- render={({
94
- match: {
95
- params: { datasetId, filePath },
96
- },
97
- }) => {
98
- return <FileDisplay datasetId={datasetId} filePath={filePath} />
99
- }}
100
- />
101
- {/* Snapshot routes */}
102
- <Route
103
- exact
104
- path="/datasets/:datasetId/versions/:tag"
105
- render={({
106
- match: {
107
- params: { tag },
108
- },
109
- }) => {
110
- return <SnapshotContainer dataset={dataset} tag={tag} />
111
- }}
112
- />
113
- <Route
114
- exact
115
- path="/datasets/:datasetId/versions/:snapshotId/download"
116
- component={() => (
117
- <DownloadDataset
118
- worker={dataset.worker}
119
- datasetPermissions={dataset.permissions}
120
- />
121
- )}
122
- />
123
- <Route
124
- exact
125
- path="/datasets/:datasetId/versions/:snapshotTag/deprecate"
126
- component={() => <DeprecateSnapshotPage />}
127
- />
128
- <Route
129
- path="/datasets/:datasetId/versions/:snapshotTag/file-display/:filePath"
130
- render={({
131
- match: {
132
- params: { datasetId, filePath, snapshotTag },
133
- },
134
- }) => {
135
- return (
136
- <FileDisplay
137
- datasetId={datasetId}
138
- snapshotTag={snapshotTag}
139
- filePath={filePath}
140
- />
141
- )
142
- }}
143
- />
144
- <Route
145
- exact
146
- path="/datasets/:datasetId/metadata"
147
- component={() => <AddMetadata dataset={dataset} />}
148
- />
149
- <Route
150
- exact
151
- path="/datasets/:datasetId/delete"
152
- component={() => <DeletePage dataset={dataset} />}
153
- />
154
- </Switch>
155
- )
156
- }
157
-
158
- DatasetRoutes.propTypes = {
159
- dataset: PropTypes.object,
160
- error: PropTypes.object,
161
- }
162
-
163
- export default DatasetRoutes
@@ -1,103 +0,0 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import styled from '@emotion/styled'
4
- import { gql, useQuery } from '@apollo/client'
5
-
6
- import Revalidate from '../mutations/revalidate.jsx'
7
- import UpdateRef from '../mutations/update-ref.jsx'
8
-
9
- const GET_HISTORY = gql`
10
- query getHistory($datasetId: ID!) {
11
- dataset(id: $datasetId) {
12
- id
13
- history {
14
- id
15
- authorName
16
- authorEmail
17
- date
18
- references
19
- message
20
- }
21
- worker
22
- }
23
- }
24
- `
25
-
26
- const DatasetHistoryTable = styled.div`
27
- .row {
28
- line-height: 1.2em;
29
- }
30
- .row:nth-of-type(2n) {
31
- padding-top: 1em;
32
- }
33
- .row:nth-of-type(2n + 1) {
34
- padding-bottom: 1em;
35
- }
36
- .row:nth-of-type(4n),
37
- .row:nth-of-type(4n + 1) {
38
- background: #f4f4f4;
39
- }
40
- `
41
-
42
- const DatasetHistory = ({ datasetId }) => {
43
- const { loading, data } = useQuery(GET_HISTORY, {
44
- variables: { datasetId },
45
- errorPolicy: 'all',
46
- })
47
- if (loading) {
48
- return <div className="dataset-history">Loading...</div>
49
- } else {
50
- return (
51
- <div className="grid dataset-history">
52
- <div className="col col-12">
53
- <h3>Worker Assignment</h3> {data.dataset.worker}
54
- </div>
55
- <div className="col col-12">
56
- <h3>Git History</h3>
57
- <DatasetHistoryTable>
58
- <div className="grid faux-table-header">
59
- <h4 className="col-lg col col-4">Commit</h4>
60
- <h4 className="col-lg col col-2">Date</h4>
61
- <h4 className="col-lg col col-2">Author</h4>
62
- <h4 className="col-lg col col-2">References</h4>
63
- <h4 className="col-lg col col-2 text--right">Action</h4>
64
- </div>
65
- {data.dataset.history.map(commit => (
66
- <React.Fragment key={commit.id}>
67
- <div className="grid faux-table">
68
- <div className="commit col-lg col col-4">
69
- <label>Commit: </label>
70
- {commit.id}
71
- </div>
72
- <div className="col-lg col col-2">
73
- <label>Date: </label>
74
- {commit.date}
75
- </div>
76
- <div className="col-lg col col-2">
77
- <label>Author: </label>
78
- {commit.authorName} &lt;{commit.authorEmail}&gt;
79
- </div>
80
- <div className="col-lg col col-2">
81
- <label>References: </label>
82
- {commit.references}
83
- </div>
84
- <div className="col-lg col col-2 grid actions">
85
- <Revalidate datasetId={datasetId} revision={commit.id} />
86
- <UpdateRef datasetId={datasetId} revision={commit.id} />
87
- </div>
88
- <div className="col-lg col col-12">{commit.message}</div>
89
- </div>
90
- </React.Fragment>
91
- ))}
92
- </DatasetHistoryTable>
93
- </div>
94
- </div>
95
- )
96
- }
97
- }
98
-
99
- DatasetHistory.propTypes = {
100
- datasetId: PropTypes.string,
101
- }
102
-
103
- export default DatasetHistory
@@ -1,47 +0,0 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { Link } from 'react-router-dom'
4
- import DatasetHistory from '../fragments/dataset-history.jsx'
5
- import CacheClear from '../mutations/cache-clear.jsx'
6
-
7
- const AdminDataset = ({ dataset }) => (
8
- <div className="datalad-dataset-form container">
9
- <div className="grid">
10
- <div className="col col-12">
11
- <h2>Admin: Datalad Tools</h2>
12
- </div>
13
- <div className="col col-12">
14
- <p>
15
- Delete dataset cache drops all dataset caches (snapshot index,
16
- draft/snapshot file listings, current dataset description) and the
17
- cache is repopulated on the next API call.
18
- </p>
19
- <p>
20
- Reset draft head will move the draft to a given commit and rerun
21
- validation.
22
- </p>
23
- </div>
24
- <div className="col col-12">
25
- <h3>Draft Head</h3> {dataset.draft.head}
26
- </div>
27
- <DatasetHistory datasetId={dataset.id} />
28
- <hr />
29
- <div className="col col-12 dataset-form-controls">
30
- <div className="grid">
31
- <CacheClear datasetId={dataset.id} />
32
- <Link
33
- className="return-link col-middle"
34
- to={`/datasets/${dataset.id}`}>
35
- Return to Dataset
36
- </Link>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- )
42
-
43
- AdminDataset.propTypes = {
44
- dataset: PropTypes.object,
45
- }
46
-
47
- export default AdminDataset
@@ -1,132 +0,0 @@
1
- // dependencies -------------------------------------------------------
2
-
3
- import React from 'react'
4
- import { gql, useMutation } from '@apollo/client'
5
- import Helmet from 'react-helmet'
6
- import { Link } from 'react-router-dom'
7
- import PropTypes from 'prop-types'
8
- import { reexporterLogsURL } from '../../../resources/kibana'
9
- import styled from '@emotion/styled'
10
-
11
- const ButtonsContainer = styled.div({
12
- display: 'flex',
13
- flexDirection: 'column',
14
- alignItems: 'center',
15
- minWidth: '300px',
16
- })
17
-
18
- const NormalizedButton = styled.button({
19
- margin: 0,
20
- fontWeight: 400,
21
- fontSize: '12pt',
22
- textAlign: 'center',
23
- padding: '9px 12px',
24
- width: '100%',
25
- })
26
-
27
- const SuccessMessage = styled.p({
28
- color: 'rgb(92, 184, 92)',
29
- })
30
- const InProgressMessage = styled.p({
31
- color: 'orange',
32
- })
33
- const ErrorMessage = styled.p({
34
- color: 'red',
35
- })
36
-
37
- const DividerContainer = styled.div({
38
- display: 'flex',
39
- justifyContent: 'center',
40
- alignItems: 'center',
41
- width: '100%',
42
- })
43
- const HBar = styled.div({
44
- height: '2px',
45
- backgroundColor: 'lightgrey',
46
- flexGrow: 1,
47
- })
48
- const DividerText = styled.p({
49
- padding: '19px 1rem',
50
- margin: 0,
51
- fontWeight: 400,
52
- fontSize: '14pt',
53
- textAlign: 'center',
54
- })
55
-
56
- const Divider = ({ text }) => (
57
- <DividerContainer>
58
- <HBar />
59
- <DividerText>{text}</DividerText>
60
- <HBar />
61
- </DividerContainer>
62
- )
63
-
64
- Divider.propTypes = {
65
- text: PropTypes.string,
66
- }
67
-
68
- const REEXPORT_REMOTES = gql`
69
- mutation reexportRemotes($datasetId: ID!) {
70
- reexportRemotes(datasetId: $datasetId)
71
- }
72
- `
73
-
74
- const AdminExports = ({ dataset }) => {
75
- const [reexportRemotes, { data, loading, error }] =
76
- useMutation(REEXPORT_REMOTES)
77
- const success = data && data.reexportRemotes
78
- return (
79
- <>
80
- <Helmet>
81
- <title>Admin Dashboard - OpenNeuro</title>
82
- </Helmet>
83
- <div className="dataset-form container">
84
- <div className="grid">
85
- <div className="col col-12 grid m-t-10 m-b-20">
86
- <h3>Admin: Remote Exports</h3>
87
- </div>
88
-
89
- <div className="col col-4">
90
- <ButtonsContainer>
91
- {loading && (
92
- <InProgressMessage>Your export is starting.</InProgressMessage>
93
- )}
94
- {error && <ErrorMessage>An error has occurred.</ErrorMessage>}
95
- {success && (
96
- <SuccessMessage>Your export has begun.</SuccessMessage>
97
- )}
98
- <NormalizedButton
99
- className="n-button on-button--primary"
100
- onClick={() =>
101
- reexportRemotes({ variables: { datasetId: dataset.id } })
102
- }
103
- >
104
- Run Export
105
- </NormalizedButton>
106
- <Divider text="or" />
107
- <NormalizedButton
108
- className="on-button on-button--nobg"
109
- onClick={() => {
110
- window.open(reexporterLogsURL, '_blank')
111
- }}
112
- >
113
- View Export Logs
114
- </NormalizedButton>
115
- </ButtonsContainer>
116
- </div>
117
- <div className="col col-12 m-t-20">
118
- <Link className="return-link m-l-0 " to={`/datasets/${dataset.id}`}>
119
- Return to Dataset
120
- </Link>
121
- </div>
122
- </div>
123
- </div>
124
- </>
125
- )
126
- }
127
-
128
- AdminExports.propTypes = {
129
- dataset: PropTypes.object,
130
- }
131
-
132
- export default AdminExports