@gen3/frontend 0.10.95 → 0.10.97
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 +1698 -587
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Content/LandingPageContent.d.ts +2 -1
- package/dist/dts/components/Content/LandingPageContent.d.ts.map +1 -1
- package/dist/dts/components/Content/LandingPageContent.js.map +1 -1
- package/dist/dts/components/Login/LoginPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js +1 -0
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/components/Login/types.d.ts +2 -1
- package/dist/dts/components/Login/types.d.ts.map +1 -1
- package/dist/dts/components/Login/types.js.map +1 -1
- package/dist/dts/components/MessageCards/index.d.ts +2 -1
- package/dist/dts/components/MessageCards/index.d.ts.map +1 -1
- package/dist/dts/components/MessageCards/index.js +2 -1
- package/dist/dts/components/MessageCards/index.js.map +1 -1
- package/dist/dts/components/Profile/types.d.ts +2 -1
- package/dist/dts/components/Profile/types.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.js +2 -0
- package/dist/dts/components/charts/Charts.js.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js +3 -2
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js.map +1 -1
- package/dist/dts/components/charts/types.d.ts +2 -0
- package/dist/dts/components/charts/types.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js.map +1 -1
- package/dist/dts/components/facets/FacetSelector.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetSelector.js +6 -6
- package/dist/dts/components/facets/FacetSelector.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +6 -6
- package/dist/dts/features/Analysis/types.d.ts +2 -1
- package/dist/dts/features/Analysis/types.d.ts.map +1 -1
- package/dist/dts/features/Analysis/types.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +1 -2
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +1 -1
- package/dist/dts/features/CohortBuilder/types.d.ts +2 -2
- package/dist/dts/features/CohortBuilder/types.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.js +18 -2
- package/dist/dts/features/CohortDiscovery/ActionButtons/ActionButtonGroup.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.js +10 -4
- package/dist/dts/features/CohortDiscovery/ActionButtons/SaveActionButton.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js +2 -2
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.js +8 -3
- package/dist/dts/features/CohortDiscovery/CohortDiscovery.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts +5 -2
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js +120 -44
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts +44 -0
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js +7 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSelectors.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts +3 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js +71 -24
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManagerSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +0 -2
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts +6 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js +55 -0
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -22
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js +40 -34
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -90
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.js +161 -92
- package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js +1 -1
- package/dist/dts/features/CohortDiscovery/FacetSelectionPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js +5 -3
- package/dist/dts/features/CohortDiscovery/FilterPanels/EnumFacetPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.js +8 -8
- package/dist/dts/features/CohortDiscovery/IndexPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts +14 -28
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.js +4 -4
- package/dist/dts/features/CohortDiscovery/RequestManagerSlice.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.js +4 -10
- package/dist/dts/features/CohortDiscovery/Requests/DataAccessRequestForm.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.js +2 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.js +76 -13
- package/dist/dts/features/CohortDiscovery/Requests/RequestsTable.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts +3 -3
- package/dist/dts/features/CohortDiscovery/Requests/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.d.ts +9 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.js +133 -0
- package/dist/dts/features/CohortDiscovery/Requests/submitCohortRequestAction.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js +25 -99
- package/dist/dts/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts +3 -2
- package/dist/dts/features/CohortDiscovery/TabbedIndex.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/TabbedIndex.js +2 -2
- package/dist/dts/features/CohortDiscovery/TabbedIndex.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.d.ts +2 -4
- package/dist/dts/features/CohortDiscovery/appApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.js +6 -4
- package/dist/dts/features/CohortDiscovery/appApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.js +7 -9
- package/dist/dts/features/CohortDiscovery/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/queryApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/queryApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/types.d.ts +47 -19
- package/dist/dts/features/CohortDiscovery/types.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/types.js +16 -6
- package/dist/dts/features/CohortDiscovery/types.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/utils.d.ts +2 -0
- package/dist/dts/features/CohortDiscovery/utils.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/utils.js +9 -0
- package/dist/dts/features/CohortDiscovery/utils.js.map +1 -1
- package/dist/dts/features/Crosswalk/types.d.ts +2 -1
- package/dist/dts/features/Crosswalk/types.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/types.d.ts +5 -1
- package/dist/dts/features/Dictionary/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/types.d.ts +2 -1
- package/dist/dts/features/Discovery/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/types.js.map +1 -1
- package/dist/dts/features/Navigation/TopBar/AccountButton.js +1 -1
- package/dist/dts/features/Navigation/TopBar/AccountButton.js.map +1 -1
- package/dist/dts/features/Navigation/TopBar/LoginButton.js +1 -1
- package/dist/dts/features/Navigation/TopBar/LoginButton.js.map +1 -1
- package/dist/dts/features/Workspace/types.d.ts +2 -1
- package/dist/dts/features/Workspace/types.d.ts.map +1 -1
- package/dist/dts/features/Workspace/types.js.map +1 -1
- package/dist/dts/lib/content/types.d.ts +2 -0
- package/dist/dts/lib/content/types.d.ts.map +1 -1
- package/dist/dts/lib/session/session.d.ts.map +1 -1
- package/dist/dts/lib/session/session.js +6 -2
- package/dist/dts/lib/session/session.js.map +1 -1
- package/dist/dts/pages/Crosswalk/Crosswalk.d.ts.map +1 -1
- package/dist/dts/pages/Crosswalk/Crosswalk.js +1 -5
- package/dist/dts/pages/Crosswalk/Crosswalk.js.map +1 -1
- package/dist/dts/pages/DataDictionary/DataDictionary.d.ts.map +1 -1
- package/dist/dts/pages/DataDictionary/DataDictionary.js +12 -5
- package/dist/dts/pages/DataDictionary/DataDictionary.js.map +1 -1
- package/dist/dts/pages/Discovery/Discovery.d.ts.map +1 -1
- package/dist/dts/pages/Discovery/Discovery.js +14 -5
- package/dist/dts/pages/Discovery/Discovery.js.map +1 -1
- package/dist/dts/pages/Explorer/Explorer.d.ts +1 -1
- package/dist/dts/pages/Explorer/Explorer.d.ts.map +1 -1
- package/dist/dts/pages/Explorer/Explorer.js +13 -6
- package/dist/dts/pages/Explorer/Explorer.js.map +1 -1
- package/dist/dts/pages/Explorer/data.d.ts.map +1 -1
- package/dist/dts/pages/Explorer/data.js +4 -4
- package/dist/dts/pages/Explorer/data.js.map +1 -1
- package/dist/dts/pages/Landing/Landing.d.ts.map +1 -1
- package/dist/dts/pages/Landing/Landing.js +12 -5
- package/dist/dts/pages/Landing/Landing.js.map +1 -1
- package/dist/dts/pages/Login/Login.d.ts.map +1 -1
- package/dist/dts/pages/Login/Login.js +1 -5
- package/dist/dts/pages/Login/Login.js.map +1 -1
- package/dist/dts/pages/Profile/Profile.d.ts.map +1 -1
- package/dist/dts/pages/Profile/Profile.js +12 -5
- package/dist/dts/pages/Profile/Profile.js.map +1 -1
- package/dist/dts/pages/Query/Query.d.ts.map +1 -1
- package/dist/dts/pages/Query/Query.js +12 -5
- package/dist/dts/pages/Query/Query.js.map +1 -1
- package/dist/dts/pages/Query/types.d.ts +2 -1
- package/dist/dts/pages/Query/types.d.ts.map +1 -1
- package/dist/dts/pages/Workspace/Workspace.d.ts.map +1 -1
- package/dist/dts/pages/Workspace/Workspace.js +14 -5
- package/dist/dts/pages/Workspace/Workspace.js.map +1 -1
- package/dist/dts/types/icons.d.ts +3 -2
- package/dist/dts/types/icons.d.ts.map +1 -1
- package/dist/dts/types/icons.js +3 -2
- package/dist/dts/types/icons.js.map +1 -1
- package/dist/dts/utils/index.d.ts +2 -3
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/index.js +2 -2
- package/dist/dts/utils/index.js.map +1 -1
- package/dist/dts/utils/tests/values.test.js +0 -1
- package/dist/dts/utils/tests/values.test.js.map +1 -1
- package/dist/esm/index.js +1710 -600
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +186 -172
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestManagerSlice.js","sourceRoot":"","sources":["../../../../src/features/CohortDiscovery/RequestManagerSlice.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,mBAAmB,EAEnB,WAAW,EAEX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,oBAAoB,GACrB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RequestManagerSlice.js","sourceRoot":"","sources":["../../../../src/features/CohortDiscovery/RequestManagerSlice.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,mBAAmB,EAEnB,WAAW,EAEX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,4BAA4B;AAC5B,MAAM,CAAC,IAAM,yBAAyB,GAAG,mBAAmB,CAG1D;IACA,mCAAmC;IACnC,QAAQ,EAAE,UAAC,OAA0B,IAAK,OAAA,OAAO,CAAC,EAAE,EAAV,CAAU;IACpD,+DAA+D;IAC/D,YAAY,EAAE,UAAC,CAAC,EAAE,CAAC;QACjB,OAAA,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;YACrC,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IADrC,CACqC;CACxC,CAAC,CAAC;AASH,+BAA+B;AAC/B,MAAM,CAAC,IAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,IAAI,EAAE,oBAAoB;IAC1B,YAAY,EAAE,yBAAyB,CAAC,eAAe,EAAE;IACzD,QAAQ,EAAE;QACR,oBAAoB,EAAE,UAAC,KAAK,EAAE,MAAwC;YAC9D,IAAA,KASF,MAAM,CAAC,OAAO,EARhB,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,YAAY,kBAAA,EACZ,eAAe,qBAAA,EACf,eAAe,qBACC,CAAC;YAEnB,IAAM,kBAAkB,GAAG,oBAAoB,CAC7C,EAAE,EACF,MAAM,EACN,EAAE,IAAI,MAAA,EAAE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AAK,MAAM,EAAzB,CAAyB,CACvC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,uBAAuB,GAAG,cAAc,CACnD,CAAC,2BAA2B,CAAC,EAC7B,UAAC,QAAQ;IACP,OAAO,QAAQ,CAAC,MAAM,CAA2B,UAAC,GAAG,EAAE,OAAO;QAC5D,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CACF,CAAC;AAEF,iBAAiB;AACjB,MAAM,CAAC,IAAM,yBAAyB,GAAG,uBAAuB,CAAC,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataAccessRequestForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/DataAccessRequestForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataAccessRequestForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/DataAccessRequestForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,gCAAgC,KACrC,IAAI,CAAC;IACV,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAqFvE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -47,26 +47,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import { useState } from 'react';
|
|
50
|
-
import {
|
|
51
|
-
import { useForm, isNotEmpty, isEmail
|
|
50
|
+
import { TextInput, Button, Group, Box, Title, Text, Paper, Divider, Stack, } from '@mantine/core';
|
|
51
|
+
import { useForm, isNotEmpty, isEmail } from '@mantine/form';
|
|
52
52
|
export var DataAccessRequestForm = function (_a) {
|
|
53
53
|
var cohortId = _a.cohortId, submitFunction = _a.submitFunction, close = _a.close;
|
|
54
54
|
var _b = useState(false), submitted = _b[0], setSubmitted = _b[1];
|
|
55
55
|
var form = useForm({
|
|
56
56
|
initialValues: {
|
|
57
57
|
name: '',
|
|
58
|
-
|
|
59
|
-
department: '',
|
|
60
|
-
address: '',
|
|
58
|
+
organization: '',
|
|
61
59
|
email: '',
|
|
62
|
-
phone: '',
|
|
63
60
|
},
|
|
64
61
|
validate: {
|
|
65
62
|
name: isNotEmpty('Name is required'),
|
|
66
|
-
institution: isNotEmpty('Institution is required'),
|
|
67
|
-
address: isNotEmpty('Address is required'),
|
|
68
63
|
email: isEmail('Please provide a valid email'),
|
|
69
|
-
phone: matches(/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/, 'Please provide a valid phone number'),
|
|
70
64
|
},
|
|
71
65
|
});
|
|
72
66
|
var handleSubmit = function (values) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -79,7 +73,7 @@ export var DataAccessRequestForm = function (_a) {
|
|
|
79
73
|
if (submitted) {
|
|
80
74
|
return (_jsxs(Paper, { shadow: "md", p: "xl", radius: "md", children: [_jsx(Title, { order: 2, mb: "md", ta: "center", children: "Request Submitted" }), _jsx(Text, { ta: "center", children: "Thank you for your data access request. We will review your submission and contact you shortly." }), _jsx(Group, { justify: "center", mt: "xl", children: _jsx(Button, { onClick: function () { return close(); }, children: "Dismiss" }) })] }));
|
|
81
75
|
}
|
|
82
|
-
return (_jsxs(Paper, { radius: "md", children: [_jsx(Text, { c: "dimmed", mb: "lg", children: "Please complete all fields to request access to our research data." }), _jsx(Divider, { mb: "lg" }), _jsx(Box, { component: "form", onSubmit: form.onSubmit(handleSubmit), children: _jsxs(Stack, { gap: "md", children: [_jsx(TextInput, __assign({ label: "Full Name", placeholder: "John Doe", withAsterisk: true }, form.getInputProps('name'))), _jsx(TextInput, __assign({ label: "
|
|
76
|
+
return (_jsxs(Paper, { radius: "md", children: [_jsx(Text, { c: "dimmed", mb: "lg", children: "Please complete all fields to request access to our research data." }), _jsx(Divider, { mb: "lg" }), _jsx(Box, { component: "form", onSubmit: form.onSubmit(handleSubmit), children: _jsxs(Stack, { gap: "md", children: [_jsx(TextInput, __assign({ label: "Full Name", placeholder: "John Doe", withAsterisk: true }, form.getInputProps('name'))), _jsx(TextInput, __assign({ label: "Organization", placeholder: "University, Organization, or Company", withAsterisk: true }, form.getInputProps('organization'))), _jsx(TextInput, __assign({ label: "Email", placeholder: "your.email@institution.edu", withAsterisk: true }, form.getInputProps('email'))), _jsxs(Group, { justify: "flex-end", children: [_jsx(Button, { type: "reset", variant: "outline", onClick: function () { return form.reset(); }, children: "Reset" }), _jsx(Button, { variant: "outline", onClick: function () { return close(); }, children: submitted ? 'Close' : 'Cancel' }), !submitted && _jsx(Button, { type: "submit", children: "Submit Request" })] })] }) })] }));
|
|
83
77
|
};
|
|
84
78
|
export default DataAccessRequestForm;
|
|
85
79
|
//# sourceMappingURL=DataAccessRequestForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataAccessRequestForm.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/DataAccessRequestForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"DataAccessRequestForm.js","sourceRoot":"","sources":["../../../../../src/features/CohortDi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AAS,IAAI,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,+BAAwB,IACtD,IACF,GACJ,IACA,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsPanel.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa,+CAUlB,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Group, Stack } from '@mantine/core';
|
|
3
3
|
import RequestsTable from '../Requests/RequestsTable';
|
|
4
|
+
import ProtectedContent from '../../../components/Protected/ProtectedContent';
|
|
4
5
|
var RequestsPanel = function () {
|
|
5
|
-
return (_jsx(Stack, { className: "w-100 m-2", children: _jsx(Group, { className: "w-100 bg-base-light p-4", children: _jsx(RequestsTable, {}) }) }));
|
|
6
|
+
return (_jsx(ProtectedContent, { children: _jsx(Stack, { className: "w-100 m-2", children: _jsx(Group, { className: "w-100 bg-base-light p-4", children: _jsx(RequestsTable, {}) }) }) }));
|
|
6
7
|
};
|
|
7
8
|
export default RequestsPanel;
|
|
8
9
|
//# sourceMappingURL=RequestsPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestsPanel.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsPanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,aAAa,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"RequestsPanel.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsPanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAE9E,IAAM,aAAa,GAAG;IACpB,OAAO,CACL,KAAC,gBAAgB,cACf,KAAC,KAAK,IAAC,SAAS,EAAC,WAAW,YAC1B,KAAC,KAAK,IAAC,SAAS,EAAC,yBAAyB,YACxC,KAAC,aAAa,KAAG,GACX,GACF,GACS,CACpB,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestsTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestsTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsTable.tsx"],"names":[],"mappings":"AA8HA,QAAA,MAAM,aAAa,+CAqElB,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -10,17 +10,74 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { useMemo } from 'react';
|
|
13
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
14
14
|
import { MantineReactTable, useMantineReactTable, } from 'mantine-react-table';
|
|
15
|
-
import {
|
|
15
|
+
import { useUserRequestQuery } from '@gen3/core';
|
|
16
|
+
import { selectCohortIdToNameMap } from '../CohortManagment/CohortManagerSelectors';
|
|
16
17
|
import { selectAllDataAccessRequests } from '../RequestManagerSlice';
|
|
17
18
|
import { useAppSelector } from '../appApi';
|
|
18
|
-
import { useDeepCompareMemo } from 'use-deep-compare';
|
|
19
19
|
import { Text } from '@mantine/core';
|
|
20
20
|
import { formatDate } from '../../../utils/date';
|
|
21
21
|
import { commonTableSettings } from '../tableSettings';
|
|
22
|
+
import { ErrorCard } from '../../../components/MessageCards';
|
|
23
|
+
import { EmptyTableMessage } from '../../../components/MessageCards';
|
|
24
|
+
var useGetCohortRequests = function (resources) {
|
|
25
|
+
if (resources === void 0) { resources = []; }
|
|
26
|
+
var _a = useState(false), isLoading = _a[0], setIsLoading = _a[1];
|
|
27
|
+
var _b = useState([]), cohortRequests = _b[0], setCohortRequests = _b[1];
|
|
28
|
+
var localRequests = useAppSelector(selectAllDataAccessRequests);
|
|
29
|
+
var _c = useUserRequestQuery({ resource_ids: resources }), submittedRequests = _c.data, isFetching = _c.isFetching, isError = _c.isError, error = _c.error;
|
|
30
|
+
var cohortIdToNameMap = useAppSelector(selectCohortIdToNameMap);
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
// Return early if we're still fetching data
|
|
33
|
+
if (isFetching) {
|
|
34
|
+
setIsLoading(true);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Once data is available, merge local and remote requests
|
|
38
|
+
if (submittedRequests) {
|
|
39
|
+
// Create a map of local requests by ID
|
|
40
|
+
var localRequestsMap_1 = localRequests.reduce(function (acc, localRequest) {
|
|
41
|
+
acc[localRequest.id] = localRequest;
|
|
42
|
+
return acc;
|
|
43
|
+
}, {});
|
|
44
|
+
// Add cohort names to the requests
|
|
45
|
+
var requestsWithCohorts = submittedRequests.reduce(function (acc, request) {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
+
if (request.request_id &&
|
|
48
|
+
Object.hasOwn(localRequestsMap_1, request.request_id)) {
|
|
49
|
+
var localRequest = localRequestsMap_1[request.request_id];
|
|
50
|
+
acc.push(__assign(__assign({}, localRequest), { cohortName: (_a = cohortIdToNameMap[localRequest.cohortId]) !== null && _a !== void 0 ? _a : 'Not Found', status: ((_b = request === null || request === void 0 ? void 0 : request.status) !== null && _b !== void 0 ? _b : 'unknown'), updatedDatetime: (_c = request.created_time) !== null && _c !== void 0 ? _c : localRequest.updatedDatetime, createdDatetime: (_d = request.updated_time) !== null && _d !== void 0 ? _d : localRequest.createdDatetime }));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
acc.push(__assign(__assign({}, request), { cohortId: 'Not Set', email: (_e = request.username) !== null && _e !== void 0 ? _e : 'Not Set', name: 'Not Set', organization: 'Not Set', id: (_f = request.request_id) !== null && _f !== void 0 ? _f : 'Not Set', cohortName: 'Not Found', status: ((_g = request === null || request === void 0 ? void 0 : request.status) !== null && _g !== void 0 ? _g : 'unknown'), updatedDatetime: (_h = request.created_time) !== null && _h !== void 0 ? _h : 'Not Set', createdDatetime: (_j = request.updated_time) !== null && _j !== void 0 ? _j : ' Not Set' }));
|
|
54
|
+
}
|
|
55
|
+
return acc;
|
|
56
|
+
}, []);
|
|
57
|
+
setCohortRequests(requestsWithCohorts);
|
|
58
|
+
}
|
|
59
|
+
else if (isError) {
|
|
60
|
+
// If there's an error fetching remote data, use local requests
|
|
61
|
+
var localRequestsWithCohorts = localRequests.map(function (request) { return (__assign(__assign({}, request), { cohortName: request.id ? cohortIdToNameMap[request.id] : 'Unknown' })); });
|
|
62
|
+
setCohortRequests(localRequestsWithCohorts);
|
|
63
|
+
}
|
|
64
|
+
setIsLoading(false);
|
|
65
|
+
}, [
|
|
66
|
+
submittedRequests,
|
|
67
|
+
localRequests,
|
|
68
|
+
isFetching,
|
|
69
|
+
isError,
|
|
70
|
+
cohortIdToNameMap,
|
|
71
|
+
]);
|
|
72
|
+
return {
|
|
73
|
+
cohortRequests: cohortRequests,
|
|
74
|
+
isLoading: isLoading || isFetching,
|
|
75
|
+
isError: isError,
|
|
76
|
+
error: error,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
22
79
|
var RequestsTable = function () {
|
|
23
|
-
var
|
|
80
|
+
var _a = useGetCohortRequests(undefined), cohortRequests = _a.cohortRequests, isLoading = _a.isLoading, isError = _a.isError;
|
|
24
81
|
var columns = useMemo(function () { return [
|
|
25
82
|
{
|
|
26
83
|
accessorKey: 'cohortName',
|
|
@@ -31,13 +88,21 @@ var RequestsTable = function () {
|
|
|
31
88
|
},
|
|
32
89
|
},
|
|
33
90
|
{
|
|
34
|
-
accessorKey: '
|
|
91
|
+
accessorKey: 'createdDatetime',
|
|
35
92
|
header: 'Request Date',
|
|
36
93
|
Cell: function (_a) {
|
|
37
94
|
var cell = _a.cell;
|
|
38
95
|
return (_jsxs(Text, { children: [formatDate(cell.getValue()), " "] }));
|
|
39
96
|
},
|
|
40
97
|
},
|
|
98
|
+
{
|
|
99
|
+
accessorKey: 'updatedDatetime',
|
|
100
|
+
header: 'Last Update',
|
|
101
|
+
Cell: function (_a) {
|
|
102
|
+
var cell = _a.cell;
|
|
103
|
+
return (_jsxs(Text, { children: [formatDate(cell.getValue()), " "] }));
|
|
104
|
+
},
|
|
105
|
+
},
|
|
41
106
|
{
|
|
42
107
|
accessorKey: 'status', //normal accessorKey
|
|
43
108
|
header: 'Status',
|
|
@@ -52,15 +117,13 @@ var RequestsTable = function () {
|
|
|
52
117
|
},
|
|
53
118
|
},
|
|
54
119
|
]; }, []);
|
|
55
|
-
var cohortIdToNameMap = useAppSelector(selectCohortIdToNameMap);
|
|
56
|
-
var requestsWithCohorts = useDeepCompareMemo(function () {
|
|
57
|
-
return requests.map(function (request) {
|
|
58
|
-
return __assign(__assign({}, request), { cohortName: (cohortIdToNameMap[request.cohortId] ||
|
|
59
|
-
'Unknown') });
|
|
60
|
-
});
|
|
61
|
-
}, [requests, cohortIdToNameMap]);
|
|
62
120
|
var size = 'sm';
|
|
63
|
-
var table = useMantineReactTable(__assign({ columns: columns, data:
|
|
121
|
+
var table = useMantineReactTable(__assign(__assign({ columns: columns, data: cohortRequests !== null && cohortRequests !== void 0 ? cohortRequests : [], renderEmptyRowsFallback: function () { return (_jsx(EmptyTableMessage, { message: 'No requests submitted.' })); } }, commonTableSettings(size)), { state: {
|
|
122
|
+
isLoading: isLoading,
|
|
123
|
+
} }));
|
|
124
|
+
if (isError) {
|
|
125
|
+
return (_jsx("div", { className: "w-full mt-24 flex flex-col items-center justify-center", children: _jsx(ErrorCard, { message: "Error retrieving user request" }) }));
|
|
126
|
+
}
|
|
64
127
|
return (_jsx("div", { className: "inline-block overflow-x-scroll w-full", children: _jsx(MantineReactTable, { table: table }) }));
|
|
65
128
|
};
|
|
66
129
|
export default RequestsTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestsTable.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RequestsTable.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/RequestsTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,IAA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I,CAAC,QAAQ,EAAU,SAAS,CACxC;YAFqC,CAErC;YACD,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,aAAa,EAAE,WAAW;iBAC3B;aACF;SACF;KACF,EAlCK,CAkCL,EACD,EAAE,CACH,CAAC;IAEF,IAAM,IAAI,GAAG,IAAI,CAAC;IAClB,IAAM,KAAK,GAAG,oBAAoB,qBAChC,OAAO,SAAA,EACP,IAAI,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,EAAE,EAC1B,uBAAuB,EAAE,cAAM,OAAA,CAC7B,KAAC,iBAAiB,IAAC,OAAO,EAAE,wBAAwB,GAAI,CACzD,EAF8B,CAE9B,IACE,mBAAmB,CAAoB,IAAI,CAAC,KAC/C,KAAK,EAAE;YACL,SAAS,EAAE,SAAS;SACrB,IACD,CAAC;IAEH,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,cAAK,SAAS,EAAC,wDAAwD,YACrE,KAAC,SAAS,IAAC,OAAO,EAAE,+BAA+B,GAAI,GACnD,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,uCAAuC,YACpD,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,GAC/B,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { IndexedFilterSet, useLazyGetAggsNoFilterSelfQuery } from '@gen3/core';
|
|
|
3
3
|
export declare class QueryAllIndexedError extends Error {
|
|
4
4
|
constructor(message: string);
|
|
5
5
|
}
|
|
6
|
-
type
|
|
7
|
-
type
|
|
6
|
+
type LazyQueryGQLAggsHookResult = ReturnType<typeof useLazyGetAggsNoFilterSelfQuery>;
|
|
7
|
+
export type QueryGQLAggsrFunctionType = LazyQueryGQLAggsHookResult[0];
|
|
8
8
|
/**
|
|
9
9
|
* Queries all resources based on the provided filters and resource fields, executing an aggregation query for each resource type.
|
|
10
10
|
*
|
|
@@ -17,6 +17,6 @@ type TriggerFunctionType = LazyQueryHookResult[0];
|
|
|
17
17
|
* @returns {Promise<string[]>} A promise that resolves to an array of resource paths for all queried and processed resources.
|
|
18
18
|
* @throws {QueryAllIndexedError} Throws an error if the query operation fails or an unknown error occurs during execution.
|
|
19
19
|
*/
|
|
20
|
-
export declare const queryAllResources: (filters: IndexedFilterSet, resourceFields: IndexResourceField, triggerAggsQuery:
|
|
20
|
+
export declare const queryAllResources: (filters: IndexedFilterSet, resourceFields: IndexResourceField, triggerAggsQuery: QueryGQLAggsrFunctionType, excludeList?: string[]) => Promise<string[]>;
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAEL,gBAAgB,EAChB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AAQpB,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAGD,KAAK,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAEL,gBAAgB,EAChB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AAQpB,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAGD,KAAK,0BAA0B,GAAG,UAAU,CAC1C,OAAO,+BAA+B,CACvC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,gBAAgB,EACzB,gBAAgB,kBAAkB,EAClC,kBAAkB,yBAAyB,EAC3C,sBAA6B,sBAoD9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACL,aAAa,GAGd,MAAM,YAAY,CAAC;AAQpB;IAA0C,wCAAK;IAC7C,8BAAY,OAAe;QACzB,YAAA,MAAK,YAAC,OAAO,CAAC,SAAC;QACf,KAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;;IACrC,CAAC;IACH,2BAAC;AAAD,CAAC,AALD,CAA0C,KAAK,GAK9C;;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACL,aAAa,GAGd,MAAM,YAAY,CAAC;AAQpB;IAA0C,wCAAK;IAC7C,8BAAY,OAAe;QACzB,YAAA,MAAK,YAAC,OAAO,CAAC,SAAC;QACf,KAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;;IACrC,CAAC;IACH,2BAAC;AAAD,CAAC,AALD,CAA0C,KAAK,GAK9C;;AASD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG;;;;;+HAC/B,OAAyB,EACzB,cAAkC,EAClC,gBAA2C,EAC3C,WAA6B;;QAA7B,4BAAA,EAAA,eAAe,EAAE,EAAE,SAAS,CAAC;;;;;oBAGrB,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CACjD,UAAC,EAAoB;4BAAnB,KAAK,QAAA,EAAE,WAAW,QAAA;wBAClB,OAAA,gBAAg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Af,KAAK,QAAA,EAAE,OAAO,QAAA;4BAC7B,IAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC;4BACxD,IAAI,YAAY,EAAE,CAAC;gCACjB,GAAG,CAAC,IAAI,OAAR,GAAG,EAAS,OAAO,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,UAAG,YAAY,cAAI,CAAC,CAAE,EAAtB,CAAsB,CAAC,EAAE;4BAC1D,CAAC;iCAAM,CAAC;gCACN,GAAG,CAAC,IAAI,OAAR,GAAG,EAAS,OAAO,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,WAAI,CAAC,CAAE,EAAP,CAAO,CAAC,EAAE;4BAC3C,CAAC;4BACD,OAAO,GAAG,CAAC;wBACb,CAAC,EACD,EAAE,CACH,EAAC;;;oBAEF,IAAI,OAAK,YAAY,KAAK,EAAE,CAAC;wBAC3B,MAAM,IAAI,oBAAoB,CAAC,OAAK,CAAC,OAAO,CAAC,CAAC;oBAChD,CAAC;yBAAM,CAAC;wBACN,MAAM,IAAI,oBAAoB,CAAC,eAAe,CAAC,CAAC;oBAClD,CAAC;;;;;;CAEJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UserProfile, useCreateRequestMutation } from '@gen3/core';
|
|
2
|
+
import { Cohort, IndexResourceField, DataAccessRequestUserInformation, SupportServiceConfiguration } from '../types';
|
|
3
|
+
import { QueryGQLAggsrFunctionType } from './hooks';
|
|
4
|
+
import { useAppDispatch } from '../appApi';
|
|
5
|
+
type RequestMutationHookResult = ReturnType<typeof useCreateRequestMutation>;
|
|
6
|
+
export type RequestMutationTriggerFunctionType = RequestMutationHookResult[0];
|
|
7
|
+
export declare const submitCohortRequestAction: (cohort: Cohort, values: DataAccessRequestUserInformation, user: Partial<UserProfile>, indexResources: IndexResourceField, remoteSupportService: SupportServiceConfiguration, appDispatch: ReturnType<typeof useAppDispatch>, getAggs: QueryGQLAggsrFunctionType, createRequestQuery: RequestMutationTriggerFunctionType) => Promise<void>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=submitCohortRequestAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitCohortRequestAction.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/submitCohortRequestAction.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAEhB,wBAAwB,EAGzB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,gCAAgC,EAChC,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAGL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,MAAM,MAAM,kCAAkC,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAC;AAO9E,eAAO,MAAM,yBAAyB,GACpC,QAAQ,MAAM,EACd,QAAQ,gCAAgC,EACxC,MAAM,OAAO,CAAC,WAAW,CAAC,EAC1B,gBAAgB,kBAAkB,EAClC,sBAAsB,2BAA2B,EACjD,aAAa,UAAU,CAAC,OAAO,cAAc,CAAC,EAC9C,SAAS,yBAAyB,EAClC,oBAAoB,kCAAkC,kBA4FvD,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { notifications } from '@mantine/notifications';
|
|
38
|
+
import { MissingServiceConfigurationError, isHttpStatusError, getRemoteSupportServiceRegistry, } from '@gen3/core';
|
|
39
|
+
import { addDataAccessRequest } from '../RequestManagerSlice';
|
|
40
|
+
import { queryAllResources, QueryAllIndexedError, } from './hooks';
|
|
41
|
+
var REQUESTOR_HTTP_ERROR_MESSAGES = {
|
|
42
|
+
401: 'You are not authorized to request access to this data. Please contact the site administrator.',
|
|
43
|
+
403: 'You do not have the correct permissions to request this resource. Please contact the site administrator.',
|
|
44
|
+
};
|
|
45
|
+
export var submitCohortRequestAction = function (cohort, values, user, indexResources, remoteSupportService, appDispatch, getAggs, createRequestQuery) { return __awaiter(void 0, void 0, void 0, function () {
|
|
46
|
+
var resources, request, zendeskRequestAction, error_1, httpError;
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
|
+
return __generator(this, function (_e) {
|
|
49
|
+
switch (_e.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!(cohort && values)) return [3 /*break*/, 6];
|
|
52
|
+
_e.label = 1;
|
|
53
|
+
case 1:
|
|
54
|
+
_e.trys.push([1, 5, , 6]);
|
|
55
|
+
return [4 /*yield*/, queryAllResources(cohort.filters, indexResources, getAggs)];
|
|
56
|
+
case 2:
|
|
57
|
+
resources = _e.sent();
|
|
58
|
+
return [4 /*yield*/, createRequestQuery({
|
|
59
|
+
resource_paths: resources,
|
|
60
|
+
}).unwrap()];
|
|
61
|
+
case 3:
|
|
62
|
+
request = _e.sent();
|
|
63
|
+
zendeskRequestAction = getRemoteSupportServiceRegistry().getSupportService(remoteSupportService.service);
|
|
64
|
+
return [4 /*yield*/, zendeskRequestAction({
|
|
65
|
+
subject: "Request for access to ".concat(cohort.name),
|
|
66
|
+
fullName: "".concat(values.name),
|
|
67
|
+
email: "".concat(values.email),
|
|
68
|
+
contents: "Requestor: ".concat(values.name, " (").concat(values.email, ")") +
|
|
69
|
+
"\n\nCohort: ".concat(cohort.name) +
|
|
70
|
+
"\n\nResources: ".concat(resources.join(', ')) +
|
|
71
|
+
"\n\nRequestor ID: ".concat((user === null || user === void 0 ? void 0 : user.username) || 'unknown') +
|
|
72
|
+
"\n\nRequest ID: ".concat(request.request_id) +
|
|
73
|
+
"\n\nRequest URL: ".concat(window.location.href) +
|
|
74
|
+
"\n\nRequestor Email: ".concat(values.email) +
|
|
75
|
+
"\n\nRequestor Name: ".concat(values.name) +
|
|
76
|
+
"\n\nRequestor Organization: ".concat(values.organization),
|
|
77
|
+
}, remoteSupportService.configuration)];
|
|
78
|
+
case 4:
|
|
79
|
+
_e.sent();
|
|
80
|
+
// update the request store
|
|
81
|
+
appDispatch(addDataAccessRequest({
|
|
82
|
+
cohortId: cohort.id,
|
|
83
|
+
id: (_a = request.request_id) !== null && _a !== void 0 ? _a : 'unknown',
|
|
84
|
+
name: values.name,
|
|
85
|
+
email: values.email,
|
|
86
|
+
status: (_b = request.status) !== null && _b !== void 0 ? _b : 'unknown',
|
|
87
|
+
organization: values.organization,
|
|
88
|
+
createdDatetime: (_c = request.created_time) !== null && _c !== void 0 ? _c : 'unknown',
|
|
89
|
+
updatedDatetime: (_d = request.updated_time) !== null && _d !== void 0 ? _d : 'unknown',
|
|
90
|
+
}));
|
|
91
|
+
// Close the modal after a successful dispatch
|
|
92
|
+
close();
|
|
93
|
+
return [3 /*break*/, 6];
|
|
94
|
+
case 5:
|
|
95
|
+
error_1 = _e.sent();
|
|
96
|
+
if (error_1 instanceof QueryAllIndexedError) {
|
|
97
|
+
notifications.show({
|
|
98
|
+
title: 'Request Cohort',
|
|
99
|
+
message: "Error while getting resources for cohort: ".concat(error_1.message),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else if (isHttpStatusError(error_1)) {
|
|
103
|
+
httpError = error_1;
|
|
104
|
+
notifications.show({
|
|
105
|
+
title: 'Request Cohort',
|
|
106
|
+
message: REQUESTOR_HTTP_ERROR_MESSAGES[httpError.status] ||
|
|
107
|
+
"Error while submitting resource request for cohorts",
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else if (error_1 instanceof MissingServiceConfigurationError) {
|
|
111
|
+
notifications.show({
|
|
112
|
+
title: 'Request Cohort',
|
|
113
|
+
message: "Error while submitting resource request for cohorts: ".concat(error_1.message),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else if (error_1 instanceof Error) {
|
|
117
|
+
notifications.show({
|
|
118
|
+
title: 'Request Cohort',
|
|
119
|
+
message: "Error while submitting resource request for cohorts: ".concat(error_1.message),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
notifications.show({
|
|
124
|
+
title: 'Request Cohort',
|
|
125
|
+
message: 'Unknown error while submitting resource request for cohorts',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return [3 /*break*/, 6];
|
|
129
|
+
case 6: return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}); };
|
|
133
|
+
//# sourceMappingURL=submitCohortRequestAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submitCohortRequestAction.js","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/Requests/submitCohortRequestAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAGL,gCAAgC,EAEhC,iBAAiB,EACjB,+BAA+B,GAChC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GAErB,MAAM,SAAS,CAAC;AAQjB,IAAM,6BAA6B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AAY,KAAK,EAAE,CAAC;oBAClC,aAAa,CAAC,IAAI,CAAC;wBACjB,KAAK,EAAE,gBAAgB;wBACvB,OAAO,EAAE,+DAAwD,OAAK,CAAC,OAAO,CAAE;qBACjF,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,aAAa,CAAC,IAAI,CAAC;wBACjB,KAAK,EAAE,gBAAgB;wBACvB,OAAO,EACL,6DAA6D;qBAChE,CAAC,CAAC;gBACL,CAAC;;;;;KAGN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCohortsTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SavedCohortsTable.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/SavedCohorts/SavedCohortsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAoBvC,OAAO,EAGL,kBAAkB,EAElB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAiBlB,UAAU,sBAAsB;IAC9B,cAAc,EAAE,kBAAkB,CAAC;IACnC,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkLvD,CAAC;AACF,eAAe,iBAAiB,CAAC"}
|