synapse-react-client 4.0.41 → 4.0.43

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 (396) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +6 -20
  3. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
  4. package/dist/components/AccessRequirementList/AccessRequirementList.js +165 -159
  5. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  6. package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts +3 -2
  7. package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts.map +1 -1
  8. package/dist/components/AccessRequirementList/AccessRequirementListItem.js +23 -22
  9. package/dist/components/AccessRequirementList/AccessRequirementListItem.js.map +1 -1
  10. package/dist/components/AccessRequirementList/AccessRequirementListUtils.d.ts +4 -3
  11. package/dist/components/AccessRequirementList/AccessRequirementListUtils.d.ts.map +1 -1
  12. package/dist/components/AccessRequirementList/AccessRequirementListUtils.js +6 -4
  13. package/dist/components/AccessRequirementList/AccessRequirementListUtils.js.map +1 -1
  14. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/JsonSchemaRequestWizard.d.ts +22 -0
  15. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/JsonSchemaRequestWizard.d.ts.map +1 -0
  16. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/JsonSchemaRequestWizard.js +166 -0
  17. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/JsonSchemaRequestWizard.js.map +1 -0
  18. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/RequesterInformationFields.d.ts +18 -0
  19. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/RequesterInformationFields.d.ts.map +1 -0
  20. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/RequesterInformationFields.js +91 -0
  21. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/RequesterInformationFields.js.map +1 -0
  22. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/requesterInformation.d.ts +33 -0
  23. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/requesterInformation.d.ts.map +1 -0
  24. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/requesterInformation.js +49 -0
  25. package/dist/components/AccessRequirementList/JsonSchemaAccessRequirementRequestFlow/requesterInformation.js.map +1 -0
  26. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts +7 -0
  27. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts.map +1 -0
  28. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js +30 -0
  29. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js.map +1 -0
  30. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.d.ts.map +1 -1
  31. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js +26 -42
  32. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js.map +1 -1
  33. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
  34. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +97 -218
  35. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
  36. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts +13 -0
  37. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts.map +1 -0
  38. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js +60 -0
  39. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js.map +1 -0
  40. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +8 -2
  41. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
  42. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +177 -78
  43. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
  44. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts +4 -3
  45. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts.map +1 -1
  46. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js +15 -15
  47. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js.map +1 -1
  48. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +3 -2
  49. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
  50. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +88 -103
  51. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
  52. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts +12 -0
  53. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts.map +1 -0
  54. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js +50 -0
  55. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js.map +1 -0
  56. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.d.ts.map +1 -1
  57. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js +14 -30
  58. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js.map +1 -1
  59. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/{ManagedACTAccessRequirementItem.d.ts → RequestableAccessRequirementItem.d.ts} +9 -8
  60. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestableAccessRequirementItem.d.ts.map +1 -0
  61. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/{ManagedACTAccessRequirementItem.js → RequestableAccessRequirementItem.js} +16 -16
  62. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestableAccessRequirementItem.js.map +1 -0
  63. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/{ManagedACTAccessRequirementItemView.d.ts → RequestableAccessRequirementItemView.d.ts} +8 -7
  64. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestableAccessRequirementItemView.d.ts.map +1 -0
  65. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/{ManagedACTAccessRequirementItemView.js → RequestableAccessRequirementItemView.js} +3 -4
  66. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestableAccessRequirementItemView.js.map +1 -0
  67. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
  68. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +123 -170
  69. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
  70. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +2 -2
  71. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -1
  72. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +35 -51
  73. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -1
  74. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +3 -2
  75. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
  76. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +107 -91
  77. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
  78. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts +12 -0
  79. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts.map +1 -0
  80. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js +51 -0
  81. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js.map +1 -0
  82. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts +12 -0
  83. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts.map +1 -0
  84. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js +24 -0
  85. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js.map +1 -0
  86. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts +12 -0
  87. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts.map +1 -0
  88. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.js +0 -0
  89. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts +22 -0
  90. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts.map +1 -0
  91. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js +32 -0
  92. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js.map +1 -0
  93. package/dist/components/AccessRequirementList/RequestDataStep.d.ts +34 -0
  94. package/dist/components/AccessRequirementList/RequestDataStep.d.ts.map +1 -0
  95. package/dist/components/AccessRequirementList/RequestDataStep.js +37 -0
  96. package/dist/components/AccessRequirementList/RequestDataStep.js.map +1 -0
  97. package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.d.ts +1 -1
  98. package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.js.map +1 -1
  99. package/dist/components/AclEditor/AclEditor.js +20 -20
  100. package/dist/components/Authentication/TwoFactorBackupCodes.js +1 -1
  101. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  102. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  103. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +79 -69
  104. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  105. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  106. package/dist/components/DataGrid/SynapseGrid.js +244 -246
  107. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  108. package/dist/components/DataGrid/components/GridLoadingState.d.ts +23 -0
  109. package/dist/components/DataGrid/components/GridLoadingState.d.ts.map +1 -0
  110. package/dist/components/DataGrid/components/GridLoadingState.js +64 -0
  111. package/dist/components/DataGrid/components/GridLoadingState.js.map +1 -0
  112. package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
  113. package/dist/components/DataGrid/components/ReorderColumnsDialog.js +30 -29
  114. package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
  115. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +60 -6
  116. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  117. package/dist/components/DataGrid/useDataGridWebsocket.js +71 -60
  118. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  119. package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts +11 -0
  120. package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts.map +1 -0
  121. package/dist/components/DataGrid/utils/getNamedColumnIndices.js +8 -0
  122. package/dist/components/DataGrid/utils/getNamedColumnIndices.js.map +1 -0
  123. package/dist/components/FilePreview/FileHandleContentRenderer.d.ts +6 -2
  124. package/dist/components/FilePreview/FileHandleContentRenderer.d.ts.map +1 -1
  125. package/dist/components/FilePreview/FileHandleContentRenderer.js +27 -14
  126. package/dist/components/FilePreview/FileHandleContentRenderer.js.map +1 -1
  127. package/dist/components/FilePreview/PdfPreview.d.ts +1 -1
  128. package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
  129. package/dist/components/FilePreview/PdfPreview.js +15 -16
  130. package/dist/components/FilePreview/PdfPreview.js.map +1 -1
  131. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -1
  132. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +71 -68
  133. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -1
  134. package/dist/components/FormTemplateEditor/FieldLibrary.css +1 -0
  135. package/dist/components/FormTemplateEditor/FieldLibrary.d.ts +17 -0
  136. package/dist/components/FormTemplateEditor/FieldLibrary.d.ts.map +1 -0
  137. package/dist/components/FormTemplateEditor/FieldLibrary.js +88 -0
  138. package/dist/components/FormTemplateEditor/FieldLibrary.js.map +1 -0
  139. package/dist/components/FormTemplateEditor/FieldLibrary.module.js +5 -0
  140. package/dist/components/FormTemplateEditor/FieldLibrary.module.js.map +1 -0
  141. package/dist/components/FormTemplateEditor/FieldLibrary.module.scss +12 -0
  142. package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts +19 -0
  143. package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts.map +1 -0
  144. package/dist/components/FormTemplateEditor/FieldLibraryRow.js +115 -0
  145. package/dist/components/FormTemplateEditor/FieldLibraryRow.js.map +1 -0
  146. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.css +1 -0
  147. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts +9 -0
  148. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts.map +1 -0
  149. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js +18 -0
  150. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js.map +1 -0
  151. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js +5 -0
  152. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js.map +1 -0
  153. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.scss +4 -0
  154. package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts +21 -0
  155. package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts.map +1 -0
  156. package/dist/components/FormTemplateEditor/FormStructurePanel.js +108 -0
  157. package/dist/components/FormTemplateEditor/FormStructurePanel.js.map +1 -0
  158. package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts +10 -0
  159. package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts.map +1 -0
  160. package/dist/components/FormTemplateEditor/FormTemplateEditor.js +31 -0
  161. package/dist/components/FormTemplateEditor/FormTemplateEditor.js.map +1 -0
  162. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts +15 -0
  163. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts.map +1 -0
  164. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js +234 -0
  165. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js.map +1 -0
  166. package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts.map +1 -1
  167. package/dist/components/FormTemplateEditor/FormTemplatePreview.js +29 -41
  168. package/dist/components/FormTemplateEditor/FormTemplatePreview.js.map +1 -1
  169. package/dist/components/FormTemplateEditor/StepCard.d.ts +25 -0
  170. package/dist/components/FormTemplateEditor/StepCard.d.ts.map +1 -0
  171. package/dist/components/FormTemplateEditor/StepCard.js +203 -0
  172. package/dist/components/FormTemplateEditor/StepCard.js.map +1 -0
  173. package/dist/components/FormTemplateEditor/StepFieldRow.d.ts +34 -0
  174. package/dist/components/FormTemplateEditor/StepFieldRow.d.ts.map +1 -0
  175. package/dist/components/FormTemplateEditor/StepFieldRow.js +128 -0
  176. package/dist/components/FormTemplateEditor/StepFieldRow.js.map +1 -0
  177. package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts +19 -0
  178. package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts.map +1 -0
  179. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js +78 -0
  180. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js.map +1 -0
  181. package/dist/components/FormTemplateEditor/dragHandle.css +1 -0
  182. package/dist/components/FormTemplateEditor/dragHandle.module.js +8 -0
  183. package/dist/components/FormTemplateEditor/dragHandle.module.js.map +1 -0
  184. package/dist/components/FormTemplateEditor/dragHandle.module.scss +22 -0
  185. package/dist/components/FormTemplateEditor/dropTarget.css +1 -0
  186. package/dist/components/FormTemplateEditor/dropTarget.module.js +5 -0
  187. package/dist/components/FormTemplateEditor/dropTarget.module.js.map +1 -0
  188. package/dist/components/FormTemplateEditor/dropTarget.module.scss +14 -0
  189. package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts +48 -0
  190. package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts.map +1 -0
  191. package/dist/components/FormTemplateEditor/formTemplateDraftState.js +126 -0
  192. package/dist/components/FormTemplateEditor/formTemplateDraftState.js.map +1 -0
  193. package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts +35 -0
  194. package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts.map +1 -0
  195. package/dist/components/FormTemplateEditor/formTemplateSchema.js +35 -0
  196. package/dist/components/FormTemplateEditor/formTemplateSchema.js.map +1 -0
  197. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts +3 -1
  198. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts.map +1 -1
  199. package/dist/components/FormTemplateEditor/schemaFieldUtils.js +26 -8
  200. package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -1
  201. package/dist/components/FormTemplateEditor/sortableIds.d.ts +23 -0
  202. package/dist/components/FormTemplateEditor/sortableIds.d.ts.map +1 -0
  203. package/dist/components/FormTemplateEditor/sortableIds.js +24 -0
  204. package/dist/components/FormTemplateEditor/sortableIds.js.map +1 -0
  205. package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts +33 -0
  206. package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts.map +1 -0
  207. package/dist/components/FormTemplateEditor/useFormTemplateDraft.js +59 -0
  208. package/dist/components/FormTemplateEditor/useFormTemplateDraft.js.map +1 -0
  209. package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts +9 -0
  210. package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts.map +1 -0
  211. package/dist/components/FormTemplateEditor/useFormTemplateDrag.js +66 -0
  212. package/dist/components/FormTemplateEditor/useFormTemplateDrag.js.map +1 -0
  213. package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -1
  214. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js +34 -19
  215. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -1
  216. package/dist/components/FormTemplateEditor/utils.d.ts +2 -2
  217. package/dist/components/FormTemplateEditor/utils.d.ts.map +1 -1
  218. package/dist/components/FormTemplateEditor/utils.js +7 -10
  219. package/dist/components/FormTemplateEditor/utils.js.map +1 -1
  220. package/dist/components/JsonSchemaForm/SchemaStepForm.d.ts +21 -0
  221. package/dist/components/JsonSchemaForm/SchemaStepForm.d.ts.map +1 -0
  222. package/dist/components/JsonSchemaForm/SchemaStepForm.js +29 -0
  223. package/dist/components/JsonSchemaForm/SchemaStepForm.js.map +1 -0
  224. package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts +11 -0
  225. package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts.map +1 -1
  226. package/dist/components/JsonSchemaForm/widgets/SelectWidget.js +28 -19
  227. package/dist/components/JsonSchemaForm/widgets/SelectWidget.js.map +1 -1
  228. package/dist/components/QueryBuilder/FilterConditionRow.d.ts +1 -0
  229. package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
  230. package/dist/components/QueryBuilder/FilterConditionRow.js +102 -105
  231. package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
  232. package/dist/components/QueryBuilder/FilterGroupNode.js +6 -6
  233. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
  234. package/dist/components/QueryBuilder/QueryBuilderControls.js +88 -81
  235. package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
  236. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +7 -0
  237. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -1
  238. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -1
  239. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +2 -1
  240. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -1
  241. package/dist/components/QueryBuilder/qbTreeToReadable.js +24 -20
  242. package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -1
  243. package/dist/components/QueryBuilder/queryBuilderDrag.css +1 -1
  244. package/dist/components/QueryBuilder/queryBuilderDrag.module.js +2 -2
  245. package/dist/components/QueryBuilder/queryBuilderDrag.module.js.map +1 -1
  246. package/dist/components/QueryBuilder/queryBuilderDrag.module.scss +1 -1
  247. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +16 -0
  248. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -1
  249. package/dist/components/QueryBuilder/queryBuilderMetadata.js +13 -5
  250. package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -1
  251. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts +18 -0
  252. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts.map +1 -0
  253. package/dist/components/QueryBuilder/useQBValueDisplayName.js +64 -0
  254. package/dist/components/QueryBuilder/useQBValueDisplayName.js.map +1 -0
  255. package/dist/components/SetBasicAccessRequirementFields/GovernanceUtils.d.ts +2 -2
  256. package/dist/components/SetBasicAccessRequirementFields/GovernanceUtils.d.ts.map +1 -1
  257. package/dist/components/SetBasicAccessRequirementFields/GovernanceUtils.js +11 -10
  258. package/dist/components/SetBasicAccessRequirementFields/GovernanceUtils.js.map +1 -1
  259. package/dist/components/SynapseForm/SynapseForm.js +28 -28
  260. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +6 -6
  261. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts +1 -0
  262. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts.map +1 -1
  263. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js +13 -11
  264. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js.map +1 -1
  265. package/dist/components/SynapseTable/SearchV2.js +4 -4
  266. package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
  267. package/dist/components/ToastMessage/ToastMessage.js +25 -22
  268. package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
  269. package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts +7 -0
  270. package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts.map +1 -0
  271. package/dist/components/dataaccess/FormTemplateEditorRoute.js +26 -0
  272. package/dist/components/dataaccess/FormTemplateEditorRoute.js.map +1 -0
  273. package/dist/components/dataaccess/FormTemplateTable.d.ts +10 -0
  274. package/dist/components/dataaccess/FormTemplateTable.d.ts.map +1 -0
  275. package/dist/components/dataaccess/FormTemplateTable.js +124 -0
  276. package/dist/components/dataaccess/FormTemplateTable.js.map +1 -0
  277. package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
  278. package/dist/components/dataaccess/ReviewerDashboard.js +80 -50
  279. package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
  280. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
  281. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +7 -4
  282. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
  283. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.d.ts.map +1 -1
  284. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +5 -4
  285. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
  286. package/dist/components/widgets/FileHandleLink.d.ts +12 -2
  287. package/dist/components/widgets/FileHandleLink.d.ts.map +1 -1
  288. package/dist/components/widgets/FileHandleLink.js +25 -29
  289. package/dist/components/widgets/FileHandleLink.js.map +1 -1
  290. package/dist/features/curator/dashboard/CuratorDashboardRouter.d.ts.map +1 -1
  291. package/dist/features/curator/dashboard/CuratorDashboardRouter.js +15 -15
  292. package/dist/features/curator/dashboard/CuratorDashboardRouter.js.map +1 -1
  293. package/dist/features/entity/metadata-task/components/MetadataTasksPageRouter.d.ts.map +1 -1
  294. package/dist/features/entity/metadata-task/components/MetadataTasksPageRouter.js +15 -14
  295. package/dist/features/entity/metadata-task/components/MetadataTasksPageRouter.js.map +1 -1
  296. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +2 -0
  297. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -1
  298. package/dist/mocks/accessRequirement/mockFormTemplates.js +8 -2
  299. package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -1
  300. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +7 -0
  301. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -1
  302. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +30 -15
  303. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -1
  304. package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -1
  305. package/dist/mocks/accessRequirement/mockJsonSchemas.js +17 -31
  306. package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -1
  307. package/dist/mocks/dataaccess/MockDataAccessRequest.d.ts +3 -0
  308. package/dist/mocks/dataaccess/MockDataAccessRequest.d.ts.map +1 -1
  309. package/dist/mocks/dataaccess/MockDataAccessRequest.js +24 -12
  310. package/dist/mocks/dataaccess/MockDataAccessRequest.js.map +1 -1
  311. package/dist/mocks/msw/handlers/authHandlers.d.ts +1 -0
  312. package/dist/mocks/msw/handlers/authHandlers.d.ts.map +1 -1
  313. package/dist/mocks/msw/handlers/authHandlers.js +6 -2
  314. package/dist/mocks/msw/handlers/authHandlers.js.map +1 -1
  315. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts +2 -0
  316. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
  317. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +65 -47
  318. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
  319. package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
  320. package/dist/mocks/msw/handlers/fileHandlers.js +25 -21
  321. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  322. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts +2 -1
  323. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -1
  324. package/dist/mocks/msw/handlers/formTemplateHandlers.js +18 -18
  325. package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -1
  326. package/dist/mocks/msw/handlers/schemaHandlers.d.ts +8 -0
  327. package/dist/mocks/msw/handlers/schemaHandlers.d.ts.map +1 -1
  328. package/dist/mocks/msw/handlers/schemaHandlers.js +20 -3
  329. package/dist/mocks/msw/handlers/schemaHandlers.js.map +1 -1
  330. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.d.ts +8 -0
  331. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.d.ts.map +1 -0
  332. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js +19 -0
  333. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js.map +1 -0
  334. package/dist/style/abstracts/_cssVariables.scss +13 -0
  335. package/dist/style/components/_toasts.scss +10 -1
  336. package/dist/style/main.css +1 -1
  337. package/dist/synapse-queries/KeyFactory.d.ts +8 -1
  338. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  339. package/dist/synapse-queries/KeyFactory.js +17 -4
  340. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  341. package/dist/synapse-queries/auth/index.d.ts +1 -0
  342. package/dist/synapse-queries/auth/index.d.ts.map +1 -1
  343. package/dist/synapse-queries/auth/index.js +2 -1
  344. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts +11 -0
  345. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts.map +1 -0
  346. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js +19 -0
  347. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js.map +1 -0
  348. package/dist/synapse-queries/dataaccess/index.js +5 -5
  349. package/dist/synapse-queries/dataaccess/useEDuc.d.ts +18 -0
  350. package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
  351. package/dist/synapse-queries/dataaccess/useEDuc.js +33 -1
  352. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  353. package/dist/synapse-queries/dataaccess/useGeneratedRequestForm.d.ts +19 -0
  354. package/dist/synapse-queries/dataaccess/useGeneratedRequestForm.d.ts.map +1 -0
  355. package/dist/synapse-queries/dataaccess/useGeneratedRequestForm.js +26 -0
  356. package/dist/synapse-queries/dataaccess/useGeneratedRequestForm.js.map +1 -0
  357. package/dist/synapse-queries/file/useDirectUploadToS3.js +6 -6
  358. package/dist/synapse-queries/file/useFileHandle.d.ts +8 -0
  359. package/dist/synapse-queries/file/useFileHandle.d.ts.map +1 -1
  360. package/dist/synapse-queries/file/useFileHandle.js +15 -6
  361. package/dist/synapse-queries/file/useFileHandle.js.map +1 -1
  362. package/dist/synapse-queries/index.js +260 -253
  363. package/dist/synapse-queries/jsonschema/index.js +2 -2
  364. package/dist/synapse-queries/jsonschema/useSchema.d.ts +5 -0
  365. package/dist/synapse-queries/jsonschema/useSchema.d.ts.map +1 -1
  366. package/dist/synapse-queries/jsonschema/useSchema.js +9 -1
  367. package/dist/synapse-queries/jsonschema/useSchema.js.map +1 -1
  368. package/dist/tsconfig.build.tsbuildinfo +1 -1
  369. package/dist/utils/APIConstants.d.ts +1 -0
  370. package/dist/utils/APIConstants.d.ts.map +1 -1
  371. package/dist/utils/APIConstants.js +2 -2
  372. package/dist/utils/APIConstants.js.map +1 -1
  373. package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
  374. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
  375. package/dist/utils/featureflag/FeatureFlags.js +1 -1
  376. package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
  377. package/dist/utils/functions/toPascalCase.d.ts +6 -0
  378. package/dist/utils/functions/toPascalCase.d.ts.map +1 -0
  379. package/dist/utils/functions/toPascalCase.js +8 -0
  380. package/dist/utils/functions/toPascalCase.js.map +1 -0
  381. package/dist/utils/hooks/useDetectSSOCode.d.ts.map +1 -1
  382. package/dist/utils/hooks/useDetectSSOCode.js +31 -26
  383. package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
  384. package/dist/utils/jsonschema/schemaData.d.ts +18 -0
  385. package/dist/utils/jsonschema/schemaData.d.ts.map +1 -0
  386. package/dist/utils/jsonschema/schemaData.js +26 -0
  387. package/dist/utils/jsonschema/schemaData.js.map +1 -0
  388. package/dist/utils/jsonschema/submissionContext.d.ts +5 -0
  389. package/dist/utils/jsonschema/submissionContext.d.ts.map +1 -1
  390. package/dist/utils/jsonschema/submissionContext.js +22 -30
  391. package/dist/utils/jsonschema/submissionContext.js.map +1 -1
  392. package/package.json +10 -9
  393. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItem.d.ts.map +0 -1
  394. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItem.js.map +0 -1
  395. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.d.ts.map +0 -1
  396. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import e from "../FullWidthAlert/FullWidthAlert.js";
1
+ import { displayToast as e } from "../ToastMessage/ToastMessage.js";
2
2
  import { NUMERIC_CODE_HTML_INPUT_PROPS as t } from "./Constants.js";
3
3
  import { SynapseSpinner as n } from "../LoadingScreen/LoadingScreen.js";
4
4
  import { useFinishTwoFactorEnrollment as r } from "../../synapse-queries/auth/useTwoFactorEnrollment.js";
@@ -6,22 +6,25 @@ import i from "../IconSvg/IconSvg.js";
6
6
  import a from "../TextField/TextField.js";
7
7
  import { StyledOuterContainer as o } from "../styled/LeftRightPanel.js";
8
8
  import s from "./TwoFactorSecretDialog.js";
9
- import { useEffect as c, useRef as l, useState as u } from "react";
10
- import { Box as d, Button as f, Divider as p, IconButton as m, Link as h, Paper as g, Stack as _, Typography as v, styled as y } from "@mui/material";
11
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
12
- import * as S from "qrcode";
9
+ import { useEffect as c, useId as l, useRef as u, useState as d } from "react";
10
+ import { Box as f, Button as p, Divider as m, FormHelperText as h, IconButton as g, Link as _, Paper as v, Stack as y, Typography as b, styled as x } from "@mui/material";
11
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
12
+ import * as w from "qrcode";
13
13
  //#region src/components/Authentication/TwoFactorEnrollmentForm.tsx
14
- var { toCanvas: C } = S;
15
- function w(e) {
14
+ var { toCanvas: T } = w;
15
+ function E(e) {
16
16
  return `otpauth://totp/Synapse:${e.username}?secret=${e.secret}&issuer=Sage%20Bionetworks&algorithm=${e.alg}&digits=${e.digits}&period=${e.period}`;
17
17
  }
18
- var T = y((e) => /* @__PURE__ */ b(d, {
18
+ function D(e) {
19
+ return e.reason.toLowerCase().includes("invalid totp code");
20
+ }
21
+ var O = x((e) => /* @__PURE__ */ S(f, {
19
22
  sx: {
20
23
  my: 3,
21
24
  ...e.sx
22
25
  },
23
26
  ...e
24
- }), { label: "Section" })(() => ({})), E = y(d, { label: "SectionInnerGrid" })(({ theme: e }) => ({
27
+ }), { label: "Section" })(() => ({})), k = x(f, { label: "SectionInnerGrid" })(({ theme: e }) => ({
25
28
  display: "grid",
26
29
  gridTemplateColumns: "auto 200px",
27
30
  columnGap: e.spacing(5),
@@ -29,19 +32,24 @@ var T = y((e) => /* @__PURE__ */ b(d, {
29
32
  gridTemplateColumns: "1fr",
30
33
  gap: "18px"
31
34
  }
32
- })), D = "https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account";
33
- function O(y) {
34
- let { onTwoFactorEnrollmentSuccess: S, onBackClicked: O, totpSecret: k } = y, [A, j] = u(""), [M, N] = u(!1), [P, F] = u(!1), I = l(null), { mutate: L, isPending: R, error: z } = r({ onSuccess: S });
35
+ })), A = "https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account";
36
+ function j(x) {
37
+ let { onTwoFactorEnrollmentSuccess: w, onBackClicked: j, totpSecret: M } = x, [N, P] = d(""), [F, I] = d(!1), [L, R] = d(!1), z = u(null), B = l(), { mutate: V, isPending: H, error: U, reset: W } = r({
38
+ onSuccess: w,
39
+ onError: (t) => {
40
+ D(t) || e(t.reason, "danger");
41
+ }
42
+ }), G = U != null && D(U);
35
43
  return c(() => {
36
44
  async function e() {
37
- k && I.current && (await C(I.current, w(k), {
45
+ M && z.current && (await T(z.current, E(M), {
38
46
  version: 10,
39
47
  margin: 0,
40
48
  scale: 3.5
41
- }), N(!0));
49
+ }), I(!0));
42
50
  }
43
51
  e();
44
- }, [k]), /* @__PURE__ */ b(o, { children: /* @__PURE__ */ x(g, {
52
+ }, [M]), /* @__PURE__ */ S(o, { children: /* @__PURE__ */ C(v, {
45
53
  sx: {
46
54
  position: "relative",
47
55
  width: {
@@ -53,17 +61,17 @@ function O(y) {
53
61
  mx: "auto"
54
62
  },
55
63
  children: [
56
- O && /* @__PURE__ */ b(m, {
64
+ j && /* @__PURE__ */ S(g, {
57
65
  type: "button",
58
66
  onClick: () => {
59
- O();
67
+ j();
60
68
  },
61
69
  sx: (e) => ({
62
70
  position: "absolute",
63
71
  top: e.spacing(2),
64
72
  left: e.spacing(2)
65
73
  }),
66
- children: /* @__PURE__ */ b(i, {
74
+ children: /* @__PURE__ */ S(i, {
67
75
  icon: "arrowBack",
68
76
  wrap: !1,
69
77
  sx: {
@@ -72,11 +80,11 @@ function O(y) {
72
80
  }
73
81
  })
74
82
  }),
75
- /* @__PURE__ */ x(T, { children: [/* @__PURE__ */ b(v, {
83
+ /* @__PURE__ */ C(O, { children: [/* @__PURE__ */ S(b, {
76
84
  variant: "headline2",
77
85
  sx: { mb: 3 },
78
86
  children: "Activate Two-factor Authentication"
79
- }), /* @__PURE__ */ x(v, {
87
+ }), /* @__PURE__ */ C(b, {
80
88
  variant: "body1",
81
89
  children: [
82
90
  "After setting up 2FA, you’ll use an authenticator app as part of your login process, in addition to your existing password. If you log in using your Google",
@@ -84,53 +92,53 @@ function O(y) {
84
92
  " or ORCiD account, you may need to use 2FA as part of",
85
93
  "that process as well.",
86
94
  " ",
87
- /* @__PURE__ */ b(h, {
88
- href: D,
95
+ /* @__PURE__ */ S(_, {
96
+ href: A,
89
97
  children: "Learn more about 2FA"
90
98
  }),
91
99
  "."
92
100
  ]
93
101
  })] }),
94
- /* @__PURE__ */ b(T, { children: /* @__PURE__ */ x(E, { children: [/* @__PURE__ */ x(d, { children: [/* @__PURE__ */ b(v, {
102
+ /* @__PURE__ */ S(O, { children: /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(b, {
95
103
  variant: "body1",
96
104
  sx: { fontWeight: 700 },
97
105
  children: "Step 1. Get one of these apps"
98
- }), /* @__PURE__ */ b(v, {
106
+ }), /* @__PURE__ */ S(b, {
99
107
  variant: "body1",
100
108
  children: "Download and install one of these authentication apps to set up 2FA on your mobile device, tablet, or desktop. If you have one of these apps already installed, you can skip this step."
101
- })] }), /* @__PURE__ */ x(_, {
109
+ })] }), /* @__PURE__ */ C(y, {
102
110
  sx: (e) => ({
103
111
  justifyContent: "space-between",
104
112
  flexShrink: 0,
105
113
  [e.breakpoints.down("sm")]: { gap: "20px" }
106
114
  }),
107
115
  children: [
108
- /* @__PURE__ */ b(h, {
116
+ /* @__PURE__ */ S(_, {
109
117
  href: "https://authy.com/download/",
110
118
  children: "Authy"
111
119
  }),
112
- /* @__PURE__ */ b(h, {
120
+ /* @__PURE__ */ S(_, {
113
121
  href: "https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app",
114
122
  children: "DUO Mobile"
115
123
  }),
116
- /* @__PURE__ */ b(h, {
124
+ /* @__PURE__ */ S(_, {
117
125
  href: "https://googleauthenticator.net/",
118
126
  children: "Google Authenticator"
119
127
  }),
120
- /* @__PURE__ */ b(h, {
128
+ /* @__PURE__ */ S(_, {
121
129
  href: "https://www.microsoft.com/en-us/security/mobile-authenticator-app",
122
130
  children: "Microsoft Authenticator"
123
131
  })
124
132
  ]
125
133
  })] }) }),
126
- /* @__PURE__ */ b(p, {}),
127
- /* @__PURE__ */ b(T, { children: /* @__PURE__ */ x(E, { children: [/* @__PURE__ */ x(d, { children: [
128
- /* @__PURE__ */ b(v, {
134
+ /* @__PURE__ */ S(m, {}),
135
+ /* @__PURE__ */ S(O, { children: /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ C(f, { children: [
136
+ /* @__PURE__ */ S(b, {
129
137
  variant: "body1",
130
138
  sx: { fontWeight: 700 },
131
139
  children: "Step 2. Scan the QR Code"
132
140
  }),
133
- /* @__PURE__ */ x(v, {
141
+ /* @__PURE__ */ C(b, {
134
142
  component: "ol",
135
143
  variant: "body1",
136
144
  sx: {
@@ -138,84 +146,86 @@ function O(y) {
138
146
  my: 1
139
147
  },
140
148
  children: [
141
- /* @__PURE__ */ b("li", { children: "Open your authenticator app" }),
142
- /* @__PURE__ */ b("li", { children: "Tap the \"+\" button" }),
143
- /* @__PURE__ */ b("li", { children: "Use your camera to scan the image to the right" })
149
+ /* @__PURE__ */ S("li", { children: "Open your authenticator app" }),
150
+ /* @__PURE__ */ S("li", { children: "Tap the \"+\" button" }),
151
+ /* @__PURE__ */ S("li", { children: "Use your camera to scan the image to the right" })
144
152
  ]
145
153
  }),
146
- /* @__PURE__ */ b(h, {
154
+ /* @__PURE__ */ S(_, {
147
155
  onClick: () => {
148
- F(!0);
156
+ R(!0);
149
157
  },
150
158
  children: "Can't use your camera?"
151
159
  }),
152
- /* @__PURE__ */ b(s, {
153
- secret: k?.secret ?? "",
154
- open: P,
155
- onClose: () => F(!1)
160
+ /* @__PURE__ */ S(s, {
161
+ secret: M?.secret ?? "",
162
+ open: L,
163
+ onClose: () => R(!1)
156
164
  })
157
- ] }), /* @__PURE__ */ x(d, {
165
+ ] }), /* @__PURE__ */ C(f, {
158
166
  sx: {
159
167
  display: "flex",
160
168
  justifyContent: "center",
161
169
  alignItems: "middle",
162
170
  height: "auto"
163
171
  },
164
- children: [!M && /* @__PURE__ */ b(n, { size: 50 }), /* @__PURE__ */ b("canvas", {
165
- style: { display: M ? void 0 : "none" },
166
- ref: I
172
+ children: [!F && /* @__PURE__ */ S(n, { size: 50 }), /* @__PURE__ */ S("canvas", {
173
+ style: { display: F ? void 0 : "none" },
174
+ ref: z
167
175
  })]
168
176
  })] }) }),
169
- /* @__PURE__ */ b(p, {}),
170
- /* @__PURE__ */ b(T, { children: /* @__PURE__ */ x(E, { children: [/* @__PURE__ */ x(d, { children: [/* @__PURE__ */ b(v, {
177
+ /* @__PURE__ */ S(m, {}),
178
+ /* @__PURE__ */ S(O, { children: /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(b, {
171
179
  variant: "body1",
172
180
  sx: { fontWeight: 700 },
173
181
  children: "Step 3. Enter the Verification Code"
174
- }), /* @__PURE__ */ b(v, {
182
+ }), /* @__PURE__ */ S(b, {
175
183
  variant: "body1",
176
184
  children: "After scanning in the QR code in step 2, your app will provide a 6-digit code. Enter it in in the field to the right."
177
- })] }), /* @__PURE__ */ b("form", {
185
+ })] }), /* @__PURE__ */ C("form", {
178
186
  onSubmit: (e) => {
179
- e.preventDefault(), L({
180
- secretId: k.secretId,
181
- totp: A
187
+ e.preventDefault(), V({
188
+ secretId: M.secretId,
189
+ totp: N
182
190
  });
183
191
  },
184
- children: /* @__PURE__ */ x(_, {
192
+ children: [/* @__PURE__ */ C(y, {
185
193
  direction: "row",
186
194
  sx: {
187
195
  gap: 2,
188
196
  height: "48px"
189
197
  },
190
- children: [/* @__PURE__ */ b(a, {
198
+ children: [/* @__PURE__ */ S(a, {
191
199
  autoFocus: !0,
192
200
  slotProps: { htmlInput: {
193
201
  ...t,
194
- maxLength: k?.digits
202
+ maxLength: M?.digits,
203
+ "aria-describedby": G ? B : void 0
195
204
  } },
196
- value: A,
205
+ value: N,
206
+ error: G,
197
207
  onChange: (e) => {
198
- j(e.target.value);
208
+ U && W(), P(e.target.value);
199
209
  }
200
- }), /* @__PURE__ */ b(f, {
210
+ }), /* @__PURE__ */ S(p, {
201
211
  type: "submit",
202
212
  variant: "contained",
203
213
  sx: { flexShrink: 0 },
204
- disabled: R || A.length != k?.digits,
214
+ disabled: H || N.length != M?.digits,
205
215
  children: "Activate"
206
216
  })]
207
- })
208
- })] }) }),
209
- z && /* @__PURE__ */ b(e, {
210
- variant: "danger",
211
- isGlobal: !1,
212
- description: z.reason.toLowerCase().includes("invalid totp code") ? `${z.reason}. Please ensure automatic date and time is enabled in your device settings and try again.` : z.reason
213
- })
217
+ }), G && /* @__PURE__ */ S(h, {
218
+ id: B,
219
+ error: !0,
220
+ sx: { mt: 1 },
221
+ children: `${U.reason}. Please ensure automatic date and time is enabled in your device settings and try again.`
222
+ })]
223
+ })] }) })
214
224
  ]
215
225
  }) });
216
226
  }
217
- var k = { toOtpAuthUrl: w };
227
+ var M = { toOtpAuthUrl: E };
218
228
  //#endregion
219
- export { k as EXPORTED_FOR_UNIT_TESTING, D as TWO_FACTOR_DOCS_LINK, O as default };
229
+ export { M as EXPORTED_FOR_UNIT_TESTING, A as TWO_FACTOR_DOCS_LINK, j as default };
220
230
 
221
231
  //# sourceMappingURL=TwoFactorEnrollmentForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TwoFactorEnrollmentForm.js","names":[],"sources":["../../../src/components/Authentication/TwoFactorEnrollmentForm.tsx"],"sourcesContent":["import { StyledOuterContainer } from '@/components/styled/LeftRightPanel'\nimport {\n NUMERIC_CODE_HTML_INPUT_PROPS,\n TOTP_CLOCK_SKEW_ERROR_APPENDAGE,\n} from '@/components/Authentication/Constants'\nimport { useFinishTwoFactorEnrollment } from '@/synapse-queries/auth/useTwoFactorEnrollment'\nimport { StyledComponent } from '@emotion/styled'\nimport {\n Box,\n BoxProps,\n Button,\n Divider,\n IconButton,\n Link,\n Paper,\n Stack,\n styled,\n Typography,\n} from '@mui/material'\nimport { TotpSecret } from '@sage-bionetworks/synapse-types'\nimport * as qrcode from 'qrcode'\n// qrcode is CJS-only; use namespace import for Vite dev mode CJS interop.\nconst { toCanvas } = qrcode\nimport { useEffect, useRef, useState } from 'react'\nimport FullWidthAlert from '../FullWidthAlert/FullWidthAlert'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { SynapseSpinner } from '../LoadingScreen/LoadingScreen'\nimport TextField from '../TextField/TextField'\nimport TwoFactorSecretDialog from './TwoFactorSecretDialog'\n\n/**\n * Returns a URL that can be used to generate a QR code that 2FA authenticator apps can interpret.\n * This uses the username fro TotpSecret to create the friendly name for the account in the authenticator app.\n * @param secret\n */\nfunction toOtpAuthUrl(secret: TotpSecret) {\n return `otpauth://totp/Synapse:${secret.username}?secret=${secret.secret}&issuer=Sage%20Bionetworks&algorithm=${secret.alg}&digits=${secret.digits}&period=${secret.period}`\n}\n\nconst Section: StyledComponent<BoxProps> = styled(\n (props: BoxProps) => (\n <Box\n sx={{\n my: 3,\n ...props.sx,\n }}\n {...props}\n />\n ),\n {\n label: 'Section',\n },\n)(() => ({}))\n\nconst SectionInnerGrid = styled(Box, { label: 'SectionInnerGrid' })(\n ({ theme }) => ({\n display: 'grid',\n gridTemplateColumns: 'auto 200px',\n columnGap: theme.spacing(5),\n [theme.breakpoints.down('sm')]: {\n gridTemplateColumns: '1fr',\n gap: '18px',\n },\n }),\n)\n\nexport const TWO_FACTOR_DOCS_LINK =\n 'https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account'\n\nexport type TwoFactorEnrollmentFormProps = {\n totpSecret: TotpSecret\n onTwoFactorEnrollmentSuccess: () => void\n onBackClicked: () => void\n}\n\nexport default function TwoFactorEnrollmentForm(\n props: TwoFactorEnrollmentFormProps,\n) {\n const { onTwoFactorEnrollmentSuccess, onBackClicked, totpSecret } = props\n\n const [totp, setTotp] = useState('')\n const [hasQrCode, setHasQrCode] = useState(false)\n const [showSecretInModal, setShowSecretInModal] = useState(false)\n const qrCodeCanvasElement = useRef<HTMLCanvasElement>(null)\n\n const {\n mutate: finishEnrollment,\n isPending: isFinishingEnrollment,\n error,\n } = useFinishTwoFactorEnrollment({\n onSuccess: onTwoFactorEnrollmentSuccess,\n })\n\n useEffect(() => {\n async function createQrCode() {\n if (totpSecret && qrCodeCanvasElement.current) {\n await toCanvas(qrCodeCanvasElement.current, toOtpAuthUrl(totpSecret), {\n version: 10,\n margin: 0,\n scale: 3.5,\n })\n setHasQrCode(true)\n }\n }\n void createQrCode()\n }, [totpSecret])\n\n return (\n <StyledOuterContainer>\n <Paper\n sx={{\n position: 'relative',\n width: { xs: '100%', md: '800px' },\n py: 6.5,\n px: 8,\n mx: 'auto',\n }}\n >\n {onBackClicked && (\n <IconButton\n type=\"button\"\n onClick={() => {\n onBackClicked()\n }}\n sx={theme => ({\n position: 'absolute',\n top: theme.spacing(2),\n left: theme.spacing(2),\n })}\n >\n <IconSvg\n icon=\"arrowBack\"\n wrap={false}\n sx={{ height: '24px', width: '24px' }}\n />\n </IconButton>\n )}\n <Section>\n <Typography variant=\"headline2\" sx={{ mb: 3 }}>\n Activate Two-factor Authentication\n </Typography>\n <Typography variant=\"body1\">\n After setting up 2FA, you’ll use an authenticator app as part of\n your login process, in addition to your existing password. If you\n log in using your Google\n {/* oxlint-disable-next-line no-constant-binary-expression -- Remove conditionality when NIH RAS login is supported */}\n {false && ', NIH RAS,'} or ORCiD account, you may need to use 2FA as\n part of\n {/*those processes*/}\n that process as well.{' '}\n <Link href={TWO_FACTOR_DOCS_LINK}>Learn more about 2FA</Link>.\n </Typography>\n </Section>\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 1. Get one of these apps\n </Typography>\n <Typography variant=\"body1\">\n Download and install one of these authentication apps to set up\n 2FA on your mobile device, tablet, or desktop. If you have one\n of these apps already installed, you can skip this step.\n </Typography>\n </Box>\n <Stack\n sx={theme => ({\n justifyContent: 'space-between',\n flexShrink: 0,\n [theme.breakpoints.down('sm')]: {\n gap: '20px',\n },\n })}\n >\n <Link href={'https://authy.com/download/'}>Authy</Link>\n <Link\n href={\n 'https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app'\n }\n >\n DUO Mobile\n </Link>\n <Link href={'https://googleauthenticator.net/'}>\n Google Authenticator\n </Link>\n <Link\n href={\n 'https://www.microsoft.com/en-us/security/mobile-authenticator-app'\n }\n >\n Microsoft Authenticator\n </Link>\n </Stack>\n </SectionInnerGrid>\n </Section>\n <Divider />\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 2. Scan the QR Code\n </Typography>\n <Typography component=\"ol\" variant=\"body1\" sx={{ pl: 2, my: 1 }}>\n <li>Open your authenticator app</li>\n <li>Tap the &quot;+&quot; button</li>\n <li>Use your camera to scan the image to the right</li>\n </Typography>\n <Link\n onClick={() => {\n setShowSecretInModal(true)\n }}\n >\n Can&apos;t use your camera?\n </Link>\n <TwoFactorSecretDialog\n secret={totpSecret?.secret ?? ''}\n open={showSecretInModal}\n onClose={() => setShowSecretInModal(false)}\n />\n </Box>\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'middle',\n height: 'auto',\n }}\n >\n {!hasQrCode && <SynapseSpinner size={50} />}\n <canvas\n style={{ display: hasQrCode ? undefined : 'none' }}\n ref={qrCodeCanvasElement}\n />\n </Box>\n </SectionInnerGrid>\n </Section>\n <Divider />\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 3. Enter the Verification Code\n </Typography>\n <Typography variant=\"body1\">\n After scanning in the QR code in step 2, your app will provide a\n 6-digit code. Enter it in in the field to the right.\n </Typography>\n </Box>\n <form\n onSubmit={e => {\n e.preventDefault()\n finishEnrollment({\n secretId: totpSecret.secretId,\n totp,\n })\n }}\n >\n <Stack\n direction={'row'}\n sx={{\n gap: 2,\n height: '48px',\n }}\n >\n <TextField\n autoFocus\n slotProps={{\n htmlInput: {\n ...NUMERIC_CODE_HTML_INPUT_PROPS,\n maxLength: totpSecret?.digits,\n },\n }}\n value={totp}\n onChange={e => {\n setTotp(e.target.value)\n }}\n />\n <Button\n type={'submit'}\n variant={'contained'}\n sx={{ flexShrink: 0 }}\n disabled={\n isFinishingEnrollment || totp.length != totpSecret?.digits\n }\n >\n Activate\n </Button>\n </Stack>\n </form>\n </SectionInnerGrid>\n </Section>\n {error && (\n <FullWidthAlert\n variant={'danger'}\n isGlobal={false}\n description={\n error.reason.toLowerCase().includes('invalid totp code')\n ? `${error.reason}. ${TOTP_CLOCK_SKEW_ERROR_APPENDAGE}`\n : error.reason\n }\n />\n )}\n </Paper>\n </StyledOuterContainer>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = { toOtpAuthUrl }\n"],"mappings":";;;;;;;;;;;;;AAsBA,IAAM,EAAE,gBAAa;AAarB,SAAS,EAAa,GAAoB;CACxC,OAAO,0BAA0B,EAAO,SAAS,UAAU,EAAO,OAAO,uCAAuC,EAAO,IAAI,UAAU,EAAO,OAAO,UAAU,EAAO;AACtK;AAEA,IAAM,IAAqC,GACxC,MACC,kBAAC,GAAD;CACE,IAAI;EACF,IAAI;EACJ,GAAG,EAAM;CACX;CACA,GAAI;AACL,CAAA,GAEH,EACE,OAAO,UACT,CACF,SAAS,CAAC,EAAE,GAEN,IAAmB,EAAO,GAAK,EAAE,OA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AAY,EAAE,SAAS,mBAAmB,IACnD,GAAG,EAAM,OAAO,6FAChB,EAAM;GAEb,CAAA;EAEE;IACa,CAAA;AAE1B;AAEA,IAAa,IAA4B,EAAE,gBAAa"}
1
+ {"version":3,"file":"TwoFactorEnrollmentForm.js","names":[],"sources":["../../../src/components/Authentication/TwoFactorEnrollmentForm.tsx"],"sourcesContent":["import { StyledOuterContainer } from '@/components/styled/LeftRightPanel'\nimport {\n NUMERIC_CODE_HTML_INPUT_PROPS,\n TOTP_CLOCK_SKEW_ERROR_APPENDAGE,\n} from '@/components/Authentication/Constants'\nimport { useFinishTwoFactorEnrollment } from '@/synapse-queries/auth/useTwoFactorEnrollment'\nimport { StyledComponent } from '@emotion/styled'\nimport {\n Box,\n BoxProps,\n Button,\n Divider,\n FormHelperText,\n IconButton,\n Link,\n Paper,\n Stack,\n styled,\n Typography,\n} from '@mui/material'\nimport { TotpSecret } from '@sage-bionetworks/synapse-types'\nimport * as qrcode from 'qrcode'\n// qrcode is CJS-only; use namespace import for Vite dev mode CJS interop.\nconst { toCanvas } = qrcode\nimport { useEffect, useId, useRef, useState } from 'react'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { SynapseSpinner } from '../LoadingScreen/LoadingScreen'\nimport TextField from '../TextField/TextField'\nimport TwoFactorSecretDialog from './TwoFactorSecretDialog'\nimport { displayToast } from '../ToastMessage/ToastMessage'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\n\n/**\n * Returns a URL that can be used to generate a QR code that 2FA authenticator apps can interpret.\n * This uses the username fro TotpSecret to create the friendly name for the account in the authenticator app.\n * @param secret\n */\nfunction toOtpAuthUrl(secret: TotpSecret) {\n return `otpauth://totp/Synapse:${secret.username}?secret=${secret.secret}&issuer=Sage%20Bionetworks&algorithm=${secret.alg}&digits=${secret.digits}&period=${secret.period}`\n}\n\nfunction isInvalidTotpCodeError(error: SynapseClientError) {\n return error.reason.toLowerCase().includes('invalid totp code')\n}\n\nconst Section: StyledComponent<BoxProps> = styled(\n (props: BoxProps) => (\n <Box\n sx={{\n my: 3,\n ...props.sx,\n }}\n {...props}\n />\n ),\n {\n label: 'Section',\n },\n)(() => ({}))\n\nconst SectionInnerGrid = styled(Box, { label: 'SectionInnerGrid' })(\n ({ theme }) => ({\n display: 'grid',\n gridTemplateColumns: 'auto 200px',\n columnGap: theme.spacing(5),\n [theme.breakpoints.down('sm')]: {\n gridTemplateColumns: '1fr',\n gap: '18px',\n },\n }),\n)\n\nexport const TWO_FACTOR_DOCS_LINK =\n 'https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account'\n\nexport type TwoFactorEnrollmentFormProps = {\n totpSecret: TotpSecret\n onTwoFactorEnrollmentSuccess: () => void\n onBackClicked: () => void\n}\n\nexport default function TwoFactorEnrollmentForm(\n props: TwoFactorEnrollmentFormProps,\n) {\n const { onTwoFactorEnrollmentSuccess, onBackClicked, totpSecret } = props\n\n const [totp, setTotp] = useState('')\n const [hasQrCode, setHasQrCode] = useState(false)\n const [showSecretInModal, setShowSecretInModal] = useState(false)\n const qrCodeCanvasElement = useRef<HTMLCanvasElement>(null)\n const invalidCodeErrorId = useId()\n\n const {\n mutate: finishEnrollment,\n isPending: isFinishingEnrollment,\n error,\n reset: resetEnrollmentError,\n } = useFinishTwoFactorEnrollment({\n onSuccess: onTwoFactorEnrollmentSuccess,\n onError: error => {\n // An invalid code is reported on the code field itself; anything else has no field to attach to\n if (!isInvalidTotpCodeError(error)) {\n displayToast(error.reason, 'danger')\n }\n },\n })\n\n const showInvalidCodeError = error != null && isInvalidTotpCodeError(error)\n\n useEffect(() => {\n async function createQrCode() {\n if (totpSecret && qrCodeCanvasElement.current) {\n await toCanvas(qrCodeCanvasElement.current, toOtpAuthUrl(totpSecret), {\n version: 10,\n margin: 0,\n scale: 3.5,\n })\n setHasQrCode(true)\n }\n }\n void createQrCode()\n }, [totpSecret])\n\n return (\n <StyledOuterContainer>\n <Paper\n sx={{\n position: 'relative',\n width: { xs: '100%', md: '800px' },\n py: 6.5,\n px: 8,\n mx: 'auto',\n }}\n >\n {onBackClicked && (\n <IconButton\n type=\"button\"\n onClick={() => {\n onBackClicked()\n }}\n sx={theme => ({\n position: 'absolute',\n top: theme.spacing(2),\n left: theme.spacing(2),\n })}\n >\n <IconSvg\n icon=\"arrowBack\"\n wrap={false}\n sx={{ height: '24px', width: '24px' }}\n />\n </IconButton>\n )}\n <Section>\n <Typography variant=\"headline2\" sx={{ mb: 3 }}>\n Activate Two-factor Authentication\n </Typography>\n <Typography variant=\"body1\">\n After setting up 2FA, you’ll use an authenticator app as part of\n your login process, in addition to your existing password. If you\n log in using your Google\n {/* oxlint-disable-next-line no-constant-binary-expression -- Remove conditionality when NIH RAS login is supported */}\n {false && ', NIH RAS,'} or ORCiD account, you may need to use 2FA as\n part of\n {/*those processes*/}\n that process as well.{' '}\n <Link href={TWO_FACTOR_DOCS_LINK}>Learn more about 2FA</Link>.\n </Typography>\n </Section>\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 1. Get one of these apps\n </Typography>\n <Typography variant=\"body1\">\n Download and install one of these authentication apps to set up\n 2FA on your mobile device, tablet, or desktop. If you have one\n of these apps already installed, you can skip this step.\n </Typography>\n </Box>\n <Stack\n sx={theme => ({\n justifyContent: 'space-between',\n flexShrink: 0,\n [theme.breakpoints.down('sm')]: {\n gap: '20px',\n },\n })}\n >\n <Link href={'https://authy.com/download/'}>Authy</Link>\n <Link\n href={\n 'https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app'\n }\n >\n DUO Mobile\n </Link>\n <Link href={'https://googleauthenticator.net/'}>\n Google Authenticator\n </Link>\n <Link\n href={\n 'https://www.microsoft.com/en-us/security/mobile-authenticator-app'\n }\n >\n Microsoft Authenticator\n </Link>\n </Stack>\n </SectionInnerGrid>\n </Section>\n <Divider />\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 2. Scan the QR Code\n </Typography>\n <Typography component=\"ol\" variant=\"body1\" sx={{ pl: 2, my: 1 }}>\n <li>Open your authenticator app</li>\n <li>Tap the &quot;+&quot; button</li>\n <li>Use your camera to scan the image to the right</li>\n </Typography>\n <Link\n onClick={() => {\n setShowSecretInModal(true)\n }}\n >\n Can&apos;t use your camera?\n </Link>\n <TwoFactorSecretDialog\n secret={totpSecret?.secret ?? ''}\n open={showSecretInModal}\n onClose={() => setShowSecretInModal(false)}\n />\n </Box>\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'middle',\n height: 'auto',\n }}\n >\n {!hasQrCode && <SynapseSpinner size={50} />}\n <canvas\n style={{ display: hasQrCode ? undefined : 'none' }}\n ref={qrCodeCanvasElement}\n />\n </Box>\n </SectionInnerGrid>\n </Section>\n <Divider />\n <Section>\n <SectionInnerGrid>\n <Box>\n <Typography variant=\"body1\" sx={{ fontWeight: 700 }}>\n Step 3. Enter the Verification Code\n </Typography>\n <Typography variant=\"body1\">\n After scanning in the QR code in step 2, your app will provide a\n 6-digit code. Enter it in in the field to the right.\n </Typography>\n </Box>\n <form\n onSubmit={e => {\n e.preventDefault()\n finishEnrollment({\n secretId: totpSecret.secretId,\n totp,\n })\n }}\n >\n <Stack\n direction={'row'}\n sx={{\n gap: 2,\n height: '48px',\n }}\n >\n <TextField\n autoFocus\n slotProps={{\n htmlInput: {\n ...NUMERIC_CODE_HTML_INPUT_PROPS,\n maxLength: totpSecret?.digits,\n 'aria-describedby': showInvalidCodeError\n ? invalidCodeErrorId\n : undefined,\n },\n }}\n value={totp}\n error={showInvalidCodeError}\n onChange={e => {\n // Clear a previous failure as soon as the user edits the code\n if (error) {\n resetEnrollmentError()\n }\n setTotp(e.target.value)\n }}\n />\n <Button\n type={'submit'}\n variant={'contained'}\n sx={{ flexShrink: 0 }}\n disabled={\n isFinishingEnrollment || totp.length != totpSecret?.digits\n }\n >\n Activate\n </Button>\n </Stack>\n {/* The message sits outside the input's form control so that it can wrap\n against the full width of the card rather than the width of the input */}\n {showInvalidCodeError && (\n <FormHelperText id={invalidCodeErrorId} error sx={{ mt: 1 }}>\n {`${error.reason}. ${TOTP_CLOCK_SKEW_ERROR_APPENDAGE}`}\n </FormHelperText>\n )}\n </form>\n </SectionInnerGrid>\n </Section>\n </Paper>\n </StyledOuterContainer>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = { toOtpAuthUrl }\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,EAAE,gBAAa;AAcrB,SAAS,EAAa,GAAoB;CACxC,OAAO,0BAA0B,EAAO,SAAS,UAAU,EAAO,OAAO,uCAAuC,EAAO,IAAI,UAAU,EAAO,OAAO,UAAU,EAAO;AACtK;AAEA,SAAS,EAAuB,GAA2B;CACzD,OAAO,EAAM,OAAO,YAAY,EAAE,SAAS,mBAAmB;AAChE;AAEA,IAAM,IAAqC,GACxC,MACC,kBAAC,GAAD;CACE,IAAI;EACF,IAAI;EACJ,GAAG,EAAM;CACX;CACA,GAAI;AACL,CAAA,GAEH,EACE,OAAO,UACT,CACF,SAAS,CAAC,EAAE,GAEN,IAAmB,EAAO,GAAK,EAAE,OAAO,mBAAmB,CAAC,GAC/D,EAAE,gBAAa;CACd,SAAS;CACT,qBAAqB;CACrB,WAAW,EAAM,QAAQ,CAAC;EACzB,EAAM,YAAY,KAAK,IAAI,IAAI;EAC9B,qBAAqB;EACrB,KAAK;CACP;AACF,EACF,GAEa,IACX;AAQF,SAAwB,EACtB,GACA;CACA,IAAM,EAAE,iCAA8B,kBAAe,kBAAe,GAE9D,CAAC,GAAM,KAAW,EAAS,EAAE,GAC7B,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAmB,KAAwB,EAAS,EAAK,GAC1D,IAAsB,EAA0B,IAAI,GACpD,IAAqB,EAAM,GAE3B,EACJ,QAAQ,GACR,WAAW,GACX,UACA,OAAO,MACL,EAA6B;EAC/B,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OAAO;KACjD,KAAK;IACN,CAAA,CACE;KACW,EAAA,CAAA,EACX,CAAA;GACT,kBAAC,GAAD,CAAU,CAAA;GACV,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;IAAY,SAAQ;IAAQ,IAAI,EAAE,YAAY,IAAI;cAAG;GAEzC,CAAA,GACZ,kBAAC,GAAD;IAAY,SAAQ;cAAQ;GAGhB,CAAA,CACT,EAAA,CAAA,GACL,kBAAC,QAAD;IACE,WAAU,MAAK;KAEb,AADA,EAAE,eAAe,GACjB,EAAiB;MACf,UAAU,EAAW;MACrB;KACF,CAAC;IACH;cAPF,CASE,kBAAC,GAAD;KACE,WAAW;KACX,IAAI;MACF,KAAK;MACL,QAAQ;KACV;eALF,CAOE,kBAAC,GAAD;MACE,WAAA;MACA,WAAW,EACT,WAAW;OACT,GAAG;OACH,WAAW,GAAY;OACvB,oBAAoB,IAChB,IACA,KAAA;MACN,EACF;MACA,OAAO;MACP,OAAO;MACP,WAAU,MAAK;OAKb,AAHI,KACF,EAAqB,GAEvB,EAAQ,EAAE,OAAO,KAAK;MACxB;KACD,CAAA,GACD,kBAAC,GAAD;MACE,MAAM;MACN,SAAS;MACT,IAAI,EAAE,YAAY,EAAE;MACpB,UACE,KAAyB,EAAK,UAAU,GAAY;gBAEvD;KAEO,CAAA,CACH;QAGN,KACC,kBAAC,GAAD;KAAgB,IAAI;KAAoB,OAAA;KAAM,IAAI,EAAE,IAAI,EAAE;eACvD,GAAG,EAAM,OAAO;IACH,CAAA,CAEd;KACU,EAAA,CAAA,EACX,CAAA;EACJ;IACa,CAAA;AAE1B;AAEA,IAAa,IAA4B,EAAE,gBAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"SynapseGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/SynapseGrid.tsx"],"names":[],"mappings":"AAsBA,OAAO,EACL,iBAAiB,EAGlB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EACL,GAAG,EAOJ,MAAM,OAAO,CAAA;AAkBd,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACpD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD,CAAA;AAghBD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAM3C;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"SynapseGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/SynapseGrid.tsx"],"names":[],"mappings":"AAuBA,OAAO,EACL,iBAAiB,EAGlB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EACL,GAAG,EAOJ,MAAM,OAAO,CAAA;AAqBd,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACpD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD,CAAA;AAghBD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAM3C;AAED,eAAe,WAAW,CAAA"}