@gen3/frontend 0.10.95 → 0.10.98
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.
- package/dist/cjs/index.js +10402 -8520
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Content/LandingPageContent.d.ts +2 -1
- package/dist/dts/components/Content/LandingPageContent.d.ts.map +1 -1
- package/dist/dts/components/Content/LandingPageContent.js.map +1 -1
- package/dist/dts/components/Login/LoginPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/components/Login/types.d.ts +2 -1
- package/dist/dts/components/Login/types.d.ts.map +1 -1
- package/dist/dts/components/Login/types.js.map +1 -1
- package/dist/dts/components/MessageCards/index.d.ts +2 -1
- package/dist/dts/components/MessageCards/index.d.ts.map +1 -1
- package/dist/dts/components/MessageCards/index.js +2 -1
- package/dist/dts/components/MessageCards/index.js.map +1 -1
- package/dist/dts/components/Profile/types.d.ts +2 -1
- package/dist/dts/components/Profile/types.d.ts.map +1 -1
- package/dist/dts/components/SegmentedControl.d.ts +8 -0
- package/dist/dts/components/SegmentedControl.d.ts.map +1 -0
- package/dist/dts/components/SegmentedControl.js +23 -0
- package/dist/dts/components/SegmentedControl.js.map +1 -0
- package/dist/dts/components/charts/Charts.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.js +2 -0
- package/dist/dts/components/charts/Charts.js.map +1 -1
- package/dist/dts/components/charts/CollapsableCharts.d.ts +9 -0
- package/dist/dts/components/charts/CollapsableCharts.d.ts.map +1 -0
- package/dist/dts/components/charts/CollapsableCharts.js +24 -0
- package/dist/dts/components/charts/CollapsableCharts.js.map +1 -0
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js +3 -2
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js.map +1 -1
- package/dist/dts/components/charts/types.d.ts +2 -0
- package/dist/dts/components/charts/types.d.ts.map +1 -1
- package/dist/dts/components/facets/EnumFacet.js +2 -2
- package/dist/dts/components/facets/EnumFacet.js.map +1 -1
- package/dist/dts/components/facets/ExactValueFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/ExactValueFacet.js +3 -3
- package/dist/dts/components/facets/ExactValueFacet.js.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js.map +1 -1
- package/dist/dts/components/facets/FacetSelectionModal.d.ts +22 -0
- package/dist/dts/components/facets/FacetSelectionModal.d.ts.map +1 -0
- package/dist/dts/components/facets/FacetSelectionModal.js +77 -0
- package/dist/dts/components/facets/FacetSelectionModal.js.map +1 -0
- package/dist/dts/components/facets/FacetSelector.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetSelector.js +6 -6
- package/dist/dts/components/facets/FacetSelector.js.map +1 -1
- package/dist/dts/components/facets/FacetTabs.d.ts +38 -0
- package/dist/dts/components/facets/FacetTabs.d.ts.map +1 -0
- package/dist/dts/components/facets/FacetTabs.js +166 -0
- package/dist/dts/components/facets/FacetTabs.js.map +1 -0
- package/dist/dts/components/facets/MultiSelectValueFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/MultiSelectValueFacet.js +3 -3
- package/dist/dts/components/facets/MultiSelectValueFacet.js.map +1 -1
- package/dist/dts/components/facets/NumericRangeFacet/DaysOrYears.d.ts +5 -0
- package/dist/dts/components/facets/NumericRangeFacet/DaysOrYears.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/DaysOrYears.js +29 -0
- package/dist/dts/components/facets/NumericRangeFacet/DaysOrYears.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/FromTo.d.ts +32 -0
- package/dist/dts/components/facets/NumericRangeFacet/FromTo.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/FromTo.js +168 -0
- package/dist/dts/components/facets/NumericRangeFacet/FromTo.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangePanel.d.ts +5 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangePanel.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangePanel.js +30 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangePanel.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/PercentRange.d.ts +5 -0
- package/dist/dts/components/facets/NumericRangeFacet/PercentRange.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/PercentRange.js +11 -0
- package/dist/dts/components/facets/NumericRangeFacet/PercentRange.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeInputWithPrefixedRanges.d.ts +12 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeInputWithPrefixedRanges.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeInputWithPrefixedRanges.js +113 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeInputWithPrefixedRanges.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeValueSelector.d.ts +26 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeValueSelector.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeValueSelector.js +63 -0
- package/dist/dts/components/facets/NumericRangeFacet/RangeValueSelector.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/Year.d.ts +5 -0
- package/dist/dts/components/facets/NumericRangeFacet/Year.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/Year.js +23 -0
- package/dist/dts/components/facets/NumericRangeFacet/Year.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/Years.d.ts +5 -0
- package/dist/dts/components/facets/NumericRangeFacet/Years.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/Years.js +24 -0
- package/dist/dts/components/facets/NumericRangeFacet/Years.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/index.d.ts +19 -0
- package/dist/dts/components/facets/NumericRangeFacet/index.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/index.js +65 -0
- package/dist/dts/components/facets/NumericRangeFacet/index.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/types.d.ts +27 -0
- package/dist/dts/components/facets/NumericRangeFacet/types.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/types.js +2 -0
- package/dist/dts/components/facets/NumericRangeFacet/types.js.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/utils.d.ts +52 -0
- package/dist/dts/components/facets/NumericRangeFacet/utils.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/utils.js +288 -0
- package/dist/dts/components/facets/NumericRangeFacet/utils.js.map +1 -0
- package/dist/dts/components/facets/RangeFacet.d.ts +1 -6
- package/dist/dts/components/facets/RangeFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/RangeFacet.js +3 -3
- package/dist/dts/components/facets/RangeFacet.js.map +1 -1
- package/dist/dts/components/facets/constants.d.ts +1 -0
- package/dist/dts/components/facets/constants.d.ts.map +1 -1
- package/dist/dts/components/facets/constants.js +1 -0
- package/dist/dts/components/facets/constants.js.map +1 -1
- package/dist/dts/components/facets/createFacetCard.d.ts +16 -2
- package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
- package/dist/dts/components/facets/createFacetCard.js +13 -10
- package/dist/dts/components/facets/createFacetCard.js.map +1 -1
- package/dist/dts/components/facets/createFacetCards.d.ts +10 -0
- package/dist/dts/components/facets/createFacetCards.d.ts.map +1 -0
- package/dist/dts/components/facets/createFacetCards.js +19 -0
- package/dist/dts/components/facets/createFacetCards.js.map +1 -0
- package/dist/dts/components/facets/hooks.d.ts +1 -0
- package/dist/dts/components/facets/hooks.d.ts.map +1 -1
- package/dist/dts/components/facets/hooks.js +10 -1
- package/dist/dts/components/facets/hooks.js.map +1 -1
- package/dist/dts/components/facets/index.d.ts +11 -1
- package/dist/dts/components/facets/index.d.ts.map +1 -1
- package/dist/dts/components/facets/index.js +11 -1
- package/dist/dts/components/facets/index.js.map +1 -1
- package/dist/dts/components/facets/types.d.ts +97 -3
- package/dist/dts/components/facets/types.d.ts.map +1 -1
- package/dist/dts/components/facets/types.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
- package/dist/dts/features/Analysis/types.d.ts +2 -1
- package/dist/dts/features/Analysis/types.d.ts.map +1 -1
- package/dist/dts/features/Analysis/types.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +1 -2
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +6 -2
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.js +0 -4
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.js.map +1 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.js +9 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +1 -1
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.d.ts +16 -0
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.js +185 -0
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.js.map +1 -0
- package/dist/dts/features/CohortBuilder/index.d.ts +3 -2
- package/dist/dts/features/CohortBuilder/index.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/index.js +3 -2
- package/dist/dts/features/CohortBuilder/index.js.map +1 -1
- package/dist/dts/features/CohortBuilder/types.d.ts +2 -2
- package/dist/dts/features/CohortBuilder/types.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.js +18 -2
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.js +10 -4
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js +7 -3
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.js +8 -3
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts +5 -2
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js +120 -44
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts +44 -0
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js +7 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts +3 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js +71 -24
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +0 -2
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts +6 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js +55 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -22
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js +40 -34
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -90
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.js +161 -92
- package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js +5 -3
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.js +13 -12
- package/dist/dts/features/CohortDiscovery/IndexPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts +14 -28
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.js +4 -4
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.js +4 -10
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.js +2 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.js +76 -13
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts +3 -3
- package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.d.ts +9 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.js +133 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js +25 -99
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts +3 -2
- package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/TabbedIndex.js +2 -2
- package/dist/dts/features/CohortDiscovery/TabbedIndex.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.d.ts +2 -4
- package/dist/dts/features/CohortDiscovery/appApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.js +6 -4
- package/dist/dts/features/CohortDiscovery/appApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.js +7 -9
- package/dist/dts/features/CohortDiscovery/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/queryApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/queryApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/types.d.ts +47 -19
- package/dist/dts/features/CohortDiscovery/types.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/types.js +16 -6
- package/dist/dts/features/CohortDiscovery/types.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/utils.d.ts +2 -0
- package/dist/dts/features/CohortDiscovery/utils.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/utils.js +9 -0
- package/dist/dts/features/CohortDiscovery/utils.js.map +1 -1
- package/dist/dts/features/Crosswalk/types.d.ts +2 -1
- package/dist/dts/features/Crosswalk/types.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/types.d.ts +5 -1
- package/dist/dts/features/Dictionary/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts +9 -0
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts.map +1 -0
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js +24 -0
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js.map +1 -0
- package/dist/dts/features/Discovery/types.d.ts +2 -1
- package/dist/dts/features/Discovery/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/types.js.map +1 -1
- package/dist/dts/features/Navigation/Header.js +1 -1
- package/dist/dts/features/Navigation/Header.js.map +1 -1
- package/dist/dts/features/Navigation/TopBar/AccountButton.js +1 -1
- package/dist/dts/features/Navigation/TopBar/AccountButton.js.map +1 -1
- package/dist/dts/features/Navigation/TopBar/LoginButton.js +1 -1
- package/dist/dts/features/Navigation/TopBar/LoginButton.js.map +1 -1
- package/dist/dts/features/Workspace/types.d.ts +2 -1
- package/dist/dts/features/Workspace/types.d.ts.map +1 -1
- package/dist/dts/features/Workspace/types.js.map +1 -1
- package/dist/dts/index.d.ts +6 -3
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +5 -2
- package/dist/dts/index.js.map +1 -1
- package/dist/dts/lib/content/types.d.ts +2 -0
- package/dist/dts/lib/content/types.d.ts.map +1 -1
- package/dist/dts/lib/session/session.d.ts.map +1 -1
- package/dist/dts/lib/session/session.js +6 -2
- package/dist/dts/lib/session/session.js.map +1 -1
- package/dist/dts/pages/Crosswalk/Crosswalk.d.ts.map +1 -1
- package/dist/dts/pages/Crosswalk/Crosswalk.js +1 -5
- package/dist/dts/pages/Crosswalk/Crosswalk.js.map +1 -1
- package/dist/dts/pages/DataDictionary/DataDictionary.d.ts.map +1 -1
- package/dist/dts/pages/DataDictionary/DataDictionary.js +12 -5
- package/dist/dts/pages/DataDictionary/DataDictionary.js.map +1 -1
- package/dist/dts/pages/Discovery/Discovery.d.ts.map +1 -1
- package/dist/dts/pages/Discovery/Discovery.js +14 -5
- package/dist/dts/pages/Discovery/Discovery.js.map +1 -1
- package/dist/dts/pages/Explorer/Explorer.d.ts +1 -1
- package/dist/dts/pages/Explorer/Explorer.d.ts.map +1 -1
- package/dist/dts/pages/Explorer/Explorer.js +13 -6
- package/dist/dts/pages/Explorer/Explorer.js.map +1 -1
- package/dist/dts/pages/Explorer/data.d.ts.map +1 -1
- package/dist/dts/pages/Explorer/data.js +4 -4
- package/dist/dts/pages/Explorer/data.js.map +1 -1
- package/dist/dts/pages/Landing/Landing.d.ts.map +1 -1
- package/dist/dts/pages/Landing/Landing.js +12 -5
- package/dist/dts/pages/Landing/Landing.js.map +1 -1
- package/dist/dts/pages/Login/Login.d.ts.map +1 -1
- package/dist/dts/pages/Login/Login.js +1 -5
- package/dist/dts/pages/Login/Login.js.map +1 -1
- package/dist/dts/pages/Profile/Profile.d.ts.map +1 -1
- package/dist/dts/pages/Profile/Profile.js +12 -5
- package/dist/dts/pages/Profile/Profile.js.map +1 -1
- package/dist/dts/pages/Query/Query.d.ts.map +1 -1
- package/dist/dts/pages/Query/Query.js +12 -5
- package/dist/dts/pages/Query/Query.js.map +1 -1
- package/dist/dts/pages/Query/types.d.ts +2 -1
- package/dist/dts/pages/Query/types.d.ts.map +1 -1
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.d.ts +4 -0
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.d.ts.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js +24 -0
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/data.d.ts +4 -0
- package/dist/dts/pages/TabbedCohortBuilder/data.d.ts.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/data.js +81 -0
- package/dist/dts/pages/TabbedCohortBuilder/data.js.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/index.d.ts +3 -0
- package/dist/dts/pages/TabbedCohortBuilder/index.d.ts.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/index.js +3 -0
- package/dist/dts/pages/TabbedCohortBuilder/index.js.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/types.d.ts +6 -0
- package/dist/dts/pages/TabbedCohortBuilder/types.d.ts.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/types.js +2 -0
- package/dist/dts/pages/TabbedCohortBuilder/types.js.map +1 -0
- package/dist/dts/pages/Workspace/Workspace.d.ts.map +1 -1
- package/dist/dts/pages/Workspace/Workspace.js +14 -5
- package/dist/dts/pages/Workspace/Workspace.js.map +1 -1
- package/dist/dts/types/icons.d.ts +5 -2
- package/dist/dts/types/icons.d.ts.map +1 -1
- package/dist/dts/types/icons.js +5 -2
- package/dist/dts/types/icons.js.map +1 -1
- package/dist/dts/utils/index.d.ts +2 -3
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/index.js +2 -2
- package/dist/dts/utils/index.js.map +1 -1
- package/dist/dts/utils/tests/values.test.js +0 -1
- package/dist/dts/utils/tests/values.test.js.map +1 -1
- package/dist/dts/utils/useScrollToHash.d.ts +8 -0
- package/dist/dts/utils/useScrollToHash.d.ts.map +1 -0
- package/dist/dts/utils/useScrollToHash.js +25 -0
- package/dist/dts/utils/useScrollToHash.js.map +1 -0
- package/dist/esm/index.js +10386 -8544
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1022 -556
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortDiscovery.js","sourceRoot":"","sources":["../../../../src/features/CohortDiscovery/CohortDiscovery.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,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K,GAAU,KARrC,GAAG,CASnB,CACZ,CAAC;4BACJ,CAAC,CAAC,GACQ,EAEZ,KAAC,IAAI,CAAC,KAAK,IAAC,KAAK,EAAC,OAAO,YACtB,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACjC,KAAC,UAAU,IACT,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,EAC5C,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,EACxC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAChC,cAAc,EAAE,MAAM,CAAC,cAAc,EACrC,aAAa,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,aAAa,EAClD,UAAU,EAAE,MAAA,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,mCAAI,CAAC,EACjD,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,GACjD,CACH,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAI,CAChE,GACU,EAEb,KAAC,IAAI,CAAC,KAAK,IAAC,KAAK,EAAC,OAAO,YACvB,KAAC,iBAAiB,IAChB,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,GACjD,GACS,EAEb,KAAC,IAAI,CAAC,KAAK,IAAC,KAAK,EAAC,SAAS,YACzB,KAAC,aAAa,KAAG,GACN,IACR,IACK,GACC,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { IndexResourceField, SupportServiceConfiguration } from '../types';
|
|
1
2
|
interface CohortManagerProps {
|
|
2
|
-
|
|
3
|
+
indexResources: IndexResourceField;
|
|
4
|
+
remoteSupportService: SupportServiceConfiguration;
|
|
5
|
+
size?: string;
|
|
3
6
|
}
|
|
4
|
-
export declare const CohortManager: ({
|
|
7
|
+
export declare const CohortManager: ({ indexResources, remoteSupportService, size, }: CohortManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
export default CohortManager;
|
|
6
9
|
//# sourceMappingURL=CohortManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortManager.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManager.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CohortManager.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManager.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAGL,kBAAkB,EAElB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAqBlB,UAAU,kBAAkB;IAC1B,cAAc,EAAE,kBAAkB,CAAC;IACnC,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,eAAO,MAAM,aAAa,GAAI,iDAI3B,kBAAkB,4CAuPpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,71 +1,147 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
38
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
39
|
+
import { Button, Group, Select, TextInput, Tooltip, useMantineTheme, Text, } from '@mantine/core';
|
|
40
|
+
import { setCurrentCohortId, createNewCohort, removeCohort, updateCohortName, } from './CohortManagerSlice';
|
|
41
|
+
import { selectAllCohorts, selectCurrentCohort, selectCohortManagerLoading, } from './CohortManagerSelectors';
|
|
6
42
|
import { useAppDispatch, useAppSelector } from '../appApi';
|
|
43
|
+
import { isIndexedFilterSetEmpty, } from '../types';
|
|
44
|
+
import { UploadIcon, AddIcon, DownloadIcon, CloseIcon, } from '../../../types/icons';
|
|
45
|
+
import { Icon } from '@iconify/react';
|
|
46
|
+
import { IconSize } from '../../../utils/sizes';
|
|
47
|
+
import { modals } from '@mantine/modals';
|
|
48
|
+
import DataAccessRequestForm from '../Requests/DataAccessRequestForm';
|
|
49
|
+
import { submitCohortRequestAction } from '../Requests/submitCohortRequestAction';
|
|
50
|
+
import { selectUserDetails, useCoreSelector, useCreateRequestMutation, useLazyGetAggsNoFilterSelfQuery, } from '@gen3/core';
|
|
51
|
+
var hasExportImport = false;
|
|
7
52
|
export var CohortManager = function (_a) {
|
|
8
53
|
var _b;
|
|
9
|
-
var
|
|
54
|
+
var indexResources = _a.indexResources, remoteSupportService = _a.remoteSupportService, _c = _a.size, size = _c === void 0 ? 'md' : _c;
|
|
10
55
|
var dispatch = useAppDispatch();
|
|
56
|
+
var _d = useState(false), isEditing = _d[0], setIsEditing = _d[1];
|
|
57
|
+
var _e = useState(''), editingLabel = _e[0], setEditingLabel = _e[1];
|
|
11
58
|
var allCohorts = useAppSelector(selectAllCohorts);
|
|
12
59
|
var currentCohort = useAppSelector(selectCurrentCohort);
|
|
13
|
-
var savedCohorts = useAppSelector(selectSavedCohorts);
|
|
14
|
-
var unsavedCohorts = useAppSelector(selectUnsavedCohorts);
|
|
15
|
-
var modifiedUnsavedCohorts = useAppSelector(selectModifiedUnsavedCohorts);
|
|
16
60
|
var loading = useAppSelector(selectCohortManagerLoading);
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
61
|
+
var appDispatch = useAppDispatch();
|
|
62
|
+
var getGetAggs = useLazyGetAggsNoFilterSelfQuery()[0];
|
|
63
|
+
var requestQuery = useCreateRequestMutation()[0];
|
|
64
|
+
var user = useCoreSelector(selectUserDetails);
|
|
65
|
+
var theme = useMantineTheme();
|
|
66
|
+
var iconSize = IconSize[size] || IconSize['sm'];
|
|
67
|
+
var startEditing = function () {
|
|
68
|
+
setIsEditing(true);
|
|
69
|
+
setEditingLabel(currentCohort.name);
|
|
70
|
+
};
|
|
71
|
+
var hasNoFilters = currentCohort
|
|
72
|
+
? isIndexedFilterSetEmpty(currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.filters)
|
|
73
|
+
: true;
|
|
74
|
+
var cancelEditing = function () {
|
|
75
|
+
setIsEditing(false);
|
|
76
|
+
setEditingLabel('');
|
|
77
|
+
};
|
|
78
|
+
var saveEdit = function () {
|
|
79
|
+
if (editingLabel.trim() === '' || !currentCohort.name)
|
|
80
|
+
return;
|
|
81
|
+
dispatch(updateCohortName({ id: currentCohort.id, name: editingLabel }));
|
|
82
|
+
setIsEditing(false);
|
|
83
|
+
setEditingLabel('');
|
|
84
|
+
};
|
|
22
85
|
var handleCreateNew = function () {
|
|
23
86
|
dispatch(createNewCohort({ name: 'New Cohort' }));
|
|
24
87
|
};
|
|
25
|
-
var handleSaveCohort = function (cohortId) {
|
|
26
|
-
dispatch(saveCohortToStorage({ cohortId: cohortId }));
|
|
27
|
-
};
|
|
28
88
|
var selectData = useMemo(function () {
|
|
29
89
|
return allCohorts.map(function (cohort) { return ({
|
|
30
90
|
label: cohort.name,
|
|
31
91
|
value: cohort.id,
|
|
32
92
|
}); });
|
|
33
93
|
}, [allCohorts]);
|
|
34
|
-
var handleDeleteCohort = function (cohortId) {
|
|
35
|
-
var cohort = allCohorts.find(function (c) { return c.id === cohortId; });
|
|
36
|
-
if (cohort === null || cohort === void 0 ? void 0 : cohort.saved) {
|
|
37
|
-
dispatch(deleteCohortFromStorage(cohortId));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
dispatch(removeCohort(cohortId));
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var handleRenameCohort = function (id, name) {
|
|
44
|
-
dispatch(updateCohortName({ id: id, name: name }));
|
|
45
|
-
};
|
|
46
|
-
var handleSelectCohort = function (cohortId) {
|
|
47
|
-
dispatch(setCurrentCohortId(cohortId));
|
|
48
|
-
};
|
|
49
|
-
var handleUpdateFilter = function (index, field, filter) {
|
|
50
|
-
dispatch(updateCohortFilter({
|
|
51
|
-
index: index,
|
|
52
|
-
field: field,
|
|
53
|
-
filter: filter,
|
|
54
|
-
}));
|
|
55
|
-
};
|
|
56
94
|
var onSelectCohort = useCallback(function (_value, option) {
|
|
57
|
-
console.log('onSelectCohort', option);
|
|
58
95
|
if (option) {
|
|
59
96
|
dispatch(setCurrentCohortId(option.value));
|
|
60
97
|
}
|
|
61
98
|
}, [dispatch]);
|
|
99
|
+
var handleCohortAccessRequest = function (cohortId, values) { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
|
+
var cohort;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0:
|
|
104
|
+
cohort = allCohorts.find(function (obj) { return obj.id === cohortId; });
|
|
105
|
+
if (!cohort) return [3 /*break*/, 2];
|
|
106
|
+
return [4 /*yield*/, submitCohortRequestAction(cohort, values, user, indexResources, remoteSupportService, appDispatch, getGetAggs, requestQuery)];
|
|
107
|
+
case 1:
|
|
108
|
+
_a.sent();
|
|
109
|
+
_a.label = 2;
|
|
110
|
+
case 2: return [2 /*return*/];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}); };
|
|
62
114
|
if (loading) {
|
|
63
115
|
return _jsx("div", { children: "Loading cohorts..." });
|
|
64
116
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
117
|
+
return (_jsxs(Group, { gap: "xs", className: "flex pt-4 pl-2", children: [!isEditing ? (_jsxs(Group, { children: [_jsx(Select, { data: selectData, value: (_b = currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.id) !== null && _b !== void 0 ? _b : null, onChange: onSelectCohort }), _jsx(Tooltip, { label: "Rename selected cohort", position: "bottom", withArrow: true, children: _jsx(Button, { variant: "action", color: "secondary.4", onClick: startEditing, title: "Rename ".concat(currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.name), "data-testid": "renameCohort", "aria-label": "Rename cohort", size: "compact-".concat(size), children: _jsx(Icon, { icon: "gen3:edit", height: iconSize, width: iconSize }) }) })] })) : (_jsxs(Group, { gap: "xs", children: [_jsx(TextInput, { value: editingLabel, onChange: function (e) { return setEditingLabel(e.target.value); }, placeholder: "Enter new name", onKeyDown: function (e) {
|
|
118
|
+
if (e.key === 'Enter' && editingLabel.trim())
|
|
119
|
+
saveEdit();
|
|
120
|
+
if (e.key === 'Escape')
|
|
121
|
+
cancelEditing();
|
|
122
|
+
}, autoFocus: true, style: { flex: 1 } }), _jsx(Tooltip, { label: "Apply rename", position: "bottom", withArrow: true, children: _jsx(Button, { variant: "action", color: "secondary.4", onClick: saveEdit, "data-testid": "completeCohortRenameButton", "aria-label": "Complete rename cohort", disabled: editingLabel.trim() === '' ||
|
|
123
|
+
editingLabel.trim() === currentCohort.name, size: "compact-".concat(size), children: _jsx(Icon, { icon: "gen3:check", height: iconSize, width: iconSize }) }) }), _jsx(Tooltip, { label: "Cancel rename", position: "bottom", withArrow: true, children: _jsx(Button, { variant: "action", "data-testid": "cancelRenameButton", "aria-label": "Cancel rename cohort", color: theme.colors.accent[4], onClick: cancelEditing, size: "compact-".concat(size), children: _jsx(CloseIcon, { size: "1.5em", "aria-hidden": "true" }) }) })] })), _jsx(Tooltip, { label: "Create a new cohort", position: "bottom", withArrow: true, children: _jsx(Button, { size: "compact-".concat(size), "data-testid": "addButton", "aria-label": "Add cohort", variant: "action", color: "secondary.4", onClick: handleCreateNew, children: _jsx(AddIcon, { size: "1.5em", "aria-hidden": "true" }) }) }), _jsx(Tooltip, { label: "Delete selected cohort", position: "bottom", withArrow: true, children: _jsx(Button, { size: "compact-".concat(size), "data-testid": "uploadButton", "aria-label": "Upload cohort", variant: "action", onClick: function () {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
modals.openConfirmModal({
|
|
126
|
+
title: "Delete Cohort: ".concat(currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.name),
|
|
127
|
+
centered: true,
|
|
128
|
+
children: (_jsxs(Text, { size: "sm", children: ["Are you sure you want to delete your cohort? Deleted cohorts cannot be restored.", ' ', ((_a = currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.requests) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
129
|
+
? "This cohort has ".concat((_b = currentCohort === null || currentCohort === void 0 ? void 0 : currentCohort.requests) === null || _b === void 0 ? void 0 : _b.length, " requests. Deleting this cohort will results in not being able to correlate nay pending requests.\n Are you sure you want to delete this cohort?.")
|
|
130
|
+
: ''] })),
|
|
131
|
+
labels: { confirm: 'Delete Cohort', cancel: 'Cancel' },
|
|
132
|
+
confirmProps: { color: theme.colors.accent[4] },
|
|
133
|
+
onConfirm: function () {
|
|
134
|
+
dispatch(removeCohort(currentCohort.id));
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}, children: _jsx(Icon, { icon: "gen3:delete", height: iconSize, width: iconSize }) }) }), _jsx(Tooltip, { label: hasNoFilters
|
|
138
|
+
? 'No Filters defined. Cannot submit request.'
|
|
139
|
+
: 'Submit Data Access Request', position: "bottom", withArrow: true, children: _jsx(Button, { size: "compact-".concat(size), "data-testid": "cohortManager-requestCohortAccessButton", "aria-label": "Request cohort access", variant: "action", disabled: hasNoFilters, onClick: function () {
|
|
140
|
+
var modelId = modals.open({
|
|
141
|
+
title: 'DATA ACCESS REQUEST',
|
|
142
|
+
children: (_jsx(DataAccessRequestForm, { cohortId: currentCohort.id, submitFunction: handleCohortAccessRequest, close: function () { return modals.close(modelId); } })),
|
|
143
|
+
});
|
|
144
|
+
}, children: _jsx(Icon, { icon: "gen3:request", height: iconSize, width: iconSize }) }) }), hasExportImport ? (_jsxs(_Fragment, { children: [_jsx(Tooltip, { label: "Import Cohort", position: "bottom", withArrow: true, children: _jsx(Button, { size: "compact-".concat(size), "data-testid": "uploadButton", "aria-label": "Upload cohort", variant: "action", children: _jsx(UploadIcon, { size: "1.5em", "aria-hidden": "true" }) }) }), _jsx(Tooltip, { label: "Export Cohort", position: "bottom", withArrow: true, children: _jsx("span", { children: _jsx(Button, { size: "compact-".concat(size), "data-testid": "downloadButton", "aria-label": "Download cohort", variant: "action", children: _jsx(DownloadIcon, { size: "1.5em", "aria-hidden": "true" }) }) }) })] })) : null] }));
|
|
69
145
|
};
|
|
70
146
|
export default CohortManager;
|
|
71
147
|
//# sourceMappingURL=CohortManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortManager.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManager.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CohortManager.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManager.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EACL,MAAM,EAEN,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,eAAe,EACf,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL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,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAI,GACxD,GACD,EACT,eAAe,CAAC,CAAC,CAAC,CACjB,8BACE,KAAC,OAAO,IAAC,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAC,QAAQ,EAAC,SAAS,kBACxD,KAAC,MAAM,IACL,IAAI,EAAE,kBAAW,IAAI,CAAE,iBACX,cAAc,gBACf,eAAe,EAC1B,OAAO,EAAC,QAAQ,YAEhB,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,iBAAa,MAAM,GAAG,GACvC,GACD,EACV,KAAC,OAAO,IAAC,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAC,QAAQ,EAAC,SAAS,kBACxD,yBACE,KAAC,MAAM,IACL,IAAI,EAAE,kBAAW,IAAI,CAAE,iBACX,gBAAgB,gBACjB,iBAAiB,EAC5B,OAAO,EAAC,QAAQ,YAEhB,KAAC,YAAY,IAAC,IAAI,EAAC,OAAO,iBAAa,MAAM,GAAG,GACzC,GACJ,GACC,IACT,CACJ,CAAC,CAAC,CAAC,IAAI,IACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -363,6 +363,50 @@ export declare const selectCurrentCohortIndexFilters: ((state: any, index: any)
|
|
|
363
363
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
364
364
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
365
365
|
};
|
|
366
|
+
export declare const selectCohortNameExists: ((state: any, name: any, excludeId: any) => boolean) & {
|
|
367
|
+
clearCache: () => void;
|
|
368
|
+
resultsCount: () => number;
|
|
369
|
+
resetResultsCount: () => void;
|
|
370
|
+
} & {
|
|
371
|
+
resultFunc: (resultFuncArgs_0: Cohort[], resultFuncArgs_1: {
|
|
372
|
+
name: any;
|
|
373
|
+
excludeId: any;
|
|
374
|
+
}) => boolean;
|
|
375
|
+
memoizedResultFunc: ((resultFuncArgs_0: Cohort[], resultFuncArgs_1: {
|
|
376
|
+
name: any;
|
|
377
|
+
excludeId: any;
|
|
378
|
+
}) => boolean) & {
|
|
379
|
+
clearCache: () => void;
|
|
380
|
+
resultsCount: () => number;
|
|
381
|
+
resetResultsCount: () => void;
|
|
382
|
+
};
|
|
383
|
+
lastResult: () => boolean;
|
|
384
|
+
dependencies: [(state: {
|
|
385
|
+
selectedIndexFacets: {
|
|
386
|
+
[x: string]: string[];
|
|
387
|
+
};
|
|
388
|
+
filtersExpandedState: {
|
|
389
|
+
[x: string]: boolean;
|
|
390
|
+
};
|
|
391
|
+
facetDefinitionState: {
|
|
392
|
+
[x: string]: Record<string, import("@gen3/core").FacetDefinition>;
|
|
393
|
+
};
|
|
394
|
+
cohorts: import("@reduxjs/toolkit").EntityState<Cohort, string> & import("./CohortManagerSlice").CohortManagerState;
|
|
395
|
+
dataAccessRequests: import("@reduxjs/toolkit").EntityState<import("../types").DataAccessRequest, string>;
|
|
396
|
+
} & {
|
|
397
|
+
_persist: import("redux-persist/es/types").PersistState;
|
|
398
|
+
}) => Cohort[], (state: any, name: any, excludeId: any) => {
|
|
399
|
+
name: any;
|
|
400
|
+
excludeId: any;
|
|
401
|
+
}];
|
|
402
|
+
recomputations: () => number;
|
|
403
|
+
resetRecomputations: () => void;
|
|
404
|
+
dependencyRecomputations: () => number;
|
|
405
|
+
resetDependencyRecomputations: () => void;
|
|
406
|
+
} & {
|
|
407
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
408
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
409
|
+
};
|
|
366
410
|
export declare const selectCohortManagerLoading: (state: AppState) => boolean;
|
|
367
411
|
export declare const selectCohortManagerError: (state: AppState) => string | null;
|
|
368
412
|
export declare const selectCohortIdToNameMap: ((state: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortManagerSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,Q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AEF,eAAO,MAAM,0BAA0B,GAAI,OAAO,QAAQ,KAAG,OACtC,CAAC;AAExB,eAAO,MAAM,wBAAwB,GAAI,OAAO,QAAQ,KAAG,MAAM,GAAG,IAC/C,CAAC;AAEtB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAC"}
|
|
@@ -27,9 +27,15 @@ export var selectCurrentCohortName = createSelector([selectCurrentCohort], funct
|
|
|
27
27
|
export var selectCurrentCohortFilters = createSelector([selectCurrentCohort], function (cohort) { return cohort.filters; });
|
|
28
28
|
export var selectCurrentCohortIndexFilters = createSelector([selectCurrentCohort, function (state, index) { return index; }], function (cohort, index) {
|
|
29
29
|
var _a, _b;
|
|
30
|
-
console.log('selectCurrentCohortIndexFilters', cohort, index);
|
|
31
30
|
return (_b = (_a = cohort.filters) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : EmptyFilterSet;
|
|
32
31
|
});
|
|
32
|
+
export var selectCohortNameExists = createSelector([selectAllCohorts, function (state, name, excludeId) { return ({ name: name, excludeId: excludeId }); }], function (cohorts, params) {
|
|
33
|
+
var trimmedName = params.name.trim().toLowerCase();
|
|
34
|
+
return cohorts.some(function (cohort) {
|
|
35
|
+
return cohort.id !== params.excludeId &&
|
|
36
|
+
cohort.name.trim().toLowerCase() === trimmedName;
|
|
37
|
+
});
|
|
38
|
+
});
|
|
33
39
|
export var selectCohortManagerLoading = function (state) {
|
|
34
40
|
return state.cohorts.loading;
|
|
35
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortManagerSelectors.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OA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("@reduxjs/toolkit").Slice<Entity
|
|
|
89
89
|
clearCohortFilters: (state: import("immer").WritableDraft<EntityState<Cohort, string> & CohortManagerState>, action: PayloadAction<ClearAllFilterParams>) => void;
|
|
90
90
|
clearError: (state: import("immer").WritableDraft<EntityState<Cohort, string> & CohortManagerState>) => void;
|
|
91
91
|
}, "CohortDiscovery/CohortManager", "CohortDiscovery/CohortManager", import("@reduxjs/toolkit").SliceSelectors<EntityState<Cohort, string> & CohortManagerState>>;
|
|
92
|
-
export declare const setCurrentCohortId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "CohortDiscovery/CohortManager/setCurrentCohortId">, createNewCohort: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreateCohortParams, "CohortDiscovery/CohortManager/createNewCohort">, removeCohort: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "CohortDiscovery/CohortManager/removeCohort">, updateCohortName: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateCohortNameParams, "CohortDiscovery/CohortManager/updateCohortName">, updateCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateFilterParams, "CohortDiscovery/CohortManager/updateCohortFilter">, setCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetFilterParams, "CohortDiscovery/CohortManager/setCohortFilter">, setAllIndexFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<IndexedFilterSet, "CohortDiscovery/CohortManager/setAllIndexFilters">, removeCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<RemoveFilterParams, "CohortDiscovery/CohortManager/removeCohortFilter">, clearCohortFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClearAllFilterParams, "CohortDiscovery/CohortManager/clearCohortFilters"
|
|
92
|
+
export declare const setCurrentCohortId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "CohortDiscovery/CohortManager/setCurrentCohortId">, createNewCohort: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreateCohortParams, "CohortDiscovery/CohortManager/createNewCohort">, removeCohort: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "CohortDiscovery/CohortManager/removeCohort">, updateCohortName: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateCohortNameParams, "CohortDiscovery/CohortManager/updateCohortName">, updateCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateFilterParams, "CohortDiscovery/CohortManager/updateCohortFilter">, setCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetFilterParams, "CohortDiscovery/CohortManager/setCohortFilter">, setAllIndexFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<IndexedFilterSet, "CohortDiscovery/CohortManager/setAllIndexFilters">, removeCohortFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<RemoveFilterParams, "CohortDiscovery/CohortManager/removeCohortFilter">, clearCohortFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClearAllFilterParams, "CohortDiscovery/CohortManager/clearCohortFilters">;
|
|
93
93
|
export declare const cohortManagerReducer: import("redux").Reducer<EntityState<Cohort, string> & CohortManagerState>;
|
|
94
|
+
export declare const validateCohortName: (name: string, excludeId?: string) => (dispatch: any, getState: any) => boolean;
|
|
95
|
+
export declare const generateUniqueNameForCohort: (baseName: string) => (dispatch: any, getState: any) => string;
|
|
94
96
|
export {};
|
|
95
97
|
//# sourceMappingURL=CohortManagerSlice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CohortManagerSlice.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortManagerSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EACX,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,MAAM,EAAuB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CohortManagerSlice.d.ts","sourceRoot":"","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,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAqBD,eAAO,MAAM,kBAAkB;yHAIS,aAAa,CAAC,MAAM,CAAC;sHAMxB,aAAa,CAAC,kBAAkB,CAAC;mHAcpC,aAAa,CAAC,MAAM,CAAC;uHA0BzC,aAAa,CAAC,sBAAsB,CAAC;yHAuCX,aAAa,CAAC,kBAAkB,CAAC;sHA6BpC,aAAa,CAAC,eAAe,CAAC;yHAsB3B,aAAa,CAAC,gBAAgB,CAAC;yHAkB/B,aAAa,CAAC,kBAAkB,CAAC;yHAgC3D,aAAa,CAAC,oBAAoB,CAAC;;iKA4G/C,CAAC;AAcH,eAAO,MACL,kBAAkB,mHAClB,eAAe,4HACf,YAAY,6GACZ,gBAAgB,iIAChB,kBAAkB,+HAClB,eAAe,yHACf,kBAAkB,6HAClB,kBAAkB,+HAClB,kBAAkB,+HACU,CAAC;AAE/B,eAAO,MAAM,oBAAoB,2EAA6B,CAAC;AAE/D,eAAO,MAAM,kBAAkB,GAC5B,MAAM,MAAM,EAAE,YAAY,MAAM,MAAM,UAAU,GAAG,EAAE,UAAU,GAAG,YAGlE,CAAC;AAEJ,eAAO,MAAM,2BAA2B,GACrC,UAAU,MAAM,MAAM,UAAU,GAAG,EAAE,UAAU,GAAG,WAGlD,CAAC"}
|
|
@@ -61,8 +61,33 @@ import { createAsyncThunk, createEntityAdapter, createSlice, } from '@reduxjs/to
|
|
|
61
61
|
import { newCohort } from '../types';
|
|
62
62
|
import { cohortStorage } from './CohortStorage';
|
|
63
63
|
import { EmptyFilterSet } from './types';
|
|
64
|
+
var isNameUnique = function (state, name, excludeId) {
|
|
65
|
+
var trimmedName = name.trim();
|
|
66
|
+
if (!trimmedName)
|
|
67
|
+
return false;
|
|
68
|
+
return !Object.values(state.entities).some(function (cohort) {
|
|
69
|
+
return cohort &&
|
|
70
|
+
cohort.id !== excludeId &&
|
|
71
|
+
cohort.name.trim().toLowerCase() === trimmedName.toLowerCase();
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var generateUniqueName = function (state, baseName) {
|
|
75
|
+
var trimmedBaseName = baseName.trim();
|
|
76
|
+
// If base name is unique, use it
|
|
77
|
+
if (isNameUnique(state, trimmedBaseName)) {
|
|
78
|
+
return trimmedBaseName;
|
|
79
|
+
}
|
|
80
|
+
// Find a unique name by appending numbers
|
|
81
|
+
var counter = 1;
|
|
82
|
+
var uniqueName;
|
|
83
|
+
do {
|
|
84
|
+
uniqueName = "".concat(trimmedBaseName, " (").concat(counter, ")");
|
|
85
|
+
counter++;
|
|
86
|
+
} while (!isNameUnique(state, uniqueName));
|
|
87
|
+
return uniqueName;
|
|
88
|
+
};
|
|
64
89
|
export var createDefaultCohort = function () {
|
|
65
|
-
return newCohort(DEFAULT_COHORT_NAME, {},
|
|
90
|
+
return newCohort(DEFAULT_COHORT_NAME, {}, undefined, false);
|
|
66
91
|
};
|
|
67
92
|
// Entity adapter
|
|
68
93
|
export var cohortsAdapter = createEntityAdapter({
|
|
@@ -75,7 +100,7 @@ export var cohortsAdapter = createEntityAdapter({
|
|
|
75
100
|
return 0;
|
|
76
101
|
},
|
|
77
102
|
});
|
|
78
|
-
|
|
103
|
+
//const DEFAULT_COHORT_ID = 'default';
|
|
79
104
|
var DEFAULT_COHORT_NAME = 'Default';
|
|
80
105
|
export var loadCohortsFromStorage = createAsyncThunk('cohorts/loadFromStorage', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
106
|
var cohortsMap, error_1;
|
|
@@ -145,7 +170,7 @@ export var deleteCohortFromStorage = createAsyncThunk('cohorts/deleteFromStorage
|
|
|
145
170
|
});
|
|
146
171
|
}); });
|
|
147
172
|
var emptyInitialState = cohortsAdapter.getInitialState({
|
|
148
|
-
currentCohortId:
|
|
173
|
+
currentCohortId: 'empty',
|
|
149
174
|
loading: false,
|
|
150
175
|
error: null,
|
|
151
176
|
autoSaveInProgress: [],
|
|
@@ -167,7 +192,9 @@ export var cohortManagerSlice = createSlice({
|
|
|
167
192
|
}
|
|
168
193
|
},
|
|
169
194
|
createNewCohort: function (state, action) {
|
|
170
|
-
var
|
|
195
|
+
var baseName = action.payload.name || "New Cohort";
|
|
196
|
+
var uniqueName = generateUniqueName(state, baseName);
|
|
197
|
+
var cohort = newCohort(uniqueName, action.payload.filters || {}, undefined, false);
|
|
171
198
|
cohortsAdapter.addOne(state, cohort);
|
|
172
199
|
state.currentCohortId = cohort.id;
|
|
173
200
|
},
|
|
@@ -184,27 +211,40 @@ export var cohortManagerSlice = createSlice({
|
|
|
184
211
|
cohortsAdapter.removeOne(state, cohortId);
|
|
185
212
|
if (state.currentCohortId === cohortId) {
|
|
186
213
|
var remainingIds = Object.keys(state.entities);
|
|
187
|
-
state.currentCohortId = remainingIds[0]
|
|
214
|
+
state.currentCohortId = remainingIds[0];
|
|
188
215
|
}
|
|
189
216
|
state.autoSaveInProgress = state.autoSaveInProgress.filter(function (id) { return id !== cohortId; });
|
|
190
217
|
},
|
|
191
218
|
updateCohortName: function (state, action) {
|
|
192
219
|
var _a = action.payload, id = _a.id, name = _a.name;
|
|
193
220
|
var cohort = state.entities[id];
|
|
194
|
-
if (cohort)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
221
|
+
if (!cohort)
|
|
222
|
+
return;
|
|
223
|
+
var trimmedName = name.trim();
|
|
224
|
+
// Don't update if name is empty
|
|
225
|
+
if (!trimmedName)
|
|
226
|
+
return;
|
|
227
|
+
// Don't update if name hasn't changed
|
|
228
|
+
if (cohort.name === trimmedName)
|
|
229
|
+
return;
|
|
230
|
+
// Check if name is unique (excluding current cohort)
|
|
231
|
+
if (!isNameUnique(state, trimmedName, id)) {
|
|
232
|
+
// Set error for duplicate name
|
|
233
|
+
state.error = "A cohort named \"".concat(trimmedName, "\" already exists. Please choose a different name.");
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
var wasSaved = cohort.saved;
|
|
237
|
+
cohortsAdapter.updateOne(state, {
|
|
238
|
+
id: id,
|
|
239
|
+
changes: {
|
|
240
|
+
name: trimmedName,
|
|
241
|
+
modified: !wasSaved,
|
|
242
|
+
modifiedDatetime: new Date().toISOString(),
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
if (wasSaved) {
|
|
246
|
+
// Add to auto-save queue if not already present
|
|
247
|
+
updateAutoSave(id, state);
|
|
208
248
|
}
|
|
209
249
|
},
|
|
210
250
|
updateCohortFilter: function (state, action) {
|
|
@@ -316,9 +356,8 @@ export var cohortManagerSlice = createSlice({
|
|
|
316
356
|
.addCase(loadCohortsFromStorage.fulfilled, function (state, action) {
|
|
317
357
|
state.loading = false;
|
|
318
358
|
if (action.payload.length > 0) {
|
|
319
|
-
if (state.entities
|
|
320
|
-
|
|
321
|
-
cohortsAdapter.removeOne(state, DEFAULT_COHORT_ID);
|
|
359
|
+
if (Object.keys(state.entities).length === 1) {
|
|
360
|
+
cohortsAdapter.removeOne(state, state.entities[0].id);
|
|
322
361
|
}
|
|
323
362
|
cohortsAdapter.addMany(state, action.payload);
|
|
324
363
|
var sortedCohorts = action.payload.sort(function (a, b) {
|
|
@@ -367,7 +406,7 @@ export var cohortManagerSlice = createSlice({
|
|
|
367
406
|
cohortsAdapter.removeOne(state, cohortId);
|
|
368
407
|
if (state.currentCohortId === cohortId) {
|
|
369
408
|
var remainingIds = Object.keys(state.entities);
|
|
370
|
-
state.currentCohortId = remainingIds[0]
|
|
409
|
+
state.currentCohortId = remainingIds[0];
|
|
371
410
|
}
|
|
372
411
|
}
|
|
373
412
|
state.autoSaveInProgress = state.autoSaveInProgress.filter(function (id) { return id !== cohortId; });
|
|
@@ -383,6 +422,14 @@ var getCurrentCohort = function (state) {
|
|
|
383
422
|
return cohort;
|
|
384
423
|
};
|
|
385
424
|
// Actions export
|
|
386
|
-
export var setCurrentCohortId = (_a = cohortManagerSlice.actions, _a.setCurrentCohortId), createNewCohort = _a.createNewCohort, removeCohort = _a.removeCohort, updateCohortName = _a.updateCohortName, updateCohortFilter = _a.updateCohortFilter, setCohortFilter = _a.setCohortFilter, setAllIndexFilters = _a.setAllIndexFilters, removeCohortFilter = _a.removeCohortFilter, clearCohortFilters = _a.clearCohortFilters
|
|
425
|
+
export var setCurrentCohortId = (_a = cohortManagerSlice.actions, _a.setCurrentCohortId), createNewCohort = _a.createNewCohort, removeCohort = _a.removeCohort, updateCohortName = _a.updateCohortName, updateCohortFilter = _a.updateCohortFilter, setCohortFilter = _a.setCohortFilter, setAllIndexFilters = _a.setAllIndexFilters, removeCohortFilter = _a.removeCohortFilter, clearCohortFilters = _a.clearCohortFilters;
|
|
387
426
|
export var cohortManagerReducer = cohortManagerSlice.reducer;
|
|
427
|
+
export var validateCohortName = function (name, excludeId) { return function (dispatch, getState) {
|
|
428
|
+
var state = getState();
|
|
429
|
+
return isNameUnique(state.cohorts, name, excludeId);
|
|
430
|
+
}; };
|
|
431
|
+
export var generateUniqueNameForCohort = function (baseName) { return function (dispatch, getState) {
|
|
432
|
+
var state = getState();
|
|
433
|
+
return generateUniqueName(state.cohorts, baseName);
|
|
434
|
+
}; };
|
|
388
435
|
//# sourceMappingURL=CohortManagerSlice.js.map
|