@finos/legend-application-marketplace 0.0.19 → 0.0.21
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 +3 -0
- package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceNavigation.js +11 -1
- package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
- package/lib/app.css +2 -2
- package/lib/app.css.map +1 -1
- package/lib/application/LegendMarketplaceApplicationConfig.d.ts +10 -0
- package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceApplicationConfig.js +10 -0
- package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
- package/lib/application/LegendMarketplaceFrameworkProvider.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceFrameworkProvider.js +2 -2
- package/lib/application/LegendMarketplaceFrameworkProvider.js.map +1 -1
- package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceWebApplication.js +18 -8
- package/lib/application/LegendMarketplaceWebApplication.js.map +1 -1
- package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.d.ts.map +1 -1
- package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js +6 -3
- package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js.map +1 -1
- package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.d.ts.map +1 -1
- package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js +9 -6
- package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js.map +1 -1
- package/lib/components/{Lakehouse/LakehouseHeader.d.ts → Header/MarketplaceLakehouseHeader.d.ts} +2 -2
- package/lib/components/Header/MarketplaceLakehouseHeader.d.ts.map +1 -0
- package/lib/components/{Lakehouse/LakehouseHeader.js → Header/MarketplaceLakehouseHeader.js} +8 -4
- package/lib/components/Header/MarketplaceLakehouseHeader.js.map +1 -0
- package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts +25 -0
- package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts.map +1 -0
- package/lib/components/MarketplaceCard/LegendMarketplaceCard.js +32 -0
- package/lib/components/MarketplaceCard/LegendMarketplaceCard.js.map +1 -0
- package/lib/components/ProviderCard/LegendMarketplaceProviderCard.d.ts.map +1 -1
- package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js +6 -3
- package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js.map +1 -1
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +3 -6
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -1
- package/lib/pages/Home/LegendMarketplaceHome.d.ts.map +1 -1
- package/lib/pages/Home/LegendMarketplaceHome.js +4 -4
- package/lib/pages/Home/LegendMarketplaceHome.js.map +1 -1
- package/lib/pages/Lakehouse/DataProductDataAccess.d.ts.map +1 -0
- package/lib/{components → pages}/Lakehouse/DataProductDataAccess.js +41 -9
- package/lib/pages/Lakehouse/DataProductDataAccess.js.map +1 -0
- package/lib/pages/Lakehouse/DataProductHolder.d.ts.map +1 -0
- package/lib/pages/Lakehouse/DataProductHolder.js.map +1 -0
- package/lib/pages/Lakehouse/DataProductViewer.d.ts.map +1 -0
- package/lib/pages/Lakehouse/DataProductViewer.js.map +1 -0
- package/lib/pages/Lakehouse/DataProductViewerActivityBar.d.ts.map +1 -0
- package/lib/pages/Lakehouse/DataProductViewerActivityBar.js.map +1 -0
- package/lib/pages/Lakehouse/DataProductWiki.d.ts.map +1 -0
- package/lib/pages/Lakehouse/DataProductWiki.js.map +1 -0
- package/lib/pages/Lakehouse/LakehouseDataProduct.d.ts.map +1 -0
- package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.js +3 -3
- package/lib/pages/Lakehouse/LakehouseDataProduct.js.map +1 -0
- package/lib/{components/Lakehouse/LakehouseMarketplace.d.ts → pages/Lakehouse/MarketplaceLakehouseHome.d.ts} +2 -2
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.d.ts.map +1 -0
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js +54 -0
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js.map +1 -0
- package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.d.ts → pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts} +1 -1
- package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts.map +1 -0
- package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.js → pages/Lakehouse/MarketplaceLakehouseStoreProvider.js} +1 -1
- package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.js.map +1 -0
- package/lib/{components/Lakehouse/entitlements/LakehouseEntitlements.d.ts → pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts} +6 -5
- package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js +194 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts +24 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js +38 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts +22 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js +23 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts +21 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js +32 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts +17 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js +55 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js.map +1 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +1 -0
- package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +1 -0
- package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts +21 -0
- package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts.map +1 -0
- package/lib/pages/Lakehouse/shared/GridItemViewer.js +46 -0
- package/lib/pages/Lakehouse/shared/GridItemViewer.js.map +1 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts +29 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts.map +1 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js +152 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +1 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts +22 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +1 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js +34 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js.map +1 -0
- package/lib/pages/LegendMarketplacePage.d.ts +23 -0
- package/lib/pages/LegendMarketplacePage.d.ts.map +1 -0
- package/lib/pages/LegendMarketplacePage.js +23 -0
- package/lib/pages/LegendMarketplacePage.js.map +1 -0
- package/lib/pages/SearchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
- package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js +13 -13
- package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js.map +1 -1
- package/lib/pages/VendorData/LegendMarketplaceVendorData.d.ts.map +1 -1
- package/lib/pages/VendorData/LegendMarketplaceVendorData.js +6 -6
- package/lib/pages/VendorData/LegendMarketplaceVendorData.js.map +1 -1
- package/lib/stores/LakehouseContractServerClient.d.ts +11 -4
- package/lib/stores/LakehouseContractServerClient.d.ts.map +1 -1
- package/lib/stores/LakehouseContractServerClient.js +21 -3
- package/lib/stores/LakehouseContractServerClient.js.map +1 -1
- package/lib/stores/LegendMarketplaceBaseStore.d.ts +3 -0
- 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/lakehouse/DataProductDataAccessState.d.ts +6 -7
- package/lib/stores/lakehouse/DataProductDataAccessState.d.ts.map +1 -1
- package/lib/stores/lakehouse/DataProductDataAccessState.js +47 -48
- package/lib/stores/lakehouse/DataProductDataAccessState.js.map +1 -1
- package/lib/stores/lakehouse/DataProductViewerState.d.ts +7 -3
- package/lib/stores/lakehouse/DataProductViewerState.d.ts.map +1 -1
- package/lib/stores/lakehouse/DataProductViewerState.js +51 -22
- package/lib/stores/lakehouse/DataProductViewerState.js.map +1 -1
- package/lib/stores/lakehouse/LakehouseUtils.d.ts +50 -0
- package/lib/stores/lakehouse/LakehouseUtils.d.ts.map +1 -0
- package/lib/stores/lakehouse/LakehouseUtils.js +267 -0
- package/lib/stores/lakehouse/LakehouseUtils.js.map +1 -0
- package/lib/stores/lakehouse/MarketplaceLakehouseStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/MarketplaceLakehouseStore.js +9 -4
- package/lib/stores/lakehouse/MarketplaceLakehouseStore.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +31 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +110 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.d.ts +30 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js +65 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js.map +1 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts +41 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js +146 -0
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js.map +1 -0
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts +10 -32
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js +49 -163
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/LakehouseViewerState.d.ts +23 -0
- package/lib/stores/lakehouse/entitlements/LakehouseViewerState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/LakehouseViewerState.js +24 -0
- package/lib/stores/lakehouse/entitlements/LakehouseViewerState.js.map +1 -0
- package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.d.ts +30 -0
- package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.d.ts.map +1 -0
- package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js +63 -0
- package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js.map +1 -0
- package/package.json +5 -4
- package/src/__lib__/LegendMarketplaceNavigation.ts +16 -1
- package/src/application/LegendMarketplaceApplicationConfig.ts +25 -0
- package/src/application/LegendMarketplaceFrameworkProvider.tsx +2 -0
- package/src/application/LegendMarketplaceWebApplication.tsx +50 -12
- package/src/components/DataProductCard/LegendMarketplaceDataProductSearchCard.tsx +41 -33
- package/src/components/DataProductCard/LegendMarketplaceLightDataProductCard.tsx +33 -36
- package/src/components/{Lakehouse/LakehouseHeader.tsx → Header/MarketplaceLakehouseHeader.tsx} +7 -3
- package/src/components/MarketplaceCard/LegendMarketplaceCard.tsx +98 -0
- package/src/components/ProviderCard/LegendMarketplaceProviderCard.tsx +47 -39
- package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +2 -14
- package/src/pages/Home/LegendMarketplaceHome.tsx +42 -51
- package/src/{components → pages}/Lakehouse/DataProductDataAccess.tsx +91 -12
- package/src/{components → pages}/Lakehouse/LakehouseDataProduct.tsx +14 -23
- package/src/pages/Lakehouse/MarketplaceLakehouseHome.tsx +167 -0
- package/src/pages/Lakehouse/entitlements/EntitlementsDashboard.tsx +390 -0
- package/src/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.tsx +99 -0
- package/src/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.tsx +33 -0
- package/src/pages/Lakehouse/entitlements/EntitlementsTaskViewer.tsx +73 -0
- package/src/pages/Lakehouse/entitlements/LakehouseEntitlements.tsx +82 -0
- package/src/pages/Lakehouse/shared/GridItemViewer.tsx +105 -0
- package/src/pages/Lakehouse/subscriptions/LakehouseSubscriptions.tsx +358 -0
- package/src/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.tsx +65 -0
- package/src/pages/LegendMarketplacePage.tsx +26 -0
- package/src/pages/SearchResults/LegendMarketplaceSearchResults.tsx +58 -65
- package/src/pages/VendorData/LegendMarketplaceVendorData.tsx +44 -42
- package/src/stores/LakehouseContractServerClient.ts +78 -10
- package/src/stores/LegendMarketplaceBaseStore.ts +16 -1
- package/src/stores/lakehouse/DataProductDataAccessState.ts +67 -63
- package/src/stores/lakehouse/DataProductViewerState.ts +86 -29
- package/src/stores/lakehouse/LakehouseUtils.ts +345 -0
- package/src/stores/lakehouse/MarketplaceLakehouseStore.ts +10 -6
- package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +167 -0
- package/src/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.ts +101 -0
- package/src/stores/lakehouse/entitlements/EntitlementsTaskViewerState.ts +227 -0
- package/src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts +69 -231
- package/src/stores/lakehouse/entitlements/LakehouseViewerState.ts +27 -0
- package/src/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.ts +100 -0
- package/tsconfig.json +26 -13
- package/lib/components/Lakehouse/DataProductDataAccess.d.ts.map +0 -1
- package/lib/components/Lakehouse/DataProductDataAccess.js.map +0 -1
- package/lib/components/Lakehouse/DataProductHolder.d.ts.map +0 -1
- package/lib/components/Lakehouse/DataProductHolder.js.map +0 -1
- package/lib/components/Lakehouse/DataProductViewer.d.ts.map +0 -1
- package/lib/components/Lakehouse/DataProductViewer.js.map +0 -1
- package/lib/components/Lakehouse/DataProductViewerActivityBar.d.ts.map +0 -1
- package/lib/components/Lakehouse/DataProductViewerActivityBar.js.map +0 -1
- package/lib/components/Lakehouse/DataProductWiki.d.ts.map +0 -1
- package/lib/components/Lakehouse/DataProductWiki.js.map +0 -1
- package/lib/components/Lakehouse/LakehouseDataProduct.d.ts.map +0 -1
- package/lib/components/Lakehouse/LakehouseDataProduct.js.map +0 -1
- package/lib/components/Lakehouse/LakehouseHeader.d.ts.map +0 -1
- package/lib/components/Lakehouse/LakehouseHeader.js.map +0 -1
- package/lib/components/Lakehouse/LakehouseMarketplace.d.ts.map +0 -1
- package/lib/components/Lakehouse/LakehouseMarketplace.js +0 -57
- package/lib/components/Lakehouse/LakehouseMarketplace.js.map +0 -1
- package/lib/components/Lakehouse/MarketLakehouseStoreProvider.d.ts.map +0 -1
- package/lib/components/Lakehouse/MarketLakehouseStoreProvider.js.map +0 -1
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +0 -1
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.js +0 -147
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.js.map +0 -1
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +0 -1
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +0 -1
- package/lib/stores/MarketplaceLakehouseServerClient.d.ts +0 -25
- package/lib/stores/MarketplaceLakehouseServerClient.d.ts.map +0 -1
- package/lib/stores/MarketplaceLakehouseServerClient.js +0 -27
- package/lib/stores/MarketplaceLakehouseServerClient.js.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractState.d.ts +0 -27
- package/lib/stores/lakehouse/entitlements/DataContractState.d.ts.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractState.js +0 -115
- package/lib/stores/lakehouse/entitlements/DataContractState.js.map +0 -1
- package/src/components/Lakehouse/LakehouseMarketplace.tsx +0 -193
- package/src/components/Lakehouse/entitlements/LakehouseEntitlements.tsx +0 -332
- package/src/stores/MarketplaceLakehouseServerClient.ts +0 -40
- package/src/stores/lakehouse/entitlements/DataContractState.ts +0 -131
- /package/lib/{components → pages}/Lakehouse/DataProductDataAccess.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductHolder.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductHolder.js +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductViewer.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductViewer.js +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.js +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductWiki.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/DataProductWiki.js +0 -0
- /package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js +0 -0
- /package/src/{components → pages}/Lakehouse/DataProductHolder.tsx +0 -0
- /package/src/{components → pages}/Lakehouse/DataProductViewer.tsx +0 -0
- /package/src/{components → pages}/Lakehouse/DataProductViewerActivityBar.tsx +0 -0
- /package/src/{components → pages}/Lakehouse/DataProductWiki.tsx +0 -0
- /package/src/{components/Lakehouse/MarketLakehouseStoreProvider.tsx → pages/Lakehouse/MarketplaceLakehouseStoreProvider.tsx} +0 -0
- /package/src/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.tsx +0 -0
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
18
|
import { LegendMarketplaceSearchBar } from '../../components/SearchBar/LegendMarketplaceSearchBar.js';
|
|
19
|
-
import { LegendMarketplaceHeader } from '../../components/Header/LegendMarketplaceHeader.js';
|
|
20
19
|
import { useApplicationStore } from '@finos/legend-application';
|
|
21
20
|
import { generateSearchResultsRoute } from '../../__lib__/LegendMarketplaceNavigation.js';
|
|
22
21
|
import { DataProductSearchResult } from '@finos/legend-server-marketplace';
|
|
@@ -30,6 +29,7 @@ import { assertErrorThrown } from '@finos/legend-shared';
|
|
|
30
29
|
import { LegendMarketplaceSearchResultDrawerContent } from './LegendMarketplaceSearchResultDrawerContent.js';
|
|
31
30
|
import { Drawer, Grid2 as Grid } from '@mui/material';
|
|
32
31
|
import { LegendMarketplaceProductSearchCard } from '../../components/DataProductCard/LegendMarketplaceDataProductSearchCard.js';
|
|
32
|
+
import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
|
|
33
33
|
|
|
34
34
|
export const LegendMarketplaceSearchResults = observer(() => {
|
|
35
35
|
const applicationStore = useApplicationStore();
|
|
@@ -87,71 +87,64 @@ export const LegendMarketplaceSearchResults = observer(() => {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
return (
|
|
90
|
-
<
|
|
91
|
-
<div className="legend-marketplace-search-
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
container={true}
|
|
110
|
-
spacing={{ xs: 2, lg: 3, xl: 4 }}
|
|
111
|
-
columns={{ xs: 1, sm: 2, lg: 3, xxl: 4, xxxl: 5, xxxxl: 6 }}
|
|
112
|
-
className="legend-marketplace-search-results__results__cards"
|
|
113
|
-
>
|
|
114
|
-
{results.map((result) => (
|
|
115
|
-
<Grid
|
|
116
|
-
key={`${result.vendor_name}-${result.data_product_name}`}
|
|
117
|
-
size={1}
|
|
118
|
-
>
|
|
119
|
-
<LegendMarketplaceProductSearchCard
|
|
120
|
-
productSearchResult={result}
|
|
121
|
-
onPreviewClick={() => {
|
|
122
|
-
setSelectedPreviewResult(result);
|
|
123
|
-
}}
|
|
124
|
-
onLearnMoreClick={() => {
|
|
125
|
-
applicationStore.navigationService.navigator.visitAddress(
|
|
126
|
-
result.data_product_link,
|
|
127
|
-
);
|
|
128
|
-
}}
|
|
129
|
-
/>
|
|
130
|
-
</Grid>
|
|
131
|
-
))}
|
|
132
|
-
</Grid>
|
|
133
|
-
)}
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
<Drawer
|
|
137
|
-
anchor="right"
|
|
138
|
-
open={selectedPreviewResult !== undefined}
|
|
139
|
-
onClose={() => setSelectedPreviewResult(undefined)}
|
|
140
|
-
slotProps={{
|
|
141
|
-
paper: {
|
|
142
|
-
sx: {
|
|
143
|
-
width: '40%',
|
|
144
|
-
maxWidth: '100rem',
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
}}
|
|
90
|
+
<LegendMarketplacePage className="legend-marketplace-search-results">
|
|
91
|
+
<div className="legend-marketplace-search-results__search-bar">
|
|
92
|
+
<LegendMarketplaceSearchBar
|
|
93
|
+
onSearch={onSearch}
|
|
94
|
+
initialValue={params.query?.trim() ?? ''}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
<div className="legend-marketplace-search-results__results">
|
|
98
|
+
<CubesLoadingIndicator isLoading={isLoading}>
|
|
99
|
+
<CubesLoadingIndicatorIcon />
|
|
100
|
+
</CubesLoadingIndicator>
|
|
101
|
+
{isError ? (
|
|
102
|
+
<div>Error loading results</div>
|
|
103
|
+
) : (
|
|
104
|
+
<Grid
|
|
105
|
+
container={true}
|
|
106
|
+
spacing={{ xs: 4 }}
|
|
107
|
+
columns={{ xs: 1, sm: 2, lg: 3, xxl: 4, xxxl: 5, xxxxl: 6 }}
|
|
108
|
+
className="legend-marketplace-search-results__results__cards"
|
|
148
109
|
>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
110
|
+
{results.map((result) => (
|
|
111
|
+
<Grid
|
|
112
|
+
key={`${result.vendor_name}-${result.data_product_name}`}
|
|
113
|
+
size={1}
|
|
114
|
+
>
|
|
115
|
+
<LegendMarketplaceProductSearchCard
|
|
116
|
+
productSearchResult={result}
|
|
117
|
+
onPreviewClick={() => {
|
|
118
|
+
setSelectedPreviewResult(result);
|
|
119
|
+
}}
|
|
120
|
+
onLearnMoreClick={() => {
|
|
121
|
+
applicationStore.navigationService.navigator.visitAddress(
|
|
122
|
+
result.data_product_link,
|
|
123
|
+
);
|
|
124
|
+
}}
|
|
125
|
+
/>
|
|
126
|
+
</Grid>
|
|
127
|
+
))}
|
|
128
|
+
</Grid>
|
|
129
|
+
)}
|
|
154
130
|
</div>
|
|
155
|
-
|
|
131
|
+
<Drawer
|
|
132
|
+
anchor="right"
|
|
133
|
+
open={selectedPreviewResult !== undefined}
|
|
134
|
+
onClose={() => setSelectedPreviewResult(undefined)}
|
|
135
|
+
slotProps={{
|
|
136
|
+
paper: {
|
|
137
|
+
sx: {
|
|
138
|
+
width: '40%',
|
|
139
|
+
maxWidth: '100rem',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
}}
|
|
143
|
+
>
|
|
144
|
+
<LegendMarketplaceSearchResultDrawerContent
|
|
145
|
+
productSearchResult={selectedPreviewResult}
|
|
146
|
+
/>
|
|
147
|
+
</Drawer>
|
|
148
|
+
</LegendMarketplacePage>
|
|
156
149
|
);
|
|
157
150
|
});
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import { LegendMarketplaceHeader } from '../../components/Header/LegendMarketplaceHeader.js';
|
|
19
18
|
import { useEffect, useState } from 'react';
|
|
20
19
|
import { LegendMarketplaceSearchBar } from '../../components/SearchBar/LegendMarketplaceSearchBar.js';
|
|
21
20
|
import {
|
|
@@ -25,6 +24,7 @@ import {
|
|
|
25
24
|
Checkbox,
|
|
26
25
|
FormControlLabel,
|
|
27
26
|
FormGroup,
|
|
27
|
+
Grid2 as Grid,
|
|
28
28
|
Typography,
|
|
29
29
|
} from '@mui/material';
|
|
30
30
|
import { flowResult } from 'mobx';
|
|
@@ -33,6 +33,7 @@ import type { ProviderResult } from '@finos/legend-server-marketplace';
|
|
|
33
33
|
import { LegendMarketplaceProviderCard } from '../../components/ProviderCard/LegendMarketplaceProviderCard.js';
|
|
34
34
|
import type { LegendMarketPlaceVendorDataState } from '../../stores/LegendMarketPlaceVendorDataState.js';
|
|
35
35
|
import { useLegendMarketplaceBaseStore } from '../../application/LegendMarketplaceFrameworkProvider.js';
|
|
36
|
+
import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
|
|
36
37
|
|
|
37
38
|
export const RefinedVendorRadioSelector = observer(() => {
|
|
38
39
|
const radioOptions = ['All', 'Datafeeds', 'Terminal License', 'Add-Ons'];
|
|
@@ -79,15 +80,21 @@ const SearchResultsRenderer = observer(
|
|
|
79
80
|
<strong>See All></strong>
|
|
80
81
|
</a>
|
|
81
82
|
</div>
|
|
82
|
-
<
|
|
83
|
+
<Grid
|
|
84
|
+
container={true}
|
|
85
|
+
spacing={{ xs: 4 }}
|
|
86
|
+
columns={{ xs: 1, sm: 2, lg: 3, xxl: 4, xxxl: 5, xxxxl: 6 }}
|
|
87
|
+
className="legend-marketplace-vendordata-main-search-results__card-group"
|
|
88
|
+
>
|
|
83
89
|
{providerResults.map((provider) => (
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
<Grid key={provider.id} size={1}>
|
|
91
|
+
<LegendMarketplaceProviderCard
|
|
92
|
+
providerResult={provider}
|
|
93
|
+
onAddToCartClick={() => onAddToCartClick(provider)}
|
|
94
|
+
/>
|
|
95
|
+
</Grid>
|
|
89
96
|
))}
|
|
90
|
-
</
|
|
97
|
+
</Grid>
|
|
91
98
|
</div>
|
|
92
99
|
);
|
|
93
100
|
},
|
|
@@ -163,41 +170,36 @@ export const LegendMarketPlaceVendorData = observer(() => {
|
|
|
163
170
|
}, [marketPlaceVendorDataState, applicationStore]);
|
|
164
171
|
|
|
165
172
|
return (
|
|
166
|
-
<
|
|
167
|
-
<div className="legend-marketplace-
|
|
168
|
-
<
|
|
169
|
-
<div className="legend-marketplace-
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
{vendor.productName}
|
|
188
|
-
</Badge>
|
|
189
|
-
))}
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
<div className="legend-marketplace-body__content">
|
|
193
|
-
<RefinedVendorRadioSelector />
|
|
194
|
-
<LegendMarketplaceSearchBar onSearch={onChange} />
|
|
195
|
-
<VendorDataMainContent
|
|
196
|
-
marketPlaceVendorDataState={marketPlaceVendorDataState}
|
|
197
|
-
/>
|
|
198
|
-
</div>
|
|
173
|
+
<LegendMarketplacePage className="legend-marketplace-vendor-data">
|
|
174
|
+
<div className="legend-marketplace-banner">
|
|
175
|
+
<div className="legend-marketplace-banner__title">Vendor Data</div>
|
|
176
|
+
<div className="legend-marketplace-banner__subtitle">
|
|
177
|
+
<p>Discover high quality data</p>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<div className="legend-marketplace-new-datasets">
|
|
181
|
+
<h3>Recently Onboarded</h3>
|
|
182
|
+
<div className="legend-marketplace-new-datasets__buttons">
|
|
183
|
+
{marketPlaceVendorDataState.dataFeedProviders
|
|
184
|
+
.slice(0, 10)
|
|
185
|
+
.map((vendor) => (
|
|
186
|
+
<Badge
|
|
187
|
+
className="legend-marketplace-new-datasets__providers"
|
|
188
|
+
title={vendor.productName}
|
|
189
|
+
key={vendor.id}
|
|
190
|
+
>
|
|
191
|
+
{vendor.productName}
|
|
192
|
+
</Badge>
|
|
193
|
+
))}
|
|
199
194
|
</div>
|
|
200
195
|
</div>
|
|
201
|
-
|
|
196
|
+
<div className="legend-marketplace-body__content">
|
|
197
|
+
<RefinedVendorRadioSelector />
|
|
198
|
+
<LegendMarketplaceSearchBar onSearch={onChange} />
|
|
199
|
+
<VendorDataMainContent
|
|
200
|
+
marketPlaceVendorDataState={marketPlaceVendorDataState}
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
203
|
+
</LegendMarketplacePage>
|
|
202
204
|
);
|
|
203
205
|
});
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
import type {
|
|
18
18
|
V1_ContractCreate_LegendDataProduct,
|
|
19
|
+
V1_CreateSubscriptionInput,
|
|
19
20
|
V1_DataContract,
|
|
20
21
|
V1_DataContractsRecord,
|
|
21
|
-
|
|
22
|
+
V1_DataSubscriptionResponse,
|
|
22
23
|
V1_PendingTasksRespond,
|
|
24
|
+
V1_TaskStatus,
|
|
25
|
+
V1_UserPendingContractsResponse,
|
|
23
26
|
} from '@finos/legend-graph';
|
|
24
27
|
import { AbstractServerClient, type PlainObject } from '@finos/legend-shared';
|
|
25
28
|
|
|
@@ -48,13 +51,6 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
48
51
|
|
|
49
52
|
private _dataContracts = (): string => `${this.baseUrl}/datacontracts`;
|
|
50
53
|
|
|
51
|
-
getPendingContracts = (token?: string | undefined): Promise<PlainObject[]> =>
|
|
52
|
-
this.get(
|
|
53
|
-
`${this._dataContracts()}/pendingContractsForUser`,
|
|
54
|
-
{},
|
|
55
|
-
this._token(token),
|
|
56
|
-
);
|
|
57
|
-
|
|
58
54
|
getDataContracts = (
|
|
59
55
|
token: string | undefined,
|
|
60
56
|
): Promise<PlainObject<V1_DataContractsRecord>> =>
|
|
@@ -70,6 +66,16 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
70
66
|
this._token(token),
|
|
71
67
|
);
|
|
72
68
|
|
|
69
|
+
getApprovedUsersForDataContract = (
|
|
70
|
+
id: string,
|
|
71
|
+
token: string | undefined,
|
|
72
|
+
): Promise<PlainObject<V1_DataContractsRecord>> =>
|
|
73
|
+
this.get(
|
|
74
|
+
`${this._dataContracts()}/${encodeURIComponent(id)}/approvedUsers`,
|
|
75
|
+
{},
|
|
76
|
+
this._token(token),
|
|
77
|
+
);
|
|
78
|
+
|
|
73
79
|
getDataContractsFromDID = (
|
|
74
80
|
body: PlainObject<AppendMode>[],
|
|
75
81
|
token: string | undefined,
|
|
@@ -82,14 +88,33 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
82
88
|
);
|
|
83
89
|
};
|
|
84
90
|
|
|
91
|
+
getPendingContracts = (
|
|
92
|
+
user: string | undefined,
|
|
93
|
+
token: string | undefined,
|
|
94
|
+
): Promise<PlainObject<V1_UserPendingContractsResponse>> => {
|
|
95
|
+
return this.get(
|
|
96
|
+
`${this._dataContracts()}/pendingContractsForUser`,
|
|
97
|
+
{},
|
|
98
|
+
this._token(token),
|
|
99
|
+
{ user },
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
85
103
|
createContract = (
|
|
86
104
|
contractRequest: PlainObject<V1_ContractCreate_LegendDataProduct>,
|
|
105
|
+
token: string | undefined,
|
|
87
106
|
): Promise<V1_DataContract> =>
|
|
88
|
-
this.post(
|
|
107
|
+
this.post(
|
|
108
|
+
`${this._dataContracts()}/alloyDataProduct`,
|
|
109
|
+
contractRequest,
|
|
110
|
+
undefined,
|
|
111
|
+
this._token(token),
|
|
112
|
+
);
|
|
89
113
|
|
|
90
114
|
// ------------------------------------------- Tasks -------------------------------------------
|
|
91
115
|
|
|
92
116
|
private _tasks = (): string => `${this.baseUrl}/datacontracts/tasks`;
|
|
117
|
+
private _contract_tasks = (): string => `${this._tasks()}/query/contract`;
|
|
93
118
|
|
|
94
119
|
getPendingTasks = (
|
|
95
120
|
user: string | undefined,
|
|
@@ -100,6 +125,34 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
100
125
|
});
|
|
101
126
|
};
|
|
102
127
|
|
|
128
|
+
getTask = (
|
|
129
|
+
taskId: string,
|
|
130
|
+
token: string | undefined,
|
|
131
|
+
): Promise<PlainObject<V1_PendingTasksRespond>> => {
|
|
132
|
+
return this.get(
|
|
133
|
+
`${this._tasks()}/${encodeURIComponent(taskId)}`,
|
|
134
|
+
{},
|
|
135
|
+
this._token(token),
|
|
136
|
+
{
|
|
137
|
+
user: taskId,
|
|
138
|
+
},
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
getContractTasks = (
|
|
143
|
+
contractId: string,
|
|
144
|
+
token: string | undefined,
|
|
145
|
+
): Promise<PlainObject<V1_PendingTasksRespond>> => {
|
|
146
|
+
return this.get(
|
|
147
|
+
`${this._contract_tasks()}/${encodeURIComponent(contractId)}`,
|
|
148
|
+
{},
|
|
149
|
+
this._token(token),
|
|
150
|
+
{
|
|
151
|
+
user: contractId,
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
103
156
|
approveTask = (
|
|
104
157
|
id: string,
|
|
105
158
|
token: string | undefined,
|
|
@@ -111,7 +164,7 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
111
164
|
this._token(token),
|
|
112
165
|
);
|
|
113
166
|
|
|
114
|
-
|
|
167
|
+
denyTask = (
|
|
115
168
|
id: string,
|
|
116
169
|
token: string | undefined,
|
|
117
170
|
): Promise<PlainObject<V1_TaskStatus>> =>
|
|
@@ -121,4 +174,19 @@ export class LakehouseContractServerClient extends AbstractServerClient {
|
|
|
121
174
|
{},
|
|
122
175
|
this._token(token),
|
|
123
176
|
);
|
|
177
|
+
|
|
178
|
+
// --------------------------------------- Subscriptions ---------------------------------------
|
|
179
|
+
|
|
180
|
+
private _subscriptions = (): string => `${this.baseUrl}/subscriptions`;
|
|
181
|
+
|
|
182
|
+
getAllSubscriptions = (
|
|
183
|
+
token: string | undefined,
|
|
184
|
+
): Promise<PlainObject<V1_DataSubscriptionResponse>[]> =>
|
|
185
|
+
this.get(this._subscriptions(), {}, this._token(token));
|
|
186
|
+
|
|
187
|
+
createSubscription = (
|
|
188
|
+
input: PlainObject<V1_CreateSubscriptionInput>,
|
|
189
|
+
token: string | undefined,
|
|
190
|
+
): Promise<PlainObject<V1_DataSubscriptionResponse>> =>
|
|
191
|
+
this.post(`${this._subscriptions()}`, input, {}, this._token(token));
|
|
124
192
|
}
|
|
@@ -28,7 +28,11 @@ import {
|
|
|
28
28
|
import { flow, makeObservable } from 'mobx';
|
|
29
29
|
import { DepotServerClient } from '@finos/legend-server-depot';
|
|
30
30
|
import { MarketplaceServerClient } from '@finos/legend-server-marketplace';
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
getCurrentUserIDFromEngineServer,
|
|
33
|
+
type V1_EngineServerClient,
|
|
34
|
+
V1_RemoteEngine,
|
|
35
|
+
} from '@finos/legend-graph';
|
|
32
36
|
import type { LegendMarketplaceApplicationConfig } from '../application/LegendMarketplaceApplicationConfig.js';
|
|
33
37
|
import type { LegendMarketplacePluginManager } from '../application/LegendMarketplacePluginManager.js';
|
|
34
38
|
import { LegendMarketplaceEventHelper } from '../__lib__/LegendMarketplaceEventHelper.js';
|
|
@@ -46,6 +50,8 @@ export class LegendMarketplaceBaseStore {
|
|
|
46
50
|
readonly depotServerClient: DepotServerClient;
|
|
47
51
|
readonly lakehouseServerClient: LakehouseContractServerClient | undefined;
|
|
48
52
|
readonly pluginManager: LegendMarketplacePluginManager;
|
|
53
|
+
readonly engineServerClient: V1_EngineServerClient;
|
|
54
|
+
readonly remoteEngine: V1_RemoteEngine;
|
|
49
55
|
|
|
50
56
|
readonly initState = ActionState.create();
|
|
51
57
|
|
|
@@ -85,6 +91,15 @@ export class LegendMarketplaceBaseStore {
|
|
|
85
91
|
);
|
|
86
92
|
}
|
|
87
93
|
|
|
94
|
+
this.remoteEngine = new V1_RemoteEngine(
|
|
95
|
+
{
|
|
96
|
+
baseUrl: this.applicationStore.config.engineServerUrl,
|
|
97
|
+
},
|
|
98
|
+
applicationStore.logService,
|
|
99
|
+
);
|
|
100
|
+
this.engineServerClient = this.remoteEngine.getEngineServerClient();
|
|
101
|
+
this.engineServerClient.setTracerService(applicationStore.tracerService);
|
|
102
|
+
|
|
88
103
|
this.marketplaceVendorDataState = new LegendMarketPlaceVendorDataState(
|
|
89
104
|
this.applicationStore,
|
|
90
105
|
this,
|
|
@@ -14,26 +14,32 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import type {
|
|
18
|
+
V1_DataContract,
|
|
19
|
+
V1_AccessPointGroup,
|
|
20
|
+
V1_DataProduct,
|
|
20
21
|
} from '@finos/legend-graph';
|
|
21
22
|
import type { DataProductViewerState } from './DataProductViewerState.js';
|
|
22
23
|
import {
|
|
23
24
|
ActionState,
|
|
24
25
|
assertErrorThrown,
|
|
25
|
-
assertTrue,
|
|
26
26
|
uuid,
|
|
27
27
|
type GeneratorFn,
|
|
28
28
|
} from '@finos/legend-shared';
|
|
29
29
|
import {
|
|
30
30
|
action,
|
|
31
31
|
flow,
|
|
32
|
-
flowResult,
|
|
33
32
|
makeAutoObservable,
|
|
34
33
|
makeObservable,
|
|
35
34
|
observable,
|
|
36
35
|
} from 'mobx';
|
|
36
|
+
import {
|
|
37
|
+
dataContractContainsAccessGroup,
|
|
38
|
+
isContractCompleted,
|
|
39
|
+
isContractPending,
|
|
40
|
+
isMemberOfContract,
|
|
41
|
+
} from './LakehouseUtils.js';
|
|
42
|
+
import { generateLakehouseContractPath } from '../../__lib__/LegendMarketplaceNavigation.js';
|
|
37
43
|
|
|
38
44
|
export enum DataProductGroupAccess {
|
|
39
45
|
// can be used to indicate fetching or resyncing of group access
|
|
@@ -48,15 +54,31 @@ const generatePromise = (time?: number | undefined) => {
|
|
|
48
54
|
return new Promise((resolve) => setTimeout(resolve, time ?? 5000));
|
|
49
55
|
};
|
|
50
56
|
|
|
57
|
+
const getDataProductGroupAccessFromContract = (
|
|
58
|
+
val: V1_DataContract,
|
|
59
|
+
): DataProductGroupAccess => {
|
|
60
|
+
if (isContractCompleted(val)) {
|
|
61
|
+
return DataProductGroupAccess.COMPLETED;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (isContractPending(val)) {
|
|
65
|
+
return DataProductGroupAccess.PENDING;
|
|
66
|
+
}
|
|
67
|
+
return DataProductGroupAccess.UNKNOWN;
|
|
68
|
+
};
|
|
69
|
+
|
|
51
70
|
export class DataProductGroupAccessState {
|
|
52
71
|
readonly accessState: DataProductDataAccessState;
|
|
53
72
|
readonly group: V1_AccessPointGroup;
|
|
54
73
|
id = uuid();
|
|
55
74
|
|
|
56
|
-
access = DataProductGroupAccess.UNKNOWN;
|
|
57
75
|
fetchingAccessState = ActionState.create();
|
|
58
76
|
requestingAccessState = ActionState.create();
|
|
59
77
|
|
|
78
|
+
// ASSUMPTION: one contract per user per group;
|
|
79
|
+
// false here mentions contracts have not been fetched
|
|
80
|
+
associatedContract: V1_DataContract | undefined | false = false;
|
|
81
|
+
|
|
60
82
|
constructor(
|
|
61
83
|
group: V1_AccessPointGroup,
|
|
62
84
|
accessState: DataProductDataAccessState,
|
|
@@ -64,68 +86,56 @@ export class DataProductGroupAccessState {
|
|
|
64
86
|
this.group = group;
|
|
65
87
|
this.accessState = accessState;
|
|
66
88
|
makeAutoObservable(this, {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
requestAccess: flow,
|
|
70
|
-
handleClick: flow,
|
|
71
|
-
goToEtask: flow,
|
|
89
|
+
handleClick: action,
|
|
90
|
+
handleDataProductContracts: action,
|
|
72
91
|
requestingAccessState: observable,
|
|
92
|
+
associatedContract: observable,
|
|
93
|
+
setAssociatedContract: action,
|
|
73
94
|
});
|
|
74
95
|
}
|
|
75
96
|
|
|
76
|
-
|
|
77
|
-
this.
|
|
97
|
+
get access(): DataProductGroupAccess {
|
|
98
|
+
if (this.associatedContract === false) {
|
|
99
|
+
return DataProductGroupAccess.UNKNOWN;
|
|
100
|
+
}
|
|
101
|
+
if (this.associatedContract) {
|
|
102
|
+
return getDataProductGroupAccessFromContract(this.associatedContract);
|
|
103
|
+
} else {
|
|
104
|
+
return DataProductGroupAccess.NO_ACCESS;
|
|
105
|
+
}
|
|
78
106
|
}
|
|
79
107
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*handleClick(): GeneratorFn<void> {
|
|
83
|
-
if (this.access === DataProductGroupAccess.NO_ACCESS) {
|
|
84
|
-
flowResult(this.requestAccess()).catch(
|
|
85
|
-
this.accessState.viewerState.applicationStore.alertUnhandledError,
|
|
86
|
-
);
|
|
87
|
-
} else if (this.access === DataProductGroupAccess.PENDING) {
|
|
88
|
-
flowResult(this.goToEtask()).catch(
|
|
89
|
-
this.accessState.viewerState.applicationStore.alertUnhandledError,
|
|
90
|
-
);
|
|
91
|
-
}
|
|
108
|
+
setAssociatedContract(val: V1_DataContract | undefined): void {
|
|
109
|
+
this.associatedContract = val;
|
|
92
110
|
}
|
|
93
111
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
handleDataProductContracts(contracts: V1_DataContract[]): void {
|
|
113
|
+
const groupContracts = contracts
|
|
114
|
+
.filter((_contract) =>
|
|
115
|
+
dataContractContainsAccessGroup(this.group, _contract),
|
|
116
|
+
)
|
|
117
|
+
.filter((_contract) =>
|
|
118
|
+
isMemberOfContract(
|
|
119
|
+
this.accessState.viewerState.applicationStore.identityService
|
|
120
|
+
.currentUser,
|
|
121
|
+
_contract,
|
|
122
|
+
),
|
|
102
123
|
);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
);
|
|
107
|
-
yield generatePromise();
|
|
108
|
-
this.setAccess(DataProductGroupAccess.PENDING);
|
|
109
|
-
} catch (error) {
|
|
110
|
-
assertErrorThrown(error);
|
|
111
|
-
this.requestingAccessState.complete();
|
|
112
|
-
} finally {
|
|
113
|
-
this.accessState.viewerState.applicationStore.alertService.setBlockingAlert(
|
|
114
|
-
undefined,
|
|
115
|
-
);
|
|
116
|
-
}
|
|
124
|
+
// ASSUMPTION: one contract per user per group
|
|
125
|
+
const userContract = groupContracts[0];
|
|
126
|
+
this.setAssociatedContract(userContract);
|
|
117
127
|
}
|
|
118
128
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
handleClick(): void {
|
|
130
|
+
if (this.access === DataProductGroupAccess.NO_ACCESS) {
|
|
131
|
+
this.accessState.viewerState.setDataContractAccessPointGroup(this.group);
|
|
132
|
+
} else if (this.access === DataProductGroupAccess.PENDING) {
|
|
133
|
+
const associatedContract = this.associatedContract;
|
|
134
|
+
if (associatedContract) {
|
|
135
|
+
this.accessState.viewerState.applicationStore.navigationService.navigator.updateCurrentLocation(
|
|
136
|
+
generateLakehouseContractPath(associatedContract.guid),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
141
|
}
|
|
@@ -153,12 +163,6 @@ export class DataProductDataAccessState {
|
|
|
153
163
|
// dummy fetch to get access
|
|
154
164
|
this.fetchingDataProductAccessState.inProgress();
|
|
155
165
|
yield generatePromise();
|
|
156
|
-
|
|
157
|
-
if (this.accessGroupStates.length === 3) {
|
|
158
|
-
this.accessGroupStates[0]?.setAccess(DataProductGroupAccess.NO_ACCESS);
|
|
159
|
-
this.accessGroupStates[1]?.setAccess(DataProductGroupAccess.PENDING);
|
|
160
|
-
this.accessGroupStates[2]?.setAccess(DataProductGroupAccess.COMPLETED);
|
|
161
|
-
}
|
|
162
166
|
} catch (error) {
|
|
163
167
|
assertErrorThrown(error);
|
|
164
168
|
} finally {
|