@finos/legend-application-marketplace 0.2.13 → 0.2.15

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 (120) 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 +4 -0
  4. package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
  5. package/lib/application/LegendMarketplaceApplicationConfig.d.ts +9 -0
  6. package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
  7. package/lib/application/LegendMarketplaceApplicationConfig.js +40 -22
  8. package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
  9. package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -1
  10. package/lib/application/LegendMarketplaceWebApplication.js +4 -1
  11. package/lib/application/LegendMarketplaceWebApplication.js.map +1 -1
  12. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.d.ts.map +1 -1
  13. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js +7 -0
  14. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js.map +1 -1
  15. package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.d.ts +21 -0
  16. package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.d.ts.map +1 -0
  17. package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.js +29 -0
  18. package/lib/application/providers/LegendMarketplaceAIChatStoreProvider.js.map +1 -0
  19. package/lib/index.css +2 -2
  20. package/lib/index.css.map +1 -1
  21. package/lib/package.json +1 -1
  22. package/lib/pages/Agents/LegendMarketplaceAgents.d.ts.map +1 -1
  23. package/lib/pages/Agents/LegendMarketplaceAgents.js +49 -17
  24. package/lib/pages/Agents/LegendMarketplaceAgents.js.map +1 -1
  25. package/lib/pages/Agents/MarketplaceAIChatView.d.ts +21 -0
  26. package/lib/pages/Agents/MarketplaceAIChatView.d.ts.map +1 -0
  27. package/lib/pages/Agents/MarketplaceAIChatView.js +141 -0
  28. package/lib/pages/Agents/MarketplaceAIChatView.js.map +1 -0
  29. package/lib/pages/Agents/MarketplaceAIInputBar.d.ts +22 -0
  30. package/lib/pages/Agents/MarketplaceAIInputBar.d.ts.map +1 -0
  31. package/lib/pages/Agents/MarketplaceAIInputBar.js +40 -0
  32. package/lib/pages/Agents/MarketplaceAIInputBar.js.map +1 -0
  33. package/lib/pages/Agents/MarketplaceAIProductAutosuggest.d.ts +25 -0
  34. package/lib/pages/Agents/MarketplaceAIProductAutosuggest.d.ts.map +1 -0
  35. package/lib/pages/Agents/MarketplaceAIProductAutosuggest.js +86 -0
  36. package/lib/pages/Agents/MarketplaceAIProductAutosuggest.js.map +1 -0
  37. package/lib/pages/Agents/MarketplaceAIProductCards.d.ts +23 -0
  38. package/lib/pages/Agents/MarketplaceAIProductCards.d.ts.map +1 -0
  39. package/lib/pages/Agents/MarketplaceAIProductCards.js +20 -0
  40. package/lib/pages/Agents/MarketplaceAIProductCards.js.map +1 -0
  41. package/lib/pages/Agents/MarketplaceAIScopeSelector.d.ts +19 -0
  42. package/lib/pages/Agents/MarketplaceAIScopeSelector.d.ts.map +1 -0
  43. package/lib/pages/Agents/MarketplaceAIScopeSelector.js +46 -0
  44. package/lib/pages/Agents/MarketplaceAIScopeSelector.js.map +1 -0
  45. package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.d.ts.map +1 -1
  46. package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js +74 -63
  47. package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js.map +1 -1
  48. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.d.ts.map +1 -1
  49. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js +85 -69
  50. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js.map +1 -1
  51. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.d.ts.map +1 -1
  52. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js +7 -11
  53. package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js.map +1 -1
  54. package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.d.ts +17 -0
  55. package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.d.ts.map +1 -0
  56. package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js +126 -0
  57. package/lib/pages/Lakehouse/entitlements/PermitDataAccessRequest.js.map +1 -0
  58. package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.d.ts.map +1 -1
  59. package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js +23 -65
  60. package/lib/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.js.map +1 -1
  61. package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.d.ts +29 -0
  62. package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.d.ts.map +1 -0
  63. package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.js +60 -0
  64. package/lib/pages/Lakehouse/entitlements/showTaskActionAlert.js.map +1 -0
  65. package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
  66. package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js +3 -8
  67. package/lib/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.js.map +1 -1
  68. package/lib/stores/LegendMarketplaceBaseStore.d.ts +2 -1
  69. package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
  70. package/lib/stores/LegendMarketplaceBaseStore.js +8 -1
  71. package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
  72. package/lib/stores/ai/LegendMarketplaceAIChatStore.d.ts +109 -0
  73. package/lib/stores/ai/LegendMarketplaceAIChatStore.d.ts.map +1 -0
  74. package/lib/stores/ai/LegendMarketplaceAIChatStore.js +1106 -0
  75. package/lib/stores/ai/LegendMarketplaceAIChatStore.js.map +1 -0
  76. package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.d.ts.map +1 -1
  77. package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js +3 -2
  78. package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js.map +1 -1
  79. package/lib/stores/lakehouse/dataProducts/ProductCardState.d.ts +1 -1
  80. package/lib/stores/lakehouse/dataProducts/ProductCardState.d.ts.map +1 -1
  81. package/lib/stores/lakehouse/dataProducts/ProductCardState.js +1 -2
  82. package/lib/stores/lakehouse/dataProducts/ProductCardState.js.map +1 -1
  83. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +30 -3
  84. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -1
  85. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +94 -16
  86. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -1
  87. package/lib/utils/EntitlementsUtils.d.ts +36 -2
  88. package/lib/utils/EntitlementsUtils.d.ts.map +1 -1
  89. package/lib/utils/EntitlementsUtils.js +225 -46
  90. package/lib/utils/EntitlementsUtils.js.map +1 -1
  91. package/lib/utils/SearchUtils.d.ts.map +1 -1
  92. package/lib/utils/SearchUtils.js +7 -4
  93. package/lib/utils/SearchUtils.js.map +1 -1
  94. package/package.json +10 -10
  95. package/src/__lib__/LegendMarketplaceNavigation.ts +11 -0
  96. package/src/application/LegendMarketplaceApplicationConfig.ts +62 -24
  97. package/src/application/LegendMarketplaceWebApplication.tsx +15 -0
  98. package/src/application/__test-utils__/LegendMarketplaceApplicationTestUtils.ts +7 -0
  99. package/src/application/providers/LegendMarketplaceAIChatStoreProvider.tsx +47 -0
  100. package/src/pages/Agents/LegendMarketplaceAgents.tsx +145 -23
  101. package/src/pages/Agents/MarketplaceAIChatView.tsx +555 -0
  102. package/src/pages/Agents/MarketplaceAIInputBar.tsx +91 -0
  103. package/src/pages/Agents/MarketplaceAIProductAutosuggest.tsx +181 -0
  104. package/src/pages/Agents/MarketplaceAIProductCards.tsx +111 -0
  105. package/src/pages/Agents/MarketplaceAIScopeSelector.tsx +84 -0
  106. package/src/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.tsx +131 -136
  107. package/src/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.tsx +158 -165
  108. package/src/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.tsx +12 -17
  109. package/src/pages/Lakehouse/entitlements/PermitDataAccessRequest.tsx +245 -0
  110. package/src/pages/Lakehouse/entitlements/WorkflowDataAccessRequest.tsx +25 -94
  111. package/src/pages/Lakehouse/entitlements/showTaskActionAlert.tsx +101 -0
  112. package/src/pages/Lakehouse/searchResults/LegendMarketplaceSearchResults.tsx +27 -31
  113. package/src/stores/LegendMarketplaceBaseStore.ts +12 -0
  114. package/src/stores/ai/LegendMarketplaceAIChatStore.ts +1720 -0
  115. package/src/stores/lakehouse/LegendMarketplaceProductViewerStore.ts +6 -0
  116. package/src/stores/lakehouse/dataProducts/ProductCardState.ts +3 -4
  117. package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +181 -48
  118. package/src/utils/EntitlementsUtils.tsx +341 -86
  119. package/src/utils/SearchUtils.tsx +7 -4
  120. package/tsconfig.json +9 -0
@@ -97,6 +97,13 @@ const WorkflowDataAccessRequestTask = React.lazy(() =>
97
97
  }),
98
98
  ),
99
99
  );
100
+ const PermitDataAccessRequestTask = React.lazy(() =>
101
+ import('../pages/Lakehouse/entitlements/PermitDataAccessRequest.js').then(
102
+ (module) => ({
103
+ default: module.PermitDataAccessRequestTask,
104
+ }),
105
+ ),
106
+ );
100
107
  const LakehouseAdmin = React.lazy(() =>
101
108
  import('../pages/Lakehouse/admin/LakehouseAdmin.js').then((module) => ({
102
109
  default: module.LakehouseAdmin,
@@ -334,6 +341,14 @@ export const LegendMarketplaceWebApplicationRouter = observer(() => {
334
341
  useProtectedPage(WorkflowDataAccessRequestTask),
335
342
  )}
336
343
  />
344
+ <Route
345
+ path={
346
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_PERMIT_DATA_ACCESS_REQUEST
347
+ }
348
+ element={React.createElement(
349
+ useProtectedPage(PermitDataAccessRequestTask),
350
+ )}
351
+ />
337
352
  <Route
338
353
  path={
339
354
  LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_CONTRACT_TASK
@@ -42,6 +42,7 @@ const TEST_DATA__appConfig: LegendMarketplaceApplicationConfigurationData = {
42
42
  url: 'https://testLakehouseUrl',
43
43
  platformUrl: 'https://testLakehousePlatformUrl',
44
44
  workflowUrl: 'https://testLakehouseWorkflowUrl',
45
+ permitWorkflowUrl: 'https://testLakehousePermitWorkflowUrl',
45
46
  entitlements: {
46
47
  applicationDirectoryUrl: 'https://testApplicationDirectoryUrl',
47
48
  applicationIDUrl: 'https://testApplicationIDUrl',
@@ -94,6 +95,12 @@ const TEST_DATA__appConfig: LegendMarketplaceApplicationConfigurationData = {
94
95
  'Search for product catalog information',
95
96
  'Display user activity datasets',
96
97
  ],
98
+ defaultAISuggestedQueries: [
99
+ 'What BVAL bond pricing data is available?',
100
+ 'Show me credit risk data products',
101
+ 'Find FX rates and currency data',
102
+ 'What equity analytics data do we have?',
103
+ ],
97
104
  },
98
105
  },
99
106
  assets: {
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright (c) 2026-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 { createContext, useContext } from 'react';
18
+ import { useLocalObservable } from 'mobx-react-lite';
19
+ import { guaranteeNonNullable } from '@finos/legend-shared';
20
+ import { useLegendMarketplaceBaseStore } from './LegendMarketplaceFrameworkProvider.js';
21
+ import { LegendMarketplaceAIChatStore } from '../../stores/ai/LegendMarketplaceAIChatStore.js';
22
+
23
+ const LegendMarketplaceAIChatStoreContext = createContext<
24
+ LegendMarketplaceAIChatStore | undefined
25
+ >(undefined);
26
+
27
+ export const LegendMarketplaceAIChatStoreProvider: React.FC<{
28
+ children: React.ReactNode;
29
+ }> = ({ children }) => {
30
+ const baseStore = useLegendMarketplaceBaseStore();
31
+ const aiChatStore = useLocalObservable(
32
+ () => new LegendMarketplaceAIChatStore(baseStore),
33
+ );
34
+
35
+ return (
36
+ <LegendMarketplaceAIChatStoreContext.Provider value={aiChatStore}>
37
+ {children}
38
+ </LegendMarketplaceAIChatStoreContext.Provider>
39
+ );
40
+ };
41
+
42
+ export const useLegendMarketplaceAIChatStore =
43
+ (): LegendMarketplaceAIChatStore =>
44
+ guaranteeNonNullable(
45
+ useContext(LegendMarketplaceAIChatStoreContext),
46
+ `Can't find Legend Marketplace AI chat store in context`,
47
+ );
@@ -14,40 +14,162 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ import { useCallback, useState } from 'react';
17
18
  import { observer } from 'mobx-react-lite';
18
- import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
19
- import { ComingSoonDisplay } from '../../components/ComingSoon/ComingSoonDisplay.js';
20
19
  import {
21
20
  AnalyticsIcon,
21
+ ArrowLeftIcon,
22
+ CaretRightIcon,
22
23
  PsychologyIcon,
23
24
  RobotOutlineIcon,
24
25
  SparkleStarsIcon,
25
26
  } from '@finos/legend-art';
27
+ import { Container, Typography } from '@mui/material';
28
+ import { LegendMarketplacePage } from '../LegendMarketplacePage.js';
29
+ import { LegendMarketplaceAIChatStoreProvider } from '../../application/providers/LegendMarketplaceAIChatStoreProvider.js';
30
+ import { MarketplaceAIChatView } from './MarketplaceAIChatView.js';
31
+ import { LegendMarketplaceSearchBar } from '../../components/SearchBar/LegendMarketplaceSearchBar.js';
32
+ import { useLegendMarketplaceBaseStore } from '../../application/providers/LegendMarketplaceFrameworkProvider.js';
33
+ import { ComingSoonDisplay } from '../../components/ComingSoon/ComingSoonDisplay.js';
34
+
35
+ const AGENT_DESCRIPTION =
36
+ 'Ask questions about your data, discover data products, and run queries using natural language.';
37
+
38
+ const AgentCardsView = observer(
39
+ (props: { onSelectAgent: (query?: string) => void }) => {
40
+ const { onSelectAgent } = props;
41
+ const legendMarketplaceBaseStore = useLegendMarketplaceBaseStore();
42
+ const applicationStore = legendMarketplaceBaseStore.applicationStore;
43
+ const isDarkMode =
44
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
45
+
46
+ return (
47
+ <>
48
+ <Container className="marketplace-agents__search-container">
49
+ <LegendMarketplaceSearchBar
50
+ onSearch={onSelectAgent}
51
+ placeholder="Ask a question about your data..."
52
+ className="marketplace-agents__search-bar"
53
+ enableAutosuggest={false}
54
+ />
55
+ </Container>
56
+ <div className="marketplace-agents__section-bar">
57
+ <div className="marketplace-agents__section-bar__container">
58
+ <Typography
59
+ variant="h4"
60
+ className="marketplace-agents__section-title"
61
+ >
62
+ Intelligence &amp; AI Agents
63
+ </Typography>
64
+ </div>
65
+ </div>
66
+ <Container
67
+ maxWidth="xxxl"
68
+ className="marketplace-agents__content-container"
69
+ >
70
+ <div className="marketplace-agents__cards">
71
+ <button
72
+ type="button"
73
+ className="marketplace-agents__agent-card"
74
+ onClick={(): void => onSelectAgent()}
75
+ >
76
+ <div className="marketplace-agents__agent-card-icon">
77
+ <img
78
+ src={
79
+ isDarkMode
80
+ ? '/assets/legendmarketplacehomelogodark.png'
81
+ : '/assets/legendmarketplacehomelogolight.png'
82
+ }
83
+ alt="Legend Marketplace AI"
84
+ className="marketplace-agents__agent-card-logo"
85
+ />
86
+ </div>
87
+ <div className="marketplace-agents__agent-card-content">
88
+ <h3 className="marketplace-agents__agent-card-title">
89
+ Legend Marketplace AI
90
+ </h3>
91
+ <p className="marketplace-agents__agent-card-desc">
92
+ {AGENT_DESCRIPTION}
93
+ </p>
94
+ </div>
95
+ <div className="marketplace-agents__agent-card-action">
96
+ Launch Agent <CaretRightIcon />
97
+ </div>
98
+ </button>
99
+ </div>
100
+ </Container>
101
+ </>
102
+ );
103
+ },
104
+ );
26
105
 
27
106
  export const LegendMarketplaceAgents = observer(() => {
28
- const featuresPreviewItems = [
29
- {
30
- icon: <SparkleStarsIcon />,
31
- title: 'Smart Recommendations',
32
- },
33
- {
34
- icon: <AnalyticsIcon />,
35
- title: 'Data Analysis',
36
- },
37
- {
38
- icon: <PsychologyIcon />,
39
- title: 'Intelligent Insights',
40
- },
41
- ];
107
+ const legendMarketplaceBaseStore = useLegendMarketplaceBaseStore();
108
+ const applicationStore = legendMarketplaceBaseStore.applicationStore;
109
+ const showDevFeatures = applicationStore.config.options.showDevFeatures;
110
+
111
+ const [showChat, setShowChat] = useState(false);
112
+ const [initialQuery, setInitialQuery] = useState<string | undefined>(
113
+ undefined,
114
+ );
115
+
116
+ const handleSelectAgent = useCallback((query?: string): void => {
117
+ setInitialQuery(query);
118
+ setShowChat(true);
119
+ }, []);
120
+
121
+ if (!showDevFeatures) {
122
+ const featuresPreviewItems = [
123
+ {
124
+ icon: <SparkleStarsIcon />,
125
+ title: 'Smart Recommendations',
126
+ },
127
+ {
128
+ icon: <AnalyticsIcon />,
129
+ title: 'Data Analysis',
130
+ },
131
+ {
132
+ icon: <PsychologyIcon />,
133
+ title: 'Intelligent Insights',
134
+ },
135
+ ];
136
+
137
+ return (
138
+ <LegendMarketplacePage className="agents-coming-soon">
139
+ <ComingSoonDisplay
140
+ loadingIcon={<RobotOutlineIcon />}
141
+ title="Legend Intelligence"
142
+ description="Transform your data operations with intelligent AI agents that learn, adapt, and deliver autonomous insights. Experience the future of data-driven automation and decision-making excellence."
143
+ featuresPreviewItems={featuresPreviewItems}
144
+ />
145
+ </LegendMarketplacePage>
146
+ );
147
+ }
148
+
149
+ const initialQueryProp = initialQuery === undefined ? {} : { initialQuery };
42
150
 
43
151
  return (
44
- <LegendMarketplacePage className="agents-coming-soon">
45
- <ComingSoonDisplay
46
- loadingIcon={<RobotOutlineIcon />}
47
- title="Legend Intelligence"
48
- description="Transform your data operations with intelligent AI agents that learn, adapt, and deliver autonomous insights. Experience the future of data-driven automation and decision-making excellence."
49
- featuresPreviewItems={featuresPreviewItems}
50
- />
152
+ <LegendMarketplacePage className="legend-marketplace-ai-page">
153
+ {showChat ? (
154
+ <LegendMarketplaceAIChatStoreProvider>
155
+ <div className="marketplace-agents__chat-wrapper">
156
+ <button
157
+ type="button"
158
+ className="marketplace-agents__back-btn"
159
+ onClick={(): void => {
160
+ setShowChat(false);
161
+ setInitialQuery(undefined);
162
+ }}
163
+ >
164
+ <ArrowLeftIcon />
165
+ <span>Back to Agents</span>
166
+ </button>
167
+ <MarketplaceAIChatView {...initialQueryProp} />
168
+ </div>
169
+ </LegendMarketplaceAIChatStoreProvider>
170
+ ) : (
171
+ <AgentCardsView onSelectAgent={handleSelectAgent} />
172
+ )}
51
173
  </LegendMarketplacePage>
52
174
  );
53
175
  });