@finos/legend-application-marketplace 0.2.21 → 0.2.23
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 +1 -0
- package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceNavigation.js +4 -0
- package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
- package/lib/components/OptionSelector/LegendMarketplaceOptionSelector.d.ts +22 -0
- package/lib/components/OptionSelector/LegendMarketplaceOptionSelector.d.ts.map +1 -0
- package/lib/components/OptionSelector/LegendMarketplaceOptionSelector.js +28 -0
- package/lib/components/OptionSelector/LegendMarketplaceOptionSelector.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/pages/Lakehouse/entitlements/LakehouseDataContract.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/LakehouseDataContract.js +2 -2
- package/lib/pages/Lakehouse/entitlements/LakehouseDataContract.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js +2 -2
- package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js +2 -2
- package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js.map +1 -1
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceFieldSearchResults.d.ts.map +1 -1
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceFieldSearchResults.js +11 -2
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceFieldSearchResults.js.map +1 -1
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js +9 -3
- package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js.map +1 -1
- package/lib/pages/TerminalsAddons/LegendMarketplaceTerminalsAddons.d.ts.map +1 -1
- package/lib/pages/TerminalsAddons/LegendMarketplaceTerminalsAddons.js +3 -9
- package/lib/pages/TerminalsAddons/LegendMarketplaceTerminalsAddons.js.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.d.ts +4 -0
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.js +5 -0
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.js.map +1 -1
- package/lib/utils/SearchUtils.d.ts.map +1 -1
- package/lib/utils/SearchUtils.js +17 -2
- package/lib/utils/SearchUtils.js.map +1 -1
- package/package.json +13 -13
- package/src/__lib__/LegendMarketplaceNavigation.ts +9 -0
- package/src/components/OptionSelector/LegendMarketplaceOptionSelector.tsx +50 -0
- package/src/pages/Lakehouse/entitlements/LakehouseDataContract.tsx +4 -0
- package/src/pages/Lakehouse/entitlements/PermitDataAccessRequest.tsx +4 -0
- package/src/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.tsx +4 -0
- package/src/pages/Lakehouse/searchResults/LegendMarketplaceFieldSearchResults.tsx +24 -25
- package/src/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.tsx +19 -29
- package/src/pages/TerminalsAddons/LegendMarketplaceTerminalsAddons.tsx +7 -23
- package/src/stores/lakehouse/LegendMarketplaceSearchResultsStore.ts +5 -0
- package/src/utils/SearchUtils.tsx +33 -8
- package/tsconfig.json +1 -0
|
@@ -42,10 +42,14 @@ import {
|
|
|
42
42
|
} from '../../../application/providers/LegendMarketplaceFieldSearchResultsStoreProvider.js';
|
|
43
43
|
import { FieldSearchFiltersPanel } from '../../../components/FieldSearchFiltersPanel/FieldSearchFiltersPanel.js';
|
|
44
44
|
import { FieldSearchResultListRow } from '../../../components/MarketplaceCard/FieldSearchResultListItem.js';
|
|
45
|
+
import { LegendMarketplaceOptionSelector } from '../../../components/OptionSelector/LegendMarketplaceOptionSelector.js';
|
|
45
46
|
import { LegendMarketplaceSearchBar } from '../../../components/SearchBar/LegendMarketplaceSearchBar.js';
|
|
46
47
|
import { PaginationControls } from '../../../components/Pagination/PaginationControls.js';
|
|
47
48
|
import { LegendMarketplacePage } from '../../LegendMarketplacePage.js';
|
|
48
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
DataProductTypeFilter,
|
|
51
|
+
SearchResultViewOption,
|
|
52
|
+
} from '../../../stores/lakehouse/LegendMarketplaceSearchResultsStore.js';
|
|
49
53
|
import type { LegendMarketplaceFieldSearchResultsStore } from '../../../stores/lakehouse/LegendMarketplaceFieldSearchResultsStore.js';
|
|
50
54
|
import { type FieldSearchDataProductEntry } from '../../../stores/lakehouse/fieldSearch/FieldSearchResultState.js';
|
|
51
55
|
|
|
@@ -371,6 +375,15 @@ const LegendMarketplaceFieldSearchResultsPage = observer(() => {
|
|
|
371
375
|
);
|
|
372
376
|
}, [applicationStore, fieldSearchResultsStore.searchQuery]);
|
|
373
377
|
|
|
378
|
+
const handleSearchResultViewChange = useCallback(
|
|
379
|
+
(value: SearchResultViewOption) => {
|
|
380
|
+
if (value === SearchResultViewOption.DATA_PRODUCTS) {
|
|
381
|
+
handleOpenDataProductsTab();
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
[handleOpenDataProductsTab],
|
|
385
|
+
);
|
|
386
|
+
|
|
374
387
|
return (
|
|
375
388
|
<LegendMarketplacePage className="marketplace-lakehouse-search-results marketplace-lakehouse-field-search-results">
|
|
376
389
|
<div ref={pageRef} />
|
|
@@ -394,30 +407,16 @@ const LegendMarketplaceFieldSearchResultsPage = observer(() => {
|
|
|
394
407
|
>
|
|
395
408
|
{fieldSearchResultsStore.totalFieldMatches} Fields
|
|
396
409
|
</Typography>
|
|
397
|
-
<div
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
className="legend-marketplace-search-results__search-type-tab"
|
|
408
|
-
onClick={handleOpenDataProductsTab}
|
|
409
|
-
>
|
|
410
|
-
Data Products
|
|
411
|
-
</button>
|
|
412
|
-
<button
|
|
413
|
-
type="button"
|
|
414
|
-
role="tab"
|
|
415
|
-
aria-selected={true}
|
|
416
|
-
tabIndex={0}
|
|
417
|
-
className="legend-marketplace-search-results__search-type-tab legend-marketplace-search-results__search-type-tab--active"
|
|
418
|
-
>
|
|
419
|
-
Data Fields
|
|
420
|
-
</button>
|
|
410
|
+
<div className="legend-marketplace-search-results__search-type-tabs">
|
|
411
|
+
<LegendMarketplaceOptionSelector
|
|
412
|
+
options={[
|
|
413
|
+
SearchResultViewOption.DATA_PRODUCTS,
|
|
414
|
+
SearchResultViewOption.DATA_FIELDS,
|
|
415
|
+
]}
|
|
416
|
+
selectedOption={SearchResultViewOption.DATA_FIELDS}
|
|
417
|
+
onChange={handleSearchResultViewChange}
|
|
418
|
+
ariaLabel="Search result type"
|
|
419
|
+
/>
|
|
421
420
|
</div>
|
|
422
421
|
</div>
|
|
423
422
|
</div>
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
} from '@mui/material';
|
|
43
43
|
import {
|
|
44
44
|
DataProductSort,
|
|
45
|
+
SearchResultViewOption,
|
|
45
46
|
SearchResultsViewMode,
|
|
46
47
|
type LegendMarketplaceSearchResultsStore,
|
|
47
48
|
} from '../../../stores/lakehouse/LegendMarketplaceSearchResultsStore.js';
|
|
@@ -66,6 +67,7 @@ import { useSearchParams } from '@finos/legend-application/browser';
|
|
|
66
67
|
import { isNonEmptyString } from '@finos/legend-shared';
|
|
67
68
|
import { PaginationControls } from '../../../components/Pagination/PaginationControls.js';
|
|
68
69
|
import { MarketplaceSearchFiltersPanel } from '../../../components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.js';
|
|
70
|
+
import { LegendMarketplaceOptionSelector } from '../../../components/OptionSelector/LegendMarketplaceOptionSelector.js';
|
|
69
71
|
|
|
70
72
|
const SearchResultsContent = observer(
|
|
71
73
|
(props: {
|
|
@@ -383,36 +385,24 @@ export const LegendMarketplaceSearchResults =
|
|
|
383
385
|
: `${searchResultsStore.totalItems} Products`}
|
|
384
386
|
</Typography>
|
|
385
387
|
{isNonEmptyString(searchResultsStore.searchQuery) && (
|
|
386
|
-
<div
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
type="button"
|
|
402
|
-
role="tab"
|
|
403
|
-
aria-selected={false}
|
|
404
|
-
tabIndex={-1}
|
|
405
|
-
className="legend-marketplace-search-results__search-type-tab"
|
|
406
|
-
onClick={() => {
|
|
407
|
-
applicationStore.navigationService.navigator.goToLocation(
|
|
408
|
-
generateFieldSearchResultsRoute(
|
|
409
|
-
searchResultsStore.searchQuery,
|
|
410
|
-
),
|
|
411
|
-
);
|
|
388
|
+
<div className="legend-marketplace-search-results__search-type-tabs">
|
|
389
|
+
<LegendMarketplaceOptionSelector
|
|
390
|
+
options={[
|
|
391
|
+
SearchResultViewOption.DATA_PRODUCTS,
|
|
392
|
+
SearchResultViewOption.DATA_FIELDS,
|
|
393
|
+
]}
|
|
394
|
+
selectedOption={SearchResultViewOption.DATA_PRODUCTS}
|
|
395
|
+
onChange={(option) => {
|
|
396
|
+
if (option === SearchResultViewOption.DATA_FIELDS) {
|
|
397
|
+
applicationStore.navigationService.navigator.goToLocation(
|
|
398
|
+
generateFieldSearchResultsRoute(
|
|
399
|
+
searchResultsStore.searchQuery,
|
|
400
|
+
),
|
|
401
|
+
);
|
|
402
|
+
}
|
|
412
403
|
}}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
</button>
|
|
404
|
+
ariaLabel="Search result type"
|
|
405
|
+
/>
|
|
416
406
|
</div>
|
|
417
407
|
)}
|
|
418
408
|
<div className="legend-marketplace-search-results__sort-bar__controls">
|
|
@@ -19,7 +19,6 @@ import { type JSX, useEffect, useCallback } from 'react';
|
|
|
19
19
|
import { LegendMarketplaceSearchBar } from '../../components/SearchBar/LegendMarketplaceSearchBar.js';
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
|
-
ButtonGroup,
|
|
23
22
|
Tooltip,
|
|
24
23
|
Typography,
|
|
25
24
|
List,
|
|
@@ -48,6 +47,7 @@ import type { LegendUser } from '@finos/legend-shared';
|
|
|
48
47
|
import { useLegendMarketplaceBaseStore } from '../../application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
49
48
|
import { PaginationControls } from '../../components/Pagination/PaginationControls.js';
|
|
50
49
|
import { UserRenderer } from '@finos/legend-extension-dsl-data-product';
|
|
50
|
+
import { LegendMarketplaceOptionSelector } from '../../components/OptionSelector/LegendMarketplaceOptionSelector.js';
|
|
51
51
|
|
|
52
52
|
export const RefinedVendorRadioSelector = observer(
|
|
53
53
|
(props: { vendorDataState: LegendMarketPlaceVendorDataStore }) => {
|
|
@@ -70,28 +70,12 @@ export const RefinedVendorRadioSelector = observer(
|
|
|
70
70
|
);
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<
|
|
74
|
-
{radioOptions
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
vendorDataState.providerDisplayState === option
|
|
80
|
-
? 'contained'
|
|
81
|
-
: 'outlined'
|
|
82
|
-
}
|
|
83
|
-
sx={{
|
|
84
|
-
fontSize: '12px',
|
|
85
|
-
backgroundColor:
|
|
86
|
-
vendorDataState.providerDisplayState === option
|
|
87
|
-
? 'primary'
|
|
88
|
-
: 'white',
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{option}
|
|
92
|
-
</Button>
|
|
93
|
-
))}
|
|
94
|
-
</ButtonGroup>
|
|
73
|
+
<LegendMarketplaceOptionSelector
|
|
74
|
+
options={radioOptions}
|
|
75
|
+
selectedOption={vendorDataState.providerDisplayState}
|
|
76
|
+
onChange={onRadioChange}
|
|
77
|
+
ariaLabel="Vendor data provider type"
|
|
78
|
+
/>
|
|
95
79
|
);
|
|
96
80
|
},
|
|
97
81
|
);
|
|
@@ -82,6 +82,11 @@ export enum SearchResultsViewMode {
|
|
|
82
82
|
LIST = 'list',
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
export enum SearchResultViewOption {
|
|
86
|
+
DATA_PRODUCTS = 'Data Products',
|
|
87
|
+
DATA_FIELDS = 'Data Fields',
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
const LEGEND_MARKETPLACE_SETTING_KEY_VIEW_MODE =
|
|
86
91
|
'marketplace.search-results.viewMode';
|
|
87
92
|
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
generateLakehouseDataProductPath,
|
|
34
34
|
generateLegacyDataProductPath,
|
|
35
|
+
generateSdlcDataProductPath,
|
|
35
36
|
} from '../__lib__/LegendMarketplaceNavigation.js';
|
|
36
37
|
import {
|
|
37
38
|
type V1_EntitlementsDataProductDetails,
|
|
@@ -69,6 +70,21 @@ export const getSearchResultProjectGAV = (
|
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
72
|
|
|
73
|
+
const hasNonLegacyDataProductLink = (link: string | undefined): boolean => {
|
|
74
|
+
if (!link) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const url = new URL(link);
|
|
79
|
+
return (
|
|
80
|
+
url.pathname.startsWith('/dataProduct/') &&
|
|
81
|
+
!url.pathname.startsWith('/dataProduct/legacy/')
|
|
82
|
+
);
|
|
83
|
+
} catch {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
72
88
|
export const generatePathForDataProductSearchResult = (
|
|
73
89
|
searchResult: DataProductSearchResult,
|
|
74
90
|
): string | undefined =>
|
|
@@ -80,14 +96,23 @@ export const generatePathForDataProductSearchResult = (
|
|
|
80
96
|
)
|
|
81
97
|
: searchResult.dataProductDetails instanceof
|
|
82
98
|
LegacyDataProductSearchResultDetails
|
|
83
|
-
?
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
? hasNonLegacyDataProductLink(searchResult.data_product_link)
|
|
100
|
+
? generateSdlcDataProductPath(
|
|
101
|
+
generateGAVCoordinates(
|
|
102
|
+
searchResult.dataProductDetails.groupId,
|
|
103
|
+
searchResult.dataProductDetails.artifactId,
|
|
104
|
+
searchResult.dataProductDetails.versionId,
|
|
105
|
+
),
|
|
106
|
+
searchResult.dataProductDetails.path,
|
|
107
|
+
)
|
|
108
|
+
: generateLegacyDataProductPath(
|
|
109
|
+
generateGAVCoordinates(
|
|
110
|
+
searchResult.dataProductDetails.groupId,
|
|
111
|
+
searchResult.dataProductDetails.artifactId,
|
|
112
|
+
searchResult.dataProductDetails.versionId,
|
|
113
|
+
),
|
|
114
|
+
searchResult.dataProductDetails.path,
|
|
115
|
+
)
|
|
91
116
|
: undefined;
|
|
92
117
|
|
|
93
118
|
export const convertEntitlementsDataProductDetailsToSearchResult = (
|
package/tsconfig.json
CHANGED
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"./src/components/MarketplaceCard/LegendMarketplaceCard.tsx",
|
|
123
123
|
"./src/components/MarketplaceCard/LegendMarketplaceListItem.tsx",
|
|
124
124
|
"./src/components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.tsx",
|
|
125
|
+
"./src/components/OptionSelector/LegendMarketplaceOptionSelector.tsx",
|
|
125
126
|
"./src/components/Pagination/PaginationControls.tsx",
|
|
126
127
|
"./src/components/ProviderCard/LegendMarketplaceOrderProfileCard.tsx",
|
|
127
128
|
"./src/components/ProviderCard/LegendMarketplaceTerminalCard.tsx",
|