@gen3/frontend 0.11.32 → 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 +1507 -120
- 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 +12 -12
- 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/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/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 +1511 -134
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +157 -31
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -9
|
@@ -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,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,EAAE,MAAA,iBAAiB,CAAC,cAAc,mCAAI,CAAC,EACjD,MAAM,EAAE,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
|
|
@@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AS,CAAC,CAAC,CAAC;IAEtB,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,OAAO,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,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B,CAAC;AACxB,MAAM,MAAM,yBAAyB,GAAG,CACtC,IAAI,EAAE,yBAAyB,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,m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CAAC,KAAK,CAAC,CAAC;4BACpC,4BAA4B;4BAC5B,kBAAkB,EAAE,CAAC;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,EAA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AU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dictionary.js","sourceRoot":"","sources":["../../../../src/features/Dictionary/Dictionary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Dictionary.js","sourceRoot":"","sources":["../../../../src/features/Dictionary/Dictionary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAoB,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,IAAM,UAAU,GAAG;IACX,IAAA,KAA8B,QAAQ,CAAC,EAAE,CAAC,EAAzC,UAAU,QAAA,EAAE,aAAa,QAAgB,CAAC;IAC3C,IAAA,KAAk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AAC,CAAC,CAAC,IAAI,EACR,iEACqC,GAAG,EACtC,eAAM,SAAS,EAAC,WAAW,YAAE,iBAAiB,CAAC,MAAM,GAAQ,gBACzD,GAAG,EACP,eAAM,SAAS,EAAC,WAAW,YACxB,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAC3C,EAAC,GAAG,kBAEN,EACP,KAAC,WAAW,IAAC,UAAU,EAAE,QAAQ,GAAI,IACjC,GACF,EACN,cACE,SAAS,EAAC,yCAAyC,EACnD,GAAG,EAAE,aAAa,YAElB,cAAK,SAAS,EAAC,QAAQ,YACpB,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,EAAC,CAAC,CAAC,CACnB,MAAC,IAAI,IAAC,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAC,QAAQ,aACvD,KAAC,IAAI,CAAC,KAAK,IAAC,KAAK,EAAC,OAAO,YAAE,kBAAkB,GAAc,EAC3D,KAAC,IAAI,CAAC,KAAK,IAAC,KAAK,EAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,YAC1C,KAAC,SAAS,IACR,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB,GACS,IACR,CACR,CAAC,CAAC,CAAC,CACF,kBAAkB,CACnB,GACG,GACF,IACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataDictionary } from './types';
|
|
2
|
+
interface GraphViewType {
|
|
3
|
+
categories: string;
|
|
4
|
+
dictionary: DataDictionary;
|
|
5
|
+
selectedId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const GraphView: ({ categories, dictionary, selectedId, }: GraphViewType) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default GraphView;
|
|
9
|
+
//# sourceMappingURL=GraphView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphView.d.ts","sourceRoot":"","sources":["../../../../src/features/Dictionary/GraphView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,GAAI,yCAIhB,aAAa,4CAwGf,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import ReactECharts from '../../components/charts/echarts/ReactECharts';
|
|
4
|
+
import { formatDataForGraph } from './graphViewDataUtils';
|
|
5
|
+
var GraphView = function (_a) {
|
|
6
|
+
var categories = _a.categories, dictionary = _a.dictionary, selectedId = _a.selectedId;
|
|
7
|
+
var _b = useState(0), zoomLevel = _b[0], setZoomLevel = _b[1]; // TODO Start here for zoom level
|
|
8
|
+
var dataAndLinks = formatDataForGraph(dictionary);
|
|
9
|
+
console.log('GraphView dictionary', dictionary);
|
|
10
|
+
console.log('GraphView categories', categories);
|
|
11
|
+
console.log('GraphView selectedId', selectedId);
|
|
12
|
+
var chartDefinition = useMemo(function () {
|
|
13
|
+
return {
|
|
14
|
+
tooltip: {
|
|
15
|
+
trigger: 'item',
|
|
16
|
+
triggerOn: 'mousemove'
|
|
17
|
+
},
|
|
18
|
+
toolbox: {
|
|
19
|
+
show: true,
|
|
20
|
+
left: 'left',
|
|
21
|
+
orient: 'vertical',
|
|
22
|
+
itemSize: 30,
|
|
23
|
+
iconStyle: {
|
|
24
|
+
borderWidth: 0,
|
|
25
|
+
opacity: 0.8,
|
|
26
|
+
},
|
|
27
|
+
emphasis: {
|
|
28
|
+
iconStyle: {
|
|
29
|
+
opacity: 1,
|
|
30
|
+
color: '#3283c8',
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
feature: {
|
|
34
|
+
restore: {
|
|
35
|
+
show: true,
|
|
36
|
+
title: 'Reset',
|
|
37
|
+
icon: 'image://data:image/gif;base64,R0lGODlhHgAeAKEAADKDyP///zKDyDKDyCH5BAEKAAIALAAAAAAeAB4AAAJChI+py+0Powm02irP3TRPfnkAJjZkuZxooq5a57Jw/AY00sY5lO+PjwKWhCKix5hBSpQRJm+2BFmKUueoCr1pt5ICADs=',
|
|
38
|
+
},
|
|
39
|
+
myZoomIn: {
|
|
40
|
+
show: true,
|
|
41
|
+
title: 'Zoom In',
|
|
42
|
+
icon: 'image://data:image/gif;base64,R0lGODlhHgAeAKEAADKDyP///zKDyDKDyCH5BAEKAAIALAAAAAAeAB4AAAJAhI+py+0PIww0yFnvq1Y37n1ZuICkYp5Iqhps+27cTNfdauc0qvcU79NpYiciyRhCepTDUcvlfDIvU0n1ic2GCgA7',
|
|
43
|
+
onclick: function (params) {
|
|
44
|
+
var _a;
|
|
45
|
+
var series = (_a = params === null || params === void 0 ? void 0 : params.option) === null || _a === void 0 ? void 0 : _a.series;
|
|
46
|
+
var zoom = series && series[0] ? series[0].zoom : 1;
|
|
47
|
+
setZoomLevel((zoom || 1) + 0.1);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
myZoomOut: {
|
|
51
|
+
show: true,
|
|
52
|
+
title: 'Zoom Out',
|
|
53
|
+
icon: 'image://data:image/gif;base64,R0lGODlhHgAeAKEAADKDyP///zKDyDKDyCH5BAEKAAIALAAAAAAeAB4AAAIohI+py+0Po5y02ouz3rz7PwXiSJbmqJzqmq4u2b4vSNf2jef6zvd1AQA7',
|
|
54
|
+
onclick: function (params) {
|
|
55
|
+
var _a;
|
|
56
|
+
var series = (_a = params === null || params === void 0 ? void 0 : params.option) === null || _a === void 0 ? void 0 : _a.series;
|
|
57
|
+
var zoom = series && series[0] ? series[0].zoom : 1;
|
|
58
|
+
setZoomLevel((zoom || 1) - 0.1);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
//https://echarts.apache.org/en/option.html#legend
|
|
64
|
+
series: {
|
|
65
|
+
type: 'graph',
|
|
66
|
+
roam: true,
|
|
67
|
+
zoom: zoomLevel,
|
|
68
|
+
label: {
|
|
69
|
+
show: true,
|
|
70
|
+
position: 'right',
|
|
71
|
+
backgroundColor: 'white',
|
|
72
|
+
},
|
|
73
|
+
symbol: 'circle',
|
|
74
|
+
emphasis: {
|
|
75
|
+
focus: 'adjacency'
|
|
76
|
+
},
|
|
77
|
+
//edgeSymbol: ['circle', 'circle'],
|
|
78
|
+
//edgeSymbolSize: [4, 4],
|
|
79
|
+
lineStyle: {
|
|
80
|
+
opacity: 0.9,
|
|
81
|
+
width: 2,
|
|
82
|
+
curveness: 0,
|
|
83
|
+
cap: 'square',
|
|
84
|
+
},
|
|
85
|
+
//https://echarts.apache.org/en/option.html#series-tree.data
|
|
86
|
+
data: dataAndLinks.data,
|
|
87
|
+
links: dataAndLinks.links,
|
|
88
|
+
top: '10%',
|
|
89
|
+
left: '5%',
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}, [dataAndLinks, zoomLevel]);
|
|
93
|
+
//TODO: import real data
|
|
94
|
+
//TODO: connections between nodes
|
|
95
|
+
//TODO: ZOOM IN AND OUT AND MOVE AROUND controls?
|
|
96
|
+
return (_jsx("div", { className: "w-full h-full min-h-[800px]", children: _jsx(ReactECharts, { option: chartDefinition }) }));
|
|
97
|
+
};
|
|
98
|
+
export default GraphView;
|
|
99
|
+
//# sourceMappingURL=GraphView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphView.js","sourceRoot":"","sources":["../../../../src/features/Dictionary/GraphView.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,YA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