@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.
Files changed (223) hide show
  1. package/lib/__lib__/LegendMarketplaceNavigation.d.ts +2 -0
  2. package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendMarketplaceNavigation.js +10 -1
  4. package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
  5. package/lib/app.css +2 -2
  6. package/lib/app.css.map +1 -1
  7. package/lib/application/LegendMarketplaceApplicationConfig.d.ts +10 -0
  8. package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
  9. package/lib/application/LegendMarketplaceApplicationConfig.js +10 -0
  10. package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
  11. package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -1
  12. package/lib/application/LegendMarketplaceWebApplication.js +12 -9
  13. package/lib/application/LegendMarketplaceWebApplication.js.map +1 -1
  14. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.d.ts.map +1 -1
  15. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js +6 -3
  16. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js.map +1 -1
  17. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.d.ts.map +1 -1
  18. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js +9 -6
  19. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js.map +1 -1
  20. package/lib/components/{Lakehouse/LakehouseHeader.d.ts → Header/MarketplaceLakehouseHeader.d.ts} +2 -2
  21. package/lib/components/Header/MarketplaceLakehouseHeader.d.ts.map +1 -0
  22. package/lib/components/{Lakehouse/LakehouseHeader.js → Header/MarketplaceLakehouseHeader.js} +3 -3
  23. package/lib/components/Header/MarketplaceLakehouseHeader.js.map +1 -0
  24. package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts +25 -0
  25. package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts.map +1 -0
  26. package/lib/components/MarketplaceCard/LegendMarketplaceCard.js +32 -0
  27. package/lib/components/MarketplaceCard/LegendMarketplaceCard.js.map +1 -0
  28. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.d.ts.map +1 -1
  29. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js +6 -3
  30. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js.map +1 -1
  31. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -1
  32. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +3 -6
  33. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -1
  34. package/lib/index.css +2 -2
  35. package/lib/index.css.map +1 -1
  36. package/lib/package.json +2 -1
  37. package/lib/pages/Home/LegendMarketplaceHome.d.ts.map +1 -1
  38. package/lib/pages/Home/LegendMarketplaceHome.js +4 -4
  39. package/lib/pages/Home/LegendMarketplaceHome.js.map +1 -1
  40. package/lib/pages/Lakehouse/DataProductDataAccess.d.ts.map +1 -0
  41. package/lib/{components → pages}/Lakehouse/DataProductDataAccess.js +39 -6
  42. package/lib/pages/Lakehouse/DataProductDataAccess.js.map +1 -0
  43. package/lib/pages/Lakehouse/DataProductHolder.d.ts.map +1 -0
  44. package/lib/pages/Lakehouse/DataProductHolder.js.map +1 -0
  45. package/lib/pages/Lakehouse/DataProductViewer.d.ts.map +1 -0
  46. package/lib/pages/Lakehouse/DataProductViewer.js.map +1 -0
  47. package/lib/pages/Lakehouse/DataProductViewerActivityBar.d.ts.map +1 -0
  48. package/lib/pages/Lakehouse/DataProductViewerActivityBar.js.map +1 -0
  49. package/lib/pages/Lakehouse/DataProductWiki.d.ts.map +1 -0
  50. package/lib/pages/Lakehouse/DataProductWiki.js.map +1 -0
  51. package/lib/pages/Lakehouse/LakehouseDataProduct.d.ts.map +1 -0
  52. package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.js +3 -3
  53. package/lib/pages/Lakehouse/LakehouseDataProduct.js.map +1 -0
  54. package/lib/{components/Lakehouse/LakehouseMarketplace.d.ts → pages/Lakehouse/MarketplaceLakehouseHome.d.ts} +2 -2
  55. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.d.ts.map +1 -0
  56. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js +54 -0
  57. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js.map +1 -0
  58. package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.d.ts → pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts} +1 -1
  59. package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts.map +1 -0
  60. package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.js → pages/Lakehouse/MarketplaceLakehouseStoreProvider.js} +1 -1
  61. package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.js.map +1 -0
  62. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts +23 -0
  63. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts.map +1 -0
  64. package/lib/{components/Lakehouse/entitlements/LakehouseEntitlements.js → pages/Lakehouse/entitlements/EntitlementsDashboard.js} +10 -86
  65. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js.map +1 -0
  66. package/lib/{components/Lakehouse/entitlements/DataContractCreator.d.ts → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts} +1 -1
  67. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts.map +1 -0
  68. package/lib/{components/Lakehouse/entitlements/DataContractCreator.js → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js} +1 -1
  69. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js.map +1 -0
  70. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts +22 -0
  71. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts.map +1 -0
  72. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js +23 -0
  73. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js.map +1 -0
  74. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts +21 -0
  75. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts.map +1 -0
  76. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js +32 -0
  77. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js.map +1 -0
  78. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts +17 -0
  79. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +1 -0
  80. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js +55 -0
  81. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js.map +1 -0
  82. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +1 -0
  83. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +1 -0
  84. package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts +21 -0
  85. package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts.map +1 -0
  86. package/lib/pages/Lakehouse/shared/GridItemViewer.js +46 -0
  87. package/lib/pages/Lakehouse/shared/GridItemViewer.js.map +1 -0
  88. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts.map +1 -0
  89. package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.js +4 -6
  90. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +1 -0
  91. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +1 -0
  92. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js.map +1 -0
  93. package/lib/pages/LegendMarketplacePage.d.ts +23 -0
  94. package/lib/pages/LegendMarketplacePage.d.ts.map +1 -0
  95. package/lib/pages/LegendMarketplacePage.js +23 -0
  96. package/lib/pages/LegendMarketplacePage.js.map +1 -0
  97. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
  98. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js +13 -13
  99. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js.map +1 -1
  100. package/lib/pages/VendorData/LegendMarketplaceVendorData.d.ts.map +1 -1
  101. package/lib/pages/VendorData/LegendMarketplaceVendorData.js +6 -6
  102. package/lib/pages/VendorData/LegendMarketplaceVendorData.js.map +1 -1
  103. package/lib/stores/LakehouseContractServerClient.d.ts +3 -0
  104. package/lib/stores/LakehouseContractServerClient.d.ts.map +1 -1
  105. package/lib/stores/LakehouseContractServerClient.js +11 -0
  106. package/lib/stores/LakehouseContractServerClient.js.map +1 -1
  107. package/lib/stores/LegendMarketplaceBaseStore.d.ts +3 -0
  108. package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
  109. package/lib/stores/LegendMarketplaceBaseStore.js +8 -1
  110. package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
  111. package/lib/stores/lakehouse/LakehouseUtils.d.ts +29 -1
  112. package/lib/stores/lakehouse/LakehouseUtils.d.ts.map +1 -1
  113. package/lib/stores/lakehouse/LakehouseUtils.js +203 -1
  114. package/lib/stores/lakehouse/LakehouseUtils.js.map +1 -1
  115. package/lib/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.d.ts → EntitlementsDashboardState.d.ts} +2 -2
  116. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -0
  117. package/lib/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.js → EntitlementsDashboardState.js} +12 -3
  118. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -0
  119. package/lib/stores/lakehouse/entitlements/{DataContractState.d.ts → EntitlementsDataContractViewerState.d.ts} +11 -8
  120. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.d.ts.map +1 -0
  121. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js +65 -0
  122. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js.map +1 -0
  123. package/lib/stores/lakehouse/entitlements/{DataContractTaskState.d.ts → EntitlementsTaskViewerState.d.ts} +12 -6
  124. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts.map +1 -0
  125. package/lib/stores/lakehouse/entitlements/{DataContractTaskState.js → EntitlementsTaskViewerState.js} +39 -21
  126. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js.map +1 -0
  127. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts +4 -5
  128. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts.map +1 -1
  129. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js +30 -13
  130. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js.map +1 -1
  131. package/package.json +5 -4
  132. package/src/__lib__/LegendMarketplaceNavigation.ts +15 -1
  133. package/src/application/LegendMarketplaceApplicationConfig.ts +25 -0
  134. package/src/application/LegendMarketplaceWebApplication.tsx +32 -13
  135. package/src/components/DataProductCard/LegendMarketplaceDataProductSearchCard.tsx +41 -33
  136. package/src/components/DataProductCard/LegendMarketplaceLightDataProductCard.tsx +33 -36
  137. package/src/components/{Lakehouse/LakehouseHeader.tsx → Header/MarketplaceLakehouseHeader.tsx} +2 -2
  138. package/src/components/MarketplaceCard/LegendMarketplaceCard.tsx +98 -0
  139. package/src/components/ProviderCard/LegendMarketplaceProviderCard.tsx +47 -39
  140. package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +2 -14
  141. package/src/pages/Home/LegendMarketplaceHome.tsx +42 -51
  142. package/src/{components → pages}/Lakehouse/DataProductDataAccess.tsx +77 -7
  143. package/src/{components → pages}/Lakehouse/LakehouseDataProduct.tsx +14 -23
  144. package/src/pages/Lakehouse/MarketplaceLakehouseHome.tsx +167 -0
  145. package/src/{components/Lakehouse/entitlements/LakehouseEntitlements.tsx → pages/Lakehouse/entitlements/EntitlementsDashboard.tsx} +20 -247
  146. package/src/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.tsx +33 -0
  147. package/src/pages/Lakehouse/entitlements/EntitlementsTaskViewer.tsx +73 -0
  148. package/src/pages/Lakehouse/entitlements/LakehouseEntitlements.tsx +82 -0
  149. package/src/pages/Lakehouse/shared/GridItemViewer.tsx +105 -0
  150. package/src/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.tsx +15 -27
  151. package/src/pages/LegendMarketplacePage.tsx +26 -0
  152. package/src/pages/SearchResults/LegendMarketplaceSearchResults.tsx +58 -65
  153. package/src/pages/VendorData/LegendMarketplaceVendorData.tsx +44 -42
  154. package/src/stores/LakehouseContractServerClient.ts +29 -0
  155. package/src/stores/LegendMarketplaceBaseStore.ts +16 -1
  156. package/src/stores/lakehouse/LakehouseUtils.ts +252 -0
  157. package/src/stores/lakehouse/entitlements/{LakehouseEntitlementsMainViewState.ts → EntitlementsDashboardState.ts} +19 -3
  158. package/src/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.ts +101 -0
  159. package/src/stores/lakehouse/entitlements/{DataContractTaskState.ts → EntitlementsTaskViewerState.ts} +62 -24
  160. package/src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts +44 -23
  161. package/tsconfig.json +23 -17
  162. package/lib/components/Lakehouse/DataProductDataAccess.d.ts.map +0 -1
  163. package/lib/components/Lakehouse/DataProductDataAccess.js.map +0 -1
  164. package/lib/components/Lakehouse/DataProductHolder.d.ts.map +0 -1
  165. package/lib/components/Lakehouse/DataProductHolder.js.map +0 -1
  166. package/lib/components/Lakehouse/DataProductViewer.d.ts.map +0 -1
  167. package/lib/components/Lakehouse/DataProductViewer.js.map +0 -1
  168. package/lib/components/Lakehouse/DataProductViewerActivityBar.d.ts.map +0 -1
  169. package/lib/components/Lakehouse/DataProductViewerActivityBar.js.map +0 -1
  170. package/lib/components/Lakehouse/DataProductWiki.d.ts.map +0 -1
  171. package/lib/components/Lakehouse/DataProductWiki.js.map +0 -1
  172. package/lib/components/Lakehouse/LakehouseDataProduct.d.ts.map +0 -1
  173. package/lib/components/Lakehouse/LakehouseDataProduct.js.map +0 -1
  174. package/lib/components/Lakehouse/LakehouseHeader.d.ts.map +0 -1
  175. package/lib/components/Lakehouse/LakehouseHeader.js.map +0 -1
  176. package/lib/components/Lakehouse/LakehouseMarketplace.d.ts.map +0 -1
  177. package/lib/components/Lakehouse/LakehouseMarketplace.js +0 -51
  178. package/lib/components/Lakehouse/LakehouseMarketplace.js.map +0 -1
  179. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.d.ts.map +0 -1
  180. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.js.map +0 -1
  181. package/lib/components/Lakehouse/entitlements/DataContractCreator.d.ts.map +0 -1
  182. package/lib/components/Lakehouse/entitlements/DataContractCreator.js.map +0 -1
  183. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts +0 -28
  184. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +0 -1
  185. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.js.map +0 -1
  186. package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +0 -1
  187. package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +0 -1
  188. package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts.map +0 -1
  189. package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +0 -1
  190. package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +0 -1
  191. package/lib/components/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js.map +0 -1
  192. package/lib/stores/lakehouse/entitlements/DataContractState.d.ts.map +0 -1
  193. package/lib/stores/lakehouse/entitlements/DataContractState.js +0 -127
  194. package/lib/stores/lakehouse/entitlements/DataContractState.js.map +0 -1
  195. package/lib/stores/lakehouse/entitlements/DataContractTaskState.d.ts.map +0 -1
  196. package/lib/stores/lakehouse/entitlements/DataContractTaskState.js.map +0 -1
  197. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsMainViewState.d.ts.map +0 -1
  198. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsMainViewState.js.map +0 -1
  199. package/src/components/Lakehouse/LakehouseMarketplace.tsx +0 -184
  200. package/src/stores/lakehouse/entitlements/DataContractState.ts +0 -142
  201. /package/lib/{components → pages}/Lakehouse/DataProductDataAccess.d.ts +0 -0
  202. /package/lib/{components → pages}/Lakehouse/DataProductHolder.d.ts +0 -0
  203. /package/lib/{components → pages}/Lakehouse/DataProductHolder.js +0 -0
  204. /package/lib/{components → pages}/Lakehouse/DataProductViewer.d.ts +0 -0
  205. /package/lib/{components → pages}/Lakehouse/DataProductViewer.js +0 -0
  206. /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.d.ts +0 -0
  207. /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.js +0 -0
  208. /package/lib/{components → pages}/Lakehouse/DataProductWiki.d.ts +0 -0
  209. /package/lib/{components → pages}/Lakehouse/DataProductWiki.js +0 -0
  210. /package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.d.ts +0 -0
  211. /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts +0 -0
  212. /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js +0 -0
  213. /package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts +0 -0
  214. /package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts +0 -0
  215. /package/lib/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js +0 -0
  216. /package/src/{components → pages}/Lakehouse/DataProductHolder.tsx +0 -0
  217. /package/src/{components → pages}/Lakehouse/DataProductViewer.tsx +0 -0
  218. /package/src/{components → pages}/Lakehouse/DataProductViewerActivityBar.tsx +0 -0
  219. /package/src/{components → pages}/Lakehouse/DataProductWiki.tsx +0 -0
  220. /package/src/{components/Lakehouse/MarketLakehouseStoreProvider.tsx → pages/Lakehouse/MarketplaceLakehouseStoreProvider.tsx} +0 -0
  221. /package/src/{components/Lakehouse/entitlements/DataContractCreator.tsx → pages/Lakehouse/entitlements/EntitlementsDataContractCreator.tsx} +0 -0
  222. /package/src/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.tsx +0 -0
  223. /package/src/{components → pages}/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.tsx +0 -0
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import {
19
+ useMarketplaceLakehouseStore,
20
+ withMarketplaceLakehouseStore,
21
+ } from './MarketplaceLakehouseStoreProvider.js';
22
+ import { useEffect, type JSX } from 'react';
23
+ import {
24
+ clsx,
25
+ CubesLoadingIndicator,
26
+ CubesLoadingIndicatorIcon,
27
+ } from '@finos/legend-art';
28
+ import {
29
+ Checkbox,
30
+ Chip,
31
+ FormControlLabel,
32
+ FormGroup,
33
+ Grid2 as Grid,
34
+ } from '@mui/material';
35
+ import type { DataProductState } from '../../stores/lakehouse/MarketplaceLakehouseStore.js';
36
+ import { generateLakehouseDataProduct } from '../../__lib__/LegendMarketplaceNavigation.js';
37
+ import { generateGAVCoordinates } from '@finos/legend-storage';
38
+ import { LegendMarketplaceSearchBar } from '../../components/SearchBar/LegendMarketplaceSearchBar.js';
39
+ import { DepotScope } from '@finos/legend-server-depot';
40
+ import { LegendMarketplaceCard } from '../../components/MarketplaceCard/LegendMarketplaceCard.js';
41
+ import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
42
+
43
+ export const LegendDataProductVendorCard = (props: {
44
+ dataAsset: DataProductState;
45
+ onClick: (dataAsset: DataProductState) => void;
46
+ }): JSX.Element => {
47
+ const { dataAsset, onClick } = props;
48
+
49
+ const content = (
50
+ <>
51
+ <Chip
52
+ label={dataAsset.productEntity.versionId}
53
+ className={clsx('legend-marketplace-vendor-card__type')}
54
+ />
55
+ <div className="legend-marketplace-vendor-card__name">
56
+ {dataAsset.productEntity.path.split('::').pop()}
57
+ </div>
58
+ <div className="legend-marketplace-vendor-card__description">
59
+ {`${dataAsset.productEntity.groupId}:${dataAsset.productEntity.artifactId}`}
60
+ </div>
61
+ </>
62
+ );
63
+
64
+ const moreInfo = <div>{dataAsset.productEntity.path}</div>;
65
+
66
+ return (
67
+ <LegendMarketplaceCard
68
+ size="large"
69
+ content={content}
70
+ onClick={() => onClick(dataAsset)}
71
+ moreInfo={moreInfo}
72
+ />
73
+ );
74
+ };
75
+
76
+ export const MarketplaceLakehouseHome = withMarketplaceLakehouseStore(
77
+ observer(() => {
78
+ const marketPlaceStore = useMarketplaceLakehouseStore();
79
+ const onSearch = (
80
+ provider: string | undefined,
81
+ query: string | undefined,
82
+ ) => {
83
+ marketPlaceStore.handleSearch(query);
84
+ };
85
+
86
+ const onSearchChange = (query: string) => {
87
+ if (query === '') {
88
+ // use for clearing of search
89
+ marketPlaceStore.handleSearch(query);
90
+ }
91
+ };
92
+
93
+ useEffect(() => {
94
+ marketPlaceStore.init();
95
+ }, [marketPlaceStore]);
96
+
97
+ return (
98
+ <LegendMarketplacePage className="legend-marketplace-lakehouse-home">
99
+ <CubesLoadingIndicator
100
+ isLoading={marketPlaceStore.loadingProductsState.isInProgress}
101
+ >
102
+ <CubesLoadingIndicatorIcon />
103
+ </CubesLoadingIndicator>
104
+ <div className="legend-marketplace-data-product-search__container">
105
+ <LegendMarketplaceSearchBar
106
+ onSearch={onSearch}
107
+ onChange={onSearchChange}
108
+ />
109
+ <FormGroup row={true}>
110
+ <FormControlLabel
111
+ control={
112
+ <Checkbox
113
+ checked={marketPlaceStore.filter.releaseFilter}
114
+ onChange={() =>
115
+ marketPlaceStore.handleFilterChange(DepotScope.RELEASES)
116
+ }
117
+ />
118
+ }
119
+ label="Releases"
120
+ />
121
+ <FormControlLabel
122
+ control={
123
+ <Checkbox
124
+ checked={marketPlaceStore.filter.snapshotFilter}
125
+ onChange={() =>
126
+ marketPlaceStore.handleFilterChange(DepotScope.SNAPSHOT)
127
+ }
128
+ />
129
+ }
130
+ label="Snapshots"
131
+ />
132
+ </FormGroup>
133
+ </div>
134
+ <div className="legend-marketplace-home__vendors-cards">
135
+ <Grid
136
+ container={true}
137
+ spacing={{ xs: 2, md: 3, xl: 4 }}
138
+ columns={{ xs: 1, sm: 2, xl: 3, xxl: 4, xxxl: 5, xxxxl: 6 }}
139
+ sx={{ justifyContent: 'center' }}
140
+ >
141
+ {marketPlaceStore.filterProducts?.map((dpState) => (
142
+ <Grid key={dpState.id} size={1}>
143
+ <LegendDataProductVendorCard
144
+ dataAsset={dpState}
145
+ onClick={(dataAsset: DataProductState) => {
146
+ {
147
+ marketPlaceStore.applicationStore.navigationService.navigator.goToLocation(
148
+ generateLakehouseDataProduct(
149
+ generateGAVCoordinates(
150
+ dpState.productEntity.groupId,
151
+ dpState.productEntity.artifactId,
152
+ dpState.productEntity.versionId,
153
+ ),
154
+ dpState.productEntity.path,
155
+ ),
156
+ );
157
+ }
158
+ }}
159
+ />
160
+ </Grid>
161
+ ))}
162
+ </Grid>
163
+ </div>
164
+ </LegendMarketplacePage>
165
+ );
166
+ }),
167
+ );
@@ -14,48 +14,26 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ import { withAuth, type AuthContextProps } from 'react-oidc-context';
18
+ import type { EntitlementsDashboardState } from '../../../stores/lakehouse/entitlements/EntitlementsDashboardState.js';
17
19
  import { observer } from 'mobx-react-lite';
20
+ import { useState } from 'react';
18
21
  import {
19
- useLakehouseEntitlementsStore,
20
- withLakehouseEntitlementsStore,
21
- } from './LakehouseEntitlementsStoreProvider.js';
22
- import { useAuth, withAuth, type AuthContextProps } from 'react-oidc-context';
23
- import { useEffect, useState } from 'react';
24
- import {
25
- clsx,
26
- CubesLoadingIndicator,
27
- CubesLoadingIndicatorIcon,
28
- } from '@finos/legend-art';
22
+ V1_UserApprovalStatus,
23
+ type V1_ContractUserEventRecord,
24
+ type V1_UserPendingContractsRecord,
25
+ } from '@finos/legend-graph';
26
+ import { flowResult } from 'mobx';
29
27
  import {
30
28
  DataGrid,
31
29
  type DataGridCellRendererParams,
32
30
  } from '@finos/legend-lego/data-grid';
33
- import { useParams } from '@finos/legend-application/browser';
34
31
  import {
35
32
  generateLakehouseContractPath,
36
33
  generateLakehouseTaskPath,
37
- LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN,
38
- type LakehouseEntitlementsTasksParam,
39
34
  } from '../../../__lib__/LegendMarketplaceNavigation.js';
40
- import {
41
- Box,
42
- Button,
43
- Divider,
44
- Grid2,
45
- Stack,
46
- Tab,
47
- Tabs,
48
- Typography,
49
- } from '@mui/material';
50
- import { LakehouseMarketplaceHeader } from '../LakehouseHeader.js';
51
- import type {
52
- V1_ContractUserEventRecord,
53
- V1_UserPendingContractsRecord,
54
- } from '@finos/legend-graph';
55
- import { flowResult } from 'mobx';
56
- import { DataContractState } from '../../../stores/lakehouse/entitlements/DataContractState.js';
57
- import { LakehouseEntitlementsMainViewState } from '../../../stores/lakehouse/entitlements/LakehouseEntitlementsMainViewState.js';
58
- import { DataContractTaskState } from '../../../stores/lakehouse/entitlements/DataContractTaskState.js';
35
+ import { Box, Button, Stack, Tab, Tabs, Typography } from '@mui/material';
36
+ import { clsx } from '@finos/legend-art';
59
37
 
60
38
  const TDSColumnApprovalCellRenderer = (
61
39
  params: DataGridCellRendererParams<V1_ContractUserEventRecord>,
@@ -78,11 +56,18 @@ const TDSColumnApprovalCellRenderer = (
78
56
  variant="contained"
79
57
  size="small"
80
58
  onClick={onApprove}
59
+ disabled={data.status !== V1_UserApprovalStatus.PENDING}
81
60
  color="success"
82
61
  >
83
62
  Approve
84
63
  </Button>
85
- <Button color="error" variant="contained" size="small" onClick={onDeny}>
64
+ <Button
65
+ disabled={data.status !== V1_UserApprovalStatus.PENDING}
66
+ color="error"
67
+ variant="contained"
68
+ size="small"
69
+ onClick={onDeny}
70
+ >
86
71
  Deny
87
72
  </Button>
88
73
  </Stack>
@@ -174,10 +159,10 @@ const PendingContract_TaskIdColumnClickableCellRenderer = (
174
159
  };
175
160
 
176
161
  type TaksProps = {
177
- currentViewer: LakehouseEntitlementsMainViewState;
162
+ currentViewer: EntitlementsDashboardState;
178
163
  };
179
164
 
180
- export const LakehouseEntitlementsMainView = withAuth(
165
+ export const EntitlementsDashboard = withAuth(
181
166
  observer((props: TaksProps) => {
182
167
  const { currentViewer } = props;
183
168
  const state = currentViewer.state;
@@ -209,7 +194,6 @@ export const LakehouseEntitlementsMainView = withAuth(
209
194
  };
210
195
  return (
211
196
  <>
212
- {/* <Box> */}
213
197
  <Tabs value={value} onChange={handleTabChange}>
214
198
  <Tab
215
199
  label={
@@ -404,214 +388,3 @@ export const LakehouseEntitlementsMainView = withAuth(
404
388
  );
405
389
  }),
406
390
  );
407
- const LakehouseEntitlementsContract = observer(
408
- (props: { currentViewer: DataContractState }) => {
409
- const { currentViewer } = props;
410
- return (
411
- <div className="entitlements-tasks">
412
- <Grid2
413
- container={true}
414
- spacing={0}
415
- sx={{
416
- '--Grid-borderWidth': '1px',
417
- borderTop: 'var(--Grid-borderWidth) solid',
418
- borderLeft: 'var(--Grid-borderWidth) solid',
419
- borderColor: 'divider',
420
- '& > div': {
421
- borderRight: 'var(--Grid-borderWidth) solid',
422
- borderBottom: 'var(--Grid-borderWidth) solid',
423
- borderColor: 'divider',
424
- },
425
- }}
426
- >
427
- {currentViewer.taskDetails.map((v, index) => (
428
- <>
429
- <Grid2
430
- container={false}
431
- size={4}
432
- sx={{
433
- alignContent: 'center',
434
- backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
435
- }}
436
- >
437
- <Typography
438
- variant="button"
439
- fontWeight={'bold'}
440
- sx={{ fontSize: '14px', padding: '6px' }}
441
- >
442
- {v.name}
443
- </Typography>
444
- </Grid2>
445
- <Grid2
446
- container={false}
447
- size={8}
448
- sx={{
449
- alignContent: 'center',
450
- backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
451
- }}
452
- >
453
- <Typography
454
- variant="subtitle1"
455
- sx={{ fontSize: '14px', padding: '6px' }}
456
- >
457
- {v.value}
458
- </Typography>
459
- </Grid2>
460
- </>
461
- ))}
462
- </Grid2>
463
- </div>
464
- );
465
- },
466
- );
467
-
468
- export const LakehouseEntitlementsTask = withAuth(
469
- observer((props: { currentViewer: DataContractTaskState }) => {
470
- const auth = (props as unknown as { auth: AuthContextProps }).auth;
471
- const { currentViewer } = props;
472
- const handleApprove = (): void => {
473
- currentViewer.approve(auth.user?.access_token);
474
- };
475
-
476
- const handleDeny = (): void => {
477
- currentViewer.deny(auth.user?.access_token);
478
- };
479
-
480
- return (
481
- <div className="entitlements-task">
482
- {currentViewer.canApprove && (
483
- <>
484
- <Stack
485
- className="entitlements-task__action"
486
- direction={'row'}
487
- spacing={1}
488
- >
489
- <Button
490
- variant="contained"
491
- size="small"
492
- onClick={handleApprove}
493
- color="success"
494
- sx={{ fontSize: '10px' }}
495
- >
496
- Approve
497
- </Button>
498
- <Button
499
- color="error"
500
- variant="contained"
501
- size="small"
502
- onClick={handleDeny}
503
- sx={{ fontSize: '10px' }}
504
- >
505
- Deny
506
- </Button>
507
- </Stack>
508
- <Divider />
509
- </>
510
- )}
511
- <Grid2
512
- container={true}
513
- spacing={0}
514
- sx={{
515
- '--Grid-borderWidth': '1px',
516
- borderTop: 'var(--Grid-borderWidth) solid',
517
- borderLeft: 'var(--Grid-borderWidth) solid',
518
- borderColor: 'divider',
519
- '& > div': {
520
- borderRight: 'var(--Grid-borderWidth) solid',
521
- borderBottom: 'var(--Grid-borderWidth) solid',
522
- borderColor: 'divider',
523
- },
524
- }}
525
- >
526
- {currentViewer.taskDetails.map((v, index) => (
527
- <>
528
- <Grid2
529
- container={false}
530
- size={4}
531
- sx={{
532
- alignContent: 'center',
533
- backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
534
- }}
535
- >
536
- <Typography
537
- variant="button"
538
- fontWeight={'bold'}
539
- sx={{ fontSize: '14px', padding: '6px' }}
540
- >
541
- {v.name}
542
- </Typography>
543
- </Grid2>
544
- <Grid2
545
- container={false}
546
- size={8}
547
- sx={{
548
- alignContent: 'center',
549
- backgroundColor: index % 2 === 0 ? '#f5f5f5' : 'white',
550
- }}
551
- >
552
- <Typography
553
- variant="subtitle1"
554
- sx={{ fontSize: '14px', padding: '6px' }}
555
- >
556
- {v.value}
557
- </Typography>
558
- </Grid2>
559
- </>
560
- ))}
561
- </Grid2>
562
- </div>
563
- );
564
- }),
565
- );
566
-
567
- export const LakehouseEntitlements = withLakehouseEntitlementsStore(
568
- observer(() => {
569
- const entitlementsStore = useLakehouseEntitlementsStore();
570
- const auth = useAuth();
571
- const params = useParams<LakehouseEntitlementsTasksParam>();
572
-
573
- useEffect(() => {
574
- entitlementsStore.init(
575
- params[LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.TASK_ID],
576
- params[LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.CONTRACT_ID],
577
- auth.user?.access_token,
578
- );
579
- }, [auth.user?.access_token, entitlementsStore, params]);
580
-
581
- const renderCurrentViewer = (): React.ReactNode => {
582
- const currentViewer = entitlementsStore.currentViewer;
583
- if (currentViewer instanceof LakehouseEntitlementsMainViewState) {
584
- return <LakehouseEntitlementsMainView currentViewer={currentViewer} />;
585
- } else if (currentViewer instanceof DataContractTaskState) {
586
- return <LakehouseEntitlementsTask currentViewer={currentViewer} />;
587
- } else if (currentViewer instanceof DataContractState) {
588
- return <LakehouseEntitlementsContract currentViewer={currentViewer} />;
589
- }
590
-
591
- return null;
592
- };
593
- return (
594
- <div className="app__page">
595
- <div className="legend-marketplace-home">
596
- <div className="legend-marketplace-data-product-home__body">
597
- <LakehouseMarketplaceHeader />
598
- <div className="legend-marketplace-home__content">
599
- <div className="legend-marketplace-data-product__content">
600
- <CubesLoadingIndicator
601
- isLoading={Boolean(
602
- entitlementsStore.initializationState.isInProgress ||
603
- entitlementsStore.currentViewer?.initializationState
604
- .isInProgress,
605
- )}
606
- >
607
- <CubesLoadingIndicatorIcon />
608
- </CubesLoadingIndicator>
609
- {renderCurrentViewer()}
610
- </div>
611
- </div>
612
- </div>
613
- </div>
614
- </div>
615
- );
616
- }),
617
- );
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import { GridItemsViewer } from '../shared/GridItemViewer.js';
19
+ import type { EntitlementsDataContractViewerState } from '../../../stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js';
20
+
21
+ export const EntitlementsDataContractViewer = observer(
22
+ (props: { currentViewer: EntitlementsDataContractViewerState }) => {
23
+ const { currentViewer } = props;
24
+ return (
25
+ <div className="entitlements-grid-viewer">
26
+ <GridItemsViewer
27
+ details={currentViewer.contractDetails}
28
+ title="Contract Metadata"
29
+ />
30
+ </div>
31
+ );
32
+ },
33
+ );
@@ -0,0 +1,73 @@
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 { withAuth, type AuthContextProps } from 'react-oidc-context';
18
+ import type { EntitlementsTaskViewerState } from '../../../stores/lakehouse/entitlements/EntitlementsTaskViewerState.js';
19
+ import { observer } from 'mobx-react-lite';
20
+ import { GridItemsViewer } from '../shared/GridItemViewer.js';
21
+ import { Button, Divider, Stack } from '@mui/material';
22
+
23
+ export const EntitlementsTaskViewer = withAuth(
24
+ observer((props: { currentViewer: EntitlementsTaskViewerState }) => {
25
+ const auth = (props as unknown as { auth: AuthContextProps }).auth;
26
+ const { currentViewer } = props;
27
+ const handleApprove = (): void => {
28
+ currentViewer.approve(auth.user?.access_token);
29
+ };
30
+
31
+ const handleDeny = (): void => {
32
+ currentViewer.deny(auth.user?.access_token);
33
+ };
34
+
35
+ return (
36
+ <div className="entitlements-grid-viewer">
37
+ {currentViewer.canApprove && (
38
+ <div className="entitlements-grid-viewer__action-header">
39
+ <Stack
40
+ className="entitlements-grid-viewer__action"
41
+ direction={'row'}
42
+ spacing={1}
43
+ >
44
+ <Button
45
+ variant="contained"
46
+ size="small"
47
+ onClick={handleApprove}
48
+ color="success"
49
+ sx={{ fontSize: '10px' }}
50
+ >
51
+ Approve
52
+ </Button>
53
+ <Button
54
+ color="error"
55
+ variant="contained"
56
+ size="small"
57
+ onClick={handleDeny}
58
+ sx={{ fontSize: '10px' }}
59
+ >
60
+ Deny
61
+ </Button>
62
+ </Stack>
63
+ <Divider />
64
+ </div>
65
+ )}
66
+ <GridItemsViewer
67
+ details={currentViewer.taskDetails}
68
+ title="Task Metadata"
69
+ />
70
+ </div>
71
+ );
72
+ }),
73
+ );
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import {
19
+ useLakehouseEntitlementsStore,
20
+ withLakehouseEntitlementsStore,
21
+ } from './LakehouseEntitlementsStoreProvider.js';
22
+ import { useAuth } from 'react-oidc-context';
23
+ import { useEffect } from 'react';
24
+ import {
25
+ CubesLoadingIndicator,
26
+ CubesLoadingIndicatorIcon,
27
+ } from '@finos/legend-art';
28
+ import {} from '@finos/legend-lego/data-grid';
29
+ import { useParams } from '@finos/legend-application/browser';
30
+ import {
31
+ LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN,
32
+ type LakehouseEntitlementsTasksParam,
33
+ } from '../../../__lib__/LegendMarketplaceNavigation.js';
34
+ import { EntitlementsDashboardState } from '../../../stores/lakehouse/entitlements/EntitlementsDashboardState.js';
35
+ import { EntitlementsTaskViewerState } from '../../../stores/lakehouse/entitlements/EntitlementsTaskViewerState.js';
36
+ import { LegendMarketplacePage } from '../../LegendMarketplacePage.js';
37
+ import { EntitlementsDataContractViewer } from './EntitlementsDataContractViewer.js';
38
+ import { EntitlementsTaskViewer } from './EntitlementsTaskViewer.js';
39
+ import { EntitlementsDashboard } from './EntitlementsDashboard.js';
40
+ import { EntitlementsDataContractViewerState } from '../../../stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js';
41
+
42
+ export const LakehouseEntitlements = withLakehouseEntitlementsStore(
43
+ observer(() => {
44
+ const entitlementsStore = useLakehouseEntitlementsStore();
45
+ const auth = useAuth();
46
+ const params = useParams<LakehouseEntitlementsTasksParam>();
47
+
48
+ useEffect(() => {
49
+ entitlementsStore.init(
50
+ params[LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.TASK_ID],
51
+ params[LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.CONTRACT_ID],
52
+ auth.user?.access_token,
53
+ );
54
+ }, [auth.user?.access_token, entitlementsStore, params]);
55
+
56
+ const renderCurrentViewer = (): React.ReactNode => {
57
+ const currentViewer = entitlementsStore.currentViewer;
58
+ if (currentViewer instanceof EntitlementsDashboardState) {
59
+ return <EntitlementsDashboard currentViewer={currentViewer} />;
60
+ } else if (currentViewer instanceof EntitlementsTaskViewerState) {
61
+ return <EntitlementsTaskViewer currentViewer={currentViewer} />;
62
+ } else if (currentViewer instanceof EntitlementsDataContractViewerState) {
63
+ return <EntitlementsDataContractViewer currentViewer={currentViewer} />;
64
+ }
65
+
66
+ return null;
67
+ };
68
+ return (
69
+ <LegendMarketplacePage className="legend-marketplace-lakehouse-entitlements">
70
+ <CubesLoadingIndicator
71
+ isLoading={Boolean(
72
+ entitlementsStore.initializationState.isInProgress ||
73
+ entitlementsStore.currentViewer?.initializationState.isInProgress,
74
+ )}
75
+ >
76
+ <CubesLoadingIndicatorIcon />
77
+ </CubesLoadingIndicator>
78
+ {renderCurrentViewer()}
79
+ </LegendMarketplacePage>
80
+ );
81
+ }),
82
+ );