@finos/legend-application-marketplace 0.2.13 → 0.2.15
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/lib/__lib__/LegendMarketplaceNavigation.d.ts +2 -0
- package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceNavigation.js +4 -0
- package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
- package/lib/application/LegendMarketplaceApplicationConfig.d.ts +9 -0
- package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceApplicationConfig.js +40 -22
- package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
- package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceWebApplication.js +4 -1
- package/lib/application/LegendMarketplaceWebApplication.js.map +1 -1
- package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.d.ts.map +1 -1
- package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js +7 -0
- package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js.map +1 -1
- package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.d.ts +21 -0
- package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.d.ts.map +1 -0
- package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.js +29 -0
- package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/pages/Agents/LegendMarketplaceAgents.d.ts.map +1 -1
- package/lib/pages/Agents/LegendMarketplaceAgents.js +49 -17
- package/lib/pages/Agents/LegendMarketplaceAgents.js.map +1 -1
- package/lib/pages/Agents/MarketplaceAIChatView.d.ts +21 -0
- package/lib/pages/Agents/MarketplaceAIChatView.d.ts.map +1 -0
- package/lib/pages/Agents/MarketplaceAIChatView.js +141 -0
- package/lib/pages/Agents/MarketplaceAIChatView.js.map +1 -0
- package/lib/pages/Agents/MarketplaceAIInputBar.d.ts +22 -0
- package/lib/pages/Agents/MarketplaceAIInputBar.d.ts.map +1 -0
- package/lib/pages/Agents/MarketplaceAIInputBar.js +40 -0
- package/lib/pages/Agents/MarketplaceAIInputBar.js.map +1 -0
- package/lib/pages/Agents/MarketplaceAIProductAutosuggest.d.ts +25 -0
- package/lib/pages/Agents/MarketplaceAIProductAutosuggest.d.ts.map +1 -0
- package/lib/pages/Agents/MarketplaceAIProductAutosuggest.js +86 -0
- package/lib/pages/Agents/MarketplaceAIProductAutosuggest.js.map +1 -0
- package/lib/pages/Agents/MarketplaceAIProductCards.d.ts +23 -0
- package/lib/pages/Agents/MarketplaceAIProductCards.d.ts.map +1 -0
- package/lib/pages/Agents/MarketplaceAIProductCards.js +20 -0
- package/lib/pages/Agents/MarketplaceAIProductCards.js.map +1 -0
- package/lib/pages/Agents/MarketplaceAIScopeSelector.d.ts +19 -0
- package/lib/pages/Agents/MarketplaceAIScopeSelector.d.ts.map +1 -0
- package/lib/pages/Agents/MarketplaceAIScopeSelector.js +46 -0
- package/lib/pages/Agents/MarketplaceAIScopeSelector.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js +74 -63
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js +85 -69
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js +7 -11
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.d.ts +17 -0
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js +126 -0
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js +23 -65
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.d.ts +29 -0
- package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.js +60 -0
- package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.js.map +1 -0
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js +3 -8
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js.map +1 -1
- package/lib/stores/LegendMarketplaceBaseStore.d.ts +2 -1
- package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendMarketplaceBaseStore.js +8 -1
- package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
- package/lib/stores/ai/LegendMarketplaceAIChatStore.d.ts +109 -0
- package/lib/stores/ai/LegendMarketplaceAIChatStore.d.ts.map +1 -0
- package/lib/stores/ai/LegendMarketplaceAIChatStore.js +1106 -0
- package/lib/stores/ai/LegendMarketplaceAIChatStore.js.map +1 -0
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js +3 -2
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js.map +1 -1
- package/lib/stores/lakehouse/dataProducts/ProductCardState.d.ts +1 -1
- package/lib/stores/lakehouse/dataProducts/ProductCardState.d.ts.map +1 -1
- package/lib/stores/lakehouse/dataProducts/ProductCardState.js +1 -2
- package/lib/stores/lakehouse/dataProducts/ProductCardState.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +30 -3
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +94 -16
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -1
- package/lib/utils/EntitlementsUtils.d.ts +36 -2
- package/lib/utils/EntitlementsUtils.d.ts.map +1 -1
- package/lib/utils/EntitlementsUtils.js +225 -46
- package/lib/utils/EntitlementsUtils.js.map +1 -1
- package/lib/utils/SearchUtils.d.ts.map +1 -1
- package/lib/utils/SearchUtils.js +7 -4
- package/lib/utils/SearchUtils.js.map +1 -1
- package/package.json +10 -10
- package/src/__lib__/LegendMarketplaceNavigation.ts +11 -0
- package/src/application/LegendMarketplaceApplicationConfig.ts +62 -24
- package/src/application/LegendMarketplaceWebApplication.tsx +15 -0
- package/src/application/__test-utils__/LegendMarketplaceApplicationTestUtils.ts +7 -0
- package/src/application/providers/LegendMarketplaceAIChatStoreProvider.tsx +47 -0
- package/src/pages/Agents/LegendMarketplaceAgents.tsx +145 -23
- package/src/pages/Agents/MarketplaceAIChatView.tsx +555 -0
- package/src/pages/Agents/MarketplaceAIInputBar.tsx +91 -0
- package/src/pages/Agents/MarketplaceAIProductAutosuggest.tsx +181 -0
- package/src/pages/Agents/MarketplaceAIProductCards.tsx +111 -0
- package/src/pages/Agents/MarketplaceAIScopeSelector.tsx +84 -0
- package/src/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.tsx +131 -136
- package/src/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.tsx +158 -165
- package/src/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.tsx +12 -17
- package/src/pages/Lakehouse/entitlements/PermitDataAccessRequest.tsx +245 -0
- package/src/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.tsx +25 -94
- package/src/pages/Lakehouse/entitlements/showTaskActionAlert.tsx +101 -0
- package/src/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.tsx +27 -31
- package/src/stores/LegendMarketplaceBaseStore.ts +12 -0
- package/src/stores/ai/LegendMarketplaceAIChatStore.ts +1720 -0
- package/src/stores/lakehouse/LegendMarketplaceProductViewerStore.ts +6 -0
- package/src/stores/lakehouse/dataProducts/ProductCardState.ts +3 -4
- package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +181 -48
- package/src/utils/EntitlementsUtils.tsx +341 -86
- package/src/utils/SearchUtils.tsx +7 -4
- package/tsconfig.json +9 -0
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
-
type V1_LiteDataContract,
|
|
19
|
-
GraphManagerState,
|
|
20
18
|
V1_AdhocTeam,
|
|
19
|
+
V1_ContractState,
|
|
21
20
|
V1_LiteDataContractWithUserStatus,
|
|
22
21
|
} from '@finos/legend-graph';
|
|
23
22
|
import {
|
|
24
23
|
DataGrid,
|
|
25
|
-
type DataGridCellClickedEvent,
|
|
26
24
|
type DataGridColumnDefinition,
|
|
27
25
|
} from '@finos/legend-lego/data-grid';
|
|
28
26
|
import {
|
|
@@ -32,33 +30,45 @@ import {
|
|
|
32
30
|
FormGroup,
|
|
33
31
|
Switch,
|
|
34
32
|
} from '@mui/material';
|
|
35
|
-
import { useMemo, useState } from 'react';
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
EntitlementsDashboardState,
|
|
39
|
-
} from '../../../stores/lakehouse/entitlements/EntitlementsDashboardState.js';
|
|
33
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
34
|
+
import { startCase } from '@finos/legend-shared';
|
|
35
|
+
import type { EntitlementsDashboardState } from '../../../stores/lakehouse/entitlements/EntitlementsDashboardState.js';
|
|
40
36
|
import { useLegendMarketplaceBaseStore } from '../../../application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
41
37
|
import { observer } from 'mobx-react-lite';
|
|
42
38
|
import { useAuth } from 'react-oidc-context';
|
|
43
39
|
import {
|
|
40
|
+
type ContractErrorLayer,
|
|
44
41
|
DataAccessRequestViewer,
|
|
45
|
-
DataContractViewerState,
|
|
46
42
|
isApprovalStatusTerminal,
|
|
47
43
|
isContractInTerminalState,
|
|
48
44
|
} from '@finos/legend-extension-dsl-data-product';
|
|
49
|
-
import {
|
|
50
|
-
generateContractPagePath,
|
|
51
|
-
generateLakehouseDataProductPath,
|
|
52
|
-
} from '../../../__lib__/LegendMarketplaceNavigation.js';
|
|
53
45
|
import { flowResult } from 'mobx';
|
|
54
|
-
import {
|
|
46
|
+
import {
|
|
47
|
+
getCommonEntitlementsColDefs,
|
|
48
|
+
type EntitlementsRow,
|
|
49
|
+
getSelectedRowId,
|
|
50
|
+
getSelectedContractGuid,
|
|
51
|
+
EntitlementsColumnHeader,
|
|
52
|
+
ENTITLEMENTS_DEFAULT_COL_DEF,
|
|
53
|
+
ROW_KIND_CONTRACT,
|
|
54
|
+
ROW_KIND_REQUEST,
|
|
55
|
+
TERMINAL_DATA_REQUEST_STATES,
|
|
56
|
+
UNKNOWN,
|
|
57
|
+
useSelectedViewerState,
|
|
58
|
+
useGetDataProductUrl,
|
|
59
|
+
} from '../../../utils/EntitlementsUtils.js';
|
|
55
60
|
|
|
56
61
|
export const EntitlementsClosedContractsDashboard = observer(
|
|
57
62
|
(props: { dashboardState: EntitlementsDashboardState }): React.ReactNode => {
|
|
58
63
|
const { dashboardState } = props;
|
|
59
|
-
const {
|
|
64
|
+
const {
|
|
65
|
+
allContractsForUser,
|
|
66
|
+
allContractsCreatedByUser,
|
|
67
|
+
dataRequestsCreatedByUser,
|
|
68
|
+
} = dashboardState;
|
|
60
69
|
const marketplaceBaseStore = useLegendMarketplaceBaseStore();
|
|
61
70
|
const auth = useAuth();
|
|
71
|
+
const getDataProductUrl = useGetDataProductUrl();
|
|
62
72
|
|
|
63
73
|
const myClosedContracts = useMemo(
|
|
64
74
|
() =>
|
|
@@ -81,102 +91,109 @@ export const EntitlementsClosedContractsDashboard = observer(
|
|
|
81
91
|
[allContractsCreatedByUser, myClosedContractIds],
|
|
82
92
|
);
|
|
83
93
|
|
|
84
|
-
const
|
|
85
|
-
|
|
94
|
+
const closedDataRequests = useMemo(
|
|
95
|
+
() =>
|
|
96
|
+
(dataRequestsCreatedByUser ?? []).filter((dr) =>
|
|
97
|
+
TERMINAL_DATA_REQUEST_STATES.has(dr.dataRequest.state),
|
|
98
|
+
),
|
|
99
|
+
[dataRequestsCreatedByUser],
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
const [selectedRow, setSelectedRow] = useState<
|
|
103
|
+
EntitlementsRow | undefined
|
|
86
104
|
>();
|
|
87
|
-
const [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
useState(false);
|
|
105
|
+
const [contractErrors, setContractErrors] = useState<
|
|
106
|
+
ContractErrorLayer | undefined
|
|
107
|
+
>(undefined);
|
|
91
108
|
const [showForOthers, setShowForOthers] = useState<boolean>(
|
|
92
109
|
myClosedContracts.length === 0 && closedContractsForOthers.length > 0,
|
|
93
110
|
);
|
|
94
111
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
setUnverifiedIngestDefinitions(undefined);
|
|
103
|
-
if (contract !== undefined) {
|
|
104
|
-
setIngestVerificationInProgress(true);
|
|
105
|
-
const result = await flowResult(
|
|
106
|
-
dashboardState.getUnverifiedIngestDefinitions(
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
setContractErrors(undefined);
|
|
114
|
+
if (selectedRow?.kind === ROW_KIND_CONTRACT) {
|
|
115
|
+
const contract = selectedRow.data.contractResultLite;
|
|
116
|
+
const isCompleted = contract.state === V1_ContractState.COMPLETED;
|
|
117
|
+
dashboardState
|
|
118
|
+
.getContractErrors(
|
|
107
119
|
contract.guid,
|
|
108
120
|
auth.user?.access_token,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
isCompleted,
|
|
122
|
+
)
|
|
123
|
+
.then((result) => setContractErrors(result))
|
|
124
|
+
.catch(() => setContractErrors(undefined));
|
|
113
125
|
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const defaultColDef: DataGridColumnDefinition<
|
|
117
|
-
V1_LiteDataContractWithUserStatus | ContractCreatedByUserDetails
|
|
118
|
-
> = useMemo(
|
|
119
|
-
() => ({
|
|
120
|
-
minWidth: 50,
|
|
121
|
-
sortable: true,
|
|
122
|
-
resizable: true,
|
|
123
|
-
flex: 1,
|
|
124
|
-
}),
|
|
125
|
-
[],
|
|
126
|
-
);
|
|
126
|
+
}, [selectedRow, auth.user?.access_token, dashboardState]);
|
|
127
127
|
|
|
128
|
-
const
|
|
129
|
-
V1_LiteDataContractWithUserStatus | ContractCreatedByUserDetails
|
|
130
|
-
>[] = useMemo(
|
|
131
|
-
() => [
|
|
132
|
-
...getCommonEntitlementsColDefs(dashboardState),
|
|
133
|
-
{
|
|
134
|
-
headerName: 'State',
|
|
135
|
-
valueGetter: (params) =>
|
|
136
|
-
params.data instanceof V1_LiteDataContractWithUserStatus
|
|
137
|
-
? params.data.status
|
|
138
|
-
: (params.data?.contractResultLite.state ?? 'Unknown'),
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
headerName: 'Business Justification',
|
|
142
|
-
valueGetter: (p) => p.data?.contractResultLite.description,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
hide: true,
|
|
146
|
-
headerName: 'Contract ID',
|
|
147
|
-
valueGetter: (p) => p.data?.contractResultLite.guid,
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
[dashboardState],
|
|
151
|
-
);
|
|
128
|
+
const selectedRowId = getSelectedRowId(selectedRow);
|
|
152
129
|
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
? [...myClosedContracts, ...closedContractsForOthers]
|
|
157
|
-
: myClosedContracts,
|
|
158
|
-
[myClosedContracts, closedContractsForOthers, showForOthers],
|
|
130
|
+
const selectedViewerState = useSelectedViewerState(
|
|
131
|
+
selectedRow,
|
|
132
|
+
selectedRowId,
|
|
159
133
|
);
|
|
160
134
|
|
|
161
135
|
const getInitialUserForViewer = (): string | undefined => {
|
|
136
|
+
if (selectedRow?.kind !== ROW_KIND_CONTRACT) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
const contract = selectedRow.data.contractResultLite;
|
|
162
140
|
const currentUser =
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (selectedContract && myClosedContractIds.has(selectedContract.guid)) {
|
|
141
|
+
marketplaceBaseStore.applicationStore.identityService.currentUser;
|
|
142
|
+
if (myClosedContractIds.has(contract.guid)) {
|
|
166
143
|
return currentUser;
|
|
167
144
|
}
|
|
168
145
|
if (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
selectedContract.consumer.users.some(
|
|
172
|
-
(user) => user.name === currentUser,
|
|
173
|
-
)
|
|
146
|
+
contract.consumer instanceof V1_AdhocTeam &&
|
|
147
|
+
contract.consumer.users.some((user) => user.name === currentUser)
|
|
174
148
|
) {
|
|
175
149
|
return currentUser;
|
|
176
150
|
}
|
|
177
151
|
return undefined;
|
|
178
152
|
};
|
|
179
153
|
|
|
154
|
+
const selectedContractGuid = getSelectedContractGuid(selectedRow);
|
|
155
|
+
|
|
156
|
+
const colDefs: DataGridColumnDefinition<EntitlementsRow>[] = useMemo(
|
|
157
|
+
() => [
|
|
158
|
+
...getCommonEntitlementsColDefs(dashboardState),
|
|
159
|
+
{
|
|
160
|
+
headerName: EntitlementsColumnHeader.STATE,
|
|
161
|
+
valueGetter: (params) => {
|
|
162
|
+
if (!params.data) {
|
|
163
|
+
return UNKNOWN;
|
|
164
|
+
}
|
|
165
|
+
if (params.data.kind === ROW_KIND_CONTRACT) {
|
|
166
|
+
return params.data.data instanceof
|
|
167
|
+
V1_LiteDataContractWithUserStatus
|
|
168
|
+
? params.data.data.status
|
|
169
|
+
: params.data.data.contractResultLite.state;
|
|
170
|
+
}
|
|
171
|
+
return startCase(params.data.data.dataRequest.state);
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
[dashboardState],
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
const gridRowData: EntitlementsRow[] = useMemo(() => {
|
|
179
|
+
const contracts = showForOthers
|
|
180
|
+
? [...myClosedContracts, ...closedContractsForOthers]
|
|
181
|
+
: myClosedContracts;
|
|
182
|
+
return [
|
|
183
|
+
...contracts.map(
|
|
184
|
+
(c): EntitlementsRow => ({ kind: ROW_KIND_CONTRACT, data: c }),
|
|
185
|
+
),
|
|
186
|
+
...closedDataRequests.map(
|
|
187
|
+
(r): EntitlementsRow => ({ kind: ROW_KIND_REQUEST, data: r }),
|
|
188
|
+
),
|
|
189
|
+
];
|
|
190
|
+
}, [
|
|
191
|
+
showForOthers,
|
|
192
|
+
myClosedContracts,
|
|
193
|
+
closedContractsForOthers,
|
|
194
|
+
closedDataRequests,
|
|
195
|
+
]);
|
|
196
|
+
|
|
180
197
|
return (
|
|
181
198
|
<Box className="marketplace-lakehouse-entitlements__completed-contracts">
|
|
182
199
|
<FormGroup className="marketplace-lakehouse-entitlements__completed-contracts__action-btns">
|
|
@@ -212,62 +229,40 @@ export const EntitlementsClosedContractsDashboard = observer(
|
|
|
212
229
|
suppressFieldDotNotation={true}
|
|
213
230
|
suppressContextMenu={false}
|
|
214
231
|
columnDefs={colDefs}
|
|
215
|
-
onCellClicked={(
|
|
216
|
-
|
|
217
|
-
V1_LiteDataContractWithUserStatus | ContractCreatedByUserDetails
|
|
218
|
-
>,
|
|
219
|
-
) =>
|
|
220
|
-
// eslint-disable-next-line no-void
|
|
221
|
-
void handleCellClicked(event)
|
|
222
|
-
}
|
|
223
|
-
defaultColDef={defaultColDef}
|
|
232
|
+
onCellClicked={(event) => event.data && setSelectedRow(event.data)}
|
|
233
|
+
defaultColDef={ENTITLEMENTS_DEFAULT_COL_DEF}
|
|
224
234
|
rowHeight={45}
|
|
225
|
-
overlayNoRowsTemplate="You have no closed contracts"
|
|
226
|
-
loading={
|
|
227
|
-
|
|
235
|
+
overlayNoRowsTemplate="You have no closed contracts or data requests"
|
|
236
|
+
loading={
|
|
237
|
+
dashboardState.fetchingContractsForUserState.isInProgress ||
|
|
238
|
+
dashboardState.fetchingDataRequestsCreatedByUserState.isInProgress
|
|
239
|
+
}
|
|
240
|
+
overlayLoadingTemplate="Loading"
|
|
228
241
|
/>
|
|
229
242
|
</Box>
|
|
230
|
-
{
|
|
243
|
+
{selectedRow !== undefined && selectedViewerState !== undefined && (
|
|
231
244
|
<DataAccessRequestViewer
|
|
232
245
|
open={true}
|
|
233
246
|
onClose={() => {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
setIngestVerificationInProgress(false);
|
|
247
|
+
setSelectedRow(undefined);
|
|
248
|
+
setContractErrors(undefined);
|
|
237
249
|
}}
|
|
238
|
-
|
|
239
|
-
viewerState={
|
|
240
|
-
new DataContractViewerState(
|
|
241
|
-
selectedContract,
|
|
242
|
-
(contractId: string, taskId: string) =>
|
|
243
|
-
marketplaceBaseStore.applicationStore.navigationService.navigator.generateAddress(
|
|
244
|
-
generateContractPagePath(contractId, taskId),
|
|
245
|
-
),
|
|
246
|
-
undefined,
|
|
247
|
-
marketplaceBaseStore.applicationStore,
|
|
248
|
-
marketplaceBaseStore.lakehouseContractServerClient,
|
|
249
|
-
new GraphManagerState(
|
|
250
|
-
marketplaceBaseStore.applicationStore.pluginManager,
|
|
251
|
-
marketplaceBaseStore.applicationStore.logService,
|
|
252
|
-
),
|
|
253
|
-
marketplaceBaseStore.userSearchService,
|
|
254
|
-
)
|
|
255
|
-
}
|
|
250
|
+
contractErrors={contractErrors}
|
|
251
|
+
viewerState={selectedViewerState}
|
|
256
252
|
initialSelectedUser={getInitialUserForViewer()}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
)
|
|
269
|
-
}
|
|
270
|
-
//Derives environment from the fact that other environments are filtered out
|
|
253
|
+
{...(selectedContractGuid
|
|
254
|
+
? {
|
|
255
|
+
onRefresh: async () => {
|
|
256
|
+
await flowResult(
|
|
257
|
+
dashboardState.updateContract(
|
|
258
|
+
selectedContractGuid,
|
|
259
|
+
auth.user?.access_token,
|
|
260
|
+
),
|
|
261
|
+
);
|
|
262
|
+
},
|
|
263
|
+
}
|
|
264
|
+
: {})}
|
|
265
|
+
getDataProductUrl={getDataProductUrl}
|
|
271
266
|
dataProductEnvironment={
|
|
272
267
|
marketplaceBaseStore.envState.lakehouseEnvironment
|
|
273
268
|
}
|