@gen3/frontend 0.11.11 → 0.11.12

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 (192) hide show
  1. package/dist/cjs/index.js +979 -722
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/MessageCards/ErrorMessage.js +1 -1
  4. package/dist/dts/components/MessageCards/ErrorMessage.js.map +1 -1
  5. package/dist/dts/components/facets/FacetSelectionModal.d.ts +1 -2
  6. package/dist/dts/components/facets/FacetSelectionModal.d.ts.map +1 -1
  7. package/dist/dts/components/facets/FacetSelectionModal.js.map +1 -1
  8. package/dist/dts/components/facets/FacetSelector.d.ts +1 -2
  9. package/dist/dts/components/facets/FacetSelector.d.ts.map +1 -1
  10. package/dist/dts/components/facets/FacetSelector.js +1 -1
  11. package/dist/dts/components/facets/FacetSelector.js.map +1 -1
  12. package/dist/dts/components/facets/FacetTabs.d.ts +1 -2
  13. package/dist/dts/components/facets/FacetTabs.d.ts.map +1 -1
  14. package/dist/dts/components/facets/FacetTabs.js.map +1 -1
  15. package/dist/dts/components/facets/FiltersPanel.d.ts +9 -0
  16. package/dist/dts/components/facets/FiltersPanel.d.ts.map +1 -0
  17. package/dist/dts/{features/CohortBuilder → components/facets}/FiltersPanel.js +3 -2
  18. package/dist/dts/components/facets/FiltersPanel.js.map +1 -0
  19. package/dist/dts/components/facets/Panels/AccordianPanel.d.ts.map +1 -0
  20. package/dist/dts/{features/CohortBuilder → components/facets}/Panels/AccordianPanel.js +1 -1
  21. package/dist/dts/components/facets/Panels/AccordianPanel.js.map +1 -0
  22. package/dist/dts/components/facets/Panels/DropdownPanel.d.ts.map +1 -0
  23. package/dist/dts/{features/CohortBuilder → components/facets}/Panels/DropdownPanel.js +3 -3
  24. package/dist/dts/components/facets/Panels/DropdownPanel.js.map +1 -0
  25. package/dist/dts/components/facets/Panels/TabbedPanel.d.ts +4 -0
  26. package/dist/dts/components/facets/Panels/TabbedPanel.d.ts.map +1 -0
  27. package/dist/dts/{features/CohortBuilder → components/facets}/Panels/TabbedPanel.js +3 -2
  28. package/dist/dts/components/facets/Panels/TabbedPanel.js.map +1 -0
  29. package/dist/dts/components/facets/Panels/index.d.ts +5 -0
  30. package/dist/dts/components/facets/Panels/index.d.ts.map +1 -0
  31. package/dist/dts/components/facets/Panels/index.js +5 -0
  32. package/dist/dts/components/facets/Panels/index.js.map +1 -0
  33. package/dist/dts/{features/CohortBuilder → components/facets}/Panels/types.d.ts +4 -3
  34. package/dist/dts/components/facets/Panels/types.d.ts.map +1 -0
  35. package/dist/dts/components/facets/Panels/types.js.map +1 -0
  36. package/dist/dts/components/facets/createFacetCard.d.ts +1 -2
  37. package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
  38. package/dist/dts/components/facets/createFacetCard.js.map +1 -1
  39. package/dist/dts/components/facets/createFacetCards.d.ts +1 -2
  40. package/dist/dts/components/facets/createFacetCards.d.ts.map +1 -1
  41. package/dist/dts/components/facets/createFacetCards.js.map +1 -1
  42. package/dist/dts/components/facets/index.d.ts +6 -1
  43. package/dist/dts/components/facets/index.d.ts.map +1 -1
  44. package/dist/dts/components/facets/index.js +6 -1
  45. package/dist/dts/components/facets/index.js.map +1 -1
  46. package/dist/dts/components/facets/types.d.ts +13 -2
  47. package/dist/dts/components/facets/types.d.ts.map +1 -1
  48. package/dist/dts/components/facets/utils.d.ts +2 -2
  49. package/dist/dts/components/facets/utils.d.ts.map +1 -1
  50. package/dist/dts/components/facets/utils.js +1 -1
  51. package/dist/dts/components/facets/utils.js.map +1 -1
  52. package/dist/dts/features/Analysis/AnalysisCard.js +1 -1
  53. package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -1
  54. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
  55. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +1 -1
  56. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +1 -1
  57. package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
  58. package/dist/dts/features/CohortBuilder/CohortPanel.js +1 -1
  59. package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
  60. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
  61. package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.d.ts.map +1 -1
  62. package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.js +16 -32
  63. package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.js.map +1 -1
  64. package/dist/dts/features/CohortBuilder/types.d.ts +2 -2
  65. package/dist/dts/features/CohortBuilder/types.d.ts.map +1 -1
  66. package/dist/dts/features/CohortBuilder/types.js.map +1 -1
  67. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts +2 -1
  68. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
  69. package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
  70. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts +16 -16
  71. package/dist/dts/features/CohortDiscovery/FacetDefinitionsSlice.d.ts +1 -1
  72. package/dist/dts/features/CohortDiscovery/FacetDefinitionsSlice.d.ts.map +1 -1
  73. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts +1 -2
  74. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts.map +1 -1
  75. package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js.map +1 -1
  76. package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts +2 -2
  77. package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts.map +1 -1
  78. package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.js.map +1 -1
  79. package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts +7 -7
  80. package/dist/dts/features/CohortDiscovery/appApi.d.ts +2 -2
  81. package/dist/dts/index.d.ts +3 -1
  82. package/dist/dts/index.d.ts.map +1 -1
  83. package/dist/dts/index.js +3 -1
  84. package/dist/dts/index.js.map +1 -1
  85. package/dist/esm/index.js +980 -729
  86. package/dist/esm/index.js.map +1 -1
  87. package/dist/index.d.ts +134 -5
  88. package/dist/tsconfig.tsbuildinfo +1 -1
  89. package/package.json +3 -3
  90. package/dist/dts/api/staticNotebook/index.d.ts +0 -4
  91. package/dist/dts/api/staticNotebook/index.d.ts.map +0 -1
  92. package/dist/dts/api/staticNotebook/index.js +0 -118
  93. package/dist/dts/api/staticNotebook/index.js.map +0 -1
  94. package/dist/dts/api/staticNotebooks/index.d.ts +0 -4
  95. package/dist/dts/api/staticNotebooks/index.d.ts.map +0 -1
  96. package/dist/dts/api/staticNotebooks/index.js +0 -118
  97. package/dist/dts/api/staticNotebooks/index.js.map +0 -1
  98. package/dist/dts/features/CohortBuilder/FiltersPanel.d.ts +0 -10
  99. package/dist/dts/features/CohortBuilder/FiltersPanel.d.ts.map +0 -1
  100. package/dist/dts/features/CohortBuilder/FiltersPanel.js.map +0 -1
  101. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts.map +0 -1
  102. package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js.map +0 -1
  103. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts.map +0 -1
  104. package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js.map +0 -1
  105. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts +0 -3
  106. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts.map +0 -1
  107. package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js.map +0 -1
  108. package/dist/dts/features/CohortBuilder/Panels/types.d.ts.map +0 -1
  109. package/dist/dts/features/CohortBuilder/Panels/types.js.map +0 -1
  110. package/dist/dts/features/CohortDiscovery/CohortManager.d.ts +0 -6
  111. package/dist/dts/features/CohortDiscovery/CohortManager.d.ts.map +0 -1
  112. package/dist/dts/features/CohortDiscovery/CohortManager.js +0 -55
  113. package/dist/dts/features/CohortDiscovery/CohortManager.js.map +0 -1
  114. package/dist/dts/features/CohortDiscovery/CohortManagerSlice.d.ts +0 -135
  115. package/dist/dts/features/CohortDiscovery/CohortManagerSlice.d.ts.map +0 -1
  116. package/dist/dts/features/CohortDiscovery/CohortManagerSlice.js +0 -40
  117. package/dist/dts/features/CohortDiscovery/CohortManagerSlice.js.map +0 -1
  118. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.d.ts +0 -3
  119. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.d.ts.map +0 -1
  120. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.js +0 -9
  121. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.js.map +0 -1
  122. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.d.ts +0 -7
  123. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.d.ts.map +0 -1
  124. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.js +0 -101
  125. package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.js.map +0 -1
  126. package/dist/dts/features/CohortDiscovery/appApiRTKQ.d.ts +0 -1
  127. package/dist/dts/features/CohortDiscovery/appApiRTKQ.d.ts.map +0 -1
  128. package/dist/dts/features/CohortDiscovery/appApiRTKQ.js +0 -101
  129. package/dist/dts/features/CohortDiscovery/appApiRTKQ.js.map +0 -1
  130. package/dist/dts/features/Discovery/Charts/ChartsPanel.d.ts +0 -9
  131. package/dist/dts/features/Discovery/Charts/ChartsPanel.d.ts.map +0 -1
  132. package/dist/dts/features/Discovery/Charts/ChartsPanel.js +0 -24
  133. package/dist/dts/features/Discovery/Charts/ChartsPanel.js.map +0 -1
  134. package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts +0 -9
  135. package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts.map +0 -1
  136. package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js +0 -24
  137. package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js.map +0 -1
  138. package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.d.ts +0 -9
  139. package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.d.ts.map +0 -1
  140. package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.js +0 -12
  141. package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.js.map +0 -1
  142. package/dist/dts/features/Discovery/StudyDetails/RendererFactory.d.ts +0 -19
  143. package/dist/dts/features/Discovery/StudyDetails/RendererFactory.d.ts.map +0 -1
  144. package/dist/dts/features/Discovery/StudyDetails/RendererFactory.js +0 -56
  145. package/dist/dts/features/Discovery/StudyDetails/RendererFactory.js.map +0 -1
  146. package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.d.ts +0 -14
  147. package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.d.ts.map +0 -1
  148. package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.js +0 -44
  149. package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.js.map +0 -1
  150. package/dist/dts/features/Discovery/StudyDetails/StudyDetails.d.ts +0 -3
  151. package/dist/dts/features/Discovery/StudyDetails/StudyDetails.d.ts.map +0 -1
  152. package/dist/dts/features/Discovery/StudyDetails/StudyDetails.js +0 -37
  153. package/dist/dts/features/Discovery/StudyDetails/StudyDetails.js.map +0 -1
  154. package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.d.ts +0 -10
  155. package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.d.ts.map +0 -1
  156. package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.js +0 -19
  157. package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.js.map +0 -1
  158. package/dist/dts/features/Discovery/StudyDetails/StudyGroup.d.ts +0 -8
  159. package/dist/dts/features/Discovery/StudyDetails/StudyGroup.d.ts.map +0 -1
  160. package/dist/dts/features/Discovery/StudyDetails/StudyGroup.js +0 -31
  161. package/dist/dts/features/Discovery/StudyDetails/StudyGroup.js.map +0 -1
  162. package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.d.ts +0 -9
  163. package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.d.ts.map +0 -1
  164. package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.js +0 -11
  165. package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.js.map +0 -1
  166. package/dist/dts/features/Discovery/StudyDetails/StudyItems.d.ts +0 -5
  167. package/dist/dts/features/Discovery/StudyDetails/StudyItems.d.ts.map +0 -1
  168. package/dist/dts/features/Discovery/StudyDetails/StudyItems.js +0 -283
  169. package/dist/dts/features/Discovery/StudyDetails/StudyItems.js.map +0 -1
  170. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.d.ts +0 -10
  171. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.d.ts.map +0 -1
  172. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js +0 -45
  173. package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js.map +0 -1
  174. package/dist/dts/features/Discovery/StudyPage/StudyPage.d.ts +0 -10
  175. package/dist/dts/features/Discovery/StudyPage/StudyPage.d.ts.map +0 -1
  176. package/dist/dts/features/Discovery/StudyPage/StudyPage.js +0 -11
  177. package/dist/dts/features/Discovery/StudyPage/StudyPage.js.map +0 -1
  178. package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.d.ts +0 -9
  179. package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.d.ts.map +0 -1
  180. package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.js +0 -8
  181. package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.js.map +0 -1
  182. package/dist/dts/features/StaticNotebook/StaticNotebook.d.ts +0 -4
  183. package/dist/dts/features/StaticNotebook/StaticNotebook.d.ts.map +0 -1
  184. package/dist/dts/features/StaticNotebook/StaticNotebook.js +0 -79
  185. package/dist/dts/features/StaticNotebook/StaticNotebook.js.map +0 -1
  186. package/dist/dts/lib/notebooks/index.d.ts +0 -3
  187. package/dist/dts/lib/notebooks/index.d.ts.map +0 -1
  188. package/dist/dts/lib/notebooks/index.js +0 -96
  189. package/dist/dts/lib/notebooks/index.js.map +0 -1
  190. /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/AccordianPanel.d.ts +0 -0
  191. /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/DropdownPanel.d.ts +0 -0
  192. /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/types.js +0 -0
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, useGetCSRFQuery, useLazyFetchUserDetailsQuery, selectUserAuthStatus, GEN3_REDIRECT_URL, GEN3_FENCE_API, showModal, Modals, isAuthenticated, useGetLoginProvidersQuery, hideModal, selectCurrentModal, fieldNameToTitle, isOperationWithField, selectShouldShareFilters, selectSharedFilters, updateCohortFilter as updateCohortFilter$1, selectIndexedFilterByName, isUnion, isOperatorWithFieldAndArrayOfOperands, extractEnumFilterValue, removeCohortFilter as removeCohortFilter$1, trimFirstFieldNameToTitle, useIsUserLoggedIn, GEN3_DOMAIN, useDataLibrary, DataLibraryStoreMode, buildListItemsGroupedByDataset, extractFileDatasetsInRecords, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, setCohortFilter as setCohortFilter$1, clearCohortFilters as clearCohortFilters$1, handleOperation, selectAvailableCohorts, selectCurrentCohortId as selectCurrentCohortId$1, selectCohortFilters, selectCurrentCohortModified, selectCurrentCohortSaved, setCohortIndexFilters, setActiveCohort, toggleCohortBuilderCategoryFilter, selectCohortFilterExpanded, setCohortFilterCombineMode, selectCohortFilterCombineMode, selectCurrentCohortName as selectCurrentCohortName$1, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, isJSONValue, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, Accessibility, selectAllCohortFiltersCollapsed, toggleCohortBuilderAllFilters, setShouldShareFilters, useGetAggsQuery, useGetAggsNoFilterSelfQuery, isIntersection, useGetCountsQuery, setSharedFilters, usePrevious, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, useSetCurrentPayModelMutation, PodStatus, PodConditionType, isWorkspaceRunningOrStopping, GEN3_API, GEN3_COMMONS_NAME, getTimestamp, createAppStore, getRemoteSupportServiceRegistry, isHttpStatusError, MissingServiceConfigurationError, useLazyGetAggsNoFilterSelfQuery, useCreateRequestMutation, buildGetAggregationQuery, processHistogramResponse, roundHistogramResponse, selectCSRFToken, useUserRequestQuery, getGen3AppId, createGen3AppWithOwnStore, createAppApiForRTKQ, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, fetchJSONDataFromURL, HttpMethod, groupSharedFields, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, getFederatedLoginStatus, queryMultipleMDSRecords, GEN3_MANIFEST_API, extractIndexFromDataLibraryCohort, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
- import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Center, Loader, Tooltip, UnstyledButton, ThemeIcon, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Accordion, Switch, ActionIcon, Badge, TextInput, SegmentedControl, NumberInput, RangeSlider, MultiSelect, SimpleGrid, Highlight, MantineProvider, Tabs, Flex, Menu, Alert, Drawer, CopyButton, factory, useProps, getStyleObject, Paper, useCombobox, Combobox, ScrollArea, Autocomplete, Title, Transition, rem, Stepper, Image as Image$1, NavLink, 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, isOperationWithField, selectShouldShareFilters, selectSharedFilters, updateCohortFilter as updateCohortFilter$1, selectIndexedFilterByName, isUnion, isOperatorWithFieldAndArrayOfOperands, extractEnumFilterValue, removeCohortFilter as removeCohortFilter$1, trimFirstFieldNameToTitle, selectAllCohortFiltersCollapsed, Accessibility, toggleCohortBuilderAllFilters, setShouldShareFilters, useIsUserLoggedIn, GEN3_DOMAIN, useDataLibrary, DataLibraryStoreMode, buildListItemsGroupedByDataset, extractFileDatasetsInRecords, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, setCohortFilter as setCohortFilter$1, clearCohortFilters as clearCohortFilters$1, handleOperation, selectAvailableCohorts, selectCurrentCohortId as selectCurrentCohortId$1, selectCohortFilters, selectCurrentCohortModified, selectCurrentCohortSaved, setCohortIndexFilters, setActiveCohort, setCohortFilterCombineMode, selectCohortFilterCombineMode, toggleCohortBuilderCategoryFilter, selectCohortFilterExpanded, selectCurrentCohortName as selectCurrentCohortName$1, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, isJSONValue, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, useGetAggsQuery, useGetAggsNoFilterSelfQuery, isIntersection, useGetCountsQuery, setSharedFilters, usePrevious, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, useSetCurrentPayModelMutation, PodStatus, PodConditionType, isWorkspaceRunningOrStopping, GEN3_API, GEN3_COMMONS_NAME, getTimestamp, createAppStore, getRemoteSupportServiceRegistry, isHttpStatusError, MissingServiceConfigurationError, useLazyGetAggsNoFilterSelfQuery, useCreateRequestMutation, buildGetAggregationQuery, processHistogramResponse, roundHistogramResponse, selectCSRFToken, useUserRequestQuery, getGen3AppId, createGen3AppWithOwnStore, createAppApiForRTKQ, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, fetchJSONDataFromURL, HttpMethod, groupSharedFields, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, getFederatedLoginStatus, queryMultipleMDSRecords, GEN3_MANIFEST_API, extractIndexFromDataLibraryCohort, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
+ import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Center, Loader, Tooltip, UnstyledButton, ThemeIcon, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Accordion, Switch, SegmentedControl as SegmentedControl$1, ActionIcon, Badge, TextInput, NumberInput, RangeSlider, MultiSelect, Tabs, SimpleGrid, Highlight, MantineProvider, Flex, Menu, Alert, Drawer, CopyButton, factory, useProps, getStyleObject, Paper, useCombobox, Combobox, ScrollArea, Autocomplete, Title, Transition, rem, Stepper, Image as Image$1, NavLink, 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, MdExpandLess, MdExpandMore, MdSearch, MdFlip, MdAddCircle, MdRemoveCircle, MdLockOutline, MdLibraryAdd, MdAdd, MdKeyboardDoubleArrowLeft, MdUndo, MdInfo, MdOutlineArrowBack, MdOutlineArrowForward, MdKeyboardArrowDown, MdKeyboardArrowUp, MdDownload, MdGroup, MdOutlineBarChart, MdOutlineSearch, MdFormatQuote, MdDelete, MdOutlineRemoveCircle } from 'react-icons/md';
9
+ import { MdLogin, MdClose, MdAddCircle, MdRemoveCircle, MdExpandLess, MdExpandMore, MdSearch, MdFlip, MdLockOutline, MdLibraryAdd, MdAdd, MdKeyboardDoubleArrowLeft, MdUndo, MdInfo, MdOutlineArrowBack, MdOutlineArrowForward, MdKeyboardArrowDown, MdKeyboardArrowUp, MdDownload, MdGroup, MdOutlineBarChart, MdOutlineSearch, MdFormatQuote, MdDelete, MdOutlineRemoveCircle } from 'react-icons/md';
10
10
  import { getCookie, deleteCookie, setCookie } from 'cookies-next';
11
11
  import useSWR from 'swr';
12
12
  import { errors, importSPKI, jwtVerify, decodeJwt } from 'jose';
@@ -25,10 +25,12 @@ import { defaultComposer } from 'default-composer';
25
25
  import { Icon, addCollection } from '@iconify-icon/react';
26
26
  import { init, getInstanceByDom, graphic } from 'echarts';
27
27
  import { VictoryChart, VictoryTheme, VictoryAxis, VictoryStack, VictoryBar, Bar, VictoryTooltip, VictoryContainer } from 'victory';
28
- import { FaUndo, FaPlus, FaExternalLinkAlt, FaExclamationTriangle, FaExclamation, FaQuestion, FaUser, FaExclamationCircle, FaRegStopCircle, FaChartPie, FaCircle, FaCheck, FaVideo, FaRegQuestionCircle, FaGraduationCap, FaRedo, FaUpload, FaDownload } from 'react-icons/fa';
29
28
  import tw from 'tailwind-styled-components';
29
+ import { useForm, isEmail, isNotEmpty } from '@mantine/form';
30
30
  import { RiCloseCircleLine } from 'react-icons/ri';
31
+ import { FaUndo, FaPlus, FaExternalLinkAlt, FaExclamationTriangle, FaExclamation, FaQuestion, FaUser, FaExclamationCircle, FaRegStopCircle, FaChartPie, FaCircle, FaCheck, FaVideo, FaRegQuestionCircle, FaGraduationCap, FaRedo, FaUpload, FaDownload } from 'react-icons/fa';
31
32
  import { PiCaretUpFill, PiCaretDownFill, PiCaretUpDownFill, PiDotsThreeCircleThin, PiTrash, PiSparkleFill, PiCaretCircleDownFill } from 'react-icons/pi';
33
+ import { modals, ModalsProvider } from '@mantine/modals';
32
34
  import Image from 'next/image';
33
35
  import Link from 'next/link';
34
36
  import { AiOutlineLogin } from 'react-icons/ai';
@@ -44,7 +46,6 @@ import uniq from 'lodash/uniq';
44
46
  import sum from 'lodash/sum';
45
47
  import { LuCircleSlash, LuClock, LuLock, LuUnlock } from 'react-icons/lu';
46
48
  import 'universal-cookie';
47
- import { modals, ModalsProvider } from '@mantine/modals';
48
49
  import GraphiQL from 'graphiql';
49
50
  import { useRouter as useRouter$1 } from 'next/dist/client/router';
50
51
  import fs from 'fs';
@@ -55,7 +56,6 @@ import { combineReducers } from 'redux';
55
56
  import { createSlice, nanoid, createEntityAdapter, createAsyncThunk, createSelector } from '@reduxjs/toolkit';
56
57
  import { openDB } from 'idb';
57
58
  import createWebStorage from 'redux-persist/lib/storage/createWebStorage';
58
- import { useForm, isEmail, isNotEmpty } from '@mantine/form';
59
59
  import dynamic from 'next/dynamic';
60
60
  import YAML from 'yaml';
61
61
  import { filesize } from 'filesize';
@@ -3397,6 +3397,173 @@ const DEFAULT_MAXIMUM = 100;
3397
3397
  const BAD_DATA_MESSAGE = 'No data for this field';
3398
3398
  const DAYS_IN_YEAR = 365.25;
3399
3399
 
3400
+ const SegmentedControl = (props)=>{
3401
+ return /*#__PURE__*/ jsx(SegmentedControl$1, {
3402
+ classNames: {
3403
+ root: 'bg-base-max h-fit p-0',
3404
+ indicator: 'opacity-0',
3405
+ control: 'z-0 rounded-none border-0 [&:nth-child(2)>label]:rounded-l-md [&:last-child>label]:rounded-r-md [&:last-child>label]:border-r-1',
3406
+ label: `${props?.padding ? `p-${props.padding}` : 'p-0'} text-primary font-semibold data-active:text-base-max data-active:bg-primary data-disabled:bg-base-lightest data-disabled:text-base-lighter
3407
+ border-1 border-r-0 !border-primary rounded-none data-disabled:!border-base-lighter`
3408
+ },
3409
+ ...props
3410
+ });
3411
+ };
3412
+
3413
+ const ExpanderLabel = tw.div`
3414
+ text-accent-content-darker
3415
+ p-1
3416
+ font-bold
3417
+ cursor-pointer
3418
+ text-xs
3419
+ font-content
3420
+ `;
3421
+ /**
3422
+ * Component which manages the compact/expanded state of a FacetCard
3423
+ * @param remainingValues - number of remaining values when compact "show 4"
3424
+ * @param isGroupExpanded - true if expanded, false if compact
3425
+ * @param onShowChanged - callback to call when the expand/compact button is clicked
3426
+ */ const FacetExpander = ({ remainingValues, isGroupExpanded, onShowChanged })=>{
3427
+ return /*#__PURE__*/ jsx("div", {
3428
+ className: `mt-3 flex flex-row justify-end ${remainingValues > 0 && 'border-t-2'} p-1.5`,
3429
+ children: remainingValues > 0 && !isGroupExpanded ? /*#__PURE__*/ jsx("button", {
3430
+ onClick: ()=>onShowChanged(!isGroupExpanded),
3431
+ "data-testid": "plus-icon",
3432
+ children: /*#__PURE__*/ jsxs("div", {
3433
+ className: "flex flex-row flex-nowrap items-center ",
3434
+ children: [
3435
+ /*#__PURE__*/ jsx(MdAddCircle, {
3436
+ className: "text-accent",
3437
+ size: "1rem",
3438
+ "aria-hidden": "true"
3439
+ }, "show-more"),
3440
+ /*#__PURE__*/ jsxs(ExpanderLabel, {
3441
+ children: [
3442
+ remainingValues,
3443
+ " more"
3444
+ ]
3445
+ })
3446
+ ]
3447
+ })
3448
+ }) : isGroupExpanded ? /*#__PURE__*/ jsx("button", {
3449
+ onClick: ()=>onShowChanged(!isGroupExpanded),
3450
+ "data-testid": "minus-icon",
3451
+ children: /*#__PURE__*/ jsxs("div", {
3452
+ className: "flex flex-row flex-nowrap items-center",
3453
+ children: [
3454
+ /*#__PURE__*/ jsx(MdRemoveCircle, {
3455
+ className: "text-accent",
3456
+ size: "1rem",
3457
+ onClick: ()=>onShowChanged(!isGroupExpanded),
3458
+ "aria-hidden": "true"
3459
+ }, "show-less"),
3460
+ /*#__PURE__*/ jsx(ExpanderLabel, {
3461
+ children: "show less"
3462
+ })
3463
+ ]
3464
+ })
3465
+ }) : null
3466
+ });
3467
+ };
3468
+
3469
+ const sortTypeToAriaDescription = (sortTypeAndDirection, valueLabel, field)=>{
3470
+ if (sortTypeAndDirection.type === 'alpha') {
3471
+ return sortTypeAndDirection.direction === 'asc' ? `The ${field} names are now sorted alphabetically ascending` : `The ${field} names are now sorted alphabetically descending`;
3472
+ } else {
3473
+ return sortTypeAndDirection.direction === 'asc' ? `The ${field} ${valueLabel} are now sorted numerically ascending` : `The ${field} ${valueLabel} are now sorted numerically descending`;
3474
+ }
3475
+ };
3476
+ /**
3477
+ * FacetCards "sort" header supporting sort by A-Z or by Value both ascending and descending
3478
+ * @param sortType - current sort type
3479
+ * @param valueLabel - Value labels, typically "case" "file"
3480
+ * @param setSort - sets the sort type and direction
3481
+ * @param field - specifies the facet table name
3482
+ */ const FacetSortPanel = ({ sortType, valueLabel, setSort, field })=>{
3483
+ const liveRegionRef = useRef(null);
3484
+ const [sortingStatus, setSortingStatus] = useState('');
3485
+ useEffect(()=>{
3486
+ if (sortingStatus && liveRegionRef?.current) {
3487
+ liveRegionRef.current.textContent = sortingStatus;
3488
+ }
3489
+ }, [
3490
+ sortingStatus
3491
+ ]);
3492
+ const [NameSortIcon, nameIconSize] = sortType.type === 'alpha' ? sortType.direction === 'asc' ? [
3493
+ PiCaretUpFill,
3494
+ '0.75rem'
3495
+ ] : [
3496
+ PiCaretDownFill,
3497
+ '0.75rem'
3498
+ ] : [
3499
+ PiCaretUpDownFill,
3500
+ '1rem'
3501
+ ];
3502
+ const [ValueSortIcon, valueIconSize] = sortType.type === 'value' ? sortType.direction === 'asc' ? [
3503
+ PiCaretUpFill,
3504
+ '0.75rem'
3505
+ ] : [
3506
+ PiCaretDownFill,
3507
+ '0.75rem'
3508
+ ] : [
3509
+ PiCaretUpDownFill,
3510
+ '1rem'
3511
+ ];
3512
+ return /*#__PURE__*/ jsxs("div", {
3513
+ className: "flex flex-row items-center justify-between flex-wrap py-1 px-2 mb-1 border-b-2",
3514
+ children: [
3515
+ /*#__PURE__*/ jsx(Button, {
3516
+ className: "pl-0 ml-0 api-hovered:accent",
3517
+ variant: "transparent",
3518
+ size: "compact-xs",
3519
+ color: "base-contrast.5",
3520
+ onClick: ()=>{
3521
+ const direction = sortType.type === 'alpha' && sortType.direction === 'asc' ? 'dsc' : 'asc';
3522
+ const sortObj = {
3523
+ type: 'alpha',
3524
+ direction
3525
+ };
3526
+ setSort(sortObj);
3527
+ setSortingStatus(sortTypeToAriaDescription(sortObj, 'Name', field));
3528
+ },
3529
+ rightSection: /*#__PURE__*/ jsx(NameSortIcon, {
3530
+ size: nameIconSize,
3531
+ "aria-hidden": "true"
3532
+ }),
3533
+ "aria-label": "Sort name alphabetically",
3534
+ children: "Name"
3535
+ }),
3536
+ /*#__PURE__*/ jsx(Button, {
3537
+ className: "pr-0 mr-0",
3538
+ variant: "transparent",
3539
+ size: "compact-xs",
3540
+ color: "base-contrast.5",
3541
+ onClick: ()=>{
3542
+ const direction = sortType.type === 'value' && sortType.direction === 'asc' ? 'dsc' : 'asc';
3543
+ const sortObj = {
3544
+ type: 'value',
3545
+ direction
3546
+ };
3547
+ setSort(sortObj);
3548
+ setSortingStatus(sortTypeToAriaDescription(sortObj, valueLabel, field));
3549
+ },
3550
+ rightSection: /*#__PURE__*/ jsx(ValueSortIcon, {
3551
+ size: valueIconSize,
3552
+ "aria-hidden": "true"
3553
+ }),
3554
+ "aria-label": `Sort ${valueLabel} numerically`,
3555
+ children: valueLabel
3556
+ }),
3557
+ /*#__PURE__*/ jsx("span", {
3558
+ id: `${field}-liveRegion`,
3559
+ "aria-live": "polite",
3560
+ ref: liveRegionRef,
3561
+ className: "sr-only"
3562
+ })
3563
+ ]
3564
+ });
3565
+ };
3566
+
3400
3567
  const FacetIconButton = tw.button`
3401
3568
  text-base-max
3402
3569
  font-bold
@@ -3603,217 +3770,63 @@ flex items-start justify-between items-center flex-nowrap bg-secondary px-1.5 ro
3603
3770
  });
3604
3771
  };
3605
3772
 
3606
- const sortTypeToAriaDescription = (sortTypeAndDirection, valueLabel, field)=>{
3607
- if (sortTypeAndDirection.type === 'alpha') {
3608
- return sortTypeAndDirection.direction === 'asc' ? `The ${field} names are now sorted alphabetically ascending` : `The ${field} names are now sorted alphabetically descending`;
3609
- } else {
3610
- return sortTypeAndDirection.direction === 'asc' ? `The ${field} ${valueLabel} are now sorted numerically ascending` : `The ${field} ${valueLabel} are now sorted numerically descending`;
3611
- }
3773
+ const OverflowTooltippedLabel = ({ children, label, className = 'flex-grow font-heading text-md pt-0.5' })=>{
3774
+ const [showTooltip, setShowTooltip] = useState(false);
3775
+ return /*#__PURE__*/ jsx(Tooltip, {
3776
+ label: label,
3777
+ disabled: !showTooltip,
3778
+ position: "top-start",
3779
+ offset: 5,
3780
+ multiline: true,
3781
+ withArrow: true,
3782
+ arrowOffset: 20,
3783
+ classNames: {
3784
+ tooltip: 'bg-base-min bg-opacity-90 text-base-contrast-min shadow-lg font-content font-medium text-xs',
3785
+ arrow: 'bg-base-min bg-opacity-90'
3786
+ },
3787
+ children: /*#__PURE__*/ jsx("div", {
3788
+ className: `${className} truncate ... `,
3789
+ ref: (el)=>{
3790
+ if (el) {
3791
+ if (el.clientWidth < el.scrollWidth) {
3792
+ setShowTooltip(true);
3793
+ } else {
3794
+ setShowTooltip(false);
3795
+ }
3796
+ }
3797
+ },
3798
+ children: children
3799
+ })
3800
+ });
3612
3801
  };
3613
- /**
3614
- * FacetCards "sort" header supporting sort by A-Z or by Value both ascending and descending
3615
- * @param sortType - current sort type
3616
- * @param valueLabel - Value labels, typically "case" "file"
3617
- * @param setSort - sets the sort type and direction
3618
- * @param field - specifies the facet table name
3619
- */ const FacetSortPanel = ({ sortType, valueLabel, setSort, field })=>{
3620
- const liveRegionRef = useRef(null);
3621
- const [sortingStatus, setSortingStatus] = useState('');
3802
+
3803
+ const FacetEnumList = ({ field, facetName, hooks, valueLabel, isSettings = false, isFacetView = true, isSearching = false, showPercent = false, hideIfEmpty = false, showSorting = true, sort = 'value-dsc' })=>{
3804
+ const [isGroupExpanded, setIsGroupExpanded] = useState(false);
3805
+ const cardRef = useRef(null);
3806
+ const searchInputRef = useRef(null);
3807
+ const settingRef = useRef(null);
3808
+ const [searchTerm, setSearchTerm] = useState('');
3809
+ // const [combineMode, setCombineMode] = useState<'or' | 'and'>('or');
3810
+ const { data, enumFilters, combineMode, isSuccess, error } = hooks.useGetFacetData(field);
3811
+ const [selectedEnums, setSelectedEnums] = useState(enumFilters ?? []);
3812
+ const totalCount = hooks?.useTotalCounts ? hooks.useTotalCounts() : 1;
3813
+ const clearFilters = hooks.useClearFilter();
3814
+ const updateFacetFilters = hooks.useUpdateFacetFilters();
3815
+ const isFilterExpanded = hooks?.useFilterExpanded && hooks.useFilterExpanded(field);
3816
+ const showFilters = isFilterExpanded === undefined || isFilterExpanded;
3817
+ const [sortedData, setSortedData] = useState([]);
3818
+ const [sortType, setSortType] = useState(mapFacetSortToSortType(sort));
3819
+ const theme = useMantineTheme();
3820
+ const updateVisibleValues = hooks?.updateVisibleValues;
3622
3821
  useEffect(()=>{
3623
- if (sortingStatus && liveRegionRef?.current) {
3624
- liveRegionRef.current.textContent = sortingStatus;
3822
+ if (isSearching) {
3823
+ searchInputRef?.current?.focus();
3824
+ } else if (searchTerm.length > 0) {
3825
+ setSearchTerm('');
3625
3826
  }
3626
3827
  }, [
3627
- sortingStatus
3628
- ]);
3629
- const [NameSortIcon, nameIconSize] = sortType.type === 'alpha' ? sortType.direction === 'asc' ? [
3630
- PiCaretUpFill,
3631
- '0.75rem'
3632
- ] : [
3633
- PiCaretDownFill,
3634
- '0.75rem'
3635
- ] : [
3636
- PiCaretUpDownFill,
3637
- '1rem'
3638
- ];
3639
- const [ValueSortIcon, valueIconSize] = sortType.type === 'value' ? sortType.direction === 'asc' ? [
3640
- PiCaretUpFill,
3641
- '0.75rem'
3642
- ] : [
3643
- PiCaretDownFill,
3644
- '0.75rem'
3645
- ] : [
3646
- PiCaretUpDownFill,
3647
- '1rem'
3648
- ];
3649
- return /*#__PURE__*/ jsxs("div", {
3650
- className: "flex flex-row items-center justify-between flex-wrap py-1 px-2 mb-1 border-b-2",
3651
- children: [
3652
- /*#__PURE__*/ jsx(Button, {
3653
- className: "pl-0 ml-0 api-hovered:accent",
3654
- variant: "transparent",
3655
- size: "compact-xs",
3656
- color: "base-contrast.5",
3657
- onClick: ()=>{
3658
- const direction = sortType.type === 'alpha' && sortType.direction === 'asc' ? 'dsc' : 'asc';
3659
- const sortObj = {
3660
- type: 'alpha',
3661
- direction
3662
- };
3663
- setSort(sortObj);
3664
- setSortingStatus(sortTypeToAriaDescription(sortObj, 'Name', field));
3665
- },
3666
- rightSection: /*#__PURE__*/ jsx(NameSortIcon, {
3667
- size: nameIconSize,
3668
- "aria-hidden": "true"
3669
- }),
3670
- "aria-label": "Sort name alphabetically",
3671
- children: "Name"
3672
- }),
3673
- /*#__PURE__*/ jsx(Button, {
3674
- className: "pr-0 mr-0",
3675
- variant: "transparent",
3676
- size: "compact-xs",
3677
- color: "base-contrast.5",
3678
- onClick: ()=>{
3679
- const direction = sortType.type === 'value' && sortType.direction === 'asc' ? 'dsc' : 'asc';
3680
- const sortObj = {
3681
- type: 'value',
3682
- direction
3683
- };
3684
- setSort(sortObj);
3685
- setSortingStatus(sortTypeToAriaDescription(sortObj, valueLabel, field));
3686
- },
3687
- rightSection: /*#__PURE__*/ jsx(ValueSortIcon, {
3688
- size: valueIconSize,
3689
- "aria-hidden": "true"
3690
- }),
3691
- "aria-label": `Sort ${valueLabel} numerically`,
3692
- children: valueLabel
3693
- }),
3694
- /*#__PURE__*/ jsx("span", {
3695
- id: `${field}-liveRegion`,
3696
- "aria-live": "polite",
3697
- ref: liveRegionRef,
3698
- className: "sr-only"
3699
- })
3700
- ]
3701
- });
3702
- };
3703
-
3704
- const OverflowTooltippedLabel = ({ children, label, className = 'flex-grow font-heading text-md pt-0.5' })=>{
3705
- const [showTooltip, setShowTooltip] = useState(false);
3706
- return /*#__PURE__*/ jsx(Tooltip, {
3707
- label: label,
3708
- disabled: !showTooltip,
3709
- position: "top-start",
3710
- offset: 5,
3711
- multiline: true,
3712
- withArrow: true,
3713
- arrowOffset: 20,
3714
- classNames: {
3715
- tooltip: 'bg-base-min bg-opacity-90 text-base-contrast-min shadow-lg font-content font-medium text-xs',
3716
- arrow: 'bg-base-min bg-opacity-90'
3717
- },
3718
- children: /*#__PURE__*/ jsx("div", {
3719
- className: `${className} truncate ... `,
3720
- ref: (el)=>{
3721
- if (el) {
3722
- if (el.clientWidth < el.scrollWidth) {
3723
- setShowTooltip(true);
3724
- } else {
3725
- setShowTooltip(false);
3726
- }
3727
- }
3728
- },
3729
- children: children
3730
- })
3731
- });
3732
- };
3733
-
3734
- const ExpanderLabel = tw.div`
3735
- text-accent-content-darker
3736
- p-1
3737
- font-bold
3738
- cursor-pointer
3739
- text-xs
3740
- font-content
3741
- `;
3742
- /**
3743
- * Component which manages the compact/expanded state of a FacetCard
3744
- * @param remainingValues - number of remaining values when compact "show 4"
3745
- * @param isGroupExpanded - true if expanded, false if compact
3746
- * @param onShowChanged - callback to call when the expand/compact button is clicked
3747
- */ const FacetExpander = ({ remainingValues, isGroupExpanded, onShowChanged })=>{
3748
- return /*#__PURE__*/ jsx("div", {
3749
- className: `mt-3 flex flex-row justify-end ${remainingValues > 0 && 'border-t-2'} p-1.5`,
3750
- children: remainingValues > 0 && !isGroupExpanded ? /*#__PURE__*/ jsx("button", {
3751
- onClick: ()=>onShowChanged(!isGroupExpanded),
3752
- "data-testid": "plus-icon",
3753
- children: /*#__PURE__*/ jsxs("div", {
3754
- className: "flex flex-row flex-nowrap items-center ",
3755
- children: [
3756
- /*#__PURE__*/ jsx(MdAddCircle, {
3757
- className: "text-accent",
3758
- size: "1rem",
3759
- "aria-hidden": "true"
3760
- }, "show-more"),
3761
- /*#__PURE__*/ jsxs(ExpanderLabel, {
3762
- children: [
3763
- remainingValues,
3764
- " more"
3765
- ]
3766
- })
3767
- ]
3768
- })
3769
- }) : isGroupExpanded ? /*#__PURE__*/ jsx("button", {
3770
- onClick: ()=>onShowChanged(!isGroupExpanded),
3771
- "data-testid": "minus-icon",
3772
- children: /*#__PURE__*/ jsxs("div", {
3773
- className: "flex flex-row flex-nowrap items-center",
3774
- children: [
3775
- /*#__PURE__*/ jsx(MdRemoveCircle, {
3776
- className: "text-accent",
3777
- size: "1rem",
3778
- onClick: ()=>onShowChanged(!isGroupExpanded),
3779
- "aria-hidden": "true"
3780
- }, "show-less"),
3781
- /*#__PURE__*/ jsx(ExpanderLabel, {
3782
- children: "show less"
3783
- })
3784
- ]
3785
- })
3786
- }) : null
3787
- });
3788
- };
3789
-
3790
- const FacetEnumList = ({ field, facetName, hooks, valueLabel, isSettings = false, isFacetView = true, isSearching = false, showPercent = false, hideIfEmpty = false, showSorting = true, sort = 'value-dsc' })=>{
3791
- const [isGroupExpanded, setIsGroupExpanded] = useState(false);
3792
- const cardRef = useRef(null);
3793
- const searchInputRef = useRef(null);
3794
- const settingRef = useRef(null);
3795
- const [searchTerm, setSearchTerm] = useState('');
3796
- // const [combineMode, setCombineMode] = useState<'or' | 'and'>('or');
3797
- const { data, enumFilters, combineMode, isSuccess, error } = hooks.useGetFacetData(field);
3798
- const [selectedEnums, setSelectedEnums] = useState(enumFilters ?? []);
3799
- const totalCount = hooks?.useTotalCounts ? hooks.useTotalCounts() : 1;
3800
- const clearFilters = hooks.useClearFilter();
3801
- const updateFacetFilters = hooks.useUpdateFacetFilters();
3802
- const isFilterExpanded = hooks?.useFilterExpanded && hooks.useFilterExpanded(field);
3803
- const showFilters = isFilterExpanded === undefined || isFilterExpanded;
3804
- const [sortedData, setSortedData] = useState([]);
3805
- const [sortType, setSortType] = useState(mapFacetSortToSortType(sort));
3806
- const theme = useMantineTheme();
3807
- const updateVisibleValues = hooks?.updateVisibleValues;
3808
- useEffect(()=>{
3809
- if (isSearching) {
3810
- searchInputRef?.current?.focus();
3811
- } else if (searchTerm.length > 0) {
3812
- setSearchTerm('');
3813
- }
3814
- }, [
3815
- isSearching,
3816
- searchTerm
3828
+ isSearching,
3829
+ searchTerm
3817
3830
  ]);
3818
3831
  useEffect(()=>{
3819
3832
  if (isSettings) {
@@ -3975,7 +3988,7 @@ const FacetEnumList = ({ field, facetName, hooks, valueLabel, isSettings = false
3975
3988
  children: /*#__PURE__*/ jsxs("div", {
3976
3989
  className: "flex items-center space-x-1 mt-1",
3977
3990
  children: [
3978
- /*#__PURE__*/ jsx(SegmentedControl, {
3991
+ /*#__PURE__*/ jsx(SegmentedControl$1, {
3979
3992
  classNames: {
3980
3993
  root: 'border-1 border-accent rounded-l-md rounded-r-md',
3981
3994
  control: 'p-0 m-0',
@@ -4203,194 +4216,54 @@ const EnumFacet = ({ field, hooks, valueLabel, description, facetName, showPerce
4203
4216
  });
4204
4217
  };
4205
4218
 
4206
- const instanceOfIncludesExcludes$1 = (op)=>[
4207
- 'in'
4208
- ].includes(op.operator); // TODO: Guppy does not support excludes
4209
- /**
4210
- * Extracts the operands if the operation isIncludes or Excludes. Returns an empty Array
4211
- * if filter is not the correct type.
4212
- * @param operation - filters to extract values from
4213
- */ const extractValues = (operation)=>{
4214
- if (operation && instanceOfIncludesExcludes$1(operation)) {
4215
- return operation.operands;
4216
- }
4217
- return [];
4218
- };
4219
- /**
4220
- * Exact value facet component
4221
- * @param field - field to facet on
4222
- * @param description - description of the facet
4223
- * @param facetName - name of the facet
4224
- * @param dismissCallback - callback function to dismiss the facet
4225
- * @param width - width of the facet
4226
- * @param hooks - hooks to use for the facet
4227
- * @param header - header components
4228
- * @category Facets
4229
- */ const ExactValueFacet = ({ field, description, facetName = undefined, dismissCallback = undefined, width = undefined, hooks, header = {
4219
+ const createBucket = (field, lower, upper)=>({
4220
+ operator: 'and',
4221
+ operands: [
4222
+ {
4223
+ field,
4224
+ operator: '>=',
4225
+ operand: lower
4226
+ },
4227
+ {
4228
+ field,
4229
+ operator: '<=',
4230
+ operand: upper
4231
+ }
4232
+ ]
4233
+ });
4234
+ const RangeFacet = ({ field, hooks, valueLabel, description, facetName, minimum = DEFAULT_MINIMUM, maximum = DEFAULT_MAXIMUM, showSearch = false, showFlip = false, showSettings = false, dismissCallback = undefined, width = undefined, header = {
4230
4235
  Panel: FacetHeader,
4231
4236
  Label: FacetText,
4232
4237
  iconStyle: controlsIconStyle
4233
4238
  } })=>{
4234
- const [textValue, setTextValue] = useState(''); // Handle the state of the TextInput
4235
- const clearFilters = hooks.useClearFilter();
4236
- const updateFacetFilters = hooks.useUpdateFacetFilters();
4237
- const facetTitle = facetName ? facetName : trimFirstFieldNameToTitle(field, true);
4238
- const facetValue = hooks.useGetFacetFilters(field);
4239
- const textValues = useMemo(()=>extractValues(facetValue), [
4240
- facetValue
4241
- ]);
4242
- const isFilterExpanded = hooks.useFilterExpanded && hooks.useFilterExpanded(field);
4243
- const showFilters = isFilterExpanded === undefined || isFilterExpanded;
4244
- const setValues = (values)=>{
4245
- if (values.length > 0) {
4246
- if (facetValue && instanceOfIncludesExcludes$1(facetValue)) {
4247
- // updating facet value
4248
- updateFacetFilters(field, {
4249
- ...facetValue,
4250
- operands: values
4251
- });
4252
- }
4253
- if (facetValue === undefined) {
4254
- // TODO: Assuming Includes by default but this might change to Include|Excludes
4255
- updateFacetFilters(field, {
4256
- operator: 'in',
4257
- field: field,
4258
- operands: values
4259
- });
4260
- }
4261
- } else {
4262
- clearFilters(field);
4263
- }
4264
- };
4265
- const addValue = (s)=>{
4266
- if (s === '') return;
4267
- if (textValues.includes(s)) return;
4268
- setTextValue('');
4269
- setValues([
4270
- ...textValues,
4271
- s
4272
- ]);
4273
- };
4274
- const removeButton = (x)=>{
4275
- return /*#__PURE__*/ jsx(ActionIcon, {
4276
- size: "xs",
4277
- color: "white",
4278
- radius: "xl",
4279
- variant: "transparent",
4280
- onClick: ()=>setValues(textValues.filter((i)=>i !== x)),
4281
- children: /*#__PURE__*/ jsx(MdClose, {
4282
- size: 10,
4283
- "aria-label": "remove value from filter"
4284
- })
4285
- });
4286
- };
4287
- return /*#__PURE__*/ jsxs("div", {
4288
- className: `flex flex-col ${width ? width : 'mx-0'} bg-base-max relative border-base-lighter border-1 rounded-md text-xs transition`,
4289
- children: [
4290
- /*#__PURE__*/ jsx(FacetControlsHeader, {
4291
- field: field,
4292
- description: description,
4293
- hooks: hooks,
4294
- facetName: facetName,
4295
- dismissCallback: dismissCallback,
4296
- header: header
4297
- }),
4298
- /*#__PURE__*/ jsxs("div", {
4299
- className: showFilters ? 'h-full' : 'h-0 invisible',
4300
- "aria-hidden": !showFilters,
4301
- children: [
4302
- /*#__PURE__*/ jsxs("div", {
4303
- className: "flex flex-nowrap items-center p-2",
4304
- children: [
4305
- /*#__PURE__*/ jsx(TextInput, {
4306
- "data-testid": "textbox-add-filter-value",
4307
- size: "sm",
4308
- placeholder: `Enter ${facetTitle}`,
4309
- classNames: {
4310
- root: 'grow',
4311
- input: 'border-r-0 rounded-r-none py-1'
4312
- },
4313
- "aria-label": "enter value to add filter",
4314
- value: textValue,
4315
- onChange: (event)=>setTextValue(event.currentTarget.value)
4316
- }),
4317
- /*#__PURE__*/ jsx(ActionIcon, {
4318
- size: "lg",
4319
- "aria-label": "add string value",
4320
- className: "bg-accent text-accent-contrast border-base-min border-1 rounded-l-none h-[30px]",
4321
- onClick: ()=>{
4322
- if (textValue.length > 0) addValue(textValue.trim());
4323
- },
4324
- children: /*#__PURE__*/ jsx(FaPlus, {})
4325
- })
4326
- ]
4327
- }),
4328
- /*#__PURE__*/ jsx(Group, {
4329
- gap: "xs",
4330
- className: "px-2 py-2 max-h-96 overflow-y-auto",
4331
- "data-testid": "values group",
4332
- children: textValues.map((x)=>/*#__PURE__*/ jsx(Badge, {
4333
- size: "sm",
4334
- variant: "filled",
4335
- color: "accent",
4336
- rightSection: removeButton(x),
4337
- children: x
4338
- }, x))
4339
- })
4340
- ]
4341
- })
4342
- ]
4343
- });
4344
- };
4345
-
4346
- const createBucket = (field, lower, upper)=>({
4347
- operator: 'and',
4348
- operands: [
4349
- {
4350
- field,
4351
- operator: '>=',
4352
- operand: lower
4353
- },
4354
- {
4355
- field,
4356
- operator: '<=',
4357
- operand: upper
4358
- }
4359
- ]
4360
- });
4361
- const RangeFacet = ({ field, hooks, valueLabel, description, facetName, minimum = DEFAULT_MINIMUM, maximum = DEFAULT_MAXIMUM, showSearch = false, showFlip = false, showSettings = false, dismissCallback = undefined, width = undefined, header = {
4362
- Panel: FacetHeader,
4363
- Label: FacetText,
4364
- iconStyle: controlsIconStyle
4365
- } })=>{
4366
- const { data, rangeFilters, isSuccess } = hooks.useGetFacetData(field);
4367
- const [minMaxValue, setMinMaxValue] = React__default.useState({
4368
- from: minimum,
4369
- to: maximum
4370
- });
4371
- const clearRangeFilterFromCohort = hooks.useClearFilter();
4372
- useCallback(()=>{
4373
- setMinMaxValue({
4374
- from: minimum,
4375
- to: maximum
4376
- });
4377
- clearRangeFilterFromCohort(field);
4378
- }, [
4379
- clearRangeFilterFromCohort,
4380
- field,
4381
- maximum,
4382
- minimum
4383
- ]);
4384
- const updateRangeFilter = hooks.useUpdateFacetFilters();
4385
- const updateFilters = useCallback((from, to)=>{
4386
- updateRangeFilter(field, createBucket(field, from, to));
4387
- setMinMaxValue({
4388
- from: from,
4389
- to: to
4390
- });
4391
- }, [
4392
- field,
4393
- updateRangeFilter
4239
+ const { data, rangeFilters, isSuccess } = hooks.useGetFacetData(field);
4240
+ const [minMaxValue, setMinMaxValue] = React__default.useState({
4241
+ from: minimum,
4242
+ to: maximum
4243
+ });
4244
+ const clearRangeFilterFromCohort = hooks.useClearFilter();
4245
+ useCallback(()=>{
4246
+ setMinMaxValue({
4247
+ from: minimum,
4248
+ to: maximum
4249
+ });
4250
+ clearRangeFilterFromCohort(field);
4251
+ }, [
4252
+ clearRangeFilterFromCohort,
4253
+ field,
4254
+ maximum,
4255
+ minimum
4256
+ ]);
4257
+ const updateRangeFilter = hooks.useUpdateFacetFilters();
4258
+ const updateFilters = useCallback((from, to)=>{
4259
+ updateRangeFilter(field, createBucket(field, from, to));
4260
+ setMinMaxValue({
4261
+ from: from,
4262
+ to: to
4263
+ });
4264
+ }, [
4265
+ field,
4266
+ updateRangeFilter
4394
4267
  ]);
4395
4268
  const isFilterExpanded = hooks.useFilterExpanded && hooks.useFilterExpanded(field);
4396
4269
  const showFilters = isFilterExpanded === undefined || isFilterExpanded;
@@ -4471,7 +4344,7 @@ const RangeFacet = ({ field, hooks, valueLabel, description, facetName, minimum
4471
4344
  });
4472
4345
  };
4473
4346
 
4474
- const instanceOfIncludesExcludes = (op)=>[
4347
+ const instanceOfIncludesExcludes$1 = (op)=>[
4475
4348
  'in'
4476
4349
  ].includes(op.operator); // TODO: Guppy does not support excludes
4477
4350
  const isOperandsObject = (obj)=>{
@@ -4520,7 +4393,7 @@ const isFacetEmpty = (op)=>{
4520
4393
  useDeepCompareEffect(()=>{
4521
4394
  if (!facetValue || isFacetEmpty(facetValue)) {
4522
4395
  setSelectedValues([]);
4523
- } else if (instanceOfIncludesExcludes(facetValue)) {
4396
+ } else if (instanceOfIncludesExcludes$1(facetValue)) {
4524
4397
  const filters = facetValue.operands.map((x)=>x.toString());
4525
4398
  setSelectedValues(filters);
4526
4399
  }
@@ -4557,29 +4430,577 @@ const isFacetEmpty = (op)=>{
4557
4430
  size: "sm",
4558
4431
  placeholder: `Enter ${facetTitle}`,
4559
4432
  classNames: {
4560
- root: 'grow',
4561
- input: 'border-r-0 rounded-r-none py-1'
4562
- },
4563
- comboboxProps: {
4564
- shadow: 'md'
4433
+ root: 'grow',
4434
+ input: 'border-r-0 rounded-r-none py-1'
4435
+ },
4436
+ comboboxProps: {
4437
+ shadow: 'md'
4438
+ },
4439
+ "aria-label": "enter value to add filter",
4440
+ value: selectedValues,
4441
+ onChange: setSelectedValues,
4442
+ searchable: true,
4443
+ data: dataValues,
4444
+ limit: 10,
4445
+ maxDropdownHeight: 200,
4446
+ hidePickedOptions: true,
4447
+ withScrollArea: false,
4448
+ mt: "md"
4449
+ })
4450
+ })
4451
+ })
4452
+ ]
4453
+ });
4454
+ };
4455
+
4456
+ const instanceOfIncludesExcludes = (op)=>[
4457
+ 'in'
4458
+ ].includes(op.operator); // TODO: Guppy does not support excludes
4459
+ /**
4460
+ * Extracts the operands if the operation isIncludes or Excludes. Returns an empty Array
4461
+ * if filter is not the correct type.
4462
+ * @param operation - filters to extract values from
4463
+ */ const extractValues = (operation)=>{
4464
+ if (operation && instanceOfIncludesExcludes(operation)) {
4465
+ return operation.operands;
4466
+ }
4467
+ return [];
4468
+ };
4469
+ /**
4470
+ * Exact value facet component
4471
+ * @param field - field to facet on
4472
+ * @param description - description of the facet
4473
+ * @param facetName - name of the facet
4474
+ * @param dismissCallback - callback function to dismiss the facet
4475
+ * @param width - width of the facet
4476
+ * @param hooks - hooks to use for the facet
4477
+ * @param header - header components
4478
+ * @category Facets
4479
+ */ const ExactValueFacet = ({ field, description, facetName = undefined, dismissCallback = undefined, width = undefined, hooks, header = {
4480
+ Panel: FacetHeader,
4481
+ Label: FacetText,
4482
+ iconStyle: controlsIconStyle
4483
+ } })=>{
4484
+ const [textValue, setTextValue] = useState(''); // Handle the state of the TextInput
4485
+ const clearFilters = hooks.useClearFilter();
4486
+ const updateFacetFilters = hooks.useUpdateFacetFilters();
4487
+ const facetTitle = facetName ? facetName : trimFirstFieldNameToTitle(field, true);
4488
+ const facetValue = hooks.useGetFacetFilters(field);
4489
+ const textValues = useMemo(()=>extractValues(facetValue), [
4490
+ facetValue
4491
+ ]);
4492
+ const isFilterExpanded = hooks.useFilterExpanded && hooks.useFilterExpanded(field);
4493
+ const showFilters = isFilterExpanded === undefined || isFilterExpanded;
4494
+ const setValues = (values)=>{
4495
+ if (values.length > 0) {
4496
+ if (facetValue && instanceOfIncludesExcludes(facetValue)) {
4497
+ // updating facet value
4498
+ updateFacetFilters(field, {
4499
+ ...facetValue,
4500
+ operands: values
4501
+ });
4502
+ }
4503
+ if (facetValue === undefined) {
4504
+ // TODO: Assuming Includes by default but this might change to Include|Excludes
4505
+ updateFacetFilters(field, {
4506
+ operator: 'in',
4507
+ field: field,
4508
+ operands: values
4509
+ });
4510
+ }
4511
+ } else {
4512
+ clearFilters(field);
4513
+ }
4514
+ };
4515
+ const addValue = (s)=>{
4516
+ if (s === '') return;
4517
+ if (textValues.includes(s)) return;
4518
+ setTextValue('');
4519
+ setValues([
4520
+ ...textValues,
4521
+ s
4522
+ ]);
4523
+ };
4524
+ const removeButton = (x)=>{
4525
+ return /*#__PURE__*/ jsx(ActionIcon, {
4526
+ size: "xs",
4527
+ color: "white",
4528
+ radius: "xl",
4529
+ variant: "transparent",
4530
+ onClick: ()=>setValues(textValues.filter((i)=>i !== x)),
4531
+ children: /*#__PURE__*/ jsx(MdClose, {
4532
+ size: 10,
4533
+ "aria-label": "remove value from filter"
4534
+ })
4535
+ });
4536
+ };
4537
+ return /*#__PURE__*/ jsxs("div", {
4538
+ className: `flex flex-col ${width ? width : 'mx-0'} bg-base-max relative border-base-lighter border-1 rounded-md text-xs transition`,
4539
+ children: [
4540
+ /*#__PURE__*/ jsx(FacetControlsHeader, {
4541
+ field: field,
4542
+ description: description,
4543
+ hooks: hooks,
4544
+ facetName: facetName,
4545
+ dismissCallback: dismissCallback,
4546
+ header: header
4547
+ }),
4548
+ /*#__PURE__*/ jsxs("div", {
4549
+ className: showFilters ? 'h-full' : 'h-0 invisible',
4550
+ "aria-hidden": !showFilters,
4551
+ children: [
4552
+ /*#__PURE__*/ jsxs("div", {
4553
+ className: "flex flex-nowrap items-center p-2",
4554
+ children: [
4555
+ /*#__PURE__*/ jsx(TextInput, {
4556
+ "data-testid": "textbox-add-filter-value",
4557
+ size: "sm",
4558
+ placeholder: `Enter ${facetTitle}`,
4559
+ classNames: {
4560
+ root: 'grow',
4561
+ input: 'border-r-0 rounded-r-none py-1'
4562
+ },
4563
+ "aria-label": "enter value to add filter",
4564
+ value: textValue,
4565
+ onChange: (event)=>setTextValue(event.currentTarget.value)
4566
+ }),
4567
+ /*#__PURE__*/ jsx(ActionIcon, {
4568
+ size: "lg",
4569
+ "aria-label": "add string value",
4570
+ className: "bg-accent text-accent-contrast border-base-min border-1 rounded-l-none h-[30px]",
4571
+ onClick: ()=>{
4572
+ if (textValue.length > 0) addValue(textValue.trim());
4573
+ },
4574
+ children: /*#__PURE__*/ jsx(FaPlus, {})
4575
+ })
4576
+ ]
4577
+ }),
4578
+ /*#__PURE__*/ jsx(Group, {
4579
+ gap: "xs",
4580
+ className: "px-2 py-2 max-h-96 overflow-y-auto",
4581
+ "data-testid": "values group",
4582
+ children: textValues.map((x)=>/*#__PURE__*/ jsx(Badge, {
4583
+ size: "sm",
4584
+ variant: "filled",
4585
+ color: "accent",
4586
+ rightSection: removeButton(x),
4587
+ children: x
4588
+ }, x))
4589
+ })
4590
+ ]
4591
+ })
4592
+ ]
4593
+ });
4594
+ };
4595
+
4596
+ const createFacetCard = ({ facetDefinition, valueLabel, hooks: dataFunctions, facetNameFormatter, idPrefix, hideIfEmpty = false, width, showPercent = false, queryOptions })=>{
4597
+ const { field, type, description, label } = facetDefinition;
4598
+ const facetLabel = label ?? facetNameFormatter(facetDefinition.field);
4599
+ const valueTypeLabel = valueLabel === undefined || typeof valueLabel === 'string' ? valueLabel : valueLabel(queryOptions);
4600
+ return /*#__PURE__*/ jsx("div", {
4601
+ children: {
4602
+ enum: /*#__PURE__*/ jsx(EnumFacet, {
4603
+ valueLabel: valueTypeLabel,
4604
+ field: field,
4605
+ facetName: facetLabel,
4606
+ description: description,
4607
+ hideIfEmpty: hideIfEmpty,
4608
+ width: width,
4609
+ hooks: dataFunctions,
4610
+ showPercent: showPercent,
4611
+ sharedWithIndices: facetDefinition?.sharedWithIndices
4612
+ }, `${idPrefix}-enum-${field}`),
4613
+ range: /*#__PURE__*/ jsx(RangeFacet, {
4614
+ valueLabel: valueTypeLabel,
4615
+ field: field,
4616
+ facetName: facetLabel,
4617
+ description: description,
4618
+ hideIfEmpty: hideIfEmpty,
4619
+ width: width,
4620
+ hooks: dataFunctions,
4621
+ minimum: facetDefinition.range?.minimum,
4622
+ maximum: facetDefinition.range?.maximum,
4623
+ showSettings: showPercent,
4624
+ sharedWithIndices: facetDefinition?.sharedWithIndices
4625
+ }, `${idPrefix}-range-${field}`),
4626
+ exact: /*#__PURE__*/ jsx(ExactValueFacet, {
4627
+ field: field,
4628
+ facetName: facetLabel,
4629
+ description: description,
4630
+ hideIfEmpty: hideIfEmpty,
4631
+ width: width,
4632
+ hooks: dataFunctions,
4633
+ sharedWithIndices: facetDefinition?.sharedWithIndices
4634
+ }, `${idPrefix}-exact-${field}`),
4635
+ multiselect: /*#__PURE__*/ jsx(MultiSelectValueFacet, {
4636
+ field: field,
4637
+ facetName: facetLabel,
4638
+ description: description,
4639
+ hideIfEmpty: hideIfEmpty,
4640
+ width: width,
4641
+ hooks: dataFunctions,
4642
+ sharedWithIndices: facetDefinition?.sharedWithIndices
4643
+ }, `${idPrefix}-exact-${field}`)
4644
+ }[type]
4645
+ }, `${idPrefix}-facet-${field}`);
4646
+ };
4647
+
4648
+ const FiltersPanel = ({ fields, dataFunctions, valueLabel })=>{
4649
+ return /*#__PURE__*/ jsx("div", {
4650
+ "data-testid": "filters-facets",
4651
+ className: "flex flex-col gap-y-4 w-full",
4652
+ children: fields.map((facetDefinition)=>{
4653
+ if (facetDefinition?.type === undefined) {
4654
+ console.warn('Facet definition missing type', facetDefinition);
4655
+ return null;
4656
+ }
4657
+ if (!(facetDefinition.type in dataFunctions)) return null;
4658
+ return createFacetCard({
4659
+ facetDefinition,
4660
+ valueLabel,
4661
+ hooks: dataFunctions[facetDefinition.type],
4662
+ facetNameFormatter: fieldNameToTitle,
4663
+ idPrefix: 'filters-panel',
4664
+ showPercent: false
4665
+ });
4666
+ })
4667
+ });
4668
+ };
4669
+
4670
+ const AccordionPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHooks, onAccessChange = (value)=>null, accessLevel = Accessibility.ALL, showAccessLevel = false })=>{
4671
+ const coreDispatch = useCoreDispatch();
4672
+ const sharedFilters = useCoreSelector((state)=>selectSharedFilters(state));
4673
+ const theme = useMantineTheme();
4674
+ const shareFilters = useCoreSelector((state)=>selectShouldShareFilters(state));
4675
+ const allFiltersCollapsed = useCoreSelector((state)=>selectAllCohortFiltersCollapsed(state, index));
4676
+ const toggleAllFiltersExpanded = (expand)=>{
4677
+ coreDispatch(toggleCohortBuilderAllFilters({
4678
+ expand,
4679
+ index
4680
+ }));
4681
+ };
4682
+ const handleSharedFiltersChange = (value)=>{
4683
+ modals.openConfirmModal({
4684
+ title: 'Confirm change of shared filters mode',
4685
+ children: /*#__PURE__*/ jsx(Text, {
4686
+ size: "sm",
4687
+ children: value ? 'Switching to Shared Filters mode will apply all selected filters across all indices.' : 'Switching to Unshared Filters mode will stop syncing filters but will not remove them.'
4688
+ }),
4689
+ labels: {
4690
+ confirm: 'Confirm',
4691
+ cancel: 'Cancel'
4692
+ },
4693
+ onConfirm: ()=>coreDispatch(setShouldShareFilters(value))
4694
+ });
4695
+ };
4696
+ return /*#__PURE__*/ jsxs(Stack, {
4697
+ align: "flex-start",
4698
+ children: [
4699
+ /*#__PURE__*/ jsxs(Group, {
4700
+ justify: "space-between",
4701
+ className: "w-full",
4702
+ children: [
4703
+ /*#__PURE__*/ jsx(Text, {
4704
+ size: "xl",
4705
+ fw: 800,
4706
+ children: "Filters"
4707
+ }),
4708
+ /*#__PURE__*/ jsx("button", {
4709
+ className: "text-primary text-sm font-normal",
4710
+ onClick: ()=>toggleAllFiltersExpanded(allFiltersCollapsed),
4711
+ children: allFiltersCollapsed ? 'Expand All' : 'Collapse All'
4712
+ })
4713
+ ]
4714
+ }),
4715
+ /*#__PURE__*/ jsxs(Stack, {
4716
+ className: "bg-base-max py-4 px-2 h-full w-full",
4717
+ children: [
4718
+ Object.keys(sharedFilters).length > 0 && /*#__PURE__*/ jsxs(Group, {
4719
+ gap: "xs",
4720
+ justify: "space-between",
4721
+ children: [
4722
+ /*#__PURE__*/ jsxs("div", {
4723
+ className: "flex items-center space-x-1",
4724
+ children: [
4725
+ /*#__PURE__*/ jsx(Icon, {
4726
+ icon: "gen3:share",
4727
+ height: 16,
4728
+ width: 16,
4729
+ color: theme.colors.accent[4]
4730
+ }),
4731
+ /*#__PURE__*/ jsx(Text, {
4732
+ size: "sm",
4733
+ children: "Set the shared filters for all"
4734
+ }),
4735
+ /*#__PURE__*/ jsx(Icon, {
4736
+ icon: "gen3:info",
4737
+ height: 12,
4738
+ width: 12,
4739
+ color: theme.colors.accent[4]
4740
+ })
4741
+ ]
4742
+ }),
4743
+ /*#__PURE__*/ jsx(Switch, {
4744
+ checked: shareFilters,
4745
+ onChange: (event)=>handleSharedFiltersChange(event.currentTarget.checked)
4746
+ })
4747
+ ]
4748
+ }),
4749
+ /*#__PURE__*/ jsx(Accordion, {
4750
+ chevronPosition: "left",
4751
+ multiple: true,
4752
+ defaultValue: [
4753
+ filters?.tabs[0].title ?? 'Filters'
4754
+ ],
4755
+ children: filters.tabs.map((tab)=>{
4756
+ return /*#__PURE__*/ jsxs(Accordion.Item, {
4757
+ value: tab.title,
4758
+ children: [
4759
+ /*#__PURE__*/ jsx(Accordion.Control, {
4760
+ children: tab.title
4761
+ }),
4762
+ /*#__PURE__*/ jsx(Accordion.Panel, {
4763
+ classNames: {
4764
+ panel: 'p-0 m-0'
4765
+ },
4766
+ children: Object.keys(facetDefinitions).length > 0 ? /*#__PURE__*/ jsx(FiltersPanel, {
4767
+ fields: tab.fields.reduce((acc, field)=>{
4768
+ return [
4769
+ ...acc,
4770
+ facetDefinitions[field]
4771
+ ];
4772
+ }, []),
4773
+ dataFunctions: facetDataHooks,
4774
+ valueLabel: tabTitle
4775
+ }) : null
4776
+ })
4777
+ ]
4778
+ }, `${tab.title}`);
4779
+ })
4780
+ })
4781
+ ]
4782
+ })
4783
+ ]
4784
+ });
4785
+ };
4786
+
4787
+ const AccessData = [
4788
+ {
4789
+ value: Accessibility.ALL,
4790
+ label: 'All'
4791
+ },
4792
+ {
4793
+ value: Accessibility.ACCESSIBLE,
4794
+ label: 'Accessible'
4795
+ },
4796
+ {
4797
+ value: Accessibility.UNACCESSIBLE,
4798
+ label: 'Not Accessible'
4799
+ }
4800
+ ];
4801
+ const AccessLevelControl = ({ onChange, accessLevel })=>{
4802
+ const theme = useMantineTheme();
4803
+ return /*#__PURE__*/ jsx(SegmentedControl$1, {
4804
+ color: theme.colors.accent[5],
4805
+ data: AccessData,
4806
+ value: accessLevel,
4807
+ onChange: (val)=>{
4808
+ const accessibilityValue = AccessData.find((item)=>item.value === val)?.value || Accessibility.ALL;
4809
+ onChange(accessibilityValue);
4810
+ }
4811
+ });
4812
+ };
4813
+
4814
+ const DropdownPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHooks, onAccessChange = (value)=>null, accessLevel = Accessibility.ALL, showAccessLevel = false })=>{
4815
+ const [value, setValue] = useState('0');
4816
+ const allFiltersCollapsed = useCoreSelector((state)=>selectAllCohortFiltersCollapsed(state, index));
4817
+ const sharedFilters = useCoreSelector((state)=>selectSharedFilters(state));
4818
+ const shareFilters = useCoreSelector((state)=>selectShouldShareFilters(state));
4819
+ const theme = useMantineTheme();
4820
+ const coreDispatch = useCoreDispatch();
4821
+ const toggleAllFiltersExpanded = (expand)=>{
4822
+ coreDispatch(toggleCohortBuilderAllFilters({
4823
+ expand,
4824
+ index
4825
+ }));
4826
+ };
4827
+ const items = useDeepCompareMemo(()=>filters.tabs.map((tab, idx)=>{
4828
+ return {
4829
+ label: tab.title,
4830
+ value: idx.toString()
4831
+ };
4832
+ }), [
4833
+ filters.tabs
4834
+ ]);
4835
+ const fields = filters.tabs[Number(value)].fields.reduce((acc, field)=>{
4836
+ return [
4837
+ ...acc,
4838
+ facetDefinitions[field]
4839
+ ];
4840
+ }, []);
4841
+ const handleSharedFiltersChange = (value)=>{
4842
+ modals.openConfirmModal({
4843
+ title: 'Confirm change of shared filters mode',
4844
+ children: /*#__PURE__*/ jsx(Text, {
4845
+ size: "sm",
4846
+ children: value ? 'Switching to Shared Filters mode will apply all selected filters across all indices.' : 'Switching to Unshared Filters mode will stop syncing filters but will not remove them.'
4847
+ }),
4848
+ labels: {
4849
+ confirm: 'Confirm',
4850
+ cancel: 'Cancel'
4851
+ },
4852
+ onConfirm: ()=>coreDispatch(setShouldShareFilters(value))
4853
+ });
4854
+ };
4855
+ return /*#__PURE__*/ jsxs(Stack, {
4856
+ align: "flex-start",
4857
+ children: [
4858
+ /*#__PURE__*/ jsxs(Group, {
4859
+ justify: "space-between",
4860
+ className: "w-full",
4861
+ children: [
4862
+ /*#__PURE__*/ jsx(Text, {
4863
+ size: "xl",
4864
+ fw: 800,
4865
+ children: "Filters"
4866
+ }),
4867
+ /*#__PURE__*/ jsx("button", {
4868
+ className: "text-primary text-sm font-normal",
4869
+ onClick: ()=>toggleAllFiltersExpanded(allFiltersCollapsed),
4870
+ children: allFiltersCollapsed ? 'Expand All' : 'Collapse All'
4871
+ })
4872
+ ]
4873
+ }),
4874
+ showAccessLevel ? /*#__PURE__*/ jsx(AccessLevelControl, {
4875
+ onChange: onAccessChange,
4876
+ accessLevel: accessLevel
4877
+ }) : null,
4878
+ /*#__PURE__*/ jsxs(Stack, {
4879
+ className: "bg-base-max py-4 px-2 h-full w-full",
4880
+ children: [
4881
+ Object.keys(sharedFilters).length > 0 && /*#__PURE__*/ jsxs(Group, {
4882
+ gap: "xs",
4883
+ justify: "space-between",
4884
+ children: [
4885
+ /*#__PURE__*/ jsxs("div", {
4886
+ className: "flex items-center space-x-1",
4887
+ children: [
4888
+ /*#__PURE__*/ jsx(Icon, {
4889
+ icon: "gen3:share",
4890
+ height: 16,
4891
+ width: 16,
4892
+ color: theme.colors.accent[4]
4893
+ }),
4894
+ /*#__PURE__*/ jsx(Text, {
4895
+ size: "sm",
4896
+ children: "Set the shared filters for all"
4897
+ }),
4898
+ /*#__PURE__*/ jsx(Tooltip, {
4899
+ label: "If enabled any filter set on this tab will be applied to every tab where occurs.",
4900
+ position: "top",
4901
+ withArrow: true,
4902
+ children: /*#__PURE__*/ jsx(Icon, {
4903
+ icon: "gen3:info",
4904
+ height: 12,
4905
+ width: 12,
4906
+ color: theme.colors.accent[4]
4907
+ })
4908
+ })
4909
+ ]
4910
+ }),
4911
+ /*#__PURE__*/ jsx(Switch, {
4912
+ checked: shareFilters,
4913
+ onChange: (event)=>handleSharedFiltersChange(event.currentTarget.checked)
4914
+ })
4915
+ ]
4916
+ }),
4917
+ filters.tabs.length > 1 && /*#__PURE__*/ jsx(Select, {
4918
+ classNames: {
4919
+ options: 'border-1 border-base-dark',
4920
+ option: 'hover:bg-primary-lightest'
4565
4921
  },
4566
- "aria-label": "enter value to add filter",
4567
- value: selectedValues,
4568
- onChange: setSelectedValues,
4569
- searchable: true,
4570
- data: dataValues,
4571
- limit: 10,
4572
- maxDropdownHeight: 200,
4573
- hidePickedOptions: true,
4574
- withScrollArea: false,
4575
- mt: "md"
4576
- })
4577
- })
4922
+ withCheckIcon: false,
4923
+ data: items,
4924
+ value: value === null ? '0' : value,
4925
+ onChange: setValue
4926
+ }),
4927
+ Object.keys(facetDefinitions).length > 0 ? /*#__PURE__*/ jsx(FiltersPanel, {
4928
+ fields: fields,
4929
+ dataFunctions: facetDataHooks,
4930
+ valueLabel: tabTitle
4931
+ }) : null
4932
+ ]
4578
4933
  })
4579
4934
  ]
4580
4935
  });
4581
4936
  };
4582
4937
 
4938
+ const VerticalTabbedPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHooks, onAccessChange = (value)=>null, accessLevel = Accessibility.ALL, showAccessLevel = false })=>{
4939
+ return /*#__PURE__*/ jsx("div", {
4940
+ children: /*#__PURE__*/ jsxs(Tabs, {
4941
+ variant: "pills",
4942
+ orientation: "vertical",
4943
+ keepMounted: false,
4944
+ defaultValue: filters?.tabs[0].title ?? 'Filters',
4945
+ children: [
4946
+ /*#__PURE__*/ jsx(Tabs.List, {
4947
+ children: filters.tabs.map((tab)=>{
4948
+ return /*#__PURE__*/ jsx(Tabs.Tab, {
4949
+ value: tab.title,
4950
+ children: tab.title
4951
+ }, `${tab.title}-tab`);
4952
+ })
4953
+ }),
4954
+ filters.tabs.map((tab)=>{
4955
+ return /*#__PURE__*/ jsx(Tabs.Panel, {
4956
+ value: tab.title,
4957
+ className: "w-1/4",
4958
+ children: Object.keys(facetDefinitions).length > 0 ? /*#__PURE__*/ jsx(FiltersPanel, {
4959
+ fields: tab.fields.reduce((acc, field)=>{
4960
+ return [
4961
+ ...acc,
4962
+ facetDefinitions[field]
4963
+ ];
4964
+ }, []),
4965
+ dataFunctions: facetDataHooks,
4966
+ valueLabel: tabTitle
4967
+ }) : null
4968
+ }, `filter-${tab.title}-tabPanel`);
4969
+ })
4970
+ ]
4971
+ })
4972
+ });
4973
+ };
4974
+ const SinglePanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks })=>{
4975
+ return /*#__PURE__*/ jsx("div", {
4976
+ children: Object.keys(facetDefinitions).length > 0 ? /*#__PURE__*/ jsx(FiltersPanel, {
4977
+ fields: filters.tabs[0].fields.reduce((acc, field)=>{
4978
+ return [
4979
+ ...acc,
4980
+ facetDefinitions[field]
4981
+ ];
4982
+ }, []),
4983
+ dataFunctions: facetDataHooks,
4984
+ valueLabel: tabTitle
4985
+ }) : null
4986
+ });
4987
+ };
4988
+ const TabbedPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHooks })=>{
4989
+ return filters.tabs.length > 1 ? /*#__PURE__*/ jsx(VerticalTabbedPanel, {
4990
+ index: index,
4991
+ filters: filters,
4992
+ tabTitle: tabTitle,
4993
+ facetDefinitions: facetDefinitions,
4994
+ facetDataHooks: facetDataHooks
4995
+ }) : /*#__PURE__*/ jsx(SinglePanel, {
4996
+ index: index,
4997
+ filters: filters,
4998
+ tabTitle: tabTitle,
4999
+ facetDefinitions: facetDefinitions,
5000
+ facetDataHooks: facetDataHooks
5001
+ });
5002
+ };
5003
+
4583
5004
  /**
4584
5005
  * Scrolls to hash in url when component mounts and removes hash from url when component unmounts
4585
5006
  * @param valid_hashes - what hashes in url should trigger scroll
@@ -4601,58 +5022,6 @@ const isFacetEmpty = (op)=>{
4601
5022
  }, []);
4602
5023
  };
4603
5024
 
4604
- const createFacetCard = ({ facetDefinition, valueLabel, hooks: dataFunctions, facetNameFormatter, idPrefix, hideIfEmpty = false, width, showPercent = false, queryOptions })=>{
4605
- const { field, type, description, label } = facetDefinition;
4606
- const facetLabel = label ?? facetNameFormatter(facetDefinition.field);
4607
- const valueTypeLabel = valueLabel === undefined || typeof valueLabel === 'string' ? valueLabel : valueLabel(queryOptions);
4608
- return /*#__PURE__*/ jsx("div", {
4609
- children: {
4610
- enum: /*#__PURE__*/ jsx(EnumFacet, {
4611
- valueLabel: valueTypeLabel,
4612
- field: field,
4613
- facetName: facetLabel,
4614
- description: description,
4615
- hideIfEmpty: hideIfEmpty,
4616
- width: width,
4617
- hooks: dataFunctions,
4618
- showPercent: showPercent,
4619
- sharedWithIndices: facetDefinition?.sharedWithIndices
4620
- }, `${idPrefix}-enum-${field}`),
4621
- range: /*#__PURE__*/ jsx(RangeFacet, {
4622
- valueLabel: valueTypeLabel,
4623
- field: field,
4624
- facetName: facetLabel,
4625
- description: description,
4626
- hideIfEmpty: hideIfEmpty,
4627
- width: width,
4628
- hooks: dataFunctions,
4629
- minimum: facetDefinition.range?.minimum,
4630
- maximum: facetDefinition.range?.maximum,
4631
- showSettings: showPercent,
4632
- sharedWithIndices: facetDefinition?.sharedWithIndices
4633
- }, `${idPrefix}-range-${field}`),
4634
- exact: /*#__PURE__*/ jsx(ExactValueFacet, {
4635
- field: field,
4636
- facetName: facetLabel,
4637
- description: description,
4638
- hideIfEmpty: hideIfEmpty,
4639
- width: width,
4640
- hooks: dataFunctions,
4641
- sharedWithIndices: facetDefinition?.sharedWithIndices
4642
- }, `${idPrefix}-exact-${field}`),
4643
- multiselect: /*#__PURE__*/ jsx(MultiSelectValueFacet, {
4644
- field: field,
4645
- facetName: facetLabel,
4646
- description: description,
4647
- hideIfEmpty: hideIfEmpty,
4648
- width: width,
4649
- hooks: dataFunctions,
4650
- sharedWithIndices: facetDefinition?.sharedWithIndices
4651
- }, `${idPrefix}-exact-${field}`)
4652
- }[type]
4653
- }, `${idPrefix}-facet-${field}`);
4654
- };
4655
-
4656
5025
  const createFacetCards = ({ facets, hooks, facetNameFormatter, idPrefix, valueLabel, dismissCallback, hideIfEmpty, Chart, showPercent })=>{
4657
5026
  return facets.map((facetDefinition)=>{
4658
5027
  return createFacetCard({
@@ -7489,7 +7858,7 @@ const AdvancedSearch = ({ advSearchFilters, setAdvancedSearchFilters })=>{
7489
7858
  /*#__PURE__*/ jsxs("div", {
7490
7859
  className: "flex flex-row justify-between items-center",
7491
7860
  children: [
7492
- /*#__PURE__*/ jsx(SegmentedControl, {
7861
+ /*#__PURE__*/ jsx(SegmentedControl$1, {
7493
7862
  data: [
7494
7863
  {
7495
7864
  label: 'AND',
@@ -12146,235 +12515,62 @@ const DownloadsPanel = ({ dropdowns, buttons, loginForDownload, index, totalCoun
12146
12515
  }))
12147
12516
  }
12148
12517
  };
12149
- }, {});
12150
- }
12151
- return dropdownsToRender;
12152
- }, [
12153
- dropdowns,
12154
- loginRequired,
12155
- isUserLoggedIn
12156
- ]);
12157
- return dropdowns || buttons ? /*#__PURE__*/ jsxs("div", {
12158
- className: "flex space-x-1",
12159
- children: [
12160
- Object.values(dropdownsToRender).map((dropdown)=>{
12161
- return createDownloadMenuButton(dropdown, {
12162
- type: index,
12163
- totalCount,
12164
- fields,
12165
- filter,
12166
- accessibility: accessibility ?? Accessibility.ALL
12167
- });
12168
- }),
12169
- buttons.map((button)=>{
12170
- let disabled = false;
12171
- let actionFunction = NullButtonAction;
12172
- let actionArgs = {};
12173
- const buttonAction = button.action ?? button.type;
12174
- if (buttonAction) {
12175
- const actionItem = findButtonAction(buttonAction);
12176
- if (actionItem) {
12177
- const funcArgs = actionItem.args ?? {};
12178
- const func = actionItem.action;
12179
- actionFunction = func;
12180
- actionArgs = funcArgs ?? {};
12181
- }
12182
- }
12183
- if (loginRequired && !isUserLoggedIn) {
12184
- disabled = true;
12185
- }
12186
- return /*#__PURE__*/ jsx(CohortActionButton, {
12187
- activeText: 'Downloading...',
12188
- inactiveText: button.title,
12189
- tooltipText: button.tooltipText,
12190
- disabled: disabled || !button.enabled,
12191
- actionFunction: actionFunction,
12192
- actionArgs: {
12193
- ...actionArgs,
12194
- ...button.actionArgs ?? {},
12195
- type: index,
12196
- totalCount,
12197
- fields,
12198
- filter,
12199
- accessibility: accessibility ?? Accessibility.ALL
12200
- }
12201
- }, button.title);
12202
- })
12203
- ]
12204
- }) : /*#__PURE__*/ jsx(React__default.Fragment, {});
12205
- };
12206
-
12207
- const FiltersPanel = ({ fields, dataFunctions, valueLabel })=>{
12208
- return /*#__PURE__*/ jsx("div", {
12209
- "data-testid": "filters-facets",
12210
- className: "flex flex-col gap-y-4 w-full",
12211
- children: fields.map((facetDefinition)=>{
12212
- if (facetDefinition?.type === undefined) {
12213
- console.warn('Facet definition missing type', facetDefinition);
12214
- return null;
12215
- }
12216
- if (!(facetDefinition.type in dataFunctions)) return null;
12217
- return createFacetCard({
12218
- facetDefinition,
12219
- valueLabel,
12220
- hooks: dataFunctions[facetDefinition.type],
12221
- facetNameFormatter: fieldNameToTitle,
12222
- idPrefix: 'filters-panel',
12223
- showPercent: false
12224
- });
12225
- })
12226
- });
12227
- };
12228
-
12229
- const AccessData = [
12230
- {
12231
- value: Accessibility.ALL,
12232
- label: 'All'
12233
- },
12234
- {
12235
- value: Accessibility.ACCESSIBLE,
12236
- label: 'Accessible'
12237
- },
12238
- {
12239
- value: Accessibility.UNACCESSIBLE,
12240
- label: 'Not Accessible'
12241
- }
12242
- ];
12243
- const AccessLevelControl = ({ onChange, accessLevel })=>{
12244
- const theme = useMantineTheme();
12245
- return /*#__PURE__*/ jsx(SegmentedControl, {
12246
- color: theme.colors.accent[5],
12247
- data: AccessData,
12248
- value: accessLevel,
12249
- onChange: (val)=>{
12250
- const accessibilityValue = AccessData.find((item)=>item.value === val)?.value || Accessibility.ALL;
12251
- onChange(accessibilityValue);
12518
+ }, {});
12252
12519
  }
12253
- });
12254
- };
12255
-
12256
- const DropdownPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHooks, onAccessChange = (value)=>null, accessLevel = Accessibility.ALL, showAccessLevel = false })=>{
12257
- const [value, setValue] = useState('0');
12258
- const allFiltersCollapsed = useCoreSelector((state)=>selectAllCohortFiltersCollapsed(state, index));
12259
- const sharedFilters = useCoreSelector((state)=>selectSharedFilters(state));
12260
- const shareFilters = useCoreSelector((state)=>selectShouldShareFilters(state));
12261
- const theme = useMantineTheme();
12262
- const coreDispatch = useCoreDispatch();
12263
- const toggleAllFiltersExpanded = (expand)=>{
12264
- coreDispatch(toggleCohortBuilderAllFilters({
12265
- expand,
12266
- index
12267
- }));
12268
- };
12269
- const items = useDeepCompareMemo(()=>filters.tabs.map((tab, idx)=>{
12270
- return {
12271
- label: tab.title,
12272
- value: idx.toString()
12273
- };
12274
- }), [
12275
- filters.tabs
12520
+ return dropdownsToRender;
12521
+ }, [
12522
+ dropdowns,
12523
+ loginRequired,
12524
+ isUserLoggedIn
12276
12525
  ]);
12277
- const fields = filters.tabs[Number(value)].fields.reduce((acc, field)=>{
12278
- return [
12279
- ...acc,
12280
- facetDefinitions[field]
12281
- ];
12282
- }, []);
12283
- const handleSharedFiltersChange = (value)=>{
12284
- modals.openConfirmModal({
12285
- title: 'Confirm change of shared filters mode',
12286
- children: /*#__PURE__*/ jsx(Text, {
12287
- size: "sm",
12288
- children: value ? 'Switching to Shared Filters mode will apply all selected filters across all indices.' : 'Switching to Unshared Filters mode will stop syncing filters but will not remove them.'
12289
- }),
12290
- labels: {
12291
- confirm: 'Confirm',
12292
- cancel: 'Cancel'
12293
- },
12294
- onConfirm: ()=>coreDispatch(setShouldShareFilters(value))
12295
- });
12296
- };
12297
- return /*#__PURE__*/ jsxs(Stack, {
12298
- align: "flex-start",
12526
+ return dropdowns || buttons ? /*#__PURE__*/ jsxs("div", {
12527
+ className: "flex space-x-1",
12299
12528
  children: [
12300
- /*#__PURE__*/ jsxs(Group, {
12301
- justify: "space-between",
12302
- className: "w-full",
12303
- children: [
12304
- /*#__PURE__*/ jsx(Text, {
12305
- size: "xl",
12306
- fw: 800,
12307
- children: "Filters"
12308
- }),
12309
- /*#__PURE__*/ jsx("button", {
12310
- className: "text-primary text-sm font-normal",
12311
- onClick: ()=>toggleAllFiltersExpanded(allFiltersCollapsed),
12312
- children: allFiltersCollapsed ? 'Expand All' : 'Collapse All'
12313
- })
12314
- ]
12529
+ Object.values(dropdownsToRender).map((dropdown)=>{
12530
+ return createDownloadMenuButton(dropdown, {
12531
+ type: index,
12532
+ totalCount,
12533
+ fields,
12534
+ filter,
12535
+ accessibility: accessibility ?? Accessibility.ALL
12536
+ });
12315
12537
  }),
12316
- showAccessLevel ? /*#__PURE__*/ jsx(AccessLevelControl, {
12317
- onChange: onAccessChange,
12318
- accessLevel: accessLevel
12319
- }) : null,
12320
- /*#__PURE__*/ jsxs(Stack, {
12321
- className: "bg-base-max py-4 px-2 h-full w-full",
12322
- children: [
12323
- Object.keys(sharedFilters).length > 0 && /*#__PURE__*/ jsxs(Group, {
12324
- gap: "xs",
12325
- justify: "space-between",
12326
- children: [
12327
- /*#__PURE__*/ jsxs("div", {
12328
- className: "flex items-center space-x-1",
12329
- children: [
12330
- /*#__PURE__*/ jsx(Icon, {
12331
- icon: "gen3:share",
12332
- height: 16,
12333
- width: 16,
12334
- color: theme.colors.accent[4]
12335
- }),
12336
- /*#__PURE__*/ jsx(Text, {
12337
- size: "sm",
12338
- children: "Set the shared filters for all"
12339
- }),
12340
- /*#__PURE__*/ jsx(Tooltip, {
12341
- label: "If enabled any filter set on this tab will be applied to every tab where occurs.",
12342
- position: "top",
12343
- withArrow: true,
12344
- children: /*#__PURE__*/ jsx(Icon, {
12345
- icon: "gen3:info",
12346
- height: 12,
12347
- width: 12,
12348
- color: theme.colors.accent[4]
12349
- })
12350
- })
12351
- ]
12352
- }),
12353
- /*#__PURE__*/ jsx(Switch, {
12354
- checked: shareFilters,
12355
- onChange: (event)=>handleSharedFiltersChange(event.currentTarget.checked)
12356
- })
12357
- ]
12358
- }),
12359
- filters.tabs.length > 1 && /*#__PURE__*/ jsx(Select, {
12360
- classNames: {
12361
- options: 'border-1 border-base-dark',
12362
- option: 'hover:bg-primary-lightest'
12363
- },
12364
- withCheckIcon: false,
12365
- data: items,
12366
- value: value === null ? '0' : value,
12367
- onChange: setValue
12368
- }),
12369
- Object.keys(facetDefinitions).length > 0 ? /*#__PURE__*/ jsx(FiltersPanel, {
12370
- fields: fields,
12371
- dataFunctions: facetDataHooks,
12372
- valueLabel: tabTitle
12373
- }) : null
12374
- ]
12538
+ buttons.map((button)=>{
12539
+ let disabled = false;
12540
+ let actionFunction = NullButtonAction;
12541
+ let actionArgs = {};
12542
+ const buttonAction = button.action ?? button.type;
12543
+ if (buttonAction) {
12544
+ const actionItem = findButtonAction(buttonAction);
12545
+ if (actionItem) {
12546
+ const funcArgs = actionItem.args ?? {};
12547
+ const func = actionItem.action;
12548
+ actionFunction = func;
12549
+ actionArgs = funcArgs ?? {};
12550
+ }
12551
+ }
12552
+ if (loginRequired && !isUserLoggedIn) {
12553
+ disabled = true;
12554
+ }
12555
+ return /*#__PURE__*/ jsx(CohortActionButton, {
12556
+ activeText: 'Downloading...',
12557
+ inactiveText: button.title,
12558
+ tooltipText: button.tooltipText,
12559
+ disabled: disabled || !button.enabled,
12560
+ actionFunction: actionFunction,
12561
+ actionArgs: {
12562
+ ...actionArgs,
12563
+ ...button.actionArgs ?? {},
12564
+ type: index,
12565
+ totalCount,
12566
+ fields,
12567
+ filter,
12568
+ accessibility: accessibility ?? Accessibility.ALL
12569
+ }
12570
+ }, button.title);
12375
12571
  })
12376
12572
  ]
12377
- });
12573
+ }) : /*#__PURE__*/ jsx(React__default.Fragment, {});
12378
12574
  };
12379
12575
 
12380
12576
  const EmptyData = {};
@@ -12812,6 +13008,18 @@ const TabbedCohortBuilder = ({ index, tabsConfiguration })=>{
12812
13008
  cohortFilters.root,
12813
13009
  isSuccess
12814
13010
  ]);
13011
+ const EnumHookInstances = {
13012
+ useGetFacetData: getEnumFacetData,
13013
+ useUpdateFacetFilters: partial(useUpdateFilters$1, index),
13014
+ useGetFacetFilters: partial(useGetFacetFilters$1, index),
13015
+ useClearFilter: partial(useClearFilters$1, index),
13016
+ useFilterExpanded: partial(useFilterExpandedState$1, index),
13017
+ useToggleExpandFilter: partial(useToggleExpandFilter$1, index),
13018
+ useGetCombineMode: partial(useCohortFilterCombineState, index),
13019
+ useSetCombineMode: partial(useSetCohortFilterCombineState, index),
13020
+ useFieldNameToTitle: useFieldNameToTitle,
13021
+ useTotalCounts: undefined
13022
+ };
12815
13023
  const RangeHookInstances = {
12816
13024
  useGetFacetData: getRangeFacetData,
12817
13025
  useUpdateFacetFilters: partial(useUpdateFilters$1, index),
@@ -12826,38 +13034,9 @@ const TabbedCohortBuilder = ({ index, tabsConfiguration })=>{
12826
13034
  const facetDataHooks = useDeepCompareMemo(()=>{
12827
13035
  return {
12828
13036
  // TODO: see if there a better way to do this
12829
- enum: {
12830
- useGetFacetData: getEnumFacetData,
12831
- useUpdateFacetFilters: partial(useUpdateFilters$1, index),
12832
- useGetFacetFilters: partial(useGetFacetFilters$1, index),
12833
- useClearFilter: partial(useClearFilters$1, index),
12834
- useFilterExpanded: partial(useFilterExpandedState$1, index),
12835
- useToggleExpandFilter: partial(useToggleExpandFilter$1, index),
12836
- useGetCombineMode: partial(useCohortFilterCombineState, index),
12837
- useSetCombineMode: partial(useSetCohortFilterCombineState, index),
12838
- useFieldNameToTitle: useFieldNameToTitle,
12839
- useTotalCounts: undefined
12840
- },
12841
- exact: {
12842
- useGetFacetData: getEnumFacetData,
12843
- useUpdateFacetFilters: partial(useUpdateFilters$1, index),
12844
- useGetFacetFilters: partial(useGetFacetFilters$1, index),
12845
- useClearFilter: partial(useClearFilters$1, index),
12846
- useFilterExpanded: partial(useFilterExpandedState$1, index),
12847
- useToggleExpandFilter: partial(useToggleExpandFilter$1, index),
12848
- useFieldNameToTitle: useFieldNameToTitle,
12849
- useTotalCounts: undefined
12850
- },
12851
- multiselect: {
12852
- useGetFacetData: getEnumFacetData,
12853
- useUpdateFacetFilters: partial(useUpdateFilters$1, index),
12854
- useGetFacetFilters: partial(useGetFacetFilters$1, index),
12855
- useClearFilter: partial(useClearFilters$1, index),
12856
- useFilterExpanded: partial(useFilterExpandedState$1, index),
12857
- useToggleExpandFilter: partial(useToggleExpandFilter$1, index),
12858
- useFieldNameToTitle: useFieldNameToTitle,
12859
- useTotalCounts: undefined
12860
- },
13037
+ enum: EnumHookInstances,
13038
+ exact: EnumHookInstances,
13039
+ multiselect: EnumHookInstances,
12861
13040
  range: RangeHookInstances,
12862
13041
  age: RangeHookInstances,
12863
13042
  year: RangeHookInstances,
@@ -12865,7 +13044,8 @@ const TabbedCohortBuilder = ({ index, tabsConfiguration })=>{
12865
13044
  days: RangeHookInstances,
12866
13045
  percent: RangeHookInstances,
12867
13046
  datetime: RangeHookInstances,
12868
- toggle: RangeHookInstances
13047
+ toggle: RangeHookInstances,
13048
+ upload: EnumHookInstances
12869
13049
  };
12870
13050
  }, [
12871
13051
  getEnumFacetData,
@@ -13877,7 +14057,7 @@ const AnalysisCard = ({ title, description, type, icon, image, hasDemo, loginReq
13877
14057
  className: "h-full",
13878
14058
  children: [
13879
14059
  /*#__PURE__*/ jsx("div", {
13880
- className: "p-0 rounded-sm h-1/2 h-max-1/2",
14060
+ className: "p-0 rounded-sm h-1/2 h-max-1/2 flex justify-center items-center overflow-hidden",
13881
14061
  children: /*#__PURE__*/ jsx(Image$1, {
13882
14062
  component: Image,
13883
14063
  src: `${image}`,
@@ -17350,7 +17530,7 @@ const ComparisonCard = ({ config, groundData, groundLabel, comparisonData, compa
17350
17530
  fw: 600,
17351
17531
  children: fieldNameToTitle(field)
17352
17532
  }),
17353
- /*#__PURE__*/ jsx(SegmentedControl, {
17533
+ /*#__PURE__*/ jsx(SegmentedControl$1, {
17354
17534
  value: viewType,
17355
17535
  onChange: setViewType,
17356
17536
  data: [
@@ -19131,6 +19311,77 @@ const registerMetadataSchemaApp = ()=>createGen3App({
19131
19311
  requiredEntityTypes: []
19132
19312
  });
19133
19313
 
19314
+ const DropdownWithIcon = ({ disableTargetWidth, LeftIcon, RightIcon = /*#__PURE__*/ jsx(IoMdArrowDropdown, {
19315
+ size: "1.25em",
19316
+ "aria-hidden": "true",
19317
+ "data-testid": "dropdown-icon"
19318
+ }), TargetButtonChildren, targetButtonDisabled, dropdownElements, menuLabelText, menuLabelCustomClass, customPosition, fullHeight, zIndex = undefined, customDataTestId = undefined, tooltip = undefined, buttonAriaLabel = undefined })=>{
19319
+ return /*#__PURE__*/ jsxs(Menu, {
19320
+ width: disableTargetWidth ?? 'target',
19321
+ ...customPosition && {
19322
+ position: customPosition
19323
+ },
19324
+ "data-testid": customDataTestId ?? 'menu-elem',
19325
+ zIndex: zIndex,
19326
+ children: [
19327
+ /*#__PURE__*/ jsx(Menu.Target, {
19328
+ children: /*#__PURE__*/ jsx(Button, {
19329
+ variant: "outline",
19330
+ color: "primary",
19331
+ className: `bg-base-max border-primary data-disabled:opacity-50 data-disabled:bg-base-max data-disabled:text-primary ${focusStyles}`,
19332
+ ...LeftIcon && {
19333
+ leftIcon: LeftIcon
19334
+ },
19335
+ rightSection: RightIcon,
19336
+ disabled: targetButtonDisabled,
19337
+ classNames: {
19338
+ // rightIcon: 'border-l pl-1 -mr-2',
19339
+ root: fullHeight ? 'h-full' : undefined
19340
+ },
19341
+ "aria-label": buttonAriaLabel,
19342
+ children: /*#__PURE__*/ jsx("div", {
19343
+ children: tooltip?.length && !targetButtonDisabled ? /*#__PURE__*/ jsx("div", {
19344
+ children: /*#__PURE__*/ jsx(Tooltip, {
19345
+ label: tooltip,
19346
+ children: /*#__PURE__*/ jsx("div", {
19347
+ children: TargetButtonChildren
19348
+ })
19349
+ })
19350
+ }) : /*#__PURE__*/ jsx("div", {
19351
+ children: TargetButtonChildren
19352
+ })
19353
+ })
19354
+ })
19355
+ }),
19356
+ /*#__PURE__*/ jsxs(Menu.Dropdown, {
19357
+ "data-testid": "dropdown-menu-options",
19358
+ className: "border-1 border-secondary",
19359
+ children: [
19360
+ menuLabelText && /*#__PURE__*/ jsxs(React__default.Fragment, {
19361
+ children: [
19362
+ /*#__PURE__*/ jsx(Menu.Label, {
19363
+ className: menuLabelCustomClass ?? 'font-bold',
19364
+ "data-testid": "menu-label",
19365
+ children: menuLabelText
19366
+ }),
19367
+ /*#__PURE__*/ jsx(Menu.Divider, {})
19368
+ ]
19369
+ }),
19370
+ dropdownElements?.map(({ title, onClick, icon, disabled }, idx)=>/*#__PURE__*/ jsx(Menu.Item, {
19371
+ onClick: ()=>{
19372
+ if (onClick) onClick();
19373
+ },
19374
+ "data-testid": `${title}-${idx}`,
19375
+ leftSection: icon && icon,
19376
+ disabled: disabled,
19377
+ children: title
19378
+ }, `${title}-${idx}`))
19379
+ ]
19380
+ })
19381
+ ]
19382
+ });
19383
+ };
19384
+
19134
19385
  const ActionButton = ({ title, enabled, type, leftIcon, rightIcon, tooltipText })=>{
19135
19386
  return /*#__PURE__*/ jsx(Tooltip, {
19136
19387
  label: tooltipText,
@@ -25590,5 +25841,5 @@ const staticNotebookAPI = async (req, res)=>{
25590
25841
  });
25591
25842
  };
25592
25843
 
25593
- export { AISearchPageGetServerSideProps, AccessLevel, ActionBar, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisCenterWithSections, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BAD_DATA_MESSAGE, Banner, BaseModal, Charts, CohortBuilder, CohortManager$1 as CohortManager, CollapsableCharts, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource$1 as ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DAYS_IN_YEAR, DEFAULT_MAXIMUM, DEFAULT_MINIMUM, DEFAULT_VISIBLE_ITEMS$1 as DEFAULT_VISIBLE_ITEMS, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, EnumFacet, EnumFacetChart, ErrorCard, ExactValueFacet, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FacetControlsHeader, FacetExpander, FacetSelector, FacetSortPanel, FacetTabs, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header$1 as Header, HoverLink, LandingPage, LandingPageGetServerSideProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, MultiSelectValueFacet, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryExpression, QueryExpressionContext, QueryExpressionSection, QueryPage, QueryPageGetServerSideProps, RangeFacet, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, SinglePageStudyDetailsPanel, StaticNotebookIFrame, StaticNotebookViewer, StudyDetailsPanel, StudyGroup, StudyGroupPanel, StudyProvider, SubmissionPage, SubmissionPageGetServerSideProps, TabbedCohortBuilder, TabbedCohortBuilderPage, TabbedCohortBuilderPageGetServerSideProps, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, accessibleFieldName, addIntersectionToIncludes, addUnion, analysisApiCohortDiscovery, buildNested, capitalize, classifyFacets, compareKeysAscending, compareKeysDescending, computeRowSpan, convertMinutesToMilliseconds, convertPathsToTree, convertSecondsToMilliseconds, convertToStringArray, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, extractRangeValues, focusStyles, getAllFieldsFromFilterConfigs, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isEnumFacetResponse, isHeaderMetadata, isPropertyKey, isTextTransform$1 as isTextTransform, mapFacetSortToSortType, processBucketData, processLabel$1 as processLabel, processRangeData, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeIntersectionFromEnum, removeKey$1 as removeKey, removeUnion, resourcePathFromProjectID, sessionLogout, sessionToken, staticNotebookAPI, stripTrailingSlash, toCountsString, toDisplayName, truncateString, unixTimeToString, updateFacetEnum, useClearFilters$1 as useClearFilters, useDiscoveryContext, useExtractEnumFilterValues, useExtractRangeFilterValues, useFieldNameToTitle, useGetFacetFilters$1 as useGetFacetFilters, useUpdateFilters$1 as useUpdateFilters, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
25844
+ export { AISearchPageGetServerSideProps, AccessLevel, AccordionPanel, ActionBar, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisCenterWithSections, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BAD_DATA_MESSAGE, Banner, BaseModal, Charts, CohortBuilder, CohortManager$1 as CohortManager, CollapsableCharts, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource$1 as ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DAYS_IN_YEAR, DEFAULT_MAXIMUM, DEFAULT_MINIMUM, DEFAULT_VISIBLE_ITEMS$1 as DEFAULT_VISIBLE_ITEMS, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, DropdownPanel, DropdownWithIcon, EnumFacet, EnumFacetChart, ErrorCard, ExactValueFacet, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FacetControlsHeader, FacetExpander, FacetSelector, FacetSortPanel, FacetTabs, FiltersPanel, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header$1 as Header, HoverLink, LandingPage, LandingPageGetServerSideProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, MultiSelectValueFacet, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryExpression, QueryExpressionContext, QueryExpressionSection, QueryPage, QueryPageGetServerSideProps, RangeFacet, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SegmentedControl, SessionExpiredModal, SinglePageStudyDetailsPanel, StaticNotebookIFrame, StaticNotebookViewer, StudyDetailsPanel, StudyGroup, StudyGroupPanel, StudyProvider, SubmissionPage, SubmissionPageGetServerSideProps, TabbedCohortBuilder, TabbedCohortBuilderPage, TabbedCohortBuilderPageGetServerSideProps, TabbedPanel, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, accessibleFieldName, addIntersectionToIncludes, addUnion, analysisApiCohortDiscovery, buildNested, capitalize, classifyFacets, compareKeysAscending, compareKeysDescending, computeRowSpan, convertMinutesToMilliseconds, convertPathsToTree, convertSecondsToMilliseconds, convertToStringArray, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, extractRangeValues, focusStyles, getAllFieldsFromFilterConfigs, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isEnumFacetResponse, isHeaderMetadata, isPropertyKey, isTextTransform$1 as isTextTransform, mapFacetSortToSortType, processBucketData, processLabel$1 as processLabel, processRangeData, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeIntersectionFromEnum, removeKey$1 as removeKey, removeUnion, resourcePathFromProjectID, sessionLogout, sessionToken, staticNotebookAPI, stripTrailingSlash, toCountsString, toDisplayName, truncateString, unixTimeToString, updateFacetEnum, useClearFilters$1 as useClearFilters, useDiscoveryContext, useExtractEnumFilterValues, useExtractRangeFilterValues, useFieldNameToTitle, useGetFacetFilters$1 as useGetFacetFilters, useUpdateFilters$1 as useUpdateFilters, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
25594
25845
  //# sourceMappingURL=index.js.map