synapse-react-client 4.0.45 → 4.0.47

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 (842) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/aridhia-queries/AridhiaKeyFactory.d.ts +1 -0
  3. package/dist/aridhia-queries/AridhiaKeyFactory.d.ts.map +1 -1
  4. package/dist/aridhia-queries/AridhiaKeyFactory.js +3 -0
  5. package/dist/aridhia-queries/AridhiaKeyFactory.js.map +1 -1
  6. package/dist/aridhia-queries/aridhiaTokenExchange.js +6 -6
  7. package/dist/aridhia-queries/index.d.ts +1 -0
  8. package/dist/aridhia-queries/index.d.ts.map +1 -1
  9. package/dist/aridhia-queries/index.js +11 -10
  10. package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.d.ts +19 -0
  11. package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.d.ts.map +1 -0
  12. package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.js +14 -0
  13. package/dist/aridhia-queries/useGetAridhiaVocabularyTerm.js.map +1 -0
  14. package/dist/aridhia-queries/useSubmitAridhiaDar.js +2 -2
  15. package/dist/aridhia-queries/useSubmitAridhiaDar.js.map +1 -1
  16. package/dist/components/AccessRequirementList/AccessApprovalCheckMark.d.ts.map +1 -1
  17. package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js +6 -4
  18. package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js.map +1 -1
  19. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  20. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js +1 -1
  21. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js.map +1 -1
  22. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +1 -1
  23. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
  24. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js +1 -1
  25. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js.map +1 -1
  26. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
  27. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +11 -8
  28. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
  29. package/dist/components/AccessTokenPage/AccessTokenPage.js +1 -1
  30. package/dist/components/AccessTokenPage/AccessTokenPage.js.map +1 -1
  31. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +1 -1
  32. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
  33. package/dist/components/AccountLevelBadges/AccountLevelBadges.js +1 -1
  34. package/dist/components/AccountLevelBadges/AccountLevelBadges.js.map +1 -1
  35. package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js +1 -1
  36. package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js.map +1 -1
  37. package/dist/components/AclEditor/AclEditor.test-utils.js +3 -5
  38. package/dist/components/AclEditor/AclEditor.test-utils.js.map +1 -1
  39. package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
  40. package/dist/components/Aridhia/AridhiaAccessStatus.js +43 -30
  41. package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
  42. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts +6 -2
  43. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts.map +1 -1
  44. package/dist/components/Aridhia/AridhiaDarStatusPopover.js +101 -31
  45. package/dist/components/Aridhia/AridhiaDarStatusPopover.js.map +1 -1
  46. package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts.map +1 -1
  47. package/dist/components/Aridhia/DarWizard/DarSectionForm.js +17 -13
  48. package/dist/components/Aridhia/DarWizard/DarSectionForm.js.map +1 -1
  49. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts +3 -3
  50. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts.map +1 -1
  51. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +33 -34
  52. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -1
  53. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts +11 -9
  54. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts.map +1 -1
  55. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +24 -13
  56. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
  57. package/dist/components/Aridhia/fairFormToRjsf.js +1 -1
  58. package/dist/components/Aridhia/fairFormToRjsf.js.map +1 -1
  59. package/dist/components/Authentication/LastLoginInfo.js +3 -3
  60. package/dist/components/Authentication/LastLoginInfo.js.map +1 -1
  61. package/dist/components/Authentication/RecoveryCodeForm.js +1 -1
  62. package/dist/components/Authentication/RecoveryCodeForm.js.map +1 -1
  63. package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
  64. package/dist/components/Authentication/TOTPForm.d.ts.map +1 -1
  65. package/dist/components/Authentication/TOTPForm.js +3 -3
  66. package/dist/components/Authentication/TOTPForm.js.map +1 -1
  67. package/dist/components/Authentication/index.d.ts +6 -6
  68. package/dist/components/Authentication/index.d.ts.map +1 -1
  69. package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js +1 -1
  70. package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js.map +1 -1
  71. package/dist/components/CardContainer/CardContainer.js +7 -7
  72. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  73. package/dist/components/CertificationQuiz/CertificationQuiz.js +1 -1
  74. package/dist/components/CertificationQuiz/CertificationQuiz.js.map +1 -1
  75. package/dist/components/ChallengeRequirementsModal/ChallengeRequirementsModal.js +1 -1
  76. package/dist/components/ChallengeRequirementsModal/ChallengeRequirementsModal.js.map +1 -1
  77. package/dist/components/ChallengeSubmission/AvailableEvaluationQueueList.js +1 -1
  78. package/dist/components/ChallengeSubmission/AvailableEvaluationQueueList.js.map +1 -1
  79. package/dist/components/ChallengeSubmission/ChallengeSubmission.d.ts.map +1 -1
  80. package/dist/components/ChallengeSubmission/ChallengeSubmission.js +1 -1
  81. package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
  82. package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js +1 -1
  83. package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js.map +1 -1
  84. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js +6 -6
  85. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  86. package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.d.ts.map +1 -1
  87. package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.js +4 -4
  88. package/dist/components/ChallengeTeamWizard/ChallengeTeamTable.js.map +1 -1
  89. package/dist/components/ChallengeTeamWizard/SelectChallengeTeam.js +4 -4
  90. package/dist/components/ChallengeTeamWizard/SelectChallengeTeam.js.map +1 -1
  91. package/dist/components/CitationPopover/CitationPopoverContent.js +4 -4
  92. package/dist/components/CitationPopover/CitationPopoverContent.js.map +1 -1
  93. package/dist/components/CitationPopover/CitationPopoverUtils.js +2 -2
  94. package/dist/components/CitationPopover/CitationPopoverUtils.js.map +1 -1
  95. package/dist/components/CohortBuilder/CohortBuilder.css +1 -0
  96. package/dist/components/CohortBuilder/CohortBuilder.d.ts +35 -0
  97. package/dist/components/CohortBuilder/CohortBuilder.d.ts.map +1 -0
  98. package/dist/components/CohortBuilder/CohortBuilder.js +108 -0
  99. package/dist/components/CohortBuilder/CohortBuilder.js.map +1 -0
  100. package/dist/components/CohortBuilder/CohortBuilder.module.js +10 -0
  101. package/dist/components/CohortBuilder/CohortBuilder.module.js.map +1 -0
  102. package/dist/components/CohortBuilder/CohortBuilder.module.scss +20 -0
  103. package/dist/components/CohortBuilder/CohortFilesPanel.d.ts +16 -0
  104. package/dist/components/CohortBuilder/CohortFilesPanel.d.ts.map +1 -0
  105. package/dist/components/CohortBuilder/CohortFilesPanel.js +124 -0
  106. package/dist/components/CohortBuilder/CohortFilesPanel.js.map +1 -0
  107. package/dist/components/CohortBuilder/cohortHandOff.d.ts +25 -0
  108. package/dist/components/CohortBuilder/cohortHandOff.d.ts.map +1 -0
  109. package/dist/components/CohortBuilder/cohortHandOff.js +26 -0
  110. package/dist/components/CohortBuilder/cohortHandOff.js.map +1 -0
  111. package/dist/components/ColumnFilter/ColumnFilter.d.ts.map +1 -1
  112. package/dist/components/ColumnFilter/ColumnFilter.js +14 -13
  113. package/dist/components/ColumnFilter/ColumnFilter.js.map +1 -1
  114. package/dist/components/ComponentCollapse.d.ts.map +1 -1
  115. package/dist/components/ComponentCollapse.js +2 -1
  116. package/dist/components/ComponentCollapse.js.map +1 -1
  117. package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
  118. package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
  119. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  120. package/dist/components/DataGrid/SynapseGrid.js +231 -219
  121. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  122. package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts.map +1 -1
  123. package/dist/components/DataGrid/SyncGridWithSourceButton.js +5 -4
  124. package/dist/components/DataGrid/SyncGridWithSourceButton.js.map +1 -1
  125. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts +11 -2
  126. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts.map +1 -1
  127. package/dist/components/DataGrid/columns/AutocompleteColumn.js +115 -109
  128. package/dist/components/DataGrid/columns/AutocompleteColumn.js.map +1 -1
  129. package/dist/components/DataGrid/columns/NumberColumn.js +1 -1
  130. package/dist/components/DataGrid/columns/NumberColumn.js.map +1 -1
  131. package/dist/components/DataGrid/columns/NumberOrEnumColumn.d.ts +20 -0
  132. package/dist/components/DataGrid/columns/NumberOrEnumColumn.d.ts.map +1 -0
  133. package/dist/components/DataGrid/columns/NumberOrEnumColumn.js +18 -0
  134. package/dist/components/DataGrid/columns/NumberOrEnumColumn.js.map +1 -0
  135. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
  136. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +7 -5
  137. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
  138. package/dist/components/DataGrid/components/ExportCsvFromGridButton.js +4 -4
  139. package/dist/components/DataGrid/components/ExportCsvFromGridButton.js.map +1 -1
  140. package/dist/components/DataGrid/components/ReorderColumnsButton.js +4 -4
  141. package/dist/components/DataGrid/components/ReorderColumnsButton.js.map +1 -1
  142. package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
  143. package/dist/components/DataGrid/components/ReorderColumnsDialog.js +12 -8
  144. package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
  145. package/dist/components/DataGrid/components/UploadCsvToGridButton.js +1 -1
  146. package/dist/components/DataGrid/components/UploadCsvToGridButton.js.map +1 -1
  147. package/dist/components/DataGrid/components/contextMenu.js +3 -3
  148. package/dist/components/DataGrid/components/contextMenu.js.map +1 -1
  149. package/dist/components/DataGrid/hooks/useGridUndoRedo.d.ts.map +1 -1
  150. package/dist/components/DataGrid/hooks/useGridUndoRedo.js +14 -12
  151. package/dist/components/DataGrid/hooks/useGridUndoRedo.js.map +1 -1
  152. package/dist/components/DataGrid/hooks/useStack.d.ts +1 -1
  153. package/dist/components/DataGrid/hooks/useStack.js +2 -2
  154. package/dist/components/DataGrid/hooks/useStack.js.map +1 -1
  155. package/dist/components/DataGrid/utils/applyModelChange.d.ts.map +1 -1
  156. package/dist/components/DataGrid/utils/applyModelChange.js +14 -14
  157. package/dist/components/DataGrid/utils/applyModelChange.js.map +1 -1
  158. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  159. package/dist/components/DataGrid/utils/columnFactory.js +47 -42
  160. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  161. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js +7 -7
  162. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js.map +1 -1
  163. package/dist/components/DataGrid/utils/json-rx/JsonRx.js +2 -2
  164. package/dist/components/DataGrid/utils/json-rx/JsonRx.js.map +1 -1
  165. package/dist/components/DataGrid/utils/splitPatch.d.ts.map +1 -1
  166. package/dist/components/DataGrid/utils/splitPatch.js +22 -13
  167. package/dist/components/DataGrid/utils/splitPatch.js.map +1 -1
  168. package/dist/components/DownloadCart/DownloadCartPage.js +1 -1
  169. package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
  170. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
  171. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +3 -2
  172. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
  173. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.js.map +1 -1
  174. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.module.scss +1 -3
  175. package/dist/components/DownloadCart/MeetAccessRequirementCard.js +1 -1
  176. package/dist/components/DownloadCart/MeetAccessRequirementCard.js.map +1 -1
  177. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
  178. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js +16 -10
  179. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
  180. package/dist/components/EntityDownloadButton/EntityDownloadButton.js +1 -1
  181. package/dist/components/EntityDownloadButton/EntityDownloadButton.js.map +1 -1
  182. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js +5 -5
  183. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  184. package/dist/components/EntityFinder/EntityFinder.js +4 -4
  185. package/dist/components/EntityFinder/EntityIdTextField.js +1 -1
  186. package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -1
  187. package/dist/components/EntityFinder/details/view/DetailsView.d.ts.map +1 -1
  188. package/dist/components/EntityFinder/details/view/DetailsView.js +4 -4
  189. package/dist/components/EntityFinder/details/view/DetailsView.js.map +1 -1
  190. package/dist/components/EntityFinder/tree/VirtualizedTree.d.ts.map +1 -1
  191. package/dist/components/EntityFinder/tree/VirtualizedTree.js +5 -4
  192. package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
  193. package/dist/components/EntityHeaderTable/EntityHeaderTable.js +4 -4
  194. package/dist/components/EntityHeaderTable/EntityHeaderTable.js.map +1 -1
  195. package/dist/components/EntityHeaderTable/Filter.d.ts.map +1 -1
  196. package/dist/components/EntityHeaderTable/Filter.js +1 -1
  197. package/dist/components/EntityHeaderTable/Filter.js.map +1 -1
  198. package/dist/components/EntityTreeTable/components/EntityNameCell.d.ts.map +1 -1
  199. package/dist/components/EntityTreeTable/components/EntityNameCell.js +2 -1
  200. package/dist/components/EntityTreeTable/components/EntityNameCell.js.map +1 -1
  201. package/dist/components/EntityUpload/FileUploadProgress.d.ts.map +1 -1
  202. package/dist/components/EntityUpload/FileUploadProgress.js +11 -7
  203. package/dist/components/EntityUpload/FileUploadProgress.js.map +1 -1
  204. package/dist/components/Evaluation/EvaluationRoundEditor.js.map +1 -1
  205. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.d.ts.map +1 -1
  206. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.js +4 -3
  207. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.js.map +1 -1
  208. package/dist/components/ExperimentalMode/ExperimentalMode.js +1 -1
  209. package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
  210. package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js +1 -1
  211. package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js.map +1 -1
  212. package/dist/components/FeaturedDataTabs/FacetPlotsCard.d.ts.map +1 -1
  213. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +80 -84
  214. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  215. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts.map +1 -1
  216. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js +2 -1
  217. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js.map +1 -1
  218. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -1
  219. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +2 -1
  220. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -1
  221. package/dist/components/FormTemplateEditor/FieldLibrary.d.ts.map +1 -1
  222. package/dist/components/FormTemplateEditor/FieldLibrary.js +2 -1
  223. package/dist/components/FormTemplateEditor/FieldLibrary.js.map +1 -1
  224. package/dist/components/FormTemplateEditor/FieldLibraryRow.js +4 -4
  225. package/dist/components/FormTemplateEditor/FieldLibraryRow.js.map +1 -1
  226. package/dist/components/FormTemplateEditor/FormStructurePanel.js +7 -7
  227. package/dist/components/FormTemplateEditor/FormStructurePanel.js.map +1 -1
  228. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js +1 -1
  229. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js.map +1 -1
  230. package/dist/components/FormTemplateEditor/StepCard.d.ts.map +1 -1
  231. package/dist/components/FormTemplateEditor/StepCard.js +15 -10
  232. package/dist/components/FormTemplateEditor/StepCard.js.map +1 -1
  233. package/dist/components/FormTemplateEditor/StepFieldRow.d.ts.map +1 -1
  234. package/dist/components/FormTemplateEditor/StepFieldRow.js +11 -6
  235. package/dist/components/FormTemplateEditor/StepFieldRow.js.map +1 -1
  236. package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts.map +1 -1
  237. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js +2 -1
  238. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js.map +1 -1
  239. package/dist/components/FormTemplateEditor/schemaFieldUtils.js +2 -2
  240. package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -1
  241. package/dist/components/FullTextSearch/FullTextSearch.js +8 -8
  242. package/dist/components/GenericCard/CardUtils.js.map +1 -1
  243. package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +46 -46
  244. package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js.map +1 -1
  245. package/dist/components/GenericCard/DuoTermTags/duoTerms.js +1 -1
  246. package/dist/components/GenericCard/DuoTermTags/duoTerms.js.map +1 -1
  247. package/dist/components/GenericCard/PortalDOI/PortalDOI.js +5 -5
  248. package/dist/components/GenericCard/PortalDOI/PortalDOI.js.map +1 -1
  249. package/dist/components/GenericCard/TableRowGenericCard.js +38 -38
  250. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  251. package/dist/components/GoalsV3/GoalsV3.js +1 -1
  252. package/dist/components/GoalsV3/GoalsV3.js.map +1 -1
  253. package/dist/components/HelpPopover/HelpPopover.js +1 -1
  254. package/dist/components/HelpPopover/HelpPopover.js.map +1 -1
  255. package/dist/components/HexGrid/HexGrid.d.ts +3 -1
  256. package/dist/components/HexGrid/HexGrid.d.ts.map +1 -1
  257. package/dist/components/HexGrid/HexGrid.js +14 -13
  258. package/dist/components/HexGrid/HexGrid.js.map +1 -1
  259. package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
  260. package/dist/components/IconSvg/IconSvg.js +154 -47
  261. package/dist/components/IconSvg/IconSvg.js.map +1 -1
  262. package/dist/components/IconSvg/index.d.ts +1 -1
  263. package/dist/components/IconSvg/index.d.ts.map +1 -1
  264. package/dist/components/IconSvg/index.js.map +1 -1
  265. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.d.ts.map +1 -1
  266. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js +3 -3
  267. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js.map +1 -1
  268. package/dist/components/JsonSchemaForm/templates/ButtonTemplate.d.ts.map +1 -1
  269. package/dist/components/JsonSchemaForm/templates/ButtonTemplate.js +19 -16
  270. package/dist/components/JsonSchemaForm/templates/ButtonTemplate.js.map +1 -1
  271. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.d.ts.map +1 -1
  272. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js +2 -1
  273. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
  274. package/dist/components/JsonSchemaForm/widgets/PhoneWidget.d.ts +9 -0
  275. package/dist/components/JsonSchemaForm/widgets/PhoneWidget.d.ts.map +1 -0
  276. package/dist/components/JsonSchemaForm/widgets/PhoneWidget.js +21 -0
  277. package/dist/components/JsonSchemaForm/widgets/PhoneWidget.js.map +1 -0
  278. package/dist/components/Markdown/MarkdownCollapse.d.ts.map +1 -1
  279. package/dist/components/Markdown/MarkdownCollapse.js +3 -1
  280. package/dist/components/Markdown/MarkdownCollapse.js.map +1 -1
  281. package/dist/components/Markdown/MarkdownEditor.js +1 -1
  282. package/dist/components/Markdown/MarkdownEditor.js.map +1 -1
  283. package/dist/components/Markdown/widget/index.d.ts +1 -1
  284. package/dist/components/Markdown/widget/index.d.ts.map +1 -1
  285. package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js +1 -1
  286. package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js.map +1 -1
  287. package/dist/components/ModalDownload/ModalDownload.d.ts.map +1 -1
  288. package/dist/components/ModalDownload/ModalDownload.js +2 -1
  289. package/dist/components/ModalDownload/ModalDownload.js.map +1 -1
  290. package/dist/components/OAuthClientManagement/OAuthManagement.js +14 -13
  291. package/dist/components/OAuthClientManagement/OAuthManagement.js.map +1 -1
  292. package/dist/components/Plot/BarPlot.js +1 -1
  293. package/dist/components/Plot/BarPlot.js.map +1 -1
  294. package/dist/components/Plot/PlotPanelHeader.d.ts +3 -2
  295. package/dist/components/Plot/PlotPanelHeader.d.ts.map +1 -1
  296. package/dist/components/Plot/PlotPanelHeader.js.map +1 -1
  297. package/dist/components/PortalList/PortalCard.d.ts.map +1 -1
  298. package/dist/components/PortalList/PortalCard.js +6 -5
  299. package/dist/components/PortalList/PortalCard.js.map +1 -1
  300. package/dist/components/PortalList/PortalList.js +4 -4
  301. package/dist/components/PortalList/PortalList.js.map +1 -1
  302. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js +1 -1
  303. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js.map +1 -1
  304. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js +6 -6
  305. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js +1 -1
  306. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js.map +1 -1
  307. package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
  308. package/dist/components/ProvenanceGraph/ProvenanceGraph.js +3 -3
  309. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  310. package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
  311. package/dist/components/QueryBuilder/FilterConditionRow.js +31 -30
  312. package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
  313. package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -1
  314. package/dist/components/QueryBuilder/FilterGroupNode.js +91 -75
  315. package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -1
  316. package/dist/components/QueryBuilder/QueryBuilderControls.css +1 -1
  317. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
  318. package/dist/components/QueryBuilder/QueryBuilderControls.js +91 -79
  319. package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
  320. package/dist/components/QueryBuilder/QueryBuilderControls.module.js +11 -11
  321. package/dist/components/QueryBuilder/QueryBuilderControls.module.js.map +1 -1
  322. package/dist/components/QueryBuilder/QueryBuilderControls.module.scss +2 -0
  323. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +2 -0
  324. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -1
  325. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -1
  326. package/dist/components/QueryBuilder/queryBuilderLimits.d.ts +18 -0
  327. package/dist/components/QueryBuilder/queryBuilderLimits.d.ts.map +1 -0
  328. package/dist/components/QueryBuilder/queryBuilderLimits.js +38 -0
  329. package/dist/components/QueryBuilder/queryBuilderLimits.js.map +1 -0
  330. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +0 -8
  331. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -1
  332. package/dist/components/QueryBuilder/queryBuilderMetadata.js +6 -9
  333. package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -1
  334. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +5 -4
  335. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -1
  336. package/dist/components/QueryBuilder/queryBuilderTranslation.js +58 -33
  337. package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
  338. package/dist/components/QueryBuilder/useQBCombinedSql.d.ts.map +1 -1
  339. package/dist/components/QueryBuilder/useQBCombinedSql.js +4 -4
  340. package/dist/components/QueryBuilder/useQBCombinedSql.js.map +1 -1
  341. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts.map +1 -1
  342. package/dist/components/QueryBuilder/useQBValueDisplayName.js +5 -5
  343. package/dist/components/QueryBuilder/useQBValueDisplayName.js.map +1 -1
  344. package/dist/components/QueryCountButton/QueryCountButton.js +5 -5
  345. package/dist/components/QueryCountButton/QueryCountButton.js.map +1 -1
  346. package/dist/components/QuerySortSelector.js +5 -5
  347. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +21 -21
  348. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  349. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.d.ts +20 -0
  350. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.d.ts.map +1 -0
  351. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.js +50 -0
  352. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.js.map +1 -0
  353. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.d.ts +5 -3
  354. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.d.ts.map +1 -1
  355. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js +7 -3
  356. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js.map +1 -1
  357. package/dist/components/QueryWrapper/downloadListFiles.d.ts +25 -0
  358. package/dist/components/QueryWrapper/downloadListFiles.d.ts.map +1 -0
  359. package/dist/components/QueryWrapper/downloadListFiles.js +39 -0
  360. package/dist/components/QueryWrapper/downloadListFiles.js.map +1 -0
  361. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.d.ts +16 -0
  362. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.d.ts.map +1 -0
  363. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.js +50 -0
  364. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.js.map +1 -0
  365. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.d.ts +4 -1
  366. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.d.ts.map +1 -1
  367. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.js +15 -28
  368. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.js.map +1 -1
  369. package/dist/components/QueryWrapper/useOnQueryDataChange.d.ts.map +1 -1
  370. package/dist/components/QueryWrapper/useOnQueryDataChange.js +7 -6
  371. package/dist/components/QueryWrapper/useOnQueryDataChange.js.map +1 -1
  372. package/dist/components/QueryWrapperErrorBoundary.d.ts +3 -1
  373. package/dist/components/QueryWrapperErrorBoundary.d.ts.map +1 -1
  374. package/dist/components/QueryWrapperErrorBoundary.js +26 -21
  375. package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
  376. package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.js +7 -7
  377. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +2 -2
  378. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
  379. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +34 -32
  380. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  381. package/dist/components/QueryWrapperPlotNav/QueryWrapperSynapsePlot.js +7 -7
  382. package/dist/components/QueryWrapperPlotNav/UseRowSet.d.ts.map +1 -1
  383. package/dist/components/QueryWrapperPlotNav/UseRowSet.js +12 -12
  384. package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
  385. package/dist/components/ReleaseCard/ReleaseCardLarge.js +5 -5
  386. package/dist/components/ReleaseCard/ReleaseCardLarge.js.map +1 -1
  387. package/dist/components/RowDataTable/CategorizedRowDataTable.css +1 -0
  388. package/dist/components/RowDataTable/CategorizedRowDataTable.d.ts +33 -0
  389. package/dist/components/RowDataTable/CategorizedRowDataTable.d.ts.map +1 -0
  390. package/dist/components/RowDataTable/CategorizedRowDataTable.js +64 -0
  391. package/dist/components/RowDataTable/CategorizedRowDataTable.js.map +1 -0
  392. package/dist/components/RowDataTable/CategorizedRowDataTable.module.js +8 -0
  393. package/dist/components/RowDataTable/CategorizedRowDataTable.module.js.map +1 -0
  394. package/dist/components/RowDataTable/CategorizedRowDataTable.module.scss +18 -0
  395. package/dist/components/RowDataTable/RowDataTable.d.ts +13 -0
  396. package/dist/components/RowDataTable/RowDataTable.d.ts.map +1 -1
  397. package/dist/components/RowDataTable/RowDataTable.js +25 -8
  398. package/dist/components/RowDataTable/RowDataTable.js.map +1 -1
  399. package/dist/components/RssFeedCards/RssFeedCards.js +1 -1
  400. package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
  401. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.d.ts.map +1 -1
  402. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.js +2 -2
  403. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.js.map +1 -1
  404. package/dist/components/SchemaDrivenAnnotationEditor/template/ObjectFieldTemplate.js +1 -1
  405. package/dist/components/SchemaDrivenAnnotationEditor/template/ObjectFieldTemplate.js.map +1 -1
  406. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +17 -9
  407. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  408. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +39 -30
  409. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  410. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js +24 -24
  411. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  412. package/dist/components/ShareThisPage/ShareThisPage.js +4 -4
  413. package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
  414. package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.js +8 -8
  415. package/dist/components/SustainabilityScorecard/DialLayout.js +1 -1
  416. package/dist/components/SustainabilityScorecard/DialLayout.js.map +1 -1
  417. package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js +1 -1
  418. package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js.map +1 -1
  419. package/dist/components/SynapseChat/SynapseChat.js +1 -1
  420. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  421. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
  422. package/dist/components/SynapseChat/SynapseChatInteraction.js +2 -1
  423. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  424. package/dist/components/SynapseChat/SynapseChatMessage.js +1 -1
  425. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  426. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js +1 -1
  427. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js.map +1 -1
  428. package/dist/components/SynapseFooter/SynapseFooter.js +1 -1
  429. package/dist/components/SynapseFooter/SynapseFooter.js.map +1 -1
  430. package/dist/components/SynapseForm/NavButtons.js.map +1 -1
  431. package/dist/components/SynapseForm/StepsSideNav.js.map +1 -1
  432. package/dist/components/SynapseHomepageV2/SynapseFeaturedDatasetItem.js +1 -1
  433. package/dist/components/SynapseHomepageV2/SynapseFeaturedDatasetItem.js.map +1 -1
  434. package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.d.ts.map +1 -1
  435. package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.js +2 -1
  436. package/dist/components/SynapseHomepageV2/SynapseHomepageNavBar.js.map +1 -1
  437. package/dist/components/SynapseHomepageV2/SynapseInActionItem.js +4 -4
  438. package/dist/components/SynapseHomepageV2/SynapseInActionItem.js.map +1 -1
  439. package/dist/components/SynapseHomepageV2/SynapseTrendingProjectsItem.js +1 -1
  440. package/dist/components/SynapseHomepageV2/SynapseTrendingProjectsItem.js.map +1 -1
  441. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts.map +1 -1
  442. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js +4 -1
  443. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js.map +1 -1
  444. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
  445. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  446. package/dist/components/SynapseSearchPageResults/HighlightedTypography.js +1 -1
  447. package/dist/components/SynapseSearchPageResults/HighlightedTypography.js.map +1 -1
  448. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.d.ts.map +1 -1
  449. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js +3 -3
  450. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js.map +1 -1
  451. package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js +1 -1
  452. package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js.map +1 -1
  453. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.d.ts.map +1 -1
  454. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js +12 -9
  455. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js.map +1 -1
  456. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.d.ts.map +1 -1
  457. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +38 -44
  458. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
  459. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js +4 -4
  460. package/dist/components/SynapseTable/SqlEditor.js +7 -7
  461. package/dist/components/SynapseTable/SynapseTable.js +8 -8
  462. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  463. package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
  464. package/dist/components/SynapseTable/SynapseTableRenderers.js +73 -72
  465. package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
  466. package/dist/components/SynapseTable/SynapseTableUtils.js +1 -1
  467. package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
  468. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
  469. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +44 -45
  470. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
  471. package/dist/components/SynapseTable/datasets/DatasetEditorVersionCell.js +1 -1
  472. package/dist/components/SynapseTable/datasets/DatasetEditorVersionCell.js.map +1 -1
  473. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.d.ts.map +1 -1
  474. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js +6 -6
  475. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  476. package/dist/components/SynapseTable/export/ExportToAnalysisPlatformDialog.js +4 -4
  477. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js +12 -12
  478. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js.map +1 -1
  479. package/dist/components/SynapseTable/table-top/ColumnSelection.js +6 -6
  480. package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts +0 -1
  481. package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts.map +1 -1
  482. package/dist/components/SynapseTable/table-top/DownloadOptions.js +64 -57
  483. package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
  484. package/dist/components/SynapseTable/usePrefetchTableData.d.ts.map +1 -1
  485. package/dist/components/SynapseTable/usePrefetchTableData.js +3 -3
  486. package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
  487. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js +2 -2
  488. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  489. package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js +1 -1
  490. package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js.map +1 -1
  491. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorTestUtils.js +1 -1
  492. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorTestUtils.js.map +1 -1
  493. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts.map +1 -1
  494. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js +2 -2
  495. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js.map +1 -1
  496. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js +59 -59
  497. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  498. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.d.ts.map +1 -1
  499. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.js +6 -4
  500. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormActions.js.map +1 -1
  501. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js +1 -1
  502. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js.map +1 -1
  503. package/dist/components/TanStackTable/ColumnHeader.js +1 -1
  504. package/dist/components/TanStackTable/ColumnHeader.js.map +1 -1
  505. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js +1 -1
  506. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js.map +1 -1
  507. package/dist/components/TanStackTable/StyledTanStackTable.d.ts.map +1 -1
  508. package/dist/components/TanStackTable/StyledTanStackTable.js +1 -4
  509. package/dist/components/TanStackTable/StyledTanStackTable.js.map +1 -1
  510. package/dist/components/TeamSubjectsSelector/TeamBadgeOrError.js +1 -1
  511. package/dist/components/TeamSubjectsSelector/TeamBadgeOrError.js.map +1 -1
  512. package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.d.ts.map +1 -1
  513. package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js +4 -3
  514. package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js.map +1 -1
  515. package/dist/components/TermsAndConditions/TermsAndConditions.js.map +1 -1
  516. package/dist/components/TotalQueryResults.js +14 -14
  517. package/dist/components/Webhook/WebhookDashboard.d.ts.map +1 -1
  518. package/dist/components/Webhook/WebhookDashboard.js +3 -3
  519. package/dist/components/Webhook/WebhookDashboard.js.map +1 -1
  520. package/dist/components/dataaccess/AccessRequirementDashboard.js +4 -4
  521. package/dist/components/dataaccess/AccessRequirementDashboard.js.map +1 -1
  522. package/dist/components/dataaccess/AccessRequirementTable.js +1 -1
  523. package/dist/components/dataaccess/AccessRequirementTable.js.map +1 -1
  524. package/dist/components/dataaccess/EDucTemplateTable.d.ts.map +1 -1
  525. package/dist/components/dataaccess/EDucTemplateTable.js +13 -11
  526. package/dist/components/dataaccess/EDucTemplateTable.js.map +1 -1
  527. package/dist/components/dataaccess/FormTemplateTable.js +6 -6
  528. package/dist/components/dataaccess/FormTemplateTable.js.map +1 -1
  529. package/dist/components/dataaccess/ReviewerDashboard.js +17 -17
  530. package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
  531. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js +4 -4
  532. package/dist/components/doi/CreateOrUpdateDoiModal.js +1 -1
  533. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  534. package/dist/components/download_list/DownloadConfirmationUtils.d.ts +5 -1
  535. package/dist/components/download_list/DownloadConfirmationUtils.d.ts.map +1 -1
  536. package/dist/components/download_list/DownloadConfirmationUtils.js +2 -2
  537. package/dist/components/download_list/DownloadConfirmationUtils.js.map +1 -1
  538. package/dist/components/download_list/DownloadDetails.d.ts.map +1 -1
  539. package/dist/components/download_list/DownloadDetails.js +12 -10
  540. package/dist/components/download_list/DownloadDetails.js.map +1 -1
  541. package/dist/components/entity/metadata/AnnotationsTable.js +1 -1
  542. package/dist/components/entity/metadata/AnnotationsTable.js.map +1 -1
  543. package/dist/components/entity/page/CreatedByModifiedBy.js +1 -1
  544. package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
  545. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
  546. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  547. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +1 -1
  548. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
  549. package/dist/components/error/ErrorBanner.d.ts.map +1 -1
  550. package/dist/components/error/ErrorBanner.js +49 -46
  551. package/dist/components/error/ErrorBanner.js.map +1 -1
  552. package/dist/components/error/ErrorChip.d.ts.map +1 -1
  553. package/dist/components/error/ErrorChip.js +2 -1
  554. package/dist/components/error/ErrorChip.js.map +1 -1
  555. package/dist/components/file/upload/MultiFileUploadProgress.js +5 -5
  556. package/dist/components/row_renderers/Dataset.d.ts.map +1 -1
  557. package/dist/components/row_renderers/Dataset.js +6 -6
  558. package/dist/components/row_renderers/Dataset.js.map +1 -1
  559. package/dist/components/row_renderers/Funder.js +1 -1
  560. package/dist/components/row_renderers/Funder.js.map +1 -1
  561. package/dist/components/table/CsvPreview/CreateTableFromCsvDialog.js +14 -14
  562. package/dist/components/table/CsvPreview/CsvPreviewWithOptions.js +4 -4
  563. package/dist/components/table/CsvPreview/CsvPreviewWithOptions.js.map +1 -1
  564. package/dist/components/widgets/ElementWithTooltip.d.ts +6 -1
  565. package/dist/components/widgets/ElementWithTooltip.d.ts.map +1 -1
  566. package/dist/components/widgets/ElementWithTooltip.js +22 -14
  567. package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
  568. package/dist/components/widgets/RangeSlider/RangeSlider.d.ts.map +1 -1
  569. package/dist/components/widgets/RangeSlider/RangeSlider.js +1 -1
  570. package/dist/components/widgets/RangeSlider/RangeSlider.js.map +1 -1
  571. package/dist/components/widgets/SynapseImage.js +1 -1
  572. package/dist/components/widgets/SynapseImage.js.map +1 -1
  573. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts +16 -5
  574. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  575. package/dist/components/widgets/facet-nav/FacetNavPanel.js +115 -102
  576. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  577. package/dist/components/widgets/facet-nav/FacetPlotLegendList.d.ts.map +1 -1
  578. package/dist/components/widgets/facet-nav/FacetPlotLegendList.js +4 -2
  579. package/dist/components/widgets/facet-nav/FacetPlotLegendList.js.map +1 -1
  580. package/dist/components/widgets/facet-nav/FacetPlotLegendTable.js +1 -1
  581. package/dist/components/widgets/facet-nav/FacetPlotLegendTable.js.map +1 -1
  582. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.d.ts +2 -0
  583. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.d.ts.map +1 -1
  584. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.js.map +1 -1
  585. package/dist/components/widgets/facet-nav/PlotsContainer.d.ts +7 -0
  586. package/dist/components/widgets/facet-nav/PlotsContainer.d.ts.map +1 -1
  587. package/dist/components/widgets/facet-nav/PlotsContainer.js +47 -45
  588. package/dist/components/widgets/facet-nav/PlotsContainer.js.map +1 -1
  589. package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js +4 -4
  590. package/dist/components/widgets/facet-nav/useFacetPlots.d.ts +3 -2
  591. package/dist/components/widgets/facet-nav/useFacetPlots.d.ts.map +1 -1
  592. package/dist/components/widgets/facet-nav/useFacetPlots.js +16 -15
  593. package/dist/components/widgets/facet-nav/useFacetPlots.js.map +1 -1
  594. package/dist/components/widgets/query-filter/CombinedRangeFacetFilter.js +4 -4
  595. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +2 -2
  596. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
  597. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +62 -60
  598. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  599. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts +2 -0
  600. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts.map +1 -1
  601. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js +10 -10
  602. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js.map +1 -1
  603. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
  604. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
  605. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +2 -1
  606. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
  607. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.d.ts +3 -2
  608. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.d.ts.map +1 -1
  609. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.js.map +1 -1
  610. package/dist/components/widgets/query-filter/FacetFilterControls.d.ts +3 -2
  611. package/dist/components/widgets/query-filter/FacetFilterControls.d.ts.map +1 -1
  612. package/dist/components/widgets/query-filter/FacetFilterControls.js +63 -62
  613. package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
  614. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.d.ts.map +1 -1
  615. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.js +30 -29
  616. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.js.map +1 -1
  617. package/dist/components/widgets/query-filter/RangeFacetFilter.js +5 -5
  618. package/dist/features/curator/dashboard/components/NextStepButton.d.ts.map +1 -1
  619. package/dist/features/curator/dashboard/components/NextStepButton.js +7 -6
  620. package/dist/features/curator/dashboard/components/NextStepButton.js.map +1 -1
  621. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +8 -8
  622. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
  623. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +4 -4
  624. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  625. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +4 -4
  626. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  627. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +1 -1
  628. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -1
  629. package/dist/features/entity/metadata-task/create-task/CurateTaskForm.js +4 -4
  630. package/dist/features/entity/metadata-task/create-task/CurateTaskForm.js.map +1 -1
  631. package/dist/features/entity/metadata-task/create-task/TaskCategoryCard.js +1 -1
  632. package/dist/features/entity/metadata-task/create-task/TaskCategoryCard.js.map +1 -1
  633. package/dist/features/entity/metadata-task/create-task/TaskFormHeader.js +1 -1
  634. package/dist/features/entity/metadata-task/create-task/TaskFormHeader.js.map +1 -1
  635. package/dist/features/entity/metadata-task/create-task/curationTaskFlowRoutes.js +10 -10
  636. package/dist/features/entity/metadata-task/create-task/curationTaskFlowRoutes.js.map +1 -1
  637. package/dist/features/team/invitation/components/OpenInvitationsToUserCard.js +1 -1
  638. package/dist/features/team/invitation/components/OpenInvitationsToUserCard.js.map +1 -1
  639. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.d.ts +53 -0
  640. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.d.ts.map +1 -0
  641. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.js +391 -0
  642. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.js.map +1 -0
  643. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.d.ts +41 -0
  644. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.d.ts.map +1 -0
  645. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.js +379 -0
  646. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.js.map +1 -0
  647. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.d.ts +26 -0
  648. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.d.ts.map +1 -0
  649. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.js +112 -0
  650. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.js.map +1 -0
  651. package/dist/mocks/mockAnnotationColumns.d.ts.map +1 -1
  652. package/dist/mocks/mockAnnotationColumns.js +1 -1
  653. package/dist/mocks/mockAnnotationColumns.js.map +1 -1
  654. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +17 -0
  655. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
  656. package/dist/mocks/msw/handlers/aridhiaHandlers.js +62 -42
  657. package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -1
  658. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts +21 -2
  659. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts.map +1 -1
  660. package/dist/mocks/msw/handlers/asyncJobHandlers.js +30 -22
  661. package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
  662. package/dist/mocks/msw/handlers/cohortBuilderHandlers.d.ts +27 -0
  663. package/dist/mocks/msw/handlers/cohortBuilderHandlers.d.ts.map +1 -0
  664. package/dist/mocks/msw/handlers/cohortBuilderHandlers.js +158 -0
  665. package/dist/mocks/msw/handlers/cohortBuilderHandlers.js.map +1 -0
  666. package/dist/mocks/msw/handlers/entityHandlers.d.ts.map +1 -1
  667. package/dist/mocks/msw/handlers/entityHandlers.js +70 -67
  668. package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
  669. package/dist/mocks/msw/handlers/gridHandlers.js +2 -2
  670. package/dist/mocks/msw/handlers/gridHandlers.js.map +1 -1
  671. package/dist/mocks/msw/handlers/subscriptionHandlers.js +1 -1
  672. package/dist/mocks/msw/handlers/subscriptionHandlers.js.map +1 -1
  673. package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
  674. package/dist/mocks/msw/handlers/userProfileHandlers.js +2 -2
  675. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  676. package/dist/mocks/msw/server.d.ts.map +1 -1
  677. package/dist/mocks/msw/server.js +4 -2
  678. package/dist/mocks/msw/server.js.map +1 -1
  679. package/dist/mocks/query/mockColumnCategoryTable.d.ts +19 -0
  680. package/dist/mocks/query/mockColumnCategoryTable.d.ts.map +1 -0
  681. package/dist/mocks/query/mockColumnCategoryTable.js +188 -0
  682. package/dist/mocks/query/mockColumnCategoryTable.js.map +1 -0
  683. package/dist/stories/ColorPaletteInspector.d.ts.map +1 -1
  684. package/dist/stories/ColorPaletteInspector.js +2 -2
  685. package/dist/stories/ColorPaletteInspector.js.map +1 -1
  686. package/dist/style/components/facet_nav/_facet-nav-panel.scss +8 -0
  687. package/dist/style/main.css +1 -1
  688. package/dist/synapse-queries/auth/useOIDC.js +2 -2
  689. package/dist/synapse-queries/auth/useOIDC.js.map +1 -1
  690. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js +2 -2
  691. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js.map +1 -1
  692. package/dist/synapse-queries/challenge/useChallenge.js +2 -2
  693. package/dist/synapse-queries/challenge/useChallenge.js.map +1 -1
  694. package/dist/synapse-queries/chat/useChat.js +8 -8
  695. package/dist/synapse-queries/chat/useChat.js.map +1 -1
  696. package/dist/synapse-queries/curation/task/useCurationTask.js +10 -10
  697. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  698. package/dist/synapse-queries/dataaccess/useAccessRequirements.js +24 -24
  699. package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
  700. package/dist/synapse-queries/dataaccess/useDataAccessSubmission.js +4 -4
  701. package/dist/synapse-queries/dataaccess/useDataAccessSubmission.js.map +1 -1
  702. package/dist/synapse-queries/dataaccess/useEDuc.js +6 -6
  703. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  704. package/dist/synapse-queries/dataaccess/useFormTemplate.js +4 -4
  705. package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -1
  706. package/dist/synapse-queries/download/index.js +2 -2
  707. package/dist/synapse-queries/download/useDownloadList.d.ts +5 -0
  708. package/dist/synapse-queries/download/useDownloadList.d.ts.map +1 -1
  709. package/dist/synapse-queries/download/useDownloadList.js +14 -13
  710. package/dist/synapse-queries/download/useDownloadList.js.map +1 -1
  711. package/dist/synapse-queries/entity/useEntity.d.ts.map +1 -1
  712. package/dist/synapse-queries/entity/useEntity.js +20 -20
  713. package/dist/synapse-queries/entity/useEntity.js.map +1 -1
  714. package/dist/synapse-queries/entity/useExportToADWorkbench.d.ts.map +1 -1
  715. package/dist/synapse-queries/entity/useExportToADWorkbench.js +2 -1
  716. package/dist/synapse-queries/entity/useExportToADWorkbench.js.map +1 -1
  717. package/dist/synapse-queries/entity/useExportToCavatica.d.ts.map +1 -1
  718. package/dist/synapse-queries/entity/useExportToCavatica.js +3 -2
  719. package/dist/synapse-queries/entity/useExportToCavatica.js.map +1 -1
  720. package/dist/synapse-queries/entity/useExportToPluto.d.ts.map +1 -1
  721. package/dist/synapse-queries/entity/useExportToPluto.js +2 -1
  722. package/dist/synapse-queries/entity/useExportToPluto.js.map +1 -1
  723. package/dist/synapse-queries/entity/useGetQueryResultBundle.d.ts.map +1 -1
  724. package/dist/synapse-queries/entity/useGetQueryResultBundle.js +4 -7
  725. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  726. package/dist/synapse-queries/forum/useReply.js +6 -6
  727. package/dist/synapse-queries/forum/useReply.js.map +1 -1
  728. package/dist/synapse-queries/forum/useThread.js +14 -14
  729. package/dist/synapse-queries/forum/useThread.js.map +1 -1
  730. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js +1 -1
  731. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  732. package/dist/synapse-queries/grid/useGridSession.js +4 -4
  733. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  734. package/dist/synapse-queries/index.js +177 -176
  735. package/dist/synapse-queries/oauth/useOAuthClient.js +9 -9
  736. package/dist/synapse-queries/oauth/useOAuthClient.js.map +1 -1
  737. package/dist/synapse-queries/portal/usePortal.js +7 -7
  738. package/dist/synapse-queries/portal/usePortal.js.map +1 -1
  739. package/dist/synapse-queries/subscription/useSubscription.js +4 -4
  740. package/dist/synapse-queries/subscription/useSubscription.js.map +1 -1
  741. package/dist/synapse-queries/table/useTableUpdateTransaction.js +2 -2
  742. package/dist/synapse-queries/table/useTableUpdateTransaction.js.map +1 -1
  743. package/dist/synapse-queries/team/useTeam.js +2 -2
  744. package/dist/synapse-queries/team/useTeam.js.map +1 -1
  745. package/dist/synapse-queries/team/useTeamList.d.ts.map +1 -1
  746. package/dist/synapse-queries/team/useTeamList.js +3 -3
  747. package/dist/synapse-queries/team/useTeamList.js.map +1 -1
  748. package/dist/synapse-queries/team/useTeamMembers.js +8 -8
  749. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  750. package/dist/synapse-queries/termsOfService/useTermsOfService.js +2 -2
  751. package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
  752. package/dist/synapse-queries/trash/useTrashCan.js +4 -4
  753. package/dist/synapse-queries/trash/useTrashCan.js.map +1 -1
  754. package/dist/synapse-queries/user/useCertificationQuiz.js +2 -2
  755. package/dist/synapse-queries/user/useCertificationQuiz.js.map +1 -1
  756. package/dist/synapse-queries/user/useFavorites.js +4 -4
  757. package/dist/synapse-queries/user/useFavorites.js.map +1 -1
  758. package/dist/synapse-queries/user/useGetUserChallenges.d.ts.map +1 -1
  759. package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
  760. package/dist/synapse-queries/user/useRevokeCertification.js +2 -2
  761. package/dist/synapse-queries/user/useRevokeCertification.js.map +1 -1
  762. package/dist/synapse-queries/wiki/useWiki.js +10 -10
  763. package/dist/synapse-queries/wiki/useWiki.js.map +1 -1
  764. package/dist/theme/DefaultTheme.d.ts.map +1 -1
  765. package/dist/theme/DefaultTheme.js +4 -1
  766. package/dist/theme/DefaultTheme.js.map +1 -1
  767. package/dist/tsconfig.build.tsbuildinfo +1 -1
  768. package/dist/utils/APIConstants.d.ts.map +1 -1
  769. package/dist/utils/APIConstants.js.map +1 -1
  770. package/dist/utils/AppUtils/AppUtils.js +1 -1
  771. package/dist/utils/AppUtils/AppUtils.js.map +1 -1
  772. package/dist/utils/ContentTypeUtils.js +4 -4
  773. package/dist/utils/ContentTypeUtils.js.map +1 -1
  774. package/dist/utils/PermissionLevelToAccessType.js +1 -1
  775. package/dist/utils/PermissionLevelToAccessType.js.map +1 -1
  776. package/dist/utils/analytics/useGoogleAnalytics.js +1 -1
  777. package/dist/utils/analytics/useGoogleAnalytics.js.map +1 -1
  778. package/dist/utils/context/DocumentMetadataContext.js +1 -1
  779. package/dist/utils/context/DocumentMetadataContext.js.map +1 -1
  780. package/dist/utils/functions/AccessControlListUtils.d.ts.map +1 -1
  781. package/dist/utils/functions/AccessControlListUtils.js +3 -3
  782. package/dist/utils/functions/AccessControlListUtils.js.map +1 -1
  783. package/dist/utils/functions/ArrayUtils.js +2 -2
  784. package/dist/utils/functions/ArrayUtils.js.map +1 -1
  785. package/dist/utils/functions/EntityTypeUtils.d.ts.map +1 -1
  786. package/dist/utils/functions/EntityTypeUtils.js.map +1 -1
  787. package/dist/utils/functions/FileHandleUtils.js +1 -1
  788. package/dist/utils/functions/FileHandleUtils.js.map +1 -1
  789. package/dist/utils/functions/RegularExpressions.js +1 -1
  790. package/dist/utils/functions/RegularExpressions.js.map +1 -1
  791. package/dist/utils/functions/StringUtils.d.ts.map +1 -1
  792. package/dist/utils/functions/StringUtils.js +1 -2
  793. package/dist/utils/functions/StringUtils.js.map +1 -1
  794. package/dist/utils/functions/deepLinkingUtils.js +2 -2
  795. package/dist/utils/functions/deepLinkingUtils.js.map +1 -1
  796. package/dist/utils/functions/enumerationFacet.d.ts +26 -0
  797. package/dist/utils/functions/enumerationFacet.d.ts.map +1 -0
  798. package/dist/utils/functions/enumerationFacet.js +27 -0
  799. package/dist/utils/functions/enumerationFacet.js.map +1 -0
  800. package/dist/utils/functions/facetCountUtils.d.ts +12 -0
  801. package/dist/utils/functions/facetCountUtils.d.ts.map +1 -0
  802. package/dist/utils/functions/facetCountUtils.js +9 -0
  803. package/dist/utils/functions/facetCountUtils.js.map +1 -0
  804. package/dist/utils/functions/getEndpoint.js.map +1 -1
  805. package/dist/utils/functions/getUserData.js +1 -1
  806. package/dist/utils/functions/getUserData.js.map +1 -1
  807. package/dist/utils/functions/queryUtils.d.ts +1 -1
  808. package/dist/utils/functions/queryUtils.d.ts.map +1 -1
  809. package/dist/utils/functions/queryUtils.js +26 -22
  810. package/dist/utils/functions/queryUtils.js.map +1 -1
  811. package/dist/utils/functions/testDownloadSpeed.d.ts.map +1 -1
  812. package/dist/utils/functions/testDownloadSpeed.js +17 -26
  813. package/dist/utils/functions/testDownloadSpeed.js.map +1 -1
  814. package/dist/utils/functions/unCamelCase.js +1 -1
  815. package/dist/utils/functions/unCamelCase.js.map +1 -1
  816. package/dist/utils/hooks/useGetInfoFromIds.js +5 -5
  817. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  818. package/dist/utils/hooks/useImmutableTableQuery/TableQueryReducerActions.js +1 -1
  819. package/dist/utils/hooks/useImmutableTableQuery/TableQueryReducerActions.js.map +1 -1
  820. package/dist/utils/hooks/useLogin.d.ts.map +1 -1
  821. package/dist/utils/hooks/useLogin.js +5 -5
  822. package/dist/utils/hooks/useLogin.js.map +1 -1
  823. package/dist/utils/hooks/useUploadFileEntity/useCreateFolderPath.js.map +1 -1
  824. package/dist/utils/jsonschema/collectTopLevelProperties.d.ts +6 -0
  825. package/dist/utils/jsonschema/collectTopLevelProperties.d.ts.map +1 -1
  826. package/dist/utils/jsonschema/collectTopLevelProperties.js +1 -1
  827. package/dist/utils/jsonschema/collectTopLevelProperties.js.map +1 -1
  828. package/dist/utils/jsonschema/getNumberOrEnumInfo.d.ts +22 -0
  829. package/dist/utils/jsonschema/getNumberOrEnumInfo.d.ts.map +1 -0
  830. package/dist/utils/jsonschema/getNumberOrEnumInfo.js +39 -0
  831. package/dist/utils/jsonschema/getNumberOrEnumInfo.js.map +1 -0
  832. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.d.ts +1 -0
  833. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.d.ts.map +1 -1
  834. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.js +1 -1
  835. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.js.map +1 -1
  836. package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts +5 -0
  837. package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts.map +1 -1
  838. package/dist/utils/jsonschema/getSchemaPropertyInfo.js +30 -15
  839. package/dist/utils/jsonschema/getSchemaPropertyInfo.js.map +1 -1
  840. package/dist/utils/jsonschema/submissionContext.js +2 -2
  841. package/dist/utils/jsonschema/submissionContext.js.map +1 -1
  842. package/package.json +7 -6
@@ -0,0 +1,158 @@
1
+ import "../../../utils/SynapseConstants.js";
2
+ import { BackendDestinationEnum as e, MOCK_REPO_ORIGIN as t, getEndpoint as n } from "../../../utils/functions/getEndpoint.js";
3
+ import { ENTITY_HEADERS as r, ENTITY_ID as i, TABLE_QUERY_ASYNC_GET as a, TABLE_QUERY_ASYNC_START as o } from "../../../utils/APIConstants.js";
4
+ import { AsyncJobFailure as s, dispatchEntry as c, generateAsyncJobHandlers as l } from "./asyncJobHandlers.js";
5
+ import { getEntityHandlers as u } from "./entityHandlers.js";
6
+ import { DATA_REFERENCE_COLUMN_NAME as d, ELITE_MOCK_PROFILE as f, PARTICIPANT_ID_COLUMN_NAME as p, REFERENCE_TYPE_COLUMN_NAME as m, STUDY_COLUMN_NAME as h } from "../../cohortBuilder/cohortBuilderMockProfiles.js";
7
+ import { createCohortBuilderSyntheticData as g } from "../../cohortBuilder/cohortBuilderSyntheticData.js";
8
+ import { getCohortBuilderColumnModels as _, runCohortBuilderMockQuery as v } from "../../cohortBuilder/cohortBuilderMockQueryEngine.js";
9
+ import { ColumnSingleValueFilterOperator as y } from "@sage-bionetworks/synapse-types";
10
+ import { HttpResponse as b, http as x } from "msw";
11
+ //#region src/mocks/msw/handlers/cohortBuilderHandlers.ts
12
+ var S = "syn_MATERIAL", C = "/repo/v1/download/list/add/async/start", w = (e) => `/repo/v1/download/list/add/async/get/${e}`, T = "/repo/v1/download/list/add/stats/async/start", E = (e) => `/repo/v1/download/list/add/stats/async/get/${e}`, D = "/repo/v1/download/list/add", O = 10 * 1024 * 1024, k = "90000003", A = /* @__PURE__ */ new Map();
13
+ function j(e) {
14
+ let t = A.get(e);
15
+ return t || (t = g(e), A.set(e, t)), t;
16
+ }
17
+ function M(e) {
18
+ let { profile: t, dataAttributeNames: n } = e, r = _(e), i = [
19
+ p,
20
+ h,
21
+ ...t.participantAttributes.map((e) => e.name)
22
+ ].join(", "), a = n.map((e) => `CAST(CONCAT('[', GROUP_CONCAT(DISTINCT CONCAT('"', ${e}, '"')), ']') AS <STRING_LIST column>) AS ${e}`).join(", "), o = [
23
+ m,
24
+ h,
25
+ ...n
26
+ ].join(", "), s = (e, t, n, r) => ({
27
+ id: e,
28
+ name: t,
29
+ concreteType: "org.sagebionetworks.repo.model.table.VirtualTable",
30
+ parentId: "syn90000000",
31
+ etag: "00000000-0000-0000-0000-000000000000",
32
+ createdOn: "2026-10-01T00:00:00.000Z",
33
+ modifiedOn: "2026-10-01T00:00:00.000Z",
34
+ createdBy: "0",
35
+ modifiedBy: "0",
36
+ versionNumber: 1,
37
+ versionLabel: "in progress",
38
+ isLatestVersion: !0,
39
+ isSearchEnabled: !1,
40
+ definingSQL: n,
41
+ columnIds: r
42
+ });
43
+ return [s(t.participantsVirtualTableId, `${t.portalName} Cohort Builder Participants (synthetic)`, `SELECT ${i}, ${a} FROM ${S} GROUP BY ${i}`, r.participants.map((e) => e.id)), s(t.dataVirtualTableId, `${t.portalName} Cohort Builder Files and Datasets (synthetic)`, `SELECT ${d} AS id, name, ${o} FROM ${S} GROUP BY ${d}, name, ${o}`, r.dataReferences.map((e) => e.id))];
44
+ }
45
+ function N(t = {}) {
46
+ let { profile: u = f, access: d = "AGGREGATE_ONLY", maxCohortValues: p, backendOrigin: h = n(e.REPO_ENDPOINT) } = t, g = j(u), _ = M(g).map((e) => x.get(`${h}${i(e.id)}`, () => b.json(e))), S = x.post(`${h}${r}`, async ({ request: e }) => {
47
+ let { references: t } = await e.clone().json(), n = t.flatMap((e) => {
48
+ let t = g.references.get(e.targetId);
49
+ return t ? [{
50
+ id: t.id,
51
+ name: t.name,
52
+ type: t.referenceType === "FILE" ? "org.sagebionetworks.repo.model.FileEntity" : "org.sagebionetworks.repo.model.table.Dataset",
53
+ versionNumber: 1,
54
+ isLatestVersion: !0,
55
+ benefactorId: 9e7,
56
+ createdOn: "2026-10-01T00:00:00.000Z",
57
+ modifiedOn: "2026-10-01T00:00:00.000Z",
58
+ createdBy: "0",
59
+ modifiedBy: "0"
60
+ }] : [];
61
+ });
62
+ return n.length > 0 ? b.json({ results: n }) : void 0;
63
+ }), A = [u.participantsVirtualTableId, u.dataVirtualTableId].flatMap((e) => l(c("org.sagebionetworks.repo.model.table.QueryBundleRequest", (e) => {
64
+ let t = v(g, e, d, { maxCohortValues: p });
65
+ return t.status === 200 ? t.body : new s(t.status, t.body);
66
+ }), {
67
+ asyncTypeServicePaths: {
68
+ requestPath: o(e),
69
+ responsePath: (t) => a(e, t)
70
+ },
71
+ backendOrigin: h
72
+ }));
73
+ function N(e, t) {
74
+ let n = e, r = {
75
+ concreteType: "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter",
76
+ columnName: m,
77
+ operator: y.EQUAL,
78
+ values: ["FILE"]
79
+ }, i = v(g, {
80
+ concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
81
+ entityId: u.dataVirtualTableId,
82
+ partMask: 2,
83
+ query: t ? {
84
+ ...n,
85
+ additionalFilters: [...n.additionalFilters ?? [], r]
86
+ } : n
87
+ }, d, { maxCohortValues: p });
88
+ return "queryCount" in i.body ? i.body.queryCount ?? 0 : new s(i.status, i.body);
89
+ }
90
+ let P = [
91
+ ...l(c("org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest", (e) => {
92
+ let t = N(e.request?.query, !1), n = N(e.request?.query, !0);
93
+ return t instanceof s ? t : n instanceof s ? n : {
94
+ concreteType: "org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse",
95
+ fileCount: t,
96
+ fileSize: n * O,
97
+ isFileCountAndSizeEstimate: !1
98
+ };
99
+ }), {
100
+ asyncTypeServicePaths: {
101
+ requestPath: T,
102
+ responsePath: E
103
+ },
104
+ backendOrigin: h
105
+ }),
106
+ ...l(c("org.sagebionetworks.repo.model.download.AddToDownloadListRequest", (e) => {
107
+ if (e.useVersionNumber !== !1 && e.query?.selectFileVersionColumn === void 0) return new s(400, {
108
+ concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
109
+ reason: `'${u.dataVirtualTableId}' is not a file view or a dataset, the query.selectFileVersionColumn must be specified`
110
+ });
111
+ let t = N(e.query, !0);
112
+ return t instanceof s ? t : {
113
+ concreteType: "org.sagebionetworks.repo.model.download.AddToDownloadListResponse",
114
+ numberOfFilesAdded: t
115
+ };
116
+ }), {
117
+ asyncTypeServicePaths: {
118
+ requestPath: C,
119
+ responsePath: w
120
+ },
121
+ backendOrigin: h
122
+ }),
123
+ x.post(`${h}${D}`, async ({ request: e }) => {
124
+ let { batchToAdd: t } = await e.json(), n = t.filter((e) => g.references.get(e.fileEntityId)?.referenceType === "FILE").length;
125
+ return b.json({ numberOfFilesAdded: n });
126
+ })
127
+ ], F = l(c("org.sagebionetworks.repo.model.table.DownloadFromTableRequest", (e) => {
128
+ let t = N(e, !1);
129
+ return t instanceof s ? t : {
130
+ concreteType: "org.sagebionetworks.repo.model.table.DownloadFromTableResult",
131
+ resultsFileHandleId: k,
132
+ tableId: u.dataVirtualTableId
133
+ };
134
+ }), {
135
+ asyncTypeServicePaths: {
136
+ requestPath: `/repo/v1/entity/${u.dataVirtualTableId}/table/download/csv/async/start`,
137
+ responsePath: (e) => `/repo/v1/entity/${u.dataVirtualTableId}/table/download/csv/async/get/${e}`
138
+ },
139
+ backendOrigin: h
140
+ });
141
+ return [
142
+ ..._,
143
+ S,
144
+ ...A,
145
+ ...P,
146
+ ...F
147
+ ];
148
+ }
149
+ function P(e = {}) {
150
+ return { entity: [...N({
151
+ ...e,
152
+ backendOrigin: t
153
+ }), ...u(t)] };
154
+ }
155
+ //#endregion
156
+ export { k as MOCK_COHORT_CSV_FILE_HANDLE_ID, O as MOCK_COHORT_FILE_SIZE_BYTES, N as getCohortBuilderHandlers, P as getCohortBuilderStorybookHandlers, j as getCohortBuilderSyntheticData };
157
+
158
+ //# sourceMappingURL=cohortBuilderHandlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cohortBuilderHandlers.js","names":[],"sources":["../../../../src/mocks/msw/handlers/cohortBuilderHandlers.ts"],"sourcesContent":["import {\n CohortBuilderMockProfile,\n DATA_REFERENCE_COLUMN_NAME,\n ELITE_MOCK_PROFILE,\n PARTICIPANT_ID_COLUMN_NAME,\n REFERENCE_TYPE_COLUMN_NAME,\n STUDY_COLUMN_NAME,\n} from '@/mocks/cohortBuilder/cohortBuilderMockProfiles'\nimport {\n CohortBuilderAccess,\n CohortBuilderMockQueryOptions,\n getCohortBuilderColumnModels,\n runCohortBuilderMockQuery,\n} from '@/mocks/cohortBuilder/cohortBuilderMockQueryEngine'\nimport {\n CohortBuilderSyntheticData,\n createCohortBuilderSyntheticData,\n} from '@/mocks/cohortBuilder/cohortBuilderSyntheticData'\nimport {\n ENTITY_HEADERS,\n ENTITY_ID,\n TABLE_QUERY_ASYNC_GET,\n TABLE_QUERY_ASYNC_START,\n} from '@/utils/APIConstants'\nimport { BUNDLE_MASK_QUERY_COUNT } from '@/utils/SynapseConstants'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n MOCK_REPO_ORIGIN,\n} from '@/utils/functions/getEndpoint'\nimport {\n AddBatchOfFilesToDownloadListRequest,\n ColumnSingleValueFilterOperator,\n ColumnSingleValueQueryFilter,\n EntityHeader,\n Query,\n QueryBundleRequest,\n Reference,\n VirtualTable,\n} from '@sage-bionetworks/synapse-types'\nimport { http, HttpHandler, HttpResponse } from 'msw'\nimport {\n AsyncJobFailure,\n dispatchEntry,\n generateAsyncJobHandlers,\n} from './asyncJobHandlers'\nimport { getEntityHandlers } from './entityHandlers'\n\nconst MOCK_MATERIAL_VIEW_ID = 'syn_MATERIAL'\n\nconst DOWNLOAD_LIST_ADD_ASYNC_START = '/repo/v1/download/list/add/async/start'\nconst DOWNLOAD_LIST_ADD_ASYNC_GET = (token: string) =>\n `/repo/v1/download/list/add/async/get/${token}`\nconst DOWNLOAD_LIST_ADD_STATS_ASYNC_START =\n '/repo/v1/download/list/add/stats/async/start'\nconst DOWNLOAD_LIST_ADD_STATS_ASYNC_GET = (token: string) =>\n `/repo/v1/download/list/add/stats/async/get/${token}`\nconst DOWNLOAD_LIST_ADD_BATCH = '/repo/v1/download/list/add'\n\n/** Synthetic files have no file handles; each is reported at this size in Download List statistics. */\nexport const MOCK_COHORT_FILE_SIZE_BYTES = 10 * 1024 * 1024\n/** The file handle of every mock Files/Datasets CSV export. */\nexport const MOCK_COHORT_CSV_FILE_HANDLE_ID = '90000003'\n\nconst syntheticDataByProfile = new Map<\n CohortBuilderMockProfile,\n CohortBuilderSyntheticData\n>()\n\n/** Synthetic data for a profile, generated once per profile and reused across handlers. */\nexport function getCohortBuilderSyntheticData(\n profile: CohortBuilderMockProfile,\n): CohortBuilderSyntheticData {\n let data = syntheticDataByProfile.get(profile)\n if (!data) {\n data = createCohortBuilderSyntheticData(profile)\n syntheticDataByProfile.set(profile, data)\n }\n return data\n}\n\nfunction getVirtualTableEntities(\n data: CohortBuilderSyntheticData,\n): VirtualTable[] {\n const { profile, dataAttributeNames } = data\n const columnModels = getCohortBuilderColumnModels(data)\n const participantColumns = [\n PARTICIPANT_ID_COLUMN_NAME,\n STUDY_COLUMN_NAME,\n ...profile.participantAttributes.map(attribute => attribute.name),\n ].join(', ')\n const dataAttributeLists = dataAttributeNames\n .map(\n name =>\n `CAST(CONCAT('[', GROUP_CONCAT(DISTINCT CONCAT('\"', ${name}, '\"')), ']') AS <STRING_LIST column>) AS ${name}`,\n )\n .join(', ')\n const dataColumns = [\n REFERENCE_TYPE_COLUMN_NAME,\n STUDY_COLUMN_NAME,\n ...dataAttributeNames,\n ].join(', ')\n const virtualTable = (\n id: string,\n name: string,\n definingSQL: string,\n columnIds: string[],\n ): VirtualTable => ({\n id,\n name,\n concreteType: 'org.sagebionetworks.repo.model.table.VirtualTable',\n parentId: 'syn90000000',\n etag: '00000000-0000-0000-0000-000000000000',\n createdOn: '2026-10-01T00:00:00.000Z',\n modifiedOn: '2026-10-01T00:00:00.000Z',\n createdBy: '0',\n modifiedBy: '0',\n versionNumber: 1,\n versionLabel: 'in progress',\n isLatestVersion: true,\n isSearchEnabled: false,\n definingSQL,\n columnIds,\n })\n return [\n virtualTable(\n profile.participantsVirtualTableId,\n `${profile.portalName} Cohort Builder Participants (synthetic)`,\n `SELECT ${participantColumns}, ${dataAttributeLists} FROM ${MOCK_MATERIAL_VIEW_ID} GROUP BY ${participantColumns}`,\n columnModels.participants.map(column => column.id!),\n ),\n virtualTable(\n profile.dataVirtualTableId,\n `${profile.portalName} Cohort Builder Files and Datasets (synthetic)`,\n `SELECT ${DATA_REFERENCE_COLUMN_NAME} AS id, name, ${dataColumns} FROM ${MOCK_MATERIAL_VIEW_ID} GROUP BY ${DATA_REFERENCE_COLUMN_NAME}, name, ${dataColumns}`,\n columnModels.dataReferences.map(column => column.id!),\n ),\n ]\n}\n\nexport type CohortBuilderHandlersOptions = CohortBuilderMockQueryOptions & {\n profile?: CohortBuilderMockProfile\n access?: CohortBuilderAccess\n backendOrigin?: string\n}\n\n/**\n * MSW handlers that emulate the Cohort Builder 2.0 VirtualTables (participant\n * and file/dataset perspectives) over synthetic data, including the\n * AGGREGATE_DATA behavior an unapproved caller sees.\n */\nexport function getCohortBuilderHandlers(\n options: CohortBuilderHandlersOptions = {},\n): HttpHandler[] {\n const {\n profile = ELITE_MOCK_PROFILE,\n access = 'AGGREGATE_ONLY',\n maxCohortValues,\n backendOrigin = getEndpoint(BackendDestinationEnum.REPO_ENDPOINT),\n } = options\n const data = getCohortBuilderSyntheticData(profile)\n\n const entityHandlers = getVirtualTableEntities(data).map(entity =>\n http.get(`${backendOrigin}${ENTITY_ID(entity.id!)}`, () =>\n HttpResponse.json(entity),\n ),\n )\n\n // Headers for the synthetic files and datasets; other references fall through to the next handler.\n const entityHeaderHandler = http.post(\n `${backendOrigin}${ENTITY_HEADERS}`,\n async ({ request }) => {\n const { references } = (await request.clone().json()) as {\n references: Reference[]\n }\n const results = references.flatMap((reference): EntityHeader[] => {\n const syntheticReference = data.references.get(reference.targetId)\n return syntheticReference\n ? [\n {\n id: syntheticReference.id,\n name: syntheticReference.name,\n type:\n syntheticReference.referenceType === 'FILE'\n ? 'org.sagebionetworks.repo.model.FileEntity'\n : 'org.sagebionetworks.repo.model.table.Dataset',\n versionNumber: 1,\n isLatestVersion: true,\n benefactorId: 90000000,\n createdOn: '2026-10-01T00:00:00.000Z',\n modifiedOn: '2026-10-01T00:00:00.000Z',\n createdBy: '0',\n modifiedBy: '0',\n },\n ]\n : []\n })\n return results.length > 0 ? HttpResponse.json({ results }) : undefined\n },\n )\n\n const queryHandlers = [\n profile.participantsVirtualTableId,\n profile.dataVirtualTableId,\n ].flatMap(entityId =>\n generateAsyncJobHandlers(\n dispatchEntry(\n 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n request => {\n const result = runCohortBuilderMockQuery(\n data,\n // The async-job mocks type request bodies with the generated client models; the engine uses the legacy\n // QueryBundleRequest, whose shape matches what the client sends.\n request as unknown as QueryBundleRequest,\n access,\n { maxCohortValues },\n )\n return result.status === 200\n ? result.body\n : new AsyncJobFailure(result.status, result.body)\n },\n ),\n {\n asyncTypeServicePaths: {\n requestPath: TABLE_QUERY_ASYNC_START(entityId),\n responsePath: tokenParam =>\n TABLE_QUERY_ASYNC_GET(entityId, tokenParam),\n },\n backendOrigin,\n },\n ),\n )\n\n // Counts a Files/Datasets query's rows as this caller sees them, optionally only the file rows.\n function countDataRows(\n requestQuery: unknown,\n onlyFiles: boolean,\n ): number | AsyncJobFailure {\n // The async-job mocks type request bodies with the generated client models; the engine uses the legacy Query,\n // whose shape (including cohorts) matches what the client sends.\n const query = requestQuery as Query\n const fileFilter: ColumnSingleValueQueryFilter = {\n concreteType:\n 'org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter',\n columnName: REFERENCE_TYPE_COLUMN_NAME,\n operator: ColumnSingleValueFilterOperator.EQUAL,\n values: ['FILE'],\n }\n const result = runCohortBuilderMockQuery(\n data,\n {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId: profile.dataVirtualTableId,\n partMask: BUNDLE_MASK_QUERY_COUNT,\n query: onlyFiles\n ? {\n ...query,\n additionalFilters: [\n ...(query.additionalFilters ?? []),\n fileFilter,\n ],\n }\n : query,\n },\n access,\n { maxCohortValues },\n )\n // A count-only request returns a bundle with queryCount; anything else is an error body.\n return 'queryCount' in result.body\n ? (result.body.queryCount ?? 0)\n : new AsyncJobFailure(result.status, result.body)\n }\n\n // As on the server: the statistics count every row of the query, but only files are added. Datasets are skipped\n // until the server adds a dataset's files instead (PLFM-9997). Adding a VirtualTable query needs a version column,\n // which these tables don't have, unless the current versions are requested.\n const downloadListHandlers = [\n ...generateAsyncJobHandlers(\n dispatchEntry(\n 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsRequest',\n request => {\n const fileCount = countDataRows(request.request?.query, false)\n const filesOnly = countDataRows(request.request?.query, true)\n if (fileCount instanceof AsyncJobFailure) return fileCount\n if (filesOnly instanceof AsyncJobFailure) return filesOnly\n return {\n concreteType:\n 'org.sagebionetworks.repo.model.download.AddToDownloadListStatsResponse',\n fileCount,\n fileSize: filesOnly * MOCK_COHORT_FILE_SIZE_BYTES,\n isFileCountAndSizeEstimate: false,\n }\n },\n ),\n {\n asyncTypeServicePaths: {\n requestPath: DOWNLOAD_LIST_ADD_STATS_ASYNC_START,\n responsePath: DOWNLOAD_LIST_ADD_STATS_ASYNC_GET,\n },\n backendOrigin,\n },\n ),\n ...generateAsyncJobHandlers(\n dispatchEntry(\n 'org.sagebionetworks.repo.model.download.AddToDownloadListRequest',\n request => {\n if (\n request.useVersionNumber !== false &&\n request.query?.selectFileVersionColumn === undefined\n ) {\n return new AsyncJobFailure(400, {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `'${profile.dataVirtualTableId}' is not a file view or a dataset, the query.selectFileVersionColumn must be specified`,\n })\n }\n const numberOfFilesAdded = countDataRows(request.query, true)\n return numberOfFilesAdded instanceof AsyncJobFailure\n ? numberOfFilesAdded\n : {\n concreteType:\n 'org.sagebionetworks.repo.model.download.AddToDownloadListResponse',\n numberOfFilesAdded,\n }\n },\n ),\n {\n asyncTypeServicePaths: {\n requestPath: DOWNLOAD_LIST_ADD_ASYNC_START,\n responsePath: DOWNLOAD_LIST_ADD_ASYNC_GET,\n },\n backendOrigin,\n },\n ),\n http.post(\n `${backendOrigin}${DOWNLOAD_LIST_ADD_BATCH}`,\n async ({ request }) => {\n const { batchToAdd } =\n (await request.json()) as AddBatchOfFilesToDownloadListRequest\n const numberOfFilesAdded = batchToAdd.filter(\n item =>\n data.references.get(item.fileEntityId)?.referenceType === 'FILE',\n ).length\n return HttpResponse.json({ numberOfFilesAdded })\n },\n ),\n ]\n\n // The CSV export resolves the request's cohorts like a query, so a cohort reference without its definition fails.\n const csvExportHandlers = generateAsyncJobHandlers(\n dispatchEntry(\n 'org.sagebionetworks.repo.model.table.DownloadFromTableRequest',\n request => {\n const rowCount = countDataRows(request, false)\n return rowCount instanceof AsyncJobFailure\n ? rowCount\n : {\n concreteType:\n 'org.sagebionetworks.repo.model.table.DownloadFromTableResult',\n resultsFileHandleId: MOCK_COHORT_CSV_FILE_HANDLE_ID,\n tableId: profile.dataVirtualTableId,\n }\n },\n ),\n {\n asyncTypeServicePaths: {\n requestPath: `/repo/v1/entity/${profile.dataVirtualTableId}/table/download/csv/async/start`,\n responsePath: token =>\n `/repo/v1/entity/${profile.dataVirtualTableId}/table/download/csv/async/get/${token}`,\n },\n backendOrigin,\n },\n )\n\n return [\n ...entityHandlers,\n entityHeaderHandler,\n ...queryHandlers,\n ...downloadListHandlers,\n ...csvExportHandlers,\n ]\n}\n\n/**\n * Storybook MSW handler groups that serve the Cohort Builder mocks on the mock stack. They replace the `entity` group so\n * they run before the stock entity handlers, which answer 404 for unknown entity IDs.\n */\nexport function getCohortBuilderStorybookHandlers(\n options: Omit<CohortBuilderHandlersOptions, 'backendOrigin'> = {},\n): Record<string, HttpHandler[]> {\n return {\n entity: [\n ...getCohortBuilderHandlers({\n ...options,\n backendOrigin: MOCK_REPO_ORIGIN,\n }),\n ...getEntityHandlers(MOCK_REPO_ORIGIN),\n ],\n }\n}\n"],"mappings":";;;;;;;;;;;AAgDA,IAAM,IAAwB,gBAExB,IAAgC,0CAChC,KAA+B,MACnC,wCAAwC,KACpC,IACJ,gDACI,KAAqC,MACzC,8CAA8C,KAC1C,IAA0B,8BAGnB,IAA8B,KAAK,OAAO,MAE1C,IAAiC,YAExC,oBAAyB,IAAI,IAGjC;AAGF,SAAgB,EACd,GAC4B;CAC5B,IAAI,IAAO,EAAuB,IAAI,CAAO;CAK7C,OAJK,MACH,IAAO,EAAiC,CAAO,GAC/C,EAAuB,IAAI,GAAS,CAAI,IAEnC;AACT;AAEA,SAAS,EACP,GACgB;CAChB,IAAM,EAAE,YAAS,0BAAuB,GAClC,IAAe,EAA6B,CAAI,GAChD,IAAqB;EACzB;EACA;EACA,GAAG,EAAQ,sBAAsB,KAAI,MAAa,EAAU,IAAI;CAClE,EAAE,KAAK,IAAI,GACL,IAAqB,EACxB,KACC,MACE,sDAAsD,EAAK,4CAA4C,GAC3G,EACC,KAAK,IAAI,GACN,IAAc;EAClB;EACA;EACA,GAAG;CACL,EAAE,KAAK,IAAI,GACL,KACJ,GACA,GACA,GACA,OACkB;EAClB;EACA;EACA,cAAc;EACd,UAAU;EACV,MAAM;EACN,WAAW;EACX,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,eAAe;EACf,cAAc;EACd,iBAAiB;EACjB,iBAAiB;EACjB;EACA;CACF;CACA,OAAO,CACL,EACE,EAAQ,4BACR,GAAG,EAAQ,WAAW,2CACtB,UAAU,EAAmB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CACF;EACA,EAAK,KACH,GAAG,IAAgB,KACnB,OAAO,EAAE,iBAAc;GACrB,IAAM,EAAE,kBACL,MAAM,EAAQ,KAAK,GAChB,IAAqB,EAAW,QACpC,MACE,EAAK,WAAW,IAAI,EAAK,YAAY,GAAG,kBAAkB,MAC9D,EAAE;GACF,OAAO,EAAa,KAAK,EAAE,sBAAmB,CAAC;EACjD,CACF;CACF,GAGM,IAAoB,EACxB,EACE,kEACA,MAAW;EACT,IAAM,IAAW,EAAc,GAAS,EAAK;EAC7C,OAAO,aAAoB,IACvB,IACA;GACE,cACE;GACF,qBAAqB;GACrB,SAAS,EAAQ;EACnB;CACN,CACF,GACA;EACE,uBAAuB;GACrB,aAAa,mBAAmB,EAAQ,mBAAmB;GAC3D,eAAc,MACZ,mBAAmB,EAAQ,mBAAmB,gCAAgC;EAClF;EACA;CACF,CACF;CAEA,OAAO;EACL,GAAG;EACH;EACA,GAAG;EACH,GAAG;EACH,GAAG;CACL;AACF;AAMA,SAAgB,EACd,IAA+D,CAAC,GACjC;CAC/B,OAAO,EACL,QAAQ,CACN,GAAG,EAAyB;EAC1B,GAAG;EACH,eAAe;CACjB,CAAC,GACD,GAAG,EAAkB,CAAgB,CACvC,EACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"entityHandlers.d.ts","sourceRoot":"","sources":["../../../../src/mocks/msw/handlers/entityHandlers.ts"],"names":[],"mappings":"AAeA,OAAO,EAGL,YAAY,EAEZ,UAAU,EAOX,MAAM,iCAAiC,CAAA;AA2BxC,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,6BAuB/B;AAED,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,6BAUjC;AAED,wBAAgB,+BAA+B,CAC7C,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,6BAiC/B;AAED,eAAO,MAAM,iBAAiB,GAAI,eAAe,MAAM,gCAoStD,CAAA"}
1
+ {"version":3,"file":"entityHandlers.d.ts","sourceRoot":"","sources":["../../../../src/mocks/msw/handlers/entityHandlers.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,YAAY,EAEZ,UAAU,EAOX,MAAM,iCAAiC,CAAA;AA+BxC,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,6BAuB/B;AAED,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,6BAUjC;AAED,wBAAgB,+BAA+B,CAC7C,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,6BAiC/B;AAED,eAAO,MAAM,iBAAiB,GAAI,eAAe,MAAM,gCA0StD,CAAA"}
@@ -1,49 +1,50 @@
1
- import { ENTITY as e, ENTITY_BUNDLE_V2 as t, ENTITY_HEADERS as n, ENTITY_ID as r, ENTITY_ID_VERSION as i, ENTITY_ID_VERSIONS as a, ENTITY_JSON as o, ENTITY_SCHEMA_BINDING as s } from "../../../utils/APIConstants.js";
2
- import { normalizeSynPrefix as c } from "../../../utils/functions/EntityTypeUtils.js";
1
+ import { ENTITY as e, ENTITY_BUNDLE_V2 as t, ENTITY_HEADERS as n, ENTITY_ID as r, ENTITY_ID_VERSION as i, ENTITY_ID_VERSIONS as a, ENTITY_JSON as o, ENTITY_SCHEMA_BINDING as s, ENTITY_SCHEMA_VALIDATION as c } from "../../../utils/APIConstants.js";
2
+ import { normalizeSynPrefix as l } from "../../../utils/functions/EntityTypeUtils.js";
3
3
  import "../../entity/mockEntity.js";
4
- import { mockSchemaBinding as l } from "../../mockSchema.js";
5
- import u, { mockProjectsEntityData as d } from "../../entity/index.js";
6
- import { mockSynapseStorageUploadDestination as f, mockUploadDestinations as p } from "../../mock_upload_destination.js";
7
- import { uniqueId as m } from "lodash-es";
8
- import { HttpResponse as h, http as g } from "msw";
4
+ import { mockSchemaBinding as u, mockSchemaValidationResults as d } from "../../mockSchema.js";
5
+ import f, { mockProjectsEntityData as p } from "../../entity/index.js";
6
+ import { mockOpenRestrictionInformation as m } from "../../mock_has_access_data.js";
7
+ import { mockSynapseStorageUploadDestination as h, mockUploadDestinations as g } from "../../mock_upload_destination.js";
8
+ import { uniqueId as _ } from "lodash-es";
9
+ import { HttpResponse as v, http as y } from "msw";
9
10
  //#region src/mocks/msw/handlers/entityHandlers.ts
10
- function _(e) {
11
- let t = e.map(c);
12
- return u.filter((e) => t.includes(c(e.id)));
11
+ function b(e) {
12
+ let t = e.map(l);
13
+ return f.filter((e) => t.includes(l(e.id)));
13
14
  }
14
- function v(e) {
15
- let t = _([e]);
15
+ function x(e) {
16
+ let t = b([e]);
16
17
  if (t.length != 0) return t[0];
17
18
  }
18
- function y(e, n) {
19
- return g.post(`${e}${t(":entityId")}`, ({ params: e }) => {
19
+ function S(e, n) {
20
+ return y.post(`${e}${t(":entityId")}`, ({ params: e }) => {
20
21
  let t = 404, r = {
21
22
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
22
23
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
23
24
  };
24
25
  if (n) r = n, t = 200;
25
26
  else {
26
- let n = v(e.entityId);
27
+ let n = x(e.entityId);
27
28
  n?.bundle && (r = n.bundle, t = 200);
28
29
  }
29
- return h.json(r, { status: t });
30
+ return v.json(r, { status: t });
30
31
  });
31
32
  }
32
- function b(e, t) {
33
- return g.get(`${e}${o(":entityId")}`, () => {
33
+ function C(e, t) {
34
+ return y.get(`${e}${o(":entityId")}`, () => {
34
35
  let e = t;
35
- return h.json(e, { status: 200 });
36
+ return v.json(e, { status: 200 });
36
37
  });
37
38
  }
38
- function x(e, n) {
39
- return g.post(`${e}${t(":entityId", ":versionNumber")}`, ({ params: e }) => {
39
+ function w(e, n) {
40
+ return y.post(`${e}${t(":entityId", ":versionNumber")}`, ({ params: e }) => {
40
41
  let t = e.entityId, r = parseInt(e.versionNumber), i = 404, a = {
41
42
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
42
43
  reason: `Mock Service worker could not find a mock entity bundle with ID ${t}`
43
44
  };
44
45
  if (n) a = n, i = 200;
45
46
  else {
46
- let e = v(t);
47
+ let e = x(t);
47
48
  if (e) {
48
49
  let t = e.bundle;
49
50
  a = e.versions?.[r] ? {
@@ -52,127 +53,129 @@ function x(e, n) {
52
53
  } : t, i = 200;
53
54
  }
54
55
  }
55
- return h.json(a, { status: i });
56
+ return v.json(a, { status: i });
56
57
  });
57
58
  }
58
- var S = (t) => [
59
- g.post(`${t}${e}`, async ({ request: t }) => {
59
+ var T = (t) => [
60
+ y.post(`${t}${e}`, async ({ request: t }) => {
60
61
  let n = 200, r = await t.json(), i = {
61
62
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
62
63
  reason: "..."
63
64
  };
64
65
  return r ? r.name === "A $@*#$% terribly named Project" ? (i.reason = "Invalid project name", n = 403) : i = {
65
- id: m("syn"),
66
+ id: _("syn"),
66
67
  ...r
67
68
  } : (n = 400, i = {
68
69
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
69
70
  reason: `Mock service worker received the following malformed body for PUT ${e} : ${JSON.stringify(r)}`
70
- }), h.json(i, { status: n });
71
+ }), v.json(i, { status: n });
71
72
  }),
72
- g.get(`${t}${r(":entityId")}`, ({ params: e }) => {
73
+ y.get(`${t}${r(":entityId")}`, ({ params: e }) => {
73
74
  let t = 404, n = {
74
75
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
75
76
  reason: `Mock Service worker could not find a mock entity with ID ${e.entityId}`
76
- }, r = v(e.entityId);
77
- return r && (n = r.entity, t = 200), h.json(n, { status: t });
77
+ }, r = x(e.entityId);
78
+ return r && (n = r.entity, t = 200), v.json(n, { status: t });
78
79
  }),
79
- g.get(`${t}${a(":entityId")}`, ({ params: e }) => {
80
+ y.get(`${t}${a(":entityId")}`, ({ params: e }) => {
80
81
  let t = 404, n = {
81
82
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
82
83
  reason: `Mock Service worker could not find mock entity versions for ID ${e.entityId}`
83
- }, r = v(e.entityId);
84
- return r?.versionInfo && (n = { results: r.versionInfo }, t = 200), h.json(n, { status: t });
84
+ }, r = x(e.entityId);
85
+ return r?.versionInfo && (n = { results: r.versionInfo }, t = 200), v.json(n, { status: t });
85
86
  }),
86
- g.get(`${t}${i(":entityId", ":versionNumber")}`, ({ params: e }) => {
87
+ y.get(`${t}${i(":entityId", ":versionNumber")}`, ({ params: e }) => {
87
88
  let t = 404, n = e.entityId, r = e.versionNumber.toString(), i = parseInt(r), a = {
88
89
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
89
90
  reason: `Mock Service worker could not find a mock versioned entity with ID ${n}.${r}`
90
- }, o = v(e.entityId);
91
- return o?.versions?.[i] && (a = o.versions[i], t = 200), h.json(a, { status: t });
91
+ }, o = x(e.entityId);
92
+ return o?.versions?.[i] && (a = o.versions[i], t = 200), v.json(a, { status: t });
92
93
  }),
93
- y(t),
94
- x(t),
95
- g.get(`${t}${s(":entityId")}`, () => h.json(l, { status: 200 })),
96
- g.get(`${t}${o(":entityId")}`, ({ params: e }) => {
94
+ S(t),
95
+ w(t),
96
+ y.get(`${t}${s(":entityId")}`, () => v.json(u, { status: 200 })),
97
+ y.get(`${t}${c(":entityId")}`, () => v.json(d, { status: 200 })),
98
+ y.post(`${t}/repo/v1/restrictionInformation`, () => v.json(m, { status: 200 })),
99
+ y.get(`${t}${o(":entityId")}`, ({ params: e }) => {
97
100
  let t = 404, n = {
98
101
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
99
102
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
100
- }, r = v(e.entityId);
101
- return r?.json && (n = r.json, t = 200), h.json(n, { status: t });
103
+ }, r = x(e.entityId);
104
+ return r?.json && (n = r.json, t = 200), v.json(n, { status: t });
102
105
  }),
103
- g.post(`${t}${n}`, async ({ params: e, request: t }) => {
106
+ y.post(`${t}${n}`, async ({ params: e, request: t }) => {
104
107
  let n = 404, r = {
105
108
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
106
109
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
107
110
  }, i = (await t.json()).references.map((e) => {
108
- let t = v(e.targetId)?.entityHeader;
111
+ let t = x(e.targetId)?.entityHeader;
109
112
  if (t) return {
110
113
  ...t,
111
114
  id: e.targetId
112
115
  };
113
116
  }).filter((e) => !!e);
114
- return i && (r = { results: i }, n = 200), h.json(r, { status: n });
117
+ return i && (r = { results: i }, n = 200), v.json(r, { status: n });
115
118
  }),
116
- g.get(`${t}${r(":entityId")}/path`, ({ params: e }) => {
119
+ y.get(`${t}${r(":entityId")}/path`, ({ params: e }) => {
117
120
  let t = 404, n = {
118
121
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
119
122
  reason: `Mock Service worker could not find a mock entity path using ID ${e.entityId}`
120
- }, r = v(e.entityId);
121
- return r?.path && (n = r.path, t = 200), h.json(n, { status: t });
123
+ }, r = x(e.entityId);
124
+ return r?.path && (n = r.path, t = 200), v.json(n, { status: t });
122
125
  }),
123
- g.get(`${t}/file/v1/entity/:id/uploadDestination`, () => {
124
- let e = f;
125
- return h.json(e, { status: 200 });
126
+ y.get(`${t}/file/v1/entity/:id/uploadDestination`, () => {
127
+ let e = h;
128
+ return v.json(e, { status: 200 });
126
129
  }),
127
- g.get(`${t}/file/v1/entity/:id/uploadDestination/:storageLocationId`, ({ params: e }) => {
130
+ y.get(`${t}/file/v1/entity/:id/uploadDestination/:storageLocationId`, ({ params: e }) => {
128
131
  let t = 404, n = {
129
132
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
130
133
  reason: `Mock Service worker could not find an uploadDestination using storageLocationId ${e.storageLocationId}`
131
- }, r = p.find((t) => Number(e.storageLocationId) === t.storageLocationId);
132
- return r && (n = r, t = 200), h.json(n, { status: t });
134
+ }, r = g.find((t) => Number(e.storageLocationId) === t.storageLocationId);
135
+ return r && (n = r, t = 200), v.json(n, { status: t });
133
136
  }),
134
- g.get(`${t}/repo/v1/projects`, () => {
135
- let e = { results: d.map((e) => ({
137
+ y.get(`${t}/repo/v1/projects`, () => {
138
+ let e = { results: p.map((e) => ({
136
139
  name: e.name,
137
140
  id: e.id,
138
141
  lastActivity: "2024-01-04T21:11:59.000Z",
139
142
  modifiedBy: parseInt(e.entity.modifiedBy),
140
143
  modifiedOn: e.entity.modifiedOn
141
144
  })) };
142
- return h.json(e, { status: 200 });
145
+ return v.json(e, { status: 200 });
143
146
  }),
144
- g.post(`${t}${r(":entityId")}/acl`, async ({ params: e, request: t }) => {
145
- let n = v(e.entityId), r, i;
147
+ y.post(`${t}${r(":entityId")}/acl`, async ({ params: e, request: t }) => {
148
+ let n = x(e.entityId), r, i;
146
149
  return n ? n.bundle?.accessControlList ? (r = 403, i = {
147
150
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
148
151
  reason: "Resource already has an ACL."
149
152
  }) : (i = await t.json(), r = 201) : (r = 404, i = {
150
153
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
151
154
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
152
- }), h.json(i, { status: r });
155
+ }), v.json(i, { status: r });
153
156
  }),
154
- g.put(`${t}${r(":entityId")}/acl`, async ({ params: e, request: t }) => {
155
- let n = v(e.entityId), r, i;
157
+ y.put(`${t}${r(":entityId")}/acl`, async ({ params: e, request: t }) => {
158
+ let n = x(e.entityId), r, i;
156
159
  return n ? n?.bundle?.accessControlList ? (i = await t.json(), r = 200) : (i = {
157
160
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
158
161
  reason: "Cannot update ACL for a resource which inherits its permissions."
159
162
  }, r = 403) : (r = 404, i = {
160
163
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
161
164
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
162
- }), h.json(i, { status: r });
165
+ }), v.json(i, { status: r });
163
166
  }),
164
- g.delete(`${t}${r(":entityId")}/acl`, ({ params: e }) => {
165
- let t = v(e.entityId), n, r;
167
+ y.delete(`${t}${r(":entityId")}/acl`, ({ params: e }) => {
168
+ let t = x(e.entityId), n, r;
166
169
  return t ? t?.bundle?.accessControlList ? (r = "", n = 200) : (r = {
167
170
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
168
171
  reason: "Cannot delete ACL for a resource which inherits its permissions."
169
172
  }, n = 403) : (n = 404, r = {
170
173
  concreteType: "org.sagebionetworks.repo.model.ErrorResponse",
171
174
  reason: `Mock Service worker could not find a mock entity bundle with ID ${e.entityId}`
172
- }), h.json(r, { status: n });
175
+ }), v.json(r, { status: n });
173
176
  })
174
177
  ];
175
178
  //#endregion
176
- export { y as getEntityBundleHandler, S as getEntityHandlers, b as getEntityJsonHandler, x as getVersionedEntityBundleHandler };
179
+ export { S as getEntityBundleHandler, T as getEntityHandlers, C as getEntityJsonHandler, w as getVersionedEntityBundleHandler };
177
180
 
178
181
  //# sourceMappingURL=entityHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entityHandlers.js","names":[],"sources":["../../../../src/mocks/msw/handlers/entityHandlers.ts"],"sourcesContent":["import {\n ENTITY,\n ENTITY_BUNDLE_V2,\n ENTITY_HEADERS,\n ENTITY_ID,\n ENTITY_ID_VERSION,\n ENTITY_ID_VERSIONS,\n ENTITY_JSON,\n ENTITY_SCHEMA_BINDING,\n} from '@/utils/APIConstants'\nimport { normalizeSynPrefix } from '@/utils/functions/EntityTypeUtils'\nimport {\n ErrorResponse,\n UploadDestination,\n} from '@sage-bionetworks/synapse-client'\nimport {\n AccessControlList,\n Entity,\n EntityBundle,\n EntityHeader,\n EntityJson,\n EntityPath,\n PaginatedResults,\n ProjectHeaderList,\n Reference,\n VersionableEntity,\n VersionInfo,\n} from '@sage-bionetworks/synapse-types'\nimport { uniqueId } from 'lodash-es'\nimport { http, HttpResponse } from 'msw'\nimport mockEntities, { mockProjectsEntityData } from '../../entity'\nimport { MOCK_INVALID_PROJECT_NAME } from '../../entity/mockEntity'\nimport { MockEntityData } from '../../entity/MockEntityData'\nimport {\n mockSynapseStorageUploadDestination,\n mockUploadDestinations,\n} from '../../mock_upload_destination'\nimport { mockSchemaBinding } from '../../mockSchema'\nimport { SynapseApiResponse } from '../handlers'\n\nfunction getMatchingMockEntities(entityIds: string[]): MockEntityData[] {\n const normalizedPassedIds = entityIds.map(normalizeSynPrefix)\n return mockEntities.filter(entity =>\n normalizedPassedIds.includes(normalizeSynPrefix(entity.id)),\n )\n}\nfunction getMatchingMockEntity(entityId: string): MockEntityData | undefined {\n const matches = getMatchingMockEntities([entityId])\n if (matches.length == 0) {\n return undefined\n }\n return matches[0]\n}\n\nexport function getEntityBundleHandler(\n backendOrigin: string,\n bundle?: Partial<EntityBundle>,\n) {\n return http.post(\n `${backendOrigin}${ENTITY_BUNDLE_V2(':entityId')}`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityBundle> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n if (bundle) {\n response = bundle as EntityBundle\n status = 200\n } else {\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.bundle) {\n response = entityData.bundle\n status = 200\n }\n }\n return HttpResponse.json(response, { status })\n },\n )\n}\n\nexport function getEntityJsonHandler(\n backendOrigin: string,\n entityJson?: Partial<EntityJson>,\n) {\n return http.get(\n `${backendOrigin}${ENTITY_JSON(':entityId')}`,\n\n () => {\n const response = entityJson\n return HttpResponse.json(response, { status: 200 })\n },\n )\n}\n\nexport function getVersionedEntityBundleHandler(\n backendOrigin: string,\n bundle?: Partial<EntityBundle>,\n) {\n return http.post(\n `${backendOrigin}${ENTITY_BUNDLE_V2(':entityId', ':versionNumber')}`,\n ({ params }) => {\n const entityId = params.entityId as string\n const versionNumber = parseInt(params.versionNumber as string)\n let status = 404\n let response: SynapseApiResponse<EntityBundle> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${entityId}`,\n }\n if (bundle) {\n response = bundle as EntityBundle\n status = 200\n } else {\n const entityData = getMatchingMockEntity(entityId)\n if (entityData) {\n const bundle = entityData.bundle\n if (entityData.versions?.[versionNumber]) {\n response = {\n ...bundle,\n entity: entityData.versions[versionNumber],\n } as EntityBundle\n } else {\n response = bundle as EntityBundle\n }\n status = 200\n }\n }\n return HttpResponse.json(response, { status })\n },\n )\n}\n\nexport const getEntityHandlers = (backendOrigin: string) => [\n /**\n * Create a new entity\n */\n http.post<never, Entity>(`${backendOrigin}${ENTITY}`, async ({ request }) => {\n let status = 200\n const requestBody = await request.json()\n let response: SynapseApiResponse<Entity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: '...',\n }\n if (!requestBody) {\n status = 400\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock service worker received the following malformed body for PUT ${ENTITY} : ${JSON.stringify(\n requestBody,\n )}`,\n }\n } else {\n if (requestBody.name === MOCK_INVALID_PROJECT_NAME) {\n ;(response as ErrorResponse).reason = 'Invalid project name'\n status = 403\n } else {\n response = { id: uniqueId('syn'), ...requestBody }\n }\n }\n\n return HttpResponse.json(response, { status })\n }),\n\n /**\n * Get entity by ID\n */\n http.get(`${backendOrigin}${ENTITY_ID(':entityId')}`, ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<Entity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity with ID ${params.entityId}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData) {\n response = entityData.entity\n status = 200\n }\n return HttpResponse.json(response, { status })\n }),\n\n http.get(\n `${backendOrigin}${ENTITY_ID_VERSIONS(':entityId')}`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<PaginatedResults<VersionInfo>> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find mock entity versions for ID ${params.entityId}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.versionInfo) {\n response = { results: entityData.versionInfo }\n status = 200\n }\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get<{ entityId: string; versionNumber: string }>(\n `${backendOrigin}${ENTITY_ID_VERSION(':entityId', ':versionNumber')}`,\n ({ params }) => {\n let status = 404\n const entityId = params.entityId\n const versionNumber = params.versionNumber.toString()\n const requestedVersionNumber = parseInt(versionNumber)\n\n let response: SynapseApiResponse<VersionableEntity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock versioned entity with ID ${entityId}.${versionNumber}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId)\n if (entityData?.versions?.[requestedVersionNumber]) {\n response = entityData.versions[\n requestedVersionNumber\n ] as VersionableEntity\n status = 200\n }\n return HttpResponse.json(response, { status })\n },\n ),\n\n getEntityBundleHandler(backendOrigin),\n getVersionedEntityBundleHandler(backendOrigin),\n\n http.get(`${backendOrigin}${ENTITY_SCHEMA_BINDING(':entityId')}`, () => {\n return HttpResponse.json(mockSchemaBinding, { status: 200 })\n }),\n http.get(\n `${backendOrigin}${ENTITY_JSON(':entityId')}`,\n\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityJson> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.json) {\n response = entityData.json\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.post<{ entityId: string }, { references: Reference[] }>(\n `${backendOrigin}${ENTITY_HEADERS}`,\n\n async ({ params, request }) => {\n let status = 404\n let response: SynapseApiResponse<PaginatedResults<EntityHeader>> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n\n const referenceList = await request.json()\n const entityData: EntityHeader[] = referenceList.references\n .map(ref => {\n const entityHeader = getMatchingMockEntity(ref.targetId)?.entityHeader\n if (entityHeader) {\n return {\n ...entityHeader,\n // ID should match what is passed in (i.e. may or may not have syn prefix)\n id: ref.targetId,\n }\n }\n return undefined\n })\n .filter((header): header is EntityHeader => !!header)\n\n if (entityData) {\n response = { results: entityData }\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(\n `${backendOrigin}${ENTITY_ID(':entityId')}/path`,\n\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityPath> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity path using ID ${params.entityId}`,\n }\n const entityData = getMatchingMockEntity(params.entityId as string)\n\n if (entityData?.path) {\n response = entityData.path\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(`${backendOrigin}/file/v1/entity/:id/uploadDestination`, () => {\n const response: UploadDestination = mockSynapseStorageUploadDestination\n return HttpResponse.json(response, { status: 200 })\n }),\n\n http.get(\n `${backendOrigin}/file/v1/entity/:id/uploadDestination/:storageLocationId`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<UploadDestination> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find an uploadDestination using storageLocationId ${params.storageLocationId}`,\n }\n const uploadDestination = mockUploadDestinations.find(\n e => Number(params.storageLocationId) === e.storageLocationId,\n )\n\n if (uploadDestination) {\n response = uploadDestination\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(`${backendOrigin}/repo/v1/projects`, () => {\n const response: ProjectHeaderList = {\n results: mockProjectsEntityData.map(p => ({\n name: p.name,\n id: p.id,\n lastActivity: '2024-01-04T21:11:59.000Z',\n modifiedBy: parseInt(p.entity.modifiedBy!),\n modifiedOn: p.entity.modifiedOn!,\n })),\n }\n return HttpResponse.json(response, { status: 200 })\n }),\n\n http.post<{ entityId: string }, AccessControlList>(\n `${backendOrigin}${ENTITY_ID(':entityId')}/acl`,\n async ({ params, request }) => {\n const entityData = getMatchingMockEntity(params.entityId)\n let status: number\n let response: SynapseApiResponse<AccessControlList>\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (entityData.bundle?.accessControlList) {\n status = 403\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: 'Resource already has an ACL.',\n }\n } else {\n response = await request.json()\n status = 201\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.put<{ entityId: string }, AccessControlList>(\n `${backendOrigin}${ENTITY_ID(':entityId')}/acl`,\n async ({ params, request }) => {\n const entityData = getMatchingMockEntity(params.entityId)\n\n let status: number\n let response: SynapseApiResponse<AccessControlList>\n\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (!entityData?.bundle?.accessControlList) {\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason:\n 'Cannot update ACL for a resource which inherits its permissions.',\n }\n status = 403\n } else {\n response = await request.json()\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.delete(`${backendOrigin}${ENTITY_ID(':entityId')}/acl`, ({ params }) => {\n const entityData = getMatchingMockEntity(params.entityId as string)\n\n let status: number\n let response: SynapseApiResponse<''>\n\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (!entityData?.bundle?.accessControlList) {\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason:\n 'Cannot delete ACL for a resource which inherits its permissions.',\n }\n status = 403\n } else {\n response = ''\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n }),\n]\n"],"mappings":";;;;;;;;;AAwCA,SAAS,EAAwB,GAAuC;CACtE,IAAM,IAAsB,EAAU,IAAI,CAAkB;CAC5D,OAAO,EAAa,QAAO,MACzB,EAAoB,SAAS,EAAmB,EAAO,EAAE,CAAC,CAC5D;AACF;AACA,SAAS,EAAsB,GAA8C;CAC3E,IAAM,IAAU,EAAwB,CAAC,CAAQ,CAAC;CAC9C,MAAQ,UAAU,GAGtB,OAAO,EAAQ;AACjB;AAEA,SAAgB,EACd,GACA,GACA;CACA,OAAO,EAAK,KACV,GAAG,IAAgB,EAAiB,WAAW,MAC9C,EAAE,gBAAa;EACd,IAAI,IAAS,KACT,IAA6C;GAC/C,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF;EACA,IAAI,GAEF,AADA,IAAW,GACX,IAAS;OACJ;GACL,IAAM,IAAa,EAAsB,EAAO,QAAkB;GAClE,AAAI,GAAY,WACd,IAAW,EAAW,QACtB,IAAS;EAEb;EACA,OAAO,EAAa,KAAK,GAAU,EAAE,UAAO,CAAC;CAC/C,CACF;AACF;AAEA,SAAgB,EACd,GACA,GACA;CACA,OAAO,EAAK,IACV,GAAG,IAAgB,EAAY,WAAW,WAEpC;EACJ,IAAM,IAAW;EACjB,OAAO,EAAa,KAAK,GAAU,EAAE,QAAQ,IAAI,CAAC;CACpD,CACF;AACF;AAEA,SAAgB,EACd,GACA,GACA;CACA,OAAO,EAAK,KACV,GAAG,IAAgB,EAAiB,aAAa,gBAAgB,MAChE,EAAE,gBAAa;EACd,IAAM,IAAW,EAAO,UAClB,IAAgB,SAAS,EAAO,aAAuB,GACzD,IAAS,KACT,IAA6C;GAC/C,cAAc;GACd,QAAQ,mEAAmE;EAC7E;EAC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ACd,QAAQ;EACV,MAEA,IAAW,MAAM,EAAQ,KAAK,GAC9B,IAAS,QAbT,IAAS,KACT,IAAW;GACT,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF,IAYK,EAAa,KAAK,GAAU,EAAE,UAAO,CAAC;CAC/C,CACF;CAEA,EAAK,IACH,GAAG,IAAgB,EAAU,WAAW,EAAE,OAC1C,OAAO,EAAE,WAAQ,iBAAc;EAC7B,IAAM,IAAa,EAAsB,EAAO,QAAQ,GAEpD,GACA;EAoBJ,OAlBK,IAMO,GAAY,QAAQ,qBAQ9B,IAAW,MAAM,EAAQ,KAAK,GAC9B,IAAS,QART,IAAW;GACT,cAAc;GACd,QACE;EACJ,GACA,IAAS,QAXT,IAAS,KACT,IAAW;GACT,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF,IAaK,EAAa,KAAK,GAAU,EAAE,UAAO,CAAC;CAC/C,CACF;CAEA,EAAK,OAAO,GAAG,IAAgB,EAAU,WAAW,EAAE,QAAQ,EAAE,gBAAa;EAC3E,IAAM,IAAa,EAAsB,EAAO,QAAkB,GAE9D,GACA;EAoBJ,OAlBK,IAMO,GAAY,QAAQ,qBAQ9B,IAAW,IACX,IAAS,QART,IAAW;GACT,cAAc;GACd,QACE;EACJ,GACA,IAAS,QAXT,IAAS,KACT,IAAW;GACT,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF,IAaK,EAAa,KAAK,GAAU,EAAE,UAAO,CAAC;CAC/C,CAAC;AACH"}
1
+ {"version":3,"file":"entityHandlers.js","names":[],"sources":["../../../../src/mocks/msw/handlers/entityHandlers.ts"],"sourcesContent":["import {\n ENTITY,\n ENTITY_BUNDLE_V2,\n ENTITY_HEADERS,\n ENTITY_ID,\n ENTITY_ID_VERSION,\n ENTITY_ID_VERSIONS,\n ENTITY_JSON,\n ENTITY_SCHEMA_BINDING,\n ENTITY_SCHEMA_VALIDATION,\n} from '@/utils/APIConstants'\nimport { normalizeSynPrefix } from '@/utils/functions/EntityTypeUtils'\nimport {\n ErrorResponse,\n UploadDestination,\n} from '@sage-bionetworks/synapse-client'\nimport {\n AccessControlList,\n Entity,\n EntityBundle,\n EntityHeader,\n EntityJson,\n EntityPath,\n PaginatedResults,\n ProjectHeaderList,\n Reference,\n VersionableEntity,\n VersionInfo,\n} from '@sage-bionetworks/synapse-types'\nimport { uniqueId } from 'lodash-es'\nimport { http, HttpResponse } from 'msw'\nimport mockEntities, { mockProjectsEntityData } from '../../entity'\nimport { MOCK_INVALID_PROJECT_NAME } from '../../entity/mockEntity'\nimport { MockEntityData } from '../../entity/MockEntityData'\nimport {\n mockSynapseStorageUploadDestination,\n mockUploadDestinations,\n} from '../../mock_upload_destination'\nimport { mockOpenRestrictionInformation } from '../../mock_has_access_data'\nimport {\n mockSchemaBinding,\n mockSchemaValidationResults,\n} from '../../mockSchema'\nimport { SynapseApiResponse } from '../handlers'\n\nfunction getMatchingMockEntities(entityIds: string[]): MockEntityData[] {\n const normalizedPassedIds = entityIds.map(normalizeSynPrefix)\n return mockEntities.filter(entity =>\n normalizedPassedIds.includes(normalizeSynPrefix(entity.id)),\n )\n}\nfunction getMatchingMockEntity(entityId: string): MockEntityData | undefined {\n const matches = getMatchingMockEntities([entityId])\n if (matches.length == 0) {\n return undefined\n }\n return matches[0]\n}\n\nexport function getEntityBundleHandler(\n backendOrigin: string,\n bundle?: Partial<EntityBundle>,\n) {\n return http.post(\n `${backendOrigin}${ENTITY_BUNDLE_V2(':entityId')}`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityBundle> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n if (bundle) {\n response = bundle as EntityBundle\n status = 200\n } else {\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.bundle) {\n response = entityData.bundle\n status = 200\n }\n }\n return HttpResponse.json(response, { status })\n },\n )\n}\n\nexport function getEntityJsonHandler(\n backendOrigin: string,\n entityJson?: Partial<EntityJson>,\n) {\n return http.get(\n `${backendOrigin}${ENTITY_JSON(':entityId')}`,\n\n () => {\n const response = entityJson\n return HttpResponse.json(response, { status: 200 })\n },\n )\n}\n\nexport function getVersionedEntityBundleHandler(\n backendOrigin: string,\n bundle?: Partial<EntityBundle>,\n) {\n return http.post(\n `${backendOrigin}${ENTITY_BUNDLE_V2(':entityId', ':versionNumber')}`,\n ({ params }) => {\n const entityId = params.entityId as string\n const versionNumber = parseInt(params.versionNumber as string)\n let status = 404\n let response: SynapseApiResponse<EntityBundle> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${entityId}`,\n }\n if (bundle) {\n response = bundle as EntityBundle\n status = 200\n } else {\n const entityData = getMatchingMockEntity(entityId)\n if (entityData) {\n const bundle = entityData.bundle\n if (entityData.versions?.[versionNumber]) {\n response = {\n ...bundle,\n entity: entityData.versions[versionNumber],\n } as EntityBundle\n } else {\n response = bundle as EntityBundle\n }\n status = 200\n }\n }\n return HttpResponse.json(response, { status })\n },\n )\n}\n\nexport const getEntityHandlers = (backendOrigin: string) => [\n /**\n * Create a new entity\n */\n http.post<never, Entity>(`${backendOrigin}${ENTITY}`, async ({ request }) => {\n let status = 200\n const requestBody = await request.json()\n let response: SynapseApiResponse<Entity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: '...',\n }\n if (!requestBody) {\n status = 400\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock service worker received the following malformed body for PUT ${ENTITY} : ${JSON.stringify(\n requestBody,\n )}`,\n }\n } else {\n if (requestBody.name === MOCK_INVALID_PROJECT_NAME) {\n ;(response as ErrorResponse).reason = 'Invalid project name'\n status = 403\n } else {\n response = { id: uniqueId('syn'), ...requestBody }\n }\n }\n\n return HttpResponse.json(response, { status })\n }),\n\n /**\n * Get entity by ID\n */\n http.get(`${backendOrigin}${ENTITY_ID(':entityId')}`, ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<Entity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity with ID ${params.entityId}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData) {\n response = entityData.entity\n status = 200\n }\n return HttpResponse.json(response, { status })\n }),\n\n http.get(\n `${backendOrigin}${ENTITY_ID_VERSIONS(':entityId')}`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<PaginatedResults<VersionInfo>> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find mock entity versions for ID ${params.entityId}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.versionInfo) {\n response = { results: entityData.versionInfo }\n status = 200\n }\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get<{ entityId: string; versionNumber: string }>(\n `${backendOrigin}${ENTITY_ID_VERSION(':entityId', ':versionNumber')}`,\n ({ params }) => {\n let status = 404\n const entityId = params.entityId\n const versionNumber = params.versionNumber.toString()\n const requestedVersionNumber = parseInt(versionNumber)\n\n let response: SynapseApiResponse<VersionableEntity> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock versioned entity with ID ${entityId}.${versionNumber}`,\n }\n\n const entityData = getMatchingMockEntity(params.entityId)\n if (entityData?.versions?.[requestedVersionNumber]) {\n response = entityData.versions[\n requestedVersionNumber\n ] as VersionableEntity\n status = 200\n }\n return HttpResponse.json(response, { status })\n },\n ),\n\n getEntityBundleHandler(backendOrigin),\n getVersionedEntityBundleHandler(backendOrigin),\n\n http.get(`${backendOrigin}${ENTITY_SCHEMA_BINDING(':entityId')}`, () => {\n return HttpResponse.json(mockSchemaBinding, { status: 200 })\n }),\n http.get(`${backendOrigin}${ENTITY_SCHEMA_VALIDATION(':entityId')}`, () => {\n return HttpResponse.json(mockSchemaValidationResults, { status: 200 })\n }),\n http.post(`${backendOrigin}/repo/v1/restrictionInformation`, () => {\n return HttpResponse.json(mockOpenRestrictionInformation, { status: 200 })\n }),\n http.get(\n `${backendOrigin}${ENTITY_JSON(':entityId')}`,\n\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityJson> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n const entityData = getMatchingMockEntity(params.entityId as string)\n if (entityData?.json) {\n response = entityData.json\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.post<{ entityId: string }, { references: Reference[] }>(\n `${backendOrigin}${ENTITY_HEADERS}`,\n\n async ({ params, request }) => {\n let status = 404\n let response: SynapseApiResponse<PaginatedResults<EntityHeader>> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n\n const referenceList = await request.json()\n const entityData: EntityHeader[] = referenceList.references\n .map(ref => {\n const entityHeader = getMatchingMockEntity(ref.targetId)?.entityHeader\n if (entityHeader) {\n return {\n ...entityHeader,\n // ID should match what is passed in (i.e. may or may not have syn prefix)\n id: ref.targetId,\n }\n }\n return undefined\n })\n .filter((header): header is EntityHeader => !!header)\n\n if (entityData) {\n response = { results: entityData }\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(\n `${backendOrigin}${ENTITY_ID(':entityId')}/path`,\n\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<EntityPath> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity path using ID ${params.entityId}`,\n }\n const entityData = getMatchingMockEntity(params.entityId as string)\n\n if (entityData?.path) {\n response = entityData.path\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(`${backendOrigin}/file/v1/entity/:id/uploadDestination`, () => {\n const response: UploadDestination = mockSynapseStorageUploadDestination\n return HttpResponse.json(response, { status: 200 })\n }),\n\n http.get(\n `${backendOrigin}/file/v1/entity/:id/uploadDestination/:storageLocationId`,\n ({ params }) => {\n let status = 404\n let response: SynapseApiResponse<UploadDestination> = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find an uploadDestination using storageLocationId ${params.storageLocationId}`,\n }\n const uploadDestination = mockUploadDestinations.find(\n e => Number(params.storageLocationId) === e.storageLocationId,\n )\n\n if (uploadDestination) {\n response = uploadDestination\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.get(`${backendOrigin}/repo/v1/projects`, () => {\n const response: ProjectHeaderList = {\n results: mockProjectsEntityData.map(p => ({\n name: p.name,\n id: p.id,\n lastActivity: '2024-01-04T21:11:59.000Z',\n modifiedBy: parseInt(p.entity.modifiedBy!),\n modifiedOn: p.entity.modifiedOn!,\n })),\n }\n return HttpResponse.json(response, { status: 200 })\n }),\n\n http.post<{ entityId: string }, AccessControlList>(\n `${backendOrigin}${ENTITY_ID(':entityId')}/acl`,\n async ({ params, request }) => {\n const entityData = getMatchingMockEntity(params.entityId)\n let status: number\n let response: SynapseApiResponse<AccessControlList>\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (entityData.bundle?.accessControlList) {\n status = 403\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: 'Resource already has an ACL.',\n }\n } else {\n response = await request.json()\n status = 201\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.put<{ entityId: string }, AccessControlList>(\n `${backendOrigin}${ENTITY_ID(':entityId')}/acl`,\n async ({ params, request }) => {\n const entityData = getMatchingMockEntity(params.entityId)\n\n let status: number\n let response: SynapseApiResponse<AccessControlList>\n\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (!entityData?.bundle?.accessControlList) {\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason:\n 'Cannot update ACL for a resource which inherits its permissions.',\n }\n status = 403\n } else {\n response = await request.json()\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n },\n ),\n\n http.delete(`${backendOrigin}${ENTITY_ID(':entityId')}/acl`, ({ params }) => {\n const entityData = getMatchingMockEntity(params.entityId as string)\n\n let status: number\n let response: SynapseApiResponse<''>\n\n if (!entityData) {\n status = 404\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason: `Mock Service worker could not find a mock entity bundle with ID ${params.entityId}`,\n }\n } else if (!entityData?.bundle?.accessControlList) {\n response = {\n concreteType: 'org.sagebionetworks.repo.model.ErrorResponse',\n reason:\n 'Cannot delete ACL for a resource which inherits its permissions.',\n }\n status = 403\n } else {\n response = ''\n status = 200\n }\n\n return HttpResponse.json(response, { status })\n }),\n]\n"],"mappings":";;;;;;;;;;AA6CA,SAAS,EAAwB,GAAuC;CACtE,IAAM,IAAsB,EAAU,IAAI,CAAkB;CAC5D,OAAO,EAAa,QAAO,MACzB,EAAoB,SAAS,EAAmB,EAAO,EAAE,CAAC,CAC5D;AACF;AACA,SAAS,EAAsB,GAA8C;CAC3E,IAAM,IAAU,EAAwB,CAAC,CAAQ,CAAC;CAC9C,MAAQ,UAAU,GAGtB,OAAO,EAAQ;AACjB;AAEA,SAAgB,EACd,GACA,GACA;CACA,OAAO,EAAK,KACV,GAAG,IAAgB,EAAiB,WAAW,MAC9C,EAAE,gBAAa;EACd,IAAI,IAAS,KACT,IAA6C;GAC/C,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF;EACA,IAAI,GAEF,AADA,IAAW,GACX,IAAS;OACJ;GACL,IAAM,IAAa,EAAsB,EAAO,QAAkB;GAClE,AAAI,GAAY,WACd,IAAW,EAAW,QACtB,IAAS;EAEb;EACA,OAAO,EAAa,KAA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W,EAAE,QAAQ,EAAE,gBAAa;EAC3E,IAAM,IAAa,EAAsB,EAAO,QAAkB,GAE9D,GACA;EAoBJ,OAlBK,IAMO,GAAY,QAAQ,qBAQ9B,IAAW,IACX,IAAS,QART,IAAW;GACT,cAAc;GACd,QACE;EACJ,GACA,IAAS,QAXT,IAAS,KACT,IAAW;GACT,cAAc;GACd,QAAQ,mEAAmE,EAAO;EACpF,IAaK,EAAa,KAAK,GAAU,EAAE,UAAO,CAAC;CAC/C,CAAC;AACH"}
@@ -29,7 +29,7 @@ function a(a) {
29
29
  }
30
30
  }, { status: 200 })) : e.text("Job not found", { status: 404 });
31
31
  }),
32
- t.post(`${a}/repo/v1/grid/:sessionId/replica`, async ({ request: t }) => {
32
+ t.post(`${a}/repo/v1/grid/session/:sessionId/replica`, async ({ request: t }) => {
33
33
  let { gridSessionId: r } = await t.json();
34
34
  if (!Array.from(i.values()).find((e) => e.sessionId === r)) return e.text("Grid session not found", { status: 404 });
35
35
  let a = {
@@ -44,7 +44,7 @@ function a(a) {
44
44
  };
45
45
  return e.json(a, { status: 201 });
46
46
  }),
47
- t.get(`${a}/repo/v1/grid/:sessionId/presignedUrl`, ({ params: t }) => {
47
+ t.post(`${a}/repo/v1/grid/session/:sessionId/presigned/url`, ({ params: t }) => {
48
48
  let { sessionId: n } = t;
49
49
  if (!Array.from(i.values()).find((e) => e.sessionId === n)) return e.text("Grid session not found", { status: 404 });
50
50
  let r = `https://mock-s3-bucket/${n}/data.csv?presigned=true`;
@@ -1 +1 @@
1
- {"version":3,"file":"gridHandlers.js","names":[],"sources":["../../../../src/mocks/msw/handlers/gridHandlers.ts"],"sourcesContent":["import { CreateReplicaRequest } from '@sage-bionetworks/synapse-client'\nimport { http, HttpResponse } from 'msw'\n\nfunction getRandomInt() {\n return crypto.getRandomValues(new Uint32Array(1))[0]\n}\n\n// Generate unique session IDs for grid sessions\nconst generateSessionId = () => {\n const randomId: number = getRandomInt()\n return `grid-session-${randomId * 100000}`\n}\n\ninterface GridJob {\n status: string\n startTime: number\n sessionId: string\n}\n\n// In-memory storage to track async jobs\nconst pendingJobs = new Map<string, GridJob>()\n\nexport function getGridHandlers(backendOrigin: string) {\n return [\n // Handler for starting a grid session\n http.post(\n `${backendOrigin}/repo/v1/grid/session/async/start`,\n async ({ request }) => {\n // Generate a unique job token\n const jobToken = `job-${Date.now()}-${Math.random()\n .toString(36)\n .substring(2, 9)}`\n const requestBody = await request.json()\n\n // Store job details for later reference\n pendingJobs.set(jobToken, {\n status: 'PROCESSING',\n startTime: Date.now(),\n sessionId: generateSessionId(),\n })\n\n return HttpResponse.json(requestBody, { status: 201 })\n },\n ),\n\n // Handler for retrieving async job results\n http.get<{ token: string }>(\n `${backendOrigin}/repo/v1/grid/session/async/get/:token`,\n ({ params }) => {\n // Retrieve job data\n const jobData = pendingJobs.get(params.token)\n\n if (!jobData) {\n return HttpResponse.text('Job not found', { status: 404 })\n }\n\n // Job is complete, return result\n jobData.status = 'COMPLETE'\n return HttpResponse.json(\n {\n concreteType: 'org.sagebionetworks.repo.model.grid.GridSession',\n gridSession: {\n sessionId: jobData.sessionId,\n startedBy: 'mockUser',\n startedOn: new Date().toISOString(),\n etag: `etag-${Date.now()}`,\n modifiedOn: new Date().toISOString(),\n lastReplicaIdClient: 1,\n lastReplicaIdService: 1,\n },\n },\n { status: 200 },\n )\n },\n ),\n\n // Handler for GridSessionReplica\n http.post<{ sessionId: string }, CreateReplicaRequest>(\n `${backendOrigin}/repo/v1/grid/:sessionId/replica`,\n async ({ request }) => {\n const { gridSessionId } = await request.json()\n\n // Check if the session ID exists in pending jobs\n const jobData = Array.from(pendingJobs.values()).find(\n job => job.sessionId === gridSessionId,\n )\n\n if (!jobData) {\n return HttpResponse.text('Grid session not found', { status: 404 })\n }\n\n // Create a replica for the session\n const replicaId = getRandomInt() % 1000\n const replicaResponse = {\n concreteType: 'org.sagebionetworks.repo.model.grid.GridReplica',\n replica: {\n gridSessionId,\n replicaId,\n createdBy: 'mockUser',\n isAgentReplica: false,\n createdOn: new Date().toISOString(),\n },\n }\n return HttpResponse.json(replicaResponse, { status: 201 })\n },\n ),\n\n // Handler for Grid presigned URL\n http.get<{ sessionId: string }>(\n `${backendOrigin}/repo/v1/grid/:sessionId/presignedUrl`,\n ({ params }) => {\n const { sessionId } = params\n\n const jobData = Array.from(pendingJobs.values()).find(\n job => job.sessionId === sessionId,\n )\n if (!jobData) {\n return HttpResponse.text('Grid session not found', { status: 404 })\n }\n // Generate a mock presigned URL\n const presignedUrl = `https://mock-s3-bucket/${sessionId}/data.csv?presigned=true`\n return HttpResponse.json({ presignedUrl }, { status: 200 })\n },\n ),\n ]\n}\n"],"mappings":";;AAGA,SAAS,IAAe;CACtB,OAAO,OAAO,gBAAgB,IAAI,YAAY,CAAC,CAAC,EAAE;AACpD;AAGA,IAAM,UAEG,gBADkB,EACF,IAAW,OAU9B,oBAAc,IAAI,IAAqB;AAE7C,SAAgB,EAAgB,GAAuB;CACrD,OAAO;EAEL,EAAK,KACH,GAAG,EAAc,oCACjB,OAAO,EAAE,iBAAc;GAErB,IAAM,IAAW,OAAO,KAAK,IAAI,EAAE,GAAG,KAAK,OAAO,EAC/C,SAAS,EAAE,EACX,UAAU,GAAG,CAAC,KACX,IAAc,MAAM,EAAQ,KAAK;GASvC,OANA,EAAY,IAAI,GAAU;IACxB,QAAQ;IACR,WAAW,KAAK,IAAI;IACpB,WAAW,EAAkB;GAC/B,CAAC,GAEM,EAAa,KAAK,GAAa,EAAE,QAAQ,IAAI,CAAC;EACvD,CACF;EAGA,EAAK,IACH,GAAG,EAAc,0CAChB,EAAE,gBAAa;GAEd,IAAM,IAAU,EAAY,IAAI,EAAO,KAAK;GAQ5C,OANK,KAKL,EAAQ,SAAS,YACV,EAAa,KAClB;IACE,cAAc;IACd,aAAa;KACX,WAAW,EAAQ;KACnB,WAAW;KACX,4BAAW,IAAI,KAAK,GAAE,YAAY;KAClC,MAAM,QAAQ,KAAK,IAAI;KACvB,6BAAY,IAAI,KAAK,GAAE,YAAY;KACnC,qBAAqB;KACrB,sBAAsB;IACxB;GACF,GACA,EAAE,QAAQ,IAAI,CAChB,KAnBS,EAAa,KAAK,iBAAiB,EAAE,QAAQ,IAAI,CAAC;EAoB7D,CACF;EAGA,EAAK,KACH,GAAG,EAAc,mCACjB,OAAO,EAAE,iBAAc;GACrB,IAAM,EAAE,qBAAkB,MAAM,EAAQ,KAAK;GAO7C,IAAI,CAJY,MAAM,KAAK,EAAY,OAAO,CAAC,EAAE,MAC/C,MAAO,EAAI,cAAc,CAGtB,GACH,OAAO,EAAa,KAAK,0BAA0B,EAAE,QAAQ,IAAI,CAAC;GAKpE,IAAM,IAAkB;IACtB,cAAc;IACd,SAAS;KACP;KACA,WALc,EAAa,IAAI;KAM/B,WAAW;KACX,gBAAgB;KAChB,4BAAW,IAAI,KAAK,GAAE,YAAY;IACpC;GACF;GACA,OAAO,EAAa,KAAK,GAAiB,EAAE,QAAQ,IAAI,CAAC;EAC3D,CACF;EAGA,EAAK,IACH,GAAG,EAAc,yCAChB,EAAE,gBAAa;GACd,IAAM,EAAE,iBAAc;GAKtB,IAAI,CAHY,MAAM,KAAK,EAAY,OAAO,CAAC,EAAE,MAC/C,MAAO,EAAI,cAAc,CAEtB,GACH,OAAO,EAAa,KAAK,0BAA0B,EAAE,QAAQ,IAAI,CAAC;GAGpE,IAAM,IAAe,0BAA0B,EAAU;GACzD,OAAO,EAAa,KAAK,EAAE,gBAAa,GAAG,EAAE,QAAQ,IAAI,CAAC;EAC5D,CACF;CACF;AACF"}
1
+ {"version":3,"file":"gridHandlers.js","names":[],"sources":["../../../../src/mocks/msw/handlers/gridHandlers.ts"],"sourcesContent":["import { CreateReplicaRequest } from '@sage-bionetworks/synapse-client'\nimport { http, HttpResponse } from 'msw'\n\nfunction getRandomInt() {\n return crypto.getRandomValues(new Uint32Array(1))[0]\n}\n\n// Generate unique session IDs for grid sessions\nconst generateSessionId = () => {\n const randomId: number = getRandomInt()\n return `grid-session-${randomId * 100000}`\n}\n\ninterface GridJob {\n status: string\n startTime: number\n sessionId: string\n}\n\n// In-memory storage to track async jobs\nconst pendingJobs = new Map<string, GridJob>()\n\nexport function getGridHandlers(backendOrigin: string) {\n return [\n // Handler for starting a grid session\n http.post(\n `${backendOrigin}/repo/v1/grid/session/async/start`,\n async ({ request }) => {\n // Generate a unique job token\n const jobToken = `job-${Date.now()}-${Math.random()\n .toString(36)\n .substring(2, 9)}`\n const requestBody = await request.json()\n\n // Store job details for later reference\n pendingJobs.set(jobToken, {\n status: 'PROCESSING',\n startTime: Date.now(),\n sessionId: generateSessionId(),\n })\n\n return HttpResponse.json(requestBody, { status: 201 })\n },\n ),\n\n // Handler for retrieving async job results\n http.get<{ token: string }>(\n `${backendOrigin}/repo/v1/grid/session/async/get/:token`,\n ({ params }) => {\n // Retrieve job data\n const jobData = pendingJobs.get(params.token)\n\n if (!jobData) {\n return HttpResponse.text('Job not found', { status: 404 })\n }\n\n // Job is complete, return result\n jobData.status = 'COMPLETE'\n return HttpResponse.json(\n {\n concreteType: 'org.sagebionetworks.repo.model.grid.GridSession',\n gridSession: {\n sessionId: jobData.sessionId,\n startedBy: 'mockUser',\n startedOn: new Date().toISOString(),\n etag: `etag-${Date.now()}`,\n modifiedOn: new Date().toISOString(),\n lastReplicaIdClient: 1,\n lastReplicaIdService: 1,\n },\n },\n { status: 200 },\n )\n },\n ),\n\n // Handler for GridSessionReplica\n http.post<{ sessionId: string }, CreateReplicaRequest>(\n `${backendOrigin}/repo/v1/grid/session/:sessionId/replica`,\n async ({ request }) => {\n const { gridSessionId } = await request.json()\n\n // Check if the session ID exists in pending jobs\n const jobData = Array.from(pendingJobs.values()).find(\n job => job.sessionId === gridSessionId,\n )\n\n if (!jobData) {\n return HttpResponse.text('Grid session not found', { status: 404 })\n }\n\n // Create a replica for the session\n const replicaId = getRandomInt() % 1000\n const replicaResponse = {\n concreteType: 'org.sagebionetworks.repo.model.grid.GridReplica',\n replica: {\n gridSessionId,\n replicaId,\n createdBy: 'mockUser',\n isAgentReplica: false,\n createdOn: new Date().toISOString(),\n },\n }\n return HttpResponse.json(replicaResponse, { status: 201 })\n },\n ),\n\n // Handler for Grid presigned URL\n http.post<{ sessionId: string }>(\n `${backendOrigin}/repo/v1/grid/session/:sessionId/presigned/url`,\n ({ params }) => {\n const { sessionId } = params\n\n const jobData = Array.from(pendingJobs.values()).find(\n job => job.sessionId === sessionId,\n )\n if (!jobData) {\n return HttpResponse.text('Grid session not found', { status: 404 })\n }\n // Generate a mock presigned URL\n const presignedUrl = `https://mock-s3-bucket/${sessionId}/data.csv?presigned=true`\n return HttpResponse.json({ presignedUrl }, { status: 200 })\n },\n ),\n ]\n}\n"],"mappings":";;AAGA,SAAS,IAAe;CACtB,OAAO,OAAO,gBAAgB,IAAI,YAAY,CAAC,CAAC,EAAE;AACpD;AAGA,IAAM,UAEG,gBADkB,EACF,IAAW,OAU9B,oBAAc,IAAI,IAAqB;AAE7C,SAAgB,EAAgB,GAAuB;CACrD,OAAO;EAEL,EAAK,KACH,GAAG,EAAc,oCACjB,OAAO,EAAE,iBAAc;GAErB,IAAM,IAAW,OAAO,KAAK,IAAI,EAAE,GAAG,KAAK,OAAO,EAC/C,SAAS,EAAE,EACX,UAAU,GAAG,CAAC,KACX,IAAc,MAAM,EAAQ,KAAK;GASvC,OANA,EAAY,IAAI,GAAU;IACxB,QAAQ;IACR,WAAW,KAAK,IAAI;IACpB,WAAW,EAAkB;GAC/B,CAAC,GAEM,EAAa,KAAK,GAAa,EAAE,QAAQ,IAAI,CAAC;EACvD,CACF;EAGA,EAAK,IACH,GAAG,EAAc,0CAChB,EAAE,gBAAa;GAEd,IAAM,IAAU,EAAY,IAAI,EAAO,KAAK;GAQ5C,OANK,KAKL,EAAQ,SAAS,YACV,EAAa,KAClB;IACE,cAAc;IACd,aAAa;KACX,WAAW,EAAQ;KACnB,WAAW;KACX,4BAAW,IAAI,KAAK,GAAE,YAAY;KAClC,MAAM,QAAQ,KAAK,IAAI;KACvB,6BAAY,IAAI,KAAK,GAAE,YAAY;KACnC,qBAAqB;KACrB,sBAAsB;IACxB;GACF,GACA,EAAE,QAAQ,IAAI,CAChB,KAnBS,EAAa,KAAK,iBAAiB,EAAE,QAAQ,IAAI,CAAC;EAoB7D,CACF;EAGA,EAAK,KACH,GAAG,EAAc,2CACjB,OAAO,EAAE,iBAAc;GACrB,IAAM,EAAE,qBAAkB,MAAM,EAAQ,KAAK;GAO7C,IAAI,CAJY,MAAM,KAAK,EAAY,OAAO,CAAC,EAAE,MAC/C,MAAO,EAAI,cAAc,CAGtB,GACH,OAAO,EAAa,KAAK,0BAA0B,EAAE,QAAQ,IAAI,CAAC;GAKpE,IAAM,IAAkB;IACtB,cAAc;IACd,SAAS;KACP;KACA,WALc,EAAa,IAAI;KAM/B,WAAW;KACX,gBAAgB;KAChB,4BAAW,IAAI,KAAK,GAAE,YAAY;IACpC;GACF;GACA,OAAO,EAAa,KAAK,GAAiB,EAAE,QAAQ,IAAI,CAAC;EAC3D,CACF;EAGA,EAAK,KACH,GAAG,EAAc,kDAChB,EAAE,gBAAa;GACd,IAAM,EAAE,iBAAc;GAKtB,IAAI,CAHY,MAAM,KAAK,EAAY,OAAO,CAAC,EAAE,MAC/C,MAAO,EAAI,cAAc,CAEtB,GACH,OAAO,EAAa,KAAK,0BAA0B,EAAE,QAAQ,IAAI,CAAC;GAGpE,IAAM,IAAe,0BAA0B,EAAU;GACzD,OAAO,EAAa,KAAK,EAAE,gBAAa,GAAG,EAAE,QAAQ,IAAI,CAAC;EAC5D,CACF;CACF;AACF"}
@@ -9,7 +9,7 @@ var a = new n({
9
9
  autoGenerateId: !0
10
10
  });
11
11
  function o(e, t = "ASC", n = 0, r = 10, i) {
12
- let o = a.getAll().filter((t) => e ? t.objectType === e : !0).filter((e) => i ? i.includes(e.objectId) : !0).sort((e, n) => {
12
+ let o = a.getAll().filter((t) => e ? t.objectType === e : !0).filter((e) => i ? i.includes(e.objectId) : !0).toSorted((e, n) => {
13
13
  let r = new Date(n.createdOn).getTime() - new Date(e.createdOn).getTime();
14
14
  return t === "ASC" ? r : -1 * r;
15
15
  }), s = o.length;