@gen3/frontend 0.10.88 → 0.10.91

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 (275) hide show
  1. package/dist/cjs/index.js +754 -220
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/Profile/CredentialsTable.d.ts.map +1 -1
  4. package/dist/dts/components/Profile/CredentialsTable.js +2 -1
  5. package/dist/dts/components/Profile/CredentialsTable.js.map +1 -1
  6. package/dist/dts/components/Providers/Gen3Provider.d.ts +4 -1
  7. package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
  8. package/dist/dts/components/Providers/Gen3Provider.js +6 -8
  9. package/dist/dts/components/Providers/Gen3Provider.js.map +1 -1
  10. package/dist/dts/components/Providers/ResourceMonitor.d.ts.map +1 -1
  11. package/dist/dts/components/Providers/ResourceMonitor.js +0 -1
  12. package/dist/dts/components/Providers/ResourceMonitor.js.map +1 -1
  13. package/dist/dts/features/Analysis/AnalysisCard.d.ts.map +1 -1
  14. package/dist/dts/features/Analysis/AnalysisCard.js +2 -2
  15. package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -1
  16. package/dist/dts/features/Analysis/AnalysisCardCompact.d.ts.map +1 -1
  17. package/dist/dts/features/Analysis/AnalysisCardCompact.js +2 -2
  18. package/dist/dts/features/Analysis/AnalysisCardCompact.js.map +1 -1
  19. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -2
  20. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
  21. package/dist/dts/features/Analysis/AnalysisCenter.d.ts.map +1 -1
  22. package/dist/dts/features/Analysis/AnalysisCenter.js +2 -2
  23. package/dist/dts/features/Analysis/AnalysisCenter.js.map +1 -1
  24. package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.d.ts.map +1 -1
  25. package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.js +1 -0
  26. package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.js.map +1 -1
  27. package/dist/dts/features/Analysis/types.d.ts +1 -0
  28. package/dist/dts/features/Analysis/types.d.ts.map +1 -1
  29. package/dist/dts/features/Analysis/types.js.map +1 -1
  30. package/dist/dts/features/Authz/{Provider.d.ts → AuthzAdminProvider.d.ts} +2 -2
  31. package/dist/dts/features/Authz/AuthzAdminProvider.d.ts.map +1 -0
  32. package/dist/dts/features/Authz/{Provider.js → AuthzAdminProvider.js} +2 -2
  33. package/dist/dts/features/Authz/AuthzAdminProvider.js.map +1 -0
  34. package/dist/dts/features/Authz/Gen3Authz.js +2 -2
  35. package/dist/dts/features/Authz/Gen3Authz.js.map +1 -1
  36. package/dist/dts/features/Authz/Policies/PoliciesTable.d.ts.map +1 -1
  37. package/dist/dts/features/Authz/Policies/PoliciesTable.js +3 -3
  38. package/dist/dts/features/Authz/Policies/PoliciesTable.js.map +1 -1
  39. package/dist/dts/features/Authz/Resources/ResourcesTable.d.ts.map +1 -1
  40. package/dist/dts/features/Authz/Resources/ResourcesTable.js +2 -2
  41. package/dist/dts/features/Authz/Resources/ResourcesTable.js.map +1 -1
  42. package/dist/dts/features/Authz/Roles/RolesTable.js +1 -1
  43. package/dist/dts/features/Authz/Roles/RolesTable.js.map +1 -1
  44. package/dist/dts/features/Authz/Users/NewUserPanel.js +1 -1
  45. package/dist/dts/features/Authz/Users/NewUserPanel.js.map +1 -1
  46. package/dist/dts/features/Authz/Users/UserTable.js +1 -1
  47. package/dist/dts/features/Authz/Users/UserTable.js.map +1 -1
  48. package/dist/dts/features/Authz/index.d.ts +2 -2
  49. package/dist/dts/features/Authz/index.d.ts.map +1 -1
  50. package/dist/dts/features/Authz/index.js +2 -2
  51. package/dist/dts/features/Authz/index.js.map +1 -1
  52. package/dist/dts/features/CohortBuilder/CohortBuilder.js +1 -1
  53. package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
  54. package/dist/dts/features/CohortDiscovery/CohortDiscovery.js +2 -2
  55. package/dist/dts/features/CohortDiscovery/CohortDiscovery.js.map +1 -1
  56. package/dist/dts/features/DataLibrary/DataLibraryLists.d.ts.map +1 -1
  57. package/dist/dts/features/DataLibrary/DataLibraryLists.js +32 -19
  58. package/dist/dts/features/DataLibrary/DataLibraryLists.js.map +1 -1
  59. package/dist/dts/features/DataLibrary/DatalistAccordionItem.d.ts +3 -4
  60. package/dist/dts/features/DataLibrary/DatalistAccordionItem.d.ts.map +1 -1
  61. package/dist/dts/features/DataLibrary/DatalistAccordionItem.js +11 -9
  62. package/dist/dts/features/DataLibrary/DatalistAccordionItem.js.map +1 -1
  63. package/dist/dts/features/DataLibrary/DatasetAccordionControl.d.ts.map +1 -1
  64. package/dist/dts/features/DataLibrary/DatasetAccordionControl.js +1 -1
  65. package/dist/dts/features/DataLibrary/DatasetAccordionControl.js.map +1 -1
  66. package/dist/dts/features/DataLibrary/QueryDetails.d.ts.map +1 -1
  67. package/dist/dts/features/DataLibrary/QueryDetails.js +6 -2
  68. package/dist/dts/features/DataLibrary/QueryDetails.js.map +1 -1
  69. package/dist/dts/features/DataLibrary/SearchAndActions.d.ts +4 -2
  70. package/dist/dts/features/DataLibrary/SearchAndActions.d.ts.map +1 -1
  71. package/dist/dts/features/DataLibrary/SearchAndActions.js +4 -3
  72. package/dist/dts/features/DataLibrary/SearchAndActions.js.map +1 -1
  73. package/dist/dts/features/DataLibrary/selection/exportActions.d.ts +1 -1
  74. package/dist/dts/features/DataLibrary/selection/exportActions.d.ts.map +1 -1
  75. package/dist/dts/features/DataLibrary/selection/exportActions.js +1 -1
  76. package/dist/dts/features/DataLibrary/selection/exportActions.js.map +1 -1
  77. package/dist/dts/features/DataLibrary/selection/registeredActions.d.ts +1 -4
  78. package/dist/dts/features/DataLibrary/selection/registeredActions.d.ts.map +1 -1
  79. package/dist/dts/features/DataLibrary/selection/registeredActions.js.map +1 -1
  80. package/dist/dts/features/DataLibrary/selection/selection.d.ts +3 -3
  81. package/dist/dts/features/DataLibrary/selection/selection.d.ts.map +1 -1
  82. package/dist/dts/features/DataLibrary/selection/selection.js +2 -2
  83. package/dist/dts/features/DataLibrary/selection/selection.js.map +1 -1
  84. package/dist/dts/features/DataLibrary/selection/types.d.ts +4 -2
  85. package/dist/dts/features/DataLibrary/selection/types.d.ts.map +1 -1
  86. package/dist/dts/features/DataLibrary/selection/utils.js +3 -3
  87. package/dist/dts/features/DataLibrary/selection/utils.js.map +1 -1
  88. package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.js +1 -1
  89. package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.js.map +1 -1
  90. package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.d.ts.map +1 -1
  91. package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.js +2 -2
  92. package/dist/dts/features/DataLibrary/tables/DatasetContentsTable.js.map +1 -1
  93. package/dist/dts/features/DataLibrary/types.d.ts +1 -0
  94. package/dist/dts/features/DataLibrary/types.d.ts.map +1 -1
  95. package/dist/dts/features/DataLibrary/types.js.map +1 -1
  96. package/dist/dts/features/Discovery/ActionBar/ActionBar.d.ts +5 -4
  97. package/dist/dts/features/Discovery/ActionBar/ActionBar.d.ts.map +1 -1
  98. package/dist/dts/features/Discovery/ActionBar/ActionBar.js +16 -10
  99. package/dist/dts/features/Discovery/ActionBar/ActionBar.js.map +1 -1
  100. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.d.ts +4 -0
  101. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.d.ts.map +1 -0
  102. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.js +166 -0
  103. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.js.map +1 -0
  104. package/dist/dts/features/{Navigation/TopBar.stories.d.ts → Discovery/ActionBar/AddToDataLibrary.stories.d.ts} +2 -3
  105. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.stories.d.ts.map +1 -0
  106. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.stories.js +54 -0
  107. package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.stories.js.map +1 -0
  108. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.d.ts +1 -1
  109. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.js +3 -3
  110. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.d.ts +13 -0
  111. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.d.ts.map +1 -0
  112. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.js +15 -0
  113. package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.js.map +1 -0
  114. package/dist/dts/features/Discovery/ActionBar/DownloadAsZipButton.d.ts +2 -2
  115. package/dist/dts/features/Discovery/ActionBar/DownloadAsZipButton.d.ts.map +1 -1
  116. package/dist/dts/features/Discovery/ActionBar/DownloadAsZipButton.js +2 -2
  117. package/dist/dts/features/Discovery/ActionBar/DownloadAsZipButton.js.map +1 -1
  118. package/dist/dts/features/Discovery/ActionBar/DownloadManifestButton.d.ts +2 -2
  119. package/dist/dts/features/Discovery/ActionBar/DownloadManifestButton.d.ts.map +1 -1
  120. package/dist/dts/features/Discovery/ActionBar/DownloadManifestButton.js +58 -9
  121. package/dist/dts/features/Discovery/ActionBar/DownloadManifestButton.js.map +1 -1
  122. package/dist/dts/features/Discovery/ActionBar/registeredActions.d.ts +1 -0
  123. package/dist/dts/features/Discovery/ActionBar/registeredActions.d.ts.map +1 -0
  124. package/dist/dts/features/Discovery/ActionBar/registeredActions.js +86 -0
  125. package/dist/dts/features/Discovery/ActionBar/registeredActions.js.map +1 -0
  126. package/dist/dts/features/Discovery/ActionBar/types.d.ts +10 -2
  127. package/dist/dts/features/Discovery/ActionBar/types.d.ts.map +1 -1
  128. package/dist/dts/features/Discovery/DataLoaders/IndexedMetadata/DataLoader.d.ts.map +1 -1
  129. package/dist/dts/features/Discovery/DataLoaders/IndexedMetadata/DataLoader.js +3 -1
  130. package/dist/dts/features/Discovery/DataLoaders/IndexedMetadata/DataLoader.js.map +1 -1
  131. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.d.ts.map +1 -1
  132. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js +6 -2
  133. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js.map +1 -1
  134. package/dist/dts/features/Discovery/DataLoaders/utils.d.ts +2 -2
  135. package/dist/dts/features/Discovery/DataLoaders/utils.d.ts.map +1 -1
  136. package/dist/dts/features/Discovery/DataLoaders/utils.js +87 -41
  137. package/dist/dts/features/Discovery/DataLoaders/utils.js.map +1 -1
  138. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts +13 -0
  139. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
  140. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +38 -14
  141. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
  142. package/dist/dts/features/Discovery/DiscoveryTable.d.ts +2 -1
  143. package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
  144. package/dist/dts/features/Discovery/DiscoveryTable.js +18 -6
  145. package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
  146. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.d.ts.map +1 -1
  147. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js +2 -1
  148. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js.map +1 -1
  149. package/dist/dts/features/Discovery/TableRenderers/CellRendererFactory.js +2 -2
  150. package/dist/dts/features/Discovery/TableRenderers/CellRendererFactory.js.map +1 -1
  151. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts +2 -1
  152. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts.map +1 -1
  153. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js +1 -1
  154. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js.map +1 -1
  155. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.d.ts +2 -1
  156. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.d.ts.map +1 -1
  157. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.js +30 -11
  158. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.js.map +1 -1
  159. package/dist/dts/features/Discovery/TableRenderers/types.d.ts +2 -1
  160. package/dist/dts/features/Discovery/TableRenderers/types.d.ts.map +1 -1
  161. package/dist/dts/features/Discovery/constants.d.ts +2 -0
  162. package/dist/dts/features/Discovery/constants.d.ts.map +1 -0
  163. package/dist/dts/features/Discovery/constants.js +2 -0
  164. package/dist/dts/features/Discovery/constants.js.map +1 -0
  165. package/dist/dts/features/Discovery/index.d.ts +2 -1
  166. package/dist/dts/features/Discovery/index.d.ts.map +1 -1
  167. package/dist/dts/features/Discovery/index.js +2 -1
  168. package/dist/dts/features/Discovery/index.js.map +1 -1
  169. package/dist/dts/features/Discovery/types.d.ts +12 -15
  170. package/dist/dts/features/Discovery/types.d.ts.map +1 -1
  171. package/dist/dts/features/Discovery/types.js +2 -1
  172. package/dist/dts/features/Discovery/types.js.map +1 -1
  173. package/dist/dts/features/Discovery/utils.d.ts +8 -2
  174. package/dist/dts/features/Discovery/utils.d.ts.map +1 -1
  175. package/dist/dts/features/Discovery/utils.js +37 -4
  176. package/dist/dts/features/Discovery/utils.js.map +1 -1
  177. package/dist/dts/features/Navigation/TopBar/TopBar.d.ts.map +1 -1
  178. package/dist/dts/features/Navigation/TopBar/TopBar.js +1 -1
  179. package/dist/dts/features/Navigation/TopBar/TopBar.js.map +1 -1
  180. package/dist/dts/features/Workspace/admin/WorkspaceEditorContext.js +1 -1
  181. package/dist/dts/features/Workspace/admin/WorkspaceEditorContext.js.map +1 -1
  182. package/dist/dts/index.d.ts +2 -2
  183. package/dist/dts/index.d.ts.map +1 -1
  184. package/dist/dts/index.js +2 -2
  185. package/dist/dts/index.js.map +1 -1
  186. package/dist/dts/lib/common/analysisToolFramework.d.ts +6 -0
  187. package/dist/dts/lib/common/analysisToolFramework.d.ts.map +1 -0
  188. package/dist/dts/lib/common/analysisToolFramework.js +21 -0
  189. package/dist/dts/lib/common/analysisToolFramework.js.map +1 -0
  190. package/dist/dts/lib/common/staticProps.d.ts.map +1 -1
  191. package/dist/dts/lib/common/staticProps.js +4 -4
  192. package/dist/dts/lib/common/staticProps.js.map +1 -1
  193. package/dist/dts/lib/common/types.d.ts +8 -0
  194. package/dist/dts/lib/common/types.d.ts.map +1 -0
  195. package/dist/dts/lib/common/types.js +2 -0
  196. package/dist/dts/lib/common/types.js.map +1 -0
  197. package/dist/dts/lib/content/constants.d.ts.map +1 -1
  198. package/dist/dts/lib/content/constants.js +1 -1
  199. package/dist/dts/lib/content/constants.js.map +1 -1
  200. package/dist/dts/lib/content/filesystem.js +4 -6
  201. package/dist/dts/lib/content/filesystem.js.map +1 -1
  202. package/dist/dts/lib/content/index.d.ts +9 -2
  203. package/dist/dts/lib/content/index.d.ts.map +1 -1
  204. package/dist/dts/lib/content/index.js +26 -7
  205. package/dist/dts/lib/content/index.js.map +1 -1
  206. package/dist/dts/lib/session/session.d.ts.map +1 -1
  207. package/dist/dts/lib/session/session.js +2 -1
  208. package/dist/dts/lib/session/session.js.map +1 -1
  209. package/dist/dts/pages/Analysis/data.d.ts.map +1 -1
  210. package/dist/dts/pages/Analysis/data.js +1 -1
  211. package/dist/dts/pages/Analysis/data.js.map +1 -1
  212. package/dist/dts/pages/Crosswalk/data.d.ts.map +1 -1
  213. package/dist/dts/pages/Crosswalk/data.js +1 -1
  214. package/dist/dts/pages/Crosswalk/data.js.map +1 -1
  215. package/dist/dts/pages/DataDictionary/data.d.ts.map +1 -1
  216. package/dist/dts/pages/DataDictionary/data.js +1 -1
  217. package/dist/dts/pages/DataDictionary/data.js.map +1 -1
  218. package/dist/dts/pages/DataLibrary/data.d.ts.map +1 -1
  219. package/dist/dts/pages/DataLibrary/data.js +1 -1
  220. package/dist/dts/pages/DataLibrary/data.js.map +1 -1
  221. package/dist/dts/pages/Discovery/data.d.ts.map +1 -1
  222. package/dist/dts/pages/Discovery/data.js +1 -1
  223. package/dist/dts/pages/Discovery/data.js.map +1 -1
  224. package/dist/dts/pages/Explorer/data.d.ts.map +1 -1
  225. package/dist/dts/pages/Explorer/data.js +4 -4
  226. package/dist/dts/pages/Explorer/data.js.map +1 -1
  227. package/dist/dts/pages/Landing/data.d.ts +2 -2
  228. package/dist/dts/pages/Landing/data.d.ts.map +1 -1
  229. package/dist/dts/pages/Landing/data.js +2 -2
  230. package/dist/dts/pages/Landing/data.js.map +1 -1
  231. package/dist/dts/pages/Landing/index.d.ts +1 -1
  232. package/dist/dts/pages/Landing/index.d.ts.map +1 -1
  233. package/dist/dts/pages/Landing/index.js +1 -1
  234. package/dist/dts/pages/Landing/index.js.map +1 -1
  235. package/dist/dts/pages/Landing/resource.js +1 -1
  236. package/dist/dts/pages/Landing/resource.js.map +1 -1
  237. package/dist/dts/pages/Login/data.js +1 -1
  238. package/dist/dts/pages/Login/data.js.map +1 -1
  239. package/dist/dts/pages/Profile/data.js +1 -1
  240. package/dist/dts/pages/Profile/data.js.map +1 -1
  241. package/dist/dts/pages/Query/data.js +1 -1
  242. package/dist/dts/pages/Query/data.js.map +1 -1
  243. package/dist/dts/pages/Submission/data.d.ts.map +1 -1
  244. package/dist/dts/pages/Submission/data.js +1 -1
  245. package/dist/dts/pages/Submission/data.js.map +1 -1
  246. package/dist/dts/pages/Workspace/data.d.ts.map +1 -1
  247. package/dist/dts/pages/Workspace/data.js +1 -1
  248. package/dist/dts/pages/Workspace/data.js.map +1 -1
  249. package/dist/dts/pages/admin/Workspace/data.js +1 -1
  250. package/dist/dts/pages/admin/Workspace/data.js.map +1 -1
  251. package/dist/dts/pages/admin/analysis/data.js +1 -1
  252. package/dist/dts/pages/admin/analysis/data.js.map +1 -1
  253. package/dist/dts/pages/admin/authz/data.js +1 -1
  254. package/dist/dts/pages/admin/authz/data.js.map +1 -1
  255. package/dist/dts/utils/authMapping.d.ts +2 -2
  256. package/dist/dts/utils/authMapping.d.ts.map +1 -1
  257. package/dist/dts/utils/authMapping.js.map +1 -1
  258. package/dist/esm/index.js +756 -223
  259. package/dist/esm/index.js.map +1 -1
  260. package/dist/index.d.ts +49 -21
  261. package/dist/tsconfig.tsbuildinfo +1 -1
  262. package/package.json +3 -3
  263. package/dist/dts/features/Authz/Provider.d.ts.map +0 -1
  264. package/dist/dts/features/Authz/Provider.js.map +0 -1
  265. package/dist/dts/features/Discovery/utils/processDataAccess.d.ts +0 -3
  266. package/dist/dts/features/Discovery/utils/processDataAccess.d.ts.map +0 -1
  267. package/dist/dts/features/Discovery/utils/processDataAccess.js +0 -73
  268. package/dist/dts/features/Discovery/utils/processDataAccess.js.map +0 -1
  269. package/dist/dts/features/Navigation/TopBar.d.ts +0 -24
  270. package/dist/dts/features/Navigation/TopBar.d.ts.map +0 -1
  271. package/dist/dts/features/Navigation/TopBar.js +0 -56
  272. package/dist/dts/features/Navigation/TopBar.js.map +0 -1
  273. package/dist/dts/features/Navigation/TopBar.stories.d.ts.map +0 -1
  274. package/dist/dts/features/Navigation/TopBar.stories.js +0 -30
  275. package/dist/dts/features/Navigation/TopBar.stories.js.map +0 -1
package/dist/esm/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { createContext, useState, useMemo, useEffect, useCallback, useContext, useRef, createElement, forwardRef, useReducer } from 'react';
4
- import { useUserAuth, useCoreSelector, selectUserDetails, useGetAuthzMappingsQuery, fetchFence, isFetchError, WorkspaceStatus, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useTerminateWorkspaceMutation, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, useCoreDispatch, setActiveWorkspaceStatus, RequestedWorkspaceStatus, setRequestedWorkspaceStatus, isTimeGreaterThan, useLazyFetchUserDetailsQuery, selectUserAuthStatus, GEN3_REDIRECT_URL, GEN3_FENCE_API, showModal, Modals, isAuthenticated, useGetLoginProvidersQuery, hideModal, useGetCSRFQuery, selectCurrentModal, fieldNameToTitle, useIsUserLoggedIn, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, isOperationWithField, extractEnumFilterValue, selectIndexedFilterByName, selectShouldShareFilters, selectSharedFilters, updateCohortFilter, isOperatorWithFieldAndArrayOfOperands, removeCohortFilter, setCohortFilter, clearCohortFilters, handleOperation, selectCohortFilters, setCohortIndexFilters, toggleCohortBuilderCategoryFilter, selectCohortFilterExpanded, setCohortFilterCombineMode, selectCohortFilterCombineMode, selectCurrentCohortId, selectCurrentCohortName, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, Accessibility, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, trimFirstFieldNameToTitle, selectAllCohortFiltersCollapsed, toggleCohortBuilderAllFilters, setShouldShareFilters, useGetAggsQuery, useGetAggsNoFilterSelfQuery, isIntersection, useGetCountsQuery, setSharedFilters, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, useSetCurrentPayModelMutation, PodStatus, PodConditionType, isWorkspaceRunningOrStopping, GEN3_COMMONS_NAME, createAppStore, createGen3AppWithOwnStore, createAppApiForRTKQ, getGen3AppId, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, fetchJSONDataFromURL, groupSharedFields, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, getTimestamp, useDataLibrary, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
- import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Tooltip, UnstyledButton, ThemeIcon, Center, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Loader, Paper, Menu, Badge, Alert, Tabs, Accordion, Drawer, CopyButton, factory, useProps, getStyleObject, SegmentedControl, Switch, Autocomplete, TextInput, Title, ActionIcon, NumberInput, RangeSlider, MultiSelect, Transition, rem, Stepper, Image as Image$1, NavLink, Flex, ScrollArea, Highlight, List, createTheme, Pagination, FileInput, CloseButton } from '@mantine/core';
4
+ import { useUserAuth, useCoreSelector, selectUserDetails, useGetAuthzMappingsQuery, fetchFence, isFetchError, WorkspaceStatus, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useTerminateWorkspaceMutation, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, useCoreDispatch, setActiveWorkspaceStatus, RequestedWorkspaceStatus, setRequestedWorkspaceStatus, isTimeGreaterThan, useGetCSRFQuery, useLazyFetchUserDetailsQuery, selectUserAuthStatus, GEN3_REDIRECT_URL, GEN3_FENCE_API, showModal, Modals, isAuthenticated, useGetLoginProvidersQuery, hideModal, selectCurrentModal, fieldNameToTitle, useIsUserLoggedIn, GEN3_DOMAIN, useDataLibrary, buildListItemsGroupedByDataset, extractFileDatasetsInRecords, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, isOperationWithField, extractEnumFilterValue, selectIndexedFilterByName, selectShouldShareFilters, selectSharedFilters, updateCohortFilter, isOperatorWithFieldAndArrayOfOperands, removeCohortFilter, setCohortFilter, clearCohortFilters, handleOperation, selectCohortFilters, setCohortIndexFilters, toggleCohortBuilderCategoryFilter, selectCohortFilterExpanded, setCohortFilterCombineMode, selectCohortFilterCombineMode, selectCurrentCohortId, selectCurrentCohortName, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, Accessibility, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, trimFirstFieldNameToTitle, selectAllCohortFiltersCollapsed, toggleCohortBuilderAllFilters, setShouldShareFilters, useGetAggsQuery, useGetAggsNoFilterSelfQuery, isIntersection, useGetCountsQuery, setSharedFilters, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, useSetCurrentPayModelMutation, PodStatus, PodConditionType, isWorkspaceRunningOrStopping, GEN3_COMMONS_NAME, createAppStore, createGen3AppWithOwnStore, createAppApiForRTKQ, getGen3AppId, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, fetchJSONDataFromURL, HttpMethod, groupSharedFields, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, extractIndexFromDataLibraryCohort, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
+ import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Tooltip, UnstyledButton, ThemeIcon, Center, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Loader, Paper, Menu, Badge, Alert, Tabs, Accordion, Drawer, CopyButton, factory, useProps, getStyleObject, SegmentedControl, useCombobox, Combobox, TextInput, ScrollArea, Switch, Autocomplete, Title, ActionIcon, NumberInput, RangeSlider, MultiSelect, Transition, rem, Stepper, Image as Image$1, NavLink, Flex, Highlight, List, createTheme, Pagination, FileInput, CloseButton } from '@mantine/core';
6
6
  import { useDeepCompareEffect, useDeepCompareMemo, useDeepCompareCallback } from 'use-deep-compare';
7
7
  import { useRouter } from 'next/router';
8
8
  import { usePathname } from 'next/navigation';
9
- import { MdLogin, MdClose, MdKeyboardDoubleArrowLeft, MdUndo, MdSearch, MdInfo, MdExpandLess, MdExpandMore, MdFlip, MdAddCircle, MdRemoveCircle, MdOutlineArrowBack, MdOutlineArrowForward, MdKeyboardArrowDown, MdKeyboardArrowUp, MdDownload, MdGroup, MdOutlineBarChart, MdOutlineSearch, MdFormatQuote, MdDelete, MdOutlineRemoveCircle } from 'react-icons/md';
9
+ import { MdLogin, MdClose, MdKeyboardDoubleArrowLeft, MdUndo, MdSearch, MdInfo, MdExpandLess, MdExpandMore, MdFlip, MdAddCircle, MdRemoveCircle, MdOutlineArrowBack, MdOutlineArrowForward, MdKeyboardArrowDown, MdKeyboardArrowUp, MdDownload, MdGroup, MdOutlineBarChart, MdOutlineSearch, MdFormatQuote, MdDelete, MdAdd, MdOutlineRemoveCircle } from 'react-icons/md';
10
10
  import { getCookie, deleteCookie, setCookie } from 'cookies-next';
11
11
  import 'swr';
12
12
  import { errors, importSPKI, jwtVerify, decodeJwt } from 'jose';
@@ -32,7 +32,7 @@ import { PiDotsThreeCircleThin, PiTrash, PiSparkleFill, PiCaretUpFill, PiCaretDo
32
32
  import Head from 'next/head';
33
33
  import { useMantineReactTable, MantineReactTable } from 'mantine-react-table';
34
34
  import { JSONPath } from 'jsonpath-plus';
35
- import { LuClock, LuCircleSlash, LuUnlock, LuLock } from 'react-icons/lu';
35
+ import { LuCircleSlash, LuClock, LuLock, LuUnlock } from 'react-icons/lu';
36
36
  import { FiDownload, FiMoreVertical } from 'react-icons/fi';
37
37
  import { TiArrowSortedDown, TiArrowSortedUp, TiArrowUnsorted } from 'react-icons/ti';
38
38
  import { flushSync } from 'react-dom';
@@ -662,7 +662,6 @@ const workspaceShutdownAlertLimit = 30000; // 5 minutes: 5 * 60 * 1000 TODO Figu
662
662
  const dispatch = useCoreDispatch();
663
663
  useEffect(()=>{
664
664
  if (isWorkspaceStatusError) {
665
- console.error('Workspace model error: ', workspaceStatusError.toString());
666
665
  dispatch(setActiveWorkspaceStatus(WorkspaceStatus.StatusError));
667
666
  setPollingInterval(0); // stop polling
668
667
  setPaymentPollingInterval(0);
@@ -865,6 +864,7 @@ const UPDATE_SESSION_LIMIT = MinutesToMilliseconds(5);
865
864
  */ const SessionProvider = ({ children, updateSessionTime = 5, inactiveTimeLimit = 20, workspaceInactivityTimeLimit = 0, logoutInactiveUsers = true, monitorWorkspace = true })=>{
866
865
  const router = useRouter();
867
866
  const coreDispatch = useCoreDispatch();
867
+ useGetCSRFQuery();
868
868
  useWorkspaceResourceMonitor(monitorWorkspace); // monitor workspaces if any are running or configured
869
869
  const [getUserDetails] = useLazyFetchUserDetailsQuery(); // Fetch user details
870
870
  const userStatus = useCoreSelector((state)=>selectUserAuthStatus(state));
@@ -3727,6 +3727,23 @@ const NavPageLayout = ({ headerProps, footerProps, mainProps, headerData, childr
3727
3727
 
3728
3728
  var classes = {"tableRow":"DiscoveryTable-module_tableRow__yFUJZ"};
3729
3729
 
3730
+ const isSearchKV = (obj)=>{
3731
+ return obj && obj.key && obj.value;
3732
+ };
3733
+ const isSearchKVArray = (obj)=>{
3734
+ return obj && Array.isArray(obj) && obj.every(isSearchKV);
3735
+ };
3736
+ const accessibleFieldName = '__accessible';
3737
+ var AccessLevel = /*#__PURE__*/ function(AccessLevel) {
3738
+ AccessLevel[AccessLevel["ACCESSIBLE"] = 1] = "ACCESSIBLE";
3739
+ AccessLevel[AccessLevel["UNACCESSIBLE"] = 2] = "UNACCESSIBLE";
3740
+ AccessLevel[AccessLevel["WAITING"] = 3] = "WAITING";
3741
+ AccessLevel[AccessLevel["NOT_AVAILABLE"] = 4] = "NOT_AVAILABLE";
3742
+ AccessLevel[AccessLevel["OTHER"] = 5] = "OTHER";
3743
+ AccessLevel[AccessLevel["MIXED"] = 6] = "MIXED";
3744
+ return AccessLevel;
3745
+ }({});
3746
+
3730
3747
  const jsonPathAccessor$1 = (path)=>(row)=>{
3731
3748
  // TODO: add logging if path is not found
3732
3749
  return JSONPath({
@@ -3735,7 +3752,14 @@ const jsonPathAccessor$1 = (path)=>(row)=>{
3735
3752
  });
3736
3753
  };
3737
3754
  const getTagInfo = (tagData, tagsConfig)=>{
3738
- const categoryConfig = tagsConfig.tagCategories.find((category)=>category.name === tagData.category);
3755
+ if (tagData.category === undefined) {
3756
+ return {
3757
+ color: 'darkgray',
3758
+ display: tagsConfig?.showUnknownTags ?? false,
3759
+ label: tagData.name
3760
+ };
3761
+ }
3762
+ const categoryConfig = tagsConfig?.tagCategories.find((category)=>category.name === tagData.category);
3739
3763
  if (categoryConfig === undefined) return {
3740
3764
  color: 'gray',
3741
3765
  display: tagsConfig?.showUnknownTags ?? false,
@@ -3752,6 +3776,29 @@ const getManualSortingAndPagination = (config)=>{
3752
3776
  const sortingAndPagination = config?.features?.dataLoader?.sortingAndPagination ?? defaultFeature;
3753
3777
  return sortingAndPagination === 'server';
3754
3778
  };
3779
+ /**
3780
+ * Converts a numeric value to its equivalent AccessLevel enum value
3781
+ * @param value - The numeric value to convert (1-6)
3782
+ * @returns The corresponding AccessLevel enum value or undefined if not found
3783
+ */ const getAccessLevelFromNumber = (value)=>{
3784
+ if (value === undefined) return undefined;
3785
+ switch(value){
3786
+ case AccessLevel.ACCESSIBLE:
3787
+ return AccessLevel.ACCESSIBLE;
3788
+ case AccessLevel.UNACCESSIBLE:
3789
+ return AccessLevel.UNACCESSIBLE;
3790
+ case AccessLevel.WAITING:
3791
+ return AccessLevel.WAITING;
3792
+ case AccessLevel.NOT_AVAILABLE:
3793
+ return AccessLevel.NOT_AVAILABLE;
3794
+ case AccessLevel.OTHER:
3795
+ return AccessLevel.OTHER;
3796
+ case AccessLevel.MIXED:
3797
+ return AccessLevel.MIXED;
3798
+ default:
3799
+ return undefined;
3800
+ }
3801
+ };
3755
3802
 
3756
3803
  const defaultCellRenderer = (value, params)=>{
3757
3804
  if (value === undefined || value === null || toString(value) === '') {
@@ -3762,11 +3809,8 @@ const defaultCellRenderer = (value, params)=>{
3762
3809
  ]
3763
3810
  });
3764
3811
  }
3765
- return /*#__PURE__*/ jsxs(Text, {
3766
- children: [
3767
- toString(value),
3768
- "dfdsfdsf"
3769
- ]
3812
+ return /*#__PURE__*/ jsx(Text, {
3813
+ children: toString(value)
3770
3814
  });
3771
3815
  };
3772
3816
  class DiscoveryCellRendererFactory {
@@ -3911,45 +3955,94 @@ const DiscoveryProvider = ({ children, discoveryIndexConfig })=>{
3911
3955
  });
3912
3956
  };
3913
3957
 
3914
- const isSearchKV = (obj)=>{
3915
- return obj && obj.key && obj.value;
3916
- };
3917
- const isSearchKVArray = (obj)=>{
3918
- return obj && Array.isArray(obj) && obj.every(isSearchKV);
3958
+ const buildTooltip = (mainMessage, secondaryMessage)=>{
3959
+ return /*#__PURE__*/ jsxs("div", {
3960
+ className: "flex flex-col",
3961
+ children: [
3962
+ /*#__PURE__*/ jsxs(Text, {
3963
+ size: "sm",
3964
+ children: [
3965
+ " ",
3966
+ mainMessage,
3967
+ " "
3968
+ ]
3969
+ }),
3970
+ secondaryMessage ? /*#__PURE__*/ jsxs("div", {
3971
+ className: "flex flex-col items-start my-1",
3972
+ children: [
3973
+ /*#__PURE__*/ jsx(Divider, {}),
3974
+ /*#__PURE__*/ jsx(Text, {
3975
+ size: "xs",
3976
+ children: secondaryMessage
3977
+ })
3978
+ ]
3979
+ }) : null
3980
+ ]
3981
+ });
3919
3982
  };
3920
- const accessibleFieldName = '__accessible';
3921
- var AccessLevel = /*#__PURE__*/ function(AccessLevel) {
3922
- AccessLevel[AccessLevel["ACCESSIBLE"] = 1] = "ACCESSIBLE";
3923
- AccessLevel[AccessLevel["UNACCESSIBLE"] = 2] = "UNACCESSIBLE";
3924
- AccessLevel[AccessLevel["PENDING"] = 3] = "PENDING";
3925
- AccessLevel[AccessLevel["NOT_AVAILABLE"] = 4] = "NOT_AVAILABLE";
3926
- AccessLevel[AccessLevel["OTHER"] = 5] = "OTHER";
3927
- return AccessLevel;
3928
- }({});
3929
-
3930
- const DataAccessCellRenderer = ({ value })=>{
3931
- if (value === AccessLevel.PENDING) {
3932
- return /*#__PURE__*/ jsx(LuClock, {
3933
- color: "yellow",
3934
- children: "Your access to this study is pending."
3983
+ const DataAccessCellRenderer = ({ cell, row }, params)=>{
3984
+ const authzField = params?.authzField || 'authz';
3985
+ let value = cell?.getValue();
3986
+ const authorization = row?.original?.[authzField] || undefined;
3987
+ if (isArray(value)) value = value[0];
3988
+ const accessLevel = getAccessLevelFromNumber(value);
3989
+ if (!accessLevel) {
3990
+ return /*#__PURE__*/ jsx(Tooltip, {
3991
+ label: buildTooltip('Unable to determine access level'),
3992
+ children: /*#__PURE__*/ jsx(LuCircleSlash, {
3993
+ className: "text-utility-error"
3994
+ })
3935
3995
  });
3936
3996
  }
3937
- if (value === AccessLevel.NOT_AVAILABLE) {
3938
- return /*#__PURE__*/ jsx(LuCircleSlash, {
3939
- color: "red",
3940
- children: "Cannot determine access to this study. Please contact the study owner."
3997
+ if (accessLevel === AccessLevel.WAITING) {
3998
+ return /*#__PURE__*/ jsx(Tooltip, {
3999
+ label: buildTooltip('Data are not yet available'),
4000
+ children: /*#__PURE__*/ jsx(LuClock, {
4001
+ className: "text-utility-warning"
4002
+ })
3941
4003
  });
3942
4004
  }
3943
- if (value === AccessLevel.ACCESSIBLE) {
3944
- return /*#__PURE__*/ jsx(LuUnlock, {
3945
- color: "green",
3946
- children: "You have access to this study."
4005
+ if (accessLevel === AccessLevel.MIXED) {
4006
+ return /*#__PURE__*/ jsx(Tooltip, {
4007
+ label: buildTooltip('You have mixed acccess'),
4008
+ children: /*#__PURE__*/ jsxs(Group, {
4009
+ children: [
4010
+ /*#__PURE__*/ jsx(LuLock, {
4011
+ className: "text-utility-warning"
4012
+ }),
4013
+ /*#__PURE__*/ jsx(LuUnlock, {
4014
+ className: "text-utility-warning"
4015
+ })
4016
+ ]
4017
+ })
3947
4018
  });
3948
4019
  }
3949
- if (value === AccessLevel.UNACCESSIBLE) {
3950
- return /*#__PURE__*/ jsx(LuLock, {
3951
- color: "red",
3952
- children: "You do not have access to this study."
4020
+ if (accessLevel === AccessLevel.NOT_AVAILABLE) {
4021
+ return /*#__PURE__*/ jsx(Tooltip, {
4022
+ label: buildTooltip('No data is shared'),
4023
+ children: /*#__PURE__*/ jsx(LuCircleSlash, {
4024
+ className: "text-utility-error"
4025
+ })
4026
+ });
4027
+ }
4028
+ if (accessLevel === AccessLevel.ACCESSIBLE) {
4029
+ return /*#__PURE__*/ jsx(Tooltip, {
4030
+ label: buildTooltip('You have access to this study', `read access to ${authorization}`),
4031
+ children: /*#__PURE__*/ jsx("div", {
4032
+ children: /*#__PURE__*/ jsx(LuUnlock, {
4033
+ className: "text-utility-success"
4034
+ })
4035
+ })
4036
+ });
4037
+ }
4038
+ if (accessLevel === AccessLevel.UNACCESSIBLE) {
4039
+ return /*#__PURE__*/ jsx(Tooltip, {
4040
+ label: buildTooltip('You currently do not have access to this study', `you need read access to ${authorization}`),
4041
+ children: /*#__PURE__*/ jsx("div", {
4042
+ children: /*#__PURE__*/ jsx(LuLock, {
4043
+ className: "text-utility-error"
4044
+ })
4045
+ })
3953
4046
  });
3954
4047
  }
3955
4048
  return /*#__PURE__*/ jsx(React__default.Fragment, {});
@@ -4127,13 +4220,10 @@ const RenderLinkWithURL = ({ value, cell }, params)=>{
4127
4220
  onClick: (ev)=>ev.stopPropagation(),
4128
4221
  target: "_blank",
4129
4222
  rel: "noreferrer",
4130
- children: /*#__PURE__*/ jsxs(Text, {
4223
+ children: /*#__PURE__*/ jsx(Text, {
4131
4224
  c: "utility.0",
4132
4225
  tt: ttValue,
4133
- children: [
4134
- content,
4135
- " fgh"
4136
- ]
4226
+ children: content
4137
4227
  })
4138
4228
  });
4139
4229
  };
@@ -4807,14 +4897,20 @@ const DownloadLinksPanel = ({ studyData, downloadLinks, downloadLinkFields = {
4807
4897
  }
4808
4898
  const id = entry[downloadLinkFields.idField];
4809
4899
  return /*#__PURE__*/ jsxs(Group, {
4900
+ justify: "space-between",
4810
4901
  gap: "md",
4811
4902
  children: [
4812
4903
  /*#__PURE__*/ jsx(Text, {
4813
4904
  children: entry['titleField'] || ''
4814
4905
  }),
4815
4906
  /*#__PURE__*/ jsx(Button, {
4907
+ component: "a",
4908
+ href: `${GEN3_FENCE_API}/data/${id}?expires_in=900&redirect`,
4909
+ target: "_blank",
4910
+ rel: "noreferrer",
4911
+ type: "text",
4816
4912
  leftSection: /*#__PURE__*/ jsx(FiDownload, {}),
4817
- disabled: !id,
4913
+ "data-disabled": !id,
4818
4914
  children: "Download File"
4819
4915
  })
4820
4916
  ]
@@ -4993,14 +5089,16 @@ const TableIcons = {
4993
5089
  })
4994
5090
  };
4995
5091
 
4996
- const extractCellValue = (func)=>({ cell })=>func({
5092
+ const extractCellValue = (func)=>({ cell, row })=>func({
4997
5093
  value: cell.getValue(),
4998
- cell
5094
+ cell,
5095
+ row
4999
5096
  });
5000
- const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPagination, pagination, sorting })=>{
5097
+ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPagination, setSelection, pagination, sorting })=>{
5001
5098
  const { discoveryConfig: config, setStudyDetails } = useDiscoveryContext();
5002
5099
  const { isLoading, isError, isFetching } = dataRequestStatus;
5003
5100
  const manualSortingAndPagination = getManualSortingAndPagination(config);
5101
+ const [rowSelection, setRowSelection] = useState({}); //ts type available
5004
5102
  const cols = useDeepCompareMemo(()=>{
5005
5103
  const studyColumns = config.studyColumns ?? [];
5006
5104
  return studyColumns.map((columnDef, idx)=>{
@@ -5040,6 +5138,7 @@ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPaginati
5040
5138
  enableColumnActions: false,
5041
5139
  enableStickyHeader: true,
5042
5140
  enableStickyFooter: true,
5141
+ getRowId: (originalRow)=>config?.minimalFieldMapping?.uid && config.minimalFieldMapping.uid in originalRow ? originalRow[config.minimalFieldMapping.uid] : originalRow?.id ?? undefined,
5043
5142
  // TODO: keep this to explore later
5044
5143
  // mantineTableContainerProps: ({ table }) => {
5045
5144
  // return {
@@ -5049,7 +5148,9 @@ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPaginati
5049
5148
  // };
5050
5149
  // },
5051
5150
  renderDetailPanel: config.studyPreviewField ? DiscoveryTableRowRenderer(config.studyPreviewField) : undefined,
5151
+ onRowSelectionChange: setRowSelection,
5052
5152
  state: {
5153
+ rowSelection,
5053
5154
  isLoading,
5054
5155
  ...manualSortingAndPagination ? {
5055
5156
  pagination,
@@ -5096,6 +5197,13 @@ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPaginati
5096
5197
  }
5097
5198
  }
5098
5199
  });
5200
+ useDeepCompareEffect(()=>{
5201
+ //fetch data based on row selection state or something
5202
+ setSelection(rowSelection ? Object.keys(rowSelection) : []);
5203
+ }, [
5204
+ rowSelection,
5205
+ setSelection
5206
+ ]);
5099
5207
  return /*#__PURE__*/ jsxs(React__default.Fragment, {
5100
5208
  children: [
5101
5209
  /*#__PURE__*/ jsx(StudyDetails, {}),
@@ -5391,10 +5499,10 @@ const AdvancedSearchPanel = (props)=>{
5391
5499
  });
5392
5500
  };
5393
5501
 
5394
- const DataLibraryActionButton = /*#__PURE__*/ forwardRef(({ label = undefined, icon = undefined, disabled = false, toolTip = undefined, onClick = ()=>null, active = false, showIcon = true, loginRequired = false, ...buttonProps }, ref)=>{
5502
+ const DataLibraryActionButton = /*#__PURE__*/ forwardRef(({ label = undefined, icon = undefined, disabled = false, tooltip = undefined, onClick = ()=>null, active = false, showIcon = true, loginRequired = false, ...buttonProps }, ref)=>{
5395
5503
  // TODO Test what idp was used to login and restrict actions to that idp or all or none
5396
5504
  const requiresLogin = !useIsUserLoggedIn() && loginRequired;
5397
- const buttonUcon = active ? /*#__PURE__*/ jsx(Loader, {
5505
+ const buttonIcon = active ? /*#__PURE__*/ jsx(Loader, {
5398
5506
  size: "sm",
5399
5507
  className: "p-1"
5400
5508
  }) : /*#__PURE__*/ jsx(FiDownload, {
@@ -5402,13 +5510,13 @@ const DataLibraryActionButton = /*#__PURE__*/ forwardRef(({ label = undefined, i
5402
5510
  size: 16
5403
5511
  });
5404
5512
  return /*#__PURE__*/ jsx(Tooltip, {
5405
- disabled: !toolTip,
5406
- label: toolTip,
5513
+ disabled: !tooltip,
5514
+ label: tooltip,
5407
5515
  children: /*#__PURE__*/ jsx(Button, {
5408
5516
  ref: ref,
5409
5517
  onClick: onClick,
5410
5518
  disabled: disabled || requiresLogin,
5411
- leftSection: showIcon ? buttonUcon : undefined,
5519
+ leftSection: showIcon ? buttonIcon : undefined,
5412
5520
  ...buttonProps,
5413
5521
  children: label
5414
5522
  })
@@ -5416,21 +5524,297 @@ const DataLibraryActionButton = /*#__PURE__*/ forwardRef(({ label = undefined, i
5416
5524
  });
5417
5525
  DataLibraryActionButton.displayName = 'DataLibraryActionButton';
5418
5526
 
5419
- const ActionBar = ({ config })=>{
5420
- const { buttons } = config;
5527
+ const MANIFEST_FILENAME = 'manifest.json';
5528
+ /**
5529
+ * Determines the disabled state and the reason for disabling based on authentication status,
5530
+ * selection count, and requirement for login.
5531
+ *
5532
+ * @param {boolean} isAuthenticated - Indicates whether the user is authenticated.
5533
+ * @param {number} numSelected - The number of items selected for the operation.
5534
+ * @param {boolean} requiresLogin - Specifies whether login is required to perform the operation.
5535
+ * @returns {Object} An object containing the following properties:
5536
+ * - {boolean} disabled - True if the action should be disabled, false otherwise.
5537
+ * - {string} [disabledReason] - The reason why the action is disabled (if applicable).
5538
+ */ const getDisabledState = (isAuthenticated, numSelected, requiresLogin)=>{
5539
+ const LOGIN_REQUIRED_MSG = 'You must be logged in to download a manifest';
5540
+ const NO_SELECTION_MSG = 'You must select at least one study to download a manifest';
5541
+ if (requiresLogin && !isAuthenticated) {
5542
+ return {
5543
+ disabled: true,
5544
+ disabledReason: LOGIN_REQUIRED_MSG
5545
+ };
5546
+ }
5547
+ if (numSelected === 0) {
5548
+ return {
5549
+ disabled: true,
5550
+ disabledReason: NO_SELECTION_MSG
5551
+ };
5552
+ }
5553
+ return {
5554
+ disabled: false
5555
+ }; // Default enabled state.
5556
+ };
5557
+ const handleDownloadManifestClick = ({ exportDataFields, selectedResources })=>{
5558
+ const { dataObjectField } = exportDataFields;
5559
+ if (dataObjectField === undefined) {
5560
+ notifications.show({
5561
+ title: 'Error notification',
5562
+ message: 'Missing required configuration field `config.features.export.manifestFieldName'
5563
+ });
5564
+ return;
5565
+ }
5566
+ // combine manifests from all selected studies
5567
+ const manifest = [];
5568
+ selectedResources.forEach((study)=>{
5569
+ if (study[dataObjectField]) {
5570
+ const studyDataObject = study[dataObjectField];
5571
+ if ('commons_url' in study && !GEN3_DOMAIN?.includes(study.commons_url)) {
5572
+ // PlanX addition to allow hostname based DRS in manifest download clients
5573
+ // like FUSE
5574
+ manifest.push(...studyDataObject.map((x)=>({
5575
+ ...x,
5576
+ commons_url: 'commons_url' in x ? x.commons_url : study.commons_url
5577
+ })));
5578
+ } else {
5579
+ manifest.push(...studyDataObject);
5580
+ }
5581
+ }
5582
+ });
5583
+ // download the manifest
5584
+ if (manifest.length === 0) {
5585
+ notifications.show({
5586
+ title: 'Export warning',
5587
+ message: 'None of the selected studies have any data objects. Please select a different study or select a different data object field.'
5588
+ });
5589
+ return;
5590
+ }
5591
+ const blob = new Blob([
5592
+ JSON.stringify(manifest, null, 2)
5593
+ ], {
5594
+ type: 'text/json'
5595
+ });
5596
+ FileSaver.saveAs(blob, MANIFEST_FILENAME);
5597
+ };
5598
+ const DownloadManifestButton = ({ buttonConfig, selectedResources, exportDataFields })=>{
5599
+ const { isAuthenticated } = useIsAuthenticated();
5600
+ const { disabled, disabledReason } = getDisabledState(isAuthenticated, selectedResources.length, buttonConfig?.requiresLogin ?? false);
5601
+ return /*#__PURE__*/ jsx(DataLibraryActionButton, {
5602
+ "data-testid": "download-manifest-button",
5603
+ label: buttonConfig?.label ?? 'Download Manifest',
5604
+ icon: /*#__PURE__*/ jsx(FiDownload, {}),
5605
+ disabled: disabled,
5606
+ tooltip: disabledReason ?? buttonConfig?.tooltip ?? 'Download Manifest of selected studies',
5607
+ onClick: ()=>{
5608
+ handleDownloadManifestClick({
5609
+ selectedResources: selectedResources,
5610
+ exportDataFields: exportDataFields
5611
+ });
5612
+ }
5613
+ });
5614
+ };
5615
+
5616
+ const extractIdToLabel = (data)=>!data ? {} : Object.keys(data).reduce((acc, id)=>{
5617
+ acc[id] = data[id].name;
5618
+ return acc;
5619
+ }, {});
5620
+ const createTooltipLabel = (error, isLoggedIn, requiresLogin, numSelected, currentListName)=>{
5621
+ if (error) return 'Error saving to data library. Please try again later';
5622
+ if (!isLoggedIn && requiresLogin) return 'Please log in to save to data library';
5623
+ if (numSelected === 0) return 'Please select at least one study to save to data library';
5624
+ if (!currentListName) return 'Please select or create a list';
5625
+ return 'Add selections to list';
5626
+ };
5627
+ const AddToDataLibrary = ({ buttonConfig, selectedResources, exportDataFields, classNames = {} })=>{
5628
+ const [selectItems, setSelectItems] = useState({});
5629
+ const [currentList, setCurrentList] = useState(null);
5630
+ const [error, setError] = useState(null);
5631
+ const [currentListName, setCurrentListName] = useState('');
5632
+ const combobox = useCombobox({
5633
+ onDropdownClose: ()=>combobox.resetSelectedOption()
5634
+ });
5635
+ const userStatus = useCoreSelector((state)=>selectUserAuthStatus(state));
5636
+ const isLoggedIn = isAuthenticated(userStatus);
5637
+ const isDisabled = error !== null || selectedResources.length === 0 || !currentListName || buttonConfig?.requiresLogin && !isLoggedIn;
5638
+ const tooltipLabel = createTooltipLabel(error, isLoggedIn, buttonConfig.requiresLogin, selectedResources.length, currentListName);
5639
+ const classNamesDefaults = {
5640
+ root: 'w-1/2'
5641
+ };
5642
+ const mergedClassnames = mergeDefaultTailwindClassnames(classNamesDefaults, classNames);
5643
+ const { dataLibrary, updateListInDataLibrary, addListToDataLibrary, isLoading, error: dataLibraryError } = useDataLibrary();
5644
+ const saveToList = (listname, listId = undefined)=>{
5645
+ if (selectedResources.length === 0) return;
5646
+ const items = buildListItemsGroupedByDataset(extractFileDatasetsInRecords(selectedResources, exportDataFields));
5647
+ if (listId) {
5648
+ if (Object.keys(items).length === 0) {
5649
+ notifications.show({
5650
+ id: 'update-datalibrary-no-items-to-update-notification',
5651
+ position: 'top-center',
5652
+ withCloseButton: true,
5653
+ autoClose: 5000,
5654
+ title: 'Save to list',
5655
+ message: `No data objects selected to save to list ${listname}.`,
5656
+ loading: false
5657
+ });
5658
+ return;
5659
+ }
5660
+ updateListInDataLibrary({
5661
+ id: listId,
5662
+ name: listname,
5663
+ items: {
5664
+ ...dataLibrary[listId].items,
5665
+ ...items
5666
+ }
5667
+ });
5668
+ notifications.show({
5669
+ id: 'update-datalibrary-list-notification',
5670
+ position: 'top-center',
5671
+ withCloseButton: true,
5672
+ autoClose: 5000,
5673
+ title: 'Save to list',
5674
+ message: `${Object.values(items)} saved to list ${listname} successfully.`,
5675
+ loading: isLoading
5676
+ });
5677
+ } else {
5678
+ addListToDataLibrary(items, listname);
5679
+ notifications.show({
5680
+ id: 'update-datalibrary-list-notification',
5681
+ position: 'top-center',
5682
+ withCloseButton: true,
5683
+ autoClose: 5000,
5684
+ title: 'Save to list',
5685
+ message: `${Object.values(items)} saved to list ${listname} successfully.`,
5686
+ loading: isLoading
5687
+ });
5688
+ }
5689
+ };
5690
+ const exactOptionMatch = Object.values(selectItems).some((listName)=>listName === currentListName);
5691
+ const filteredOptions = exactOptionMatch ? selectItems : Object.entries(selectItems).reduce((acc, [listId, listName])=>{
5692
+ if (listName.toLowerCase().includes(currentListName.toLowerCase().trim())) {
5693
+ acc[listId] = listName;
5694
+ }
5695
+ return acc;
5696
+ }, {});
5697
+ const options = useMemo(()=>Object.entries(filteredOptions).map(([listId, listName])=>/*#__PURE__*/ jsx(Combobox.Option, {
5698
+ value: listId,
5699
+ children: listName
5700
+ }, listId)), [
5701
+ filteredOptions
5702
+ ]);
5703
+ useEffect(()=>{
5704
+ if (options.length === 0) setCurrentList(null);
5705
+ }, [
5706
+ options
5707
+ ]);
5708
+ useDeepCompareEffect(()=>{
5709
+ if (dataLibrary && !dataLibraryError) {
5710
+ const listItems = extractIdToLabel(dataLibrary);
5711
+ setSelectItems(listItems);
5712
+ }
5713
+ setError(dataLibraryError);
5714
+ if (dataLibraryError) {
5715
+ notifications.show({
5716
+ id: 'update-datalibrary-error-notification',
5717
+ position: 'top-center',
5718
+ withCloseButton: true,
5719
+ autoClose: 5000,
5720
+ title: 'Error',
5721
+ message: `Error saving to data library. Please try again later.`,
5722
+ loading: false
5723
+ });
5724
+ }
5725
+ }, [
5726
+ dataLibrary,
5727
+ dataLibraryError
5728
+ ]);
5729
+ return /*#__PURE__*/ jsxs(Group, {
5730
+ "data-testid": "add-to-data-library",
5731
+ wrap: "nowrap",
5732
+ classNames: {
5733
+ root: mergedClassnames.root
5734
+ },
5735
+ children: [
5736
+ /*#__PURE__*/ jsxs(Combobox, {
5737
+ onOptionSubmit: (selectedValue)=>{
5738
+ setCurrentList(selectedValue);
5739
+ setCurrentListName(selectItems[selectedValue]);
5740
+ combobox.closeDropdown();
5741
+ },
5742
+ store: combobox,
5743
+ withinPortal: false,
5744
+ children: [
5745
+ /*#__PURE__*/ jsx(Combobox.Target, {
5746
+ children: /*#__PURE__*/ jsx(TextInput, {
5747
+ placeholder: "Select/Search/Create List",
5748
+ value: currentListName ?? '',
5749
+ className: 'w-full',
5750
+ onChange: (event)=>{
5751
+ setCurrentListName(event.currentTarget.value);
5752
+ combobox.openDropdown();
5753
+ combobox.updateSelectedOptionIndex();
5754
+ },
5755
+ onClick: ()=>combobox.openDropdown(),
5756
+ onFocus: ()=>combobox.openDropdown(),
5757
+ onBlur: ()=>combobox.closeDropdown()
5758
+ })
5759
+ }),
5760
+ /*#__PURE__*/ jsx(Combobox.Dropdown, {
5761
+ children: /*#__PURE__*/ jsx(Combobox.Options, {
5762
+ children: /*#__PURE__*/ jsx(ScrollArea.Autosize, {
5763
+ mah: 200,
5764
+ type: "scroll",
5765
+ children: options.length === 0 ? /*#__PURE__*/ jsx(Combobox.Empty, {
5766
+ children: "Click button to create new list"
5767
+ }) : options
5768
+ })
5769
+ })
5770
+ })
5771
+ ]
5772
+ }),
5773
+ /*#__PURE__*/ jsx(Tooltip, {
5774
+ label: tooltipLabel,
5775
+ children: /*#__PURE__*/ jsx(Button, {
5776
+ classNames: {
5777
+ root: 'w-1/3'
5778
+ },
5779
+ loading: isLoading,
5780
+ disabled: isDisabled,
5781
+ onClick: ()=>{
5782
+ if (currentList) {
5783
+ saveToList(selectItems[currentList], currentList);
5784
+ } else {
5785
+ saveToList(currentListName, undefined);
5786
+ }
5787
+ },
5788
+ children: options.length === 0 && currentListName.length > 0 ? 'Save to New List' : buttonConfig?.label ?? 'Save to List'
5789
+ })
5790
+ })
5791
+ ]
5792
+ });
5793
+ };
5794
+
5795
+ const createActionButton = ({ buttonConfig, selectedResources, exportDataFields })=>{
5796
+ return ({
5797
+ manifest: /*#__PURE__*/ jsx(DownloadManifestButton, {
5798
+ buttonConfig: buttonConfig,
5799
+ selectedResources: selectedResources,
5800
+ exportDataFields: exportDataFields
5801
+ }, buttonConfig.type),
5802
+ addToDataLibrary: /*#__PURE__*/ jsx(AddToDataLibrary, {
5803
+ buttonConfig: buttonConfig,
5804
+ selectedResources: selectedResources,
5805
+ exportDataFields: exportDataFields
5806
+ }, buttonConfig.type)
5807
+ })[buttonConfig.type];
5808
+ };
5809
+ const ActionBar = ({ buttons, selectedResources, exportDataFields, verifyExternalLogins })=>{
5421
5810
  return /*#__PURE__*/ jsx("div", {
5422
5811
  className: "flex items-center justify-end py-1 px-2 mb-1 w-full gap-x-1.5 ",
5423
- children: buttons?.map((button, index)=>{
5424
- return /*#__PURE__*/ jsx(DataLibraryActionButton, {
5425
- label: button.label,
5426
- icon: /*#__PURE__*/ jsx(FiDownload, {}),
5427
- toolTip: button.tooltip,
5428
- loginRequired: config?.loginRequireForAllButtons ?? true,
5429
- onClick: ()=>{
5430
- console.log('Download $[button.label]');
5431
- }
5432
- }, `action-button-${index}`);
5433
- // }
5812
+ children: buttons?.map((button)=>{
5813
+ return createActionButton({
5814
+ buttonConfig: button,
5815
+ selectedResources,
5816
+ exportDataFields
5817
+ });
5434
5818
  })
5435
5819
  });
5436
5820
  };
@@ -5684,26 +6068,41 @@ const userHasMethodForServiceOnResource = (method, service, resourcePath, userAu
5684
6068
  return actions !== undefined && actions.some((x)=>(x.service === service || x.service === '*') && (x.method === method || x.method === '*'));
5685
6069
  };
5686
6070
 
6071
+ const METADATA_ITEM_AUTHORIZATION_FIELD = '__accessible';
6072
+
5687
6073
  /**
5688
- * Check for non-numeric items in an array and convert them to numbers.
5689
- * Handles strings, numbers, and nested arrays.
5690
- * It will silently convert any non-numeric items to 0 so as not to break the sum.
5691
- * @param fields - array of fields to check
5692
- */ const checkForNonNumericItems = (fields)=>fields.map((item)=>{
5693
- if (typeof item === 'number') {
5694
- return item;
5695
- }
5696
- // parse any string representation of an integer
5697
- if (typeof item === 'string') {
5698
- return parseInt(item, 10) || 0;
5699
- }
5700
- // if it's an array, recurse and sum the result
5701
- if (Array.isArray(item)) {
5702
- return sum(checkForNonNumericItems(item));
5703
- }
5704
- // if it's not a number, return 0 so as not to break the sum
5705
- return 0;
5706
- });
6074
+ * Parses a single value into a number
6075
+ * @param item - Value to convert
6076
+ * @returns Numeric representation of the value
6077
+ */ const parseNumericValue = (item)=>{
6078
+ const DEFAULT_VALUE = 0;
6079
+ // Handle undefined values
6080
+ if (item === undefined) {
6081
+ return DEFAULT_VALUE;
6082
+ }
6083
+ // Numbers can be used directly
6084
+ if (typeof item === 'number' && !Number.isNaN(item)) {
6085
+ return item;
6086
+ }
6087
+ // Parse string representations of numbers
6088
+ if (typeof item === 'string') {
6089
+ const parsedValue = parseInt(item, 10);
6090
+ return Number.isNaN(parsedValue) ? DEFAULT_VALUE : parsedValue;
6091
+ }
6092
+ // Recursively handle arrays by summing their numeric values
6093
+ if (Array.isArray(item)) {
6094
+ return convertToNumbers(item).reduce((acc, val)=>acc + val, 0);
6095
+ }
6096
+ // Return default for any other types
6097
+ return DEFAULT_VALUE;
6098
+ };
6099
+ /**
6100
+ * Converts various types of values to numbers
6101
+ * @param fields - Array of values to convert
6102
+ * @returns Array of numbers, with non-numeric values converted to 0
6103
+ */ const convertToNumbers = (fields)=>{
6104
+ return fields.map(parseNumericValue);
6105
+ };
5707
6106
  /**
5708
6107
  * Process a summary statistic using the provided data and summary config
5709
6108
  * @param {JSONObject }data
@@ -5720,7 +6119,7 @@ const userHasMethodForServiceOnResource = (method, service, resourcePath, userAu
5720
6119
  case 'sum':
5721
6120
  {
5722
6121
  // parse any string representation of an integer
5723
- fields = checkForNonNumericItems(fields);
6122
+ fields = convertToNumbers(fields);
5724
6123
  return sum(fields).toLocaleString();
5725
6124
  }
5726
6125
  case 'count':
@@ -5746,21 +6145,45 @@ const processAllSummaries = (data, summaries)=>{
5746
6145
  ];
5747
6146
  }, []);
5748
6147
  };
5749
- const processAuthorizations = (data, config, authMapping)=>{
6148
+ const processAuthorizations = (data, config, userAuthMapping)=>{
6149
+ const { enabled } = config.features.authorization;
6150
+ if (!enabled) {
6151
+ return data;
6152
+ }
6153
+ if (!userAuthMapping) {
6154
+ throw new Error('Arborist must be enabled for the Discovery page to work if authorization is enabled in the Discovery page. Set `useArboristUI: true` in the portal config.');
6155
+ }
6156
+ const hostnameWithSubdomain = window.location.hostname; // TODO: replace this with useRouter
6157
+ // mark studies as accessible or inaccessible to user
5750
6158
  const { authzField, dataAvailabilityField } = config.minimalFieldMapping;
5751
- const { supportedValues } = config.features.authorization;
5752
- return data.map((study)=>{
5753
- if (typeof study[authzField] !== 'string') return study;
5754
- const studyAuthz = study[authzField];
5755
- let accessible;
5756
- if (supportedValues?.pending?.enabled && dataAvailabilityField && study[dataAvailabilityField] === 'pending') {
5757
- accessible = AccessLevel.PENDING;
5758
- } else if (supportedValues?.notAvailable?.enabled && !study[authzField]) {
6159
+ const { supportedValues, isMesh } = config.features.authorization;
6160
+ const studiesWithAccessibleField = data.map((study)=>{
6161
+ let accessible = AccessLevel.NOT_AVAILABLE;
6162
+ if (supportedValues?.unaccessible?.enabled && dataAvailabilityField && study[dataAvailabilityField] === 'unaccessible') {
6163
+ accessible = AccessLevel.UNACCESSIBLE;
6164
+ } else if (supportedValues?.notAvailable?.enabled && dataAvailabilityField && study[dataAvailabilityField] === 'not_available') {
5759
6165
  accessible = AccessLevel.NOT_AVAILABLE;
6166
+ } else if (supportedValues?.waiting?.enabled && !study[authzField]) {
6167
+ accessible = AccessLevel.WAITING;
5760
6168
  } else {
5761
- const isAuthorized = userHasMethodForServiceOnResource('read', '*', studyAuthz, authMapping) || userHasMethodForServiceOnResource('read', 'peregrine', studyAuthz, authMapping) || userHasMethodForServiceOnResource('read', 'guppy', studyAuthz, authMapping) || userHasMethodForServiceOnResource('read-storage', 'fence', studyAuthz, authMapping);
6169
+ let authMapping = {};
6170
+ if (isMesh) {
6171
+ let commonsURL = study.commons_url; // TODO: configure this value
6172
+ if (commonsURL && commonsURL.startsWith('http')) {
6173
+ commonsURL = new URL(commonsURL).hostname;
6174
+ }
6175
+ authMapping = userAuthMapping[commonsURL || hostnameWithSubdomain] || {};
6176
+ } else {
6177
+ authMapping = Object.values(userAuthMapping)[0];
6178
+ }
6179
+ // TODO: This needs to be configurable GFF-294
6180
+ const isAuthorized = userHasMethodForServiceOnResource('read', '*', study[authzField], authMapping) || userHasMethodForServiceOnResource('read', 'peregrine', study[authzField], authMapping) || userHasMethodForServiceOnResource('read', 'guppy', study[authzField], authMapping) || userHasMethodForServiceOnResource('read-storage', 'fence', study[authzField], authMapping);
5762
6181
  if (supportedValues?.accessible?.enabled && isAuthorized) {
5763
- accessible = AccessLevel.ACCESSIBLE;
6182
+ if (supportedValues?.mixed?.enabled && dataAvailabilityField && study[dataAvailabilityField] === 'mixed_availability') {
6183
+ accessible = AccessLevel.MIXED;
6184
+ } else {
6185
+ accessible = AccessLevel.ACCESSIBLE;
6186
+ }
5764
6187
  } else if (supportedValues?.unaccessible?.enabled && !isAuthorized) {
5765
6188
  accessible = AccessLevel.UNACCESSIBLE;
5766
6189
  } else {
@@ -5769,9 +6192,10 @@ const processAuthorizations = (data, config, authMapping)=>{
5769
6192
  }
5770
6193
  return {
5771
6194
  ...study,
5772
- __accessible: accessible
6195
+ [METADATA_ITEM_AUTHORIZATION_FIELD]: accessible
5773
6196
  };
5774
6197
  });
6198
+ return studiesWithAccessibleField;
5775
6199
  };
5776
6200
  const processChartData = (data, pathsToProcess)=>{
5777
6201
  // Initialize results object
@@ -5878,7 +6302,9 @@ const useGetMDSData = ({ guidType = 'unregistered_discovery_metadata', maxStudie
5878
6302
  ] : acc;
5879
6303
  }, []);
5880
6304
  if (discoveryConfig?.features?.authorization.enabled) {
5881
- setMDSData(processAuthorizations(studyData, discoveryConfig, authMapping));
6305
+ setMDSData(processAuthorizations(studyData, discoveryConfig, {
6306
+ default: authMapping
6307
+ }));
5882
6308
  } else setMDSData(studyData);
5883
6309
  }
5884
6310
  }, [
@@ -5917,7 +6343,9 @@ const useGetAggMDSData = ({ guidType = 'unregistered_discovery_metadata', maxStu
5917
6343
  useEffect(()=>{
5918
6344
  if (data && isSuccess) {
5919
6345
  if (discoveryConfig?.features?.authorization.enabled) {
5920
- setMDSData(processAuthorizations(data.data, discoveryConfig, authMapping));
6346
+ setMDSData(processAuthorizations(data.data, discoveryConfig, {
6347
+ default: authMapping
6348
+ }));
5921
6349
  } else setMDSData(data.data);
5922
6350
  }
5923
6351
  }, [
@@ -6698,7 +7126,9 @@ const useGetIndexedMDSData = ({ guidType = 'unregistered_discovery_metadata', ma
6698
7126
  if (data && isSuccess) {
6699
7127
  const studyData = data.data;
6700
7128
  if (discoveryConfig?.features?.authorization.enabled) {
6701
- setMDSData(processAuthorizations(studyData, discoveryConfig, authMapping));
7129
+ setMDSData(processAuthorizations(studyData, discoveryConfig, {
7130
+ default: authMapping
7131
+ }));
6702
7132
  } else setMDSData(studyData);
6703
7133
  } else setMDSData([]);
6704
7134
  }, [
@@ -6760,7 +7190,20 @@ const registerDefaultDiscoveryDataLoaders = ()=>{
6760
7190
  };
6761
7191
  registerDefaultDiscoveryDataLoaders();
6762
7192
 
6763
- const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
7193
+ /**
7194
+ * DiscoveryIndexPanel is a React functional component that renders a discovery panel interface.
7195
+ * It includes features such as search, sorting, filtering, charts, export functionality, and a discovery table.
7196
+ * The component uses hooks for handling state, API data loading, and interface interactions.
7197
+ *
7198
+ * @param {Object} props - The properties object passed to the component.
7199
+ * @param {Object} props.discoveryConfig - Configuration object for setting up the discovery panel.
7200
+ * @param {Object} props.discoveryConfig.features - Defines enabled features (e.g., search, charts, export).
7201
+ * @param {Object} props.discoveryConfig.minimalFieldMapping - Field mapping configuration, such as `uid`.
7202
+ * @param {JSX.Element} props.indexSelector - React component for selecting an index in the discovery panel.
7203
+ *
7204
+ * @return {JSX.Element} A fully featured discovery interface including search functionality, a table, charts, filters, and more.
7205
+ */ const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
7206
+ console.log(discoveryConfig);
6764
7207
  const dataHook = useMemo(()=>getDiscoveryDataLoader(discoveryConfig?.features?.dataLoader?.dataFetchFunction) ?? useLoadAllMDSData, [
6765
7208
  discoveryConfig?.features?.dataLoader?.dataFetchFunction
6766
7209
  ]);
@@ -6770,6 +7213,7 @@ const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
6770
7213
  });
6771
7214
  const parentDivRef = useRef(null);
6772
7215
  const [searchBarTerm, setSearchBarTerm] = useState([]);
7216
+ const [selections, setSelections] = useState([]); // table selections
6773
7217
  const [advancedSearchTerms, setAdvancedSearchTerms] = useState({
6774
7218
  operation: SearchCombination.and,
6775
7219
  filters: {}
@@ -6795,6 +7239,15 @@ const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
6795
7239
  searchTerms: searchParam,
6796
7240
  discoveryConfig
6797
7241
  });
7242
+ const selectedRecords = useMemo(()=>{
7243
+ const uidField = discoveryConfig?.minimalFieldMapping?.uid ?? 'guid';
7244
+ const filterSelectedMembers = (data)=>data.filter((member)=>uidField in member && selections.includes(member[uidField]));
7245
+ return filterSelectedMembers(data);
7246
+ }, [
7247
+ data,
7248
+ discoveryConfig?.minimalFieldMapping?.uid,
7249
+ selections
7250
+ ]);
6798
7251
  const [sorting, setSorting] = useState([]);
6799
7252
  const [showAdvancedSearch, { toggle: toggleAdvancedSearch }] = useDisclosure(false);
6800
7253
  if (dataRequestStatus.isLoading) {
@@ -6868,8 +7321,11 @@ const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
6868
7321
  color: "accent",
6869
7322
  children: "Filters"
6870
7323
  }) : false,
6871
- discoveryConfig?.features?.exportToDataLibrary?.enabled ? /*#__PURE__*/ jsx(ActionBar, {
6872
- config: discoveryConfig.features.exportToDataLibrary
7324
+ discoveryConfig?.features?.exportFromDiscovery?.enabled ? /*#__PURE__*/ jsx(ActionBar, {
7325
+ buttons: discoveryConfig.features.exportFromDiscovery.buttons,
7326
+ exportDataFields: discoveryConfig.features.exportFromDiscovery.exportDataFields,
7327
+ selectedResources: selectedRecords,
7328
+ verifyExternalLogins: discoveryConfig.features.exportFromDiscovery.verifyExternalLogins
6873
7329
  }) : null
6874
7330
  ]
6875
7331
  }),
@@ -6890,6 +7346,7 @@ const DiscoveryIndexPanel = ({ discoveryConfig, indexSelector })=>{
6890
7346
  dataRequestStatus: dataRequestStatus,
6891
7347
  setPagination: setPagination,
6892
7348
  setSorting: setSorting,
7349
+ setSelection: setSelections,
6893
7350
  pagination: pagination,
6894
7351
  sorting: sorting
6895
7352
  })
@@ -10992,7 +11449,7 @@ const TabsLayoutToComponentProp = (tabsLayout)=>{
10992
11449
  }
10993
11450
  };
10994
11451
  const CohortBuilder = ({ explorerConfig, sharedFiltersMap = null, tabsLayout = 'left' })=>{
10995
- const { isFetching } = useGetCSRFQuery();
11452
+ useGetCSRFQuery();
10996
11453
  const dispatch = useCoreDispatch();
10997
11454
  dispatch(setSharedFilters(sharedFiltersMap ?? {}));
10998
11455
  return /*#__PURE__*/ jsx("div", {
@@ -11977,7 +12434,7 @@ const TextDescription = ({ description })=>{
11977
12434
  });
11978
12435
  };
11979
12436
 
11980
- const AnalysisCard = ({ title, description, type, icon, image, hasDemo, loginRequired, href })=>{
12437
+ const AnalysisCard = ({ title, description, type, icon, image, hasDemo, loginRequired, href, btnText })=>{
11981
12438
  return /*#__PURE__*/ jsx(Stack, {
11982
12439
  children: /*#__PURE__*/ jsxs("div", {
11983
12440
  className: "rounded-sm bg-base-max",
@@ -12045,7 +12502,7 @@ const AnalysisCard = ({ title, description, type, icon, image, hasDemo, loginReq
12045
12502
  root: 'bg-accent text-accent-contrast hover:bg-accent-darker p-2 rounded-sm',
12046
12503
  label: 'text-sm font-semibold'
12047
12504
  },
12048
- label: `Run ${type === 'application' ? 'App' : 'Notebook'}`
12505
+ label: btnText ? btnText : `Run ${type === 'application' ? 'App' : 'Notebook'}`
12049
12506
  }),
12050
12507
  hasDemo && /*#__PURE__*/ jsx("button", {
12051
12508
  className: "ml-2 p-1.5 rounded-sm text-sm font-semibold",
@@ -12129,7 +12586,7 @@ const AnalysisCenter = ({ tools, showFilterAndSort = false })=>{
12129
12586
  /*#__PURE__*/ jsx("div", {
12130
12587
  children: /*#__PURE__*/ jsx("div", {
12131
12588
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 p-1 mx-4 overflow-y-scroll",
12132
- children: tools.map(({ title, description, type, icon, image, hasDemo, loginRequired, href }, key)=>{
12589
+ children: tools.map(({ title, description, type, icon, image, hasDemo, loginRequired, href, btnText }, key)=>{
12133
12590
  return /*#__PURE__*/ jsx(AnalysisCard, {
12134
12591
  title,
12135
12592
  description,
@@ -12139,7 +12596,8 @@ const AnalysisCenter = ({ tools, showFilterAndSort = false })=>{
12139
12596
  hasDemo,
12140
12597
  loginRequired,
12141
12598
  href,
12142
- cardType: 'regular'
12599
+ cardType: 'regular',
12600
+ btnText
12143
12601
  }, title);
12144
12602
  })
12145
12603
  })
@@ -12148,7 +12606,7 @@ const AnalysisCenter = ({ tools, showFilterAndSort = false })=>{
12148
12606
  });
12149
12607
  };
12150
12608
 
12151
- const AnalysisCardCompact = ({ title, description, type = 'application', icon, hasDemo = false, loginRequired = false, href, count, countUnits })=>{
12609
+ const AnalysisCardCompact = ({ title, description, type = 'application', icon, hasDemo = false, loginRequired = false, href, count, countUnits, btnText })=>{
12152
12610
  return /*#__PURE__*/ jsxs(Stack, {
12153
12611
  gap: "xs",
12154
12612
  classNames: {
@@ -12206,12 +12664,9 @@ const AnalysisCardCompact = ({ title, description, type = 'application', icon, h
12206
12664
  /*#__PURE__*/ jsxs(Group, {
12207
12665
  className: "mb-6",
12208
12666
  children: [
12209
- /*#__PURE__*/ jsxs(Button, {
12667
+ /*#__PURE__*/ jsx(Button, {
12210
12668
  color: "primary.4",
12211
- children: [
12212
- "Run ",
12213
- type === 'application' ? 'App' : 'Notebook'
12214
- ]
12669
+ children: btnText ? btnText : `Run ${type === 'application' ? 'App' : 'Notebook'}`
12215
12670
  }),
12216
12671
  hasDemo && /*#__PURE__*/ jsx(Button, {
12217
12672
  variant: "outline",
@@ -12292,7 +12747,7 @@ const myGlob = (dir, filter)=>{
12292
12747
  const files = fs.readdirSync(dir);
12293
12748
  return files.filter((file)=>file.search(filter) !== -1);
12294
12749
  } catch (error) {
12295
- console.log('myGlow error', error, dir);
12750
+ console.log('myGlob error', error, dir);
12296
12751
  }
12297
12752
  return [];
12298
12753
  };
@@ -12304,15 +12759,15 @@ class FilesystemContent {
12304
12759
  try {
12305
12760
  return await JSON.parse(fs.readFileSync(path.join(this.rootPath, filepath)).toString('utf8'));
12306
12761
  } catch (err) {
12307
- throw new Error(`Cannot process ${filepath}`);
12762
+ throw new Error(`Cannot process ${path.join(this.rootPath, filepath)} `);
12308
12763
  }
12309
12764
  }
12310
12765
  async getAll(filepath, filter) {
12311
12766
  try {
12312
12767
  const files = myGlob(path.join(this.rootPath, filepath), filter);
12313
- return Promise.all(files.map((file)=>this.get(path.join(this.rootPath, filepath, file))));
12768
+ return Promise.all(files.map((file)=>this.get(path.join(filepath, file))));
12314
12769
  } catch (err) {
12315
- throw new Error(`getAllCannot process ${filepath}/${filter}`);
12770
+ throw new Error(`getAllCannot process ${path.join(this.rootPath, filepath)}/${filter}`);
12316
12771
  }
12317
12772
  }
12318
12773
  }
@@ -12331,30 +12786,46 @@ class ContentDatabase {
12331
12786
  }
12332
12787
  }
12333
12788
 
12334
- const GEN3_FRONTEND_CONFIGURATION_ROOT = process.env.GEN3_FRONTEND_CONFIGURATION_ROOT || './';
12789
+ const GEN3_FRONTEND_CONFIGURATION_ROOT = process.env.GEN3_FRONTEND_CONFIGURATION_ROOT || './config/';
12335
12790
 
12336
- const ContentRoot = GEN3_FRONTEND_CONFIGURATION_ROOT;
12337
- const setup = ()=>{
12338
- const config = {
12339
- store: new FilesystemContent({
12340
- rootPath: ContentRoot
12341
- })
12342
- };
12343
- return new ContentDatabase(config);
12344
- };
12345
- const ContentSource = setup();
12791
+ class ContentSource {
12792
+ static{
12793
+ this.instance = null;
12794
+ }
12795
+ constructor(){
12796
+ const config = {
12797
+ store: new FilesystemContent({
12798
+ rootPath: GEN3_FRONTEND_CONFIGURATION_ROOT
12799
+ })
12800
+ };
12801
+ this.contentDatabase = new ContentDatabase(config);
12802
+ }
12803
+ static getInstance() {
12804
+ if (!ContentSource.instance) {
12805
+ ContentSource.instance = new ContentSource();
12806
+ }
12807
+ return ContentSource.instance;
12808
+ }
12809
+ // Add methods to access the ContentDatabase functionality
12810
+ // For example:
12811
+ getContentDatabase() {
12812
+ return this.contentDatabase;
12813
+ }
12814
+ }
12815
+ // Export a singleton instance
12816
+ var ContentSource$1 = ContentSource.getInstance();
12346
12817
 
12347
12818
  /**
12348
12819
  * Retrieves navigation page layout properties from configuration.
12349
12820
  * Note: GEN3_COMMONS_NAME depends on siteConfig.json value in the data commons package
12350
12821
  * @returns A Promise resolving to an object containing header and footer props.
12351
12822
  */ const getNavPageLayoutPropsFromConfig = async ()=>{
12352
- const navigationConfigJSON = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/navigation.json`);
12823
+ const navigationConfigJSON = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/navigation.json`);
12353
12824
  let bannerConfigJSON = [];
12354
12825
  try {
12355
- bannerConfigJSON = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/banner.json`);
12826
+ bannerConfigJSON = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/banner.json`);
12356
12827
  } catch (e) {
12357
- console.warn('No banner config found at: ', `config/${GEN3_COMMONS_NAME}/banner.json`);
12828
+ console.warn('No banner config found at: ', `${GEN3_COMMONS_NAME}/banner.json`);
12358
12829
  }
12359
12830
  const { topBar, navigation, type = 'original' } = navigationConfigJSON;
12360
12831
  const headerProps = {
@@ -12363,7 +12834,7 @@ const ContentSource = setup();
12363
12834
  banners: bannerConfigJSON,
12364
12835
  type
12365
12836
  };
12366
- const footerProps = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/footer.json`);
12837
+ const footerProps = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/footer.json`);
12367
12838
  return {
12368
12839
  headerProps,
12369
12840
  footerProps,
@@ -12805,8 +13276,8 @@ const IndexPanel = ({ dataConfig, tabs, tabTitle })=>{
12805
13276
 
12806
13277
  const persistor = persistStore(AppStore);
12807
13278
  const CohortDiscovery = (config)=>{
12808
- const { isLoading } = useGetCSRFQuery(); // need for Guppy
12809
- if (isLoading) {
13279
+ const { isFetching } = useGetCSRFQuery(); // needed for Guppy
13280
+ if (isFetching) {
12810
13281
  return /*#__PURE__*/ jsx(Center, {
12811
13282
  maw: 400,
12812
13283
  h: 100,
@@ -15140,24 +15611,25 @@ const createMantineTheme = (fonts, colors)=>{
15140
15611
  Pagination: Pagination.extend({
15141
15612
  defaultProps: {
15142
15613
  getControlProps: (control)=>{
15614
+ //Add 508 localization to Pagination, not needed if using react table
15143
15615
  if (control === 'first') {
15144
15616
  return {
15145
- "aria-label": "First"
15617
+ 'aria-label': 'First'
15146
15618
  };
15147
15619
  }
15148
15620
  if (control === 'last') {
15149
15621
  return {
15150
- "aria-label": "Last"
15622
+ 'aria-label': 'Last'
15151
15623
  };
15152
15624
  }
15153
15625
  if (control === 'next') {
15154
15626
  return {
15155
- "aria-label": "Next"
15627
+ 'aria-label': 'Next'
15156
15628
  };
15157
15629
  }
15158
15630
  if (control === 'previous') {
15159
15631
  return {
15160
- "aria-label": "Previous"
15632
+ 'aria-label': 'Previous'
15161
15633
  };
15162
15634
  }
15163
15635
  return {};
@@ -15302,7 +15774,7 @@ const DiscoveryPage = ({ headerProps, footerProps, discoveryConfig })=>{
15302
15774
 
15303
15775
  const DiscoveryPageGetServerSideProps = async ()=>{
15304
15776
  try {
15305
- const discoveryConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/discovery.json`);
15777
+ const discoveryConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/discovery.json`);
15306
15778
  return {
15307
15779
  props: {
15308
15780
  ...await getNavPageLayoutPropsFromConfig(),
@@ -15351,7 +15823,7 @@ const QueryPage = ({ headerProps, footerProps, queryProps })=>{
15351
15823
  };
15352
15824
 
15353
15825
  const QueryPageGetServerSideProps = async ()=>{
15354
- const queryProps = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/query.json`);
15826
+ const queryProps = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/query.json`);
15355
15827
  return {
15356
15828
  props: {
15357
15829
  ...await getNavPageLayoutPropsFromConfig(),
@@ -15526,9 +15998,9 @@ const LandingPage = ({ headerProps, footerProps, landingPage })=>{
15526
15998
  };
15527
15999
 
15528
16000
  // should move this thing into _app.tsx and make a dedicated layout component after https://github.com/vercel/next.js/discussions/10949 is addressed
15529
- const LandingPageGetStaticProps = async ()=>{
16001
+ const LandingPageGetServerSideProps = async ()=>{
15530
16002
  const navPageLayoutProps = await getNavPageLayoutPropsFromConfig();
15531
- const landingPage = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/landingPage.json`);
16003
+ const landingPage = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/landingPage.json`);
15532
16004
  return {
15533
16005
  props: {
15534
16006
  ...navPageLayoutProps,
@@ -15572,7 +16044,7 @@ const GetSharedFieldMapping = async (cohortBuilderConfiguration)=>{
15572
16044
  // create shared filter from Gen3 graphql mapping
15573
16045
  const indices = cohortBuilderConfiguration?.explorerConfig.map((tab)=>tab.guppyConfig.dataType);
15574
16046
  try {
15575
- const data = await fetchJSONDataFromURL(`${GEN3_GUPPY_API}/graphql`, true, 'POST', {
16047
+ const data = await fetchJSONDataFromURL(`${GEN3_GUPPY_API}/graphql`, true, HttpMethod.POST, {
15576
16048
  query: `{ _mapping { ${indices.join(' ')} }}`,
15577
16049
  variables: {}
15578
16050
  });
@@ -15607,7 +16079,7 @@ const GetSharedFieldMapping = async (cohortBuilderConfiguration)=>{
15607
16079
  };
15608
16080
  const ExplorerPageGetServerSideProps = async ()=>{
15609
16081
  try {
15610
- const cohortBuilderConfiguration = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/explorer.json`);
16082
+ const cohortBuilderConfiguration = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/explorer.json`);
15611
16083
  if (isArray(cohortBuilderConfiguration)) {
15612
16084
  // older config layout
15613
16085
  // TODO: remove this
@@ -15642,7 +16114,7 @@ const ExplorerPageGetServerSideProps = async ()=>{
15642
16114
  const ExplorerPageGetServerSidePropsForConfigId = async (context)=>{
15643
16115
  const configId = context.query.configId;
15644
16116
  try {
15645
- const cohortBuilderConfiguration = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/explorer/${configId}.json`);
16117
+ const cohortBuilderConfiguration = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/explorer/${configId}.json`);
15646
16118
  if (isArray(cohortBuilderConfiguration)) {
15647
16119
  // older config layout
15648
16120
  // TODO: remove this
@@ -16046,7 +16518,7 @@ const getStatus = (expiration, now)=>{
16046
16518
  * with the ability to delete a given credential using useRemoveCredentialMutation() hook
16047
16519
  * @returns {JSX.Element} The JSX element representing the credentials table.
16048
16520
  */ const CredentialsTable = ()=>{
16049
- const { data: csrfToken } = useGetCSRFQuery();
16521
+ const { data: csrfToken, isFetching: isCSRFFetching } = useGetCSRFQuery();
16050
16522
  const { data: credentials } = useGetCredentialsQuery();
16051
16523
  const [removeCredential] = useRemoveCredentialMutation();
16052
16524
  const columns = useMemo(()=>{
@@ -16108,7 +16580,10 @@ const getStatus = (expiration, now)=>{
16108
16580
  mantineSearchTextInputProps: {
16109
16581
  placeholder: 'Search API Keys'
16110
16582
  },
16111
- icons: TableIcons
16583
+ icons: TableIcons,
16584
+ state: {
16585
+ isLoading: isCSRFFetching
16586
+ }
16112
16587
  });
16113
16588
  return /*#__PURE__*/ jsx(MantineReactTable, {
16114
16589
  table: table
@@ -16602,7 +17077,7 @@ const ProfilePage = ({ headerProps, footerProps, profileConfig })=>{
16602
17077
  };
16603
17078
 
16604
17079
  const ProfilePageGetServerSideProps = async ()=>{
16605
- const profileConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/profile.json`);
17080
+ const profileConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/profile.json`);
16606
17081
  return {
16607
17082
  props: {
16608
17083
  ...await getNavPageLayoutPropsFromConfig(),
@@ -16629,7 +17104,7 @@ const LoginPage = ({ headerProps, footerProps, loginConfig })=>{
16629
17104
  };
16630
17105
 
16631
17106
  const LoginPageGetServerSideProps = async ()=>{
16632
- const loginConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/login.json`);
17107
+ const loginConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/login.json`);
16633
17108
  return {
16634
17109
  props: {
16635
17110
  ...await getNavPageLayoutPropsFromConfig(),
@@ -16660,7 +17135,7 @@ const DictionaryPage = ({ headerProps, footerProps, config })=>{
16660
17135
 
16661
17136
  const DictionaryPageGetServerSideProps = async ()=>{
16662
17137
  try {
16663
- const cohortBuilderProps = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/dictionary.json`);
17138
+ const cohortBuilderProps = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/dictionary.json`);
16664
17139
  return {
16665
17140
  props: {
16666
17141
  ...await getNavPageLayoutPropsFromConfig(),
@@ -16718,7 +17193,7 @@ const AuthzContext = /*#__PURE__*/ createContext({
16718
17193
  },
16719
17194
  dispatch: ()=>null
16720
17195
  });
16721
- const AuthzProvider = ({ children, authz = {
17196
+ const AuthzAdminProvider = ({ children, authz = {
16722
17197
  users: [],
16723
17198
  groups: [],
16724
17199
  roles: [],
@@ -17298,7 +17773,7 @@ const Gen3Authz = ({ authz })=>{
17298
17773
  /*#__PURE__*/ jsx("h1", {
17299
17774
  children: "Gen3 Authz"
17300
17775
  }),
17301
- /*#__PURE__*/ jsx(AuthzProvider, {
17776
+ /*#__PURE__*/ jsx(AuthzAdminProvider, {
17302
17777
  authz: authz,
17303
17778
  children: /*#__PURE__*/ jsxs(Tabs, {
17304
17779
  orientation: "vertical",
@@ -17383,7 +17858,7 @@ const AuthzPage = ({ headerProps, footerProps, authz })=>{
17383
17858
  };
17384
17859
 
17385
17860
  const AdminAuthZPageGetServerSideProps = async ()=>{
17386
- const rootPath = `config/${GEN3_COMMONS_NAME}/`;
17861
+ const rootPath = `${GEN3_COMMONS_NAME}/`;
17387
17862
  const filepath = 'user.yaml';
17388
17863
  let data = {};
17389
17864
  try {
@@ -17711,7 +18186,7 @@ const SubmissionPage = ({ submissionConfig, headerProps, footerProps })=>{
17711
18186
 
17712
18187
  const SubmissionPageGetServerSideProps = async ()=>{
17713
18188
  try {
17714
- const submissionConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/submission.json`);
18189
+ const submissionConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/submission.json`);
17715
18190
  return {
17716
18191
  props: {
17717
18192
  ...await getNavPageLayoutPropsFromConfig(),
@@ -17776,7 +18251,7 @@ const WorkspaceNoAccessPage = ({ headerProps, footerProps })=>{
17776
18251
  };
17777
18252
 
17778
18253
  const WorkspacePageGetServerSideProps = async (_context)=>{
17779
- const workspaceProps = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/workspace.json`);
18254
+ const workspaceProps = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/workspace.json`);
17780
18255
  try {
17781
18256
  return {
17782
18257
  props: {
@@ -17838,7 +18313,7 @@ const AnalysisPage = ({ headerProps, footerProps, tools, sections, classNames })
17838
18313
 
17839
18314
  const AnalysisPageGetServerSideProps = async ()=>{
17840
18315
  try {
17841
- const analysisConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/analysisTools.json`);
18316
+ const analysisConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/analysisTools.json`);
17842
18317
  return {
17843
18318
  props: {
17844
18319
  ...await getNavPageLayoutPropsFromConfig(),
@@ -18473,7 +18948,7 @@ const AnalysisEditorPage = ({ headerProps, footerProps, analysisFile })=>{
18473
18948
  };
18474
18949
 
18475
18950
  const AnalysisEditorPageGetServerSideProps = async ()=>{
18476
- // const rootPath = `config/${GEN3_COMMONS_NAME}/`;
18951
+ // const rootPath = `${GEN3_COMMONS_NAME}/`;
18477
18952
  // const filepath = 'user.yaml';
18478
18953
  // let data: Record<string, any> = {};
18479
18954
  // try {
@@ -18582,12 +19057,12 @@ const getDataLibraryItem = (dataLibrary, listId, dataId, fileId)=>{
18582
19057
  };
18583
19058
  } else {
18584
19059
  if (!fileId) return undefined;
18585
- if (!(fileId in datasetOrCohort.items)) return undefined;
18586
- if (isFileItem(datasetOrCohort.items[fileId])) {
19060
+ if (!(fileId in datasetOrCohort.members)) return undefined;
19061
+ if (isFileItem(datasetOrCohort.members[fileId])) {
18587
19062
  return {
18588
19063
  datasetName: name,
18589
19064
  datasetId: dataId,
18590
- ...datasetOrCohort.items[fileId]
19065
+ ...datasetOrCohort.members[fileId]
18591
19066
  };
18592
19067
  }
18593
19068
  return undefined;
@@ -18794,7 +19269,7 @@ const getNumberOfSelectedItemsInList = (selections, listId)=>{
18794
19269
  };
18795
19270
  const isListInSelection = (listId, selections)=>listId in selections;
18796
19271
 
18797
- const SearchAndActions = ({ createList, gatherData, size = 'sm' })=>{
19272
+ const SearchAndActions = ({ createList, gatherData, size = 'sm', enableCreateNewList = false, enableDownloadManifest = false })=>{
18798
19273
  const { selections, clearSelections } = useDataLibrarySelection();
18799
19274
  const retrieveDisabled = Object.keys(selections).length === 0;
18800
19275
  const iconSize = IconSize[size] || IconSize['sm'];
@@ -18834,6 +19309,38 @@ const SearchAndActions = ({ createList, gatherData, size = 'sm' })=>{
18834
19309
  height: iconSize
18835
19310
  })
18836
19311
  })
19312
+ }),
19313
+ enableCreateNewList && /*#__PURE__*/ jsx(Tooltip, {
19314
+ label: "Create a new empty list",
19315
+ children: /*#__PURE__*/ jsx(Button, {
19316
+ hidden: true,
19317
+ size: "compact-md",
19318
+ variant: "outline",
19319
+ onClick: ()=>createList({}),
19320
+ "aria-label": "create a new list",
19321
+ classNames: {
19322
+ root: 'bg-base-max hover:bg-base-light'
19323
+ },
19324
+ children: /*#__PURE__*/ jsx(MdAdd, {
19325
+ size: "1.5em"
19326
+ })
19327
+ })
19328
+ }),
19329
+ enableCreateNewList && /*#__PURE__*/ jsx(Tooltip, {
19330
+ label: "Download Manifest of selected items",
19331
+ children: /*#__PURE__*/ jsx(Button, {
19332
+ size: "compact-md",
19333
+ variant: "outline",
19334
+ "aria-label": "Download Manifest of Selected Items",
19335
+ classNames: {
19336
+ root: 'bg-base-max hover:bg-base-light'
19337
+ },
19338
+ children: /*#__PURE__*/ jsx(Icon, {
19339
+ icon: "gen3:download-alt",
19340
+ height: 24,
19341
+ width: 24
19342
+ })
19343
+ })
18837
19344
  })
18838
19345
  ]
18839
19346
  })
@@ -19241,7 +19748,7 @@ const sendExistingPFBToURL = async (validatedSelections, params, done = ()=>null
19241
19748
  withCloseButton: true,
19242
19749
  autoClose: 5000,
19243
19750
  title: 'Action Error',
19244
- message: error.status in HTTPUserFriendlyErrorMessages ? HTTPUserFriendlyErrorMessages[error.status] : 'An error has occured to prevent exporting PFB',
19751
+ message: error.status in HTTPUserFriendlyErrorMessages ? HTTPUserFriendlyErrorMessages[error.status] : 'An error has occurred to prevent exporting PFB',
19245
19752
  color: 'red',
19246
19753
  loading: false
19247
19754
  });
@@ -19510,7 +20017,7 @@ const SelectedItemsModal = (props)=>{
19510
20017
  * it iterates through the dataset items and sets the keys of file items
19511
20018
  * to true in the returned object.
19512
20019
  *
19513
- * @param {RegisteredDataListEntry | CohortItem} dataSetOrCohort - The dataset or cohort item to process.
20020
+ * @param {DataLibraryDataset | CohortItem} dataSetOrCohort - The dataset or cohort item to process.
19514
20021
  * @returns {SelectedMembers} An object representing the selected members.
19515
20022
  */ const getDatasetMembers = (dataSetOrCohort)=>{
19516
20023
  if (isCohortItem(dataSetOrCohort)) {
@@ -19518,7 +20025,7 @@ const SelectedItemsModal = (props)=>{
19518
20025
  [dataSetOrCohort.id]: true
19519
20026
  };
19520
20027
  }
19521
- return Object.entries(dataSetOrCohort.items).reduce((acc, [key, item])=>{
20028
+ return Object.entries(dataSetOrCohort.members).reduce((acc, [key, item])=>{
19522
20029
  if (isFileItem(item)) acc[key] = true;
19523
20030
  return acc;
19524
20031
  }, {});
@@ -19718,7 +20225,7 @@ const DatasetAccordionControl = ({ listName, numberOfItems, updatedTime, created
19718
20225
  ]
19719
20226
  }),
19720
20227
  /*#__PURE__*/ jsx(Tooltip, {
19721
- label: `Delete ${listName}. Will not delete dataset`,
20228
+ label: `Delete list ${listName}. Will not delete the actual dataset`,
19722
20229
  children: /*#__PURE__*/ jsx(ActionIcon, {
19723
20230
  color: "accent.4",
19724
20231
  variant: "transparent",
@@ -19935,12 +20442,18 @@ const LabeledText = ({ label, text })=>{
19935
20442
  ]
19936
20443
  });
19937
20444
  };
19938
- const QueryDetails = ({ name, schemaVersion, index, data, id })=>{
20445
+ const QueryDetails = ({ name, schemaVersion, data, id })=>{
19939
20446
  if (!data) {
19940
20447
  return /*#__PURE__*/ jsx(ErrorCard, {
19941
20448
  message: "No cohort query"
19942
20449
  });
19943
20450
  }
20451
+ const index = extractIndexFromDataLibraryCohort(data);
20452
+ if (!index) {
20453
+ return /*#__PURE__*/ jsx(ErrorCard, {
20454
+ message: "Not able to extract index from cohort query"
20455
+ });
20456
+ }
19944
20457
  return /*#__PURE__*/ jsxs("div", {
19945
20458
  className: "flex flex-col",
19946
20459
  children: [
@@ -20105,11 +20618,12 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20105
20618
  } : {}
20106
20619
  };
20107
20620
  },
20108
- renderRowActions: ({ row })=>/*#__PURE__*/ jsx(Tooltip, {
20109
- label: row.original.isCohort ? 'Remove cohort from list' : 'Remove dataset from list',
20621
+ renderRowActions: ({ row })=>{
20622
+ return /*#__PURE__*/ jsx(Tooltip, {
20623
+ label: row.original.isCohort === 'True' ? 'Remove cohort from list' : 'Remove dataset from list',
20110
20624
  children: /*#__PURE__*/ jsxs(Button, {
20111
20625
  variant: "transparent",
20112
- "aria-label": `remove ${row.original.isCohort ? 'cohort' : 'dataset'} ${row.original.name} from list`,
20626
+ "aria-label": `remove ${row.original.isCohort === 'True' ? 'cohort' : 'dataset'} ${row.original.name} from list`,
20113
20627
  onClick: ()=>{
20114
20628
  removeList(row.id);
20115
20629
  },
@@ -20120,7 +20634,8 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20120
20634
  row.original.itemType
20121
20635
  ]
20122
20636
  })
20123
- }),
20637
+ });
20638
+ },
20124
20639
  mantineDetailPanelProps: {
20125
20640
  style: {
20126
20641
  padding: '0px',
@@ -20166,11 +20681,9 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20166
20681
  *
20167
20682
  * @param {Object} dataListAccordionItemParams - Parameters for the DataListAccordionItem.
20168
20683
  * @param {Object} dataListAccordionItemParams.dataList - The data list to be displayed in the accordion item.
20169
- * @param {Function} dataListAccordionItemParams.updateListInDataLibrary - Function to update the list in the data library.
20170
- * @param {Function} dataListAccordionItemParams.deleteListFromDataLibrary - Function to delete the list from the data library.
20171
20684
  *
20172
20685
  * @return {JSX.Element} A rendered accordion item component with controls for data list updates and deletions.
20173
- */ const DatalistAccordionItem = ({ dataList, updateListInDataLibrary, deleteListFromDataLibrary, size = 'sm' })=>{
20686
+ */ const DatalistAccordionItem = ({ dataList, updateListInDataLibrary, deleteListFromDataLibrary, isUpdating, size = 'sm' })=>{
20174
20687
  const [selectedState, setSelectedState] = useState('unchecked');
20175
20688
  const { id: listId, name: listName } = dataList;
20176
20689
  const numberOfItemsInList = useMemo(()=>{
@@ -20180,10 +20693,13 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20180
20693
  ]);
20181
20694
  const { selections, updateSelections, removeListMember, removeList } = useDataLibrarySelection();
20182
20695
  const updateList = async (update)=>{
20183
- await updateListInDataLibrary(listId, {
20184
- ...dataList,
20696
+ await updateListInDataLibrary({
20697
+ ...{
20698
+ name: listName,
20699
+ items: dataList.items
20700
+ },
20185
20701
  ...update,
20186
- updatedTime: getTimestamp()
20702
+ id: listId
20187
20703
  });
20188
20704
  };
20189
20705
  const tableRowData = useMemo(()=>Object.entries(dataList.items).reduce((acc, [datasetId, dataItem])=>{
@@ -20201,7 +20717,7 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20201
20717
  });
20202
20718
  } else {
20203
20719
  // handle RegisteredDataListEntry
20204
- Object.entries(dataItem.items).forEach(([itemId, item])=>{
20720
+ Object.entries(dataItem.members).forEach(([itemId, item])=>{
20205
20721
  if (isFileItem(item)) {
20206
20722
  files.push({
20207
20723
  ...item,
@@ -20253,10 +20769,10 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20253
20769
  const removeItemFromList = async (itemId)=>{
20254
20770
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
20255
20771
  const { [itemId]: _removedKey, ...newObject } = dataList.items;
20256
- await updateListInDataLibrary(listId, {
20257
- ...dataList,
20258
- items: newObject,
20259
- updatedTime: getTimestamp()
20772
+ await updateListInDataLibrary({
20773
+ id: listId,
20774
+ name: dataList.name,
20775
+ items: newObject
20260
20776
  });
20261
20777
  // update selections
20262
20778
  removeListMember(listId, itemId);
@@ -20272,12 +20788,16 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20272
20788
  return /*#__PURE__*/ jsxs(Accordion.Item, {
20273
20789
  value: listName,
20274
20790
  className: "group",
20791
+ pos: "relative",
20275
20792
  children: [
20793
+ /*#__PURE__*/ jsx(LoadingOverlay, {
20794
+ visible: isUpdating === listId
20795
+ }),
20276
20796
  /*#__PURE__*/ jsx(DatasetAccordionControl, {
20277
20797
  listName: listName,
20278
20798
  numberOfItems: numberOfItemsInList,
20279
- updatedTime: dataList.updatedTime,
20280
- createdTime: dataList.createdTime,
20799
+ updatedTime: dataList.updated_time,
20800
+ createdTime: dataList.created_time,
20281
20801
  updateHandler: updateList,
20282
20802
  deleteListHandler: ()=>deleteListFromDataLibrary(listId),
20283
20803
  selectListHandler: handleSelectList,
@@ -20296,34 +20816,41 @@ const DataSetContentsTable = ({ listId, data, removeList, size = 'sm' })=>{
20296
20816
  }, listName);
20297
20817
  };
20298
20818
 
20299
- const DataLibraryLists = ({ useAPI, actions, size })=>{
20300
- const { dataLibrary, isError, isLoading, error: dataLibraryError, addListToDataLibrary, updateListInDataLibrary, deleteListFromDataLibrary } = useDataLibrary(useAPI);
20819
+ const DataLibraryLists = ({ requiresLogin = true, actions, size })=>{
20820
+ const { dataLibrary, isLoading, isUpdating, error: dataLibraryError, addListToDataLibrary, updateListInDataLibrary, deleteListFromDataLibrary } = useDataLibrary();
20821
+ const { isAuthenticated } = useIsAuthenticated();
20301
20822
  const [selectedItemsOpen, { open, close }] = useDisclosure(false);
20302
20823
  const { gatherSelectedItems } = useDataLibrarySelection();
20303
20824
  const gatherData = ()=>{
20304
20825
  gatherSelectedItems(dataLibrary);
20305
20826
  open();
20306
20827
  };
20307
- if (isError) {
20308
- let message = 'There was a error getting the library';
20309
- if (dataLibraryError && 'data' in dataLibraryError && dataLibraryError?.status in HTTPUserFriendlyErrorMessages) {
20310
- message = HTTPUserFriendlyErrorMessages[dataLibraryError?.status];
20311
- }
20312
- return /*#__PURE__*/ jsx("div", {
20313
- className: "flex flex-col w-full ml-2",
20314
- children: /*#__PURE__*/ jsx(Center, {
20315
- children: /*#__PURE__*/ jsx(ErrorCard, {
20316
- message: message
20828
+ if (dataLibraryError?.isError) {
20829
+ if (dataLibraryError?.status === 401) {
20830
+ let message = 'You are not authorized to access the library.';
20831
+ if (requiresLogin) {
20832
+ if (!isAuthenticated) message = 'Data Library requires login. Please log in to continue.';
20833
+ else message = 'You are not authorized to access the library. Please contact your site administrator.';
20834
+ }
20835
+ return /*#__PURE__*/ jsx("div", {
20836
+ className: "flex flex-col w-full ml-2",
20837
+ children: /*#__PURE__*/ jsx(Center, {
20838
+ children: /*#__PURE__*/ jsx(ErrorCard, {
20839
+ message: message
20840
+ })
20317
20841
  })
20318
- })
20842
+ });
20843
+ } else notifications.show({
20844
+ position: 'top-center',
20845
+ color: 'red',
20846
+ title: 'Data Library Error',
20847
+ message: dataLibraryError?.message,
20848
+ autoClose: 2000
20319
20849
  });
20320
20850
  }
20321
20851
  return /*#__PURE__*/ jsxs("div", {
20322
20852
  className: "flex flex-col w-full ml-2",
20323
20853
  children: [
20324
- /*#__PURE__*/ jsx(LoadingOverlay, {
20325
- visible: isLoading
20326
- }),
20327
20854
  /*#__PURE__*/ jsx(SelectedItemsModal, {
20328
20855
  opened: selectedItemsOpen,
20329
20856
  onClose: close,
@@ -20334,23 +20861,29 @@ const DataLibraryLists = ({ useAPI, actions, size })=>{
20334
20861
  createList: addListToDataLibrary,
20335
20862
  gatherData: gatherData
20336
20863
  }),
20337
- /*#__PURE__*/ jsx("div", {
20864
+ /*#__PURE__*/ jsxs("div", {
20338
20865
  className: "flex items-center",
20339
- children: /*#__PURE__*/ jsx(Accordion, {
20340
- chevronPosition: "left",
20341
- classNames: {
20342
- root: 'w-full',
20343
- control: 'data-active:bg-secondary-lightest'
20344
- },
20345
- children: dataLibrary && Object.values(dataLibrary).map((datalist)=>{
20346
- return /*#__PURE__*/ jsx(DatalistAccordionItem, {
20347
- dataList: datalist,
20348
- size: size,
20349
- updateListInDataLibrary: updateListInDataLibrary,
20350
- deleteListFromDataLibrary: deleteListFromDataLibrary
20351
- }, datalist.id);
20866
+ children: [
20867
+ /*#__PURE__*/ jsx(LoadingOverlay, {
20868
+ visible: isLoading
20869
+ }),
20870
+ /*#__PURE__*/ jsx(Accordion, {
20871
+ chevronPosition: "left",
20872
+ classNames: {
20873
+ root: 'w-full',
20874
+ control: 'data-active:bg-secondary-lightest'
20875
+ },
20876
+ children: dataLibrary && Object.values(dataLibrary).map((datalist)=>{
20877
+ return /*#__PURE__*/ jsx(DatalistAccordionItem, {
20878
+ dataList: datalist,
20879
+ size: size,
20880
+ isUpdating: isUpdating,
20881
+ updateListInDataLibrary: updateListInDataLibrary,
20882
+ deleteListFromDataLibrary: deleteListFromDataLibrary
20883
+ }, datalist.id);
20884
+ })
20352
20885
  })
20353
- })
20886
+ ]
20354
20887
  })
20355
20888
  ]
20356
20889
  });
@@ -20381,7 +20914,7 @@ const DataLibraryPage = ({ headerProps, footerProps, config })=>{
20381
20914
 
20382
20915
  const DataLibraryPageGetServerSideProps = async ()=>{
20383
20916
  try {
20384
- const datalibraryConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/dataLibrary.json`);
20917
+ const datalibraryConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/dataLibrary.json`);
20385
20918
  return {
20386
20919
  props: {
20387
20920
  ...await getNavPageLayoutPropsFromConfig(),
@@ -20673,7 +21206,7 @@ const CrosswalkPage = ({ headerProps, footerProps, config })=>{
20673
21206
 
20674
21207
  const CrosswalkPageGetServerSideProps = async ()=>{
20675
21208
  try {
20676
- const initialConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/crosswalk.json`);
21209
+ const initialConfig = await ContentSource$1.getContentDatabase().get(`${GEN3_COMMONS_NAME}/crosswalk.json`);
20677
21210
  const regex = /->/g;
20678
21211
  const processedConfig = {
20679
21212
  showSubmittedIdInTable: initialConfig.showSubmittedIdInTable,
@@ -21011,5 +21544,5 @@ async function credentialsLogout(req, res) {
21011
21544
  res.redirect(307, '/');
21012
21545
  }
21013
21546
 
21014
- export { AISearchPageGetServerSideProps, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisCenterWithSections, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, CohortManager, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetStaticProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
21547
+ export { AISearchPageGetServerSideProps, ActionBar, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisCenterWithSections, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, CohortManager, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource$1 as ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetServerSideProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
21015
21548
  //# sourceMappingURL=index.js.map