@gen3/frontend 0.10.94 → 0.10.95

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 (495) hide show
  1. package/dist/cjs/index.js +5530 -3554
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts +64 -0
  4. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
  5. package/dist/dts/components/DropdownMenu/DropdownMenu.js +38 -0
  6. package/dist/dts/components/DropdownMenu/DropdownMenu.js.map +1 -0
  7. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts +2 -0
  8. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts.map +1 -0
  9. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js +141 -0
  10. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js.map +1 -0
  11. package/dist/dts/components/DropdownMenu/index.d.ts +3 -0
  12. package/dist/dts/components/DropdownMenu/index.d.ts.map +1 -0
  13. package/dist/dts/components/DropdownMenu/index.js +3 -0
  14. package/dist/dts/components/DropdownMenu/index.js.map +1 -0
  15. package/dist/dts/components/Login/LoginProvidersPanel.d.ts.map +1 -1
  16. package/dist/dts/components/Login/LoginProvidersPanel.js +1 -1
  17. package/dist/dts/components/Login/LoginProvidersPanel.js.map +1 -1
  18. package/dist/dts/components/MessageCards/EmptyTableMessage.d.ts +5 -0
  19. package/dist/dts/components/MessageCards/EmptyTableMessage.d.ts.map +1 -0
  20. package/dist/dts/components/MessageCards/EmptyTableMessage.js +9 -0
  21. package/dist/dts/components/MessageCards/EmptyTableMessage.js.map +1 -0
  22. package/dist/dts/components/MessageCards/ErrorMessage.d.ts +7 -0
  23. package/dist/dts/components/MessageCards/ErrorMessage.d.ts.map +1 -0
  24. package/dist/dts/components/MessageCards/ErrorMessage.js +8 -0
  25. package/dist/dts/components/MessageCards/ErrorMessage.js.map +1 -0
  26. package/dist/dts/components/charts/echarts/BarChart.d.ts.map +1 -1
  27. package/dist/dts/components/charts/echarts/BarChart.js +42 -4
  28. package/dist/dts/components/charts/echarts/BarChart.js.map +1 -1
  29. package/dist/dts/components/charts/echarts/ReactECharts.js +1 -1
  30. package/dist/dts/components/charts/echarts/ReactECharts.js.map +1 -1
  31. package/dist/dts/components/charts/utils.d.ts +1 -1
  32. package/dist/dts/components/charts/utils.d.ts.map +1 -1
  33. package/dist/dts/components/charts/utils.js +2 -4
  34. package/dist/dts/components/charts/utils.js.map +1 -1
  35. package/dist/dts/components/facets/EnumFacet.d.ts +2 -1
  36. package/dist/dts/components/facets/EnumFacet.d.ts.map +1 -1
  37. package/dist/dts/components/facets/EnumFacet.js.map +1 -1
  38. package/dist/dts/components/facets/FacetEnumList.d.ts.map +1 -1
  39. package/dist/dts/components/facets/FacetEnumList.js +7 -30
  40. package/dist/dts/components/facets/FacetEnumList.js.map +1 -1
  41. package/dist/dts/components/facets/FacetSelector.d.ts +1 -1
  42. package/dist/dts/components/facets/FacetSelector.d.ts.map +1 -1
  43. package/dist/dts/components/facets/FacetSelector.js +3 -1
  44. package/dist/dts/components/facets/FacetSelector.js.map +1 -1
  45. package/dist/dts/components/facets/types.d.ts +1 -0
  46. package/dist/dts/components/facets/types.d.ts.map +1 -1
  47. package/dist/dts/components/facets/types.js.map +1 -1
  48. package/dist/dts/components/facets/utils.d.ts +4 -2
  49. package/dist/dts/components/facets/utils.d.ts.map +1 -1
  50. package/dist/dts/components/facets/utils.js +27 -1
  51. package/dist/dts/components/facets/utils.js.map +1 -1
  52. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
  53. package/dist/dts/features/CohortBuilder/AccessLevel.d.ts +8 -0
  54. package/dist/dts/features/CohortBuilder/AccessLevel.d.ts.map +1 -0
  55. package/dist/dts/features/CohortBuilder/AccessLevel.js +20 -0
  56. package/dist/dts/features/CohortBuilder/AccessLevel.js.map +1 -0
  57. package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts +1 -0
  58. package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
  59. package/dist/dts/features/CohortBuilder/CohortBuilder.js +4 -19
  60. package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
  61. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +20 -0
  62. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +1 -0
  63. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +37 -0
  64. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +1 -0
  65. package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts +18 -0
  66. package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts.map +1 -0
  67. package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js +149 -0
  68. package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js.map +1 -0
  69. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts +9 -0
  70. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts.map +1 -0
  71. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js +122 -0
  72. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js.map +1 -0
  73. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts +19 -0
  74. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts.map +1 -0
  75. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js +52 -0
  76. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js.map +1 -0
  77. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts +10 -0
  78. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +1 -0
  79. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +37 -0
  80. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +1 -0
  81. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts +13 -0
  82. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts.map +1 -0
  83. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js +33 -0
  84. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js.map +1 -0
  85. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts +7 -0
  86. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts.map +1 -0
  87. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.js +80 -0
  88. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.js.map +1 -0
  89. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts +5 -0
  90. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts.map +1 -0
  91. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js +5 -0
  92. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js.map +1 -0
  93. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts +5 -0
  94. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts.map +1 -0
  95. package/dist/dts/features/CohortBuilder/CohortManager/index.js +4 -0
  96. package/dist/dts/features/CohortBuilder/CohortManager/index.js.map +1 -0
  97. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts +13 -0
  98. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts.map +1 -0
  99. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js +15 -0
  100. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js.map +1 -0
  101. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts +4 -0
  102. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts.map +1 -0
  103. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js +8 -0
  104. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js.map +1 -0
  105. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +32 -0
  106. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +1 -0
  107. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +190 -0
  108. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +1 -0
  109. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts +2 -0
  110. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts.map +1 -0
  111. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js +145 -0
  112. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js.map +1 -0
  113. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +29 -0
  114. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +1 -0
  115. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +79 -0
  116. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +1 -0
  117. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts +5 -0
  118. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts.map +1 -0
  119. package/dist/dts/features/CohortBuilder/CohortManager/style.js +21 -0
  120. package/dist/dts/features/CohortBuilder/CohortManager/style.js.map +1 -0
  121. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts +49 -0
  122. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts.map +1 -0
  123. package/dist/dts/features/CohortBuilder/CohortManager/types.js +2 -0
  124. package/dist/dts/features/CohortBuilder/CohortManager/types.js.map +1 -0
  125. package/dist/dts/features/CohortBuilder/CohortManagerAndExpression.d.ts +6 -0
  126. package/dist/dts/features/CohortBuilder/CohortManagerAndExpression.d.ts.map +1 -0
  127. package/dist/dts/features/CohortBuilder/CohortManagerAndExpression.js +21 -0
  128. package/dist/dts/features/CohortBuilder/CohortManagerAndExpression.js.map +1 -0
  129. package/dist/dts/features/CohortBuilder/CohortPanel.d.ts +6 -2
  130. package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
  131. package/dist/dts/features/CohortBuilder/CohortPanel.js +15 -19
  132. package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
  133. package/dist/dts/features/CohortBuilder/CohortSelector.d.ts +8 -1
  134. package/dist/dts/features/CohortBuilder/CohortSelector.d.ts.map +1 -1
  135. package/dist/dts/features/CohortBuilder/CohortSelector.js +51 -10
  136. package/dist/dts/features/CohortBuilder/CohortSelector.js.map +1 -1
  137. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +6 -0
  138. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts.map +1 -0
  139. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.js +32 -0
  140. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.js.map +1 -0
  141. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.d.ts +1 -1
  142. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.d.ts.map +1 -1
  143. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.js +1 -1
  144. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.js.map +1 -1
  145. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/types.d.ts +2 -0
  146. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/types.d.ts.map +1 -1
  147. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts +3 -2
  148. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts.map +1 -1
  149. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js +56 -60
  150. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js.map +1 -1
  151. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.d.ts +4 -0
  152. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.d.ts.map +1 -0
  153. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.js +48 -0
  154. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.js.map +1 -0
  155. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExplorerTableSubtable.d.ts +4 -0
  156. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExplorerTableSubtable.d.ts.map +1 -0
  157. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExplorerTableSubtable.js +81 -0
  158. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExplorerTableSubtable.js.map +1 -0
  159. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.d.ts +9 -0
  160. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.d.ts.map +1 -0
  161. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.js +22 -0
  162. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.js.map +1 -0
  163. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableStack.d.ts +9 -0
  164. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableStack.d.ts.map +1 -0
  165. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableStack.js +17 -0
  166. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableStack.js.map +1 -0
  167. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/types.d.ts +12 -0
  168. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/types.d.ts.map +1 -0
  169. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/types.js +2 -0
  170. package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/types.js.map +1 -0
  171. package/dist/dts/features/CohortBuilder/ExplorerTable/types.d.ts +52 -12
  172. package/dist/dts/features/CohortBuilder/ExplorerTable/types.d.ts.map +1 -1
  173. package/dist/dts/features/CohortBuilder/ExplorerTable/utils.d.ts +4 -1
  174. package/dist/dts/features/CohortBuilder/ExplorerTable/utils.d.ts.map +1 -1
  175. package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js +70 -0
  176. package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js.map +1 -1
  177. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts +1 -1
  178. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts.map +1 -1
  179. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js +2 -2
  180. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js.map +1 -1
  181. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts +1 -1
  182. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts.map +1 -1
  183. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js +5 -4
  184. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js.map +1 -1
  185. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts.map +1 -1
  186. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js +2 -1
  187. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js.map +1 -1
  188. package/dist/dts/features/CohortBuilder/Panels/types.d.ts +4 -1
  189. package/dist/dts/features/CohortBuilder/Panels/types.d.ts.map +1 -1
  190. package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +1 -1
  191. package/dist/dts/features/CohortBuilder/index.d.ts +5 -2
  192. package/dist/dts/features/CohortBuilder/index.d.ts.map +1 -1
  193. package/dist/dts/features/CohortBuilder/index.js +4 -1
  194. package/dist/dts/features/CohortBuilder/index.js.map +1 -1
  195. package/dist/dts/features/CohortBuilder/types.d.ts +13 -5
  196. package/dist/dts/features/CohortBuilder/types.d.ts.map +1 -1
  197. package/dist/dts/features/CohortBuilder/types.js +6 -0
  198. package/dist/dts/features/CohortBuilder/types.js.map +1 -1
  199. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
  200. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js +19 -11
  201. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
  202. package/dist/dts/features/CohortDiscovery/CohortDiscovery.d.ts.map +1 -1
  203. package/dist/dts/features/CohortDiscovery/CohortDiscovery.js +23 -8
  204. package/dist/dts/features/CohortDiscovery/CohortDiscovery.js.map +1 -1
  205. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts +6 -0
  206. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts.map +1 -0
  207. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js +71 -0
  208. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js.map +1 -0
  209. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerMiddleware.d.ts +2 -0
  210. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerMiddleware.d.ts.map +1 -0
  211. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerMiddleware.js +36 -0
  212. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerMiddleware.js.map +1 -0
  213. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts +417 -0
  214. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts.map +1 -0
  215. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js +45 -0
  216. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js.map +1 -0
  217. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts +95 -0
  218. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts.map +1 -0
  219. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js +388 -0
  220. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js.map +1 -0
  221. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts +64 -0
  222. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +1 -0
  223. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +574 -0
  224. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +1 -0
  225. package/dist/dts/features/CohortDiscovery/CohortManagment/types.d.ts +7 -0
  226. package/dist/dts/features/CohortDiscovery/CohortManagment/types.d.ts.map +1 -0
  227. package/dist/dts/features/CohortDiscovery/CohortManagment/types.js +2 -0
  228. package/dist/dts/features/CohortDiscovery/CohortManagment/types.js.map +1 -0
  229. package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.d.ts +1 -1
  230. package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.d.ts.map +1 -1
  231. package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js +1 -1
  232. package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js.map +1 -1
  233. package/dist/dts/features/CohortDiscovery/FilterExpandSlice.d.ts +1 -1
  234. package/dist/dts/features/CohortDiscovery/FilterExpandSlice.d.ts.map +1 -1
  235. package/dist/dts/features/CohortDiscovery/FilterExpandSlice.js +1 -1
  236. package/dist/dts/features/CohortDiscovery/FilterExpandSlice.js.map +1 -1
  237. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts +2 -1
  238. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts.map +1 -1
  239. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js +22 -6
  240. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js.map +1 -1
  241. package/dist/dts/features/CohortDiscovery/FilterPanels/FacetPanelDataHeader.js.map +1 -1
  242. package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts +1 -1
  243. package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts.map +1 -1
  244. package/dist/dts/features/CohortDiscovery/IndexPanel.js +41 -33
  245. package/dist/dts/features/CohortDiscovery/IndexPanel.js.map +1 -1
  246. package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts +22 -0
  247. package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts.map +1 -0
  248. package/dist/dts/features/CohortDiscovery/Requests/hooks.js +147 -0
  249. package/dist/dts/features/CohortDiscovery/Requests/hooks.js.map +1 -0
  250. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts +1 -0
  251. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts.map +1 -0
  252. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js +284 -0
  253. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js.map +1 -0
  254. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsPanel.d.ts +8 -0
  255. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsPanel.d.ts.map +1 -0
  256. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsPanel.js +9 -0
  257. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsPanel.js.map +1 -0
  258. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.d.ts +10 -0
  259. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.d.ts.map +1 -0
  260. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js +231 -0
  261. package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js.map +1 -0
  262. package/dist/dts/features/CohortDiscovery/SelectedFacetsSlice.d.ts +3 -4
  263. package/dist/dts/features/CohortDiscovery/SelectedFacetsSlice.d.ts.map +1 -1
  264. package/dist/dts/features/CohortDiscovery/SelectedFacetsSlice.js +6 -11
  265. package/dist/dts/features/CohortDiscovery/SelectedFacetsSlice.js.map +1 -1
  266. package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts +8 -0
  267. package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts.map +1 -0
  268. package/dist/dts/features/CohortDiscovery/TabbedIndex.js +15 -0
  269. package/dist/dts/features/CohortDiscovery/TabbedIndex.js.map +1 -0
  270. package/dist/dts/features/CohortDiscovery/api/analysisApiCohortDiscovery.js +2 -2
  271. package/dist/dts/features/CohortDiscovery/api/analysisApiCohortDiscovery.js.map +1 -1
  272. package/dist/dts/features/CohortDiscovery/appApi.d.ts +19 -3
  273. package/dist/dts/features/CohortDiscovery/appApi.d.ts.map +1 -1
  274. package/dist/dts/features/CohortDiscovery/appApi.js +11 -3
  275. package/dist/dts/features/CohortDiscovery/appApi.js.map +1 -1
  276. package/dist/dts/features/CohortDiscovery/hooks.d.ts +12 -0
  277. package/dist/dts/features/CohortDiscovery/hooks.d.ts.map +1 -1
  278. package/dist/dts/features/CohortDiscovery/hooks.js +42 -1
  279. package/dist/dts/features/CohortDiscovery/hooks.js.map +1 -1
  280. package/dist/dts/features/CohortDiscovery/registerApp.d.ts.map +1 -1
  281. package/dist/dts/features/CohortDiscovery/registerApp.js +5 -3
  282. package/dist/dts/features/CohortDiscovery/registerApp.js.map +1 -1
  283. package/dist/dts/features/CohortDiscovery/types.d.ts +57 -0
  284. package/dist/dts/features/CohortDiscovery/types.d.ts.map +1 -1
  285. package/dist/dts/features/CohortDiscovery/types.js +35 -1
  286. package/dist/dts/features/CohortDiscovery/types.js.map +1 -1
  287. package/dist/dts/features/CohortSimilarity/appApi.d.ts +4 -6
  288. package/dist/dts/features/CohortSimilarity/appApi.d.ts.map +1 -1
  289. package/dist/dts/features/CohortSimilarity/appApi.js +3 -1
  290. package/dist/dts/features/CohortSimilarity/appApi.js.map +1 -1
  291. package/dist/dts/features/CohortSimilarity/registerApp.d.ts.map +1 -1
  292. package/dist/dts/features/CohortSimilarity/registerApp.js +1 -3
  293. package/dist/dts/features/CohortSimilarity/registerApp.js.map +1 -1
  294. package/dist/dts/features/DataLibrary/DatasetAccordionControl.d.ts.map +1 -1
  295. package/dist/dts/features/DataLibrary/DatasetAccordionControl.js +2 -2
  296. package/dist/dts/features/DataLibrary/DatasetAccordionControl.js.map +1 -1
  297. package/dist/dts/features/DataLibrary/SearchAndActions.js +1 -1
  298. package/dist/dts/features/DataLibrary/SearchAndActions.js.map +1 -1
  299. package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.d.ts.map +1 -1
  300. package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.js +1 -1
  301. package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.js.map +1 -1
  302. package/dist/dts/features/DataLibrary/tests/utils.unit.test.js +2 -1
  303. package/dist/dts/features/DataLibrary/tests/utils.unit.test.js.map +1 -1
  304. package/dist/dts/features/DataLibrary/utils.d.ts +0 -10
  305. package/dist/dts/features/DataLibrary/utils.d.ts.map +1 -1
  306. package/dist/dts/features/DataLibrary/utils.js +0 -34
  307. package/dist/dts/features/DataLibrary/utils.js.map +1 -1
  308. package/dist/dts/features/Dictionary/CategoryPanel.d.ts.map +1 -1
  309. package/dist/dts/features/Dictionary/CategoryPanel.js +9 -9
  310. package/dist/dts/features/Dictionary/CategoryPanel.js.map +1 -1
  311. package/dist/dts/features/Dictionary/DictionaryWithContext.d.ts.map +1 -1
  312. package/dist/dts/features/Dictionary/DictionaryWithContext.js.map +1 -1
  313. package/dist/dts/features/Discovery/DataLoaders/IndexedMetadata/DataLoader.js.map +1 -1
  314. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.d.ts.map +1 -1
  315. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js +2 -2
  316. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js.map +1 -1
  317. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/filterByTags.d.ts.map +1 -1
  318. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/filterByTags.js +1 -1
  319. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/filterByTags.js.map +1 -1
  320. package/dist/dts/features/Discovery/DataLoaders/utils.d.ts.map +1 -1
  321. package/dist/dts/features/Discovery/DataLoaders/utils.js +1 -1
  322. package/dist/dts/features/Discovery/DataLoaders/utils.js.map +1 -1
  323. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
  324. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +8 -6
  325. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
  326. package/dist/dts/features/Discovery/DiscoveryProvider.d.ts +0 -3
  327. package/dist/dts/features/Discovery/DiscoveryProvider.d.ts.map +1 -1
  328. package/dist/dts/features/Discovery/DiscoveryProvider.js +0 -5
  329. package/dist/dts/features/Discovery/DiscoveryProvider.js.map +1 -1
  330. package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
  331. package/dist/dts/features/Discovery/DiscoveryTable.js +7 -5
  332. package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
  333. package/dist/dts/features/Discovery/StudyDetails/StudyItems.d.ts.map +1 -1
  334. package/dist/dts/features/Discovery/StudyDetails/StudyItems.js +3 -1
  335. package/dist/dts/features/Discovery/StudyDetails/StudyItems.js.map +1 -1
  336. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts +2 -3
  337. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts.map +1 -1
  338. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js +3 -3
  339. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js.map +1 -1
  340. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.d.ts +1 -2
  341. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.d.ts.map +1 -1
  342. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.js +5 -6
  343. package/dist/dts/features/Discovery/TableRenderers/DataAccessCellRenderers.js.map +1 -1
  344. package/dist/dts/features/Discovery/TableRenderers/RowRendererFactory.d.ts +1 -1
  345. package/dist/dts/features/Discovery/TableRenderers/RowRendererFactory.d.ts.map +1 -1
  346. package/dist/dts/features/Discovery/TableRenderers/RowRenderers.d.ts +1 -1
  347. package/dist/dts/features/Discovery/TableRenderers/RowRenderers.d.ts.map +1 -1
  348. package/dist/dts/features/Discovery/index.d.ts +2 -4
  349. package/dist/dts/features/Discovery/index.d.ts.map +1 -1
  350. package/dist/dts/features/Discovery/index.js +1 -3
  351. package/dist/dts/features/Discovery/index.js.map +1 -1
  352. package/dist/dts/features/Discovery/types.d.ts +3 -107
  353. package/dist/dts/features/Discovery/types.d.ts.map +1 -1
  354. package/dist/dts/features/Discovery/types.js +0 -16
  355. package/dist/dts/features/Discovery/types.js.map +1 -1
  356. package/dist/dts/features/Discovery/utils.d.ts +2 -8
  357. package/dist/dts/features/Discovery/utils.d.ts.map +1 -1
  358. package/dist/dts/features/Discovery/utils.js +1 -28
  359. package/dist/dts/features/Discovery/utils.js.map +1 -1
  360. package/dist/dts/features/Navigation/Footer/FooterColumn.d.ts.map +1 -1
  361. package/dist/dts/features/Navigation/Footer/FooterColumn.js.map +1 -1
  362. package/dist/dts/features/Navigation/NavPageLayout.js +2 -2
  363. package/dist/dts/features/Navigation/NavPageLayout.js.map +1 -1
  364. package/dist/dts/features/Study/StudyDetails/DetailsAuthorizationIcon.d.ts +9 -0
  365. package/dist/dts/features/Study/StudyDetails/DetailsAuthorizationIcon.d.ts.map +1 -0
  366. package/dist/dts/features/Study/StudyDetails/DetailsAuthorizationIcon.js +11 -0
  367. package/dist/dts/features/Study/StudyDetails/DetailsAuthorizationIcon.js.map +1 -0
  368. package/dist/dts/features/Study/StudyDetails/RendererFactory.d.ts +19 -0
  369. package/dist/dts/features/Study/StudyDetails/RendererFactory.d.ts.map +1 -0
  370. package/dist/dts/features/Study/StudyDetails/RendererFactory.js +56 -0
  371. package/dist/dts/features/Study/StudyDetails/RendererFactory.js.map +1 -0
  372. package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.d.ts +15 -0
  373. package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.d.ts.map +1 -0
  374. package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.js +44 -0
  375. package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.js.map +1 -0
  376. package/dist/dts/features/Study/StudyDetails/StudyDetails.d.ts +10 -0
  377. package/dist/dts/features/Study/StudyDetails/StudyDetails.d.ts.map +1 -0
  378. package/dist/dts/features/Study/StudyDetails/StudyDetails.js +36 -0
  379. package/dist/dts/features/Study/StudyDetails/StudyDetails.js.map +1 -0
  380. package/dist/dts/features/Study/StudyDetails/StudyDetailsPanel.d.ts +10 -0
  381. package/dist/dts/features/Study/StudyDetails/StudyDetailsPanel.d.ts.map +1 -0
  382. package/dist/dts/features/Study/StudyDetails/StudyDetailsPanel.js +19 -0
  383. package/dist/dts/features/Study/StudyDetails/StudyDetailsPanel.js.map +1 -0
  384. package/dist/dts/features/Study/StudyDetails/StudyGroup.d.ts +8 -0
  385. package/dist/dts/features/Study/StudyDetails/StudyGroup.d.ts.map +1 -0
  386. package/dist/dts/features/Study/StudyDetails/StudyGroup.js +31 -0
  387. package/dist/dts/features/Study/StudyDetails/StudyGroup.js.map +1 -0
  388. package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.d.ts +9 -0
  389. package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.d.ts.map +1 -0
  390. package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.js +11 -0
  391. package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.js.map +1 -0
  392. package/dist/dts/features/Study/StudyDetails/StudyItems.d.ts +5 -0
  393. package/dist/dts/features/Study/StudyDetails/StudyItems.d.ts.map +1 -0
  394. package/dist/dts/features/Study/StudyDetails/StudyItems.js +283 -0
  395. package/dist/dts/features/Study/StudyDetails/StudyItems.js.map +1 -0
  396. package/dist/dts/features/Study/StudyPage/DownloadLinksPanel.d.ts +10 -0
  397. package/dist/dts/features/Study/StudyPage/DownloadLinksPanel.d.ts.map +1 -0
  398. package/dist/dts/features/Study/StudyPage/DownloadLinksPanel.js +45 -0
  399. package/dist/dts/features/Study/StudyPage/DownloadLinksPanel.js.map +1 -0
  400. package/dist/dts/features/Study/StudyPage/StudyPage.d.ts +10 -0
  401. package/dist/dts/features/Study/StudyPage/StudyPage.d.ts.map +1 -0
  402. package/dist/dts/features/Study/StudyPage/StudyPage.js +11 -0
  403. package/dist/dts/features/Study/StudyPage/StudyPage.js.map +1 -0
  404. package/dist/dts/features/Study/StudyPage/StudyPageGroup.d.ts +9 -0
  405. package/dist/dts/features/Study/StudyPage/StudyPageGroup.d.ts.map +1 -0
  406. package/dist/dts/features/Study/StudyPage/StudyPageGroup.js +8 -0
  407. package/dist/dts/features/Study/StudyPage/StudyPageGroup.js.map +1 -0
  408. package/dist/dts/features/Study/StudyProvider.d.ts +12 -0
  409. package/dist/dts/features/Study/StudyProvider.d.ts.map +1 -0
  410. package/dist/dts/features/Study/StudyProvider.js +23 -0
  411. package/dist/dts/features/Study/StudyProvider.js.map +1 -0
  412. package/dist/dts/features/Study/TableRenderers/CellRenderers.d.ts +3 -0
  413. package/dist/dts/features/Study/TableRenderers/CellRenderers.d.ts.map +1 -0
  414. package/dist/dts/features/Study/TableRenderers/CellRenderers.js +20 -0
  415. package/dist/dts/features/Study/TableRenderers/CellRenderers.js.map +1 -0
  416. package/dist/dts/features/Study/TableRenderers/types.d.ts +14 -0
  417. package/dist/dts/features/Study/TableRenderers/types.d.ts.map +1 -0
  418. package/dist/dts/features/Study/TableRenderers/types.js +2 -0
  419. package/dist/dts/features/Study/TableRenderers/types.js.map +1 -0
  420. package/dist/dts/features/Study/index.d.ts +5 -0
  421. package/dist/dts/features/Study/index.d.ts.map +1 -0
  422. package/dist/dts/features/Study/index.js +4 -0
  423. package/dist/dts/features/Study/index.js.map +1 -0
  424. package/dist/dts/features/Study/types.d.ts +91 -0
  425. package/dist/dts/features/Study/types.d.ts.map +1 -0
  426. package/dist/dts/features/Study/types.js +8 -0
  427. package/dist/dts/features/Study/types.js.map +1 -0
  428. package/dist/dts/features/Study/utils.d.ts +10 -0
  429. package/dist/dts/features/Study/utils.d.ts.map +1 -0
  430. package/dist/dts/features/Study/utils.js +28 -0
  431. package/dist/dts/features/Study/utils.js.map +1 -0
  432. package/dist/dts/features/Workspace/admin/WorkspacePanelsEditor.d.ts.map +1 -1
  433. package/dist/dts/features/Workspace/admin/WorkspacePanelsEditor.js.map +1 -1
  434. package/dist/dts/index.d.ts +3 -1
  435. package/dist/dts/index.d.ts.map +1 -1
  436. package/dist/dts/index.js +7 -1
  437. package/dist/dts/index.js.map +1 -1
  438. package/dist/dts/lib/session/session.d.ts.map +1 -1
  439. package/dist/dts/lib/session/session.js +16 -32
  440. package/dist/dts/lib/session/session.js.map +1 -1
  441. package/dist/dts/pages/Explorer/data.d.ts.map +1 -1
  442. package/dist/dts/pages/Explorer/data.js +28 -22
  443. package/dist/dts/pages/Explorer/data.js.map +1 -1
  444. package/dist/dts/pages/admin/analysis/Analysis.d.ts +1 -1
  445. package/dist/dts/pages/admin/analysis/Analysis.d.ts.map +1 -1
  446. package/dist/dts/pages/admin/analysis/Analysis.js +1 -1
  447. package/dist/dts/pages/admin/analysis/Analysis.js.map +1 -1
  448. package/dist/dts/types/icons.d.ts +4 -0
  449. package/dist/dts/types/icons.d.ts.map +1 -0
  450. package/dist/dts/types/icons.js +5 -0
  451. package/dist/dts/types/icons.js.map +1 -0
  452. package/dist/dts/utils/access.d.ts +10 -0
  453. package/dist/dts/utils/access.d.ts.map +1 -0
  454. package/dist/dts/utils/access.js +11 -0
  455. package/dist/dts/utils/access.js.map +1 -0
  456. package/dist/dts/utils/authMapping.d.ts +4 -0
  457. package/dist/dts/utils/authMapping.d.ts.map +1 -1
  458. package/dist/dts/utils/authMapping.js.map +1 -1
  459. package/dist/dts/utils/convertResourcePathsToTree.d.ts +8 -0
  460. package/dist/dts/utils/convertResourcePathsToTree.d.ts.map +1 -0
  461. package/dist/dts/utils/convertResourcePathsToTree.js +43 -0
  462. package/dist/dts/utils/convertResourcePathsToTree.js.map +1 -0
  463. package/dist/dts/utils/dataAuthorization.d.ts +11 -0
  464. package/dist/dts/utils/dataAuthorization.d.ts.map +1 -0
  465. package/dist/dts/utils/dataAuthorization.js +2 -0
  466. package/dist/dts/utils/dataAuthorization.js.map +1 -0
  467. package/dist/dts/utils/date.d.ts +16 -0
  468. package/dist/dts/utils/date.d.ts.map +1 -1
  469. package/dist/dts/utils/date.js +54 -8
  470. package/dist/dts/utils/date.js.map +1 -1
  471. package/dist/dts/utils/index.d.ts +2 -0
  472. package/dist/dts/utils/index.d.ts.map +1 -1
  473. package/dist/dts/utils/index.js +2 -0
  474. package/dist/dts/utils/index.js.map +1 -1
  475. package/dist/dts/utils/layout.d.ts +2 -0
  476. package/dist/dts/utils/layout.d.ts.map +1 -0
  477. package/dist/dts/utils/layout.js +20 -0
  478. package/dist/dts/utils/layout.js.map +1 -0
  479. package/dist/dts/utils/tests/convertResourcePathsToTree.unit.test.d.ts +2 -0
  480. package/dist/dts/utils/tests/convertResourcePathsToTree.unit.test.d.ts.map +1 -0
  481. package/dist/dts/utils/tests/convertResourcePathsToTree.unit.test.js +150 -0
  482. package/dist/dts/utils/tests/convertResourcePathsToTree.unit.test.js.map +1 -0
  483. package/dist/esm/index.js +5935 -3965
  484. package/dist/esm/index.js.map +1 -1
  485. package/dist/index.d.ts +214 -145
  486. package/dist/tsconfig.tsbuildinfo +1 -1
  487. package/package.json +7 -7
  488. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.d.ts +0 -1
  489. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.d.ts.map +0 -1
  490. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.js +0 -2
  491. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.js.map +0 -1
  492. package/dist/dts/features/CohortDiscovery/ActionButtonGroup.d.ts +0 -3
  493. package/dist/dts/features/CohortDiscovery/ActionButtonGroup.d.ts.map +0 -1
  494. package/dist/dts/features/CohortDiscovery/ActionButtonGroup.js +0 -13
  495. package/dist/dts/features/CohortDiscovery/ActionButtonGroup.js.map +0 -1
@@ -0,0 +1,149 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
49
+ import { useContext, useState } from 'react';
50
+ import { useDeepCompareEffect } from 'use-deep-compare';
51
+ import { Tooltip, MantineProvider, Button, useMantineTheme, } from '@mantine/core';
52
+ import { UndoIcon } from './commonIcons';
53
+ import GenericCohortModal from './modals/GenericCohortModal';
54
+ import SaveCohortModal from './modals/SaveCohortModal';
55
+ import CohortActions from './CohortActions';
56
+ import CohortSelector from './CohortSelector';
57
+ import { actionButtonVariant, darkFunctionVariant } from './style';
58
+ import { CohortNotificationContext } from './CohortNotificationProvider';
59
+ /**
60
+ * Component for the user to manage (save, delete, etc.) cohorts
61
+ * @param hooks - Collection of hooks for performing saving, deleting, etc. operations on cohorts
62
+ * @param invalidCohortNames - list of cohort names that the user is barred from using
63
+ * @param isFetchingCohorts - whether we are currently fetching cohorts from the server
64
+ * @param defaultCohortName - name of the default cohort that is created when the user first opens the app
65
+ */
66
+ var CohortManager = function (_a) {
67
+ var _b;
68
+ var hooks = _a.hooks, defaultCohortName = _a.defaultCohortName, _c = _a.invalidCohortNames, invalidCohortNames = _c === void 0 ? [] : _c, _d = _a.isFetchingCohorts, isFetchingCohorts = _d === void 0 ? false : _d;
69
+ var currentCohort = hooks.useSelectCurrentCohort();
70
+ var cohorts = hooks.useSelectAvailableCohorts();
71
+ var handleDelete = hooks.useDeleteCohort();
72
+ var handleDiscard = hooks.useDiscardChanges();
73
+ var handleUpdate = (hooks === null || hooks === void 0 ? void 0 : hooks.useUpdateFilters)
74
+ ? hooks.useUpdateFilters
75
+ : function () { return null; };
76
+ var setActiveCohort = hooks.useSetActiveCohort();
77
+ var addNewDefaultUnsavedCohort = hooks.useAddUnsavedCohort();
78
+ var _e = hooks.useImportCohort, useImportCohort = _e === void 0 ? function () { return undefined; } : _e, _f = hooks.useExportCohort, useExportCohort = _f === void 0 ? function () { return ({ handleExport: undefined, status: {} }); } : _f, _g = hooks.useCreateCohortExternally, useCreateCohortExternally = _g === void 0 ? function () { } : _g;
79
+ var _h = useState(false), showDelete = _h[0], setShowDelete = _h[1];
80
+ var _j = useState(false), showDiscard = _j[0], setShowDiscard = _j[1];
81
+ var _k = useState(false), showSaveCohort = _k[0], setShowSaveCohort = _k[1];
82
+ var _l = useState(false), showSaveAsCohort = _l[0], setShowSaveAsCohort = _l[1];
83
+ var _m = useState(false), showUpdateCohort = _m[0], setShowUpdateCohort = _m[1];
84
+ var theme = useMantineTheme();
85
+ var setCohortMessage = useContext(CohortNotificationContext);
86
+ useCreateCohortExternally(setCohortMessage);
87
+ useDeepCompareEffect(function () {
88
+ if (cohorts.length === 0 && !isFetchingCohorts) {
89
+ addNewDefaultUnsavedCohort();
90
+ setCohortMessage &&
91
+ setCohortMessage([{ cmd: 'newCohort', param1: defaultCohortName }]);
92
+ }
93
+ }, [
94
+ cohorts,
95
+ addNewDefaultUnsavedCohort,
96
+ defaultCohortName,
97
+ setCohortMessage,
98
+ isFetchingCohorts,
99
+ ]);
100
+ return (_jsx(MantineProvider, { theme: __assign(__assign({}, theme), { components: __assign(__assign({}, theme === null || theme === void 0 ? void 0 : theme.components), { Button: Button.extend({
101
+ classNames: {
102
+ root: "".concat(actionButtonVariant, " ").concat(darkFunctionVariant),
103
+ },
104
+ }) }) }), children: _jsx("div", { "data-tour": "cohort_management_bar", className: "flex flex-row items-center justify-start gap-6 px-4 h-18 shadow-lg bg-primary", children: currentCohort !== undefined && (_jsxs(_Fragment, { children: [_jsx("div", { className: "border-opacity-0", children: _jsxs("div", { className: "flex flex-wrap gap-2 lg:gap-4", children: [_jsxs("div", { className: "flex justify-center items-center", children: [_jsx(Tooltip, { label: "Discard Changes", position: "bottom", withArrow: true, children: _jsx("span", { children: _jsx(Button, { "data-testid": "discardButton", onClick: function () { return setShowDiscard(true); }, disabled: !currentCohort.modified, "aria-label": "Discard cohort changes", variant: "action", children: _jsx(UndoIcon, { "aria-hidden": "true" }) }) }) }), _jsx(CohortSelector, { selectAvailableCohorts: hooks.useSelectAvailableCohorts, selectCurrentCohort: hooks.useSelectCurrentCohort, setActiveCohort: setActiveCohort })] }), _jsx(CohortActions, { onSave: function () {
105
+ return currentCohort.saved
106
+ ? setShowUpdateCohort(true)
107
+ : setShowSaveCohort(true);
108
+ }, onSaveAs: function () { return setShowSaveAsCohort(true); }, onDelete: function () { return setShowDelete(true); }, selectCurrentCohort: hooks.useSelectCurrentCohort, selectAvailableCohorts: hooks.useSelectAvailableCohorts, addNewDefaultUnsavedCohort: addNewDefaultUnsavedCohort, useExportCohort: useExportCohort, useImportCohort: useImportCohort, defaultCohortName: defaultCohortName })] }) }), _jsx(GenericCohortModal, { title: "Delete Cohort", opened: showDelete, onClose: function () { return setShowDelete(false); }, actionText: "Delete", mainText: _jsxs(_Fragment, { children: ["Are you sure you want to permanently delete", ' ', _jsx("b", { children: currentCohort.name }), "?"] }), subText: _jsx(_Fragment, { children: "You cannot undo this action." }), onActionClick: function () {
109
+ handleDelete()
110
+ .then(function () {
111
+ setCohortMessage &&
112
+ setCohortMessage([
113
+ { cmd: 'deleteCohort', param1: currentCohort.name },
114
+ ]);
115
+ })
116
+ .catch(function () {
117
+ return setCohortMessage &&
118
+ setCohortMessage([{ cmd: 'error', param1: 'deleting' }]);
119
+ });
120
+ } }), _jsx(GenericCohortModal, { title: "Discard Changes", opened: showDiscard, onClose: function () { return setShowDiscard(false); }, actionText: "Discard", mainText: _jsx(_Fragment, { children: "Are you sure you want to permanently discard the unsaved changes?" }), subText: _jsx(_Fragment, { children: "You cannot undo this action." }), onActionClick: function () { return __awaiter(void 0, void 0, void 0, function () {
121
+ return __generator(this, function (_a) {
122
+ handleDiscard()
123
+ .then(function () {
124
+ return setCohortMessage &&
125
+ setCohortMessage([{ cmd: 'discardChanges' }]);
126
+ })
127
+ .catch(function () {
128
+ return setCohortMessage &&
129
+ setCohortMessage([
130
+ { cmd: 'error', param1: 'discarding' },
131
+ ]);
132
+ });
133
+ return [2 /*return*/];
134
+ });
135
+ }); } }), _jsx(GenericCohortModal, { title: "Save Cohort", opened: showUpdateCohort, onClose: function () { return setShowUpdateCohort(false); }, actionText: "Save", mainText: _jsxs(_Fragment, { children: ["Are you sure you want to save ", _jsx("b", { children: currentCohort.name }), "? This will overwrite your previously saved changes."] }), subText: _jsx(_Fragment, { children: "You cannot undo this action." }), onActionClick: function () {
136
+ setShowUpdateCohort(false);
137
+ handleUpdate();
138
+ setCohortMessage &&
139
+ setCohortMessage([
140
+ {
141
+ cmd: 'savedCurrentCohort',
142
+ },
143
+ ]);
144
+ } }), _jsx(SaveCohortModal, { initialName: !invalidCohortNames.includes((_b = currentCohort.name) === null || _b === void 0 ? void 0 : _b.toLowerCase())
145
+ ? currentCohort.name
146
+ : undefined, opened: showSaveCohort, onClose: function () { return setShowSaveCohort(false); }, cohortId: currentCohort.id, filters: currentCohort.filters, invalidCohortNames: invalidCohortNames, hooks: hooks }), _jsx(SaveCohortModal, { opened: showSaveAsCohort, initialName: currentCohort.name, onClose: function () { return setShowSaveAsCohort(false); }, cohortId: currentCohort.id, filters: currentCohort.filters, saveAs: true, invalidCohortNames: invalidCohortNames, hooks: hooks })] })) }) }));
147
+ };
148
+ export default CohortManager;
149
+ //# sourceMappingURL=CohortManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortManager.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortManager.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,OAAO,EACP,eAAe,EACf,MAAM,EACN,eAAe,GAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,kBAAkB,MAAM,6BAA6B,CAAC;AAC7D,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AASzE;;;;;;GAMG;AACH,IAAM,aAAa,GAAiC,UAAC,EAKpD;;QAJC,KAAK,WAAA,EACL,iBAAiB,uBAAA,EACjB,0BAAuB,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,yBAAyB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA;IAEzB,IAAM,aAA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AAW,EAAE,CAAC;4BAC7D,CAAC,CAAC,aAAa,CAAC,IAAI;4BACpB,CAAC,CAAC,SAAS,EAEf,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,cAAM,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB,EACvC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAC1B,OAAO,EAAE,aAAa,CAAC,OAAO,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,GACZ,EAEF,KAAC,eAAe,IACd,MAAM,EAAE,gBAAgB,EACxB,WAAW,EAAE,aAAa,CAAC,IAAI,EAC/B,OAAO,EAAE,cAAM,OAAA,mBAAmB,CAAC,KAAK,CAAC,EAA1B,CAA0B,EACzC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAC1B,OAAO,EAAE,aAAa,CAAC,OAAO,EAC9B,MAAM,QACN,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,GACZ,IACD,CACJ,GACG,GACU,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { CohortNotificationCommand } from './types';
3
+ export declare const CohortNotificationContext: React.Context<((cohortMessage: CohortNotificationCommand[]) => void) | undefined>;
4
+ interface CohortNotificationWrapperProps extends PropsWithChildren {
5
+ readonly useSetActiveCohort: () => (cohortId: string) => void;
6
+ }
7
+ declare const CohortNotificationProvider: React.FC<CohortNotificationWrapperProps>;
8
+ export default CohortNotificationProvider;
9
+ //# sourceMappingURL=CohortNotificationProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortNotificationProvider.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortNotificationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAc5E,OAAO,EACL,yBAAyB,EAE1B,MAAM,SAAS,CAAC;AAkBjB,eAAO,MAAM,yBAAyB,iCACnB,yBAAyB,EAAE,KAAK,IAAI,cAC3C,CAAC;AAEb,UAAU,8BAA+B,SAAQ,iBAAiB;IAChE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAED,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAoJxE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,122 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
9
+ };
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { createContext, useReducer } from 'react';
12
+ import { useDeepCompareCallback, useDeepCompareEffect } from 'use-deep-compare';
13
+ import { isEqual } from 'lodash';
14
+ import { showNotification } from '@mantine/notifications';
15
+ import { DeleteCohortNotification, DiscardChangesCohortNotification, ErrorCohortNotification, NewCohortNotification, SavedCohortNotification, SavedCohortNotificationWithSetAsCurrent, SavedCurrentCohortNotification, } from './CohortNotifications';
16
+ var cohortMessageReducer = function (state, action) {
17
+ switch (action.type) {
18
+ case 'update':
19
+ return __spreadArray(__spreadArray([], state, true), action.payload, true);
20
+ case 'clear':
21
+ return state.filter(function (message) { return !isEqual(message, action.payload); });
22
+ default:
23
+ return state;
24
+ }
25
+ };
26
+ export var CohortNotificationContext = createContext(undefined);
27
+ var CohortNotificationProvider = function (_a) {
28
+ var useSetActiveCohort = _a.useSetActiveCohort, children = _a.children;
29
+ var _b = useReducer(cohortMessageReducer, []), cohortMessage = _b[0], dispatch = _b[1];
30
+ useDeepCompareEffect(function () {
31
+ for (var _i = 0, cohortMessage_1 = cohortMessage; _i < cohortMessage_1.length; _i++) {
32
+ var message = cohortMessage_1[_i];
33
+ switch (message.cmd) {
34
+ case 'newCohort':
35
+ showNotification({
36
+ message: (_jsx(NewCohortNotification, { cohortName: message.param1 })),
37
+ classNames: {
38
+ description: 'flex flex-col content-center text-center',
39
+ },
40
+ autoClose: 5000,
41
+ closeButtonProps: { 'aria-label': 'Close notification' },
42
+ id: "new-cohort-".concat(message.param1),
43
+ });
44
+ break;
45
+ case 'deleteCohort':
46
+ showNotification({
47
+ message: (_jsx(DeleteCohortNotification, { cohortName: message.param1 })),
48
+ classNames: {
49
+ description: 'flex flex-col content-center text-center',
50
+ },
51
+ autoClose: 5000,
52
+ closeButtonProps: { 'aria-label': 'Close notification' },
53
+ id: "delete-cohort-".concat(message.param1),
54
+ });
55
+ break;
56
+ case 'savedCohort':
57
+ showNotification({
58
+ message: (_jsx(SavedCohortNotification, { cohortName: message.param1 })),
59
+ classNames: {
60
+ description: 'flex flex-col content-center text-center',
61
+ },
62
+ autoClose: 5000,
63
+ closeButtonProps: { 'aria-label': 'Close notification' },
64
+ id: "saved-cohort-".concat(message.param1),
65
+ });
66
+ break;
67
+ case 'savedCohortSetCurrent':
68
+ showNotification({
69
+ message: (_jsx(SavedCohortNotificationWithSetAsCurrent, { cohortName: message.param1, cohortId: message
70
+ .param2, useSetActiveCohort: useSetActiveCohort })),
71
+ classNames: {
72
+ description: 'flex flex-col content-center text-center',
73
+ },
74
+ autoClose: 5000,
75
+ closeButtonProps: { 'aria-label': 'Close notification' },
76
+ id: "saved-cohort-set-current-".concat(message.param2),
77
+ });
78
+ break;
79
+ case 'savedCurrentCohort':
80
+ showNotification({
81
+ message: _jsx(SavedCurrentCohortNotification, {}),
82
+ classNames: {
83
+ description: 'flex flex-col content-center text-center',
84
+ },
85
+ autoClose: 5000,
86
+ closeButtonProps: { 'aria-label': 'Close notification' },
87
+ id: 'saved-current-cohort',
88
+ });
89
+ break;
90
+ case 'discardChanges':
91
+ showNotification({
92
+ message: _jsx(DiscardChangesCohortNotification, {}),
93
+ classNames: {
94
+ description: 'flex flex-col content-center text-center',
95
+ },
96
+ autoClose: 5000,
97
+ closeButtonProps: { 'aria-label': 'Close notification' },
98
+ id: 'discard-changes',
99
+ });
100
+ break;
101
+ case 'error':
102
+ showNotification({
103
+ message: (_jsx(ErrorCohortNotification, { errorType: message.param1 })),
104
+ classNames: {
105
+ description: 'flex flex-col content-center text-center',
106
+ },
107
+ autoClose: 5000,
108
+ closeButtonProps: { 'aria-label': 'Close notification' },
109
+ id: "cohort-error-".concat(message.param1),
110
+ });
111
+ break;
112
+ }
113
+ dispatch({ type: 'clear', payload: message });
114
+ }
115
+ }, [cohortMessage, useSetActiveCohort]);
116
+ var updateCohortMessage = useDeepCompareCallback(function (newMessages) {
117
+ dispatch({ type: 'update', payload: newMessages });
118
+ }, [dispatch]);
119
+ return (_jsx(CohortNotificationContext.Provider, { value: updateCohortMessage, children: children }));
120
+ };
121
+ export default CohortNotificationProvider;
122
+ //# sourceMappingURL=CohortNotificationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortNotificationProvider.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortNotificationProvider.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAc,EAAE,aAAa,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,uCAAuC,EACvC,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAO/B,IAAM,oBAAoB,GAAG,UAC3B,KAAkC,EAClC,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,CAAC;wBACf,OAAO,EAAE,KAAC,gCAAgC,KAAG;wBAC7C,UAAU,EAAE;4BACV,WAAW,EAAE,0CAA0C;yBACxD;wBACD,SAAS,EAAE,IAAI;wBACf,gBAAgB,EAAE,EAAE,YAAY,EAAE,oBAAoB,EAAE;wBACxD,EAAE,EAAE,iBAAiB;qBACtB,CAAC,CAAC;oBACH,MAAM;gBACR,KAAK,OAAO;oBACV,gBAAgB,CAAC;wBACf,OAAO,EAAE,CACP,KAAC,uBAAuB,IACtB,SAAS,EACN,OAA8C,CAAC,MAAM,GAExD,CACH;wBACD,UAAU,EAAE;4BACV,WAAW,EAAE,0CAA0C;yBACxD;wBACD,SAAS,EAAE,IAAI;wBACf,gBAAgB,EAAE,EAAE,YAAY,EAAE,oBAAoB,EAAE;wBACxD,EAAE,EAAE,uBACD,OAA8C,CAAC,MAAM,CACtD;qBACH,CAAC,CAAC;oBACH,MAAM;YACV,CAAC;YACD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAExC,IAAM,mBAAmB,GAAG,sBAAsB,CAChD,UAAC,WAAwC;QACvC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IACrD,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,mBAAmB,YAC3D,QAAQ,GAC0B,CACtC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface CohortNotificationProps {
3
+ readonly cohortName: string;
4
+ }
5
+ export declare const NewCohortNotification: React.FC<CohortNotificationProps>;
6
+ export declare const SavedCohortNotification: React.FC<CohortNotificationProps>;
7
+ export interface CohortWithSetOptionNotificationProps extends CohortNotificationProps {
8
+ readonly cohortId: string;
9
+ readonly useSetActiveCohort: () => (cohortId: string) => void;
10
+ }
11
+ export declare const NewCohortNotificationWithSetAsCurrent: React.FC<CohortWithSetOptionNotificationProps>;
12
+ export declare const SavedCohortNotificationWithSetAsCurrent: React.FC<CohortWithSetOptionNotificationProps>;
13
+ export declare const DeleteCohortNotification: React.FC<CohortNotificationProps>;
14
+ export declare const SavedCurrentCohortNotification: React.FC;
15
+ export declare const DiscardChangesCohortNotification: React.FC;
16
+ export declare const ErrorCohortNotification: ({ errorType, }: {
17
+ errorType: string;
18
+ }) => JSX.Element;
19
+ //# sourceMappingURL=CohortNotifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortNotifications.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAUnE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAUrE,CAAC;AAEF,MAAM,WAAW,oCACf,SAAQ,uBAAuB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAED,eAAO,MAAM,qCAAqC,EAAE,KAAK,CAAC,EAAE,CAC1D,oCAAoC,CAwBrC,CAAC;AAEF,eAAO,MAAM,uCAAuC,EAAE,KAAK,CAAC,EAAE,CAC5D,oCAAoC,CAwBrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAUtE,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,KAAK,CAAC,EAMlD,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAMpD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,gBAErC;IACD,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,GAAG,CAAC,OAcP,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button } from '@mantine/core';
3
+ import { cleanNotifications } from '@mantine/notifications';
4
+ export var NewCohortNotification = function (_a) {
5
+ var cohortName = _a.cohortName;
6
+ return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been created. This is now your current cohort."] }) }));
7
+ };
8
+ export var SavedCohortNotification = function (_a) {
9
+ var cohortName = _a.cohortName;
10
+ return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been saved. This is now your current cohort."] }) }));
11
+ };
12
+ export var NewCohortNotificationWithSetAsCurrent = function (_a) {
13
+ var cohortName = _a.cohortName, cohortId = _a.cohortId, useSetActiveCohort = _a.useSetActiveCohort;
14
+ var setActiveCohort = useSetActiveCohort();
15
+ return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been created.", _jsx(Button, { variant: "white", onClick: function () {
16
+ setActiveCohort(cohortId);
17
+ cleanNotifications();
18
+ }, children: "Set this as your current cohort." })] }) }));
19
+ };
20
+ export var SavedCohortNotificationWithSetAsCurrent = function (_a) {
21
+ var cohortName = _a.cohortName, cohortId = _a.cohortId, useSetActiveCohort = _a.useSetActiveCohort;
22
+ var setActiveCohort = useSetActiveCohort();
23
+ return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been saved.", _jsx(Button, { variant: "white", onClick: function () {
24
+ setActiveCohort(cohortId);
25
+ cleanNotifications();
26
+ }, children: "Set this as your current cohort." })] }) }));
27
+ };
28
+ export var DeleteCohortNotification = function (_a) {
29
+ var cohortName = _a.cohortName;
30
+ return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been deleted."] }) }));
31
+ };
32
+ export var SavedCurrentCohortNotification = function () {
33
+ return (_jsx(_Fragment, { children: _jsx("p", { children: "Cohort has been saved." }) }));
34
+ };
35
+ export var DiscardChangesCohortNotification = function () {
36
+ return (_jsx(_Fragment, { children: _jsx("p", { children: "Cohort changes have been discarded." }) }));
37
+ };
38
+ export var ErrorCohortNotification = function (_a) {
39
+ var errorType = _a.errorType;
40
+ var errorText = '';
41
+ if (errorType === 'saving') {
42
+ errorText = 'There was a problem saving the cohort.';
43
+ }
44
+ else if (errorType === 'deleting') {
45
+ errorText = 'There was a problem deleting the cohort.';
46
+ }
47
+ else if (errorType === 'discarding') {
48
+ errorText = 'There was a problem discarding the unsaved changes';
49
+ }
50
+ return (_jsx(_Fragment, { children: _jsx("p", { children: errorText }) }));
51
+ };
52
+ //# sourceMappingURL=CohortNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortNotifications.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortNotifications.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,MAAM,CAAC,IAAM,qBAAqB,GAAsC,UAAC,EAE/C;QADxB,UAAU,gBAAA;IAEV,OAAO,CACL,4BACE,wBACE,sBAAI,UAAU,GAAK,2DACjB,GACH,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,uBAAuB,GAAsC,UAAC,EAEjD;QADxB,UAAU,gBAAA;IAEV,OAAO,CACL,4BACE,wBACE,sBAAI,UAAU,GAAK,yDACjB,GACH,CACJ,CAAC;AACJ,CAAC,CAAC;AAQ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I,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC3B,SAAS,GAAG,wCAAwC,CAAC;IACvD,CAAC;SAAM,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QACpC,SAAS,GAAG,0CAA0C,CAAC;IACzD,CAAC;SAAM,IAAI,SAAS,KAAK,YAAY,EAAE,CAAC;QACtC,SAAS,GAAG,oDAAoD,CAAC;IACnE,CAAC;IACD,OAAO,CACL,4BACE,sBAAI,SAAS,GAAK,GACjB,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Cohort } from './types';
3
+ interface CohortSelectorProps {
4
+ readonly selectAvailableCohorts: () => Cohort[];
5
+ readonly selectCurrentCohort: () => Cohort;
6
+ readonly setActiveCohort: (newCohort: string) => void;
7
+ }
8
+ declare const CohortSelector2: React.FC<CohortSelectorProps>;
9
+ export default CohortSelector2;
10
+ //# sourceMappingURL=CohortSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortSelector.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,sBAAsB,EAAE,MAAM,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAC3C,QAAQ,CAAC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqElD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useDeepCompareMemo } from 'use-deep-compare';
3
+ import { Select } from '@mantine/core';
4
+ import { UnsavedIcon, CustomCohortSelectItem } from './CustomCohortSelectItem';
5
+ import { FaCaretDown as DropdownIcon } from 'react-icons/fa';
6
+ var CohortSelector2 = function (_a) {
7
+ var selectAvailableCohorts = _a.selectAvailableCohorts, selectCurrentCohort = _a.selectCurrentCohort, setActiveCohort = _a.setActiveCohort;
8
+ var cohorts = selectAvailableCohorts();
9
+ var currentCohort = selectCurrentCohort();
10
+ var cohortStatusMessage = currentCohort.saved
11
+ ? 'Changes not saved'
12
+ : 'Cohort not saved';
13
+ var isSavedUnchanged = currentCohort.saved && !currentCohort.modified;
14
+ var cohortList = useDeepCompareMemo(function () {
15
+ return cohorts
16
+ .sort(function (a, b) { return (a.modified_datetime <= b.modified_datetime ? 1 : -1); })
17
+ .map(function (x) { return ({
18
+ value: x.id,
19
+ label: x.name,
20
+ isSavedUnchanged: x.saved && !x.modified,
21
+ cohortStatusMessage: x.saved
22
+ ? 'Changes not saved'
23
+ : 'Cohort not saved',
24
+ }); });
25
+ }, [cohorts]);
26
+ return (_jsxs("div", { className: "flex flex-col pt-5", "data-testid": "cohort-list-dropdown", children: [_jsx(Select, { data: cohortList, searchable: true, clearable: false, value: currentCohort.id, onChange: function (id) {
27
+ if (id !== null) {
28
+ setActiveCohort(id);
29
+ }
30
+ }, renderOption: CustomCohortSelectItem, classNames: {
31
+ root: 'border-secondary-darkest w-56 md:w-80 z-[290]',
32
+ input: 'text-heading font-medium text-primary-darkest rounded-l-none h-[50px] border-primary border-l-2',
33
+ option: 'text-heading font-normal text-primary-darkest data-selected:bg-primary-lighter hover:bg-accent-lightest hover:text-accent-contrast-lightest my-0.5',
34
+ }, "aria-label": "Select cohort", "data-testid": "switchButton", rightSection: _jsxs("div", { className: "flex gap-1 items-center", children: [!isSavedUnchanged && _jsx(UnsavedIcon, { label: cohortStatusMessage }), _jsx(DropdownIcon, { size: 20, className: "text-primary" })] }), rightSectionWidth: !isSavedUnchanged ? 45 : 30, styles: { section: { pointerEvents: 'none' } } }), _jsx("div", { "data-testid": "text-cohort-bar-message", className: "ml-auto text-heading text-sm font-semibold mt-0.85 text-primary-contrast ".concat(!isSavedUnchanged ? 'visible' : 'invisible'), children: cohortStatusMessage })] }));
35
+ };
36
+ export default CohortSelector2;
37
+ //# sourceMappingURL=CohortSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CohortSelector.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortSelector.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ7D,IAAM,eAAe,GAAkC,UAAC,EAIvD;QAHC,sBAAsB,4BAAA,EACtB,mBAAmB,yBAAA,EACnB,eAAe,qBAAA;IAEf,IAAM,OAAO,GAAG,sBAAsB,EAAE,CAAC;IACzC,IAAM,aAAa,GAAG,mBAAmB,EAAE,CAAC;IAE5C,IAAM,mBAAmB,GAAG,aAAa,CAAC,KAAK;QAC7C,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,kBAAkB,CAAC;IACvB,IAAM,gBAAgB,GAAG,aAAa,CAAC,KAAK,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;IAExE,IAAM,UAAU,GAAG,kBAAkB,CACnC;QACE,OAAA,OAAO;aACJ,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAArD,CAAqD,CAAC;aACrE,GAAG,CAAC,UAAC,CAAC,IAAK,OA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,CAAC,WAAW,CAC3C,YAED,mBAAmB,GAChB,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ComboboxItem, ComboboxLikeRenderOptionInput } from '@mantine/core';
3
+ interface UnsavedIconProps {
4
+ readonly label: string;
5
+ }
6
+ export declare const UnsavedIcon: React.FC<UnsavedIconProps>;
7
+ export interface ComboboxItemModified extends ComboboxItem {
8
+ readonly isSavedUnchanged: boolean;
9
+ readonly cohortStatusMessage: string;
10
+ }
11
+ export declare const CustomCohortSelectItem: ({ option: { value, label, isSavedUnchanged, cohortStatusMessage, ...others }, }: ComboboxLikeRenderOptionInput<ComboboxItemModified>) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=CustomCohortSelectItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomCohortSelectItem.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CustomCohortSelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,YAAY,EACZ,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAEvB,UAAU,gBAAgB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+ClD,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,eAAO,MAAM,sBAAsB,GAAI,iFAEpC,6BAA6B,CAAC,oBAAoB,CAAC,4CAWrD,CAAC"}
@@ -0,0 +1,33 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { Tooltip, } from '@mantine/core';
25
+ export var UnsavedIcon = function (_a) {
26
+ var label = _a.label;
27
+ return (_jsx(Tooltip, { label: label, withArrow: true, children: _jsx("span", { className: "leading-0 pointer-events-auto", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", role: "img", children: [_jsx("title", { children: label }), _jsxs("g", { id: "Group_811", "data-name": "Group 811", transform: "translate(-1952 -56)", children: [_jsx("circle", { id: "Ellipse_39", "data-name": "Ellipse 39", cx: "8", cy: "8", r: "8", transform: "translate(1952 56)", fill: "#fff" }), _jsx("circle", { id: "Ellipse_38", "data-name": "Ellipse 38", cx: "7", cy: "7", r: "7", transform: "translate(1953 57)", fill: "#825d00" }), _jsx("path", { id: "Icon_awesome-exclamation-circle", "data-name": "Icon awesome-exclamation-circle", d: "M12.563,6.563a6,6,0,1,1-6-6A6,6,0,0,1,12.563,6.563Zm-6,1.21A1.113,1.113,0,1,0,7.675,8.885,1.113,1.113,0,0,0,6.563,7.772Zm-1.057-4,.179,3.29a.29.29,0,0,0,.29.275H7.15a.29.29,0,0,0,.29-.275l.179-3.29a.29.29,0,0,0-.29-.306H5.8A.29.29,0,0,0,5.506,3.772Z", transform: "translate(1953.438 57.524)", fill: "#faaf00" })] })] }) }) }));
28
+ };
29
+ export var CustomCohortSelectItem = function (_a) {
30
+ var _b = _a.option, value = _b.value, label = _b.label, isSavedUnchanged = _b.isSavedUnchanged, cohortStatusMessage = _b.cohortStatusMessage, others = __rest(_b, ["value", "label", "isSavedUnchanged", "cohortStatusMessage"]);
31
+ return (_jsx("div", __assign({}, others, { className: "w-full", children: _jsxs("span", { className: "flex justify-between gap-2 items-center", children: [_jsx("span", { className: "basis-11/12 break-all", children: label }), _jsx("div", { className: "basis-1/12 text-right leading-0", children: !isSavedUnchanged && _jsx(UnsavedIcon, { label: cohortStatusMessage }) })] }) })));
32
+ };
33
+ //# sourceMappingURL=CustomCohortSelectItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomCohortSelectItem.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CustomCohortSelectItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACL,OAAO,GAGR,MAAM,eAAe,CAAC;AAMvB,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAAS;QAAP,KAAK,WAAA;IAC7D,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,kBAC9B,eAAM,SAAS,EAAC,+BAA+B,YAC7C,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,KAAK,aAEV,0BAAQ,KAAK,GAAS,EACtB,aACE,EAAE,EAAC,WAAW,eACJ,WAAW,EACrB,SAAS,EAAC,sBAAsB,aAEhC,iBACE,EAAE,EAAC,YAAY,eACL,YAAY,EACtB,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,MAAM,GACX,EACF,iBACE,EAAE,EAAC,YAAY,eACL,YAAY,EACtB,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,SAAS,GACd,EACF,eACE,EAAE,EAAC,iCAAiC,eAC1B,iCAAiC,EAC3C,CAAC,EAAC,2PAA2P,EAC7P,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,SAAS,GACd,IACA,IACA,GACD,GACC,CACX,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAC,EAEe;QADpD,cAA0E,EAAhE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,gBAAgB,sBAAA,EAAE,mBAAmB,yBAAA,EAAK,MAAM,cAAhE,6DAAkE,CAAF;IAExE,OAAO,CACL,yBAAS,MAAM,IAAE,SAAS,EAAC,QAAQ,YACjC,gBAAM,SAAS,EAAC,yCAAyC,aACvD,eAAM,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAQ,EACtD,cAAK,SAAS,EAAC,iCAAiC,YAC7C,CAAC,gBAAgB,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,mBAAmB,GAAI,GAC7D,IACD,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const useSelectAvailableCohorts: () => import("@gen3/core").Cohort[];
2
+ export declare const useSelectCurrentCohort: () => import("@gen3/core").Cohort;
3
+ export declare const useAddUnsavedCohort: () => () => void;
4
+ export declare const useSetActiveCohort: () => (id: string) => void;
5
+ export declare const useDeleteCohort: () => () => Promise<void>;
6
+ export declare const useImportCohort: () => () => void;
7
+ //# sourceMappingURL=cohortActionHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cohortActionHooks.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/cohortActionHooks.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,yBAAyB,qCAErC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mCAElC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBAM/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAItB,MAAM,SAOd,CAAC;AAEF,eAAO,MAAM,eAAe,2BAiB3B,CAAC;AAEF,eAAO,MAAM,eAAe,kBAM3B,CAAC"}
@@ -0,0 +1,80 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { useDeepCompareCallback } from 'use-deep-compare';
38
+ import { addNewDefaultUnsavedCohort, selectAvailableCohorts, selectCurrentCohort, useCoreDispatch, useCoreSelector, setActiveCohort, removeCohort, } from '@gen3/core';
39
+ export var useSelectAvailableCohorts = function () {
40
+ return useCoreSelector(function (state) { return selectAvailableCohorts(state); });
41
+ };
42
+ export var useSelectCurrentCohort = function () {
43
+ return useCoreSelector(function (state) { return selectCurrentCohort(state); });
44
+ };
45
+ export var useAddUnsavedCohort = function () {
46
+ var coreDispatch = useCoreDispatch();
47
+ return function () {
48
+ coreDispatch(addNewDefaultUnsavedCohort());
49
+ };
50
+ };
51
+ export var useSetActiveCohort = function () {
52
+ var coreDispatch = useCoreDispatch();
53
+ var handleCohortChange = useDeepCompareCallback(function (id) {
54
+ coreDispatch(setActiveCohort(id));
55
+ }, [coreDispatch]);
56
+ return handleCohortChange;
57
+ };
58
+ export var useDeleteCohort = function () {
59
+ var coreDispatch = useCoreDispatch();
60
+ var currentCohort = useCoreSelector(selectCurrentCohort);
61
+ var deleteCohort = useDeepCompareCallback(function () {
62
+ coreDispatch(removeCohort({}));
63
+ }, [coreDispatch]);
64
+ var handleDelete = useDeepCompareCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
65
+ return __generator(this, function (_a) {
66
+ return [2 /*return*/, new Promise(function (resolve, reject) {
67
+ // only delete cohort from BE if it's been saved before
68
+ deleteCohort();
69
+ resolve();
70
+ })];
71
+ });
72
+ }); }, [currentCohort, deleteCohort]);
73
+ return handleDelete;
74
+ };
75
+ export var useImportCohort = function () {
76
+ var coreDispatch = useCoreDispatch();
77
+ var handleImport = useDeepCompareCallback(function () { }, [coreDispatch]);
78
+ return handleImport;
79
+ };
80
+ //# sourceMappingURL=cohortActionHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cohortActionHooks.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/cohortActionHooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,IAAM,yBAAyB,GAAG;IACvC,OAAO,eAAe,CAAC,UAAC,KAAK,IAAK,OAAA,sBAAsB,CAAC,KAAK,CAAC,EAA7B,CAA6B,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG;IACpC,OAAO,eAAe,CAAC,UAAC,KAAK,IAAK,OAAA,mBAAmB,CAAC,KAAK,CAAC,EAA1B,CAA0B,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG;IACjC,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO;QACL,YAAY,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG;IAChC,IAAM,YAAY,GAAG,eAA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