@gen3/frontend 0.12.30 → 0.12.31

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 (63) hide show
  1. package/dist/dts/components/Content/TextContent.js +3 -3
  2. package/dist/dts/components/Content/TextContent.js.map +1 -1
  3. package/dist/dts/components/Login/LoginPanel.js +2 -2
  4. package/dist/dts/components/Login/LoginPanel.js.map +1 -1
  5. package/dist/dts/components/Login/LoginProvidersPanel.d.ts +1 -1
  6. package/dist/dts/components/Login/LoginProvidersPanel.d.ts.map +1 -1
  7. package/dist/dts/components/Login/LoginProvidersPanel.js +15 -8
  8. package/dist/dts/components/Login/LoginProvidersPanel.js.map +1 -1
  9. package/dist/dts/components/Login/types.d.ts +4 -0
  10. package/dist/dts/components/Login/types.d.ts.map +1 -1
  11. package/dist/dts/components/Login/types.js.map +1 -1
  12. package/dist/dts/components/Providers/Gen3Provider.d.ts +1 -1
  13. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +10 -10
  14. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
  15. package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +6 -6
  16. package/dist/dts/features/Discovery/Discovery.d.ts.map +1 -1
  17. package/dist/dts/features/Discovery/Discovery.js +7 -6
  18. package/dist/dts/features/Discovery/Discovery.js.map +1 -1
  19. package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.d.ts +1 -8
  20. package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.d.ts.map +1 -1
  21. package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.js +23 -27
  22. package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.js.map +1 -1
  23. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts +1 -3
  24. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
  25. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +22 -23
  26. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
  27. package/dist/dts/features/Discovery/DiscoveryProvider.d.ts +6 -0
  28. package/dist/dts/features/Discovery/DiscoveryProvider.d.ts.map +1 -1
  29. package/dist/dts/features/Discovery/DiscoveryProvider.js +7 -2
  30. package/dist/dts/features/Discovery/DiscoveryProvider.js.map +1 -1
  31. package/dist/dts/features/Discovery/DiscoveryTable/DiscoveryTable.js +1 -1
  32. package/dist/dts/features/Discovery/DiscoveryTable/DiscoveryTable.js.map +1 -1
  33. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.d.ts +1 -3
  34. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.d.ts.map +1 -1
  35. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.js +6 -3
  36. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.js.map +1 -1
  37. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.d.ts +7 -0
  38. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.d.ts.map +1 -0
  39. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.js +39 -0
  40. package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.js.map +1 -0
  41. package/dist/index/cjs/QueryPanel-B-rY2zbc.js +24 -0
  42. package/dist/index/cjs/QueryPanel-B-rY2zbc.js.map +1 -0
  43. package/dist/index/cjs/index-CzKogdxQ.js +36854 -0
  44. package/dist/index/cjs/index-CzKogdxQ.js.map +1 -0
  45. package/dist/index/cjs/index.js +1 -1
  46. package/dist/index/esm/QueryPanel-DPqfAqn_.js +22 -0
  47. package/dist/index/esm/QueryPanel-DPqfAqn_.js.map +1 -0
  48. package/dist/index/esm/index-DqwHzMj3.js +36607 -0
  49. package/dist/index/esm/index-DqwHzMj3.js.map +1 -0
  50. package/dist/index/esm/index.js +1 -1
  51. package/dist/index.d.ts +60 -51
  52. package/dist/pages/cjs/CohortBuilder-UlQ8OfB0.js +491 -0
  53. package/dist/pages/cjs/CohortBuilder-UlQ8OfB0.js.map +1 -0
  54. package/dist/pages/cjs/index-BPFG5_6M.js +27909 -0
  55. package/dist/pages/cjs/index-BPFG5_6M.js.map +1 -0
  56. package/dist/pages/cjs/index.js +1 -1
  57. package/dist/pages/esm/CohortBuilder-CNAE-ns5.js +488 -0
  58. package/dist/pages/esm/CohortBuilder-CNAE-ns5.js.map +1 -0
  59. package/dist/pages/esm/index-D36Dm1lt.js +27826 -0
  60. package/dist/pages/esm/index-D36Dm1lt.js.map +1 -0
  61. package/dist/pages/esm/index.js +1 -1
  62. package/dist/pages.d.ts +3 -0
  63. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- export { A as AISearchPageGetServerSideProps, a as AccessLevel, b as AccordionPanel, c as ActionBar, d as ActionButton, e as AdminAuthZPageGetServerSideProps, f as AiSearch, g as AiSearchPage, h as AnalysisCenter, i as AnalysisCenterWithSections, j as AnalysisEditorPage, k as AnalysisEditorPageGetServerSideProps, l as AnalysisPage, m as AnalysisPageGetServerSideProps, n as AuthzPage, B as BAD_DATA_MESSAGE, o as Banner, p as BaseModal, C as CardContainer, q as Charts, r as ClinicalDataAnalysisPage, s as ClinicalDataAnalysisServerSideProps, t as CohortActionButton, u as CohortBuilder, v as CohortDropdownActionButton, w as CohortManager, x as CohortManagerAndExpression, y as CollapsableCharts, z as CollapsableSidebar, D as ColorThemePage, E as ColorThemePageGetServerSideProps, F as ContentSource, G as CountsValue, H as CreateCredentialsAPIKeyModal, I as CrosswalkPage, J as CrosswalkPageGetServerSideProps, K as Custom403Page, L as Custom404Page, M as DAYS_IN_YEAR, N as DEFAULT_MAXIMUM, O as DEFAULT_MINIMUM, P as DEFAULT_VISIBLE_ITEMS, Q as DataDictionaryPage, R as DataLibraryPage, S as DataLibraryPageGetServerSideProps, T as DefaultAuthorizedRoutesConfig, U as DictionaryPageGetServerSideProps, V as DictionaryWithContext, W as DiscoveryCellRendererFactory, X as DiscoveryConfigProvider, Y as DiscoveryIndexPanel, Z as DiscoveryPage, _ as DiscoveryPageGetServerSideProps, $ as DownloadButton, a0 as DownloadsPanel, a1 as DropdownButton, a2 as DropdownPanel, a3 as DropdownWithIcon, a4 as EmptyTableMessage, a5 as EnumFacet, a6 as EnumFacetChart, a7 as ErrorCard, a8 as ExactValueFacet, a9 as ExplorerPage, aa as ExplorerPageGetServerSideProps, ab as ExplorerPageGetServerSidePropsForConfigId, ac as ExplorerTable, ad as ExplorerTableCellRendererFactory, ae as ExplorerTableDetailsPanelFactory, af as FacetControlsHeader, ag as FacetExpander, ah as FacetSelector, ai as FacetSortPanel, aj as FacetTabs, ak as FiltersPanel, al as FirstTimeModal, am as Footer, an as Gen3Button, ao as Gen3ButtonReverse, ap as Gen3Link, aq as Gen3ModalsProvider, ar as Gen3Provider, as as GqlQueryEditor, at as Header, au as HoverLink, av as IconButton, aw as JSONObjectDownloadButton, ax as LandingPage, ay as LandingPageGetServerSideProps, az as LoginButton, aA as LoginPage, aB as LoginPageGetServerSideProps, aC as LoginPanel, aD as LoginProvidersPanel, aE as MessageCard, aF as MessagePage, aG as MetadataDictionary, aH as MinutesToMilliseconds, aI as MultiSelectValueFacet, aJ as NavPageLayout, aK as NavigationBar, aL as NavigationButton, aM as NoAccessModal, aN as NotebookLitePage, aO as NotebookLitePageGetStaticProps, aP as Profile, aQ as ProfilePage, aR as ProfilePageGetServerSideProps, aS as ProfileProvider, aT as ProtectedContent, aU as ProtectedContentUI, aV as QueryExpression, aW as QueryExpressionContext, aX as QueryExpressionSection, aY as QueryPage, aZ as QueryPageGetServerSideProps, a_ as RangeFacet, a$ as ReactECharts, b0 as Repository, b1 as RepositoryPage, b2 as RepositoryPageGetServerSideProps, b3 as ResourcesFilters, b4 as SPECIAL_CASE_FIELDS, b5 as SegmentedControl, b6 as SessionExpiredModal, b7 as SinglePageStudyDetailsPanel, b8 as StaticNotebookIFrame, b9 as StudyDetailsPanel, ba as StudyGroup, bb as StudyGroupPanel, bc as StudyProvider, bd as SubmissionPage, be as SubmissionPageGetServerSideProps, bf as TabbedCohortBuilder, bg as TabbedCohortBuilderPage, bh as TabbedCohortBuilderPageGetServerSideProps, bi as TabbedPanel, bj as TableXPositionContext, bk as TagCloud, bl as TailwindConfig, bm as TopBar, bn as UploadJSONButton, bo as User, bp as WarningCard, bq as Workspace, br as WorkspaceNoAccessPage, bs as WorkspaceNoAccessPageServerSideProps, bt as WorkspacePage, bu as WorkspacePageGetServerSideProps, bv as accessibleFieldName, bw as addIntersectionToIncludes, bx as addUnion, by as analysisApiCohortDiscovery, bz as capitalize, bA as classifyFacets, bB as compareKeysAscending, bC as compareKeysDescending, bD as computeRowSpan, bE as convertMinutesToMilliseconds, bF as convertPathsToTree, bG as convertSecondsToMilliseconds, bH as convertToStringArray, bI as createCSSVariables, bJ as createLabelFromHistogramData, bK as createMantineTheme, bL as credentialsLogin, bM as credentialsLogout, bN as extractObjectKey, bO as extractRangeValues, bP as filterAggregationsDataKeys, bQ as focusStyles, bR as gen3Modals, bS as getAllFieldsFromFilterConfigs, bT as getByPath, bU as getCurrentUnixTimestamp, bV as getFormattedTimestamp, bW as getHighResolutionTimestamp, bX as getNavPageLayoutPropsFromConfig, bY as getParamsValueAsString, bZ as getTagInfo, b_ as hasOwnProperty, b$ as isArrayOfString, c0 as isEnumFacetResponse, c1 as isHeaderMetadata, c2 as isPropertyKey, c3 as isTextTransform, c4 as isTimeGreaterThan, c5 as itemsInCart, c6 as mapFacetSortToSortType, c7 as measureExecutionTime, c8 as processBucketData, c9 as processDefinedRangeData, ca as processLabel, cb as processRangeData, cc as processRangeKeyLabel, cd as registerCohortBuilderDefaultPreviewRenderers, ce as registerCohortDiscoveryApp, cf as registerCohortSimilarityApp, cg as registerDefaultDiscoveryDataLoaders, ch as registerDiscoveryDefaultCellRenderers, ci as registerDownloadButtonAction, cj as registerExplorerDefaultCellRenderers, ck as registerIGVApp, cl as registerMetadataSchemaApp, cm as removeIntersectionFromEnum, cn as removeKey, co as removeMultipleSlashes, cp as removeUnion, cq as resourcePathFromProjectID, cr as sessionLogout, cs as sessionToken, ct as stripTrailingSlash, cu as toDisplayName, cv as truncateString, cw as unixTimeToString, cx as updateFacetEnum, cy as useClearFilters, cz as useDiscoveryContext, cA as useExtractEnumFilterValues, cB as useExtractRangeFilterValues, cC as useFieldNameToLabel, cD as useGetFacetFilters, cE as useGuppyActionButton, cF as useUpdateFilters, cG as useUpdateFiltersFlat, cH as userHasMethodForServiceOnResource, cI as validateObjectHasRequiredFields } from './index-Df-CHhZ4.js';
1
+ export { A as AISearchPageGetServerSideProps, a as AccessLevel, b as AccordionPanel, c as ActionBar, d as ActionButton, e as AdminAuthZPageGetServerSideProps, f as AiSearch, g as AiSearchPage, h as AnalysisCenter, i as AnalysisCenterWithSections, j as AnalysisEditorPage, k as AnalysisEditorPageGetServerSideProps, l as AnalysisPage, m as AnalysisPageGetServerSideProps, n as AuthzPage, B as BAD_DATA_MESSAGE, o as Banner, p as BaseModal, C as CardContainer, q as Charts, r as ClinicalDataAnalysisPage, s as ClinicalDataAnalysisServerSideProps, t as CohortActionButton, u as CohortBuilder, v as CohortDropdownActionButton, w as CohortManager, x as CohortManagerAndExpression, y as CollapsableCharts, z as CollapsableSidebar, D as ColorThemePage, E as ColorThemePageGetServerSideProps, F as ContentSource, G as CountsValue, H as CreateCredentialsAPIKeyModal, I as CrosswalkPage, J as CrosswalkPageGetServerSideProps, K as Custom403Page, L as Custom404Page, M as DAYS_IN_YEAR, N as DEFAULT_MAXIMUM, O as DEFAULT_MINIMUM, P as DEFAULT_VISIBLE_ITEMS, Q as DataDictionaryPage, R as DataLibraryPage, S as DataLibraryPageGetServerSideProps, T as DefaultAuthorizedRoutesConfig, U as DictionaryPageGetServerSideProps, V as DictionaryWithContext, W as DiscoveryCellRendererFactory, X as DiscoveryConfigProvider, Y as DiscoveryIndexPanel, Z as DiscoveryPage, _ as DiscoveryPageGetServerSideProps, $ as DownloadButton, a0 as DownloadsPanel, a1 as DropdownButton, a2 as DropdownPanel, a3 as DropdownWithIcon, a4 as EmptyTableMessage, a5 as EnumFacet, a6 as EnumFacetChart, a7 as ErrorCard, a8 as ExactValueFacet, a9 as ExplorerPage, aa as ExplorerPageGetServerSideProps, ab as ExplorerPageGetServerSidePropsForConfigId, ac as ExplorerTable, ad as ExplorerTableCellRendererFactory, ae as ExplorerTableDetailsPanelFactory, af as FacetControlsHeader, ag as FacetExpander, ah as FacetSelector, ai as FacetSortPanel, aj as FacetTabs, ak as FiltersPanel, al as FirstTimeModal, am as Footer, an as Gen3Button, ao as Gen3ButtonReverse, ap as Gen3Link, aq as Gen3ModalsProvider, ar as Gen3Provider, as as GqlQueryEditor, at as Header, au as HoverLink, av as IconButton, aw as JSONObjectDownloadButton, ax as LandingPage, ay as LandingPageGetServerSideProps, az as LoginButton, aA as LoginPage, aB as LoginPageGetServerSideProps, aC as LoginPanel, aD as LoginProvidersPanel, aE as MessageCard, aF as MessagePage, aG as MetadataDictionary, aH as MinutesToMilliseconds, aI as MultiSelectValueFacet, aJ as NavPageLayout, aK as NavigationBar, aL as NavigationButton, aM as NoAccessModal, aN as NotebookLitePage, aO as NotebookLitePageGetStaticProps, aP as Profile, aQ as ProfilePage, aR as ProfilePageGetServerSideProps, aS as ProfileProvider, aT as ProtectedContent, aU as ProtectedContentUI, aV as QueryExpression, aW as QueryExpressionContext, aX as QueryExpressionSection, aY as QueryPage, aZ as QueryPageGetServerSideProps, a_ as RangeFacet, a$ as ReactECharts, b0 as Repository, b1 as RepositoryPage, b2 as RepositoryPageGetServerSideProps, b3 as ResourcesFilters, b4 as SPECIAL_CASE_FIELDS, b5 as SegmentedControl, b6 as SessionExpiredModal, b7 as SinglePageStudyDetailsPanel, b8 as StaticNotebookIFrame, b9 as StudyDetailsPanel, ba as StudyGroup, bb as StudyGroupPanel, bc as StudyProvider, bd as SubmissionPage, be as SubmissionPageGetServerSideProps, bf as TabbedCohortBuilder, bg as TabbedCohortBuilderPage, bh as TabbedCohortBuilderPageGetServerSideProps, bi as TabbedPanel, bj as TableXPositionContext, bk as TagCloud, bl as TailwindConfig, bm as TopBar, bn as UploadJSONButton, bo as User, bp as WarningCard, bq as Workspace, br as WorkspaceNoAccessPage, bs as WorkspaceNoAccessPageServerSideProps, bt as WorkspacePage, bu as WorkspacePageGetServerSideProps, bv as accessibleFieldName, bw as addIntersectionToIncludes, bx as addUnion, by as analysisApiCohortDiscovery, bz as capitalize, bA as classifyFacets, bB as compareKeysAscending, bC as compareKeysDescending, bD as computeRowSpan, bE as convertMinutesToMilliseconds, bF as convertPathsToTree, bG as convertSecondsToMilliseconds, bH as convertToStringArray, bI as createCSSVariables, bJ as createLabelFromHistogramData, bK as createMantineTheme, bL as credentialsLogin, bM as credentialsLogout, bN as extractObjectKey, bO as extractRangeValues, bP as filterAggregationsDataKeys, bQ as focusStyles, bR as gen3Modals, bS as getAllFieldsFromFilterConfigs, bT as getByPath, bU as getCurrentUnixTimestamp, bV as getFormattedTimestamp, bW as getHighResolutionTimestamp, bX as getNavPageLayoutPropsFromConfig, bY as getParamsValueAsString, bZ as getTagInfo, b_ as hasOwnProperty, b$ as isArrayOfString, c0 as isEnumFacetResponse, c1 as isHeaderMetadata, c2 as isPropertyKey, c3 as isTextTransform, c4 as isTimeGreaterThan, c5 as itemsInCart, c6 as mapFacetSortToSortType, c7 as measureExecutionTime, c8 as processBucketData, c9 as processDefinedRangeData, ca as processLabel, cb as processRangeData, cc as processRangeKeyLabel, cd as registerCohortBuilderDefaultPreviewRenderers, ce as registerCohortDiscoveryApp, cf as registerCohortSimilarityApp, cg as registerDefaultDiscoveryDataLoaders, ch as registerDiscoveryDefaultCellRenderers, ci as registerDownloadButtonAction, cj as registerExplorerDefaultCellRenderers, ck as registerIGVApp, cl as registerMetadataSchemaApp, cm as removeIntersectionFromEnum, cn as removeKey, co as removeMultipleSlashes, cp as removeUnion, cq as resourcePathFromProjectID, cr as sessionLogout, cs as sessionToken, ct as stripTrailingSlash, cu as toDisplayName, cv as truncateString, cw as unixTimeToString, cx as updateFacetEnum, cy as useClearFilters, cz as useDiscoveryContext, cA as useExtractEnumFilterValues, cB as useExtractRangeFilterValues, cC as useFieldNameToLabel, cD as useGetFacetFilters, cE as useGuppyActionButton, cF as useUpdateFilters, cG as useUpdateFiltersFlat, cH as userHasMethodForServiceOnResource, cI as validateObjectHasRequiredFields } from './index-DqwHzMj3.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '@mantine/core';
package/dist/index.d.ts CHANGED
@@ -82,11 +82,15 @@ interface Gen3LoginPanelConfig {
82
82
  }
83
83
  interface LoginConfig extends Partial<Gen3LoginPanelConfig>, Gen3AppConfigData {
84
84
  topContent?: ReadonlyArray<TextContentProps>;
85
+ loginProviderExtra?: {
86
+ [key: string]: ReadonlyArray<TextContentProps>;
87
+ };
85
88
  bottomContent?: ReadonlyArray<TextContentProps>;
86
89
  showCredentialsLogin?: boolean;
87
90
  }
88
91
  interface LoginSelectedProps {
89
92
  readonly handleLoginSelected: (_url: string) => void;
93
+ readonly loginProviderExtra?: LoginConfig["loginProviderExtra"];
90
94
  }
91
95
  declare enum LoginButtonVisibility {
92
96
  Hidden = "hide",
@@ -316,7 +320,7 @@ interface LoginButtonProps {
316
320
  }
317
321
  declare const LoginButton: ({ icon, hideText, className, tooltip, visibility, externalLoginUrl, }: LoginButtonProps) => react_jsx_runtime.JSX.Element | null;
318
322
 
319
- declare const LoginProvidersPanel: ({ handleLoginSelected }: LoginSelectedProps) => react_jsx_runtime.JSX.Element;
323
+ declare const LoginProvidersPanel: ({ handleLoginSelected, loginProviderExtra }: LoginSelectedProps) => react_jsx_runtime.JSX.Element;
320
324
 
321
325
  declare const LoginPanel: (loginConfig: LoginConfig) => react_jsx_runtime.JSX.Element;
322
326
 
@@ -1604,6 +1608,54 @@ declare const NavPageLayout: ({ headerProps, footerProps, mainProps, headerMetad
1604
1608
 
1605
1609
  declare const Banner: React__default.FC<BannerProps>;
1606
1610
 
1611
+ interface DiscoveryIndexPanelProps {
1612
+ indexSelector: ReactNode | null;
1613
+ }
1614
+ /**
1615
+ * DiscoveryIndexPanel is a React functional component that renders a discovery panel interface.
1616
+ * It includes features such as search, sorting, filtering, charts, export functionality, and a discovery table.
1617
+ * The component uses hooks for handling state, API data loading, and interface interactions.
1618
+ *
1619
+ * @param {Object} props - The properties object passed to the component.
1620
+ * @param {Object} props.discoveryConfig - Configuration object for setting up the discovery panel.
1621
+ * @param {Object} props.discoveryConfig.features - Defines enabled features (e.g., search, charts, export).
1622
+ * @param {Object} props.discoveryConfig.minimalFieldMapping - Field mapping configuration, such as `uid`.
1623
+ * @param {JSX.Element} props.indexSelector - React component for selecting an index in the discovery panel.
1624
+ *
1625
+ * @return {JSX.Element} A fully featured discovery interface including search functionality, a table, charts, filters, and more.
1626
+ */
1627
+ declare const DiscoveryIndexPanel: ({ indexSelector }: DiscoveryIndexPanelProps) => react_jsx_runtime.JSX.Element;
1628
+
1629
+ declare const TagCloud: () => react_jsx_runtime.JSX.Element;
1630
+
1631
+ interface CellRenderFunctionProps<T = any, C extends MRT_RowData = JSONObject> {
1632
+ value: T;
1633
+ cell?: MRT_Cell<C>;
1634
+ row?: MRT_Row<C>;
1635
+ }
1636
+ /**
1637
+ * A Cell Renderer Function is a function that takes a value and returns a ReactElement
1638
+ * This is used to create a custom cell render a cell in the Discovery Table. The Discovery config
1639
+ * is available from the DiscoveryContext.
1640
+ * @param props: value and optional cell object
1641
+ */
1642
+ type CellRendererFunction<T = JSONObject> = (props: CellRenderFunctionProps, params?: T) => ReactElement;
1643
+
1644
+ declare const registerDiscoveryDefaultCellRenderers: () => void;
1645
+
1646
+ interface CellRendererFunctionCatalogEntry {
1647
+ [key: string]: CellRendererFunction;
1648
+ }
1649
+ declare class DiscoveryCellRendererFactory {
1650
+ private static instance;
1651
+ private cellRendererCatalog;
1652
+ private constructor();
1653
+ static getInstance(): DiscoveryCellRendererFactory;
1654
+ static getCellRenderer(type: string, functionName: string): CellRendererFunction;
1655
+ static registerCellRenderer(type: string, functionName: string, func: CellRendererFunction): void;
1656
+ static registerCellRendererCatalog(catalog: Record<string, CellRendererFunctionCatalogEntry>): void;
1657
+ }
1658
+
1607
1659
  interface SummaryStatisticsConfig {
1608
1660
  name: string;
1609
1661
  field: string;
@@ -1713,55 +1765,6 @@ interface DiscoveryConfig extends Gen3AppConfigData {
1713
1765
  metadataConfig: Array<DiscoveryIndexConfig>;
1714
1766
  }
1715
1767
 
1716
- interface DiscoveryIndexPanelProps {
1717
- discoveryConfig: DiscoveryIndexConfig;
1718
- indexSelector: ReactNode | null;
1719
- }
1720
- /**
1721
- * DiscoveryIndexPanel is a React functional component that renders a discovery panel interface.
1722
- * It includes features such as search, sorting, filtering, charts, export functionality, and a discovery table.
1723
- * The component uses hooks for handling state, API data loading, and interface interactions.
1724
- *
1725
- * @param {Object} props - The properties object passed to the component.
1726
- * @param {Object} props.discoveryConfig - Configuration object for setting up the discovery panel.
1727
- * @param {Object} props.discoveryConfig.features - Defines enabled features (e.g., search, charts, export).
1728
- * @param {Object} props.discoveryConfig.minimalFieldMapping - Field mapping configuration, such as `uid`.
1729
- * @param {JSX.Element} props.indexSelector - React component for selecting an index in the discovery panel.
1730
- *
1731
- * @return {JSX.Element} A fully featured discovery interface including search functionality, a table, charts, filters, and more.
1732
- */
1733
- declare const DiscoveryIndexPanel: ({ discoveryConfig, indexSelector, }: DiscoveryIndexPanelProps) => react_jsx_runtime.JSX.Element;
1734
-
1735
- declare const TagCloud: () => react_jsx_runtime.JSX.Element;
1736
-
1737
- interface CellRenderFunctionProps<T = any, C extends MRT_RowData = JSONObject> {
1738
- value: T;
1739
- cell?: MRT_Cell<C>;
1740
- row?: MRT_Row<C>;
1741
- }
1742
- /**
1743
- * A Cell Renderer Function is a function that takes a value and returns a ReactElement
1744
- * This is used to create a custom cell render a cell in the Discovery Table. The Discovery config
1745
- * is available from the DiscoveryContext.
1746
- * @param props: value and optional cell object
1747
- */
1748
- type CellRendererFunction<T = JSONObject> = (props: CellRenderFunctionProps, params?: T) => ReactElement;
1749
-
1750
- declare const registerDiscoveryDefaultCellRenderers: () => void;
1751
-
1752
- interface CellRendererFunctionCatalogEntry {
1753
- [key: string]: CellRendererFunction;
1754
- }
1755
- declare class DiscoveryCellRendererFactory {
1756
- private static instance;
1757
- private cellRendererCatalog;
1758
- private constructor();
1759
- static getInstance(): DiscoveryCellRendererFactory;
1760
- static getCellRenderer(type: string, functionName: string): CellRendererFunction;
1761
- static registerCellRenderer(type: string, functionName: string, func: CellRendererFunction): void;
1762
- static registerCellRendererCatalog(catalog: Record<string, CellRendererFunctionCatalogEntry>): void;
1763
- }
1764
-
1765
1768
  interface ActionBarProps extends ExportFromDiscoveryActions {
1766
1769
  selectedResources: any[];
1767
1770
  }
@@ -1780,6 +1783,12 @@ declare const AiSearch: ({ placeholder, uidForStorage, }: AiSearchProps) => reac
1780
1783
 
1781
1784
  interface DiscoveryProviderValue {
1782
1785
  discoveryConfig: DiscoveryIndexConfig;
1786
+ selectedTags: {
1787
+ [key: string]: boolean;
1788
+ };
1789
+ setSelectedTags: React__default.Dispatch<React__default.SetStateAction<{
1790
+ [key: string]: boolean;
1791
+ }>>;
1783
1792
  }
1784
1793
  declare const useDiscoveryContext: () => DiscoveryProviderValue;
1785
1794
  declare const DiscoveryProvider: ({ children, discoveryIndexConfig, }: {
@@ -2615,7 +2624,7 @@ interface Gen3ProviderProps {
2615
2624
  }
2616
2625
  declare const createCSSVariables: (colors: Record<string, string>) => void;
2617
2626
  declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) => {
2618
- focusRing?: "auto" | "always" | "never" | undefined;
2627
+ focusRing?: "always" | "never" | "auto" | undefined;
2619
2628
  scale?: number | undefined;
2620
2629
  fontSmoothing?: boolean | undefined;
2621
2630
  white?: string | undefined;
@@ -0,0 +1,491 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var useDeepCompare = require('use-deep-compare');
6
+ var core$1 = require('@mantine/core');
7
+ var _ = require('lodash');
8
+ var core = require('@gen3/core');
9
+ var index = require('./index-BPFG5_6M.js');
10
+ var hooks = require('@mantine/hooks');
11
+ require('victory');
12
+ require('react-icons/bs');
13
+ require('react-icons/io');
14
+ require('@mantine/form');
15
+ require('react-icons/md');
16
+ require('react-icons/ri');
17
+ require('react-icons/fa');
18
+ require('react-icons/pi');
19
+ require('@iconify-icon/react');
20
+ require('@mantine/modals');
21
+ require('tailwind-merge');
22
+ require('next/head');
23
+ require('next/link');
24
+ require('next/image');
25
+ require('next/router');
26
+ require('next/navigation');
27
+ require('cookies-next');
28
+ require('swr');
29
+ require('jose');
30
+ require('cookie');
31
+ require('@gen3/core/server');
32
+ require('@mantine/notifications');
33
+ require('react-markdown');
34
+ require('react-icons/ai');
35
+ require('remark-gfm');
36
+ require('fs');
37
+ require('path');
38
+ require('mantine-react-table');
39
+ require('react-icons/ti');
40
+ require('react-icons/fi');
41
+ require('react-minisearch');
42
+ require('minisearch');
43
+ require('echarts');
44
+ require('file-saver');
45
+ require('tailwind-styled-components');
46
+ require('jsonpath-plus');
47
+ require('react-dom');
48
+ require('lodash/uniq');
49
+ require('lodash/sum');
50
+ require('react-icons/lu');
51
+ require('@tanstack/react-table');
52
+ require('typescript-pluralize');
53
+ require('next/dynamic');
54
+ require('rehype-sanitize');
55
+ require('react-cookie');
56
+ require('default-composer');
57
+ require('filesize');
58
+ require('@dnd-kit/core');
59
+ require('@dnd-kit/sortable');
60
+ require('@dnd-kit/utilities');
61
+ require('@dnd-kit/modifiers');
62
+ require('universal-cookie');
63
+
64
+ const toDisplayName = (field)=>{
65
+ const parsed = field.split('.');
66
+ const fieldName = parsed.at(-1);
67
+ if (!fieldName) return 'NotSet';
68
+ return fieldName.split('_').map((w)=>_.capitalize(w)).join(' ');
69
+ };
70
+
71
+ const EmptyData = {};
72
+ /**
73
+ * CohortPanel is a React component that provides an interactive interface for cohort exploration and filtering.
74
+ * It integrates with data services and facilitates visualization, filtering, and analysis tasks.
75
+ *
76
+ * @param {Object} props The properties required to configure the CohortPanel component.
77
+ * @param {Object} props.guppyConfig Configuration object for Guppy, including field mappings and data type information.
78
+ * @param {Object} props.filters Configuration for filter tabs, including filter fields and layout.
79
+ * @param {Object} [props.charts={}] Optional set of chart configuration objects for rendering summaries.
80
+ * @param {Object} [props.chartsSection] Optional configuration for an additional section of charts.
81
+ * @param {Object} props.table Reference to the table configuration or component for displaying data.
82
+ * @param {string} props.tabTitle Title for the filter tab section.
83
+ * @param {Object[]|undefined} props.dropdowns Dropdown menu configuration, allowing for additional filter options or actions.
84
+ * @param {Object[]|undefined} props.buttons List of button configurations for actions such as downloads.
85
+ * @param {boolean} props.loginForDownload Determines whether login is required to enable download functionality.
86
+ * @param {boolean} [props.showAccessLevel=false] Indicates if the user access level should be displayed on the panel.
87
+ *
88
+ * @returns {JSX.Element} Returns a JSX element rendering the CohortPanel. This includes filter options,
89
+ * summary charts, cohort manager, and data display components.
90
+ */ const CohortPanel = ({ guppyConfig, filters, charts = {}, chartsSection = undefined, table, tabTitle, dropdowns, buttons, loginForDownload, showAccessLevel = false })=>{
91
+ const isSm = hooks.useMediaQuery('(min-width: 639px)');
92
+ const isMd = hooks.useMediaQuery('(min-width: 1373px)');
93
+ const isXl = hooks.useMediaQuery('(min-width: 1600px)');
94
+ const [accessLevel, setAccessLevel] = React.useState(core.Accessibility.ALL);
95
+ const sharedFiltersMap = core.useCoreSelector((state)=>core.selectSharedFilters(state));
96
+ const defaultDropdowns = React.useMemo(()=>dropdowns ?? {}, [
97
+ dropdowns
98
+ ]);
99
+ const defaultButtons = React.useMemo(()=>buttons ?? [], [
100
+ buttons
101
+ ]);
102
+ const numCols = React.useMemo(()=>{
103
+ if (isSm) return 1;
104
+ if (isMd) return 2;
105
+ if (isXl) return 4;
106
+ return 3;
107
+ }, [
108
+ isSm,
109
+ isMd,
110
+ isXl
111
+ ]);
112
+ const index$1 = guppyConfig.dataType;
113
+ const indexPrefix = guppyConfig?.indexPrefix ?? '';
114
+ const fields = React.useMemo(()=>index.getAllFieldsFromFilterConfigs(filters?.tabs ?? []), [
115
+ filters?.tabs
116
+ ]);
117
+ const coreDispatch = core.useCoreDispatch();
118
+ const [facetDefinitions, setFacetDefinitions] = React.useState({});
119
+ const [summaryCharts, setSummaryCharts] = React.useState({});
120
+ const cohortFilters = core.useCoreSelector((state)=>core.selectIndexFilters(state, index$1));
121
+ const cohortId = core.useCoreSelector((state)=>core.selectCurrentCohortId(state));
122
+ const allFiltersCollapsed = core.useCoreSelector((state)=>core.selectAllCohortFiltersCollapsed(state, index$1));
123
+ const toggleAllFiltersExpanded = (expand)=>{
124
+ coreDispatch(core.toggleCohortBuilderAllFilters({
125
+ expand,
126
+ index: index$1
127
+ }));
128
+ };
129
+ const clearAllFilters = React.useCallback(()=>{
130
+ coreDispatch(core.clearCohortFilters({
131
+ index: index$1
132
+ }));
133
+ }, [
134
+ coreDispatch,
135
+ index$1
136
+ ]);
137
+ const { data, isSuccess, isFetching: isAggsQueryFetching, isError: isAggsQueryError } = core.useGetAggsQuery({
138
+ type: index$1,
139
+ fields: fields,
140
+ filters: cohortFilters,
141
+ accessibility: accessLevel,
142
+ queryId: cohortId,
143
+ indexPrefix: indexPrefix
144
+ });
145
+ const chartKeys = useDeepCompare.useDeepCompareMemo(()=>[
146
+ ...Object.keys(chartsSection?.charts ?? {}),
147
+ ...Object.keys(charts)
148
+ ], [
149
+ chartsSection?.charts,
150
+ charts
151
+ ]);
152
+ const { data: chartData, isSuccess: isChartSuccess, isFetching: isChartFetching, isError: isChartError } = core.useGetAggsQuery({
153
+ type: index$1,
154
+ fields: chartKeys,
155
+ filters: cohortFilters,
156
+ accessibility: accessLevel,
157
+ filterSelf: true,
158
+ queryId: cohortId,
159
+ indexPrefix: indexPrefix
160
+ }, {
161
+ skip: chartKeys.length === 0
162
+ });
163
+ const cleanChartData = useDeepCompare.useDeepCompareMemo(()=>{
164
+ if (isChartSuccess && chartData) {
165
+ const cleanedData = {};
166
+ const totalCount = chartData._totalCount[0]?.count;
167
+ Object.keys(summaryCharts).forEach((key)=>{
168
+ if (!(key in chartData)) {
169
+ return;
170
+ } // handle missing key in data
171
+ // remove empty keys
172
+ cleanedData[key] = chartData[key].filter((x)=>typeof x.key !== 'string' ? true : x.key !== '');
173
+ const facetDef = facetDefinitions?.[key];
174
+ if (facetDef?.excludeValues) {
175
+ cleanedData[key] = cleanedData[key].filter((x)=>typeof x.key !== 'string' ? true : facetDef?.excludeValues?.includes(String(x.key)) === false);
176
+ }
177
+ if (cleanedData[key].length === 0 && totalCount) {
178
+ // if no keys adds back no data
179
+ cleanedData[key] = [
180
+ {
181
+ key: 'no data',
182
+ count: totalCount
183
+ }
184
+ ];
185
+ }
186
+ });
187
+ return cleanedData;
188
+ }
189
+ return chartData;
190
+ }, [
191
+ chartData,
192
+ isChartSuccess,
193
+ summaryCharts
194
+ ]);
195
+ const getEnumFacetData = useDeepCompare.useDeepCompareCallback((field)=>{
196
+ let filters = undefined;
197
+ let combineMode = 'or';
198
+ if (field in cohortFilters.root) {
199
+ if (core.isIntersection(cohortFilters.root[field])) {
200
+ const intersectionFilters = index.removeIntersectionFromEnum(cohortFilters.root[field]);
201
+ if (intersectionFilters) {
202
+ filters = core.extractEnumFilterValue(intersectionFilters);
203
+ combineMode = 'and';
204
+ }
205
+ } else {
206
+ filters = core.extractEnumFilterValue(cohortFilters.root[field]);
207
+ }
208
+ }
209
+ return {
210
+ data: index.processBucketData(data?.[field]),
211
+ enumFilters: filters,
212
+ combineMode: combineMode,
213
+ isSuccess: isSuccess
214
+ };
215
+ }, [
216
+ cohortFilters.root,
217
+ data,
218
+ isSuccess
219
+ ]);
220
+ const getRangeFacetData = useDeepCompare.useDeepCompareCallback((field)=>{
221
+ return {
222
+ data: index.processRangeData(data?.[field]),
223
+ filters: index.extractRangeValues(cohortFilters.root[field]),
224
+ isSuccess: isSuccess
225
+ };
226
+ }, [
227
+ data,
228
+ cohortFilters.root,
229
+ isSuccess
230
+ ]);
231
+ // Set up the hooks for the facet components to use based on the required index
232
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
233
+ // @ts-ignore
234
+ const facetDataHooks = useDeepCompare.useDeepCompareMemo(()=>{
235
+ return {
236
+ // TODO: see if there a better way to do this
237
+ enum: {
238
+ useGetFacetData: getEnumFacetData,
239
+ useUpdateFacetFilters: _.partial(index.useUpdateFilters, index$1),
240
+ useGetFacetFilters: _.partial(index.useGetFacetFilters, index$1),
241
+ useClearFilter: _.partial(index.useClearFilters, index$1),
242
+ useFilterExpanded: _.partial(index.useFilterExpandedState, index$1),
243
+ useToggleExpandFilter: _.partial(index.useToggleExpandFilter, index$1),
244
+ useGetCombineMode: _.partial(index.useCohortFilterCombineState, index$1),
245
+ useSetCombineMode: _.partial(index.useSetCohortFilterCombineState, index$1),
246
+ useFieldNameToLabel: index.useFieldNameToLabel,
247
+ useTotalCounts: undefined
248
+ },
249
+ exact: {
250
+ useGetFacetData: getEnumFacetData,
251
+ useUpdateFacetFilters: _.partial(index.useUpdateFilters, index$1),
252
+ useGetFacetFilters: _.partial(index.useGetFacetFilters, index$1),
253
+ useClearFilter: _.partial(index.useClearFilters, index$1),
254
+ useFilterExpanded: _.partial(index.useFilterExpandedState, index$1),
255
+ useToggleExpandFilter: _.partial(index.useToggleExpandFilter, index$1),
256
+ useFieldNameToLabel: index.useFieldNameToLabel,
257
+ useTotalCounts: undefined
258
+ },
259
+ multiselect: {
260
+ useGetFacetData: getEnumFacetData,
261
+ useUpdateFacetFilters: _.partial(index.useUpdateFilters, index$1),
262
+ useGetFacetFilters: _.partial(index.useGetFacetFilters, index$1),
263
+ useClearFilter: _.partial(index.useClearFilters, index$1),
264
+ useFilterExpanded: _.partial(index.useFilterExpandedState, index$1),
265
+ useToggleExpandFilter: _.partial(index.useToggleExpandFilter, index$1),
266
+ useFieldNameToLabel: index.useFieldNameToLabel,
267
+ useTotalCounts: undefined
268
+ },
269
+ range: {
270
+ useGetFacetData: getRangeFacetData,
271
+ useUpdateFacetFilters: _.partial(index.useUpdateFilters, index$1),
272
+ useGetFacetFilters: _.partial(index.useGetFacetFilters, index$1),
273
+ useClearFilter: _.partial(index.useClearFilters, index$1),
274
+ useFilterExpanded: _.partial(index.useFilterExpandedState, index$1),
275
+ useToggleExpandFilter: _.partial(index.useToggleExpandFilter, index$1),
276
+ useFieldNameToLabel: index.useFieldNameToLabel,
277
+ useTotalCounts: undefined
278
+ }
279
+ };
280
+ }, [
281
+ getEnumFacetData,
282
+ getRangeFacetData,
283
+ index$1
284
+ ]);
285
+ // Set the facet definitions based on the data only the first time the data is loaded
286
+ useDeepCompare.useDeepCompareEffect(()=>{
287
+ if (isSuccess && Object.keys(facetDefinitions).length === 0) {
288
+ const configFacetDefs = filters?.tabs.reduce((acc, tab)=>{
289
+ return {
290
+ ...tab.fieldsConfig,
291
+ ...acc
292
+ };
293
+ }, {});
294
+ const facetDefs = index.classifyFacets(data, index$1, guppyConfig?.fieldMapping ?? [], configFacetDefs ?? {}, sharedFiltersMap);
295
+ setFacetDefinitions(facetDefs);
296
+ // setup summary charts since nested fields can be listed by the split field name
297
+ const chartDefinitions = chartsSection?.charts ?? charts;
298
+ const summaryCharts = Object.keys(chartDefinitions).reduce((acc, field)=>{
299
+ let chartField = field;
300
+ if (facetDefs?.[field] === undefined) {
301
+ const res = Object.values(facetDefs).filter((def)=>{
302
+ return def.dataField === field;
303
+ });
304
+ if (res.length > 0) {
305
+ chartField = res[0].field;
306
+ }
307
+ }
308
+ return {
309
+ ...acc,
310
+ [chartField]: chartDefinitions[field]
311
+ };
312
+ }, {});
313
+ setSummaryCharts(summaryCharts);
314
+ }
315
+ }, [
316
+ isSuccess,
317
+ data,
318
+ facetDefinitions,
319
+ index$1,
320
+ guppyConfig.fieldMapping,
321
+ charts,
322
+ chartsSection
323
+ ]);
324
+ const { data: counts, isFetching: isCountsFetching, isError: isCountsError } = core.useGetCountsQuery({
325
+ type: index$1,
326
+ filters: cohortFilters,
327
+ accessibility: accessLevel,
328
+ queryId: cohortId
329
+ });
330
+ if (isCountsError || isAggsQueryError) {
331
+ return /*#__PURE__*/ jsxRuntime.jsx(index.ErrorCard, {
332
+ message: "Unable to fetch data from server"
333
+ }); // TODO: replace with configurable message
334
+ }
335
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
336
+ className: "flex flex-col mt-3 relative px-4 bg-base-lightest w-full",
337
+ children: [
338
+ /*#__PURE__*/ jsxRuntime.jsx(index.QueryExpression, {
339
+ index: index$1
340
+ }),
341
+ /*#__PURE__*/ jsxRuntime.jsxs("div", {
342
+ className: "flex w-full",
343
+ children: [
344
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
345
+ id: "cohort-builder-filters",
346
+ className: "flex-shrink-0 md:w-1/4 lg:w-1/5",
347
+ children: filters?.tabs && /*#__PURE__*/ jsxRuntime.jsx(index.DropdownPanel, {
348
+ filters: filters,
349
+ tabTitle: tabTitle,
350
+ facetDefinitions: facetDefinitions,
351
+ facetDataHooks: facetDataHooks,
352
+ onAccessChange: setAccessLevel,
353
+ accessLevel: accessLevel,
354
+ showAccessLevel: showAccessLevel,
355
+ allFiltersCollapsed: allFiltersCollapsed,
356
+ toggleAllFiltersExpanded: toggleAllFiltersExpanded,
357
+ clearAllFilters: clearAllFilters
358
+ })
359
+ }),
360
+ /*#__PURE__*/ jsxRuntime.jsxs("div", {
361
+ id: "cohort-builder-content",
362
+ className: "flex flex-col md:w-3/4 lg:w-4/5 pl-4",
363
+ children: [
364
+ /*#__PURE__*/ jsxRuntime.jsxs("div", {
365
+ className: "flex justify-between mb-2 ml-2",
366
+ children: [
367
+ /*#__PURE__*/ jsxRuntime.jsx(index.DownloadsPanel, {
368
+ dropdowns: defaultDropdowns,
369
+ buttons: defaultButtons,
370
+ loginForDownload: loginForDownload,
371
+ index: index$1,
372
+ totalCount: counts ?? 0,
373
+ fields: table?.fields ?? [],
374
+ filter: cohortFilters
375
+ }),
376
+ /*#__PURE__*/ jsxRuntime.jsx(index.CountsValue, {
377
+ label: guppyConfig?.nodeCountTitle || toDisplayName(index$1),
378
+ counts: counts,
379
+ isFetching: isCountsFetching,
380
+ isError: isCountsError
381
+ })
382
+ ]
383
+ }),
384
+ chartsSection?.enabled ? /*#__PURE__*/ jsxRuntime.jsx(index.CollapsableCharts, {
385
+ config: {
386
+ ...chartsSection,
387
+ charts: summaryCharts
388
+ },
389
+ data: cleanChartData ?? EmptyData,
390
+ isSuccess: isChartSuccess,
391
+ isFetching: isChartFetching,
392
+ isError: isChartError
393
+ }) : /*#__PURE__*/ jsxRuntime.jsx(index.Charts, {
394
+ charts: summaryCharts,
395
+ data: cleanChartData ?? EmptyData,
396
+ counts: counts,
397
+ isSuccess: isChartSuccess,
398
+ isError: isChartError,
399
+ numCols: numCols
400
+ }),
401
+ table?.enabled && /*#__PURE__*/ jsxRuntime.jsx("div", {
402
+ className: "mt-2 flex flex-col",
403
+ children: /*#__PURE__*/ jsxRuntime.jsx(index.ExplorerTable, {
404
+ index: index$1,
405
+ tableConfig: table,
406
+ accessibility: accessLevel
407
+ })
408
+ })
409
+ ]
410
+ })
411
+ ]
412
+ })
413
+ ]
414
+ });
415
+ };
416
+
417
+ const TabsLayoutToComponentProp = (tabsLayout)=>{
418
+ if (!tabsLayout) {
419
+ return 'flex-start';
420
+ }
421
+ switch(tabsLayout){
422
+ case 'left':
423
+ {
424
+ return 'flex-start';
425
+ }
426
+ case 'right':
427
+ {
428
+ return 'flex-end';
429
+ }
430
+ case 'center':
431
+ {
432
+ return 'center';
433
+ }
434
+ default:
435
+ {
436
+ return 'flex-start';
437
+ }
438
+ }
439
+ };
440
+
441
+ const useGetCurrentCohort = ()=>{
442
+ return core.useCoreSelector((state)=>core.selectCurrentCohortId(state));
443
+ };
444
+ const CohortBuilder = ({ explorerConfig, sharedFiltersMap = null, tabsLayout = 'left', enableCohortManager = true, activeTab })=>{
445
+ const dispatch = core.useCoreDispatch();
446
+ dispatch(core.setSharedFilters(sharedFiltersMap ?? {}));
447
+ const configuration = useDeepCompare.useDeepCompareMemo(()=>explorerConfig, [
448
+ explorerConfig
449
+ ]);
450
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
451
+ className: "flex flex-col w-full mt-2",
452
+ children: [
453
+ enableCohortManager ? /*#__PURE__*/ jsxRuntime.jsx(index.CohortManager, {}) : null,
454
+ /*#__PURE__*/ jsxRuntime.jsxs(core$1.Tabs, {
455
+ color: "primary.5",
456
+ variant: explorerConfig[0]?.tabType,
457
+ keepMounted: true,
458
+ defaultValue: activeTab ?? explorerConfig[0].tabTitle,
459
+ children: [
460
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Tabs.List, {
461
+ className: "w-full",
462
+ justify: TabsLayoutToComponentProp(tabsLayout),
463
+ children: configuration.map((panelConfig)=>/*#__PURE__*/ jsxRuntime.jsx(core$1.Tabs.Tab, {
464
+ value: panelConfig.tabTitle,
465
+ children: panelConfig.tabTitle
466
+ }, `${panelConfig.tabTitle}-tabList`))
467
+ }),
468
+ configuration.map((panelConfig)=>/*#__PURE__*/ jsxRuntime.jsx(core$1.Tabs.Panel, {
469
+ value: panelConfig.tabTitle,
470
+ children: /*#__PURE__*/ jsxRuntime.jsx(CohortPanel, {
471
+ guppyConfig: panelConfig.guppyConfig,
472
+ chartsSection: panelConfig?.chartsSection,
473
+ charts: panelConfig?.charts,
474
+ filters: panelConfig.filters,
475
+ tabTitle: panelConfig.tabTitle,
476
+ table: panelConfig.table,
477
+ dropdowns: panelConfig.dropdowns,
478
+ buttons: panelConfig.buttons,
479
+ loginForDownload: panelConfig.loginForDownload,
480
+ sharedFiltersMap: panelConfig.sharedFiltersMap
481
+ }, `${panelConfig.tabTitle}-CohortPanel`)
482
+ }, `${panelConfig.tabTitle}-tabPanel`))
483
+ ]
484
+ })
485
+ ]
486
+ });
487
+ };
488
+
489
+ exports.default = CohortBuilder;
490
+ exports.useGetCurrentCohort = useGetCurrentCohort;
491
+ //# sourceMappingURL=CohortBuilder-UlQ8OfB0.js.map