@gen3/frontend 0.11.31 → 0.11.33
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 +1510 -123
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.d.ts +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.d.ts.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.js +15 -11
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.js.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.d.ts +10 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.d.ts.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.js +4 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.js.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/types.d.ts +2 -1
- package/dist/dts/components/AddtoDataLibrary/types.d.ts.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js +1 -0
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/index.d.ts +2 -0
- package/dist/dts/components/Buttons/DownloadButtons/index.d.ts.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/index.js +2 -0
- package/dist/dts/components/Buttons/DownloadButtons/index.js.map +1 -1
- package/dist/dts/components/Buttons/FunctionButton.d.ts +32 -0
- package/dist/dts/components/Buttons/FunctionButton.d.ts.map +1 -0
- package/dist/dts/components/Buttons/FunctionButton.js +99 -0
- package/dist/dts/components/Buttons/FunctionButton.js.map +1 -0
- package/dist/dts/components/CollapsableSidebar/CollapsableSidebar.stories.d.ts +1 -1
- package/dist/dts/components/CollapsableSidebar/CollapsableSidebar.stories.d.ts.map +1 -1
- package/dist/dts/components/DataItems/TruncatedStringWithTooltip.stories.d.ts +1 -1
- package/dist/dts/components/DataItems/TruncatedStringWithTooltip.stories.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js +10 -4
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/components/MessageCards/MessagePage.d.ts +7 -0
- package/dist/dts/components/MessageCards/MessagePage.d.ts.map +1 -0
- package/dist/dts/components/MessageCards/MessagePage.js +8 -0
- package/dist/dts/components/MessageCards/MessagePage.js.map +1 -0
- 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/Providers/Gen3Provider.d.ts +13 -13
- package/dist/dts/components/SegmentedControl.stories.d.ts +2 -2
- package/dist/dts/components/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/dts/components/Tables/ColumnOrdering.d.ts +11 -0
- package/dist/dts/components/Tables/ColumnOrdering.d.ts.map +1 -0
- package/dist/dts/components/Tables/ColumnOrdering.js +92 -0
- package/dist/dts/components/Tables/ColumnOrdering.js.map +1 -0
- package/dist/dts/components/Tables/ShowingCount.d.ts +12 -0
- package/dist/dts/components/Tables/ShowingCount.d.ts.map +1 -0
- package/dist/dts/components/Tables/ShowingCount.js +17 -0
- package/dist/dts/components/Tables/ShowingCount.js.map +1 -0
- package/dist/dts/components/Tables/TableHeader.d.ts +25 -0
- package/dist/dts/components/Tables/TableHeader.d.ts.map +1 -0
- package/dist/dts/components/Tables/TableHeader.js +84 -0
- package/dist/dts/components/Tables/TableHeader.js.map +1 -0
- package/dist/dts/components/Tables/TablePagination.d.ts +13 -0
- package/dist/dts/components/Tables/TablePagination.d.ts.map +1 -0
- package/dist/dts/components/Tables/TablePagination.js +67 -0
- package/dist/dts/components/Tables/TablePagination.js.map +1 -0
- package/dist/dts/components/Tables/types.d.ts +66 -0
- package/dist/dts/components/Tables/types.d.ts.map +1 -1
- package/dist/dts/components/Tables/utils.d.ts +16 -0
- package/dist/dts/components/Tables/utils.d.ts.map +1 -1
- package/dist/dts/components/Tables/utils.js +47 -0
- package/dist/dts/components/Tables/utils.js.map +1 -1
- package/dist/dts/components/facets/FacetTabs.js +1 -1
- package/dist/dts/components/facets/FacetTabs.js.map +1 -1
- package/dist/dts/components/facets/FiltersPanel.d.ts +3 -3
- package/dist/dts/components/facets/FiltersPanel.d.ts.map +1 -1
- package/dist/dts/components/facets/FiltersPanel.js.map +1 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.d.ts +2 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.d.ts.map +1 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.js +7 -7
- package/dist/dts/components/facets/Panels/DropdownPanel.js.map +1 -1
- package/dist/dts/components/facets/Panels/types.d.ts +2 -2
- package/dist/dts/components/facets/Panels/types.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts +2 -2
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +6 -6
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.d.ts +1 -1
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisPanel.stories.d.ts +2 -2
- package/dist/dts/features/Analysis/AnalysisPanel.stories.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +3 -3
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts +3 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js +46 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js.map +1 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -2
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/CellRenderers.d.ts +1 -3
- package/dist/dts/features/CohortBuilder/ExplorerTable/CellRenderers.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/CellRenderers.js +0 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/CellRenderers.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js +43 -13
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTableCellRenderers.d.ts +1 -3
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTableCellRenderers.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTableCellRenderers.js +64 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTableCellRenderers.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.js +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/ExpandingSubtable.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.js +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/SubTables/SubtableAccordian.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/context.d.ts +5 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/context.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/context.js +5 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/context.js.map +1 -0
- package/dist/dts/features/CohortBuilder/ExplorerTable/index.d.ts +3 -2
- package/dist/dts/features/CohortBuilder/ExplorerTable/index.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/index.js +3 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/index.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/types.d.ts +12 -2
- package/dist/dts/features/CohortBuilder/ExplorerTable/types.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.d.ts +16 -2
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js +17 -3
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js.map +1 -1
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.d.ts +11 -0
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.js +92 -0
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/Repository.js +14 -0
- package/dist/dts/features/CohortBuilder/Repository/Repository.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/RepositoryPanel.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/Repository/RepositoryPanel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/RepositoryPanel.js +43 -0
- package/dist/dts/features/CohortBuilder/Repository/RepositoryPanel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/Stats.d.ts +9 -0
- package/dist/dts/features/CohortBuilder/Repository/Stats.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/Stats.js +9 -0
- package/dist/dts/features/CohortBuilder/Repository/Stats.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/hooks.d.ts +9 -0
- package/dist/dts/features/CohortBuilder/Repository/hooks.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/hooks.js +53 -0
- package/dist/dts/features/CohortBuilder/Repository/hooks.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/index.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/Repository/index.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/index.js +3 -0
- package/dist/dts/features/CohortBuilder/Repository/index.js.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/types.d.ts +57 -0
- package/dist/dts/features/CohortBuilder/Repository/types.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/Repository/types.js +2 -0
- package/dist/dts/features/CohortBuilder/Repository/types.js.map +1 -0
- package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.js +4 -1
- package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.js.map +1 -1
- package/dist/dts/features/CohortBuilder/index.d.ts +4 -2
- package/dist/dts/features/CohortBuilder/index.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/index.js +4 -2
- package/dist/dts/features/CohortBuilder/index.js.map +1 -1
- package/dist/dts/features/CohortBuilder/types.d.ts +1 -3
- 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/Dictionary/Dictionary.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/Dictionary.js +5 -2
- package/dist/dts/features/Dictionary/Dictionary.js.map +1 -1
- package/dist/dts/features/Dictionary/GraphView.d.ts +9 -0
- package/dist/dts/features/Dictionary/GraphView.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/GraphView.js +99 -0
- package/dist/dts/features/Dictionary/GraphView.js.map +1 -0
- package/dist/dts/features/Dictionary/graphViewDataUtils.d.ts +114 -0
- package/dist/dts/features/Dictionary/graphViewDataUtils.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/graphViewDataUtils.js +332 -0
- package/dist/dts/features/Dictionary/graphViewDataUtils.js.map +1 -0
- package/dist/dts/features/Dictionary/utils.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/utils.js.map +1 -1
- package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.stories.d.ts +1 -1
- package/dist/dts/features/Discovery/ActionBar/AddToDataLibrary.stories.d.ts.map +1 -1
- package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.d.ts +1 -1
- package/dist/dts/features/Discovery/ActionBar/DataLibraryActionButton.stories.d.ts.map +1 -1
- package/dist/dts/features/Navigation/Footer/Footer.stories.d.ts +1 -1
- package/dist/dts/features/Navigation/Footer/Footer.stories.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar/IconButton.stories.d.ts +1 -1
- package/dist/dts/features/Navigation/TopBar/IconButton.stories.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar/TopBar.stories.d.ts +1 -1
- package/dist/dts/features/Navigation/TopBar/TopBar.stories.d.ts.map +1 -1
- package/dist/dts/index.d.ts +3 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +5 -5
- package/dist/dts/index.js.map +1 -1
- package/dist/dts/lib/common/staticProps.d.ts.map +1 -1
- package/dist/dts/lib/common/staticProps.js +0 -1
- package/dist/dts/lib/common/staticProps.js.map +1 -1
- package/dist/dts/pages/404/Custom404Page.stories.d.ts +1 -1
- package/dist/dts/pages/404/Custom404Page.stories.d.ts.map +1 -1
- package/dist/dts/pages/Repository/Repository.d.ts +4 -0
- package/dist/dts/pages/Repository/Repository.d.ts.map +1 -0
- package/dist/dts/pages/Repository/Repository.js +25 -0
- package/dist/dts/pages/Repository/Repository.js.map +1 -0
- package/dist/dts/pages/Repository/data.d.ts +4 -0
- package/dist/dts/pages/Repository/data.d.ts.map +1 -0
- package/dist/dts/pages/Repository/data.js +93 -0
- package/dist/dts/pages/Repository/data.js.map +1 -0
- package/dist/dts/pages/Repository/index.d.ts +4 -0
- package/dist/dts/pages/Repository/index.d.ts.map +1 -0
- package/dist/dts/pages/Repository/index.js +4 -0
- package/dist/dts/pages/Repository/index.js.map +1 -0
- package/dist/dts/pages/Repository/types.d.ts +6 -0
- package/dist/dts/pages/Repository/types.d.ts.map +1 -0
- package/dist/dts/pages/Repository/types.js +2 -0
- package/dist/dts/pages/Repository/types.js.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.d.ts.map +1 -1
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js +1 -1
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js.map +1 -1
- package/dist/dts/types/common.d.ts +4 -0
- package/dist/dts/types/common.d.ts.map +1 -1
- package/dist/dts/types/constants.d.ts +2 -0
- package/dist/dts/types/constants.d.ts.map +1 -1
- package/dist/dts/types/constants.js +2 -0
- package/dist/dts/types/constants.js.map +1 -1
- package/dist/dts/types/icons.d.ts +4 -3
- package/dist/dts/types/icons.d.ts.map +1 -1
- package/dist/dts/types/icons.js +4 -3
- package/dist/dts/types/icons.js.map +1 -1
- package/dist/dts/utils/RendererFactory.d.ts +1 -14
- package/dist/dts/utils/RendererFactory.d.ts.map +1 -1
- package/dist/dts/utils/RendererFactory.js.map +1 -1
- package/dist/dts/utils/time.d.ts +4 -0
- package/dist/dts/utils/time.d.ts.map +1 -1
- package/dist/dts/utils/time.js +4 -4
- package/dist/dts/utils/time.js.map +1 -1
- package/dist/dts/utils/validators.d.ts +2 -0
- package/dist/dts/utils/validators.d.ts.map +1 -0
- package/dist/dts/utils/validators.js +2 -0
- package/dist/dts/utils/validators.js.map +1 -0
- package/dist/esm/index.js +1514 -137
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +158 -32
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileFacetPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/FileFacetPanel.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAIL,WAAW,EAQZ,MAAM,4BAA4B,CAAC;AASpC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,GAAI,6CAK5B,mBAAmB,KAAG,GAAG,CAAC,OAkH5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useMemo, useState } from 'react';
|
|
14
|
+
import { useDeepCompareCallback, useDeepCompareEffect, useDeepCompareMemo, } from 'use-deep-compare';
|
|
15
|
+
import { Accessibility, extractEnumFilterValue, isIntersection, selectIndexFilters, useCoreSelector, } from '@gen3/core';
|
|
16
|
+
import DropdownPanel from '../../../components/facets/Panels/DropdownPanel';
|
|
17
|
+
import { classifyFacets, getAllFieldsFromFilterConfigs, processBucketData, removeIntersectionFromEnum, useClearFilters, useFieldNameToTitle, useGetFacetFilters, useUpdateFilters, } from '../../../components/facets';
|
|
18
|
+
import { partial } from 'lodash';
|
|
19
|
+
import { useCohortFilterCombineState, useFilterExpandedState, useSetCohortFilterCombineState, useToggleExpandFilter, } from '../hooks';
|
|
20
|
+
import { useGetFacetValuesQuery } from './hooks';
|
|
21
|
+
import { ErrorCard } from '../../../components/MessageCards';
|
|
22
|
+
export var FileFacetPanel = function (_a) {
|
|
23
|
+
var filters = _a.filters, index = _a.index, tabTitle = _a.tabTitle, fieldMapping = _a.fieldMapping;
|
|
24
|
+
var repositoryFilters = useCoreSelector(function (state) {
|
|
25
|
+
return selectIndexFilters(state, index);
|
|
26
|
+
});
|
|
27
|
+
var fields = useMemo(function () { var _a; return getAllFieldsFromFilterConfigs((_a = filters === null || filters === void 0 ? void 0 : filters.tabs) !== null && _a !== void 0 ? _a : []); }, [filters === null || filters === void 0 ? void 0 : filters.tabs]);
|
|
28
|
+
var _b = useState(Accessibility.ALL), accessLevel = _b[0], setAccessLevel = _b[1];
|
|
29
|
+
var _c = useState({}), facetDefinitions = _c[0], setFacetDefinitions = _c[1];
|
|
30
|
+
var _d = useGetFacetValuesQuery({
|
|
31
|
+
type: index,
|
|
32
|
+
fields: fields,
|
|
33
|
+
filters: repositoryFilters,
|
|
34
|
+
}), facetData = _d.data, isFacetsQuerySuccess = _d.isSuccess, isFacetsQueryFetching = _d.isFetching, isFacetsQueryError = _d.isError;
|
|
35
|
+
// Set the facet definitions based on the data only the first time the data is loaded
|
|
36
|
+
useDeepCompareEffect(function () {
|
|
37
|
+
if (isFacetsQuerySuccess && Object.keys(facetDefinitions).length === 0) {
|
|
38
|
+
var configFacetDefs = filters === null || filters === void 0 ? void 0 : filters.tabs.reduce(function (acc, tab) {
|
|
39
|
+
return __assign(__assign({}, tab.fieldsConfig), acc);
|
|
40
|
+
}, {});
|
|
41
|
+
var facetDefs = classifyFacets(facetData, index, fieldMapping !== null && fieldMapping !== void 0 ? fieldMapping : [], configFacetDefs !== null && configFacetDefs !== void 0 ? configFacetDefs : {});
|
|
42
|
+
setFacetDefinitions(facetDefs);
|
|
43
|
+
}
|
|
44
|
+
}, [isFacetsQuerySuccess, facetData, facetDefinitions, index, fieldMapping]);
|
|
45
|
+
var getEnumFacetData = useDeepCompareCallback(function (field) {
|
|
46
|
+
var filters = undefined;
|
|
47
|
+
var combineMode = 'or';
|
|
48
|
+
if (field in repositoryFilters.root) {
|
|
49
|
+
if (isIntersection(repositoryFilters.root[field])) {
|
|
50
|
+
var intersectionFilters = removeIntersectionFromEnum(repositoryFilters.root[field]);
|
|
51
|
+
if (intersectionFilters) {
|
|
52
|
+
filters = extractEnumFilterValue(intersectionFilters);
|
|
53
|
+
combineMode = 'and';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
filters = extractEnumFilterValue(repositoryFilters.root[field]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
data: processBucketData(facetData === null || facetData === void 0 ? void 0 : facetData[field]),
|
|
62
|
+
enumFilters: filters,
|
|
63
|
+
combineMode: combineMode,
|
|
64
|
+
isSuccess: isFacetsQuerySuccess,
|
|
65
|
+
isFetching: isFacetsQueryFetching,
|
|
66
|
+
};
|
|
67
|
+
}, [repositoryFilters.root, facetData, isFacetsQuerySuccess]);
|
|
68
|
+
var facetDataHooks = useDeepCompareMemo(function () {
|
|
69
|
+
return {
|
|
70
|
+
// TODO: see if there a better way to do this
|
|
71
|
+
enum: {
|
|
72
|
+
useGetFacetData: getEnumFacetData,
|
|
73
|
+
useUpdateFacetFilters: partial(useUpdateFilters, index),
|
|
74
|
+
useGetFacetFilters: partial(useGetFacetFilters, index),
|
|
75
|
+
useClearFilter: partial(useClearFilters, index),
|
|
76
|
+
useFilterExpanded: partial(useFilterExpandedState, index),
|
|
77
|
+
useToggleExpandFilter: partial(useToggleExpandFilter, index),
|
|
78
|
+
useGetCombineMode: partial(useCohortFilterCombineState, index),
|
|
79
|
+
useSetCombineMode: partial(useSetCohortFilterCombineState, index),
|
|
80
|
+
useFieldNameToTitle: useFieldNameToTitle,
|
|
81
|
+
useTotalCounts: undefined,
|
|
82
|
+
useUpdateCombineMode: function () { return null; },
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}, [getEnumFacetData, index]);
|
|
86
|
+
if (isFacetsQueryError) {
|
|
87
|
+
return _jsx(ErrorCard, { message: "Unable to fetch data from server" }); // TODO: replace with configurable message
|
|
88
|
+
}
|
|
89
|
+
return (_jsx(DropdownPanel, { index: index, filters: filters, facetDefinitions: facetDefinitions, facetDataHooks: facetDataHooks, showAccessLevel: false, tabTitle: tabTitle, onAccessChange: setAccessLevel, accessLevel: accessLevel }));
|
|
90
|
+
};
|
|
91
|
+
export default FileFacetPanel;
|
|
92
|
+
//# sourceMappingURL=FileFacetPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileFacetPanel.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/FileFacetPanel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,sBAAsB,EAEtB,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,aAAa,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EACL,cAAc,EAId,6BAA6B,EAC7B,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AACp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AAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,GACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RepositoryConfiguration } from './types';
|
|
2
|
+
declare const Repository: ({ filters, guppyConfig, table, buttons, loginForDownload, dropdowns, fileStatsConfiguration, }: RepositoryConfiguration) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Repository;
|
|
4
|
+
//# sourceMappingURL=Repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Repository.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/Repository.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAMlD,QAAA,MAAM,UAAU,GAAI,gGAQjB,uBAAuB,4CA2BzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import RepositoryPanel from './RepositoryPanel';
|
|
3
|
+
import { validateObjectHasRequiredFields } from '../../../utils/validators';
|
|
4
|
+
import { ErrorCard, MessagePage } from '../../../components/MessageCards';
|
|
5
|
+
var Repository = function (_a) {
|
|
6
|
+
var filters = _a.filters, guppyConfig = _a.guppyConfig, table = _a.table, buttons = _a.buttons, loginForDownload = _a.loginForDownload, dropdowns = _a.dropdowns, fileStatsConfiguration = _a.fileStatsConfiguration;
|
|
7
|
+
if (!fileStatsConfiguration ||
|
|
8
|
+
!validateObjectHasRequiredFields(fileStatsConfiguration, Object.keys(fileStatsConfiguration))) {
|
|
9
|
+
return (_jsx(MessagePage, { children: _jsx(ErrorCard, { message: "Invalid file stats configuration" }) }));
|
|
10
|
+
}
|
|
11
|
+
return (_jsx(RepositoryPanel, { guppyConfig: guppyConfig, filters: filters, table: table, dropdowns: dropdowns, buttons: buttons, loginForDownload: loginForDownload, fileStatsConfiguration: fileStatsConfiguration }, "Repository-Panel"));
|
|
12
|
+
};
|
|
13
|
+
export default Repository;
|
|
14
|
+
//# sourceMappingURL=Repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Repository.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/Repository.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE1E,IAAM,UAAU,GAAG,UAAC,EAQM;QAPxB,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,KAAK,WAAA,EACL,OAAO,aAAA,EACP,gBAAgB,sBAAA,EAChB,SAAS,eAAA,EACT,sBAAsB,4BAAA;IAEtB,IACE,CAAC,sBAAsB;QACvB,CAAC,+BAA+B,CAC9B,sBAAsB,EACtB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CACpC,EACD,CAAC;QACD,OAAO,CACL,KAAC,WAAW,cACV,KAAC,SAAS,IAAC,OAAO,EAAC,kCAAkC,GAAG,GAC5C,CACf,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IACd,WAAW,EAAE,WAAW,EAExB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,sBAAsB,IAN1C,kBAAkB,CAOtB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RepositoryConfiguration } from './types';
|
|
2
|
+
export declare const RepositoryPanel: ({ guppyConfig, filters, table, dropdowns, buttons, loginForDownload, fileStatsConfiguration, }: RepositoryConfiguration) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
3
|
+
export default RepositoryPanel;
|
|
4
|
+
//# sourceMappingURL=RepositoryPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/RepositoryPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAiBlD,eAAO,MAAM,eAAe,GAAI,gGAQ7B,uBAAuB,wDA6FzB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useMemo, useState } from 'react';
|
|
14
|
+
import { useMediaQuery } from '@mantine/hooks';
|
|
15
|
+
import { getAllFieldsFromFilterConfigs } from '../../../components/facets';
|
|
16
|
+
import { Accessibility, EmptyFilterSet, selectIndexFilters, useCoreSelector, } from '@gen3/core';
|
|
17
|
+
import { useTotalFileSizeQuery } from './hooks';
|
|
18
|
+
import Stats from './Stats';
|
|
19
|
+
import ExplorerTable from '../ExplorerTable/ExplorerTable';
|
|
20
|
+
import DownloadsPanel from '../DownloadsPanel';
|
|
21
|
+
import { TableXPositionContext } from '../ExplorerTable/context';
|
|
22
|
+
import FileFacetPanel from './FileFacetPanel';
|
|
23
|
+
export var RepositoryPanel = function (_a) {
|
|
24
|
+
var _b, _c, _d;
|
|
25
|
+
var guppyConfig = _a.guppyConfig, filters = _a.filters, table = _a.table, dropdowns = _a.dropdowns, buttons = _a.buttons, loginForDownload = _a.loginForDownload, fileStatsConfiguration = _a.fileStatsConfiguration;
|
|
26
|
+
var isSm = useMediaQuery('(min-width: 639px)');
|
|
27
|
+
var isMd = useMediaQuery('(min-width: 1373px)');
|
|
28
|
+
var isXl = useMediaQuery('(min-width: 1600px)');
|
|
29
|
+
var _e = useState(undefined), tableXPosition = _e[0], setTableXPosition = _e[1];
|
|
30
|
+
var defaultDropdowns = useMemo(function () { return dropdowns !== null && dropdowns !== void 0 ? dropdowns : {}; }, [dropdowns]);
|
|
31
|
+
var defaultButtons = useMemo(function () { return buttons !== null && buttons !== void 0 ? buttons : []; }, [buttons]);
|
|
32
|
+
var _f = useState(Accessibility.ALL), accessLevel = _f[0], setAccessLevel = _f[1];
|
|
33
|
+
var index = guppyConfig.dataType;
|
|
34
|
+
var fields = useMemo(function () { var _a; return getAllFieldsFromFilterConfigs((_a = filters === null || filters === void 0 ? void 0 : filters.tabs) !== null && _a !== void 0 ? _a : []); }, [filters === null || filters === void 0 ? void 0 : filters.tabs]);
|
|
35
|
+
var repositoryFilters = useCoreSelector(function (state) {
|
|
36
|
+
return selectIndexFilters(state, index);
|
|
37
|
+
});
|
|
38
|
+
var _g = useTotalFileSizeQuery(__assign({ repositoryFilters: repositoryFilters, cohortFilters: EmptyFilterSet }, fileStatsConfiguration)), fileSizeSliceData = _g.data, isFileSizeFetching = _g.isFetching;
|
|
39
|
+
if (fileStatsConfiguration)
|
|
40
|
+
return (_jsx(TableXPositionContext.Provider, { value: { xPosition: tableXPosition, setXPosition: setTableXPosition }, children: _jsx("div", { className: "flex flex-col mt-3 relative px-4 bg-base-lightest w-full", children: _jsxs("div", { className: "flex w-full pt-2", children: [_jsx("div", { id: "cohort-builder-filters", className: "flex-shrink-0 md:w-1/4 lg:w-1/5", children: (filters === null || filters === void 0 ? void 0 : filters.tabs) && (_jsx(FileFacetPanel, { index: index, filters: filters, tabTitle: "Files", fieldMapping: (_b = guppyConfig === null || guppyConfig === void 0 ? void 0 : guppyConfig.fieldMapping) !== null && _b !== void 0 ? _b : [] })) }), _jsx("div", { id: "cohort-builder-content", className: "flex flex-col md:w-3/4 lg:w-4/5 pl-4", children: (table === null || table === void 0 ? void 0 : table.enabled) && (_jsx(ExplorerTable, { index: index, tableConfig: table, accessibility: accessLevel, additionalControls: _jsx(DownloadsPanel, { dropdowns: defaultDropdowns, buttons: defaultButtons, loginForDownload: loginForDownload, index: index, totalCount: (_c = fileSizeSliceData.totalCaseCount) !== null && _c !== void 0 ? _c : 0, fields: (_d = table === null || table === void 0 ? void 0 : table.fields) !== null && _d !== void 0 ? _d : [], filter: repositoryFilters }), tableTotalDetail: _jsx("div", { className: "ml-auto", children: _jsx(Stats, { totalFileCount: fileSizeSliceData.totalFileCount, totalCaseCount: fileSizeSliceData.totalCaseCount, totalFileSize: fileSizeSliceData.totalFileSize, isFetching: isFileSizeFetching }) }) })) })] }) }) }));
|
|
41
|
+
};
|
|
42
|
+
export default RepositoryPanel;
|
|
43
|
+
//# sourceMappingURL=RepositoryPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryPanel.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/RepositoryPanel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EACL,aAAa,EAEb,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,aAA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MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,mCAAI,EAAE,EAC3B,MAAM,EAAE,iBAAiB,GACzB,EAEJ,gBAAgB,EACd,cAAK,SAAS,EAAC,SAAS,YACtB,KAAC,KAAK,IACJ,cAAc,EAAE,iBAAiB,CAAC,cAAc,EAChD,cAAc,EAAE,iBAAiB,CAAC,cAAc,EAChD,aAAa,EAAE,iBAAiB,CAAC,aAAa,EAC9C,UAAU,EAAE,kBAAkB,GAC9B,GACE,GAER,CACH,GACG,IACF,GACF,GACyB,CAClC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface FileStatsProps {
|
|
2
|
+
totalCaseCount: number;
|
|
3
|
+
totalFileSize: number;
|
|
4
|
+
totalFileCount: number;
|
|
5
|
+
isFetching: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Stats: ({ totalCaseCount, totalFileSize, totalFileCount, isFetching, }: FileStatsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Stats;
|
|
9
|
+
//# sourceMappingURL=Stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stats.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/Stats.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,KAAK,GAAI,gEAKZ,cAAc,4CAiBhB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PersonIcon, SaveIcon } from '../../../types/icons';
|
|
3
|
+
import { filesize } from 'filesize';
|
|
4
|
+
var Stats = function (_a) {
|
|
5
|
+
var totalCaseCount = _a.totalCaseCount, totalFileSize = _a.totalFileSize, totalFileCount = _a.totalFileCount, isFetching = _a.isFetching;
|
|
6
|
+
return (_jsxs("div", { className: "flex gap-1 text-xl items-center uppercase flex-wrap", children: [_jsxs("div", { children: ["Total of", ' ', _jsx("strong", { children: !isFetching ? totalFileCount.toLocaleString() : '--' }), ' ', totalFileCount !== 1 ? 'Files' : 'File'] }), _jsxs("div", { children: [_jsx(PersonIcon, { className: "ml-2 mr-1 mb-1 inline-block", "aria-hidden": "true" }), _jsx("strong", { className: "mr-1", children: totalCaseCount }), totalCaseCount !== 1 ? 'Cases' : 'Case'] }), _jsxs("div", { children: [_jsx(SaveIcon, { className: "ml-2 mr-1 mb-1 inline-block", "aria-hidden": "true" }), filesize(totalFileSize)] })] }));
|
|
7
|
+
};
|
|
8
|
+
export default Stats;
|
|
9
|
+
//# sourceMappingURL=Stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stats.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/Stats.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AASpC,IAAM,KAAK,GAAG,UAAC,EAKE;QAJf,cAAc,oBAAA,EACd,aAAa,mBAAA,EACb,cAAc,oBAAA,EACd,UAAU,gBAAA;IACU,OAAA,CACpB,eAAK,SAAS,EAAC,qDAAqD,aAClE,sCACW,GAAG,EACZ,2BAAS,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,GAAU,EAAC,GAAG,EAC1E,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IACpC,EACN,0BACE,KAAC,UAAU,IAAC,SAAS,EAAC,6BAA6B,iBAAa,MAAM,GAAG,EACzE,iBAAQ,SAAS,EAAC,MAAM,YAAE,cAAc,GAAU,EACjD,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IACpC,EACN,0BACE,KAAC,QAAQ,IAAC,SAAS,EAAC,6BAA6B,iBAAa,MAAM,GAAG,EACtE,QAAQ,CAAC,aAAa,CAAC,IACpB,IACF,CACP;AAjBqB,CAiBrB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FacetQueryParameters, FacetQueryResponse, FileCountsQueryParameters, FilesSizeData } from './types';
|
|
2
|
+
export declare const useGetFacetValuesQuery: (args: FacetQueryParameters) => FacetQueryResponse;
|
|
3
|
+
export declare const useTotalFileSizeQuery: ({ repositoryFilters, repositoryIndex, cohortIndex, fileSizeField, cohortItemIdField, fileItemIdField, accessibility, }: FileCountsQueryParameters) => {
|
|
4
|
+
data: FilesSizeData;
|
|
5
|
+
isError: boolean;
|
|
6
|
+
isFetching: boolean;
|
|
7
|
+
isSuccess: boolean;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,aAAa,EACd,MAAM,SAAS,CAAC;AAWjB,eAAO,MAAM,sBAAsB,GACjC,MAAM,oBAAoB,KACzB,kBASF,CAAC;AAuBF,eAAO,MAAM,qBAAqB,GAAI,wHAQnC,yBAAyB;;;;;CA+C3B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Accessibility, convertFilterSetToGqlFilter, customQueryStrForField, useGeneralGQLQuery, useGetAggsQuery, } from '@gen3/core';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useDeepCompareEffect } from 'use-deep-compare';
|
|
4
|
+
export var useGetFacetValuesQuery = function (args) {
|
|
5
|
+
var _a = useGetAggsQuery(args), data = _a.data, isSuccess = _a.isSuccess, isFetching = _a.isFetching, isError = _a.isError;
|
|
6
|
+
return {
|
|
7
|
+
data: data !== null && data !== void 0 ? data : {},
|
|
8
|
+
isError: isError,
|
|
9
|
+
isFetching: isFetching,
|
|
10
|
+
isSuccess: isSuccess,
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
var buildFileStatsdQuery = function (type, fileSizeField, cohortItemIdField, fileItemIdField) {
|
|
14
|
+
var fileStatsQuery = "query repositoryTotals ($filter: JSON, $accessibility:Accessibility) {\n _aggregation {\n ".concat(type, " (accessibility: $accessibility, filter: $filter) {\n ").concat(customQueryStrForField(fileItemIdField, '{_totalCount }'), "\n ").concat(customQueryStrForField(fileSizeField, ' { histogram {sum} }'), "\n ").concat(customQueryStrForField(cohortItemIdField, '{_cardinalityCount }'), "\n }\n }\n}");
|
|
15
|
+
return fileStatsQuery;
|
|
16
|
+
};
|
|
17
|
+
export var useTotalFileSizeQuery = function (_a) {
|
|
18
|
+
var repositoryFilters = _a.repositoryFilters, repositoryIndex = _a.repositoryIndex, cohortIndex = _a.cohortIndex, fileSizeField = _a.fileSizeField, cohortItemIdField = _a.cohortItemIdField, fileItemIdField = _a.fileItemIdField, _b = _a.accessibility, accessibility = _b === void 0 ? Accessibility.ALL : _b;
|
|
19
|
+
var _c = useState({
|
|
20
|
+
totalFileSize: 0,
|
|
21
|
+
totalCaseCount: 0,
|
|
22
|
+
totalFileCount: 0,
|
|
23
|
+
}), totals = _c[0], setTotals = _c[1];
|
|
24
|
+
var query = buildFileStatsdQuery(repositoryIndex, fileSizeField, cohortItemIdField, fileItemIdField);
|
|
25
|
+
var _d = useGeneralGQLQuery({
|
|
26
|
+
query: query,
|
|
27
|
+
variables: {
|
|
28
|
+
accessibility: accessibility,
|
|
29
|
+
filter: convertFilterSetToGqlFilter(repositoryFilters),
|
|
30
|
+
},
|
|
31
|
+
}), data = _d.data, isSuccess = _d.isSuccess, isFetching = _d.isFetching, isError = _d.isError;
|
|
32
|
+
useDeepCompareEffect(function () {
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
34
|
+
if (isSuccess) {
|
|
35
|
+
var response = data.data;
|
|
36
|
+
var totalFileSize = ((_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response._aggregation) === null || _a === void 0 ? void 0 : _a[repositoryIndex]) === null || _b === void 0 ? void 0 : _b[fileSizeField]) === null || _c === void 0 ? void 0 : _c.histogram) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.sum) || 0;
|
|
37
|
+
var totalCaseCount = ((_h = (_g = (_f = response === null || response === void 0 ? void 0 : response._aggregation) === null || _f === void 0 ? void 0 : _f[repositoryIndex]) === null || _g === void 0 ? void 0 : _g[cohortItemIdField]) === null || _h === void 0 ? void 0 : _h._cardinalityCount) || 0;
|
|
38
|
+
var totalFileCount = ((_l = (_k = (_j = response === null || response === void 0 ? void 0 : response._aggregation) === null || _j === void 0 ? void 0 : _j[repositoryIndex]) === null || _k === void 0 ? void 0 : _k[fileItemIdField]) === null || _l === void 0 ? void 0 : _l._totalCount) || 0;
|
|
39
|
+
setTotals({
|
|
40
|
+
totalFileSize: totalFileSize,
|
|
41
|
+
totalCaseCount: totalCaseCount,
|
|
42
|
+
totalFileCount: totalFileCount,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, [data, isSuccess]);
|
|
46
|
+
return {
|
|
47
|
+
data: totals,
|
|
48
|
+
isError: isError,
|
|
49
|
+
isFetching: isFetching,
|
|
50
|
+
isSuccess: isSuccess,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../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AAO,SAAA;QACP,UAAU,YAAA;QACV,SAAS,WAAA;KACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAgC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DataTypeConfigWithManifest, DownloadButtonConfig, DropdownsWithButtonsProps, TabsConfig } from '../types';
|
|
2
|
+
import { SummaryTable } from '../ExplorerTable/types';
|
|
3
|
+
import { Gen3AppConfigData } from '../../../lib/content/types';
|
|
4
|
+
import { Accessibility, AggregationsData, FilterSet } from '@gen3/core';
|
|
5
|
+
export interface FacetQueryParameters {
|
|
6
|
+
type: string;
|
|
7
|
+
fields: ReadonlyArray<string>;
|
|
8
|
+
filters: FilterSet;
|
|
9
|
+
accessibility?: Accessibility;
|
|
10
|
+
filterSelf?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface FacetQueryResponse {
|
|
13
|
+
data: AggregationsData;
|
|
14
|
+
isSuccess: boolean;
|
|
15
|
+
isFetching: boolean;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface FileCountsQueryParameters {
|
|
19
|
+
repositoryFilters: FilterSet;
|
|
20
|
+
cohortFilters?: FilterSet;
|
|
21
|
+
accessibility?: Accessibility;
|
|
22
|
+
cohortIndex: string;
|
|
23
|
+
repositoryIndex: string;
|
|
24
|
+
cohortItemIdField: string;
|
|
25
|
+
fileItemIdField: string;
|
|
26
|
+
fileSizeField: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FilesSizeData {
|
|
29
|
+
totalFileSize: number;
|
|
30
|
+
totalCaseCount: number;
|
|
31
|
+
totalFileCount: number;
|
|
32
|
+
}
|
|
33
|
+
export interface FileSizeQueryResponse {
|
|
34
|
+
data: FilesSizeData;
|
|
35
|
+
isSuccess: boolean;
|
|
36
|
+
isFetching: boolean;
|
|
37
|
+
isError: boolean;
|
|
38
|
+
}
|
|
39
|
+
export type useGetFacetValuesQueryHook = (args: FacetQueryParameters) => FacetQueryResponse;
|
|
40
|
+
export type useTotalFileSizeQueryHook = (args: FileCountsQueryParameters) => FileSizeQueryResponse;
|
|
41
|
+
export interface FileStatsConfiguration {
|
|
42
|
+
cohortIndex: string;
|
|
43
|
+
repositoryIndex: string;
|
|
44
|
+
cohortItemIdField: string;
|
|
45
|
+
fileItemIdField: string;
|
|
46
|
+
fileSizeField: string;
|
|
47
|
+
}
|
|
48
|
+
export interface RepositoryConfiguration extends Gen3AppConfigData {
|
|
49
|
+
filters?: TabsConfig;
|
|
50
|
+
guppyConfig: DataTypeConfigWithManifest;
|
|
51
|
+
table?: SummaryTable;
|
|
52
|
+
dropdowns?: Record<string, DropdownsWithButtonsProps>;
|
|
53
|
+
buttons?: ReadonlyArray<DownloadButtonConfig>;
|
|
54
|
+
loginForDownload?: boolean;
|
|
55
|
+
fileStatsConfiguration: FileStatsConfiguration;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EAA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B,KAC5B,qBAAqB,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,WAAW,EAAE,0BAA0B,CAAC;IACxC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,EAAE,sBAAsB,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/Repository/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloadActionHook.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/downloads/downloadActionHook.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAalD,UAAU,4BACR,SAAQ,IAAI,CACV,sBAAsB,EACpB,UAAU,GACV,UAAU,GACV,MAAM,GACN,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,CACf;IACD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,oBAAoB,GAAI,8GAS3B,4BAA4B;;;;
|
|
1
|
+
{"version":3,"file":"downloadActionHook.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/downloads/downloadActionHook.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAalD,UAAU,4BACR,SAAQ,IAAI,CACV,sBAAsB,EACpB,UAAU,GACV,UAAU,GACV,MAAM,GACN,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,CACf;IACD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,oBAAoB,GAAI,8GAS3B,4BAA4B;;;;CA4G9B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -35,7 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
-
import {
|
|
38
|
+
import { useCallback, useState } from 'react';
|
|
39
39
|
import { Modals, showModal, useCoreDispatch } from '@gen3/core';
|
|
40
40
|
import { cleanNotifications, showNotification } from '@mantine/notifications';
|
|
41
41
|
import { DownloadNotification } from '../../../utils/download';
|
|
@@ -56,16 +56,19 @@ var useGuppyActionButton = function (_a) {
|
|
|
56
56
|
if (errorMessage === 'internal server error' ||
|
|
57
57
|
errorMessage === undefined) {
|
|
58
58
|
dispatch(showModal({ modal: Modal400, message: errorMessage }));
|
|
59
|
+
console.error(error);
|
|
59
60
|
}
|
|
60
61
|
else if (errorMessage ===
|
|
61
62
|
'Your token is invalid or expired. Please get a new token.') {
|
|
62
63
|
dispatch(showModal({ modal: Modal403, message: errorMessage }));
|
|
64
|
+
console.error(error);
|
|
63
65
|
}
|
|
64
66
|
else {
|
|
65
67
|
dispatch(showModal({
|
|
66
68
|
modal: Modal400,
|
|
67
69
|
message: customErrorMessage || errorMessage,
|
|
68
70
|
}));
|
|
71
|
+
console.error(error);
|
|
69
72
|
}
|
|
70
73
|
}, [Modal400, Modal403, customErrorMessage, dispatch]);
|
|
71
74
|
var showDownloadNotification = useCallback(function (controller) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloadActionHook.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/downloads/downloadActionHook.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"downloadActionHook.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/downloads/downloadActionHook.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,IAAM,gBAAgB,GAAG,UAAC,KAAY;IACpC,gBAAgB,CAAC;QACf,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CAAC;AACL,CAAC,CAAC;AAgBF,IAAM,oBAAoB,GAAG,UAAC,EASC;QAR7B,gBAA+B,EAA/B,QAAQ,mBAAG,MAAM,CAAC,aAAa,KAAA,EAC/B,gBAAmC,EAAnC,QAAQ,mBAAG,MAAM,CAAC,iBAAiB,KAAA,EACnC,IAAI,UAAA,EACJ,kBAAkB,wBAAA,EAClB,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EACxB,cAAc,oBAAA,EACd,UAAU,gBAAA,EACV,mBAAkC,EAAlC,WAAW,mBAAG,UAAC,CAAU,IAAK,OAAA,IAAI,EAAJ,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AC;wBACvB,CAAC,EACD,UAAU,CAAC,MAAM,CAClB,EAAA;;oBAvBD,SAuBC,CAAC;;;;SACH,CAAC;IAEF,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CACpB,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,GAAG,CACrC,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,KAAK,EAAC,UAAU,EAAC,IAAI,EAAE,EAAE,GAAI,CAC1C,CAAC;IAEF,OAAO;QACL,WAAW,aAAA;QACX,IAAI,MAAA;QACJ,MAAM,QAAA;KACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import CohortBuilder from './CohortBuilder';
|
|
2
2
|
import { type CohortBuilderConfiguration, type CohortBuilderProps, type CohortPanelConfiguration } from './types';
|
|
3
|
-
import { type CellRendererFunctionProps, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerCohortBuilderDefaultPreviewRenderers, registerExplorerDefaultCellRenderers, type TableDetailsPanelProps } from './ExplorerTable';
|
|
3
|
+
import { type CellRendererFunctionProps, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerCohortBuilderDefaultPreviewRenderers, registerExplorerDefaultCellRenderers, type TableDetailsPanelProps, TableXPositionContext } from './ExplorerTable';
|
|
4
4
|
import { QueryExpressionContext } from './QueryExpression/QueryExpressionContext';
|
|
5
5
|
import QueryExpressionSection from './QueryExpression/QueryExpressionSection';
|
|
6
6
|
import QueryExpression from './QueryExpression/QueryExpression';
|
|
7
7
|
import CohortManager from './CohortManager/CohortManager';
|
|
8
8
|
import CohortManagerAndExpression from './CohortManagerAndExpression';
|
|
9
9
|
import TabbedCohortBuilder, { type CohortBuilderTabCategoryConfig, type TabbedCohortBuilderConfiguration, type TabbedCohortBuilderFacetConfig } from './TabbedCohortBuilder';
|
|
10
|
-
export
|
|
10
|
+
export * from './Repository';
|
|
11
|
+
export { type CohortBuilderConfiguration, type CohortBuilderProps, type TableDetailsPanelProps, type CellRendererFunctionProps, type CohortPanelConfiguration, CohortBuilder, CohortManager, CohortManagerAndExpression, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerExplorerDefaultCellRenderers, registerCohortBuilderDefaultPreviewRenderers, QueryExpressionContext, // TODO move context to own feature folder
|
|
12
|
+
TableXPositionContext, QueryExpression, QueryExpressionSection, TabbedCohortBuilder, type TabbedCohortBuilderFacetConfig, type CohortBuilderTabCategoryConfig, type TabbedCohortBuilderConfiguration, };
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,KAAK,yBAAyB,EAC9B,gCAAgC,EAChC,gCAAgC,EAChC,4CAA4C,EAC5C,oCAAoC,EACpC,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,KAAK,yBAAyB,EAC9B,gCAAgC,EAChC,gCAAgC,EAChC,4CAA4C,EAC5C,oCAAoC,EACpC,KAAK,sBAAsB,EAC3B,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,sBAAsB,MAAM,0CAA0C,CAAC;AAC9E,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,mBAAmB,EAAE,EAC1B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACpC,MAAM,uBAAuB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,aAAa,EACb,aAAa,EACb,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,oCAAoC,EACpC,4CAA4C,EAC5C,sBAAsB,EAAE,0CAA0C;AAClE,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,GACtC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import CohortBuilder from './CohortBuilder';
|
|
2
|
-
import { ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerCohortBuilderDefaultPreviewRenderers, registerExplorerDefaultCellRenderers, } from './ExplorerTable';
|
|
2
|
+
import { ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerCohortBuilderDefaultPreviewRenderers, registerExplorerDefaultCellRenderers, TableXPositionContext, } from './ExplorerTable';
|
|
3
3
|
import { QueryExpressionContext } from './QueryExpression/QueryExpressionContext';
|
|
4
4
|
import QueryExpressionSection from './QueryExpression/QueryExpressionSection';
|
|
5
5
|
import QueryExpression from './QueryExpression/QueryExpression';
|
|
6
6
|
import CohortManager from './CohortManager/CohortManager';
|
|
7
7
|
import CohortManagerAndExpression from './CohortManagerAndExpression';
|
|
8
8
|
import TabbedCohortBuilder from './TabbedCohortBuilder';
|
|
9
|
-
export
|
|
9
|
+
export * from './Repository';
|
|
10
|
+
export { CohortBuilder, CohortManager, CohortManagerAndExpression, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, registerExplorerDefaultCellRenderers, registerCohortBuilderDefaultPreviewRenderers, QueryExpressionContext, // TODO move context to own feature folder
|
|
11
|
+
TableXPositionContext, QueryExpression, QueryExpressionSection, TabbedCohortBuilder, };
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAEL,gCAAgC,EAChC,gCAAgC,EAChC,4CAA4C,EAC5C,oCAAoC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAEL,gCAAgC,EAChC,gCAAgC,EAChC,4CAA4C,EAC5C,oCAAoC,EAEpC,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,sBAAsB,MAAM,0CAA0C,CAAC;AAC9E,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,mBAIN,MAAM,uBAAuB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAE7B,OAAO,EAML,aAAa,EACb,aAAa,EACb,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,oCAAoC,EACpC,4CAA4C,EAC5C,sBAAsB,EAAE,0CAA0C;AAClE,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GAIpB,CAAC"}
|
|
@@ -3,11 +3,9 @@ import { SummaryTable } from './ExplorerTable/types';
|
|
|
3
3
|
import { FacetSortType, FieldToName } from '../../components/facets/types';
|
|
4
4
|
import { DownloadButtonProps } from '../../components/Buttons/DropdownButtons';
|
|
5
5
|
import { Dispatch, SetStateAction } from 'react';
|
|
6
|
-
import { Modals, SharedFieldMapping } from '@gen3/core';
|
|
6
|
+
import { FacetDefinition, Modals, SharedFieldMapping } from '@gen3/core';
|
|
7
7
|
import { StylingOverride } from '../../types/styling';
|
|
8
8
|
import { Gen3AppConfigData } from '../../lib/content/types';
|
|
9
|
-
import { FacetDefinition } from '@gen3/core';
|
|
10
|
-
export type FacetType = 'enum' | 'range' | 'text' | 'number' | 'boolean' | 'date' | 'datetime';
|
|
11
9
|
export interface TabConfig {
|
|
12
10
|
title: string;
|
|
13
11
|
fields: ReadonlyArray<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/types.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mCAAmC,EACnC,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/types.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mCAAmC,EACnC,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,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AAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,cAAc,EAAE,4BAA4B,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/types.ts"],"names":[],"mappings":"AAAA,qEAAqE;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/types.ts"],"names":[],"mappings":"AAAA,qEAAqE;AA8ErE,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAoBD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,8CAAuB,CAAA;AACzB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dictionary.d.ts","sourceRoot":"","sources":["../../../../src/features/Dictionary/Dictionary.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Dictionary.d.ts","sourceRoot":"","sources":["../../../../src/features/Dictionary/Dictionary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;;AA2FvE,wBAAsC"}
|
|
@@ -5,7 +5,9 @@ import ViewSelector from './ViewSelector';
|
|
|
5
5
|
import TableSearch from './TableSearch';
|
|
6
6
|
import { useDictionaryContext } from './DictionaryProvider';
|
|
7
7
|
import CategoryPanel from './CategoryPanel';
|
|
8
|
+
import GraphView from './GraphView';
|
|
8
9
|
import { useScrollIntoView } from '@mantine/hooks';
|
|
10
|
+
import { Tabs } from '@mantine/core';
|
|
9
11
|
var Dictionary = function () {
|
|
10
12
|
var _a = useState(''), selectedId = _a[0], setSelectedId = _a[1];
|
|
11
13
|
var _b = useState('table'), view = _b[0], setView = _b[1];
|
|
@@ -21,8 +23,9 @@ var Dictionary = function () {
|
|
|
21
23
|
targetRef.current = itemRef;
|
|
22
24
|
scrollIntoView();
|
|
23
25
|
}, [scrollIntoView, targetRef]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
var categoryPanelTable = Object.keys(categories).length &&
|
|
27
|
+
Object.keys(categories).map(function (category) { return (_jsx(CategoryPanel, { category: category, selectedId: selectedId, scrollToSelection: scrollToSelection }, category)); });
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-1/4 overflow-auto p-4", children: _jsxs("div", { className: "h-full", children: [(config === null || config === void 0 ? void 0 : config.showGraph) ? (_jsx(ViewSelector, { view: view, setView: setView })) : null, _jsxs("span", { children: ["The current commons dictionary has", ' ', _jsx("span", { className: "font-bold", children: visibleCategories.length }), " nodes and", ' ', _jsx("span", { className: "font-bold", children: getPropertyCount(visibleCategories, dictionary) }), ' ', "properties"] }), _jsx(TableSearch, { selectItem: scrollTo })] }) }), _jsx("div", { className: "w-3/4 overflow-auto p-4 bg-base-lighter", ref: scrollableRef, children: _jsx("div", { className: "h-full", children: (config === null || config === void 0 ? void 0 : config.showGraph) ? (_jsxs(Tabs, { value: view, keepMounted: false, className: "h-full", children: [_jsx(Tabs.Panel, { value: "table", children: categoryPanelTable }), _jsx(Tabs.Panel, { value: "graph", className: "h-full", children: _jsx(GraphView, { categories: categories, dictionary: dictionary, selectedId: selectedId }) })] })) : (categoryPanelTable) }) })] }));
|
|
26
29
|
};
|
|
27
30
|
export default React.memo(Dictionary);
|
|
28
31
|
//# sourceMappingURL=Dictionary.js.map
|