@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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Grid2, Typography } from '@mui/material';
|
|
18
|
+
import {
|
|
19
|
+
GridTiemStatus,
|
|
20
|
+
type GridItemDetail,
|
|
21
|
+
} from '../../../stores/lakehouse/LakehouseUtils.js';
|
|
22
|
+
import { clsx } from '@finos/legend-art';
|
|
23
|
+
|
|
24
|
+
export const GridItemsViewer = (props: {
|
|
25
|
+
details: GridItemDetail[];
|
|
26
|
+
title: string;
|
|
27
|
+
}) => {
|
|
28
|
+
const gridDetails = props.details;
|
|
29
|
+
const title = props.title;
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<Typography
|
|
33
|
+
className="entitlements-grid-viewer__header"
|
|
34
|
+
variant="h6"
|
|
35
|
+
sx={{ marginBottom: '0.5rem' }}
|
|
36
|
+
>
|
|
37
|
+
{title}
|
|
38
|
+
</Typography>
|
|
39
|
+
<Grid2
|
|
40
|
+
container={true}
|
|
41
|
+
spacing={0}
|
|
42
|
+
sx={{
|
|
43
|
+
'--Grid-borderWidth': '1px',
|
|
44
|
+
borderTop: 'var(--Grid-borderWidth) solid',
|
|
45
|
+
borderLeft: 'var(--Grid-borderWidth) solid',
|
|
46
|
+
borderColor: 'divider',
|
|
47
|
+
'& > div': {
|
|
48
|
+
borderRight: 'var(--Grid-borderWidth) solid',
|
|
49
|
+
borderBottom: 'var(--Grid-borderWidth) solid',
|
|
50
|
+
borderColor: 'divider',
|
|
51
|
+
},
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
{gridDetails.map((gridItem, index) => (
|
|
55
|
+
<>
|
|
56
|
+
<Grid2
|
|
57
|
+
container={false}
|
|
58
|
+
key={gridItem.name}
|
|
59
|
+
size={4}
|
|
60
|
+
sx={{
|
|
61
|
+
alignContent: 'center',
|
|
62
|
+
backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<Typography
|
|
66
|
+
variant="button"
|
|
67
|
+
fontWeight={'bold'}
|
|
68
|
+
sx={{ fontSize: '14px', padding: '6px' }}
|
|
69
|
+
>
|
|
70
|
+
{gridItem.name}
|
|
71
|
+
</Typography>
|
|
72
|
+
</Grid2>
|
|
73
|
+
<Grid2
|
|
74
|
+
container={false}
|
|
75
|
+
size={8}
|
|
76
|
+
sx={{
|
|
77
|
+
alignContent: 'center',
|
|
78
|
+
backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
<Typography
|
|
82
|
+
variant="subtitle1"
|
|
83
|
+
sx={{ fontSize: '14px', padding: '6px' }}
|
|
84
|
+
className={clsx({
|
|
85
|
+
'entitlements-grid-viewer__item-clickable-text': Boolean(
|
|
86
|
+
gridItem.onClick,
|
|
87
|
+
),
|
|
88
|
+
'entitlements-grid-viewer__status--success':
|
|
89
|
+
gridItem.status === GridTiemStatus.SUCCESS,
|
|
90
|
+
'entitlements-grid-viewer__status--error':
|
|
91
|
+
gridItem.status === GridTiemStatus.ERROR,
|
|
92
|
+
'entitlements-grid-viewer__status--in-progress':
|
|
93
|
+
gridItem.status === GridTiemStatus.INFO,
|
|
94
|
+
})}
|
|
95
|
+
onClick={() => gridItem.onClick?.()}
|
|
96
|
+
>
|
|
97
|
+
{gridItem.value}
|
|
98
|
+
</Typography>
|
|
99
|
+
</Grid2>
|
|
100
|
+
</>
|
|
101
|
+
))}
|
|
102
|
+
</Grid2>
|
|
103
|
+
</>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { useAuth } from 'react-oidc-context';
|
|
19
|
+
import { useEffect, useState } from 'react';
|
|
20
|
+
import {
|
|
21
|
+
clsx,
|
|
22
|
+
CubesLoadingIndicator,
|
|
23
|
+
CubesLoadingIndicatorIcon,
|
|
24
|
+
} from '@finos/legend-art';
|
|
25
|
+
import { DataGrid } from '@finos/legend-lego/data-grid';
|
|
26
|
+
import {
|
|
27
|
+
Box,
|
|
28
|
+
Button,
|
|
29
|
+
Dialog,
|
|
30
|
+
DialogActions,
|
|
31
|
+
DialogContent,
|
|
32
|
+
DialogTitle,
|
|
33
|
+
FormControl,
|
|
34
|
+
InputLabel,
|
|
35
|
+
MenuItem,
|
|
36
|
+
Select,
|
|
37
|
+
TextField,
|
|
38
|
+
Typography,
|
|
39
|
+
} from '@mui/material';
|
|
40
|
+
import {
|
|
41
|
+
type V1_DataSubscriptionTarget,
|
|
42
|
+
V1_DataSubscriptionTargetType,
|
|
43
|
+
V1_SnowflakeNetwork,
|
|
44
|
+
V1_SnowflakeRegion,
|
|
45
|
+
V1_SnowflakeTarget,
|
|
46
|
+
} from '@finos/legend-graph';
|
|
47
|
+
import {
|
|
48
|
+
useLakehouseSubscriptionsStore,
|
|
49
|
+
withLakehouseSubscriptionsStore,
|
|
50
|
+
} from './LakehouseSubscriptionsStoreProvider.js';
|
|
51
|
+
import { assertErrorThrown } from '@finos/legend-shared';
|
|
52
|
+
import { flowResult } from 'mobx';
|
|
53
|
+
import type { LakehouseSubscriptionsStore } from '../../../stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js';
|
|
54
|
+
import { LegendMarketplacePage } from '../../LegendMarketplacePage.js';
|
|
55
|
+
|
|
56
|
+
export const LakehouseSubscriptionsCreateDialog = (props: {
|
|
57
|
+
open: boolean;
|
|
58
|
+
onClose: () => void;
|
|
59
|
+
onSubmit: (
|
|
60
|
+
contractId: string,
|
|
61
|
+
target: V1_DataSubscriptionTarget,
|
|
62
|
+
) => Promise<void>;
|
|
63
|
+
}) => {
|
|
64
|
+
const { open, onClose, onSubmit } = props;
|
|
65
|
+
|
|
66
|
+
const [contractId, setContractId] = useState<string>('');
|
|
67
|
+
const [targetType] = useState<V1_DataSubscriptionTargetType>(
|
|
68
|
+
V1_DataSubscriptionTargetType.Snowflake,
|
|
69
|
+
);
|
|
70
|
+
const [snowflakeAccountId, setSnowflakeAccountId] = useState<string>('');
|
|
71
|
+
const [snowflakeRegion] = useState<V1_SnowflakeRegion>(
|
|
72
|
+
V1_SnowflakeRegion.AWS_US_EAST_1,
|
|
73
|
+
);
|
|
74
|
+
const [snowflakeNetwork] = useState<V1_SnowflakeNetwork>(
|
|
75
|
+
V1_SnowflakeNetwork.GOLDMAN,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<Dialog
|
|
80
|
+
open={open}
|
|
81
|
+
onClose={onClose}
|
|
82
|
+
slotProps={{
|
|
83
|
+
paper: {
|
|
84
|
+
component: 'form',
|
|
85
|
+
onSubmit: (event: React.FormEvent<HTMLFormElement>) => {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
if (targetType === V1_DataSubscriptionTargetType.Snowflake) {
|
|
88
|
+
const snowflakeTarget = new V1_SnowflakeTarget();
|
|
89
|
+
snowflakeTarget.snowflakeAccountId = snowflakeAccountId;
|
|
90
|
+
snowflakeTarget.snowflakeRegion = snowflakeRegion;
|
|
91
|
+
snowflakeTarget.snowflakeNetwork = snowflakeNetwork;
|
|
92
|
+
// eslint-disable-next-line no-void
|
|
93
|
+
void onSubmit(contractId, snowflakeTarget);
|
|
94
|
+
onClose();
|
|
95
|
+
} else {
|
|
96
|
+
onClose();
|
|
97
|
+
throw new Error(`Unsupported target type: ${targetType}`);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
<DialogTitle>Create New Subscription</DialogTitle>
|
|
104
|
+
<DialogContent>
|
|
105
|
+
<TextField
|
|
106
|
+
required={true}
|
|
107
|
+
margin="dense"
|
|
108
|
+
id="contractId"
|
|
109
|
+
name="contractId"
|
|
110
|
+
label="Contract ID"
|
|
111
|
+
fullWidth={true}
|
|
112
|
+
variant="outlined"
|
|
113
|
+
value={contractId}
|
|
114
|
+
onChange={(event) => setContractId(event.target.value)}
|
|
115
|
+
/>
|
|
116
|
+
<FormControl fullWidth={true} margin="dense">
|
|
117
|
+
<InputLabel id="target-type-select-label">Target Type</InputLabel>
|
|
118
|
+
<Select
|
|
119
|
+
required={true}
|
|
120
|
+
labelId="target-type-select-label"
|
|
121
|
+
id="target-type-select"
|
|
122
|
+
value={targetType}
|
|
123
|
+
label="Target Type"
|
|
124
|
+
disabled={true}
|
|
125
|
+
>
|
|
126
|
+
{Object.values(V1_DataSubscriptionTargetType).map((_targetType) => (
|
|
127
|
+
<MenuItem key={_targetType} value={_targetType}>
|
|
128
|
+
{_targetType}
|
|
129
|
+
</MenuItem>
|
|
130
|
+
))}
|
|
131
|
+
</Select>
|
|
132
|
+
</FormControl>
|
|
133
|
+
<TextField
|
|
134
|
+
required={true}
|
|
135
|
+
margin="dense"
|
|
136
|
+
id="snowflakeAccountId"
|
|
137
|
+
name="snowflakeAccountId"
|
|
138
|
+
label="Snowflake Account ID"
|
|
139
|
+
fullWidth={true}
|
|
140
|
+
variant="outlined"
|
|
141
|
+
value={snowflakeAccountId}
|
|
142
|
+
onChange={(event) => setSnowflakeAccountId(event.target.value)}
|
|
143
|
+
/>
|
|
144
|
+
<FormControl fullWidth={true} margin="dense">
|
|
145
|
+
<InputLabel id="snowflake-region-select-label">
|
|
146
|
+
Snowflake Region
|
|
147
|
+
</InputLabel>
|
|
148
|
+
<Select
|
|
149
|
+
required={true}
|
|
150
|
+
labelId="snowflake-region-select-label"
|
|
151
|
+
id="snowflake-region-select"
|
|
152
|
+
value={snowflakeRegion}
|
|
153
|
+
label="Snowflake Region"
|
|
154
|
+
disabled={true}
|
|
155
|
+
>
|
|
156
|
+
{Object.values(V1_SnowflakeRegion).map((region) => (
|
|
157
|
+
<MenuItem key={region} value={region}>
|
|
158
|
+
{region}
|
|
159
|
+
</MenuItem>
|
|
160
|
+
))}
|
|
161
|
+
</Select>
|
|
162
|
+
</FormControl>
|
|
163
|
+
<FormControl fullWidth={true} margin="dense">
|
|
164
|
+
<InputLabel id="snowflake-network-select-label">
|
|
165
|
+
Snowflake Network
|
|
166
|
+
</InputLabel>
|
|
167
|
+
<Select
|
|
168
|
+
required={true}
|
|
169
|
+
labelId="snowflake-network-select-label"
|
|
170
|
+
id="snowflake-network-select"
|
|
171
|
+
value={snowflakeNetwork}
|
|
172
|
+
label="Snowflake Network"
|
|
173
|
+
disabled={true}
|
|
174
|
+
>
|
|
175
|
+
{Object.values(V1_SnowflakeNetwork).map((_snowflakeNetwork) => (
|
|
176
|
+
<MenuItem key={_snowflakeNetwork} value={_snowflakeNetwork}>
|
|
177
|
+
{_snowflakeNetwork}
|
|
178
|
+
</MenuItem>
|
|
179
|
+
))}
|
|
180
|
+
</Select>
|
|
181
|
+
</FormControl>
|
|
182
|
+
</DialogContent>
|
|
183
|
+
<DialogActions>
|
|
184
|
+
<Button onClick={onClose} variant="outlined">
|
|
185
|
+
Cancel
|
|
186
|
+
</Button>
|
|
187
|
+
<Button type="submit" variant="contained">
|
|
188
|
+
Create Subsciption
|
|
189
|
+
</Button>
|
|
190
|
+
</DialogActions>
|
|
191
|
+
</Dialog>
|
|
192
|
+
);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export const LakehouseSubscriptionsMainView = observer(
|
|
196
|
+
(props: { subscriptionsStore: LakehouseSubscriptionsStore }) => {
|
|
197
|
+
const { subscriptionsStore } = props;
|
|
198
|
+
const auth = useAuth();
|
|
199
|
+
|
|
200
|
+
const [isCreateDialogOpen, setIsCreateDialogOpen] =
|
|
201
|
+
useState<boolean>(false);
|
|
202
|
+
|
|
203
|
+
const subscriptions = subscriptionsStore.subscriptions;
|
|
204
|
+
|
|
205
|
+
const createDialogHandleSubmit = async (
|
|
206
|
+
contractId: string,
|
|
207
|
+
target: V1_DataSubscriptionTarget,
|
|
208
|
+
): Promise<void> => {
|
|
209
|
+
try {
|
|
210
|
+
const createdSubscription = await subscriptionsStore.createSubscription(
|
|
211
|
+
contractId,
|
|
212
|
+
target,
|
|
213
|
+
auth.user?.access_token,
|
|
214
|
+
);
|
|
215
|
+
subscriptionsStore.applicationStore.notificationService.notifySuccess(
|
|
216
|
+
`Created subscription ${createdSubscription.guid}`,
|
|
217
|
+
);
|
|
218
|
+
flowResult(subscriptionsStore.init(auth.user?.access_token)).catch(
|
|
219
|
+
subscriptionsStore.applicationStore.alertUnhandledError,
|
|
220
|
+
);
|
|
221
|
+
} catch (error) {
|
|
222
|
+
assertErrorThrown(error);
|
|
223
|
+
subscriptionsStore.applicationStore.alertUnhandledError(error);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<>
|
|
229
|
+
<Box className="subscriptions">
|
|
230
|
+
<Box className="subscriptions__header">
|
|
231
|
+
<Typography variant="h4">ALL SUBSCRIPTIONS</Typography>
|
|
232
|
+
<Button
|
|
233
|
+
onClick={() => setIsCreateDialogOpen(true)}
|
|
234
|
+
variant="contained"
|
|
235
|
+
>
|
|
236
|
+
Create New Subscription
|
|
237
|
+
</Button>
|
|
238
|
+
</Box>
|
|
239
|
+
<div
|
|
240
|
+
className={clsx('subscriptions__grid', {
|
|
241
|
+
'ag-theme-balham': true,
|
|
242
|
+
})}
|
|
243
|
+
>
|
|
244
|
+
<DataGrid
|
|
245
|
+
rowData={subscriptions}
|
|
246
|
+
onRowDataUpdated={(params) => {
|
|
247
|
+
params.api.refreshCells({ force: true });
|
|
248
|
+
}}
|
|
249
|
+
suppressFieldDotNotation={true}
|
|
250
|
+
suppressContextMenu={false}
|
|
251
|
+
columnDefs={[
|
|
252
|
+
{
|
|
253
|
+
minWidth: 50,
|
|
254
|
+
sortable: true,
|
|
255
|
+
resizable: true,
|
|
256
|
+
headerName: 'Subscription Id',
|
|
257
|
+
valueGetter: (p) => p.data?.guid,
|
|
258
|
+
flex: 1,
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
minWidth: 50,
|
|
262
|
+
sortable: true,
|
|
263
|
+
resizable: true,
|
|
264
|
+
headerName: 'Contract ID',
|
|
265
|
+
valueGetter: (p) => p.data?.dataContractId,
|
|
266
|
+
flex: 1,
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
minWidth: 50,
|
|
270
|
+
sortable: true,
|
|
271
|
+
resizable: true,
|
|
272
|
+
headerName: 'Target Type',
|
|
273
|
+
valueGetter: (p) =>
|
|
274
|
+
p.data?.target instanceof V1_SnowflakeTarget
|
|
275
|
+
? 'Snowflake'
|
|
276
|
+
: 'Unknown',
|
|
277
|
+
flex: 1,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
minWidth: 50,
|
|
281
|
+
sortable: true,
|
|
282
|
+
resizable: true,
|
|
283
|
+
headerName: 'Snowflake Account ID',
|
|
284
|
+
valueGetter: (p) =>
|
|
285
|
+
p.data?.target instanceof V1_SnowflakeTarget
|
|
286
|
+
? p.data.target.snowflakeAccountId
|
|
287
|
+
: 'Unknown',
|
|
288
|
+
flex: 1,
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
minWidth: 50,
|
|
292
|
+
sortable: true,
|
|
293
|
+
resizable: true,
|
|
294
|
+
headerName: 'Snowflake Region',
|
|
295
|
+
valueGetter: (p) =>
|
|
296
|
+
p.data?.target instanceof V1_SnowflakeTarget
|
|
297
|
+
? p.data.target.snowflakeRegion
|
|
298
|
+
: 'Unknown',
|
|
299
|
+
flex: 1,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
minWidth: 50,
|
|
303
|
+
sortable: true,
|
|
304
|
+
resizable: true,
|
|
305
|
+
headerName: 'Snowflake Network',
|
|
306
|
+
valueGetter: (p) =>
|
|
307
|
+
p.data?.target instanceof V1_SnowflakeTarget
|
|
308
|
+
? p.data.target.snowflakeNetwork
|
|
309
|
+
: 'Unknown',
|
|
310
|
+
flex: 1,
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
minWidth: 50,
|
|
314
|
+
sortable: true,
|
|
315
|
+
resizable: true,
|
|
316
|
+
headerName: 'Created By',
|
|
317
|
+
valueGetter: (p) => p.data?.createdBy,
|
|
318
|
+
flex: 1,
|
|
319
|
+
},
|
|
320
|
+
]}
|
|
321
|
+
/>
|
|
322
|
+
</div>
|
|
323
|
+
</Box>
|
|
324
|
+
<LakehouseSubscriptionsCreateDialog
|
|
325
|
+
open={isCreateDialogOpen}
|
|
326
|
+
onClose={() => setIsCreateDialogOpen(false)}
|
|
327
|
+
onSubmit={createDialogHandleSubmit}
|
|
328
|
+
/>
|
|
329
|
+
</>
|
|
330
|
+
);
|
|
331
|
+
},
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
export const LakehouseSubscriptions = withLakehouseSubscriptionsStore(
|
|
335
|
+
observer(() => {
|
|
336
|
+
const subscriptionsStore = useLakehouseSubscriptionsStore();
|
|
337
|
+
const auth = useAuth();
|
|
338
|
+
|
|
339
|
+
useEffect(() => {
|
|
340
|
+
subscriptionsStore.init(auth.user?.access_token);
|
|
341
|
+
}, [auth.user?.access_token, subscriptionsStore]);
|
|
342
|
+
|
|
343
|
+
return (
|
|
344
|
+
<LegendMarketplacePage className="legend-marketplace-lakehouse-subscriptions">
|
|
345
|
+
<CubesLoadingIndicator
|
|
346
|
+
isLoading={Boolean(
|
|
347
|
+
subscriptionsStore.initializationState.isInProgress,
|
|
348
|
+
)}
|
|
349
|
+
>
|
|
350
|
+
<CubesLoadingIndicatorIcon />
|
|
351
|
+
</CubesLoadingIndicator>
|
|
352
|
+
<LakehouseSubscriptionsMainView
|
|
353
|
+
subscriptionsStore={subscriptionsStore}
|
|
354
|
+
/>
|
|
355
|
+
</LegendMarketplacePage>
|
|
356
|
+
);
|
|
357
|
+
}),
|
|
358
|
+
);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { createContext, useContext } from 'react';
|
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
20
|
+
import {
|
|
21
|
+
useLegendMarketplaceApplicationStore,
|
|
22
|
+
useLegendMarketplaceBaseStore,
|
|
23
|
+
} from '../../../application/LegendMarketplaceFrameworkProvider.js';
|
|
24
|
+
import { LakehouseSubscriptionsStore } from '../../../stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js';
|
|
25
|
+
|
|
26
|
+
const LakehouseSubscriptionsStoreContext = createContext<
|
|
27
|
+
LakehouseSubscriptionsStore | undefined
|
|
28
|
+
>(undefined);
|
|
29
|
+
|
|
30
|
+
export const LakehouseSubscriptionsStoreProvider: React.FC<{
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}> = ({ children }) => {
|
|
33
|
+
const applicationStore = useLegendMarketplaceApplicationStore();
|
|
34
|
+
const baseStore = useLegendMarketplaceBaseStore();
|
|
35
|
+
const lakehouseServerClient = guaranteeNonNullable(
|
|
36
|
+
baseStore.lakehouseServerClient,
|
|
37
|
+
'lakehouse server client required to render',
|
|
38
|
+
);
|
|
39
|
+
const store = useLocalObservable(
|
|
40
|
+
() =>
|
|
41
|
+
new LakehouseSubscriptionsStore(applicationStore, lakehouseServerClient),
|
|
42
|
+
);
|
|
43
|
+
return (
|
|
44
|
+
<LakehouseSubscriptionsStoreContext.Provider value={store}>
|
|
45
|
+
{children}
|
|
46
|
+
</LakehouseSubscriptionsStoreContext.Provider>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const useLakehouseSubscriptionsStore = (): LakehouseSubscriptionsStore =>
|
|
51
|
+
guaranteeNonNullable(
|
|
52
|
+
useContext(LakehouseSubscriptionsStoreContext),
|
|
53
|
+
`Can't find lakehouse subscriptions store in context`,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export const withLakehouseSubscriptionsStore = (
|
|
57
|
+
WrappedComponent: React.FC,
|
|
58
|
+
): React.FC =>
|
|
59
|
+
function WithLakehouseSubscriptionsStore() {
|
|
60
|
+
return (
|
|
61
|
+
<LakehouseSubscriptionsStoreProvider>
|
|
62
|
+
<WrappedComponent />
|
|
63
|
+
</LakehouseSubscriptionsStoreProvider>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { clsx } from '@finos/legend-art';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import type React from 'react';
|
|
20
|
+
|
|
21
|
+
export const LegendMarketplacePage = observer(
|
|
22
|
+
(props: { className?: string; children: React.ReactNode }) => {
|
|
23
|
+
const { className, children } = props;
|
|
24
|
+
return <div className={clsx('app__page', className)}>{children}</div>;
|
|
25
|
+
},
|
|
26
|
+
);
|