@finos/legend-application-marketplace 0.0.20 → 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 +2 -0
- package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceNavigation.js +10 -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/LegendMarketplaceWebApplication.d.ts.map +1 -1
- package/lib/application/LegendMarketplaceWebApplication.js +12 -9
- 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} +3 -3
- 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 +39 -6
- 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/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts +23 -0
- package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts.map +1 -0
- package/lib/{components/Lakehouse/entitlements/LakehouseEntitlements.js → pages/Lakehouse/entitlements/EntitlementsDashboard.js} +10 -86
- package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js.map +1 -0
- package/lib/{components/Lakehouse/entitlements/DataContractCreator.d.ts → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts} +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts.map +1 -0
- package/lib/{components/Lakehouse/entitlements/DataContractCreator.js → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js} +1 -1
- 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.map +1 -0
- package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.js +4 -6
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +1 -0
- package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +1 -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 +3 -0
- package/lib/stores/LakehouseContractServerClient.d.ts.map +1 -1
- package/lib/stores/LakehouseContractServerClient.js +11 -0
- 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/LakehouseUtils.d.ts +29 -1
- package/lib/stores/lakehouse/LakehouseUtils.d.ts.map +1 -1
- package/lib/stores/lakehouse/LakehouseUtils.js +203 -1
- package/lib/stores/lakehouse/LakehouseUtils.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.d.ts → EntitlementsDashboardState.d.ts} +2 -2
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.js → EntitlementsDashboardState.js} +12 -3
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -0
- package/lib/stores/lakehouse/entitlements/{DataContractState.d.ts → EntitlementsDataContractViewerState.d.ts} +11 -8
- 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/{DataContractTaskState.d.ts → EntitlementsTaskViewerState.d.ts} +12 -6
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts.map +1 -0
- package/lib/stores/lakehouse/entitlements/{DataContractTaskState.js → EntitlementsTaskViewerState.js} +39 -21
- package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js.map +1 -0
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts +4 -5
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js +30 -13
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js.map +1 -1
- package/package.json +5 -4
- package/src/__lib__/LegendMarketplaceNavigation.ts +15 -1
- package/src/application/LegendMarketplaceApplicationConfig.ts +25 -0
- package/src/application/LegendMarketplaceWebApplication.tsx +32 -13
- 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} +2 -2
- 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 +77 -7
- package/src/{components → pages}/Lakehouse/LakehouseDataProduct.tsx +14 -23
- package/src/pages/Lakehouse/MarketplaceLakehouseHome.tsx +167 -0
- package/src/{components/Lakehouse/entitlements/LakehouseEntitlements.tsx → pages/Lakehouse/entitlements/EntitlementsDashboard.tsx} +20 -247
- 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/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.tsx +15 -27
- 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 +29 -0
- package/src/stores/LegendMarketplaceBaseStore.ts +16 -1
- package/src/stores/lakehouse/LakehouseUtils.ts +252 -0
- package/src/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.ts → EntitlementsDashboardState.ts} +19 -3
- package/src/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.ts +101 -0
- package/src/stores/lakehouse/entitlements/{DataContractTaskState.ts → EntitlementsTaskViewerState.ts} +62 -24
- package/src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts +44 -23
- package/tsconfig.json +23 -17
- 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 -51
- 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/DataContractCreator.d.ts.map +0 -1
- package/lib/components/Lakehouse/entitlements/DataContractCreator.js.map +0 -1
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts +0 -28
- package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +0 -1
- 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/components/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts.map +0 -1
- package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +0 -1
- package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +0 -1
- package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractState.d.ts.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractState.js +0 -127
- package/lib/stores/lakehouse/entitlements/DataContractState.js.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractTaskState.d.ts.map +0 -1
- package/lib/stores/lakehouse/entitlements/DataContractTaskState.js.map +0 -1
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsMainViewState.d.ts.map +0 -1
- package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsMainViewState.js.map +0 -1
- package/src/components/Lakehouse/LakehouseMarketplace.tsx +0 -184
- package/src/stores/lakehouse/entitlements/DataContractState.ts +0 -142
- /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/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts +0 -0
- /package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.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/Lakehouse/entitlements/DataContractCreator.tsx → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.tsx} +0 -0
- /package/src/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.tsx +0 -0
- /package/src/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.tsx +0 -0
|
@@ -15,50 +15,47 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { type JSX } from 'react';
|
|
18
|
-
import {
|
|
18
|
+
import { Chip } from '@mui/material';
|
|
19
19
|
import { clsx } from '@finos/legend-art';
|
|
20
20
|
import type { LightDataProduct } from '@finos/legend-server-marketplace';
|
|
21
|
+
import { LegendMarketplaceCard } from '../MarketplaceCard/LegendMarketplaceCard.js';
|
|
21
22
|
|
|
22
23
|
export const LegendMarketplaceLightDataProductCard = (props: {
|
|
23
24
|
dataAsset: LightDataProduct;
|
|
24
25
|
onClick: (dataAsset: LightDataProduct) => void;
|
|
25
26
|
}): JSX.Element => {
|
|
26
27
|
const { dataAsset, onClick } = props;
|
|
28
|
+
|
|
29
|
+
const content = (
|
|
30
|
+
<>
|
|
31
|
+
<Chip
|
|
32
|
+
label={dataAsset.type}
|
|
33
|
+
className={clsx('legend-marketplace-light-data-product-card__type', {
|
|
34
|
+
'legend-marketplace-light-data-product-card__type--vendor':
|
|
35
|
+
dataAsset.type === 'vendor',
|
|
36
|
+
'legend-marketplace-light-data-product-card__type--curated':
|
|
37
|
+
dataAsset.type === 'curated',
|
|
38
|
+
})}
|
|
39
|
+
/>
|
|
40
|
+
<div className="legend-marketplace-light-data-product-card__name">
|
|
41
|
+
{dataAsset.provider}
|
|
42
|
+
</div>
|
|
43
|
+
<div className="legend-marketplace-light-data-product-card__description">
|
|
44
|
+
{dataAsset.description}
|
|
45
|
+
</div>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const moreInfo = dataAsset.moreInfo ? (
|
|
50
|
+
<div>{dataAsset.moreInfo}</div>
|
|
51
|
+
) : undefined;
|
|
52
|
+
|
|
27
53
|
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
sx={{ height: '100%' }}
|
|
35
|
-
>
|
|
36
|
-
<CardContent className="legend-marketplace-light-data-product-card__content">
|
|
37
|
-
<Chip
|
|
38
|
-
label={dataAsset.type}
|
|
39
|
-
className={clsx(
|
|
40
|
-
'legend-marketplace-light-data-product-card__type',
|
|
41
|
-
{
|
|
42
|
-
'legend-marketplace-light-data-product-card__type--vendor':
|
|
43
|
-
dataAsset.type === 'vendor',
|
|
44
|
-
'legend-marketplace-light-data-product-card__type--curated':
|
|
45
|
-
dataAsset.type === 'curated',
|
|
46
|
-
},
|
|
47
|
-
)}
|
|
48
|
-
/>
|
|
49
|
-
<div className="legend-marketplace-light-data-product-card__name">
|
|
50
|
-
{dataAsset.provider}
|
|
51
|
-
</div>
|
|
52
|
-
<div className="legend-marketplace-light-data-product-card__description">
|
|
53
|
-
{dataAsset.description}
|
|
54
|
-
</div>
|
|
55
|
-
</CardContent>
|
|
56
|
-
{dataAsset.moreInfo.length > 0 && (
|
|
57
|
-
<CardContent className="legend-marketplace-light-data-product-card__more-info">
|
|
58
|
-
<div>{dataAsset.moreInfo}</div>
|
|
59
|
-
</CardContent>
|
|
60
|
-
)}
|
|
61
|
-
</CardActionArea>
|
|
62
|
-
</Card>
|
|
54
|
+
<LegendMarketplaceCard
|
|
55
|
+
size="small"
|
|
56
|
+
content={content}
|
|
57
|
+
onClick={() => onClick(dataAsset)}
|
|
58
|
+
moreInfo={moreInfo}
|
|
59
|
+
/>
|
|
63
60
|
);
|
|
64
61
|
};
|
package/src/components/{Lakehouse/LakehouseHeader.tsx → Header/MarketplaceLakehouseHeader.tsx}
RENAMED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
MenuContentItem,
|
|
24
24
|
MenuIcon,
|
|
25
25
|
} from '@finos/legend-art';
|
|
26
|
-
import { LegendMarketplaceAppInfo } from '
|
|
26
|
+
import { LegendMarketplaceAppInfo } from '../../components/Header/LegendMarketplaceAppInfo.js';
|
|
27
27
|
import { useState } from 'react';
|
|
28
28
|
|
|
29
29
|
const LakehouseHeaderMenu = observer(() => {
|
|
@@ -87,7 +87,7 @@ const LakehousePlaceHeaderTabs = observer(() => {
|
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
export const
|
|
90
|
+
export const MarketplaceLakehouseHeader = observer(() => {
|
|
91
91
|
const applicationStore = useApplicationStore();
|
|
92
92
|
|
|
93
93
|
const navigateToHome = (): void => {
|
|
@@ -0,0 +1,98 @@
|
|
|
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 { useRef, useState, type JSX } from 'react';
|
|
18
|
+
import {
|
|
19
|
+
Card,
|
|
20
|
+
CardActionArea,
|
|
21
|
+
CardActions,
|
|
22
|
+
CardContent,
|
|
23
|
+
Slide,
|
|
24
|
+
} from '@mui/material';
|
|
25
|
+
import { clsx } from '@finos/legend-art';
|
|
26
|
+
|
|
27
|
+
export const LegendMarketplaceCard = (props: {
|
|
28
|
+
content: JSX.Element;
|
|
29
|
+
size: 'small' | 'large';
|
|
30
|
+
actions?: JSX.Element;
|
|
31
|
+
onClick?: () => void;
|
|
32
|
+
moreInfo?: JSX.Element | undefined;
|
|
33
|
+
className?: string;
|
|
34
|
+
}): JSX.Element => {
|
|
35
|
+
const { content, size, actions, onClick, moreInfo, className } = props;
|
|
36
|
+
|
|
37
|
+
const [isMouseOver, setIsMouseOver] = useState(false);
|
|
38
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
39
|
+
|
|
40
|
+
const CardContentComponent = (
|
|
41
|
+
<>
|
|
42
|
+
<CardContent
|
|
43
|
+
className={clsx('legend-marketplace-card__content', {
|
|
44
|
+
'legend-marketplace-card__content--with-actions':
|
|
45
|
+
actions !== undefined,
|
|
46
|
+
})}
|
|
47
|
+
>
|
|
48
|
+
{content}
|
|
49
|
+
</CardContent>
|
|
50
|
+
{actions && (
|
|
51
|
+
<CardActions className="legend-marketplace-card__actions">
|
|
52
|
+
{actions}
|
|
53
|
+
</CardActions>
|
|
54
|
+
)}
|
|
55
|
+
{moreInfo && (
|
|
56
|
+
<Slide direction="up" in={isMouseOver} container={containerRef.current}>
|
|
57
|
+
<CardContent className="legend-marketplace-card__more-info">
|
|
58
|
+
{moreInfo}
|
|
59
|
+
</CardContent>
|
|
60
|
+
</Slide>
|
|
61
|
+
)}
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Card
|
|
67
|
+
variant="outlined"
|
|
68
|
+
className={clsx(
|
|
69
|
+
'legend-marketplace-card',
|
|
70
|
+
{
|
|
71
|
+
'legend-marketplace-card--small': size === 'small',
|
|
72
|
+
'legend-marketplace-card--large': size === 'large',
|
|
73
|
+
},
|
|
74
|
+
className,
|
|
75
|
+
)}
|
|
76
|
+
ref={containerRef}
|
|
77
|
+
>
|
|
78
|
+
{onClick ? (
|
|
79
|
+
<CardActionArea
|
|
80
|
+
onClick={onClick}
|
|
81
|
+
onMouseEnter={() => setIsMouseOver(true)}
|
|
82
|
+
onMouseLeave={() => setIsMouseOver(false)}
|
|
83
|
+
className="legend-marketplace-card__content-container"
|
|
84
|
+
>
|
|
85
|
+
{CardContentComponent}
|
|
86
|
+
</CardActionArea>
|
|
87
|
+
) : (
|
|
88
|
+
<div
|
|
89
|
+
onMouseEnter={() => setIsMouseOver(true)}
|
|
90
|
+
onMouseLeave={() => setIsMouseOver(false)}
|
|
91
|
+
className="legend-marketplace-card__content-container"
|
|
92
|
+
>
|
|
93
|
+
{CardContentComponent}
|
|
94
|
+
</div>
|
|
95
|
+
)}
|
|
96
|
+
</Card>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
@@ -15,53 +15,61 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { type JSX } from 'react';
|
|
18
|
-
import { Button,
|
|
18
|
+
import { Button, Chip } from '@mui/material';
|
|
19
19
|
import type { ProviderResult } from '@finos/legend-server-marketplace';
|
|
20
20
|
import { CheckCircleIcon, ShoppingCartIcon } from '@finos/legend-art';
|
|
21
|
+
import { LegendMarketplaceCard } from '../MarketplaceCard/LegendMarketplaceCard.js';
|
|
21
22
|
|
|
22
23
|
export const LegendMarketplaceProviderCard = (props: {
|
|
23
24
|
providerResult: ProviderResult;
|
|
24
25
|
onAddToCartClick: (providerResult: ProviderResult) => void;
|
|
25
26
|
}): JSX.Element => {
|
|
26
27
|
const { providerResult, onAddToCartClick } = props;
|
|
28
|
+
|
|
29
|
+
const content = (
|
|
30
|
+
<>
|
|
31
|
+
<div className="legend-marketplace-vendor-data-card__vendor-name">
|
|
32
|
+
{providerResult.providerName}
|
|
33
|
+
</div>
|
|
34
|
+
<div className="legend-marketplace-vendor-data-card__product-name">
|
|
35
|
+
{providerResult.productName || 'N/A'}
|
|
36
|
+
</div>
|
|
37
|
+
<div className="legend-marketplace-vendor-data-card__vendor-name__description">
|
|
38
|
+
{providerResult.description}
|
|
39
|
+
</div>
|
|
40
|
+
</>
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const actions = providerResult.isOwned ? (
|
|
44
|
+
<div className="legend-marketplace-vendor-data-card__vendor-name__owned">
|
|
45
|
+
Already have access <CheckCircleIcon />
|
|
46
|
+
</div>
|
|
47
|
+
) : (
|
|
48
|
+
<>
|
|
49
|
+
<Button
|
|
50
|
+
variant="outlined"
|
|
51
|
+
className="legend-marketplace-vendor-data-card__add-to-cart-button"
|
|
52
|
+
onClick={() => onAddToCartClick(providerResult)}
|
|
53
|
+
>
|
|
54
|
+
Add to cart
|
|
55
|
+
<ShoppingCartIcon />
|
|
56
|
+
</Button>
|
|
57
|
+
{typeof providerResult.price === 'number' && (
|
|
58
|
+
<Chip
|
|
59
|
+
label={`$${providerResult.price.toFixed(2)} per month`}
|
|
60
|
+
className="legend-marketplace-vendor-data-card__price"
|
|
61
|
+
sx={{ color: 'white', backgroundColor: '#077d55' }}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
|
|
27
67
|
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{providerResult.productName || 'N/A'}
|
|
35
|
-
</div>
|
|
36
|
-
<div className="legend-marketplace-vendor-data-card__vendor-name__description">
|
|
37
|
-
{providerResult.description}
|
|
38
|
-
</div>
|
|
39
|
-
</CardContent>
|
|
40
|
-
<CardActions className="legend-marketplace-vendor-data-card-button-group">
|
|
41
|
-
{providerResult.isOwned ? (
|
|
42
|
-
<div className="legend-marketplace-vendor-data-card__vendor-name__owned">
|
|
43
|
-
Already have access <CheckCircleIcon />
|
|
44
|
-
</div>
|
|
45
|
-
) : (
|
|
46
|
-
<>
|
|
47
|
-
<Button
|
|
48
|
-
variant="outlined"
|
|
49
|
-
className="vendor-data-card-add-to-cart-button"
|
|
50
|
-
onClick={() => onAddToCartClick(providerResult)}
|
|
51
|
-
>
|
|
52
|
-
Add to cart
|
|
53
|
-
<ShoppingCartIcon />
|
|
54
|
-
</Button>
|
|
55
|
-
{typeof providerResult.price === 'number' && (
|
|
56
|
-
<Chip
|
|
57
|
-
label={`$${providerResult.price.toFixed(2)} per month`}
|
|
58
|
-
className="legend-marketplace-vendor-data-card-button-group__price"
|
|
59
|
-
sx={{ color: 'white', backgroundColor: '#077d55' }}
|
|
60
|
-
/>
|
|
61
|
-
)}
|
|
62
|
-
</>
|
|
63
|
-
)}
|
|
64
|
-
</CardActions>
|
|
65
|
-
</Card>
|
|
68
|
+
<LegendMarketplaceCard
|
|
69
|
+
size="large"
|
|
70
|
+
content={content}
|
|
71
|
+
actions={actions}
|
|
72
|
+
className="legend-marketplace-vendor-data-card"
|
|
73
|
+
/>
|
|
66
74
|
);
|
|
67
75
|
};
|
|
@@ -22,20 +22,17 @@ import {
|
|
|
22
22
|
ApplicationStoreProvider,
|
|
23
23
|
} from '@finos/legend-application';
|
|
24
24
|
import { TEST__BrowserEnvironmentProvider } from '@finos/legend-application/test';
|
|
25
|
-
import { Route, Routes } from '@finos/legend-application/browser';
|
|
26
25
|
import {
|
|
27
26
|
type LegendMarketplaceApplicationStore,
|
|
28
27
|
LegendMarketplaceBaseStore,
|
|
29
28
|
} from '../../stores/LegendMarketplaceBaseStore.js';
|
|
30
|
-
import { LEGEND_MARKETPLACE_ROUTE_PATTERN } from '../../__lib__/LegendMarketplaceNavigation.js';
|
|
31
|
-
import { LegendMarketplaceHome } from '../../pages/Home/LegendMarketplaceHome.js';
|
|
32
29
|
import { LEGEND_MARKETPLACE_TEST_ID } from '../../__lib__/LegendMarketplaceTesting.js';
|
|
33
30
|
import { LegendMarketplacePluginManager } from '../../application/LegendMarketplacePluginManager.js';
|
|
34
31
|
import { Core_LegendMarketplaceApplicationPlugin } from '../../application/extensions/Core_LegendMarketplaceApplicationPlugin.js';
|
|
35
32
|
import { TEST__getTestLegendMarketplaceApplicationConfig } from '../../application/__test-utils__/LegendMarketplaceApplicationTestUtils.js';
|
|
36
33
|
import { LegendMarketplaceFrameworkProvider } from '../../application/LegendMarketplaceFrameworkProvider.js';
|
|
37
34
|
import searchResults from './TEST_DATA__SearchResults.json' with { type: 'json' };
|
|
38
|
-
import {
|
|
35
|
+
import { LegendMarketplaceWebApplicationRouter } from '../../application/LegendMarketplaceWebApplication.js';
|
|
39
36
|
|
|
40
37
|
export const TEST__provideMockedLegendMarketplaceBaseStore =
|
|
41
38
|
async (customization?: {
|
|
@@ -86,16 +83,7 @@ export const TEST__setUpMarketplace = async (
|
|
|
86
83
|
<ApplicationStoreProvider store={MOCK__store.applicationStore}>
|
|
87
84
|
<TEST__BrowserEnvironmentProvider initialEntries={[route ?? '/']}>
|
|
88
85
|
<LegendMarketplaceFrameworkProvider>
|
|
89
|
-
<
|
|
90
|
-
<Route
|
|
91
|
-
path={LEGEND_MARKETPLACE_ROUTE_PATTERN.DEFAULT}
|
|
92
|
-
element={<LegendMarketplaceHome />}
|
|
93
|
-
/>
|
|
94
|
-
<Route
|
|
95
|
-
path={LEGEND_MARKETPLACE_ROUTE_PATTERN.SEARCH_RESULTS}
|
|
96
|
-
element={<LegendMarketplaceSearchResults />}
|
|
97
|
-
/>
|
|
98
|
-
</Routes>
|
|
86
|
+
<LegendMarketplaceWebApplicationRouter />
|
|
99
87
|
</LegendMarketplaceFrameworkProvider>
|
|
100
88
|
</TEST__BrowserEnvironmentProvider>
|
|
101
89
|
</ApplicationStoreProvider>,
|
|
@@ -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 {
|
|
22
21
|
generateSearchResultsRoute,
|
|
@@ -26,6 +25,7 @@ import type { LightDataProduct } from '@finos/legend-server-marketplace';
|
|
|
26
25
|
import { shuffle } from '@finos/legend-shared';
|
|
27
26
|
import { LegendMarketplaceLightDataProductCard } from '../../components/DataProductCard/LegendMarketplaceLightDataProductCard.js';
|
|
28
27
|
import { Grid2 as Grid } from '@mui/material';
|
|
28
|
+
import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
|
|
29
29
|
|
|
30
30
|
// Temporary placeholder data for assets
|
|
31
31
|
|
|
@@ -81,57 +81,48 @@ export const LegendMarketplaceHome = observer(() => {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
|
-
<
|
|
85
|
-
<div className="legend-marketplace-
|
|
86
|
-
<div className="legend-marketplace-
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
<h1>
|
|
92
|
-
<span style={{ color: '#76A1E3' }}>All data in </span>
|
|
93
|
-
<span style={{ color: 'white' }}>One Place</span>
|
|
94
|
-
</h1>
|
|
95
|
-
</div>
|
|
96
|
-
<div className="legend-marketplace-home__landing__description">
|
|
97
|
-
<h3>
|
|
98
|
-
Discover the right data and accelerate analytic productivity.
|
|
99
|
-
</h3>
|
|
100
|
-
</div>
|
|
101
|
-
<div className="legend-marketplace-home__landing__search-bar">
|
|
102
|
-
<LegendMarketplaceSearchBar onSearch={onSearch} />
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
<div className="legend-marketplace-home__vendors-title">
|
|
106
|
-
<h3>Explore our Data</h3>
|
|
107
|
-
</div>
|
|
108
|
-
<div className="legend-marketplace-home__vendors-cards">
|
|
109
|
-
<Grid
|
|
110
|
-
container={true}
|
|
111
|
-
spacing={{ xs: 2, md: 3, xl: 4 }}
|
|
112
|
-
columns={{ xs: 1, sm: 2, md: 3, xl: 6 }}
|
|
113
|
-
sx={{ justifyContent: 'center' }}
|
|
114
|
-
>
|
|
115
|
-
{shuffle(dataAssets).map((asset) => (
|
|
116
|
-
<Grid
|
|
117
|
-
key={`${asset.provider}.${asset.type}.${asset.description}`}
|
|
118
|
-
size={1}
|
|
119
|
-
>
|
|
120
|
-
<LegendMarketplaceLightDataProductCard
|
|
121
|
-
dataAsset={asset}
|
|
122
|
-
onClick={(dataAsset: LightDataProduct) => {
|
|
123
|
-
applicationStore.navigationService.navigator.goToLocation(
|
|
124
|
-
generateVendorDetailsRoute(dataAsset.provider),
|
|
125
|
-
);
|
|
126
|
-
}}
|
|
127
|
-
/>
|
|
128
|
-
</Grid>
|
|
129
|
-
))}
|
|
130
|
-
</Grid>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
84
|
+
<LegendMarketplacePage className="legend-marketplace-home">
|
|
85
|
+
<div className="legend-marketplace-home__landing">
|
|
86
|
+
<div className="legend-marketplace-home__landing__title">
|
|
87
|
+
<h1>
|
|
88
|
+
<span style={{ color: '#76A1E3' }}>All data in </span>
|
|
89
|
+
<span style={{ color: 'white' }}>One Place</span>
|
|
90
|
+
</h1>
|
|
133
91
|
</div>
|
|
92
|
+
<div className="legend-marketplace-home__landing__description">
|
|
93
|
+
<h3>Discover the right data and accelerate analytic productivity.</h3>
|
|
94
|
+
</div>
|
|
95
|
+
<div className="legend-marketplace-home__landing__search-bar">
|
|
96
|
+
<LegendMarketplaceSearchBar onSearch={onSearch} />
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div className="legend-marketplace-home__vendors-title">
|
|
100
|
+
<h3>Explore our Data</h3>
|
|
101
|
+
</div>
|
|
102
|
+
<div className="legend-marketplace-home__vendors-cards">
|
|
103
|
+
<Grid
|
|
104
|
+
container={true}
|
|
105
|
+
spacing={{ xs: 2, md: 3, xl: 4 }}
|
|
106
|
+
columns={{ xs: 1, sm: 2, md: 3, xl: 6 }}
|
|
107
|
+
sx={{ justifyContent: 'center' }}
|
|
108
|
+
>
|
|
109
|
+
{shuffle(dataAssets).map((asset) => (
|
|
110
|
+
<Grid
|
|
111
|
+
key={`${asset.provider}.${asset.type}.${asset.description}`}
|
|
112
|
+
size={1}
|
|
113
|
+
>
|
|
114
|
+
<LegendMarketplaceLightDataProductCard
|
|
115
|
+
dataAsset={asset}
|
|
116
|
+
onClick={(dataAsset: LightDataProduct) => {
|
|
117
|
+
applicationStore.navigationService.navigator.goToLocation(
|
|
118
|
+
generateVendorDetailsRoute(dataAsset.provider),
|
|
119
|
+
);
|
|
120
|
+
}}
|
|
121
|
+
/>
|
|
122
|
+
</Grid>
|
|
123
|
+
))}
|
|
124
|
+
</Grid>
|
|
134
125
|
</div>
|
|
135
|
-
</
|
|
126
|
+
</LegendMarketplacePage>
|
|
136
127
|
);
|
|
137
128
|
});
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
18
|
AnchorLinkIcon,
|
|
19
|
-
ChevronDownIcon,
|
|
20
19
|
clsx,
|
|
21
20
|
MarkdownTextViewer,
|
|
22
21
|
QuestionCircleIcon,
|
|
@@ -27,7 +26,7 @@ import {
|
|
|
27
26
|
DATA_PRODUCT_VIEWER_ACTIVITY_MODE,
|
|
28
27
|
generateAnchorForActivity,
|
|
29
28
|
} from '../../stores/lakehouse/DataProductViewerNavigation.js';
|
|
30
|
-
import { useEffect, useRef } from 'react';
|
|
29
|
+
import { useEffect, useRef, useState } from 'react';
|
|
31
30
|
import type { DataProductViewerState } from '../../stores/lakehouse/DataProductViewerState.js';
|
|
32
31
|
import { useApplicationStore } from '@finos/legend-application';
|
|
33
32
|
import {
|
|
@@ -38,8 +37,20 @@ import {
|
|
|
38
37
|
DataGrid,
|
|
39
38
|
type DataGridCellRendererParams,
|
|
40
39
|
} from '@finos/legend-lego/data-grid';
|
|
41
|
-
import
|
|
42
|
-
|
|
40
|
+
import {
|
|
41
|
+
type V1_RawLambda,
|
|
42
|
+
V1_RenderStyle,
|
|
43
|
+
type V1_LakehouseAccessPoint,
|
|
44
|
+
} from '@finos/legend-graph';
|
|
45
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
|
46
|
+
import {
|
|
47
|
+
CODE_EDITOR_LANGUAGE,
|
|
48
|
+
CODE_EDITOR_THEME,
|
|
49
|
+
} from '@finos/legend-code-editor';
|
|
50
|
+
import { Tab, Tabs } from '@mui/material';
|
|
51
|
+
import { useLegendMarketplaceBaseStore } from '../../application/LegendMarketplaceFrameworkProvider.js';
|
|
52
|
+
import { type PlainObject } from '@finos/legend-shared';
|
|
53
|
+
import { DataContractCreator } from './entitlements/EntitlementsDataContractCreator.js';
|
|
43
54
|
|
|
44
55
|
export const DataProductMarkdownTextViewer: React.FC<{ value: string }> = (
|
|
45
56
|
props,
|
|
@@ -77,12 +88,68 @@ const TDSColumnMoreInfoCellRenderer = (
|
|
|
77
88
|
params: DataGridCellRendererParams<V1_LakehouseAccessPoint>,
|
|
78
89
|
): React.ReactNode => {
|
|
79
90
|
const data = params.data;
|
|
91
|
+
const store = useLegendMarketplaceBaseStore();
|
|
92
|
+
const enum MoreInfoTabs {
|
|
93
|
+
GRAMMAR = 'Grammar',
|
|
94
|
+
}
|
|
95
|
+
const [activeTab, setActiveTab] = useState(MoreInfoTabs.GRAMMAR);
|
|
96
|
+
const handleTabChange = (
|
|
97
|
+
event: React.SyntheticEvent,
|
|
98
|
+
newValue: MoreInfoTabs,
|
|
99
|
+
) => {
|
|
100
|
+
setActiveTab(newValue);
|
|
101
|
+
};
|
|
102
|
+
const [accessPointGrammar, setAccessPointGrammar] =
|
|
103
|
+
useState<string>('Loading ...');
|
|
104
|
+
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!data) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const fetchGrammar = async () => {
|
|
111
|
+
try {
|
|
112
|
+
const grammar = await store.engineServerClient.JSONToGrammar_lambda(
|
|
113
|
+
data.func as unknown as PlainObject<V1_RawLambda>,
|
|
114
|
+
V1_RenderStyle.PRETTY,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
setAccessPointGrammar(grammar);
|
|
118
|
+
} catch {
|
|
119
|
+
throw new Error('Error fetching access point grammar');
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
fetchGrammar().catch((error) => {
|
|
124
|
+
throw new Error(`Error fetching access point grammar: ${error.message}`);
|
|
125
|
+
});
|
|
126
|
+
}, [data, store]);
|
|
127
|
+
|
|
80
128
|
if (!data) {
|
|
81
129
|
return null;
|
|
82
130
|
}
|
|
131
|
+
|
|
83
132
|
return (
|
|
84
|
-
<div
|
|
85
|
-
<
|
|
133
|
+
<div>
|
|
134
|
+
<Tabs value={activeTab} onChange={handleTabChange}>
|
|
135
|
+
<Tab label={MoreInfoTabs.GRAMMAR} value={MoreInfoTabs.GRAMMAR} />
|
|
136
|
+
</Tabs>
|
|
137
|
+
|
|
138
|
+
<div
|
|
139
|
+
className="data-space__viewer__more-info__container"
|
|
140
|
+
style={{ height: '200px', width: '100%' }}
|
|
141
|
+
>
|
|
142
|
+
<CodeEditor
|
|
143
|
+
inputValue={accessPointGrammar}
|
|
144
|
+
isReadOnly={true}
|
|
145
|
+
language={CODE_EDITOR_LANGUAGE.TEXT}
|
|
146
|
+
hideMinimap={true}
|
|
147
|
+
hideGutter={true}
|
|
148
|
+
hideActionBar={true}
|
|
149
|
+
lightTheme={CODE_EDITOR_THEME.GITHUB_LIGHT}
|
|
150
|
+
extraEditorOptions={{ scrollBeyondLastLine: false, wordWrap: 'on' }}
|
|
151
|
+
/>
|
|
152
|
+
</div>
|
|
86
153
|
</div>
|
|
87
154
|
);
|
|
88
155
|
};
|
|
@@ -206,7 +273,7 @@ export const DataProductGroupAccessViewer = observer(
|
|
|
206
273
|
sortable: false,
|
|
207
274
|
resizable: false,
|
|
208
275
|
headerClass: 'data-space__viewer__grid__last-column-header',
|
|
209
|
-
cellRenderer:
|
|
276
|
+
cellRenderer: 'agGroupCellRenderer',
|
|
210
277
|
headerName: 'More Info',
|
|
211
278
|
flex: 1,
|
|
212
279
|
},
|
|
@@ -214,6 +281,9 @@ export const DataProductGroupAccessViewer = observer(
|
|
|
214
281
|
onRowDataUpdated={(params) => {
|
|
215
282
|
params.api.refreshCells({ force: true });
|
|
216
283
|
}}
|
|
284
|
+
masterDetail={true}
|
|
285
|
+
detailCellRenderer={TDSColumnMoreInfoCellRenderer}
|
|
286
|
+
detailRowHeight={200}
|
|
217
287
|
/>
|
|
218
288
|
</div>
|
|
219
289
|
</div>
|
|
@@ -18,7 +18,7 @@ import { observer } from 'mobx-react-lite';
|
|
|
18
18
|
import {
|
|
19
19
|
useMarketplaceLakehouseStore,
|
|
20
20
|
withMarketplaceLakehouseStore,
|
|
21
|
-
} from './
|
|
21
|
+
} from './MarketplaceLakehouseStoreProvider.js';
|
|
22
22
|
import { useEffect } from 'react';
|
|
23
23
|
import {
|
|
24
24
|
CubesLoadingIndicator,
|
|
@@ -33,7 +33,7 @@ import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
|
33
33
|
import { DataProductViewer } from './DataProductViewer.js';
|
|
34
34
|
import { LEGEND_APPLICATION_COLOR_THEME } from '@finos/legend-application';
|
|
35
35
|
import { useAuth } from 'react-oidc-context';
|
|
36
|
-
import {
|
|
36
|
+
import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
|
|
37
37
|
|
|
38
38
|
export const LakehouseDataProduct = withMarketplaceLakehouseStore(
|
|
39
39
|
observer(() => {
|
|
@@ -62,27 +62,18 @@ export const LakehouseDataProduct = withMarketplaceLakehouseStore(
|
|
|
62
62
|
}, [applicationStore]);
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<DataProductViewer
|
|
78
|
-
dataSpaceViewerState={marketPlaceStore.dataProductViewer}
|
|
79
|
-
/>
|
|
80
|
-
)}
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
65
|
+
<LegendMarketplacePage className="legend-marketplace-lakehouse-data-product">
|
|
66
|
+
<CubesLoadingIndicator
|
|
67
|
+
isLoading={marketPlaceStore.loadingProductsState.isInProgress}
|
|
68
|
+
>
|
|
69
|
+
<CubesLoadingIndicatorIcon />
|
|
70
|
+
</CubesLoadingIndicator>
|
|
71
|
+
{marketPlaceStore.dataProductViewer && (
|
|
72
|
+
<DataProductViewer
|
|
73
|
+
dataSpaceViewerState={marketPlaceStore.dataProductViewer}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
</LegendMarketplacePage>
|
|
86
77
|
);
|
|
87
78
|
}),
|
|
88
79
|
);
|