@openneuro/app 4.20.5 → 4.20.6-alpha.3

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 (358) hide show
  1. package/__mocks__/fileMock.js +1 -1
  2. package/package.json +5 -5
  3. package/pluralize-esm.js +204 -211
  4. package/src/@types/custom.d.ts +3 -3
  5. package/src/@types/react.d.ts +3 -4
  6. package/src/client.jsx +17 -16
  7. package/src/scripts/__mocks__/config.ts +6 -6
  8. package/src/scripts/__utils__/mock-app-shell.tsx +9 -8
  9. package/src/scripts/apm.js +6 -6
  10. package/src/scripts/app.tsx +7 -7
  11. package/src/scripts/authentication/__tests__/profile.spec.js +10 -10
  12. package/src/scripts/authentication/admin-user.jsx +2 -2
  13. package/src/scripts/authentication/logged-in.jsx +2 -2
  14. package/src/scripts/authentication/logged-out.jsx +2 -2
  15. package/src/scripts/authentication/loginCheck.js +2 -2
  16. package/src/scripts/authentication/loginUrls.ts +1 -1
  17. package/src/scripts/authentication/profile.ts +7 -7
  18. package/src/scripts/authentication/regular-user.tsx +3 -3
  19. package/src/scripts/authentication/signOut.ts +2 -2
  20. package/src/scripts/authentication/withProfile.jsx +6 -6
  21. package/src/scripts/common/block-navigation.jsx +3 -4
  22. package/src/scripts/common/containers/__tests__/header.spec.tsx +16 -16
  23. package/src/scripts/common/containers/footer.tsx +3 -3
  24. package/src/scripts/common/containers/header.tsx +30 -30
  25. package/src/scripts/common/forms/__tests__/warn-button.spec.jsx +6 -6
  26. package/src/scripts/common/forms/warn-button.jsx +21 -17
  27. package/src/scripts/common/partials/block-navigation.jsx +3 -4
  28. package/src/scripts/common/partials/freshdesk-widget.jsx +17 -20
  29. package/src/scripts/common/partials/toast-content.jsx +2 -2
  30. package/src/scripts/components/__tests__/data-table.spec.tsx +7 -7
  31. package/src/scripts/components/data-table.tsx +23 -22
  32. package/src/scripts/config.ts +2 -2
  33. package/src/scripts/datalad/dataset/comments-fragments.js +1 -1
  34. package/src/scripts/datalad/dataset/dataset-context.js +1 -1
  35. package/src/scripts/datalad/dataset/dataset-query-context.js +1 -1
  36. package/src/scripts/datalad/dataset/dataset-query-fragments.js +1 -1
  37. package/src/scripts/datalad/mutations/cache-clear.jsx +7 -6
  38. package/src/scripts/datalad/mutations/cache-id.js +2 -2
  39. package/src/scripts/datalad/mutations/delete-comment.jsx +13 -11
  40. package/src/scripts/datalad/mutations/delete.jsx +10 -9
  41. package/src/scripts/datalad/mutations/follow.jsx +12 -11
  42. package/src/scripts/datalad/mutations/publish.jsx +13 -12
  43. package/src/scripts/datalad/mutations/remove-permissions.jsx +8 -8
  44. package/src/scripts/datalad/mutations/revalidate.jsx +7 -6
  45. package/src/scripts/datalad/mutations/snapshot.tsx +7 -7
  46. package/src/scripts/datalad/mutations/star.jsx +12 -11
  47. package/src/scripts/datalad/mutations/submit-metadata.jsx +14 -12
  48. package/src/scripts/datalad/mutations/update-permissions.jsx +14 -13
  49. package/src/scripts/datalad/mutations/update-ref.jsx +7 -6
  50. package/src/scripts/datalad/routes/dataset-redirect.tsx +49 -49
  51. package/src/scripts/datalad/subscriptions/__tests__/files-subscription.spec.jsx +32 -32
  52. package/src/scripts/datalad/subscriptions/files-subscription.jsx +16 -16
  53. package/src/scripts/datalad/subscriptions/useDatasetDeletedSubscription.jsx +4 -4
  54. package/src/scripts/datalad/subscriptions/useDraftSubscription.js +4 -4
  55. package/src/scripts/datalad/subscriptions/usePermissionsSubscription.js +4 -4
  56. package/src/scripts/datalad/subscriptions/useSnapshotsUpdatedSubscriptions.js +3 -3
  57. package/src/scripts/dataset/__tests__/__snapshots__/snapshot-container.spec.tsx.snap +2 -2
  58. package/src/scripts/dataset/__tests__/snapshot-container.spec.tsx +12 -12
  59. package/src/scripts/dataset/comments/__tests__/comment.spec.jsx +21 -21
  60. package/src/scripts/dataset/comments/__tests__/comments.spec.jsx +10 -10
  61. package/src/scripts/dataset/comments/block-style-controls.jsx +15 -15
  62. package/src/scripts/dataset/comments/comment-editor.jsx +31 -31
  63. package/src/scripts/dataset/comments/comment.jsx +50 -50
  64. package/src/scripts/dataset/comments/comments.jsx +24 -22
  65. package/src/scripts/dataset/comments/inline-style-controls.jsx +9 -9
  66. package/src/scripts/dataset/comments/style-button.jsx +8 -9
  67. package/src/scripts/dataset/common/follow-toggles.tsx +3 -3
  68. package/src/scripts/dataset/dataset-query-context.js +1 -1
  69. package/src/scripts/dataset/dataset-query.jsx +34 -31
  70. package/src/scripts/dataset/dataset-routes.jsx +5 -5
  71. package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +13 -13
  72. package/src/scripts/dataset/download/__tests__/download-link.spec.jsx +10 -10
  73. package/src/scripts/dataset/download/__tests__/download-native.spec.js +7 -7
  74. package/src/scripts/dataset/download/__tests__/shell-example.spec.jsx +5 -5
  75. package/src/scripts/dataset/download/download-command-line.jsx +9 -7
  76. package/src/scripts/dataset/download/download-datalad.jsx +22 -20
  77. package/src/scripts/dataset/download/download-derivative-datalad.tsx +2 -2
  78. package/src/scripts/dataset/download/download-derivative-s3.tsx +2 -2
  79. package/src/scripts/dataset/download/download-link.jsx +6 -6
  80. package/src/scripts/dataset/download/download-native.js +20 -19
  81. package/src/scripts/dataset/download/download-query.js +2 -3
  82. package/src/scripts/dataset/download/download-s3.jsx +8 -8
  83. package/src/scripts/dataset/download/download-script.tsx +23 -20
  84. package/src/scripts/dataset/download/native-file-toast.jsx +13 -11
  85. package/src/scripts/dataset/download/shell-example.jsx +1 -1
  86. package/src/scripts/dataset/download/track-download.js +5 -5
  87. package/src/scripts/dataset/draft-container.tsx +104 -102
  88. package/src/scripts/dataset/draft-snapshot-routes.tsx +3 -3
  89. package/src/scripts/dataset/files/__tests__/file-tree-unloaded-directory.spec.jsx +23 -23
  90. package/src/scripts/dataset/files/__tests__/file-tree.spec.jsx +57 -58
  91. package/src/scripts/dataset/files/__tests__/file-viewer-type.spec.jsx +6 -6
  92. package/src/scripts/dataset/files/__tests__/file.spec.jsx +15 -15
  93. package/src/scripts/dataset/files/file-display.jsx +11 -11
  94. package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +10 -10
  95. package/src/scripts/dataset/files/file-tree.tsx +27 -27
  96. package/src/scripts/dataset/files/file-view.jsx +4 -4
  97. package/src/scripts/dataset/files/file-viewer-type.jsx +21 -21
  98. package/src/scripts/dataset/files/file.tsx +85 -80
  99. package/src/scripts/dataset/files/files.tsx +41 -40
  100. package/src/scripts/dataset/files/index.tsx +2 -2
  101. package/src/scripts/dataset/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -24
  102. package/src/scripts/dataset/files/viewers/__tests__/file-viewer-json.spec.jsx +9 -9
  103. package/src/scripts/dataset/files/viewers/__tests__/parse-tabular.spec.js +8 -8
  104. package/src/scripts/dataset/files/viewers/file-viewer-csv.jsx +5 -5
  105. package/src/scripts/dataset/files/viewers/file-viewer-html.jsx +3 -3
  106. package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +4 -4
  107. package/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx +4 -4
  108. package/src/scripts/dataset/files/viewers/file-viewer-table.tsx +3 -3
  109. package/src/scripts/dataset/files/viewers/file-viewer-text.jsx +3 -3
  110. package/src/scripts/dataset/files/viewers/file-viewer-tsv.jsx +5 -5
  111. package/src/scripts/dataset/files/viewers/parse-tabular.js +4 -4
  112. package/src/scripts/dataset/fragments/__tests__/cancel-button.spec.tsx +5 -5
  113. package/src/scripts/dataset/fragments/__tests__/dataset-alert-draft.spec.tsx +9 -9
  114. package/src/scripts/dataset/fragments/__tests__/dataset-citation.spec.jsx +10 -10
  115. package/src/scripts/dataset/fragments/__tests__/doi-link.spec.tsx +29 -29
  116. package/src/scripts/dataset/fragments/__tests__/edit-button.spec.tsx +5 -5
  117. package/src/scripts/dataset/fragments/__tests__/edit-list.spec.jsx +13 -13
  118. package/src/scripts/dataset/fragments/__tests__/save-button.spec.tsx +5 -5
  119. package/src/scripts/dataset/fragments/__tests__/select-input.spec.tsx +26 -26
  120. package/src/scripts/dataset/fragments/cancel-button.tsx +2 -2
  121. package/src/scripts/dataset/fragments/comments-fragments.js +1 -1
  122. package/src/scripts/dataset/fragments/copyable-tooltip.jsx +14 -13
  123. package/src/scripts/dataset/fragments/dataset-alert-draft.tsx +17 -13
  124. package/src/scripts/dataset/fragments/dataset-alert-version.tsx +5 -4
  125. package/src/scripts/dataset/fragments/dataset-citation.jsx +23 -21
  126. package/src/scripts/dataset/fragments/dataset-history.jsx +12 -12
  127. package/src/scripts/dataset/fragments/dataset-reviewers.ts +1 -1
  128. package/src/scripts/dataset/fragments/doi-link.tsx +6 -6
  129. package/src/scripts/dataset/fragments/edit-button.tsx +2 -2
  130. package/src/scripts/dataset/fragments/edit-description-field.jsx +23 -21
  131. package/src/scripts/dataset/fragments/edit-description-list.jsx +8 -8
  132. package/src/scripts/dataset/fragments/edit-list.jsx +8 -8
  133. package/src/scripts/dataset/fragments/number-input.tsx +36 -35
  134. package/src/scripts/dataset/fragments/save-button.tsx +2 -2
  135. package/src/scripts/dataset/fragments/select-input.tsx +87 -86
  136. package/src/scripts/dataset/fragments/text-array-input.tsx +38 -37
  137. package/src/scripts/dataset/fragments/text-input.tsx +79 -78
  138. package/src/scripts/dataset/mutations/__tests__/cache-id.spec.js +5 -5
  139. package/src/scripts/dataset/mutations/__tests__/delete-file.spec.jsx +85 -83
  140. package/src/scripts/dataset/mutations/__tests__/delete.spec.jsx +8 -8
  141. package/src/scripts/dataset/mutations/__tests__/deprecate-snapshot.spec.tsx +17 -17
  142. package/src/scripts/dataset/mutations/__tests__/deprecate-version.spec.tsx +19 -19
  143. package/src/scripts/dataset/mutations/__tests__/description.spec.jsx +51 -51
  144. package/src/scripts/dataset/mutations/__tests__/remove-permissions.spec.tsx +9 -9
  145. package/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx +7 -7
  146. package/src/scripts/dataset/mutations/admin-exports.jsx +13 -12
  147. package/src/scripts/dataset/mutations/cache-clear.jsx +6 -6
  148. package/src/scripts/dataset/mutations/cache-id.js +2 -2
  149. package/src/scripts/dataset/mutations/comment.jsx +25 -23
  150. package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +36 -30
  151. package/src/scripts/dataset/mutations/dataset-relations.tsx +28 -29
  152. package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +7 -8
  153. package/src/scripts/dataset/mutations/delete-comment.jsx +14 -12
  154. package/src/scripts/dataset/mutations/delete-dataset-form.jsx +20 -22
  155. package/src/scripts/dataset/mutations/delete-file.jsx +8 -8
  156. package/src/scripts/dataset/mutations/delete.jsx +10 -9
  157. package/src/scripts/dataset/mutations/deprecate-version.tsx +5 -6
  158. package/src/scripts/dataset/mutations/description.jsx +21 -20
  159. package/src/scripts/dataset/mutations/flag-annex-object.jsx +10 -9
  160. package/src/scripts/dataset/mutations/follow.tsx +15 -14
  161. package/src/scripts/dataset/mutations/import-dataset.tsx +5 -5
  162. package/src/scripts/dataset/mutations/metadata-form.jsx +94 -97
  163. package/src/scripts/dataset/mutations/publish.jsx +13 -13
  164. package/src/scripts/dataset/mutations/readme.jsx +12 -11
  165. package/src/scripts/dataset/mutations/remove-annex-object.jsx +10 -9
  166. package/src/scripts/dataset/mutations/remove-permissions.tsx +5 -6
  167. package/src/scripts/dataset/mutations/revalidate.jsx +7 -7
  168. package/src/scripts/dataset/mutations/snapshot.tsx +8 -8
  169. package/src/scripts/dataset/mutations/star.tsx +14 -13
  170. package/src/scripts/dataset/mutations/submit-metadata.jsx +12 -11
  171. package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +5 -6
  172. package/src/scripts/dataset/mutations/update-file.jsx +6 -6
  173. package/src/scripts/dataset/mutations/update-permissions.tsx +9 -9
  174. package/src/scripts/dataset/mutations/update-ref.jsx +7 -7
  175. package/src/scripts/dataset/routes/__tests__/deprecate-snapshot-page.spec.tsx +5 -5
  176. package/src/scripts/dataset/routes/add-metadata.jsx +19 -20
  177. package/src/scripts/dataset/routes/admin-datalad.jsx +7 -7
  178. package/src/scripts/dataset/routes/dataset-default.tsx +12 -10
  179. package/src/scripts/dataset/routes/delete-page.tsx +12 -12
  180. package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +8 -8
  181. package/src/scripts/dataset/routes/derivatives.tsx +10 -10
  182. package/src/scripts/dataset/routes/download-dataset.tsx +20 -20
  183. package/src/scripts/dataset/routes/manage-anonymous-reviewers.tsx +37 -35
  184. package/src/scripts/dataset/routes/manage-permissions.jsx +22 -22
  185. package/src/scripts/dataset/routes/publish.jsx +32 -30
  186. package/src/scripts/dataset/routes/snapshot-default.tsx +7 -7
  187. package/src/scripts/dataset/routes/snapshot.tsx +44 -43
  188. package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +3 -3
  189. package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +3 -3
  190. package/src/scripts/dataset/routes/styles/header-row.tsx +3 -3
  191. package/src/scripts/dataset/routes/tab-routes-draft.tsx +12 -12
  192. package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +8 -8
  193. package/src/scripts/dataset/snapshot-container.tsx +78 -86
  194. package/src/scripts/errors/403page.tsx +11 -11
  195. package/src/scripts/errors/404page.tsx +12 -12
  196. package/src/scripts/errors/errorBoundary.jsx +13 -12
  197. package/src/scripts/errors/errorRoute.jsx +6 -6
  198. package/src/scripts/errors/freshdesk-widget.jsx +17 -20
  199. package/src/scripts/errors/freshdeskInterface.jsx +9 -9
  200. package/src/scripts/errors/orcid/email.jsx +3 -3
  201. package/src/scripts/errors/orcid/family.jsx +4 -4
  202. package/src/scripts/errors/orcid/general.jsx +1 -1
  203. package/src/scripts/errors/orcid/given.jsx +4 -4
  204. package/src/scripts/fixtures/dataset-query.ts +119 -119
  205. package/src/scripts/fixtures/mock-app-wrapper.tsx +4 -4
  206. package/src/scripts/index.tsx +9 -9
  207. package/src/scripts/pages/admin/admin.jsx +5 -5
  208. package/src/scripts/pages/admin/flagged-files.jsx +33 -31
  209. package/src/scripts/pages/admin/user-fragment.ts +1 -1
  210. package/src/scripts/pages/admin/user-tools.tsx +13 -11
  211. package/src/scripts/pages/admin/users.jsx +38 -39
  212. package/src/scripts/pages/api.jsx +20 -19
  213. package/src/scripts/pages/citation-page.tsx +4 -4
  214. package/src/scripts/pages/faq/faq.tsx +2 -2
  215. package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -5
  216. package/src/scripts/pages/front-page/aggregate-queries/use-participant-count.ts +2 -2
  217. package/src/scripts/pages/front-page/aggregate-queries/use-publicDatasets-count.ts +2 -2
  218. package/src/scripts/pages/front-page/front-page-content.ts +42 -42
  219. package/src/scripts/pages/front-page/front-page.tsx +18 -14
  220. package/src/scripts/pages/front-page-comp.tsx +3 -3
  221. package/src/scripts/pages/import-dataset.tsx +10 -10
  222. package/src/scripts/pages/metadata/dataset-metadata.tsx +15 -14
  223. package/src/scripts/pages/pet-redirect.tsx +2 -2
  224. package/src/scripts/queries/dataset.ts +3 -3
  225. package/src/scripts/resources/__tests__/kibana.spec.js +9 -9
  226. package/src/scripts/resources/kibana.js +3 -3
  227. package/src/scripts/resources/strings.js +2 -2
  228. package/src/scripts/routes.tsx +14 -14
  229. package/src/scripts/search/__helpers__/search-render.tsx +3 -3
  230. package/src/scripts/search/__tests__/search-container.spec.tsx +22 -22
  231. package/src/scripts/search/__tests__/search-params-ctx.spec.tsx +20 -20
  232. package/src/scripts/search/es-query-builders.ts +21 -5
  233. package/src/scripts/search/filters-block-container.tsx +14 -16
  234. package/src/scripts/search/initial-search-params.tsx +45 -45
  235. package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +23 -23
  236. package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +12 -12
  237. package/src/scripts/search/inputs/age-range-input.tsx +9 -8
  238. package/src/scripts/search/inputs/author-input.tsx +14 -11
  239. package/src/scripts/search/inputs/date-radios.tsx +8 -7
  240. package/src/scripts/search/inputs/diagnosis-select.tsx +6 -6
  241. package/src/scripts/search/inputs/index.ts +33 -33
  242. package/src/scripts/search/inputs/keyword-input.tsx +13 -13
  243. package/src/scripts/search/inputs/modality-select.tsx +33 -30
  244. package/src/scripts/search/inputs/pet/bodyParts_input.tsx +18 -16
  245. package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +18 -16
  246. package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +18 -16
  247. package/src/scripts/search/inputs/pet/tracerNames_input.tsx +16 -15
  248. package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +18 -16
  249. package/src/scripts/search/inputs/section-select.tsx +6 -6
  250. package/src/scripts/search/inputs/sex-radios.tsx +6 -6
  251. package/src/scripts/search/inputs/show-datasets-radios.tsx +31 -29
  252. package/src/scripts/search/inputs/sort-by-select.tsx +10 -11
  253. package/src/scripts/search/inputs/species-select.tsx +6 -6
  254. package/src/scripts/search/inputs/study-domain-input.tsx +18 -16
  255. package/src/scripts/search/inputs/subject-count-range-input.tsx +8 -7
  256. package/src/scripts/search/inputs/task-input.tsx +18 -16
  257. package/src/scripts/search/search-container.tsx +83 -85
  258. package/src/scripts/search/search-params-ctx.tsx +40 -38
  259. package/src/scripts/search/search-routes.tsx +4 -4
  260. package/src/scripts/search/use-search-results.tsx +125 -99
  261. package/src/scripts/styles/media.tsx +3 -3
  262. package/src/scripts/styles/support-modal.jsx +2 -2
  263. package/src/scripts/sw.ts +12 -11
  264. package/src/scripts/test-utils.js +4 -4
  265. package/src/scripts/uploader/add-path-to-files.js +7 -7
  266. package/src/scripts/uploader/file-select.tsx +3 -3
  267. package/src/scripts/uploader/file-upload.js +13 -12
  268. package/src/scripts/uploader/input.jsx +8 -7
  269. package/src/scripts/uploader/upload-button.jsx +3 -3
  270. package/src/scripts/uploader/upload-disclaimer-input.tsx +66 -66
  271. package/src/scripts/uploader/upload-disclaimer.jsx +6 -5
  272. package/src/scripts/uploader/upload-file-status.jsx +4 -4
  273. package/src/scripts/uploader/upload-issues.jsx +32 -29
  274. package/src/scripts/uploader/upload-metadata.jsx +18 -17
  275. package/src/scripts/uploader/upload-mutation.js +17 -20
  276. package/src/scripts/uploader/upload-progress-button.jsx +5 -4
  277. package/src/scripts/uploader/upload-progress.jsx +3 -3
  278. package/src/scripts/uploader/upload-rename.jsx +6 -5
  279. package/src/scripts/uploader/upload-resume.jsx +26 -24
  280. package/src/scripts/uploader/upload-select.jsx +10 -9
  281. package/src/scripts/uploader/upload-status.jsx +5 -5
  282. package/src/scripts/uploader/upload-step.jsx +9 -9
  283. package/src/scripts/uploader/uploader-context.js +1 -1
  284. package/src/scripts/uploader/uploader-location.js +1 -1
  285. package/src/scripts/uploader/uploader-modal.jsx +8 -7
  286. package/src/scripts/uploader/uploader-setup-routes.jsx +10 -10
  287. package/src/scripts/uploader/uploader-status-routes.jsx +6 -6
  288. package/src/scripts/uploader/uploader-view.jsx +4 -4
  289. package/src/scripts/uploader/uploader.jsx +50 -48
  290. package/src/scripts/users/username.tsx +3 -3
  291. package/src/scripts/utils/__tests__/csv.spec.ts +16 -16
  292. package/src/scripts/utils/__tests__/date.spec.js +4 -4
  293. package/src/scripts/utils/__tests__/json-ld.spec.js +12 -12
  294. package/src/scripts/utils/__tests__/newid.spec.js +9 -9
  295. package/src/scripts/utils/__tests__/userNotify.spec.js +10 -10
  296. package/src/scripts/utils/analytics.tsx +3 -3
  297. package/src/scripts/utils/cookies.js +1 -1
  298. package/src/scripts/utils/csv.ts +13 -15
  299. package/src/scripts/utils/datalad.js +1 -1
  300. package/src/scripts/utils/dataset-url.js +2 -2
  301. package/src/scripts/utils/date.js +2 -2
  302. package/src/scripts/utils/global-polyfill.ts +2 -2
  303. package/src/scripts/utils/gtag.js +6 -6
  304. package/src/scripts/utils/json-ld.js +13 -13
  305. package/src/scripts/utils/newid.js +1 -1
  306. package/src/scripts/utils/user-login-modal-ctx.tsx +4 -4
  307. package/src/scripts/utils/userNotify.js +2 -2
  308. package/src/scripts/validation/validation-panel.jsx +3 -3
  309. package/src/scripts/validation/validation-results.issues.issue.jsx +9 -9
  310. package/src/scripts/validation/validation-results.issues.jsx +19 -17
  311. package/src/scripts/validation/validation-results.jsx +10 -10
  312. package/src/scripts/validation/validation-status.jsx +19 -17
  313. package/src/scripts/validation/validation.jsx +5 -5
  314. package/src/scripts/workers/schema.ts +2 -2
  315. package/src/scripts/workers/schema.worker.ts +4 -4
  316. package/src/scripts/workers/validate.ts +2 -2
  317. package/src/scripts/workers/validate.worker.ts +7 -5
  318. package/vite.config.js +17 -17
  319. package/src/dist/assets/activity-icon.9ab0c828.png +0 -0
  320. package/src/dist/assets/bids.da8810b3.jpg +0 -0
  321. package/src/dist/assets/brand_mark.28e7645d.png +0 -0
  322. package/src/dist/assets/close-button.21e700a6.png +0 -0
  323. package/src/dist/assets/cube-get.39ed5636.png +0 -0
  324. package/src/dist/assets/cube-share.9b558c29.png +0 -0
  325. package/src/dist/assets/cube-use.ccf2ddc5.png +0 -0
  326. package/src/dist/assets/datalad.a35b15b8.jpg +0 -0
  327. package/src/dist/assets/eeg.1dc1dc54.jpg +0 -0
  328. package/src/dist/assets/email-header.1cb8bf76.png +0 -0
  329. package/src/dist/assets/ieeg.f91deb0a.jpg +0 -0
  330. package/src/dist/assets/index.3db805fb.js +0 -23127
  331. package/src/dist/assets/index.3db805fb.js.map +0 -1
  332. package/src/dist/assets/index.5eb79d2c.css +0 -1
  333. package/src/dist/assets/ljaf.567e9566.png +0 -0
  334. package/src/dist/assets/logo_app.8c986cf9.png +0 -0
  335. package/src/dist/assets/logo_cube.5224b745.png +0 -0
  336. package/src/dist/assets/logo_data.3e1d5743.png +0 -0
  337. package/src/dist/assets/logo_users.a84a265a.png +0 -0
  338. package/src/dist/assets/meg.1e1928f8.jpg +0 -0
  339. package/src/dist/assets/mri.b01e4f42.jpg +0 -0
  340. package/src/dist/assets/nih-bi-logo.80d76e1d.png +0 -0
  341. package/src/dist/assets/nih-stanford.2a7c496e.jpg +0 -0
  342. package/src/dist/assets/nih.78a64d38.png +0 -0
  343. package/src/dist/assets/nimh.0ec775d8.png +0 -0
  344. package/src/dist/assets/nru-logo.f3097dc5.png +0 -0
  345. package/src/dist/assets/nsf.eee1d3f7.png +0 -0
  346. package/src/dist/assets/nsf.f87e96e7.png +0 -0
  347. package/src/dist/assets/on-dark-horz.e1f213d0.svg +0 -1
  348. package/src/dist/assets/on-dark.12f4e2ce.svg +0 -1
  349. package/src/dist/assets/on-light-horz.23ff22c3.svg +0 -1
  350. package/src/dist/assets/on-light.50592f7f.svg +0 -1
  351. package/src/dist/assets/pet-scan.21d98a3d.jpg +0 -0
  352. package/src/dist/assets/revicons.4ca02b8a.ttf +0 -0
  353. package/src/dist/assets/revicons.9e4d4c68.eot +0 -0
  354. package/src/dist/assets/revicons.f7b9c306.woff +0 -0
  355. package/src/dist/assets/sqm-logo.9cd0cca5.png +0 -0
  356. package/src/dist/assets/squishymedia.fa3c5919.png +0 -0
  357. package/src/dist/assets/stanford.5f245936.png +0 -0
  358. package/src/dist/index.html +0 -25
@@ -1,26 +1,26 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import TextInput from '../fragments/text-input'
4
- import SelectInput from '../fragments/select-input'
5
- import NumberInput from '../fragments/number-input'
6
- import TextArrayInput from '../fragments/text-array-input'
7
- import styled from '@emotion/styled'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import TextInput from "../fragments/text-input"
4
+ import SelectInput from "../fragments/select-input"
5
+ import NumberInput from "../fragments/number-input"
6
+ import TextArrayInput from "../fragments/text-array-input"
7
+ import styled from "@emotion/styled"
8
8
 
9
9
  const Form = styled.form({
10
- width: '100%',
11
- maxWidth: '700px',
12
- margin: '10px 0',
10
+ width: "100%",
11
+ maxWidth: "700px",
12
+ margin: "10px 0",
13
13
  })
14
14
  const InfoText = styled.p({
15
15
  fontWeight: 100,
16
- textAlign: 'left',
16
+ textAlign: "left",
17
17
  })
18
18
  const DisabledNote = styled.div({
19
- display: 'flex',
20
- color: '#5cb85c',
21
- alignItems: 'center',
19
+ display: "flex",
20
+ color: "#5cb85c",
21
+ alignItems: "center",
22
22
  i: {
23
- marginRight: '0.5rem',
23
+ marginRight: "0.5rem",
24
24
  },
25
25
  p: {
26
26
  margin: 0,
@@ -28,57 +28,57 @@ const DisabledNote = styled.div({
28
28
  })
29
29
 
30
30
  const ValidationError = styled.div({
31
- display: 'flex',
32
- color: 'red',
31
+ display: "flex",
32
+ color: "red",
33
33
 
34
34
  i: {
35
- marginRight: '0.5rem',
35
+ marginRight: "0.5rem",
36
36
  },
37
37
  })
38
38
 
39
- const metadataFields = hasEdit => {
39
+ const metadataFields = (hasEdit) => {
40
40
  const fields = [
41
41
  {
42
- key: 'associatedPaperDOI',
43
- label: 'DOI of papers from the source data lab',
42
+ key: "associatedPaperDOI",
43
+ label: "DOI of papers from the source data lab",
44
44
  hoverText:
45
- 'Papers that were published from the Lab that collected this dataset',
45
+ "Papers that were published from the Lab that collected this dataset",
46
46
  component: TextInput,
47
47
  additionalProps: {
48
48
  required: false,
49
49
  },
50
50
  },
51
51
  {
52
- key: 'species',
53
- label: 'Species',
52
+ key: "species",
53
+ label: "Species",
54
54
  component: SelectInput,
55
55
  additionalProps: {
56
- options: [{ value: 'Human' }, { value: 'Rat' }, { value: 'Mouse' }],
56
+ options: [{ value: "Human" }, { value: "Rat" }, { value: "Mouse" }],
57
57
  showOptionOther: true,
58
58
  required: false,
59
59
  },
60
60
  },
61
61
  {
62
- key: 'studyLongitudinal',
63
- label: 'Study Type',
62
+ key: "studyLongitudinal",
63
+ label: "Study Type",
64
64
  component: SelectInput,
65
65
  additionalProps: {
66
- options: [{ value: 'Longitudinal' }, { value: 'Cross-Sectional' }],
66
+ options: [{ value: "Longitudinal" }, { value: "Cross-Sectional" }],
67
67
  showOptionOther: true,
68
68
  required: false,
69
69
  },
70
70
  },
71
71
  {
72
- key: 'studyDomain',
73
- label: 'Domain Studied',
72
+ key: "studyDomain",
73
+ label: "Domain Studied",
74
74
  component: TextInput,
75
75
  additionalProps: {
76
76
  required: false,
77
77
  },
78
78
  },
79
79
  {
80
- key: 'trialCount',
81
- label: 'Number of Trials (if applicable)',
80
+ key: "trialCount",
81
+ label: "Number of Trials (if applicable)",
82
82
  component: NumberInput,
83
83
  additionalProps: {
84
84
  min: -1,
@@ -86,40 +86,40 @@ const metadataFields = hasEdit => {
86
86
  },
87
87
  },
88
88
  {
89
- key: 'studyDesign',
90
- label: 'Study Design',
89
+ key: "studyDesign",
90
+ label: "Study Design",
91
91
  component: TextInput,
92
92
  additionalProps: {
93
93
  required: false,
94
94
  },
95
95
  },
96
96
  {
97
- key: 'openneuroPaperDOI',
98
- label: 'Papers published from this dataset',
99
- hoverText: 'Papers that were published from downloading this dataset',
97
+ key: "openneuroPaperDOI",
98
+ label: "Papers published from this dataset",
99
+ hoverText: "Papers that were published from downloading this dataset",
100
100
  component: TextInput,
101
101
  additionalProps: {
102
102
  required: false,
103
103
  },
104
104
  },
105
105
  {
106
- key: 'dxStatus',
107
- label: 'DX status(es)',
106
+ key: "dxStatus",
107
+ label: "DX status(es)",
108
108
  component: SelectInput,
109
109
  additionalProps: {
110
110
  options: [
111
- { value: 'Healthy / Control' },
112
- { value: 'Schizophrenia' },
113
- { value: 'ADD/ADHD' },
114
- { value: 'Alzheimers' },
111
+ { value: "Healthy / Control" },
112
+ { value: "Schizophrenia" },
113
+ { value: "ADD/ADHD" },
114
+ { value: "Alzheimers" },
115
115
  ],
116
116
  showOptionOther: true,
117
117
  required: false,
118
118
  },
119
119
  },
120
120
  {
121
- key: 'tasksCompleted',
122
- label: 'Tasks Completed',
121
+ key: "tasksCompleted",
122
+ label: "Tasks Completed",
123
123
  component: TextArrayInput,
124
124
  additionalProps: {
125
125
  disabled: true,
@@ -128,24 +128,24 @@ const metadataFields = hasEdit => {
128
128
  },
129
129
  },
130
130
  {
131
- key: 'grantFunderName',
132
- label: 'Grant Funder Name',
131
+ key: "grantFunderName",
132
+ label: "Grant Funder Name",
133
133
  component: TextInput,
134
134
  additionalProps: {
135
135
  required: false,
136
136
  },
137
137
  },
138
138
  {
139
- key: 'grantIdentifier',
140
- label: 'Grant Identifier',
139
+ key: "grantIdentifier",
140
+ label: "Grant Identifier",
141
141
  component: TextInput,
142
142
  additionalProps: {
143
143
  required: false,
144
144
  },
145
145
  },
146
146
  {
147
- key: 'datasetId',
148
- label: 'Dataset ID',
147
+ key: "datasetId",
148
+ label: "Dataset ID",
149
149
  component: TextInput,
150
150
  additionalProps: {
151
151
  disabled: true,
@@ -154,8 +154,8 @@ const metadataFields = hasEdit => {
154
154
  },
155
155
  },
156
156
  {
157
- key: 'datasetUrl',
158
- label: 'Dataset URL',
157
+ key: "datasetUrl",
158
+ label: "Dataset URL",
159
159
  component: TextInput,
160
160
  additionalProps: {
161
161
  disabled: true,
@@ -164,8 +164,8 @@ const metadataFields = hasEdit => {
164
164
  },
165
165
  },
166
166
  {
167
- key: 'datasetName',
168
- label: 'Dataset Name',
167
+ key: "datasetName",
168
+ label: "Dataset Name",
169
169
  component: TextInput,
170
170
  additionalProps: {
171
171
  disabled: true,
@@ -174,10 +174,10 @@ const metadataFields = hasEdit => {
174
174
  },
175
175
  },
176
176
  {
177
- key: 'seniorAuthor',
178
- label: 'Senior Author (Last, First)',
177
+ key: "seniorAuthor",
178
+ label: "Senior Author (Last, First)",
179
179
  hoverText:
180
- 'Please list the senior author as the last author in the dataset_description.json file field Authors',
180
+ "Please list the senior author as the last author in the dataset_description.json file field Authors",
181
181
  component: TextInput,
182
182
  additionalProps: {
183
183
  disabled: true,
@@ -186,8 +186,8 @@ const metadataFields = hasEdit => {
186
186
  },
187
187
  },
188
188
  {
189
- key: 'adminUsers',
190
- label: 'Admin Users (email)',
189
+ key: "adminUsers",
190
+ label: "Admin Users (email)",
191
191
  component: TextArrayInput,
192
192
  additionalProps: {
193
193
  disabled: true,
@@ -196,30 +196,30 @@ const metadataFields = hasEdit => {
196
196
  },
197
197
  },
198
198
  {
199
- key: 'firstSnapshotCreatedAt',
200
- label: 'First Snapshot (Publish) Date',
199
+ key: "firstSnapshotCreatedAt",
200
+ label: "First Snapshot (Publish) Date",
201
201
  component: TextInput,
202
202
  additionalProps: {
203
203
  disabled: true,
204
204
  annotated: true,
205
- nullMessage: 'dataset has no snapshots',
205
+ nullMessage: "dataset has no snapshots",
206
206
  required: false,
207
207
  },
208
208
  },
209
209
  {
210
- key: 'latestSnapshotCreatedAt',
211
- label: 'Most Recent Snapshot Date',
210
+ key: "latestSnapshotCreatedAt",
211
+ label: "Most Recent Snapshot Date",
212
212
  component: TextInput,
213
213
  additionalProps: {
214
214
  disabled: true,
215
215
  annotated: true,
216
- nullMessage: 'dataset has no snapshots',
216
+ nullMessage: "dataset has no snapshots",
217
217
  required: false,
218
218
  },
219
219
  },
220
220
  {
221
- key: 'ages',
222
- label: 'Subject Age(s)',
221
+ key: "ages",
222
+ label: "Subject Age(s)",
223
223
  // text input because field is read-only
224
224
  component: TextInput,
225
225
  additionalProps: {
@@ -227,18 +227,18 @@ const metadataFields = hasEdit => {
227
227
  annotated: true,
228
228
  required: false,
229
229
  },
230
- transformValue: value => {
230
+ transformValue: (value) => {
231
231
  if (Array.isArray(value)) {
232
- const ages = value.filter(x => x)
233
- if (ages.length === 0) return 'N/A'
232
+ const ages = value.filter((x) => x)
233
+ if (ages.length === 0) return "N/A"
234
234
  else if (ages.length === 1) return ages[0]
235
235
  else return `${Math.min(...ages)} - ${Math.max(...ages)}`
236
- } else if (value === undefined) return 'N/A'
236
+ } else if (value === undefined) return "N/A"
237
237
  },
238
238
  },
239
239
  {
240
- key: 'modalities',
241
- label: 'Modalities Available',
240
+ key: "modalities",
241
+ label: "Modalities Available",
242
242
  component: TextArrayInput,
243
243
  additionalProps: {
244
244
  disabled: true,
@@ -247,8 +247,8 @@ const metadataFields = hasEdit => {
247
247
  },
248
248
  },
249
249
  {
250
- key: 'dataProcessed',
251
- label: 'Has Processed Data',
250
+ key: "dataProcessed",
251
+ label: "Has Processed Data",
252
252
  component: TextInput,
253
253
  additionalProps: {
254
254
  disabled: true,
@@ -257,18 +257,18 @@ const metadataFields = hasEdit => {
257
257
  },
258
258
  },
259
259
  {
260
- key: 'affirmedDefaced',
261
- label: 'Uploader Affirmed Structural Scans Are Defaced',
260
+ key: "affirmedDefaced",
261
+ label: "Uploader Affirmed Structural Scans Are Defaced",
262
262
  component: SelectInput,
263
263
  additionalProps: {
264
264
  options: [
265
265
  {
266
266
  value: true,
267
- text: 'true',
267
+ text: "true",
268
268
  },
269
269
  {
270
270
  value: false,
271
- text: 'false',
271
+ text: "false",
272
272
  },
273
273
  ],
274
274
  hasBooleanValues: true,
@@ -277,22 +277,22 @@ const metadataFields = hasEdit => {
277
277
  annotated: false,
278
278
  required: false,
279
279
  warningOnChange:
280
- 'Details: Affirms or refutes that all structural scans have been defaced, obscuring any tissue on or near the face that could potentially be used to reconstruct the facial structure.',
280
+ "Details: Affirms or refutes that all structural scans have been defaced, obscuring any tissue on or near the face that could potentially be used to reconstruct the facial structure.",
281
281
  },
282
282
  },
283
283
  {
284
- key: 'affirmedConsent',
285
- label: 'Uploader Affirmed Consent To Publish Scans Without Defacing',
284
+ key: "affirmedConsent",
285
+ label: "Uploader Affirmed Consent To Publish Scans Without Defacing",
286
286
  component: SelectInput,
287
287
  additionalProps: {
288
288
  options: [
289
289
  {
290
290
  value: true,
291
- text: 'true',
291
+ text: "true",
292
292
  },
293
293
  {
294
294
  value: false,
295
- text: 'false',
295
+ text: "false",
296
296
  },
297
297
  ],
298
298
  hasBooleanValues: true,
@@ -301,16 +301,14 @@ const metadataFields = hasEdit => {
301
301
  annotated: false,
302
302
  required: false,
303
303
  warningOnChange:
304
- 'Details: Affirms or refutes that I have explicit participant consent and ethical authorization to publish structural scans without defacing',
304
+ "Details: Affirms or refutes that I have explicit participant consent and ethical authorization to publish structural scans without defacing",
305
305
  },
306
306
  },
307
307
  ]
308
- return hasEdit
309
- ? fields
310
- : fields.map(field => {
311
- field.additionalProps.disabled = true
312
- return field
313
- })
308
+ return hasEdit ? fields : fields.map((field) => {
309
+ field.additionalProps.disabled = true
310
+ return field
311
+ })
314
312
  }
315
313
 
316
314
  const MetadataForm = ({
@@ -341,8 +339,7 @@ const MetadataForm = ({
341
339
  {metadataFields(hasEdit)
342
340
  .filter(
343
341
  // remove disabled fields when hideDisabled is true
344
- field =>
345
- !(hideDisabled && field.additionalProps.disabled) &&
342
+ (field) => !(hideDisabled && field.additionalProps.disabled) &&
346
343
  !hiddenFields.includes(field.key),
347
344
  )
348
345
  .map(
@@ -361,9 +358,9 @@ const MetadataForm = ({
361
358
  name={key}
362
359
  label={label}
363
360
  hoverText={hoverText}
364
- value={
365
- transformValue ? transformValue(values?.[key]) : values?.[key]
366
- }
361
+ value={transformValue
362
+ ? transformValue(values?.[key])
363
+ : values?.[key]}
367
364
  onChange={onChange}
368
365
  {...additionalProps}
369
366
  key={i}
@@ -1,10 +1,10 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { gql } from '@apollo/client'
4
- import { Mutation } from '@apollo/client/react/components'
5
- import { useNavigate } from 'react-router-dom'
6
- import { datasetCacheId } from './cache-id.js'
7
- import { Button } from '@openneuro/components/button'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import { gql } from "@apollo/client"
4
+ import { Mutation } from "@apollo/client/react/components"
5
+ import { useNavigate } from "react-router-dom"
6
+ import { datasetCacheId } from "./cache-id.js"
7
+ import { Button } from "@openneuro/components/button"
8
8
 
9
9
  const PUBLISH_DATASET = gql`
10
10
  mutation publishDataset($datasetId: ID!) {
@@ -24,18 +24,19 @@ const PublishDataset = ({ datasetId }) => {
24
24
  return (
25
25
  <Mutation
26
26
  mutation={PUBLISH_DATASET}
27
- update={cache => {
27
+ update={(cache) => {
28
28
  cache.writeFragment({
29
29
  id: datasetCacheId(datasetId),
30
30
  fragment: DATASET_PUBLISHED,
31
31
  data: {
32
- __typename: 'Dataset',
32
+ __typename: "Dataset",
33
33
  id: datasetId,
34
34
  public: true,
35
35
  },
36
36
  })
37
- }}>
38
- {publishDataset => (
37
+ }}
38
+ >
39
+ {(publishDataset) => (
39
40
  <Button
40
41
  primary={true}
41
42
  size="small"
@@ -43,8 +44,7 @@ const PublishDataset = ({ datasetId }) => {
43
44
  onClick={() =>
44
45
  publishDataset({ variables: { datasetId } }).then(() => {
45
46
  navigate(`/datasets/${datasetId}`)
46
- })
47
- }
47
+ })}
48
48
  />
49
49
  )}
50
50
  </Mutation>
@@ -1,10 +1,10 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { gql } from '@apollo/client'
4
- import { Mutation } from '@apollo/client/react/components'
5
- import { SaveButton } from '../fragments/save-button'
6
- import { DRAFT_FRAGMENT } from '../../datalad/dataset/dataset-query-fragments'
7
- import { datasetCacheId } from './cache-id.js'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import { gql } from "@apollo/client"
4
+ import { Mutation } from "@apollo/client/react/components"
5
+ import { SaveButton } from "../fragments/save-button"
6
+ import { DRAFT_FRAGMENT } from "../../datalad/dataset/dataset-query-fragments"
7
+ import { datasetCacheId } from "./cache-id.js"
8
8
 
9
9
  const UPDATE_README = gql`
10
10
  mutation updateReadme($datasetId: ID!, $value: String!) {
@@ -15,7 +15,7 @@ const UPDATE_README = gql`
15
15
  const UpdateReadme = ({ datasetId, value, done }) => (
16
16
  <Mutation
17
17
  mutation={UPDATE_README}
18
- update={cache => {
18
+ update={(cache) => {
19
19
  const { draft } = cache.readFragment({
20
20
  id: datasetCacheId(datasetId),
21
21
  fragment: DRAFT_FRAGMENT,
@@ -24,7 +24,7 @@ const UpdateReadme = ({ datasetId, value, done }) => (
24
24
  id: datasetCacheId(datasetId),
25
25
  fragment: DRAFT_FRAGMENT,
26
26
  data: {
27
- __typename: 'Dataset',
27
+ __typename: "Dataset",
28
28
  id: datasetId,
29
29
  draft: {
30
30
  ...draft,
@@ -32,8 +32,9 @@ const UpdateReadme = ({ datasetId, value, done }) => (
32
32
  },
33
33
  },
34
34
  })
35
- }}>
36
- {updateReadme => (
35
+ }}
36
+ >
37
+ {(updateReadme) => (
37
38
  <SaveButton
38
39
  action={async () => {
39
40
  await updateReadme({ variables: { datasetId, value } })
@@ -1,9 +1,9 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { gql } from '@apollo/client'
4
- import { Mutation } from '@apollo/client/react/components'
5
- import { WarnButton } from '@openneuro/components/warn-button'
6
- import { Tooltip } from '@openneuro/components/tooltip'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import { gql } from "@apollo/client"
4
+ import { Mutation } from "@apollo/client/react/components"
5
+ import { WarnButton } from "@openneuro/components/warn-button"
6
+ import { Tooltip } from "@openneuro/components/tooltip"
7
7
 
8
8
  const REMOVE_ANNEX_OBJECT = gql`
9
9
  mutation removeAnnexObject(
@@ -31,11 +31,12 @@ const RemoveAnnexObject = ({
31
31
  filename,
32
32
  }) => (
33
33
  <Mutation mutation={REMOVE_ANNEX_OBJECT} awaitRefetchQueries={true}>
34
- {removeAnnexObject => (
34
+ {(removeAnnexObject) => (
35
35
  // fa-exclamation-triangle might be better
36
36
  <Tooltip
37
37
  className="remove-annex-object"
38
- tooltip="Purge: this admin tool will remove this file's annex objects.">
38
+ tooltip="Purge: this admin tool will remove this file's annex objects."
39
+ >
39
40
  <WarnButton
40
41
  message=""
41
42
  iconOnly={true}
@@ -45,7 +46,7 @@ const RemoveAnnexObject = ({
45
46
  removeAnnexObject({
46
47
  variables: {
47
48
  datasetId,
48
- snapshot: snapshot || 'HEAD',
49
+ snapshot: snapshot || "HEAD",
49
50
  annexKey,
50
51
  path,
51
52
  filename,
@@ -1,6 +1,6 @@
1
- import React, { FC } from 'react'
2
- import { gql, useMutation } from '@apollo/client'
3
- import { WarnButton } from '@openneuro/components/warn-button'
1
+ import React, { FC } from "react"
2
+ import { gql, useMutation } from "@apollo/client"
3
+ import { WarnButton } from "@openneuro/components/warn-button"
4
4
 
5
5
  const REMOVE_PERMISSION = gql`
6
6
  mutation removePermissions($datasetId: ID!, $userId: String!) {
@@ -9,7 +9,7 @@ const REMOVE_PERMISSION = gql`
9
9
  `
10
10
 
11
11
  export const userPermissionsFilter = (userPermissions, userId) =>
12
- userPermissions.filter(permission => permission.user.id !== userId)
12
+ userPermissions.filter((permission) => permission.user.id !== userId)
13
13
 
14
14
  interface RemovePermissionsProps {
15
15
  datasetId: string
@@ -30,8 +30,7 @@ export const RemovePermissions: FC<RemovePermissionsProps> = ({
30
30
  icon="fa-trash-o"
31
31
  disabled={false}
32
32
  onConfirmedClick={() =>
33
- removePermissions({ variables: { datasetId, userId } })
34
- }
33
+ removePermissions({ variables: { datasetId, userId } })}
35
34
  displayOptions={displayOptions}
36
35
  setDisplayOptions={setDisplayOptions}
37
36
  />
@@ -1,9 +1,9 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { gql } from '@apollo/client'
4
- import { Mutation } from '@apollo/client/react/components'
5
- import { Button } from '@openneuro/components/button'
6
- import { Tooltip } from '@openneuro/components/tooltip'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import { gql } from "@apollo/client"
4
+ import { Mutation } from "@apollo/client/react/components"
5
+ import { Button } from "@openneuro/components/button"
6
+ import { Tooltip } from "@openneuro/components/tooltip"
7
7
 
8
8
  const REVALIDATE = gql`
9
9
  mutation revalidate($datasetId: ID!, $ref: String!) {
@@ -13,7 +13,7 @@ const REVALIDATE = gql`
13
13
 
14
14
  const Revalidate = ({ datasetId, revision }) => (
15
15
  <Mutation mutation={REVALIDATE}>
16
- {revalidate => (
16
+ {(revalidate) => (
17
17
  <Tooltip tooltip="Revalidate Commit">
18
18
  <Button
19
19
  primary={true}
@@ -1,10 +1,10 @@
1
- import React from 'react'
2
- import PropTypes from 'prop-types'
3
- import { gql, useMutation } from '@apollo/client'
4
- import { useNavigate } from 'react-router-dom'
5
- import ErrorBoundary from '../../errors/errorBoundary.jsx'
6
- import { Button } from '@openneuro/components/button'
7
- import { getDatasetPage, getDraftPage } from '../../queries/dataset'
1
+ import React from "react"
2
+ import PropTypes from "prop-types"
3
+ import { gql, useMutation } from "@apollo/client"
4
+ import { useNavigate } from "react-router-dom"
5
+ import ErrorBoundary from "../../errors/errorBoundary.jsx"
6
+ import { Button } from "@openneuro/components/button"
7
+ import { getDatasetPage, getDraftPage } from "../../queries/dataset"
8
8
 
9
9
  const CREATE_SNAPSHOT = gql`
10
10
  mutation createSnapshot($datasetId: ID!, $tag: String!, $changes: [String!]) {
@@ -47,7 +47,7 @@ const CreateSnapshotMutation = ({
47
47
  onClick={(): void => {
48
48
  void snapshotDataset({
49
49
  variables: { datasetId, tag, changes },
50
- }).then(data => {
50
+ }).then((data) => {
51
51
  console.log(data)
52
52
  navigate(`/datasets/${datasetId}/versions/${tag}`)
53
53
  })