@gen3/frontend 0.11.11 → 0.11.13
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 +1216 -855
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts +16 -10
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +24 -13
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +43 -30
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js.map +1 -1
- package/dist/dts/components/MessageCards/ErrorMessage.js +1 -1
- package/dist/dts/components/MessageCards/ErrorMessage.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +141 -4
- package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.js +27 -31
- package/dist/dts/components/charts/Charts.js.map +1 -1
- package/dist/dts/components/charts/CollapsableCharts.d.ts +2 -2
- package/dist/dts/components/charts/CollapsableCharts.d.ts.map +1 -1
- package/dist/dts/components/charts/CollapsableCharts.js +2 -2
- package/dist/dts/components/charts/CollapsableCharts.js.map +1 -1
- package/dist/dts/components/charts/createChart.d.ts.map +1 -1
- package/dist/dts/components/charts/createChart.js +7 -12
- package/dist/dts/components/charts/createChart.js.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js +7 -4
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js.map +1 -1
- package/dist/dts/components/facets/EnumFacet.d.ts +1 -1
- package/dist/dts/components/facets/EnumFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/EnumFacet.js +6 -6
- package/dist/dts/components/facets/EnumFacet.js.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.d.ts +2 -0
- package/dist/dts/components/facets/FacetEnumList.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.js +24 -18
- package/dist/dts/components/facets/FacetEnumList.js.map +1 -1
- package/dist/dts/components/facets/FacetSelectionModal.d.ts +1 -2
- package/dist/dts/components/facets/FacetSelectionModal.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetSelectionModal.js.map +1 -1
- package/dist/dts/components/facets/FacetSelector.d.ts +1 -2
- package/dist/dts/components/facets/FacetSelector.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetSelector.js +1 -1
- package/dist/dts/components/facets/FacetSelector.js.map +1 -1
- package/dist/dts/components/facets/FacetTabs.d.ts +1 -2
- package/dist/dts/components/facets/FacetTabs.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetTabs.js.map +1 -1
- package/dist/dts/components/facets/FiltersPanel.d.ts +9 -0
- package/dist/dts/components/facets/FiltersPanel.d.ts.map +1 -0
- package/dist/dts/{features/CohortBuilder → components/facets}/FiltersPanel.js +3 -2
- package/dist/dts/components/facets/FiltersPanel.js.map +1 -0
- package/dist/dts/components/facets/Panels/AccordianPanel.d.ts.map +1 -0
- package/dist/dts/{features/CohortBuilder → components/facets}/Panels/AccordianPanel.js +1 -1
- package/dist/dts/components/facets/Panels/AccordianPanel.js.map +1 -0
- package/dist/dts/components/facets/Panels/DropdownPanel.d.ts.map +1 -0
- package/dist/dts/{features/CohortBuilder → components/facets}/Panels/DropdownPanel.js +3 -3
- package/dist/dts/components/facets/Panels/DropdownPanel.js.map +1 -0
- package/dist/dts/components/facets/Panels/TabbedPanel.d.ts +4 -0
- package/dist/dts/components/facets/Panels/TabbedPanel.d.ts.map +1 -0
- package/dist/dts/{features/CohortBuilder → components/facets}/Panels/TabbedPanel.js +3 -2
- package/dist/dts/components/facets/Panels/TabbedPanel.js.map +1 -0
- package/dist/dts/components/facets/Panels/index.d.ts +5 -0
- package/dist/dts/components/facets/Panels/index.d.ts.map +1 -0
- package/dist/dts/components/facets/Panels/index.js +5 -0
- package/dist/dts/components/facets/Panels/index.js.map +1 -0
- package/dist/dts/{features/CohortBuilder → components/facets}/Panels/types.d.ts +4 -3
- package/dist/dts/components/facets/Panels/types.d.ts.map +1 -0
- package/dist/dts/components/facets/Panels/types.js.map +1 -0
- package/dist/dts/components/facets/createFacetCard.d.ts +1 -2
- package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
- package/dist/dts/components/facets/createFacetCard.js +4 -4
- package/dist/dts/components/facets/createFacetCard.js.map +1 -1
- package/dist/dts/components/facets/createFacetCards.d.ts +1 -2
- package/dist/dts/components/facets/createFacetCards.d.ts.map +1 -1
- package/dist/dts/components/facets/createFacetCards.js.map +1 -1
- package/dist/dts/components/facets/index.d.ts +6 -1
- package/dist/dts/components/facets/index.d.ts.map +1 -1
- package/dist/dts/components/facets/index.js +6 -1
- package/dist/dts/components/facets/index.js.map +1 -1
- package/dist/dts/components/facets/types.d.ts +17 -2
- package/dist/dts/components/facets/types.d.ts.map +1 -1
- package/dist/dts/components/facets/types.js.map +1 -1
- package/dist/dts/components/facets/utils.d.ts +2 -2
- package/dist/dts/components/facets/utils.d.ts.map +1 -1
- package/dist/dts/components/facets/utils.js +19 -1
- package/dist/dts/components/facets/utils.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.js +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +10 -10
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/TextDescription.d.ts.map +1 -1
- package/dist/dts/features/Analysis/TextDescription.js +3 -19
- package/dist/dts/features/Analysis/TextDescription.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +3 -13
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +1 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +29 -22
- 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/TabbedCohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.js +16 -32
- package/dist/dts/features/CohortBuilder/TabbedCohortBuilder.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/CohortBuilder/types.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts +2 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts +16 -16
- package/dist/dts/features/CohortDiscovery/FacetDefinitionsSlice.d.ts +1 -1
- package/dist/dts/features/CohortDiscovery/FacetDefinitionsSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts +1 -2
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts +2 -2
- package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts +7 -7
- package/dist/dts/features/CohortDiscovery/appApi.d.ts +2 -2
- package/dist/dts/features/CohortDiscovery/registerApp.js +1 -1
- package/dist/dts/features/CohortDiscovery/registerApp.js.map +1 -1
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +10 -10
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js +1 -0
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable.js +30 -5
- package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts +1 -0
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts.map +1 -1
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js +10 -0
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js.map +1 -1
- package/dist/dts/features/Discovery/types.d.ts +7 -0
- package/dist/dts/features/Discovery/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/types.js.map +1 -1
- package/dist/dts/index.d.ts +3 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +3 -1
- package/dist/dts/index.js.map +1 -1
- package/dist/esm/index.js +1217 -862
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +295 -13
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/dts/api/staticNotebook/index.d.ts +0 -4
- package/dist/dts/api/staticNotebook/index.d.ts.map +0 -1
- package/dist/dts/api/staticNotebook/index.js +0 -118
- package/dist/dts/api/staticNotebook/index.js.map +0 -1
- package/dist/dts/api/staticNotebooks/index.d.ts +0 -4
- package/dist/dts/api/staticNotebooks/index.d.ts.map +0 -1
- package/dist/dts/api/staticNotebooks/index.js +0 -118
- package/dist/dts/api/staticNotebooks/index.js.map +0 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.d.ts +0 -10
- package/dist/dts/features/CohortBuilder/FiltersPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/FiltersPanel.js.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/AccordianPanel.js.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/DropdownPanel.js.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts +0 -3
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/TabbedPanel.js.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/types.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/Panels/types.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManager.d.ts +0 -6
- package/dist/dts/features/CohortDiscovery/CohortManager.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManager.js +0 -55
- package/dist/dts/features/CohortDiscovery/CohortManager.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManagerSlice.d.ts +0 -135
- package/dist/dts/features/CohortDiscovery/CohortManagerSlice.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManagerSlice.js +0 -40
- package/dist/dts/features/CohortDiscovery/CohortManagerSlice.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.d.ts +0 -3
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.js +0 -9
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.d.ts +0 -7
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.js +0 -101
- package/dist/dts/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/appApiRTKQ.d.ts +0 -1
- package/dist/dts/features/CohortDiscovery/appApiRTKQ.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/appApiRTKQ.js +0 -101
- package/dist/dts/features/CohortDiscovery/appApiRTKQ.js.map +0 -1
- package/dist/dts/features/Discovery/Charts/ChartsPanel.d.ts +0 -9
- package/dist/dts/features/Discovery/Charts/ChartsPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/Charts/ChartsPanel.js +0 -24
- package/dist/dts/features/Discovery/Charts/ChartsPanel.js.map +0 -1
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts +0 -9
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js +0 -24
- package/dist/dts/features/Discovery/Charts/CollapsableChartsPanel.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.d.ts +0 -9
- package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.js +0 -12
- package/dist/dts/features/Discovery/StudyDetails/DetailsAuthorizationIcon.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/RendererFactory.d.ts +0 -19
- package/dist/dts/features/Discovery/StudyDetails/RendererFactory.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/RendererFactory.js +0 -56
- package/dist/dts/features/Discovery/StudyDetails/RendererFactory.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.d.ts +0 -14
- package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.js +0 -44
- package/dist/dts/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyDetails.d.ts +0 -3
- package/dist/dts/features/Discovery/StudyDetails/StudyDetails.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyDetails.js +0 -37
- package/dist/dts/features/Discovery/StudyDetails/StudyDetails.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.d.ts +0 -10
- package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.js +0 -19
- package/dist/dts/features/Discovery/StudyDetails/StudyDetailsPanel.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyGroup.d.ts +0 -8
- package/dist/dts/features/Discovery/StudyDetails/StudyGroup.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyGroup.js +0 -31
- package/dist/dts/features/Discovery/StudyDetails/StudyGroup.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.d.ts +0 -9
- package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.js +0 -11
- package/dist/dts/features/Discovery/StudyDetails/StudyGroupPanel.js.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyItems.d.ts +0 -5
- package/dist/dts/features/Discovery/StudyDetails/StudyItems.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyDetails/StudyItems.js +0 -283
- package/dist/dts/features/Discovery/StudyDetails/StudyItems.js.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.d.ts +0 -10
- package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js +0 -45
- package/dist/dts/features/Discovery/StudyPage/DownloadLinksPanel.js.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/StudyPage.d.ts +0 -10
- package/dist/dts/features/Discovery/StudyPage/StudyPage.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/StudyPage.js +0 -11
- package/dist/dts/features/Discovery/StudyPage/StudyPage.js.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.d.ts +0 -9
- package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.d.ts.map +0 -1
- package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.js +0 -8
- package/dist/dts/features/Discovery/StudyPage/StudyPageGroup.js.map +0 -1
- package/dist/dts/features/StaticNotebook/StaticNotebook.d.ts +0 -4
- package/dist/dts/features/StaticNotebook/StaticNotebook.d.ts.map +0 -1
- package/dist/dts/features/StaticNotebook/StaticNotebook.js +0 -79
- package/dist/dts/features/StaticNotebook/StaticNotebook.js.map +0 -1
- package/dist/dts/lib/notebooks/index.d.ts +0 -3
- package/dist/dts/lib/notebooks/index.d.ts.map +0 -1
- package/dist/dts/lib/notebooks/index.js +0 -96
- package/dist/dts/lib/notebooks/index.js.map +0 -1
- /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/AccordianPanel.d.ts +0 -0
- /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/DropdownPanel.d.ts +0 -0
- /package/dist/dts/{features/CohortBuilder → components/facets}/Panels/types.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCohortsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,iBAAiB,+CAYtB,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Group, Stack } from '@mantine/core';
|
|
3
|
-
import SavedCohortsTable from './SavedCohortsTable';
|
|
4
|
-
var SavedCohortsPanel = function () {
|
|
5
|
-
var openModal = function (id) { };
|
|
6
|
-
return (_jsx(_Fragment, { children: _jsx(Stack, { className: "w-100 m-2", children: _jsx(Group, { className: "w-100 bg-base-light p-4", children: _jsx(SavedCohortsTable, {}) }) }) }));
|
|
7
|
-
};
|
|
8
|
-
export default SavedCohortsPanel;
|
|
9
|
-
//# sourceMappingURL=SavedCohortsPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCohortsPanel.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SaveCohorts/SavedCohortsPanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAS,KAAK,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAOpD,IAAM,iBAAiB,GAAG;IACxB,IAAM,SAAS,GAAG,UAAC,EAAU,IAAM,CAAC,CAAC;IAErC,OAAO,CACL,4BACE,KAAC,KAAK,IAAC,SAAS,EAAC,WAAW,YAC1B,KAAC,KAAK,IAAC,SAAS,EAAC,yBAAyB,YACxC,KAAC,iBAAiB,KAAG,GACf,GACF,GACP,CACJ,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCohortsTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAmCvC,UAAU,sBAAsB;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwJvD,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { useMemo } from 'react';
|
|
14
|
-
import { useAppDispatch } from '../appApi';
|
|
15
|
-
import { MantineReactTable, useMantineReactTable, } from 'mantine-react-table';
|
|
16
|
-
import { useDeepCompareMemo } from 'use-deep-compare';
|
|
17
|
-
import { ActionIcon, Group, Text, Tooltip, useMantineTheme, } from '@mantine/core';
|
|
18
|
-
import { modals } from '@mantine/modals';
|
|
19
|
-
import { Icon } from '@iconify/react';
|
|
20
|
-
import { IconSize } from '../../../utils/sizes';
|
|
21
|
-
import { selectAllCohorts, removeCohort } from '../CohortManagerSlice';
|
|
22
|
-
import { useAppSelector } from '../appApi';
|
|
23
|
-
import { addDataAccessRequest, selectCohortToRequestId, } from '../RequestManagerSlice';
|
|
24
|
-
import DataAccessRequestForm from '../Requests/DataAccessRequestForm';
|
|
25
|
-
import { formatDate } from '../../../utils/date';
|
|
26
|
-
import { commonTableSettings } from '../tableSettings';
|
|
27
|
-
var SavedCohortsTable = function (_a) {
|
|
28
|
-
var _b = _a.size, size = _b === void 0 ? 'md' : _b;
|
|
29
|
-
var appDispatch = useAppDispatch();
|
|
30
|
-
var columns = useMemo(function () { return [
|
|
31
|
-
{
|
|
32
|
-
accessorKey: 'name', //access nested data with dot notation
|
|
33
|
-
header: 'Name',
|
|
34
|
-
Cell: function (_a) {
|
|
35
|
-
var cell = _a.cell;
|
|
36
|
-
return _jsxs(Text, { children: [cell.getValue(), " "] });
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
accessorKey: 'created_datetime',
|
|
41
|
-
header: 'Modified Date',
|
|
42
|
-
Cell: function (_a) {
|
|
43
|
-
var cell = _a.cell;
|
|
44
|
-
return _jsxs(Text, { children: [formatDate(cell.getValue()), " "] });
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
accessorKey: 'modified_datetime', //normal accessorKey
|
|
49
|
-
header: 'Created Date',
|
|
50
|
-
Cell: function (_a) {
|
|
51
|
-
var cell = _a.cell;
|
|
52
|
-
return _jsxs(Text, { children: [formatDate(cell.getValue()), " "] });
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
accessorKey: 'requested', //normal accessorKey
|
|
57
|
-
header: 'Requested',
|
|
58
|
-
Cell: function (_a) {
|
|
59
|
-
var cell = _a.cell;
|
|
60
|
-
return cell.getValue() === 'true' && (_jsx(Icon, { icon: "gen3:check", height: "2em", width: "2em", color: "green" }));
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
]; }, []);
|
|
64
|
-
var iconSize = IconSize[size] || IconSize['sm'];
|
|
65
|
-
var theme = useMantineTheme();
|
|
66
|
-
var data = useAppSelector(selectAllCohorts);
|
|
67
|
-
var requestByCohortId = useAppSelector(selectCohortToRequestId);
|
|
68
|
-
var tData = useDeepCompareMemo(function () {
|
|
69
|
-
return data.map(function (cohort) { return (__assign(__assign({}, cohort), { requested: (requestByCohortId[cohort.id] ? 'true' : 'false') })); });
|
|
70
|
-
}, [data, requestByCohortId]);
|
|
71
|
-
var handleSubmission = function (cohortId, values) {
|
|
72
|
-
if (cohortId && values) {
|
|
73
|
-
appDispatch(addDataAccessRequest({ cohortId: cohortId, userAccessInformation: values }));
|
|
74
|
-
// Close the modal after successful dispatch
|
|
75
|
-
close();
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var table = useMantineReactTable(__assign(__assign({ columns: columns, data: tData, getRowId: function (originalRow) { return originalRow.id; } }, commonTableSettings()), { positionActionsColumn: 'last', renderRowActions: function (_a) {
|
|
79
|
-
var row = _a.row;
|
|
80
|
-
return (_jsxs(Group, { wrap: "nowrap", gap: "xs", children: [_jsx(Tooltip, { label: "Submit Data Access Request", withArrow: true, children: _jsx(ActionIcon, { color: "accent.4", variant: "transparent", "aria-label": "Submit Data Access Request", onClick: function () {
|
|
81
|
-
var modelId = modals.open({
|
|
82
|
-
title: 'DATA ACCESS REQUEST',
|
|
83
|
-
children: (_jsx(DataAccessRequestForm, { cohortId: row.id, submitFunction: handleSubmission, close: function () { return modals.close(modelId); } })),
|
|
84
|
-
});
|
|
85
|
-
}, children: _jsx(Icon, { icon: "gen3:request", height: iconSize, width: iconSize, color: theme.colors.secondary[4] }) }) }), _jsx(Tooltip, { label: "Select Cohort", withArrow: true, children: _jsx(ActionIcon, { color: "accent.4", variant: "transparent", "aria-label": "Select cohort", onClick: function () { }, children: _jsx(Icon, { icon: "gen3:cohort", height: iconSize, width: iconSize, color: theme.colors.secondary[4] }) }) }), _jsx(Tooltip, { label: "Delete Cohort", withArrow: true, children: _jsx(ActionIcon, { color: "accent.4", variant: "transparent", "aria-label": "Delete saved cohort", onClick: function () {
|
|
86
|
-
modals.openConfirmModal({
|
|
87
|
-
title: 'Delete Cohort',
|
|
88
|
-
centered: true,
|
|
89
|
-
children: (_jsx(Text, { size: "sm", children: "Are you sure you want to delete your cohort? Deleted cohorts cannot be restored." })),
|
|
90
|
-
labels: { confirm: 'Delete Cohort', cancel: 'Cancel' },
|
|
91
|
-
confirmProps: { color: theme.colors.utility[2] },
|
|
92
|
-
onConfirm: function () {
|
|
93
|
-
appDispatch(removeCohort(row.id));
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
}, children: _jsx(Icon, { icon: "gen3:delete", height: iconSize, width: iconSize, color: theme.colors.secondary[4] }) }) })] }));
|
|
97
|
-
} }));
|
|
98
|
-
return (_jsx(_Fragment, { children: _jsx("div", { className: "inline-block overflow-x-scroll w-full", children: _jsx(MantineReactTable, { table: table }) }) }));
|
|
99
|
-
};
|
|
100
|
-
export default SavedCohortsTable;
|
|
101
|
-
//# sourceMappingURL=SavedCohortsTable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCohortsTable.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SaveCohorts/SavedCohortsTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EACL,UAAU,EAEV,KAAK,EACL,IAAI,EACJ,OAAO,EACP,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA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;oCACtB,QAAQ,EAAE,IAAI;oCACd,QAAQ,EAAE,CACR,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,iGAGR,CACR;oCACD,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE;oCACtD,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;oCAChD,SAAS,EAAE;wCACT,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oCACpC,CAAC;iCACF,CAAC,CAAC;4BACL,CAAC,YAED,KAAC,IAAI,IACH,IAAI,EAAC,aAAa,EAClB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,GAChC,GACS,GACL,IACJ,CACT;QA3E8B,CA2E9B,IACD,CAAC;IAEH,OAAO,CACL,4BACE,cAAK,SAAS,EAAC,uCAAuC,YACpD,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,GAC/B,GACL,CACJ,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=appApiRTKQ.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appApiRTKQ.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortDiscovery/appApiRTKQ.ts"],"names":[],"mappings":""}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { createAppApiForRTKQ } from '@gen3/core';
|
|
3
|
-
// import { filtersExpandedReducer } from './FilterExpandSlice';
|
|
4
|
-
// import { selectedFacetsReducer } from './SelectedFacetsSlice';
|
|
5
|
-
// import { cohortReducer } from './CohortSlice';
|
|
6
|
-
// import { getCookie } from 'cookies-next';
|
|
7
|
-
// import { persistReducer } from 'redux-persist';
|
|
8
|
-
//
|
|
9
|
-
// // import type { PersistConfig, PersistState } from 'redux-persist';
|
|
10
|
-
// // import type { Action, Reducer } from 'redux';
|
|
11
|
-
// // /**
|
|
12
|
-
// // * Update declaration of persistReducer to support redux v5
|
|
13
|
-
// // */
|
|
14
|
-
// // declare module 'redux-persist' {
|
|
15
|
-
// // export function persistReducer<S, A extends Action = Action, P = S>(
|
|
16
|
-
// // config: PersistConfig<S>,
|
|
17
|
-
// // baseReducer: Reducer<S, A, P>,
|
|
18
|
-
// // ): Reducer<
|
|
19
|
-
// // S & { _persist: PersistState },
|
|
20
|
-
// // A,
|
|
21
|
-
// // P & { _persist?: PersistState }
|
|
22
|
-
// // >;
|
|
23
|
-
// // }
|
|
24
|
-
//
|
|
25
|
-
// import storage from './storage-persist';
|
|
26
|
-
//
|
|
27
|
-
// export const _APP_NAME = 'CohortDiscovery'; // This wil be the route name of the app
|
|
28
|
-
// export const _APP_VERSION = '1.0.0';
|
|
29
|
-
//
|
|
30
|
-
// const persistConfig = {
|
|
31
|
-
// key: _APP_NAME,
|
|
32
|
-
// version: 1,
|
|
33
|
-
// storage,
|
|
34
|
-
// // whitelist: ['selectedIndexFacets', 'filtersExpandedState', 'cohorts'],
|
|
35
|
-
// };
|
|
36
|
-
//
|
|
37
|
-
// export interface GraphQLRequest {
|
|
38
|
-
// readonly query: string;
|
|
39
|
-
// readonly variables?: Record<string, unknown>;
|
|
40
|
-
// }
|
|
41
|
-
//
|
|
42
|
-
// // const reducers = combineReducers({
|
|
43
|
-
// // selectedIndexFacets: persistReducer(persistConfig, selectedFacetsReducer),
|
|
44
|
-
// // filtersExpandedState: filtersExpandedReducer,
|
|
45
|
-
// // cohorts: cohortReducer,
|
|
46
|
-
// // });
|
|
47
|
-
//
|
|
48
|
-
// const reducers = {
|
|
49
|
-
// selectedIndexFacets: selectedFacetsReducer,
|
|
50
|
-
// filtersExpandedState: filtersExpandedReducer,
|
|
51
|
-
// cohorts: cohortReducer,
|
|
52
|
-
// };
|
|
53
|
-
//
|
|
54
|
-
// const persistedReducers = persistReducer(persistConfig, reducers);
|
|
55
|
-
//
|
|
56
|
-
// // create the store, context and selector for the Cohort Discovery app
|
|
57
|
-
// // Note the project app has a local store and context which isolates
|
|
58
|
-
// // the filters and other store/cache values
|
|
59
|
-
// export const {
|
|
60
|
-
// appApi: cohortDiscoveryApi,
|
|
61
|
-
// useAppSelector: useAppSelector,
|
|
62
|
-
// useAppDispatch: useAppDispatch,
|
|
63
|
-
// useAppStore: useAppStore,
|
|
64
|
-
// appStore: AppStore,
|
|
65
|
-
// appContext: AppContext,
|
|
66
|
-
// } = createAppApiForRTKQ(
|
|
67
|
-
// 'cohortDiscovery/api',
|
|
68
|
-
// _APP_NAME,
|
|
69
|
-
// _APP_VERSION,
|
|
70
|
-
// reducers,
|
|
71
|
-
// async (query: GraphQLRequest) => {
|
|
72
|
-
// let accessToken = undefined;
|
|
73
|
-
// if (process.env.NODE_ENV === 'development') {
|
|
74
|
-
// // NOTE: This cookie can only be accessed from the client side
|
|
75
|
-
// // in development mode. Otherwise, the cookie is set as httpOnly
|
|
76
|
-
// accessToken = getCookie('credentials_token');
|
|
77
|
-
// }
|
|
78
|
-
//
|
|
79
|
-
// const headers = {
|
|
80
|
-
// Accept: 'application/json',
|
|
81
|
-
// 'Content-Type': 'application/json',
|
|
82
|
-
// 'Access-Control-Allow-Origin': '*',
|
|
83
|
-
// ...(accessToken && { Authorization: `Bearer ${accessToken}` }),
|
|
84
|
-
// };
|
|
85
|
-
//
|
|
86
|
-
// try {
|
|
87
|
-
// const response = await fetch(`/api/analysis/cohortDiscovery`, {
|
|
88
|
-
// headers: headers,
|
|
89
|
-
// method: 'POST',
|
|
90
|
-
// body: JSON.stringify(query),
|
|
91
|
-
// });
|
|
92
|
-
// return { data: await response.json() };
|
|
93
|
-
// } catch (e: unknown) {
|
|
94
|
-
// if (e instanceof Error) return { error: e.message };
|
|
95
|
-
// return { error: e };
|
|
96
|
-
// }
|
|
97
|
-
// },
|
|
98
|
-
// );
|
|
99
|
-
//
|
|
100
|
-
// export type AppState = ReturnType<typeof AppStore.getState>;
|
|
101
|
-
//# sourceMappingURL=appApiRTKQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appApiRTKQ.js","sourceRoot":"","sources":["../../../../src/features/CohortDiscovery/appApiRTKQ.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,gEAAgE;AAChE,iEAAiE;AACjE,iDAAiD;AACjD,4CAA4C;AAC5C,kDAAkD;AAClD,EAAE;AACF,uEAAuE;AACvE,mDAAmD;AACnD,SAAS;AACT,iEAAiE;AACjE,SAAS;AACT,sCAAsC;AACtC,4EAA4E;AAC5E,mCAAmC;AACnC,wCAAwC;AACxC,mBAAmB;AACnB,yCAAyC;AACzC,YAAY;AACZ,yCAAyC;AACzC,UAAU;AACV,OAAO;AACP,EAAE;AACF,2CAA2C;AAC3C,EAAE;AACF,uFAAuF;AACvF,uCAAuC;AACvC,EAAE;AACF,0BAA0B;AAC1B,oBAAoB;AACpB,gBAAgB;AAChB,aAAa;AACb,8EAA8E;AAC9E,KAAK;AACL,EAAE;AACF,oCAAoC;AACpC,4BAA4B;AAC5B,kDAAkD;AAClD,IAAI;AACJ,EAAE;AACF,wCAAwC;AACxC,kFAAkF;AAClF,qDAAqD;AACrD,+BAA+B;AAC/B,SAAS;AACT,EAAE;AACF,qBAAqB;AACrB,gDAAgD;AAChD,kDAAkD;AAClD,4BAA4B;AAC5B,KAAK;AACL,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,8CAA8C;AAC9C,iBAAiB;AACjB,gCAAgC;AAChC,oCAAoC;AACpC,oCAAoC;AACpC,8BAA8B;AAC9B,wBAAwB;AACxB,4BAA4B;AAC5B,2BAA2B;AAC3B,2BAA2B;AAC3B,eAAe;AACf,kBAAkB;AAClB,cAAc;AACd,uCAAuC;AACvC,mCAAmC;AACnC,oDAAoD;AACpD,uEAAuE;AACvE,yEAAyE;AACzE,sDAAsD;AACtD,QAAQ;AACR,EAAE;AACF,wBAAwB;AACxB,oCAAoC;AACpC,4CAA4C;AAC5C,4CAA4C;AAC5C,wEAAwE;AACxE,SAAS;AACT,EAAE;AACF,YAAY;AACZ,wEAAwE;AACxE,4BAA4B;AAC5B,0BAA0B;AAC1B,uCAAuC;AACvC,YAAY;AACZ,gDAAgD;AAChD,6BAA6B;AAC7B,6DAA6D;AAC7D,6BAA6B;AAC7B,QAAQ;AACR,OAAO;AACP,KAAK;AACL,EAAE;AACF,+DAA+D"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ChartsSection } from '../types';
|
|
2
|
-
import { AggregationsData } from '@gen3/core';
|
|
3
|
-
interface ChartsPanelProps {
|
|
4
|
-
config: ChartsSection;
|
|
5
|
-
data: AggregationsData;
|
|
6
|
-
}
|
|
7
|
-
declare const ChartsPanel: ({ config, data }: ChartsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default ChartsPanel;
|
|
9
|
-
//# sourceMappingURL=ChartsPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/Charts/ChartsPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,UAAU,gBAAgB;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,QAAA,MAAM,WAAW,GAAI,kBAAkB,gBAAgB,4CA4DtD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import { Accordion, Center, Switch, Divider, Box } from '@mantine/core';
|
|
4
|
-
import { Charts } from '../../../components/charts';
|
|
5
|
-
import { ErrorCard } from '../../../components/MessageCards';
|
|
6
|
-
var ChartsPanel = function (_a) {
|
|
7
|
-
var _b, _c, _d;
|
|
8
|
-
var config = _a.config, data = _a.data;
|
|
9
|
-
var _e = useState((_b = config.showLegends) === null || _b === void 0 ? void 0 : _b.enabled), showLegends = _e[0], setShowLegends = _e[1];
|
|
10
|
-
if (!((config === null || config === void 0 ? void 0 : config.charts) && Object.keys(config.charts).length > 0)) {
|
|
11
|
-
return (_jsx(Center, { children: _jsx(ErrorCard, { message: "Discovery Charts Section not setup properly" }) }));
|
|
12
|
-
}
|
|
13
|
-
return (_jsx(Accordion, { unstyled: true, classNames: {
|
|
14
|
-
root: 'mb-4 bg-base-max w-full rounded-lg',
|
|
15
|
-
control: 'bg-secondary-lightest w-full px-4 py-2 rounded-lg data-active:rounded-b-none text-left group',
|
|
16
|
-
label: 'pl-2 font-bold [text-shadow:_1px_0_#000]',
|
|
17
|
-
chevron: 'rounded-full bg-secondary-dark text-white inline-block align-middle group-data-[active]:rotate-180 transition-all',
|
|
18
|
-
panel: 'py-4',
|
|
19
|
-
}, chevronPosition: "left", defaultValue: "chartsAccordion", children: _jsxs(Accordion.Item, { value: 'chartsAccordion', children: [_jsx(Accordion.Control, { children: config.title || '' }), _jsxs(Accordion.Panel, { children: [((_c = config.showLegends) === null || _c === void 0 ? void 0 : _c.enabled) && ((_d = config.showLegends) === null || _d === void 0 ? void 0 : _d.showSwitch) && (_jsxs(React.Fragment, { children: [_jsx(Switch, { color: "accent", labelPosition: "left", label: "Show legends", size: "xs", px: "md", checked: showLegends, onChange: function (event) {
|
|
20
|
-
return setShowLegends(event.currentTarget.checked);
|
|
21
|
-
} }), _jsx(Divider, { my: "sm" })] })), _jsx(Box, { px: "md", children: _jsx(Charts, { showLegends: showLegends, style: "box", charts: config.charts, data: data, counts: 2, isSuccess: true, numCols: 4 }) })] })] }) }));
|
|
22
|
-
};
|
|
23
|
-
export default ChartsPanel;
|
|
24
|
-
//# sourceMappingURL=ChartsPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartsPanel.js","sourceRoot":"","sources":["../../../../../src/features/Discovery/Charts/ChartsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAO7D,IAAM,WAAW,GAAG,UAAC,EAAkC;;QAAhC,MAAM,YAAA,EAAE,IAAI,UAAA;IAC3B,IAAA,KAAgC,QAAQ,CAAC,MAAA,MAAM,CAAC,WAAW,0CAAE,OAAO,CAAC,EAApE,WAAW,QAAA,EAAE,cAAc,QAAyC,CAAC;IAE5E,IAAI,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,KAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC/D,OAAO,CACL,KAAC,MAAM,cACL,KAAC,SAAS,IAAC,OAAO,EAAC,6CAA6C,GAAG,GAC5D,CACV,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,QAAQ,QACR,UAAU,EAAE;YACV,IAAI,EAAE,oCAAoC;YAC1C,OAAO,EACL,8FAA8F;YAChG,KAAK,EAAE,0CAA0C;YACjD,OAAO,EACL,mHAAmH;YACrH,KAAK,EAAE,MAAM;SACd,EACD,eAAe,EAAC,MAAM,EACtB,YAAY,EAAC,iBAAiB,YAE9B,MAAC,SAAS,CAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,aACtC,KAAC,SAAS,CAAC,OAAO,cAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAqB,EAC3D,MAAC,SAAS,CAAC,KAAK,eACb,CAAA,MAAA,MAAM,CAAC,WAAW,0CAAE,OAAO,MAAI,MAAA,MAAM,CAAC,WAAW,0CAAE,UAAU,CAAA,IAAI,CAChE,MAAC,KAAK,CAAC,QAAQ,eACb,KAAC,MAAM,IACL,KAAK,EAAC,QAAQ,EACd,aAAa,EAAC,MAAM,EACpB,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,IAAI,EACT,EAAE,EAAC,IAAI,EACP,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAC,KAAK;wCACd,OAAA,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;oCAA3C,CAA2C,GAE7C,EACF,KAAC,OAAO,IAAC,EAAE,EAAC,IAAI,GAAG,IACJ,CAClB,EACD,KAAC,GAAG,IAAC,EAAE,EAAC,IAAI,YACV,KAAC,MAAM,IACL,WAAW,EAAE,WAAW,EACxB,KAAK,EAAC,KAAK,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,CAAC,GACV,GACE,IACU,IACH,GACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CollapsableChartsPanelConfiguration } from '../../../components/charts';
|
|
2
|
-
import { AggregationsData } from '@gen3/core';
|
|
3
|
-
interface ChartsPanelProps {
|
|
4
|
-
config: CollapsableChartsPanelConfiguration;
|
|
5
|
-
data: AggregationsData;
|
|
6
|
-
}
|
|
7
|
-
declare const CollapsableChartsPanel: ({ config, data }: ChartsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default CollapsableChartsPanel;
|
|
9
|
-
//# sourceMappingURL=CollapsableChartsPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsableChartsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/Charts/CollapsableChartsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,mCAAmC,EACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,UAAU,gBAAgB;IACxB,MAAM,EAAE,mCAAmC,CAAC;IAC5C,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,QAAA,MAAM,sBAAsB,GAAI,kBAAkB,gBAAgB,4CA4DjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import { Accordion, Center, Switch, Divider, Box } from '@mantine/core';
|
|
4
|
-
import { Charts, } from '../../../components/charts';
|
|
5
|
-
import { ErrorCard } from '../../../components/MessageCards';
|
|
6
|
-
var CollapsableChartsPanel = function (_a) {
|
|
7
|
-
var _b, _c, _d;
|
|
8
|
-
var config = _a.config, data = _a.data;
|
|
9
|
-
var _e = useState((_b = config.showLegends) === null || _b === void 0 ? void 0 : _b.enabled), showLegends = _e[0], setShowLegends = _e[1];
|
|
10
|
-
if (!((config === null || config === void 0 ? void 0 : config.charts) && Object.keys(config.charts).length > 0)) {
|
|
11
|
-
return (_jsx(Center, { children: _jsx(ErrorCard, { message: "Discovery Charts Section not setup properly" }) }));
|
|
12
|
-
}
|
|
13
|
-
return (_jsx(Accordion, { unstyled: true, classNames: {
|
|
14
|
-
root: 'mb-4 bg-base-max w-full rounded-lg',
|
|
15
|
-
control: 'bg-secondary-lightest w-full px-4 py-2 rounded-lg data-active:rounded-b-none text-left group',
|
|
16
|
-
label: 'pl-2 font-bold [text-shadow:_1px_0_#000]',
|
|
17
|
-
chevron: 'rounded-full bg-secondary-dark text-white inline-block align-middle group-data-[active]:rotate-180 transition-all',
|
|
18
|
-
panel: 'py-4',
|
|
19
|
-
}, chevronPosition: "left", defaultValue: "chartsAccordion", children: _jsxs(Accordion.Item, { value: 'chartsAccordion', children: [_jsx(Accordion.Control, { children: config.title || '' }), _jsxs(Accordion.Panel, { children: [((_c = config.showLegends) === null || _c === void 0 ? void 0 : _c.enabled) && ((_d = config.showLegends) === null || _d === void 0 ? void 0 : _d.showSwitch) && (_jsxs(React.Fragment, { children: [_jsx(Switch, { color: "accent", labelPosition: "left", label: "Show legends", size: "xs", px: "md", checked: showLegends, onChange: function (event) {
|
|
20
|
-
return setShowLegends(event.currentTarget.checked);
|
|
21
|
-
} }), _jsx(Divider, { my: "sm" })] })), _jsx(Box, { px: "md", children: _jsx(Charts, { showLegends: showLegends, style: "box", charts: config.charts, data: data, counts: 2, isSuccess: true, numCols: 4 }) })] })] }) }));
|
|
22
|
-
};
|
|
23
|
-
export default CollapsableChartsPanel;
|
|
24
|
-
//# sourceMappingURL=CollapsableChartsPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsableChartsPanel.js","sourceRoot":"","sources":["../../../../../src/features/Discovery/Charts/CollapsableChartsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EACL,MAAM,GAEP,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAO7D,IAAM,sBAAsB,GAAG,UAAC,EAAkC;;QAAhC,MAAM,YAAA,EAAE,IAAI,UAAA;IACtC,IAAA,KAAgC,QAAQ,CAAC,MAAA,MAAM,CAAC,WAAW,0CAAE,OAA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,IAAI,YACV,KAAC,MAAM,IACL,WAAW,EAAE,WAAW,EACxB,KAAK,EAAC,KAAK,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,CAAC,GACV,GACE,IACU,IACH,GACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DataAuthorization } from '../types';
|
|
2
|
-
import { JSONObject } from '@gen3/core';
|
|
3
|
-
interface DetailsAccessProps {
|
|
4
|
-
readonly studyData: JSONObject;
|
|
5
|
-
dataAccess: DataAuthorization;
|
|
6
|
-
}
|
|
7
|
-
declare const DetailsAuthorizationIcon: ({ studyData, dataAccess, }: DetailsAccessProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default DetailsAuthorizationIcon;
|
|
9
|
-
//# sourceMappingURL=DetailsAuthorizationIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsAuthorizationIcon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/DetailsAuthorizationIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,UAAU,EAAE,iBAAiB,CAAC;CAC/B;AAED,QAAA,MAAM,wBAAwB,GAAI,4BAG/B,kBAAkB,4CAqBpB,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { AccessLevel } from '../types';
|
|
3
|
-
import { accessibleFieldName } from '../types';
|
|
4
|
-
var DetailsAuthorizationIcon = function (_a) {
|
|
5
|
-
var studyData = _a.studyData, dataAccess = _a.dataAccess;
|
|
6
|
-
var accessStyle = 'flex w-full items-center rounded-sm border-2 py-3 px-1';
|
|
7
|
-
return (_jsx("div", { className: "flex mb-2", children: dataAccess.enabled &&
|
|
8
|
-
studyData[accessibleFieldName] &&
|
|
9
|
-
studyData[accessibleFieldName] === AccessLevel.ACCESSIBLE ? (_jsx("div", { className: "".concat(accessStyle, " bg-green-100 border-green-500 text-black pl-2"), children: "You have access to this data." })) : (_jsx("div", { className: "".concat(accessStyle, " bg-yellow-100 border-yellow-500 text-black pl-2"), children: "You do not have access to this data." })) }));
|
|
10
|
-
};
|
|
11
|
-
export default DetailsAuthorizationIcon;
|
|
12
|
-
//# sourceMappingURL=DetailsAuthorizationIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsAuthorizationIcon.js","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/DetailsAuthorizationIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAqB,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C,IAAM,wBAAwB,GAAG,UAAC,EAGb;QAFnB,SAAS,eAAA,EACT,UAAU,gBAAA;IAEV,IAAM,WAAW,GAAG,wDAAwD,CAAC;IAC7E,OAAO,CACL,cAAK,SAAS,EAAC,WAAW,YACvB,UAAU,CAAC,OAAO;YACnB,SAAS,CAAC,mBAAmB,CAAC;YAC9B,SAAS,CAAC,mBAAmB,CAAC,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAC1D,cACE,SAAS,EAAE,UAAG,WAAW,mDAAgD,8CAGrE,CACP,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAE,UAAG,WAAW,qDAAkD,qDAGvE,CACP,GACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { JSONValue } from '@gen3/core';
|
|
2
|
-
export type FieldRendererFunction = (fieldValue: JSONValue, fieldLabel?: string, params?: Record<string, any>) => JSX.Element;
|
|
3
|
-
export type FieldRendererFunctionMap = Record<string, FieldRendererFunction>;
|
|
4
|
-
export declare class StudyFieldRendererFactory {
|
|
5
|
-
private static instance;
|
|
6
|
-
private fieldRendererCatalog;
|
|
7
|
-
private constructor();
|
|
8
|
-
static getInstance(): StudyFieldRendererFactory;
|
|
9
|
-
static getRenderer(type: string, functionName: string): FieldRendererFunction;
|
|
10
|
-
static registerFieldRenderer(type: string, functionName: string, func: FieldRendererFunction): void;
|
|
11
|
-
static registerFieldRendererCatalog(catalog: Record<string, FieldRendererFunctionMap>): void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Retrieve the renderer function for the given type and function name
|
|
15
|
-
* @param type
|
|
16
|
-
* @param functionName
|
|
17
|
-
*/
|
|
18
|
-
export declare const DiscoveryDetailsRenderer: (type?: string, functionName?: string) => FieldRendererFunction;
|
|
19
|
-
//# sourceMappingURL=RendererFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RendererFactory.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/RendererFactory.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,MAAM,qBAAqB,GAAG,CAClC,UAAU,EAAE,SAAS,EACrB,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,GAAG,CAAC,OAAO,CAAC;AAcjB,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAE7E,qBAAa,yBAAyB;IACpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4B;IACnD,OAAO,CAAC,oBAAoB,CAAgD;IAE5E,OAAO;IAIP,MAAM,CAAC,WAAW,IAAI,yBAAyB;IAO/C,MAAM,CAAC,WAAW,CAChB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GACnB,qBAAqB;IAcxB,MAAM,CAAC,qBAAqB,CAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,qBAAqB,GAC1B,IAAI;IAYP,MAAM,CAAC,4BAA4B,CACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAChD,IAAI;CAOR;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAe,EACf,qBAAwB,KACvB,qBAMF,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
var defaultStudyFieldRenderer = function (fieldValue, fieldLabel) {
|
|
3
|
-
return (_jsxs("div", { className: "flex w-full justify-between px-1 no-wrap'", children: [fieldLabel ? _jsx("span", { children: fieldLabel }) : null, ";", _jsx("span", { children: fieldValue }), ";"] }));
|
|
4
|
-
};
|
|
5
|
-
var StudyFieldRendererFactory = /** @class */ (function () {
|
|
6
|
-
function StudyFieldRendererFactory() {
|
|
7
|
-
this.fieldRendererCatalog = {};
|
|
8
|
-
this.fieldRendererCatalog = {};
|
|
9
|
-
}
|
|
10
|
-
StudyFieldRendererFactory.getInstance = function () {
|
|
11
|
-
if (!StudyFieldRendererFactory.instance) {
|
|
12
|
-
StudyFieldRendererFactory.instance = new StudyFieldRendererFactory();
|
|
13
|
-
}
|
|
14
|
-
return StudyFieldRendererFactory.instance;
|
|
15
|
-
};
|
|
16
|
-
StudyFieldRendererFactory.getRenderer = function (type, functionName) {
|
|
17
|
-
var _a;
|
|
18
|
-
if (!(type in StudyFieldRendererFactory.getInstance().fieldRendererCatalog)) {
|
|
19
|
-
console.log('No field renderer found for type: ', type);
|
|
20
|
-
return defaultStudyFieldRenderer;
|
|
21
|
-
}
|
|
22
|
-
return ((_a = StudyFieldRendererFactory.getInstance().fieldRendererCatalog[type][functionName]) !== null && _a !== void 0 ? _a : defaultStudyFieldRenderer);
|
|
23
|
-
};
|
|
24
|
-
StudyFieldRendererFactory.registerFieldRenderer = function (type, functionName, func) {
|
|
25
|
-
if (StudyFieldRendererFactory.getInstance().fieldRendererCatalog[type] ===
|
|
26
|
-
undefined) {
|
|
27
|
-
StudyFieldRendererFactory.getInstance().fieldRendererCatalog[type] = {};
|
|
28
|
-
}
|
|
29
|
-
StudyFieldRendererFactory.getInstance().fieldRendererCatalog[type][functionName] = func;
|
|
30
|
-
};
|
|
31
|
-
StudyFieldRendererFactory.registerFieldRendererCatalog = function (catalog) {
|
|
32
|
-
Object.keys(catalog).map(function (type) {
|
|
33
|
-
Object.entries(catalog[type]).map(function (_a) {
|
|
34
|
-
var name = _a[0], func = _a[1];
|
|
35
|
-
StudyFieldRendererFactory.registerFieldRenderer(type, name, func);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
return StudyFieldRendererFactory;
|
|
40
|
-
}());
|
|
41
|
-
export { StudyFieldRendererFactory };
|
|
42
|
-
/**
|
|
43
|
-
* Retrieve the renderer function for the given type and function name
|
|
44
|
-
* @param type
|
|
45
|
-
* @param functionName
|
|
46
|
-
*/
|
|
47
|
-
export var DiscoveryDetailsRenderer = function (type, functionName) {
|
|
48
|
-
if (type === void 0) { type = 'string'; }
|
|
49
|
-
if (functionName === void 0) { functionName = 'default'; }
|
|
50
|
-
if (!type) {
|
|
51
|
-
return defaultStudyFieldRenderer;
|
|
52
|
-
}
|
|
53
|
-
var func = StudyFieldRendererFactory.getRenderer(type, functionName);
|
|
54
|
-
return function (arg1, arg2, arg3) { return func(arg1, arg2, arg3); };
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=RendererFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RendererFactory.js","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/RendererFactory.tsx"],"names":[],"mappings":";AASA,IAAM,yBAAyB,GAAG,UAChC,UAAqB,EACrB,UAAmB;IAEnB,OAAO,CACL,eAAK,SAAS,EAAC,2CAA2C,aACvD,UAAU,CAAC,CAAC,CAAC,yBAAO,UAAU,GAAQ,CAAC,CAAC,CAAC,IAAI,OAC9C,yBAAO,UAAoB,GAAQ,SAC/B,CACP,CAAC;AACJ,CAAC,CAAC;AAIF;IAIE;QAFQ,yBAAoB,GAA6C,EAAE,CAAC;QAG1E,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;IACjC,CAAC;IAEM,qCAAW,GAAlB;QACE,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC;YACxC,yBAAyB,CAAC,QAAQ,GAAG,IAAI,yBAAyB,EAAE,CAAC;QACvE,CAAC;QACD,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC5C,CAAC;IAEM,qCAAW,GAAlB,UACE,IAAY,EACZ,YAAoB;;QAEpB,IACE,CAAC,CAAC,IAAI,IAAI,yBAAyB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,EACvE,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,IAAI,CAAC,CAAC;YACxD,OAAO,yBAAyB,CAAC;QACnC,CAAC;QACD,OAAO,CACL,MAAA,yBAAyB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAChE,YAAY,CACb,mCAAI,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAEM,+CAAqB,GAA5B,UACE,IAAY,EACZ,YAAoB,EACpB,IAA2B;QAE3B,IACE,yBAAyB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAClE,SAAS,EACT,CAAC;YACD,yBAAyB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAC1E,CAAC;QACD,yBAAyB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAChE,YAAY,CACb,GAAG,IAAI,CAAC;IACX,CAAC;IAEM,sDAA4B,GAAnC,UACE,OAAiD;QAEjD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI;YAC5B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,UAAC,EAAY;oBAAX,IAAI,QAAA,EAAE,IAAI,QAAA;gBAC5C,yBAAyB,CAAC,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACpE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACH,gCAAC;AAAD,CAAC,AAzDD,IAyDC;;AAED;;;;GAIG;AACH,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACtC,IAAe,EACf,YAAwB;IADxB,qBAAA,EAAA,eAAe;IACf,6BAAA,EAAA,wBAAwB;IAExB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,yBAAyB,CAAC;IACnC,CAAC;IACD,IAAM,IAAI,GAAG,yBAAyB,CAAC,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACvE,OAAO,UAAC,IAAI,EAAE,IAAI,EAAE,IAAI,IAAmB,OAAA,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAtB,CAAsB,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Non tabbed version of the StudyDetailsPanel
|
|
3
|
-
*/
|
|
4
|
-
import { ReactElement } from 'react';
|
|
5
|
-
import { JSONObject } from '@gen3/core';
|
|
6
|
-
import { DataAuthorization, StudyPageConfig } from '../types';
|
|
7
|
-
interface SinglePageStudyDetailsPanelProps {
|
|
8
|
-
readonly data: JSONObject;
|
|
9
|
-
readonly studyConfig?: StudyPageConfig;
|
|
10
|
-
readonly authorization?: DataAuthorization;
|
|
11
|
-
}
|
|
12
|
-
declare const SinglePageStudyDetailsPanel: ({ data, studyConfig, authorization, }: SinglePageStudyDetailsPanelProps) => ReactElement;
|
|
13
|
-
export default SinglePageStudyDetailsPanel;
|
|
14
|
-
//# sourceMappingURL=SinglePageStudyDetailsPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SinglePageStudyDetailsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAa,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAqB9D,UAAU,gCAAgC;IACxC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;CAC5C;AAED,QAAA,MAAM,2BAA2B,GAAI,uCAIlC,gCAAgC,KAAG,YAyErC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useDeepCompareMemo } from 'use-deep-compare';
|
|
3
|
-
import DetailsAuthorizationIcon from './DetailsAuthorizationIcon';
|
|
4
|
-
import { JSONPath } from 'jsonpath-plus';
|
|
5
|
-
import { toString } from 'lodash';
|
|
6
|
-
import { createFieldRendererElement } from './StudyItems';
|
|
7
|
-
import DownloadLinksPanel from '../StudyPage/DownloadLinksPanel';
|
|
8
|
-
var StudyTitle = function (_a) {
|
|
9
|
-
var title = _a.title, _b = _a.className, className = _b === void 0 ? 'font-header text-lg font-semibold' : _b;
|
|
10
|
-
return (_jsx("div", { children: _jsx("h1", { className: className, children: title }) }));
|
|
11
|
-
};
|
|
12
|
-
var SinglePageStudyDetailsPanel = function (_a) {
|
|
13
|
-
var _b, _c;
|
|
14
|
-
var data = _a.data, studyConfig = _a.studyConfig, authorization = _a.authorization;
|
|
15
|
-
var headerText = '';
|
|
16
|
-
if ((_b = studyConfig === null || studyConfig === void 0 ? void 0 : studyConfig.header) === null || _b === void 0 ? void 0 : _b.field) {
|
|
17
|
-
var res = JSONPath({
|
|
18
|
-
path: studyConfig.header.field,
|
|
19
|
-
json: data,
|
|
20
|
-
});
|
|
21
|
-
headerText = res.length ? toString(res[0]) : '';
|
|
22
|
-
}
|
|
23
|
-
var elements = useDeepCompareMemo(function () {
|
|
24
|
-
if (studyConfig === undefined || studyConfig === null) {
|
|
25
|
-
return _jsx("div", { children: "Study Details Panel not configured" });
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return studyConfig === null || studyConfig === void 0 ? void 0 : studyConfig.fieldsToShow.map(function (field) {
|
|
29
|
-
return (_jsx("div", { className: "px-2 ".concat(field.groupWidth == 'full' || field.groupWidth === undefined
|
|
30
|
-
? 'w-full'
|
|
31
|
-
: 'w-1/2'), children: _jsxs("div", { className: "flex flex-col", children: [(field === null || field === void 0 ? void 0 : field.groupName) ? (_jsx("div", { className: "text-lg font-bold", children: field.groupName })) : null, field.fields.map(function (field) {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
var element = createFieldRendererElement(field, data);
|
|
34
|
-
if (element !== null) {
|
|
35
|
-
return (_jsx("div", { className: "flex w-full bg-base-lightest my-1 justify-between rounded-md py-1.5 px-1 text-sm ".concat((_b = (_a = field === null || field === void 0 ? void 0 : field.classNames) === null || _a === void 0 ? void 0 : _a['root']) !== null && _b !== void 0 ? _b : ''), children: element }, "item-".concat(field.field)));
|
|
36
|
-
}
|
|
37
|
-
})] }) }, "".concat(field.fields.join('-'), "-details")));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}, [studyConfig, data]);
|
|
41
|
-
return (_jsxs("div", { className: "flex flex-col", children: [_jsx(StudyTitle, { title: headerText, className: (_c = studyConfig === null || studyConfig === void 0 ? void 0 : studyConfig.header) === null || _c === void 0 ? void 0 : _c.className }), authorization !== undefined && (authorization === null || authorization === void 0 ? void 0 : authorization.enabled) ? (_jsx(DetailsAuthorizationIcon, { studyData: data, dataAccess: authorization })) : (false), _jsx("div", { className: "flex flex-wrap w-full", children: elements }), (studyConfig === null || studyConfig === void 0 ? void 0 : studyConfig.downloadLinks) && (_jsx(DownloadLinksPanel, { studyData: data, downloadLinks: studyConfig === null || studyConfig === void 0 ? void 0 : studyConfig.downloadLinks }))] }));
|
|
42
|
-
};
|
|
43
|
-
export default SinglePageStudyDetailsPanel;
|
|
44
|
-
//# sourceMappingURL=SinglePageStudyDetailsPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SinglePageStudyDetailsPanel.js","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/SinglePageStudyDetailsPanel.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,IAAM,UAAU,GAAG,UAAC,EAMnB;QALC,KAAK,WAAA,EACL,iBAA+C,EAA/C,SAAS,mBAAG,mCAAmC,KAAA;IAK/C,OAAO,CACL,wBACE,aAAI,SAAS,EAAE,SAAS,YAAG,KAAK,GAAM,GAClC,CACP,CAAC;AACJ,CAAC,CAAC;AAQF,IAA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,EAAE,CAAC;oCACrB,OAAO,CACL,cAEE,SAAS,EAAE,2FACT,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAG,MAAM,CAAC,mCAAI,EAAE,CACjC,YAED,OAAO,IALH,eAAQ,KAAK,CAAC,KAAK,CAAE,CAMtB,CACP,CAAC;gCACJ,CAAC;4BACH,CAAC,CAAC,IACE,IA7BD,UAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,aAAU,CA8BpC,CACP,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,eAAK,SAAS,EAAC,eAAe,aAC5B,KAAC,UAAU,IACT,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,0CAAE,SAAS,GACzC,EACD,aAAa,KAAK,SAAS,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAA,CAAC,CAAC,CAAC,CACvD,KAAC,wBAAwB,IAAC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,GAAI,CACzE,CAAC,CAAC,CAAC,CACF,KAAK,CACN,EACD,cAAK,SAAS,EAAC,uBAAuB,YAAE,QAAQ,GAAO,EACtD,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,KAAI,CAC7B,KAAC,kBAAkB,IACjB,SAAS,EAAE,IAAI,EACf,aAAa,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,GACzC,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StudyDetails.d.ts","sourceRoot":"","sources":["../../../../../src/features/Discovery/StudyDetails/StudyDetails.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY,sDAqDjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, CopyButton, Drawer } from '@mantine/core';
|
|
3
|
-
import StudyDetailsPanel from './StudyDetailsPanel';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { useDiscoveryContext } from '../DiscoveryProvider';
|
|
6
|
-
import { useDisclosure } from '@mantine/hooks';
|
|
7
|
-
import { MdKeyboardDoubleArrowLeft as BackIcon } from 'react-icons/md';
|
|
8
|
-
import SinglePageStudyDetailsPanel from './SinglePageStudyDetailsPanel';
|
|
9
|
-
var StudyDetails = function () {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
var _c = useDiscoveryContext(), config = _c.discoveryConfig, studyDetails = _c.studyDetails;
|
|
12
|
-
var _d = useDisclosure(false), opened = _d[0], _e = _d[1], open = _e.open, close = _e.close;
|
|
13
|
-
var index = (_b = (_a = config === null || config === void 0 ? void 0 : config.minimalFieldMapping) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : 'unknown';
|
|
14
|
-
var permalink = 'Discovery/notfound';
|
|
15
|
-
if (studyDetails) {
|
|
16
|
-
var studyId = studyDetails[index];
|
|
17
|
-
var pagePath = "/discovery/".concat(encodeURIComponent(typeof studyId == 'string' ? 'string' : 'unknown'));
|
|
18
|
-
permalink = "/".concat(pagePath);
|
|
19
|
-
}
|
|
20
|
-
useEffect(function () {
|
|
21
|
-
if (Object.keys(studyDetails).length > 0) {
|
|
22
|
-
open();
|
|
23
|
-
}
|
|
24
|
-
}, [studyDetails, open]);
|
|
25
|
-
if (!studyDetails) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return (_jsxs(Drawer.Root, { opened: opened, onClose: close, size: "50%", position: "right", children: [_jsx(Drawer.Overlay, { opacity: 0.5, blur: 4 }), _jsxs(Drawer.Content, { children: [_jsxs(Drawer.Header, { children: [_jsxs(Button, { leftSection: _jsx(BackIcon, {}), onClick: close, variant: "outline", children: [' ', "Back", ' '] }), _jsx(CopyButton, { value: permalink, children: function (_a) {
|
|
29
|
-
var copied = _a.copied, copy = _a.copy;
|
|
30
|
-
return (_jsx(Button, { color: copied ? 'primary' : 'secondary', onClick: copy, children: copied ? 'Copied Permalink' : 'Permalink' }));
|
|
31
|
-
} })] }), _jsx(Drawer.Body, { children: config.detailView ?
|
|
32
|
-
_jsx(StudyDetailsPanel, { data: studyDetails !== null && studyDetails !== void 0 ? studyDetails : {}, studyConfig: config.detailView }) : config.simpleDetailsView ?
|
|
33
|
-
_jsx(SinglePageStudyDetailsPanel, { data: studyDetails !== null && studyDetails !== void 0 ? studyDetails : {}, studyConfig: config.simpleDetailsView, authorization: config.features.authorization }) :
|
|
34
|
-
_jsx("div", { children: "Study Details Panel not configured" }) })] })] }));
|
|
35
|
-
};
|
|
36
|
-
export default StudyDetails;
|
|
37
|
-
//# sourceMappingURL=StudyDetails.js.map
|