@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
|
@@ -13,23 +13,30 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { assertErrorThrown, } from '@finos/legend-shared';
|
|
16
|
+
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
|
17
17
|
import { deserialize } from 'serializr';
|
|
18
18
|
import { V1_TaskStatusChangeResponseModelSchema, V1_DataContractsRecordModelSchema, V1_pendingTasksRespondModelSchema, } from '@finos/legend-graph';
|
|
19
19
|
import { makeObservable, flow, observable, flowResult, action } from 'mobx';
|
|
20
20
|
import { TEST_USER, } from './LakehouseEntitlementsStore.js';
|
|
21
|
-
import { buildDataContractDetail } from './DataContractState.js';
|
|
22
21
|
import { LakehouseViewerState } from './LakehouseViewerState.js';
|
|
23
|
-
|
|
22
|
+
import { buildTaskGridItemDetail, } from '../LakehouseUtils.js';
|
|
23
|
+
import { generateLakehouseContractPath } from '../../../__lib__/LegendMarketplaceNavigation.js';
|
|
24
|
+
export class EntitlementsTaskViewerState extends LakehouseViewerState {
|
|
24
25
|
value;
|
|
26
|
+
approvalStatus = ActionState.create();
|
|
25
27
|
canApprove;
|
|
26
28
|
dataContract;
|
|
29
|
+
pendingAssociatedContractEvent;
|
|
30
|
+
changingTaskState = ActionState.create();
|
|
31
|
+
taskAssignees;
|
|
27
32
|
constructor(value, state) {
|
|
28
33
|
super(state);
|
|
29
|
-
this.value = value;
|
|
34
|
+
this.value = value.rec;
|
|
35
|
+
this.taskAssignees = value.assignees;
|
|
30
36
|
makeObservable(this, {
|
|
31
|
-
value: observable,
|
|
32
37
|
canApprove: observable,
|
|
38
|
+
pendingAssociatedContractEvent: observable,
|
|
39
|
+
setPendingAssociatedContractEvent: action,
|
|
33
40
|
setCanApprove: action,
|
|
34
41
|
approve: flow,
|
|
35
42
|
deny: flow,
|
|
@@ -37,12 +44,16 @@ export class DataContractTaskState extends LakehouseViewerState {
|
|
|
37
44
|
calculateApprovalRights: flow,
|
|
38
45
|
fetchContract: flow,
|
|
39
46
|
dataContract: observable,
|
|
47
|
+
taskAssignees: observable,
|
|
40
48
|
});
|
|
41
49
|
this.observeContract();
|
|
42
50
|
}
|
|
43
51
|
get id() {
|
|
44
52
|
return this.value.taskId;
|
|
45
53
|
}
|
|
54
|
+
setPendingAssociatedContractEvent(pendingAssociatedContractEvent) {
|
|
55
|
+
this.pendingAssociatedContractEvent = pendingAssociatedContractEvent;
|
|
56
|
+
}
|
|
46
57
|
*init(token) {
|
|
47
58
|
flowResult(this.calculateApprovalRights(token)).catch(this.state.applicationStore.alertUnhandledError);
|
|
48
59
|
flowResult(this.fetchContract(token)).catch(this.state.applicationStore.alertUnhandledError);
|
|
@@ -57,20 +68,32 @@ export class DataContractTaskState extends LakehouseViewerState {
|
|
|
57
68
|
}
|
|
58
69
|
*approve(token) {
|
|
59
70
|
try {
|
|
71
|
+
this.approvalStatus.inProgress();
|
|
60
72
|
const response = (yield this.state.lakehouseServerClient.approveTask(this.value.taskId, token));
|
|
61
73
|
const change = deserialize(V1_TaskStatusChangeResponseModelSchema, response);
|
|
62
74
|
if (change.errorMessage) {
|
|
75
|
+
this.approvalStatus.fail();
|
|
63
76
|
throw new Error(`Unable to approve task: ${this.value.taskId}: ${change.errorMessage}`);
|
|
64
77
|
}
|
|
65
78
|
this.value.status = change.status;
|
|
66
79
|
this.setCanApprove(false);
|
|
80
|
+
this.approvalStatus.pass();
|
|
81
|
+
this.state.applicationStore.notificationService.notifySuccess('Approval succeeded');
|
|
67
82
|
}
|
|
68
83
|
catch (error) {
|
|
84
|
+
this.approvalStatus.fail();
|
|
69
85
|
assertErrorThrown(error);
|
|
86
|
+
this.state.applicationStore.notificationService.notifyError(`${error.message}`);
|
|
70
87
|
}
|
|
71
88
|
}
|
|
72
89
|
*deny(token) {
|
|
73
90
|
try {
|
|
91
|
+
this.changingTaskState.inProgress();
|
|
92
|
+
this.state.applicationStore.alertService.setBlockingAlert({
|
|
93
|
+
message: 'Denying Task',
|
|
94
|
+
prompt: 'Denying task...',
|
|
95
|
+
showLoading: true,
|
|
96
|
+
});
|
|
74
97
|
const response = (yield this.state.lakehouseServerClient.denyTask(this.value.taskId, token));
|
|
75
98
|
const change = deserialize(V1_TaskStatusChangeResponseModelSchema, response);
|
|
76
99
|
if (change.errorMessage) {
|
|
@@ -78,9 +101,16 @@ export class DataContractTaskState extends LakehouseViewerState {
|
|
|
78
101
|
}
|
|
79
102
|
this.value.status = change.status;
|
|
80
103
|
this.setCanApprove(false);
|
|
104
|
+
this.state.applicationStore.notificationService.notifySuccess(`Task has been denied`);
|
|
81
105
|
}
|
|
82
106
|
catch (error) {
|
|
83
107
|
assertErrorThrown(error);
|
|
108
|
+
this.state.applicationStore.notificationService.notifyError(`${error.message}`);
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
this.changingTaskState.complete();
|
|
112
|
+
this.changingTaskState.setMessage(undefined);
|
|
113
|
+
this.state.applicationStore.alertService.setBlockingAlert(undefined);
|
|
84
114
|
}
|
|
85
115
|
}
|
|
86
116
|
*calculateApprovalRights(token) {
|
|
@@ -108,21 +138,9 @@ export class DataContractTaskState extends LakehouseViewerState {
|
|
|
108
138
|
}
|
|
109
139
|
}
|
|
110
140
|
get taskDetails() {
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
value: this.value.taskId,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: 'Task Status',
|
|
118
|
-
value: this.value.status.toString(),
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: 'Task Consumer',
|
|
122
|
-
value: this.value.consumer,
|
|
123
|
-
},
|
|
124
|
-
...(this.dataContract ? buildDataContractDetail(this.dataContract) : []),
|
|
125
|
-
];
|
|
141
|
+
return buildTaskGridItemDetail(this.value, this.taskAssignees, this.dataContract, (id) => {
|
|
142
|
+
this.state.applicationStore.navigationService.navigator.updateCurrentLocation(generateLakehouseContractPath(id));
|
|
143
|
+
}, this.state.directoryCallBack, this.state.applicationCallBack);
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
|
-
//# sourceMappingURL=
|
|
146
|
+
//# sourceMappingURL=EntitlementsTaskViewerState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntitlementsTaskViewerState.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/EntitlementsTaskViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAGL,sCAAsC,EAGtC,iCAAiC,EAGjC,iCAAiC,GAGlC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAEL,SAAS,GACV,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,uBAAuB,GAExB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAEhG,MAAM,OAAO,2BAA4B,SAAQ,oBAAoB;IAC1D,KAAK,CAA6B;IAClC,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAC/C,UAAU,CAAsB;IAChC,YAAY,CAA8B;IAC1C,8BAA8B,CAA8C;IAC5E,iBAAiB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IACzC,aAAa,CAAuB;IACpC,YAAY,KAAsB,EAAE,KAAiC;QACnE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC;QACrC,cAAc,CAAC,IAAI,EAAE;YACnB,UAAU,EAAE,UAAU;YACtB,8BAA8B,EAAE,UAAU;YAC1C,iCAAiC,EAAE,MAAM;YACzC,aAAa,EAAE,MA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AAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CACrD,CAAC;YACF,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,CAAC,aAAa,CAAC,KAAyB;QACtC,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;YAC7C,MAAM,aAAa,GACjB,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,eAAe,CACrD,UAAU,EACV,KAAK,CACN,CAAwC,CAAC;YAE5C,MAAM,YAAY,GAAG,WAAW,CAC9B,iCAAiC,EACjC,aAAa,CACd,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,IAAI,WAAW;QACb,OAAO,uBAAuB,CAC5B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,YAAY,EACjB,CAAC,EAAU,EAAQ,EAAE;YACnB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,qBAAqB,CAC3E,6BAA6B,CAAC,EAAE,CAAC,CAClC,CAAC;QACJ,CAAC,EACD,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC5B,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -19,14 +19,13 @@ import { ActionState, type GeneratorFn } from '@finos/legend-shared';
|
|
|
19
19
|
import type { LakehouseViewerState } from './LakehouseViewerState.js';
|
|
20
20
|
export declare const TEST_USER: undefined;
|
|
21
21
|
export declare const TEST_USER2: undefined;
|
|
22
|
-
export type GridItemDetail = {
|
|
23
|
-
name: string;
|
|
24
|
-
value: string | number;
|
|
25
|
-
onClick?: () => void;
|
|
26
|
-
};
|
|
27
22
|
export declare class LakehouseEntitlementsStore {
|
|
28
23
|
readonly applicationStore: LegendMarketplaceApplicationStore;
|
|
29
24
|
readonly lakehouseServerClient: LakehouseContractServerClient;
|
|
25
|
+
readonly directoryUrl: string | undefined;
|
|
26
|
+
readonly applicationIdUrl: string | undefined;
|
|
27
|
+
readonly directoryCallBack: ((user: string) => void) | undefined;
|
|
28
|
+
readonly applicationCallBack: ((applicationId: string) => void) | undefined;
|
|
30
29
|
initializationState: ActionState;
|
|
31
30
|
currentViewer: LakehouseViewerState | undefined;
|
|
32
31
|
constructor(applicationStore: LegendMarketplaceApplicationStore, lakehouseServerClient: LakehouseContractServerClient);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseEntitlementsStore.d.ts","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EACL,WAAW,EAGX,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,eAAO,MAAM,SAAS,WAAY,CAAC;AACnC,eAAO,MAAM,UAAU,WAAY,CAAC;AAEpC,
|
|
1
|
+
{"version":3,"file":"LakehouseEntitlementsStore.d.ts","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;G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CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;CA2B5E"}
|
|
@@ -15,21 +15,39 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
17
17
|
import { deserialize } from 'serializr';
|
|
18
|
-
import {
|
|
18
|
+
import { V1_deserializeTaskResponse, V1_DataContractsRecordModelSchema, } from '@finos/legend-graph';
|
|
19
19
|
import { makeObservable, flow, observable, flowResult, action } from 'mobx';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import { EntitlementsDataContractViewerState } from './EntitlementsDataContractViewerState.js';
|
|
21
|
+
import { EntitlementsDashboardState } from './EntitlementsDashboardState.js';
|
|
22
|
+
import { EntitlementsTaskViewerState } from './EntitlementsTaskViewerState.js';
|
|
23
23
|
export const TEST_USER = undefined;
|
|
24
24
|
export const TEST_USER2 = undefined;
|
|
25
25
|
export class LakehouseEntitlementsStore {
|
|
26
26
|
applicationStore;
|
|
27
27
|
lakehouseServerClient;
|
|
28
|
+
directoryUrl;
|
|
29
|
+
applicationIdUrl;
|
|
30
|
+
directoryCallBack;
|
|
31
|
+
applicationCallBack;
|
|
28
32
|
initializationState = ActionState.create();
|
|
29
33
|
currentViewer;
|
|
30
34
|
constructor(applicationStore, lakehouseServerClient) {
|
|
31
35
|
this.applicationStore = applicationStore;
|
|
32
36
|
this.lakehouseServerClient = lakehouseServerClient;
|
|
37
|
+
this.directoryUrl =
|
|
38
|
+
this.applicationStore.config.lakehouseEntitlementsConfig?.applicationDirectoryUrl;
|
|
39
|
+
this.applicationIdUrl =
|
|
40
|
+
this.applicationStore.config.lakehouseEntitlementsConfig?.applicationIDUrl;
|
|
41
|
+
this.directoryCallBack = this.directoryUrl
|
|
42
|
+
? (user) => {
|
|
43
|
+
this.applicationStore.navigationService.navigator.visitAddress(`${this.directoryUrl}/${user}`);
|
|
44
|
+
}
|
|
45
|
+
: undefined;
|
|
46
|
+
this.applicationCallBack = this.applicationIdUrl
|
|
47
|
+
? (id) => {
|
|
48
|
+
this.applicationStore.navigationService.navigator.visitAddress(`${this.applicationIdUrl}/${id}`);
|
|
49
|
+
}
|
|
50
|
+
: undefined;
|
|
33
51
|
makeObservable(this, {
|
|
34
52
|
init: flow,
|
|
35
53
|
initWithTaskId: flow,
|
|
@@ -52,20 +70,17 @@ export class LakehouseEntitlementsStore {
|
|
|
52
70
|
return;
|
|
53
71
|
}
|
|
54
72
|
// TODO: similiar logic should be used above ^
|
|
55
|
-
const currentViewer = new
|
|
73
|
+
const currentViewer = new EntitlementsDashboardState(this);
|
|
56
74
|
this.setCurrentViewer(currentViewer);
|
|
57
75
|
currentViewer.init(token);
|
|
58
76
|
}
|
|
59
77
|
*initWithTaskId(taskId, token) {
|
|
60
78
|
try {
|
|
61
79
|
this.initializationState.inProgress();
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const allTasks = [...tasks.dataOwner, ...tasks.privilegeManager];
|
|
67
|
-
const task = guaranteeNonNullable(allTasks.find((e) => e.taskId === taskId), `Task with id '${taskId}' not found. Temprorary only have access to pending tasks you can approve. `);
|
|
68
|
-
const currentTask = new DataContractTaskState(task, this);
|
|
80
|
+
const rawTasks = (yield this.lakehouseServerClient.getTask(taskId, token));
|
|
81
|
+
const tasks = V1_deserializeTaskResponse(rawTasks);
|
|
82
|
+
const task = guaranteeNonNullable(tasks[0], `Task with id '${taskId}' not found`);
|
|
83
|
+
const currentTask = new EntitlementsTaskViewerState(task, this);
|
|
69
84
|
this.setCurrentViewer(currentTask);
|
|
70
85
|
flowResult(currentTask.init(token)).catch(this.applicationStore.alertUnhandledError);
|
|
71
86
|
}
|
|
@@ -82,7 +97,9 @@ export class LakehouseEntitlementsStore {
|
|
|
82
97
|
const dataContracts = (yield this.lakehouseServerClient.getDataContract(id, token));
|
|
83
98
|
const dataContract = deserialize(V1_DataContractsRecordModelSchema, dataContracts).dataContracts[0]?.dataContract;
|
|
84
99
|
const contract = guaranteeNonNullable(dataContract, 'Data Contract not found');
|
|
85
|
-
|
|
100
|
+
const currentViewer = new EntitlementsDataContractViewerState(contract, this);
|
|
101
|
+
this.setCurrentViewer(currentViewer);
|
|
102
|
+
flowResult(currentViewer.init(token)).catch(this.applicationStore.alertUnhandledError);
|
|
86
103
|
}
|
|
87
104
|
catch (error) {
|
|
88
105
|
assertErrorThrown(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseEntitlementsStore.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAGL,
|
|
1
|
+
{"version":3,"file":"LakehouseEntitlementsStore.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAGL,0BAA0B,EAC1B,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,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AAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-marketplace",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "Legend Marketplace application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -45,10 +45,11 @@
|
|
|
45
45
|
"test:watch": "jest --watch"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@finos/legend-application": "16.0.
|
|
48
|
+
"@finos/legend-application": "16.0.41",
|
|
49
49
|
"@finos/legend-art": "7.1.95",
|
|
50
|
-
"@finos/legend-
|
|
51
|
-
"@finos/legend-
|
|
50
|
+
"@finos/legend-code-editor": "workspace:^",
|
|
51
|
+
"@finos/legend-graph": "32.1.27",
|
|
52
|
+
"@finos/legend-lego": "2.0.73",
|
|
52
53
|
"@finos/legend-server-depot": "6.0.90",
|
|
53
54
|
"@finos/legend-server-marketplace": "0.0.3",
|
|
54
55
|
"@finos/legend-shared": "11.0.11",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { generatePath } from '@finos/legend-application/browser';
|
|
17
|
+
import { generatePath, matchPath } from '@finos/legend-application/browser';
|
|
18
18
|
import {
|
|
19
19
|
addQueryParametersToUrl,
|
|
20
20
|
stringifyQueryParams,
|
|
@@ -56,6 +56,20 @@ export const LEGEND_MARKETPLACE_ROUTE_PATTERN = Object.freeze({
|
|
|
56
56
|
LAKEHOUSE_SUBSCRIPTIONS: '/lakehouse/subscriptions',
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
+
export const LAKEHOUSE_ROUTES = Object.freeze([
|
|
60
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE,
|
|
61
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS,
|
|
62
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_TASKS,
|
|
63
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_CONTRACTS,
|
|
64
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_PRODUCT,
|
|
65
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_SUBSCRIPTIONS,
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
export const isLakehouseRoute = (pathName: string): boolean =>
|
|
69
|
+
LAKEHOUSE_ROUTES.some(
|
|
70
|
+
(route) => matchPath(route as string, pathName) !== null,
|
|
71
|
+
);
|
|
72
|
+
|
|
59
73
|
export const generateLakehouseDataProduct = (
|
|
60
74
|
gav: string,
|
|
61
75
|
path: string,
|
|
@@ -60,12 +60,24 @@ export interface LegendMarketplaceApplicationConfigurationData
|
|
|
60
60
|
};
|
|
61
61
|
lakehouse?: {
|
|
62
62
|
url: string;
|
|
63
|
+
entitlements: {
|
|
64
|
+
applicationDirectoryUrl: string;
|
|
65
|
+
applicationIDUrl: string;
|
|
66
|
+
};
|
|
63
67
|
};
|
|
64
68
|
studio?: {
|
|
65
69
|
url: string;
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
export class LegendLakehouseEntitlementsConfig {
|
|
74
|
+
applicationDirectoryUrl: string;
|
|
75
|
+
applicationIDUrl: string;
|
|
76
|
+
constructor(applicationDirectoryUrl: string, applicationIDUrl: string) {
|
|
77
|
+
this.applicationDirectoryUrl = applicationDirectoryUrl;
|
|
78
|
+
this.applicationIDUrl = applicationIDUrl;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
69
81
|
export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig {
|
|
70
82
|
readonly options = new LegendMarketplaceApplicationCoreOptions();
|
|
71
83
|
|
|
@@ -74,6 +86,9 @@ export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig
|
|
|
74
86
|
readonly engineServerUrl: string;
|
|
75
87
|
readonly depotServerUrl: string;
|
|
76
88
|
readonly lakehouseServerUrl?: string;
|
|
89
|
+
readonly lakehouseEntitlementsConfig:
|
|
90
|
+
| LegendLakehouseEntitlementsConfig
|
|
91
|
+
| undefined;
|
|
77
92
|
readonly studioServerUrl?: string;
|
|
78
93
|
|
|
79
94
|
constructor(
|
|
@@ -127,6 +142,16 @@ export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig
|
|
|
127
142
|
`Can't configure application: 'lakehouse.url' field is missing or empty`,
|
|
128
143
|
),
|
|
129
144
|
);
|
|
145
|
+
this.lakehouseEntitlementsConfig = new LegendLakehouseEntitlementsConfig(
|
|
146
|
+
guaranteeNonEmptyString(
|
|
147
|
+
input.configData.lakehouse.entitlements.applicationDirectoryUrl,
|
|
148
|
+
`Can't configure application: 'lakehouse.entitlements.applicationDirectoryUrl' field is missing or empty`,
|
|
149
|
+
),
|
|
150
|
+
guaranteeNonEmptyString(
|
|
151
|
+
input.configData.lakehouse.entitlements.applicationIDUrl,
|
|
152
|
+
`Can't configure application: 'lakehouse.entitlements.applicationIDUrl' field is missing or empty`,
|
|
153
|
+
),
|
|
154
|
+
);
|
|
130
155
|
}
|
|
131
156
|
// studio
|
|
132
157
|
if (input.configData.studio) {
|
|
@@ -25,6 +25,7 @@ import { flowResult } from 'mobx';
|
|
|
25
25
|
import { useApplicationStore } from '@finos/legend-application';
|
|
26
26
|
import {
|
|
27
27
|
BrowserEnvironmentProvider,
|
|
28
|
+
Outlet,
|
|
28
29
|
Route,
|
|
29
30
|
Routes,
|
|
30
31
|
} from '@finos/legend-application/browser';
|
|
@@ -33,8 +34,11 @@ import {
|
|
|
33
34
|
useLegendMarketplaceApplicationStore,
|
|
34
35
|
useLegendMarketplaceBaseStore,
|
|
35
36
|
} from './LegendMarketplaceFrameworkProvider.js';
|
|
36
|
-
import {
|
|
37
|
-
|
|
37
|
+
import {
|
|
38
|
+
isLakehouseRoute,
|
|
39
|
+
LEGEND_MARKETPLACE_ROUTE_PATTERN,
|
|
40
|
+
} from '../__lib__/LegendMarketplaceNavigation.js';
|
|
41
|
+
import { MarketplaceLakehouseHome } from '../pages/Lakehouse/MarketplaceLakehouseHome.js';
|
|
38
42
|
import { LegendMarketplaceHome } from '../pages/Home/LegendMarketplaceHome.js';
|
|
39
43
|
import { LegendMarketplaceSearchResults } from '../pages/SearchResults/LegendMarketplaceSearchResults.js';
|
|
40
44
|
import {
|
|
@@ -44,10 +48,13 @@ import {
|
|
|
44
48
|
} from 'react-oidc-context';
|
|
45
49
|
import type { User } from 'oidc-client-ts';
|
|
46
50
|
import type { LegendMarketplaceOidcConfig } from './LegendMarketplaceApplicationConfig.js';
|
|
47
|
-
import { LakehouseDataProduct } from '../
|
|
51
|
+
import { LakehouseDataProduct } from '../pages/Lakehouse/LakehouseDataProduct.js';
|
|
48
52
|
import { LegendMarketPlaceVendorData } from '../pages/VendorData/LegendMarketplaceVendorData.js';
|
|
49
|
-
import { LakehouseEntitlements } from '../
|
|
50
|
-
import { LakehouseSubscriptions } from '../
|
|
53
|
+
import { LakehouseEntitlements } from '../pages/Lakehouse/entitlements/LakehouseEntitlements.js';
|
|
54
|
+
import { LakehouseSubscriptions } from '../pages/Lakehouse/subscriptions/LakehouseSubscriptions.js';
|
|
55
|
+
import { LegendMarketplaceHeader } from '../components/Header/LegendMarketplaceHeader.js';
|
|
56
|
+
import { MarketplaceLakehouseHeader } from '../components/Header/MarketplaceLakehouseHeader.js';
|
|
57
|
+
import { LegendMarketplacePage } from '../pages/LegendMarketplacePage.js';
|
|
51
58
|
|
|
52
59
|
const NotFoundPage = observer(() => {
|
|
53
60
|
const applicationStore = useApplicationStore();
|
|
@@ -56,7 +63,7 @@ const NotFoundPage = observer(() => {
|
|
|
56
63
|
applicationStore.navigationService.navigator.getCurrentLocation();
|
|
57
64
|
|
|
58
65
|
return (
|
|
59
|
-
<
|
|
66
|
+
<LegendMarketplacePage className="legend-marketplace__not-found">
|
|
60
67
|
<div className="not-found-screen not-found-screen--no-documentation">
|
|
61
68
|
<div className="not-found-screen__icon">
|
|
62
69
|
<div className="not-found-screen__icon__ghost">
|
|
@@ -89,7 +96,7 @@ const NotFoundPage = observer(() => {
|
|
|
89
96
|
</div>
|
|
90
97
|
</div>
|
|
91
98
|
</div>
|
|
92
|
-
</
|
|
99
|
+
</LegendMarketplacePage>
|
|
93
100
|
);
|
|
94
101
|
});
|
|
95
102
|
|
|
@@ -104,7 +111,7 @@ export const LegendMarketplaceWebApplicationRouter = observer(() => {
|
|
|
104
111
|
}, [applicationStore, baseStore]);
|
|
105
112
|
|
|
106
113
|
const ProtectedLakehouseMarketplace = withAuthenticationRequired(
|
|
107
|
-
|
|
114
|
+
MarketplaceLakehouseHome,
|
|
108
115
|
{
|
|
109
116
|
OnRedirecting: () => (
|
|
110
117
|
<CubesLoadingIndicator isLoading={true}>
|
|
@@ -162,8 +169,21 @@ export const LegendMarketplaceWebApplicationRouter = observer(() => {
|
|
|
162
169
|
return (
|
|
163
170
|
<div className="app">
|
|
164
171
|
{baseStore.initState.hasCompleted && (
|
|
165
|
-
|
|
166
|
-
<
|
|
172
|
+
<Routes>
|
|
173
|
+
<Route
|
|
174
|
+
element={
|
|
175
|
+
<>
|
|
176
|
+
{isLakehouseRoute(
|
|
177
|
+
baseStore.applicationStore.navigationService.navigator.getCurrentLocation(),
|
|
178
|
+
) ? (
|
|
179
|
+
<MarketplaceLakehouseHeader />
|
|
180
|
+
) : (
|
|
181
|
+
<LegendMarketplaceHeader />
|
|
182
|
+
)}
|
|
183
|
+
<Outlet />
|
|
184
|
+
</>
|
|
185
|
+
}
|
|
186
|
+
>
|
|
167
187
|
<Route
|
|
168
188
|
path={LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_PRODUCT}
|
|
169
189
|
element={<ProtectedLakehouseDataProduct />}
|
|
@@ -184,7 +204,6 @@ export const LegendMarketplaceWebApplicationRouter = observer(() => {
|
|
|
184
204
|
path={LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS}
|
|
185
205
|
element={<ProtectedLakehouseEntitlements />}
|
|
186
206
|
/>
|
|
187
|
-
|
|
188
207
|
<Route
|
|
189
208
|
path={LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE}
|
|
190
209
|
element={<ProtectedLakehouseMarketplace />}
|
|
@@ -206,8 +225,8 @@ export const LegendMarketplaceWebApplicationRouter = observer(() => {
|
|
|
206
225
|
element={<ProtectedLakehouseSubscriptions />}
|
|
207
226
|
/>
|
|
208
227
|
<Route path="*" element={<NotFoundPage />} />
|
|
209
|
-
</
|
|
210
|
-
|
|
228
|
+
</Route>
|
|
229
|
+
</Routes>
|
|
211
230
|
)}
|
|
212
231
|
</div>
|
|
213
232
|
);
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { type JSX } from 'react';
|
|
18
|
-
import { Button
|
|
18
|
+
import { Button } from '@mui/material';
|
|
19
19
|
import type { DataProductSearchResult } from '@finos/legend-server-marketplace';
|
|
20
20
|
import DOMPurify from 'dompurify';
|
|
21
|
+
import { LegendMarketplaceCard } from '../MarketplaceCard/LegendMarketplaceCard.js';
|
|
21
22
|
|
|
22
23
|
const MAX_DESCRIPTION_LENGTH = 250;
|
|
23
24
|
|
|
@@ -42,40 +43,47 @@ export const LegendMarketplaceProductSearchCard = (props: {
|
|
|
42
43
|
: DOMPurify.sanitize(productSearchResult.data_product_description),
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
46
|
+
const content = (
|
|
47
|
+
<>
|
|
48
|
+
<div className="legend-marketplace-product-search-result-card__vendor-name">
|
|
49
|
+
{productSearchResult.vendor_name}
|
|
50
|
+
</div>
|
|
51
|
+
<div className="legend-marketplace-product-search-result-card__data-product-name">
|
|
52
|
+
{productSearchResult.data_product_name}
|
|
53
|
+
</div>
|
|
54
|
+
<div className="legend-marketplace-product-search-result-card__data-product-description">
|
|
55
|
+
{productSearchResult.data_product_description.length > 0 && (
|
|
56
|
+
<div dangerouslySetInnerHTML={descriptionHTML} />
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const actions = (
|
|
63
|
+
<>
|
|
64
|
+
<Button
|
|
65
|
+
variant="outlined"
|
|
66
|
+
onClick={() => onPreviewClick(productSearchResult)}
|
|
67
|
+
>
|
|
68
|
+
Preview
|
|
69
|
+
</Button>
|
|
70
|
+
{productSearchResult.data_product_link && (
|
|
64
71
|
<Button
|
|
65
|
-
variant="
|
|
66
|
-
onClick={() =>
|
|
72
|
+
variant="contained"
|
|
73
|
+
onClick={() => onLearnMoreClick(productSearchResult)}
|
|
67
74
|
>
|
|
68
|
-
|
|
75
|
+
Learn More
|
|
69
76
|
</Button>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
)}
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<LegendMarketplaceCard
|
|
83
|
+
size="large"
|
|
84
|
+
content={content}
|
|
85
|
+
actions={actions}
|
|
86
|
+
className="legend-marketplace-product-search-result-card"
|
|
87
|
+
/>
|
|
80
88
|
);
|
|
81
89
|
};
|