@finos/legend-application-marketplace 0.0.11 → 0.0.13

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 (135) hide show
  1. package/lib/__lib__/LegendMarketplaceNavigation.d.ts +16 -0
  2. package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendMarketplaceNavigation.js +29 -0
  4. package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
  5. package/lib/app.css +17 -0
  6. package/lib/app.css.map +1 -0
  7. package/lib/application/LegendMarketplace.d.ts.map +1 -1
  8. package/lib/application/LegendMarketplace.js +5 -4
  9. package/lib/application/LegendMarketplace.js.map +1 -1
  10. package/lib/application/LegendMarketplaceApplicationConfig.d.ts +8 -11
  11. package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
  12. package/lib/application/LegendMarketplaceApplicationConfig.js +14 -21
  13. package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
  14. package/lib/application/LegendMarketplaceFrameworkProvider.d.ts.map +1 -0
  15. package/lib/{components → application}/LegendMarketplaceFrameworkProvider.js +1 -1
  16. package/lib/application/LegendMarketplaceFrameworkProvider.js.map +1 -0
  17. package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -0
  18. package/lib/{components → application}/LegendMarketplaceWebApplication.js +5 -3
  19. package/lib/application/LegendMarketplaceWebApplication.js.map +1 -0
  20. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.d.ts.map +1 -1
  21. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js +3 -7
  22. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js.map +1 -1
  23. package/lib/application/extensions/Core_LegendMarketplaceApplicationPlugin.d.ts.map +1 -0
  24. package/lib/application/extensions/Core_LegendMarketplaceApplicationPlugin.js.map +1 -0
  25. package/lib/application/extensions/Core_LegendMarketplace_LegendApplicationPlugin.d.ts +25 -0
  26. package/lib/application/extensions/Core_LegendMarketplace_LegendApplicationPlugin.d.ts.map +1 -0
  27. package/lib/application/extensions/Core_LegendMarketplace_LegendApplicationPlugin.js +28 -0
  28. package/lib/application/extensions/Core_LegendMarketplace_LegendApplicationPlugin.js.map +1 -0
  29. package/lib/components/{header → Header}/LegendMarketplaceAppInfo.d.ts.map +1 -1
  30. package/lib/components/{header → Header}/LegendMarketplaceAppInfo.js +2 -4
  31. package/lib/components/Header/LegendMarketplaceAppInfo.js.map +1 -0
  32. package/lib/components/Header/LegendMarketplaceHeader.d.ts.map +1 -0
  33. package/lib/components/{header → Header}/LegendMarketplaceHeader.js +8 -2
  34. package/lib/components/Header/LegendMarketplaceHeader.js.map +1 -0
  35. package/lib/components/Lakehouse/LakehouseMarketplace.d.ts +17 -0
  36. package/lib/components/Lakehouse/LakehouseMarketplace.d.ts.map +1 -0
  37. package/lib/components/Lakehouse/LakehouseMarketplace.js +56 -0
  38. package/lib/components/Lakehouse/LakehouseMarketplace.js.map +1 -0
  39. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.d.ts +22 -0
  40. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.d.ts.map +1 -0
  41. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.js +34 -0
  42. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.js.map +1 -0
  43. package/lib/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.d.ts +23 -0
  44. package/lib/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.d.ts.map +1 -0
  45. package/lib/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.js +33 -0
  46. package/lib/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.js.map +1 -0
  47. package/lib/components/SearchBar/LegendMarketplaceSearchBar.d.ts +26 -0
  48. package/lib/components/SearchBar/LegendMarketplaceSearchBar.d.ts.map +1 -0
  49. package/lib/components/SearchBar/LegendMarketplaceSearchBar.js +41 -0
  50. package/lib/components/SearchBar/LegendMarketplaceSearchBar.js.map +1 -0
  51. package/lib/components/VendorCard/LegendMarketplaceVendorCard.d.ts +22 -0
  52. package/lib/components/VendorCard/LegendMarketplaceVendorCard.d.ts.map +1 -0
  53. package/lib/components/VendorCard/LegendMarketplaceVendorCard.js +27 -0
  54. package/lib/components/VendorCard/LegendMarketplaceVendorCard.js.map +1 -0
  55. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts +1 -1
  56. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -1
  57. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +11 -8
  58. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -1
  59. package/lib/components/__test-utils__/TEST_DATA__SearchResults.json +745 -0
  60. package/lib/index.css +2 -2
  61. package/lib/index.css.map +1 -1
  62. package/lib/index.d.ts +1 -1
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/index.js +1 -1
  65. package/lib/index.js.map +1 -1
  66. package/lib/package.json +5 -1
  67. package/lib/pages/Home/LegendMarketplaceHome.d.ts.map +1 -0
  68. package/lib/pages/Home/LegendMarketplaceHome.js +73 -0
  69. package/lib/pages/Home/LegendMarketplaceHome.js.map +1 -0
  70. package/lib/pages/SearchResults/LegendMarketplaceSearchResultDrawerContent.d.ts +20 -0
  71. package/lib/pages/SearchResults/LegendMarketplaceSearchResultDrawerContent.d.ts.map +1 -0
  72. package/lib/pages/SearchResults/LegendMarketplaceSearchResultDrawerContent.js +52 -0
  73. package/lib/pages/SearchResults/LegendMarketplaceSearchResultDrawerContent.js.map +1 -0
  74. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.d.ts +19 -0
  75. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.d.ts.map +1 -0
  76. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js +75 -0
  77. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js.map +1 -0
  78. package/lib/stores/LegendMarketplaceBaseStore.d.ts +4 -0
  79. package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
  80. package/lib/stores/LegendMarketplaceBaseStore.js +15 -0
  81. package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
  82. package/lib/stores/MarketplaceLakehouseServerClient.d.ts +23 -0
  83. package/lib/stores/MarketplaceLakehouseServerClient.d.ts.map +1 -0
  84. package/lib/stores/MarketplaceLakehouseServerClient.js +24 -0
  85. package/lib/stores/MarketplaceLakehouseServerClient.js.map +1 -0
  86. package/lib/stores/lakehouse/MarketplaceLakehouseStore.d.ts +55 -0
  87. package/lib/stores/lakehouse/MarketplaceLakehouseStore.d.ts.map +1 -0
  88. package/lib/stores/lakehouse/MarketplaceLakehouseStore.js +109 -0
  89. package/lib/stores/lakehouse/MarketplaceLakehouseStore.js.map +1 -0
  90. package/package.json +10 -6
  91. package/src/__lib__/LegendMarketplaceNavigation.ts +53 -0
  92. package/src/application/LegendMarketplace.tsx +4 -4
  93. package/src/application/LegendMarketplaceApplicationConfig.ts +39 -30
  94. package/src/{components → application}/LegendMarketplaceFrameworkProvider.tsx +1 -1
  95. package/src/{components → application}/LegendMarketplaceWebApplication.tsx +12 -2
  96. package/src/application/__test-utils__/LegendMarketplaceApplicationTestUtils.ts +3 -7
  97. package/src/application/extensions/Core_LegendMarketplace_LegendApplicationPlugin.ts +38 -0
  98. package/src/components/{header → Header}/LegendMarketplaceAppInfo.tsx +1 -27
  99. package/src/components/{header → Header}/LegendMarketplaceHeader.tsx +17 -2
  100. package/src/components/Lakehouse/LakehouseMarketplace.tsx +133 -0
  101. package/src/components/Lakehouse/MarketLakehouseStoreProvider.tsx +69 -0
  102. package/src/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.tsx +81 -0
  103. package/src/components/SearchBar/LegendMarketplaceSearchBar.tsx +74 -0
  104. package/src/components/VendorCard/LegendMarketplaceVendorCard.tsx +58 -0
  105. package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +18 -6
  106. package/src/components/__test-utils__/TEST_DATA__SearchResults.json +745 -0
  107. package/src/index.ts +1 -1
  108. package/src/pages/Home/LegendMarketplaceHome.tsx +137 -0
  109. package/src/pages/SearchResults/LegendMarketplaceSearchResultDrawerContent.tsx +127 -0
  110. package/src/pages/SearchResults/LegendMarketplaceSearchResults.tsx +157 -0
  111. package/src/stores/LegendMarketplaceBaseStore.ts +18 -0
  112. package/src/stores/MarketplaceLakehouseServerClient.ts +29 -0
  113. package/src/stores/lakehouse/MarketplaceLakehouseStore.ts +164 -0
  114. package/tsconfig.json +17 -6
  115. package/lib/components/LegendMarketplaceFrameworkProvider.d.ts.map +0 -1
  116. package/lib/components/LegendMarketplaceFrameworkProvider.js.map +0 -1
  117. package/lib/components/LegendMarketplaceWebApplication.d.ts.map +0 -1
  118. package/lib/components/LegendMarketplaceWebApplication.js.map +0 -1
  119. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.d.ts.map +0 -1
  120. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.js.map +0 -1
  121. package/lib/components/header/LegendMarketplaceAppInfo.js.map +0 -1
  122. package/lib/components/header/LegendMarketplaceHeader.d.ts.map +0 -1
  123. package/lib/components/header/LegendMarketplaceHeader.js.map +0 -1
  124. package/lib/components/home/LegendMarketplaceHome.d.ts.map +0 -1
  125. package/lib/components/home/LegendMarketplaceHome.js +0 -22
  126. package/lib/components/home/LegendMarketplaceHome.js.map +0 -1
  127. package/src/components/home/LegendMarketplaceHome.tsx +0 -41
  128. /package/lib/{components → application}/LegendMarketplaceFrameworkProvider.d.ts +0 -0
  129. /package/lib/{components → application}/LegendMarketplaceWebApplication.d.ts +0 -0
  130. /package/lib/{components → application}/extensions/Core_LegendMarketplaceApplicationPlugin.d.ts +0 -0
  131. /package/lib/{components → application}/extensions/Core_LegendMarketplaceApplicationPlugin.js +0 -0
  132. /package/lib/components/{header → Header}/LegendMarketplaceAppInfo.d.ts +0 -0
  133. /package/lib/components/{header → Header}/LegendMarketplaceHeader.d.ts +0 -0
  134. /package/lib/{components/home → pages/Home}/LegendMarketplaceHome.d.ts +0 -0
  135. /package/src/{components → application}/extensions/Core_LegendMarketplaceApplicationPlugin.tsx +0 -0
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { observer } from 'mobx-react-lite';
18
+ import { useMarketplaceLakehouseStore, withMarketplaceLakehouseStore, } from './MarketLakehouseStoreProvider.js';
19
+ import { useEffect } from 'react';
20
+ import { CubesLoadingIndicator, CubesLoadingIndicatorIcon, } from '@finos/legend-art';
21
+ import { LegendMarketplaceHeader } from '../Header/LegendMarketplaceHeader.js';
22
+ import { Grid2 as Grid } from '@mui/material';
23
+ import { LegendMarketplaceVendorCard } from '../VendorCard/LegendMarketplaceVendorCard.js';
24
+ import { LATEST_VERSION_ALIAS, StoreProjectData, VersionedProjectData, } from '@finos/legend-server-depot';
25
+ import { assertErrorThrown, guaranteeNonNullable } from '@finos/legend-shared';
26
+ import { EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCProjectViewUrl } from '../../__lib__/LegendMarketplaceNavigation.js';
27
+ import { flowResult } from 'mobx';
28
+ export const LakehouseMarketplace = withMarketplaceLakehouseStore(observer(() => {
29
+ const marketPlaceStore = useMarketplaceLakehouseStore();
30
+ useEffect(() => {
31
+ marketPlaceStore.init();
32
+ }, [marketPlaceStore]);
33
+ const openDataProduct = async (state) => {
34
+ const path = `${state.product.package}::${state.product.name}`;
35
+ try {
36
+ const studioUrl = guaranteeNonNullable(marketPlaceStore.applicationStore.config.studioServerUrl, 'studio url required');
37
+ const project = StoreProjectData.serialization.fromJson(await marketPlaceStore.depotServerClient.getProject(state.productEntity.groupId, state.productEntity.artifactId));
38
+ const versionId = state.productEntity.versionId === LATEST_VERSION_ALIAS
39
+ ? VersionedProjectData.serialization.fromJson(await marketPlaceStore.depotServerClient.getLatestVersion(state.productEntity.groupId, state.productEntity.artifactId)).versionId
40
+ : state.productEntity.versionId;
41
+ marketPlaceStore.applicationStore.navigationService.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCProjectViewUrl(studioUrl, project.projectId, versionId, path));
42
+ }
43
+ catch (error) {
44
+ assertErrorThrown(error);
45
+ marketPlaceStore.applicationStore.notificationService.notifyError(path
46
+ ? `Can't visit element of path: '${path}'`
47
+ : `Can't visit project`);
48
+ }
49
+ };
50
+ return (_jsx("div", { className: "app__page", children: _jsx("div", { className: "legend-marketplace-home", children: _jsxs("div", { className: "legend-marketplace-home__body", children: [_jsx(LegendMarketplaceHeader, {}), _jsx("div", { className: "legend-marketplace-home__content", children: _jsxs("div", { className: "legend-marketplace-data-products__content", children: [_jsx(CubesLoadingIndicator, { isLoading: marketPlaceStore.loadingProductsState.isInProgress, children: _jsx(CubesLoadingIndicatorIcon, {}) }), _jsx("div", { className: "legend-marketplace-home__vendors-cards", children: _jsx(Grid, { container: true, spacing: { xs: 2, md: 3, xl: 4 }, columns: { xs: 1, sm: 2, md: 3, xl: 6 }, sx: { justifyContent: 'center' }, children: marketPlaceStore.productStates?.map((dpState) => (_jsx(Grid, { size: 1, children: _jsx(LegendMarketplaceVendorCard, { dataAsset: dpState.dataSet, onClick: (dataAsset) => {
51
+ {
52
+ flowResult(openDataProduct(dpState));
53
+ }
54
+ } }) }, `${dpState.dataSet.provider}.${dpState.dataSet.type}.${dpState.dataSet.description}`))) }) })] }) })] }) }) }));
55
+ }));
56
+ //# sourceMappingURL=LakehouseMarketplace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LakehouseMarketplace.js","sourceRoot":"","sources":["../../../src/components/Lakehouse/LakehouseMarketplace.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAG3F,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,iEAAiE,EAAE,MAAM,8CAA8C,CAAC;AACjI,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAC/D,QAAQ,CAAC,GAAG,EAAE;IACZ,MAAM,gBAAgB,GAAG,4BAA4B,EAAE,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,MAAM,eAAe,GAAG,KAAK,EAAE,KAAuB,EAAiB,EAAE;QACvE,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC/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AK,SAAS,EAAC,2CAA2C,aACxD,KAAC,qBAAqB,IACpB,SAAS,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,YAAY,YAE7D,KAAC,yBAAyB,KAAG,GACP,EACxB,cAAK,SAAS,EAAC,wCAAwC,YACrD,KAAC,IAAI,IACH,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAChC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EACvC,EAAE,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,YAE/B,gBAAgB,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAChD,KAAC,IAAI,IAEH,IAAI,EAAE,CAAC,YAEP,KAAC,2BAA2B,IAC1B,SAAS,EAAE,OAAO,CAAC,OAAO,EAC1B,OAAO,EAAE,CAAC,SAAoB,EAAE,EAAE;oDAChC,CAAC;wDACC,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;oDACvC,CAAC;gDACH,CAAC,GACD,IAVG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAWpF,CACR,CAAC,GACG,GACH,IACF,GACF,IACF,GACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
@@ -0,0 +1,22 @@
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
+ import { MarketplaceLakehouseStore } from '../../stores/lakehouse/MarketplaceLakehouseStore.js';
17
+ export declare const MarketplaceLakehouseStoreProvider: React.FC<{
18
+ children: React.ReactNode;
19
+ }>;
20
+ export declare const useMarketplaceLakehouseStore: () => MarketplaceLakehouseStore;
21
+ export declare const withMarketplaceLakehouseStore: (WrappedComponent: React.FC) => React.FC;
22
+ //# sourceMappingURL=MarketLakehouseStoreProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarketLakehouseStoreProvider.d.ts","sourceRoot":"","sources":["../../../src/components/Lakehouse/MarketLakehouseStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAUhG,eAAO,MAAM,iCAAiC,EAAE,KAAK,CAAC,EAAE,CAAC;IACvD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAoBA,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAAO,yBAI7C,CAAC;AAEJ,eAAO,MAAM,6BAA6B,GACxC,kBAAkB,KAAK,CAAC,EAAE,KACzB,KAAK,CAAC,EAON,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { createContext, useContext } from 'react';
18
+ import { useLocalObservable } from 'mobx-react-lite';
19
+ import { guaranteeNonNullable } from '@finos/legend-shared';
20
+ import { MarketplaceLakehouseStore } from '../../stores/lakehouse/MarketplaceLakehouseStore.js';
21
+ import { useLegendMarketplaceApplicationStore, useLegendMarketplaceBaseStore, } from '../../application/LegendMarketplaceFrameworkProvider.js';
22
+ const MarketplaceLakehouseStoreContext = createContext(undefined);
23
+ export const MarketplaceLakehouseStoreProvider = ({ children }) => {
24
+ const applicationStore = useLegendMarketplaceApplicationStore();
25
+ const baseStore = useLegendMarketplaceBaseStore();
26
+ const lakehouseServerClient = guaranteeNonNullable(baseStore.lakehouseServerClient, 'lakehouse server client required to render');
27
+ const store = useLocalObservable(() => new MarketplaceLakehouseStore(applicationStore, lakehouseServerClient, baseStore.depotServerClient));
28
+ return (_jsx(MarketplaceLakehouseStoreContext.Provider, { value: store, children: children }));
29
+ };
30
+ export const useMarketplaceLakehouseStore = () => guaranteeNonNullable(useContext(MarketplaceLakehouseStoreContext), `Can't find editor store in context`);
31
+ export const withMarketplaceLakehouseStore = (WrappedComponent) => function WithMarketplaceLakehouseStore() {
32
+ return (_jsx(MarketplaceLakehouseStoreProvider, { children: _jsx(WrappedComponent, {}) }));
33
+ };
34
+ //# sourceMappingURL=MarketLakehouseStoreProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarketLakehouseStoreProvider.js","sourceRoot":"","sources":["../../../src/components/Lakehouse/MarketLakehouseStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,yDAAyD,CAAC;AAEjE,MAAM,gCAAgC,GAAG,aAAa,CAEpD,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iCAAiC,GAEzC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,MAAM,gBAAgB,GAAG,oCAAoC,EAAE,CAAC;IAChE,MAAM,SAAS,GAAG,6BAA6B,EAAE,CAAC;IAClD,MAAM,qBAAqB,GAAG,oBAAoB,CAChD,SAAS,CAAC,qBAAqB,EAC/B,4CAA4C,CAC7C,CAAC;IACF,MAAM,KAAK,GAAG,kBAAkB,CAC9B,GAAG,EAAE,CACH,IAAI,yBAAyB,CAC3B,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,CAAC,iBAAiB,CAC5B,CACJ,CAAC;IACF,OAAO,CACL,KAAC,gCAAgC,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpD,QAAQ,GACiC,CAC7C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAA8B,EAAE,CAC1E,oBAAoB,CAClB,UAAU,CAAC,gCAAgC,CAAC,EAC5C,oCAAoC,CACrC,CAAC;AAEJ,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,gBAA0B,EAChB,EAAE,CACZ,SAAS,6BAA6B;IACpC,OAAO,CACL,KAAC,iCAAiC,cAChC,KAAC,gBAAgB,KAAG,GACc,CACrC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,23 @@
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
+ import { type JSX } from 'react';
17
+ import type { ProductSearchResult } from '@finos/legend-server-marketplace';
18
+ export declare const LegendMarketplaceProductSearchCard: (props: {
19
+ productSearchResult: ProductSearchResult;
20
+ onPreviewClick: (productSearchResult: ProductSearchResult) => void;
21
+ onLearnMoreClick: (productSearchResult: ProductSearchResult) => void;
22
+ }) => JSX.Element;
23
+ //# sourceMappingURL=LegendMarketplaceProductSearchCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceProductSearchCard.d.ts","sourceRoot":"","sources":["../../../src/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAK5E,eAAO,MAAM,kCAAkC,GAAI,OAAO;IACxD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,cAAc,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnE,gBAAgB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtE,KAAG,GAAG,CAAC,OAqDP,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import {} from 'react';
18
+ import { Button, Card, CardActions, CardContent } from '@mui/material';
19
+ import DOMPurify from 'dompurify';
20
+ const MAX_DESCRIPTION_LENGTH = 250;
21
+ export const LegendMarketplaceProductSearchCard = (props) => {
22
+ const { productSearchResult, onPreviewClick, onLearnMoreClick } = props;
23
+ const descriptionSnippet = productSearchResult.data_product_description.substring(0, MAX_DESCRIPTION_LENGTH);
24
+ const truncatedDescriptionSnippet = `${descriptionSnippet.substring(0, descriptionSnippet.lastIndexOf(' '))}...`;
25
+ const descriptionHTML = {
26
+ __html: productSearchResult.data_product_description.length >
27
+ MAX_DESCRIPTION_LENGTH
28
+ ? DOMPurify.sanitize(truncatedDescriptionSnippet)
29
+ : DOMPurify.sanitize(productSearchResult.data_product_description),
30
+ };
31
+ return (_jsxs(Card, { variant: "outlined", className: "legend-marketplace-product-search-result-card", children: [_jsxs(CardContent, { className: "legend-marketplace-product-search-result-card__content", children: [_jsx("div", { className: "legend-marketplace-product-search-result-card__vendor-name", children: productSearchResult.vendor_name }), _jsx("div", { className: "legend-marketplace-product-search-result-card__data-product-name", children: productSearchResult.data_product_name }), _jsx("div", { className: "legend-marketplace-product-search-result-card__data-product-description", children: productSearchResult.data_product_description.length > 0 && (_jsx("div", { dangerouslySetInnerHTML: descriptionHTML })) })] }), _jsxs(CardActions, { className: "legend-marketplace-product-search-result-card__actions", children: [_jsx(Button, { variant: "outlined", onClick: () => onPreviewClick(productSearchResult), children: "Preview" }), productSearchResult.data_product_link && (_jsx(Button, { variant: "contained", onClick: () => onLearnMoreClick(productSearchResult), children: "Learn More" }))] })] }));
32
+ };
33
+ //# sourceMappingURL=LegendMarketplaceProductSearchCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceProductSearchCard.js","sourceRoot":"","sources":["../../../src/components/ProductSearchResultCard/LegendMarketplaceProductSearchCard.tsx"],"names":[],"mappings":";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d,MAAC,WAAW,IAAC,SAAS,EAAC,wDAAwD,aAC7E,KAAC,MAAM,IACL,OAAO,EAAC,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,mBAAmB,CAAC,wBAG3C,EACR,mBAAmB,CAAC,iBAAiB,IAAI,CACxC,KAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,2BAG7C,CACV,IACW,IACT,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { type JSX } from 'react';
17
+ export interface Vendor {
18
+ provider: string;
19
+ description: string;
20
+ type: string;
21
+ }
22
+ export declare const LegendMarketplaceSearchBar: (props: {
23
+ onSearch: (provider: string | undefined, query: string | undefined) => void;
24
+ initialValue?: string;
25
+ }) => JSX.Element;
26
+ //# sourceMappingURL=LegendMarketplaceSearchBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceSearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar/LegendMarketplaceSearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO;IAChD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,GAAG,CAAC,OA4CP,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useState } from 'react';
18
+ import { Button, InputAdornment, TextField } from '@mui/material';
19
+ import { SearchIcon } from '@finos/legend-art';
20
+ export const LegendMarketplaceSearchBar = (props) => {
21
+ const { onSearch, initialValue } = props;
22
+ const [searchQuery, setSearchQuery] = useState(initialValue ?? '');
23
+ return (_jsxs("form", { className: "legend-marketplace__search-bar", onSubmit: (event) => {
24
+ event.preventDefault();
25
+ onSearch(undefined, searchQuery);
26
+ }, children: [_jsx(TextField, { type: "search", placeholder: "Search", fullWidth: true, value: searchQuery, onChange: (event) => {
27
+ setSearchQuery(event.target.value);
28
+ }, slotProps: {
29
+ input: {
30
+ startAdornment: (_jsx(InputAdornment, { position: "start", children: _jsx(SearchIcon, {}) })),
31
+ },
32
+ }, sx: {
33
+ height: '100%',
34
+ '& .MuiOutlinedInput-root': {
35
+ height: '100%',
36
+ borderTopRightRadius: 0,
37
+ borderBottomRightRadius: 0,
38
+ },
39
+ } }), _jsx(Button, { type: "submit", variant: "contained", disabled: !searchQuery, children: "Go" })] }));
40
+ };
41
+ //# sourceMappingURL=LegendMarketplaceSearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceSearchBar.js","sourceRoot":"","sources":["../../../src/components/SearchBar/LegendMarketplaceSearchBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAY,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAG1C,EAAe,EAAE;IAChB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAEzC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,YAAY,IAAI,EAAE,CAAC,CAAC;IAE3E,OAAO,CACL,gBACE,SAAS,EAAC,gCAAgC,EAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACnC,CAAC,aAED,KAAC,SAAS,IACR,IAAI,EAAC,QAAQ,EACb,WAAW,EAAC,QAAQ,EACpB,SAAS,EAAE,IAAI,EACf,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACrC,CAAC,EACD,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,cAAc,EAAE,CACd,KAAC,cAAc,IAAC,QAAQ,EAAC,OAAO,YAC9B,KAAC,UAAU,KAAG,GACC,CAClB;qBACF;iBACF,EACD,EAAE,EAAE;oBACF,MAAM,EAAE,MAAM;oBACd,0BAA0B,EAAE;wBAC1B,MAAM,EAAE,MAAM;wBACd,oBAAoB,EAAE,CAAC;wBACvB,uBAAuB,EAAE,CAAC;qBAC3B;iBACF,GACD,EACF,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,WAAW,EAAC,QAAQ,EAAE,CAAC,WAAW,mBAEvD,IACJ,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,22 @@
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
+ import { type JSX } from 'react';
17
+ import type { DataAsset } from '@finos/legend-server-marketplace';
18
+ export declare const LegendMarketplaceVendorCard: (props: {
19
+ dataAsset: DataAsset;
20
+ onClick: (dataAsset: DataAsset) => void;
21
+ }) => JSX.Element;
22
+ //# sourceMappingURL=LegendMarketplaceVendorCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceVendorCard.d.ts","sourceRoot":"","sources":["../../../src/components/VendorCard/LegendMarketplaceVendorCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,eAAO,MAAM,2BAA2B,GAAI,OAAO;IACjD,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC,KAAG,GAAG,CAAC,OAiCP,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import {} from 'react';
18
+ import { Card, CardActionArea, CardContent, Chip } from '@mui/material';
19
+ import { clsx } from '@finos/legend-art';
20
+ export const LegendMarketplaceVendorCard = (props) => {
21
+ const { dataAsset, onClick } = props;
22
+ return (_jsx(Card, { variant: "outlined", className: "legend-marketplace-vendor-card", children: _jsxs(CardActionArea, { onClick: () => onClick(dataAsset), sx: { height: '100%' }, children: [_jsxs(CardContent, { className: "legend-marketplace-vendor-card__content", children: [_jsx(Chip, { label: dataAsset.type, className: clsx('legend-marketplace-vendor-card__type', {
23
+ 'legend-marketplace-vendor-card__type--vendor': dataAsset.type === 'vendor',
24
+ 'legend-marketplace-vendor-card__type--curated': dataAsset.type === 'curated',
25
+ }) }), _jsx("div", { className: "legend-marketplace-vendor-card__name", children: dataAsset.provider }), _jsx("div", { className: "legend-marketplace-vendor-card__description", children: dataAsset.description })] }), dataAsset.moreInfo.length > 0 && (_jsx(CardContent, { className: "legend-marketplace-vendor-card__more-info", children: _jsx("div", { children: dataAsset.moreInfo }) }))] }) }));
26
+ };
27
+ //# sourceMappingURL=LegendMarketplaceVendorCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceVendorCard.js","sourceRoot":"","sources":["../../../src/components/VendorCard/LegendMarketplaceVendorCard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAY,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAG3C,EAAe,EAAE;IAChB,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACrC,OAAO,CACL,KAAC,IAAI,IAAC,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,gCAAgC,YACjE,MAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EACjC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aAEtB,MAAC,WAAW,IAAC,SAAS,EAAC,yCAAyC,aAC9D,KAAC,IAAI,IACH,KAAK,EAAE,SAAS,CAAC,IAAI,EACrB,SAAS,EAAE,IAAI,CAAC,sCAAsC,EAAE;gCACtD,8CAA8C,EAC5C,SAAS,CAAC,IAAI,KAAK,QAAQ;gCAC7B,+CAA+C,EAC7C,SAAS,CAAC,IAAI,KAAK,SAAS;6BAC/B,CAAC,GACF,EACF,cAAK,SAAS,EAAC,sCAAsC,YAClD,SAAS,CAAC,QAAQ,GACf,EACN,cAAK,SAAS,EAAC,6CAA6C,YACzD,SAAS,CAAC,WAAW,GAClB,IACM,EACb,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,KAAC,WAAW,IAAC,SAAS,EAAC,2CAA2C,YAChE,wBAAM,SAAS,CAAC,QAAQ,GAAO,GACnB,CACf,IACc,GACZ,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -24,7 +24,7 @@ export declare const TEST__provideMockedLegendMarketplaceBaseStore: (customizati
24
24
  extraPlugins?: AbstractPlugin[];
25
25
  extraPresets?: AbstractPreset[];
26
26
  }) => Promise<LegendMarketplaceBaseStore>;
27
- export declare const TEST__setUpMarketplace: (MOCK__store: LegendMarketplaceBaseStore) => Promise<{
27
+ export declare const TEST__setUpMarketplace: (MOCK__store: LegendMarketplaceBaseStore, route?: string) => Promise<{
28
28
  renderResult: RenderResult;
29
29
  }>;
30
30
  //# sourceMappingURL=LegendMarketplaceStoreTestUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendMarketplaceStoreTestUtils.d.ts","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQhF,OAAO,EACL,KAAK,iCAAiC,EACtC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AAKpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAIrG,eAAO,MAAM,6CAA6C,GACjD,gBAAgB;IACrB,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IACrD,aAAa,CAAC,EAAE,8BAA8B,CAAC;IAC/C,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;CACjC,KAAG,OAAO,CAAC,0BAA0B,CAyBrC,CAAC;AAEJ,eAAO,MAAM,sBAAsB,GACjC,aAAa,0BAA0B,KACtC,OAAO,CAAC;IACT,YAAY,EAAE,YAAY,CAAC;CAC5B,CAsBA,CAAC"}
1
+ {"version":3,"file":"LegendMarketplaceStoreTestUtils.d.ts","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQhF,OAAO,EACL,KAAK,iCAAiC,EACtC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAOrG,eAAO,MAAM,6CAA6C,GACjD,gBAAgB;IACrB,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IACrD,aAAa,CAAC,EAAE,8BAA8B,CAAC;IAC/C,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;CACjC,KAAG,OAAO,CAAC,0BAA0B,CAyBrC,CAAC;AAEJ,eAAO,MAAM,sBAAsB,GACjC,aAAa,0BAA0B,EACvC,QAAQ,MAAM,KACb,OAAO,CAAC;IACT,YAAY,EAAE,YAAY,CAAC;CAC5B,CA+BA,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
3
  * Copyright (c) 2020-present, Goldman Sachs
4
4
  *
@@ -16,18 +16,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */
17
17
  import { render, waitFor } from '@testing-library/react';
18
18
  import {} from '@finos/legend-shared';
19
- import { createMock } from '@finos/legend-shared/test';
19
+ import { createMock, createSpy } from '@finos/legend-shared/test';
20
20
  import { ApplicationStore, ApplicationStoreProvider, } from '@finos/legend-application';
21
21
  import { TEST__BrowserEnvironmentProvider } from '@finos/legend-application/test';
22
22
  import { Route, Routes } from '@finos/legend-application/browser';
23
23
  import { LegendMarketplaceBaseStore, } from '../../stores/LegendMarketplaceBaseStore.js';
24
- import { LegendMarketplaceFrameworkProvider } from '../LegendMarketplaceFrameworkProvider.js';
25
24
  import { LEGEND_MARKETPLACE_ROUTE_PATTERN } from '../../__lib__/LegendMarketplaceNavigation.js';
26
- import { LegendMarketplaceHome } from '../home/LegendMarketplaceHome.js';
25
+ import { LegendMarketplaceHome } from '../../pages/Home/LegendMarketplaceHome.js';
27
26
  import { LEGEND_MARKETPLACE_TEST_ID } from '../../__lib__/LegendMarketplaceTesting.js';
28
27
  import { LegendMarketplacePluginManager } from '../../application/LegendMarketplacePluginManager.js';
29
- import { Core_LegendMarketplaceApplicationPlugin } from '../extensions/Core_LegendMarketplaceApplicationPlugin.js';
28
+ import { Core_LegendMarketplaceApplicationPlugin } from '../../application/extensions/Core_LegendMarketplaceApplicationPlugin.js';
30
29
  import { TEST__getTestLegendMarketplaceApplicationConfig } from '../../application/__test-utils__/LegendMarketplaceApplicationTestUtils.js';
30
+ import { LegendMarketplaceFrameworkProvider } from '../../application/LegendMarketplaceFrameworkProvider.js';
31
+ import searchResults from './TEST_DATA__SearchResults.json' with { type: 'json' };
32
+ import { LegendMarketplaceSearchResults } from '../../pages/SearchResults/LegendMarketplaceSearchResults.js';
31
33
  export const TEST__provideMockedLegendMarketplaceBaseStore = async (customization) => {
32
34
  const pluginManager = customization?.pluginManager ?? LegendMarketplacePluginManager.create();
33
35
  pluginManager
@@ -40,14 +42,15 @@ export const TEST__provideMockedLegendMarketplaceBaseStore = async (customizatio
40
42
  const applicationStore = customization?.applicationStore ??
41
43
  new ApplicationStore(TEST__getTestLegendMarketplaceApplicationConfig(), pluginManager);
42
44
  const value = customization?.mock ?? new LegendMarketplaceBaseStore(applicationStore);
43
- const MOCK__LegendMarketplaceBaseStoreProvider = require('../LegendMarketplaceFrameworkProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports
45
+ const MOCK__LegendMarketplaceBaseStoreProvider = require('../../application/LegendMarketplaceFrameworkProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports
44
46
  MOCK__LegendMarketplaceBaseStoreProvider.useLegendMarketplaceBaseStore =
45
47
  createMock();
46
48
  MOCK__LegendMarketplaceBaseStoreProvider.useLegendMarketplaceBaseStore.mockReturnValue(value);
47
49
  return value;
48
50
  };
49
- export const TEST__setUpMarketplace = async (MOCK__store) => {
50
- const renderResult = render(_jsx(ApplicationStoreProvider, { store: MOCK__store.applicationStore, children: _jsx(TEST__BrowserEnvironmentProvider, { initialEntries: ['/'], children: _jsx(LegendMarketplaceFrameworkProvider, { children: _jsx(Routes, { children: _jsx(Route, { path: LEGEND_MARKETPLACE_ROUTE_PATTERN.DEFAULT, element: _jsx(LegendMarketplaceHome, {}) }) }) }) }) }));
51
+ export const TEST__setUpMarketplace = async (MOCK__store, route) => {
52
+ createSpy(MOCK__store.marketplaceServerClient, 'semanticSearch').mockResolvedValue(searchResults);
53
+ const renderResult = render(_jsx(ApplicationStoreProvider, { store: MOCK__store.applicationStore, children: _jsx(TEST__BrowserEnvironmentProvider, { initialEntries: [route ?? '/'], children: _jsx(LegendMarketplaceFrameworkProvider, { children: _jsxs(Routes, { children: [_jsx(Route, { path: LEGEND_MARKETPLACE_ROUTE_PATTERN.DEFAULT, element: _jsx(LegendMarketplaceHome, {}) }), _jsx(Route, { path: LEGEND_MARKETPLACE_ROUTE_PATTERN.SEARCH_RESULTS, element: _jsx(LegendMarketplaceSearchResults, {}) })] }) }) }) }));
51
54
  await waitFor(() => renderResult.getByTestId(LEGEND_MARKETPLACE_TEST_ID.HEADER));
52
55
  return {
53
56
  renderResult,
@@ -1 +1 @@
1
- {"version":3,"file":"LegendMarketplaceStoreTestUtils.js","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OA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I,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;IAC1E,MAAM,wCAAwC,GAAG,OAAO,CAAC,0CAA0C,CAAC,CAAC,CAAC,qGAAqG;IAC3M,wCAAwC,CAAC,6BAA6B;QACpE,UAAU,EAAE,CAAC;IACf,wCAAwC,CAAC,6BAA6B,CAAC,eAAe,CACpF,KAAK,CACN,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,WAAuC,EAGtC,EAAE;IACH,MAAM,YAAY,GAAG,MAAM,CACzB,KAAC,wBAAwB,IAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,YAC3D,KAAC,gCAAgC,IAAC,cAAc,EAAE,CAAC,GAAG,CAAC,YACrD,KAAC,kCAAkC,cACjC,KAAC,MAAM,cACL,KAAC,KAAK,IACJ,IAAI,EAAE,gCAAgC,CAAC,OAAO,EAC9C,OAAO,EAAE,KAAC,qBAAqB,KAAG,GAClC,GACK,GAC0B,GACJ,GACV,CAC5B,CAAC;IACF,MAAM,OAAO,CAAC,GAAG,EAAE,CACjB,YAAY,CAAC,WAAW,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAC5D,CAAC;IAEF,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"LegendMarketplaceStoreTestUtils.js","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAA4C,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gCAAgC,EAAE,MAA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