@finos/legend-application-studio 28.19.19 → 28.19.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 (74) hide show
  1. package/lib/application/LegendStudioApplicationConfig.d.ts +1 -6
  2. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  3. package/lib/application/LegendStudioApplicationConfig.js +1 -9
  4. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  5. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
  6. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +33 -22
  7. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
  8. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts +24 -0
  9. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts.map +1 -0
  10. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js +35 -0
  11. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js.map +1 -0
  12. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts.map +1 -1
  13. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js +18 -3
  14. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js.map +1 -1
  15. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -1
  16. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js +19 -3
  17. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -1
  18. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts.map +1 -1
  19. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js +18 -3
  20. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js.map +1 -1
  21. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.d.ts.map +1 -1
  22. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js +18 -3
  23. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
  24. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.d.ts.map +1 -1
  25. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js +18 -3
  26. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js.map +1 -1
  27. package/lib/index.css +2 -2
  28. package/lib/index.css.map +1 -1
  29. package/lib/package.json +1 -1
  30. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +1 -0
  31. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
  32. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +10 -1
  33. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
  34. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +5 -1
  35. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts.map +1 -1
  36. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +22 -0
  37. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
  38. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts +5 -1
  39. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map +1 -1
  40. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js +23 -1
  41. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js.map +1 -1
  42. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts +5 -1
  43. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts.map +1 -1
  44. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js +23 -1
  45. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js.map +1 -1
  46. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +5 -1
  47. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
  48. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +23 -1
  49. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
  50. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts +5 -1
  51. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts.map +1 -1
  52. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js +23 -1
  53. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js.map +1 -1
  54. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +1 -0
  55. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
  56. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +3 -0
  57. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
  58. package/package.json +9 -9
  59. package/src/application/LegendStudioApplicationConfig.ts +1 -12
  60. package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +166 -83
  61. package/src/components/editor/editor-group/function-activator/ActivatorArtifactViewer.tsx +80 -0
  62. package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +65 -18
  63. package/src/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.tsx +72 -16
  64. package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx +67 -18
  65. package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +68 -18
  66. package/src/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.tsx +67 -18
  67. package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +14 -3
  68. package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +26 -0
  69. package/src/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.ts +27 -1
  70. package/src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts +29 -1
  71. package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +29 -1
  72. package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts +29 -1
  73. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +6 -0
  74. package/tsconfig.json +1 -0
@@ -27,6 +27,10 @@ import {
27
27
  PURE_ConnectionIcon,
28
28
  CustomSelectorInput,
29
29
  createFilter,
30
+ ControlledDropdownMenu,
31
+ MenuContent,
32
+ MenuContentItem,
33
+ CaretDownIcon,
30
34
  } from '@finos/legend-art';
31
35
  import {
32
36
  type PackageableConnection,
@@ -45,6 +49,7 @@ import {
45
49
  buildRelationalDatabaseConnectionOption,
46
50
  } from '../connection-editor/RelationalDatabaseConnectionEditor.js';
47
51
  import { ActivatorOwnershipForm } from './ActivatorFormComponents.js';
52
+ import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
48
53
 
49
54
  export const MemSQLFunctionActivatorEditor = observer(() => {
50
55
  const editorStore = useEditorStore();
@@ -115,6 +120,11 @@ export const MemSQLFunctionActivatorEditor = observer(() => {
115
120
  applicationStore.alertUnhandledError,
116
121
  );
117
122
  };
123
+ const renderArtifact = (): void => {
124
+ flowResult(editorState.renderArtifact()).catch(
125
+ applicationStore.alertUnhandledError,
126
+ );
127
+ };
118
128
  const deploy = (): void => {
119
129
  flowResult(editorState.deployToSandbox()).catch(
120
130
  applicationStore.alertUnhandledError,
@@ -128,6 +138,7 @@ export const MemSQLFunctionActivatorEditor = observer(() => {
128
138
  <PanelLoadingIndicator
129
139
  isLoading={Boolean(
130
140
  editorState.validateState.isInProgress ||
141
+ editorState.renderArtifactState.isInProgress ||
131
142
  editorState.deployState.isInProgress,
132
143
  )}
133
144
  />
@@ -137,24 +148,54 @@ export const MemSQLFunctionActivatorEditor = observer(() => {
137
148
  Mem SQL Function
138
149
  </div>
139
150
  <div className="mem-sql-function-activator-editor__header__actions">
140
- <button
141
- className="mem-sql-function-activator-editor__header__actions__action mem-sql-function-activator-editor__header__actions__action--primary"
142
- onClick={validate}
143
- disabled={editorState.validateState.isInProgress}
144
- tabIndex={-1}
145
- title="Click Validate to verify your activator before deployment"
146
- >
147
- Validate
148
- </button>
149
- <button
150
- className="mem-sql-function-activator-editor__header__actions__action mem-sql-function-activator-editor__header__actions__action--primary"
151
- onClick={deploy}
152
- disabled={editorState.deployState.isInProgress}
153
- title="Deploy to sandbox"
154
- tabIndex={-1}
155
- >
156
- Deploy to Sandbox
157
- </button>
151
+ <div className="mem-sql-function-activator-editor__header__actions btn__dropdown-combo--primary">
152
+ <button
153
+ className="mem-sql-function-activator-editor__header__actions__action mem-sql-function-activator-editor__header__actions__action--primary"
154
+ onClick={validate}
155
+ disabled={editorState.validateState.isInProgress}
156
+ tabIndex={-1}
157
+ title="Click Validate to verify your activator before deployment"
158
+ >
159
+ Validate
160
+ </button>
161
+ <ControlledDropdownMenu
162
+ className="mem-sql-function-activator-editor__header__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
163
+ title="activator-artifact-dropdown"
164
+ content={
165
+ <MenuContent>
166
+ <MenuContentItem
167
+ className="btn__dropdown-combo__option"
168
+ onClick={renderArtifact}
169
+ >
170
+ Render Artifact
171
+ </MenuContentItem>
172
+ </MenuContent>
173
+ }
174
+ menuProps={{
175
+ anchorOrigin: {
176
+ vertical: 'bottom',
177
+ horizontal: 'right',
178
+ },
179
+ transformOrigin: {
180
+ vertical: 'top',
181
+ horizontal: 'right',
182
+ },
183
+ }}
184
+ >
185
+ <CaretDownIcon />
186
+ </ControlledDropdownMenu>
187
+ </div>
188
+ <div className="mem-sql-function-activator-editor__header__actions btn__dropdown-combo--primary">
189
+ <button
190
+ className="mem-sql-function-activator-editor__header__actions__action mem-sql-function-activator-editor__header__actions__action--primary"
191
+ onClick={deploy}
192
+ disabled={editorState.deployState.isInProgress}
193
+ title="Deploy to sandbox"
194
+ tabIndex={-1}
195
+ >
196
+ Deploy to Sandbox
197
+ </button>
198
+ </div>
158
199
  </div>
159
200
  </div>
160
201
  <PanelForm>
@@ -262,6 +303,14 @@ export const MemSQLFunctionActivatorEditor = observer(() => {
262
303
  isReadOnly={isReadOnly}
263
304
  />
264
305
  </PanelForm>
306
+ <ActivatorArtifactViewer
307
+ artifact={editorState.artifact}
308
+ setArtifact={(value) => editorState.setArtifact(value)}
309
+ darkMode={
310
+ !applicationStore.layoutService
311
+ .TEMPORARY__isLightColorThemeEnabled
312
+ }
313
+ />
265
314
  </PanelContent>
266
315
  </Panel>
267
316
  </div>
@@ -28,6 +28,10 @@ import {
28
28
  CustomSelectorInput,
29
29
  createFilter,
30
30
  DataAccessIcon,
31
+ ControlledDropdownMenu,
32
+ MenuContent,
33
+ MenuContentItem,
34
+ CaretDownIcon,
31
35
  } from '@finos/legend-art';
32
36
  import {
33
37
  type PackageableConnection,
@@ -47,6 +51,7 @@ import {
47
51
  buildRelationalDatabaseConnectionOption,
48
52
  } from '../connection-editor/RelationalDatabaseConnectionEditor.js';
49
53
  import { ActivatorOwnershipForm } from './ActivatorFormComponents.js';
54
+ import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
50
55
 
51
56
  export const SnowflakeAppFunctionActivatorEditor = observer(() => {
52
57
  const editorStore = useEditorStore();
@@ -133,6 +138,11 @@ export const SnowflakeAppFunctionActivatorEditor = observer(() => {
133
138
  applicationStore.alertUnhandledError,
134
139
  );
135
140
  };
141
+ const renderArtifact = (): void => {
142
+ flowResult(editorState.renderArtifact()).catch(
143
+ applicationStore.alertUnhandledError,
144
+ );
145
+ };
136
146
  const deploy = (): void => {
137
147
  flowResult(editorState.deployToSandbox()).catch(
138
148
  applicationStore.alertUnhandledError,
@@ -146,6 +156,7 @@ export const SnowflakeAppFunctionActivatorEditor = observer(() => {
146
156
  <PanelLoadingIndicator
147
157
  isLoading={Boolean(
148
158
  editorState.validateState.isInProgress ||
159
+ editorState.renderArtifactState.isInProgress ||
149
160
  editorState.deployState.isInProgress,
150
161
  )}
151
162
  />
@@ -155,24 +166,55 @@ export const SnowflakeAppFunctionActivatorEditor = observer(() => {
155
166
  Snowflake Activator Metadata
156
167
  </div>
157
168
  <div className="snowflake-app-function-activator-editor__header__actions">
158
- <button
159
- className="snowflake-app-function-activator-editor__header__actions__action snowflake-app-function-activator-editor__header__actions__action--primary"
160
- onClick={validate}
161
- disabled={editorState.validateState.isInProgress}
162
- tabIndex={-1}
163
- title="Click Validate to verify your activator before deployment"
164
- >
165
- Validate
166
- </button>
167
- <button
168
- className="snowflake-app-function-activator-editor__header__actions__action snowflake-app-function-activator-editor__header__actions__action--primary"
169
- onClick={deploy}
170
- disabled={editorState.deployState.isInProgress}
171
- title="Deploy to sandbox"
172
- tabIndex={-1}
173
- >
174
- Deploy to Sandbox
175
- </button>
169
+ <div className="snowflake-app-function-activator-editor__header__actions btn__dropdown-combo--primary">
170
+ <button
171
+ className="snowflake-app-function-activator-editor__header__actions__action snowflake-app-function-activator-editor__header__actions__action--primary"
172
+ onClick={validate}
173
+ disabled={editorState.validateState.isInProgress}
174
+ tabIndex={-1}
175
+ title="Click Validate to verify your activator before deployment"
176
+ >
177
+ Validate
178
+ </button>
179
+ <ControlledDropdownMenu
180
+ className="snowflake-app-function-activator-editor__header__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
181
+ title="activator-artifact-dropdown"
182
+ content={
183
+ <MenuContent>
184
+ <MenuContentItem
185
+ className="btn__dropdown-combo__option"
186
+ onClick={renderArtifact}
187
+ title="Render artifact"
188
+ >
189
+ Render Artifact
190
+ </MenuContentItem>
191
+ </MenuContent>
192
+ }
193
+ menuProps={{
194
+ anchorOrigin: {
195
+ vertical: 'bottom',
196
+ horizontal: 'right',
197
+ },
198
+ transformOrigin: {
199
+ vertical: 'top',
200
+ horizontal: 'right',
201
+ },
202
+ }}
203
+ >
204
+ <CaretDownIcon />
205
+ </ControlledDropdownMenu>
206
+ </div>
207
+ <div className="snowflake-app-function-activator-editor__header__actions btn__dropdown-combo--primary">
208
+ <button
209
+ className="snowflake-app-function-activator-editor__header__actions__action snowflake-app-function-activator-editor__header__actions__action--primary"
210
+ onClick={deploy}
211
+ disabled={editorState.deployState.isInProgress}
212
+ title="Deploy to sandbox"
213
+ tabIndex={-1}
214
+ >
215
+ Deploy to Sandbox
216
+ </button>
217
+ </div>
176
218
  </div>
177
219
  </div>
178
220
  <PanelForm>
@@ -334,6 +376,14 @@ export const SnowflakeAppFunctionActivatorEditor = observer(() => {
334
376
  isReadOnly={isReadOnly}
335
377
  />
336
378
  </PanelForm>
379
+ <ActivatorArtifactViewer
380
+ artifact={editorState.artifact}
381
+ setArtifact={(value) => editorState.setArtifact(value)}
382
+ darkMode={
383
+ !applicationStore.layoutService
384
+ .TEMPORARY__isLightColorThemeEnabled
385
+ }
386
+ />
337
387
  </PanelContent>
338
388
  </Panel>
339
389
  </div>
@@ -27,6 +27,10 @@ import {
27
27
  PURE_ConnectionIcon,
28
28
  CustomSelectorInput,
29
29
  createFilter,
30
+ ControlledDropdownMenu,
31
+ MenuContent,
32
+ MenuContentItem,
33
+ CaretDownIcon,
30
34
  } from '@finos/legend-art';
31
35
  import {
32
36
  type PackageableConnection,
@@ -45,6 +49,7 @@ import {
45
49
  buildRelationalDatabaseConnectionOption,
46
50
  } from '../connection-editor/RelationalDatabaseConnectionEditor.js';
47
51
  import { ActivatorOwnershipForm } from './ActivatorFormComponents.js';
52
+ import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
48
53
 
49
54
  export const SnowflakeM2MUdfFunctionActivatorEditor = observer(() => {
50
55
  const editorStore = useEditorStore();
@@ -115,6 +120,11 @@ export const SnowflakeM2MUdfFunctionActivatorEditor = observer(() => {
115
120
  applicationStore.alertUnhandledError,
116
121
  );
117
122
  };
123
+ const renderArtifact = (): void => {
124
+ flowResult(editorState.renderArtifact()).catch(
125
+ applicationStore.alertUnhandledError,
126
+ );
127
+ };
118
128
  const deploy = (): void => {
119
129
  flowResult(editorState.deployToSandbox()).catch(
120
130
  applicationStore.alertUnhandledError,
@@ -128,6 +138,7 @@ export const SnowflakeM2MUdfFunctionActivatorEditor = observer(() => {
128
138
  <PanelLoadingIndicator
129
139
  isLoading={Boolean(
130
140
  editorState.validateState.isInProgress ||
141
+ editorState.renderArtifactState.isInProgress ||
131
142
  editorState.deployState.isInProgress,
132
143
  )}
133
144
  />
@@ -137,24 +148,54 @@ export const SnowflakeM2MUdfFunctionActivatorEditor = observer(() => {
137
148
  SnowflakeM2MUdf Activator Metadata
138
149
  </div>
139
150
  <div className="snowflake-m2m-udf-function-activator-editor__header__actions">
140
- <button
141
- className="snowflake-m2m-udf-function-activator-editor__header__actions__action snowflake-m2m-udf-function-activator-editor__header__actions__action--primary"
142
- onClick={validate}
143
- disabled={editorState.validateState.isInProgress}
144
- tabIndex={-1}
145
- title="Click Validate to verify your activator before deployment"
146
- >
147
- Validate
148
- </button>
149
- <button
150
- className="snowflake-m2m-udf-function-activator-editor__header__actions__action snowflake-m2m-udf-function-activator-editor__header__actions__action--primary"
151
- onClick={deploy}
152
- disabled={editorState.deployState.isInProgress}
153
- title="Deploy to sandbox"
154
- tabIndex={-1}
155
- >
156
- Deploy to Sandbox
157
- </button>
151
+ <div className="snowflake-m2m-udf-function-activator-editor__header__actions btn__dropdown-combo--primary">
152
+ <button
153
+ className="snowflake-m2m-udf-function-activator-editor__header__actions__action snowflake-m2m-udf-function-activator-editor__header__actions__action--primary"
154
+ onClick={validate}
155
+ disabled={editorState.validateState.isInProgress}
156
+ tabIndex={-1}
157
+ title="Click Validate to verify your activator before deployment"
158
+ >
159
+ Validate
160
+ </button>
161
+ <ControlledDropdownMenu
162
+ className="snowflake-m2m-udf-function-activator-editor__header__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
163
+ title="activator-artifact-dropdown"
164
+ content={
165
+ <MenuContent>
166
+ <MenuContentItem
167
+ className="btn__dropdown-combo__option"
168
+ onClick={renderArtifact}
169
+ >
170
+ Render Artifact
171
+ </MenuContentItem>
172
+ </MenuContent>
173
+ }
174
+ menuProps={{
175
+ anchorOrigin: {
176
+ vertical: 'bottom',
177
+ horizontal: 'right',
178
+ },
179
+ transformOrigin: {
180
+ vertical: 'top',
181
+ horizontal: 'right',
182
+ },
183
+ }}
184
+ >
185
+ <CaretDownIcon />
186
+ </ControlledDropdownMenu>
187
+ </div>
188
+ <div className="snowflake-m2m-udf-function-activator-editor__header__actions btn__dropdown-combo--primary">
189
+ <button
190
+ className="snowflake-m2m-udf-function-activator-editor__header__actions__action snowflake-m2m-udf-function-activator-editor__header__actions__action--primary"
191
+ onClick={deploy}
192
+ disabled={editorState.deployState.isInProgress}
193
+ title="Deploy to sandbox"
194
+ tabIndex={-1}
195
+ >
196
+ Deploy to Sandbox
197
+ </button>
198
+ </div>
158
199
  </div>
159
200
  </div>
160
201
  <PanelForm>
@@ -284,6 +325,14 @@ export const SnowflakeM2MUdfFunctionActivatorEditor = observer(() => {
284
325
  isReadOnly={isReadOnly}
285
326
  />
286
327
  </PanelForm>
328
+ <ActivatorArtifactViewer
329
+ artifact={editorState.artifact}
330
+ setArtifact={(value) => editorState.setArtifact(value)}
331
+ darkMode={
332
+ !applicationStore.layoutService
333
+ .TEMPORARY__isLightColorThemeEnabled
334
+ }
335
+ />
287
336
  </PanelContent>
288
337
  </Panel>
289
338
  </div>
@@ -120,6 +120,10 @@ export class AccessPointLambdaEditorState extends LambdaEditorState {
120
120
  return this.val.accessPoint.id;
121
121
  }
122
122
 
123
+ override get fullLambdaString(): string {
124
+ return `${this.lambdaString}`;
125
+ }
126
+
123
127
  *convertLambdaGrammarStringToObject(): GeneratorFn<void> {
124
128
  const emptyLambda = stub_RawLambda();
125
129
  if (this.lambdaString) {
@@ -431,9 +435,16 @@ export class DataProductEditorState extends ElementEditorState {
431
435
  )) as Map<string, string>;
432
436
  isolatedLambdas.forEach((grammarText, key) => {
433
437
  const purePropertyMapping = index.get(key);
434
- purePropertyMapping?.lambdaState.setLambdaString(
435
- purePropertyMapping.lambdaState.extractLambdaString(grammarText),
436
- );
438
+ if (
439
+ purePropertyMapping?.lambdaState.lambdaPrefix &&
440
+ grammarText.startsWith(purePropertyMapping.lambdaState.lambdaPrefix)
441
+ ) {
442
+ purePropertyMapping.lambdaState.setLambdaString(
443
+ purePropertyMapping.lambdaState.extractLambdaString(grammarText),
444
+ );
445
+ } else {
446
+ purePropertyMapping?.lambdaState.setLambdaString(grammarText);
447
+ }
437
448
  });
438
449
  } catch (error) {
439
450
  assertErrorThrown(error);
@@ -69,10 +69,12 @@ export type HostedServiceOwnerOption = {
69
69
 
70
70
  export class HostedServiceFunctionActivatorEditorState extends ElementEditorState {
71
71
  readonly validateState = ActionState.create();
72
+ readonly renderArtifactState = ActionState.create();
72
73
  readonly deployState = ActionState.create();
73
74
 
74
75
  selectedTab: ACTIVATOR_EDITOR_TAB;
75
76
  selectedAction: PostDeploymentAction | undefined;
77
+ artifact: PlainObject | undefined;
76
78
 
77
79
  constructor(editorStore: EditorStore, element: HostedService) {
78
80
  super(editorStore, element);
@@ -86,6 +88,9 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
86
88
  selectedOwnership: computed,
87
89
  storeModel: action,
88
90
  validate: flow,
91
+ renderArtifact: flow,
92
+ artifact: observable,
93
+ setArtifact: action,
89
94
  deployToSandbox: flow,
90
95
  searchUsers: flow,
91
96
  selectedTab: observable,
@@ -172,6 +177,10 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
172
177
  }
173
178
  }
174
179
 
180
+ setArtifact(newArtifact: PlainObject | undefined): void {
181
+ this.artifact = newArtifact;
182
+ }
183
+
175
184
  *validate(): GeneratorFn<void> {
176
185
  this.validateState.inProgress();
177
186
  try {
@@ -190,6 +199,23 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
190
199
  }
191
200
  }
192
201
 
202
+ *renderArtifact(): GeneratorFn<void> {
203
+ this.renderArtifactState.inProgress();
204
+ try {
205
+ const artifact =
206
+ (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(
207
+ this.activator,
208
+ new InMemoryGraphData(this.editorStore.graphManagerState.graph),
209
+ )) as PlainObject;
210
+ this.artifact = artifact;
211
+ } catch (error) {
212
+ assertErrorThrown(error);
213
+ this.editorStore.applicationStore.notificationService.notifyError(error);
214
+ } finally {
215
+ this.renderArtifactState.complete();
216
+ }
217
+ }
218
+
193
219
  *deployToSandbox(): GeneratorFn<void> {
194
220
  this.deployState.inProgress();
195
221
  try {
@@ -21,7 +21,7 @@ import {
21
21
  } from '@finos/legend-graph';
22
22
  import type { EditorStore } from '../../../EditorStore.js';
23
23
  import { ElementEditorState } from '../ElementEditorState.js';
24
- import { action, flow, makeObservable } from 'mobx';
24
+ import { action, flow, makeObservable, observable } from 'mobx';
25
25
  import {
26
26
  ActionState,
27
27
  assertErrorThrown,
@@ -35,8 +35,10 @@ import { FUNCTION_ACTIVATOR_EXCLUDED_PATHS } from '../ToDelete_FunctionActivator
35
35
  export class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditorState {
36
36
  readonly activator: INTERNAL__UnknownFunctionActivator;
37
37
  readonly validateState = ActionState.create();
38
+ readonly renderArtifactState = ActionState.create();
38
39
  readonly publishToSandboxState = ActionState.create();
39
40
  protocolValueBuilderState?: ProtocolValueBuilderState | undefined;
41
+ artifact: PlainObject | undefined;
40
42
 
41
43
  constructor(
42
44
  editorStore: EditorStore,
@@ -47,6 +49,9 @@ export class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditor
47
49
  makeObservable(this, {
48
50
  reprocess: action,
49
51
  validate: flow,
52
+ renderArtifact: flow,
53
+ artifact: observable,
54
+ setArtifact: action,
50
55
  publishToSandbox: flow,
51
56
  });
52
57
 
@@ -88,6 +93,10 @@ export class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditor
88
93
  : undefined;
89
94
  }
90
95
 
96
+ setArtifact(newArtifact: PlainObject | undefined): void {
97
+ this.artifact = newArtifact;
98
+ }
99
+
91
100
  *validate(): GeneratorFn<void> {
92
101
  this.validateState.inProgress();
93
102
  try {
@@ -106,6 +115,23 @@ export class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditor
106
115
  }
107
116
  }
108
117
 
118
+ *renderArtifact(): GeneratorFn<void> {
119
+ this.renderArtifactState.inProgress();
120
+ try {
121
+ const artifact =
122
+ (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(
123
+ this.activator,
124
+ new InMemoryGraphData(this.editorStore.graphManagerState.graph),
125
+ )) as PlainObject;
126
+ this.artifact = artifact;
127
+ } catch (error) {
128
+ assertErrorThrown(error);
129
+ this.editorStore.applicationStore.notificationService.notifyError(error);
130
+ } finally {
131
+ this.renderArtifactState.complete();
132
+ }
133
+ }
134
+
109
135
  *publishToSandbox(): GeneratorFn<void> {
110
136
  this.publishToSandboxState.inProgress();
111
137
  try {
@@ -27,18 +27,22 @@ import {
27
27
  } from '@finos/legend-graph';
28
28
  import {
29
29
  type GeneratorFn,
30
+ type PlainObject,
30
31
  ActionState,
31
32
  assertErrorThrown,
32
33
  guaranteeType,
33
34
  } from '@finos/legend-shared';
34
- import { makeObservable, action, flow, computed } from 'mobx';
35
+ import { makeObservable, action, flow, computed, observable } from 'mobx';
35
36
  import type { EditorStore } from '../../../EditorStore.js';
36
37
  import { ElementEditorState } from '../ElementEditorState.js';
37
38
 
38
39
  export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
39
40
  readonly validateState = ActionState.create();
41
+ readonly renderArtifactState = ActionState.create();
40
42
  readonly deployState = ActionState.create();
41
43
 
44
+ artifact: PlainObject | undefined;
45
+
42
46
  constructor(editorStore: EditorStore, element: MemSQLFunction) {
43
47
  super(editorStore, element);
44
48
 
@@ -50,6 +54,9 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
50
54
  updateApplicationName: action,
51
55
  updateConnection: action,
52
56
  validate: flow,
57
+ renderArtifact: flow,
58
+ artifact: observable,
59
+ setArtifact: action,
53
60
  deployToSandbox: flow,
54
61
  });
55
62
  }
@@ -85,6 +92,10 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
85
92
  this.activator.description = val;
86
93
  }
87
94
 
95
+ setArtifact(newArtifact: PlainObject | undefined): void {
96
+ this.artifact = newArtifact;
97
+ }
98
+
88
99
  *validate(): GeneratorFn<void> {
89
100
  this.validateState.inProgress();
90
101
  try {
@@ -103,6 +114,23 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
103
114
  }
104
115
  }
105
116
 
117
+ *renderArtifact(): GeneratorFn<void> {
118
+ this.renderArtifactState.inProgress();
119
+ try {
120
+ const artifact =
121
+ (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(
122
+ this.activator,
123
+ new InMemoryGraphData(this.editorStore.graphManagerState.graph),
124
+ )) as PlainObject;
125
+ this.artifact = artifact;
126
+ } catch (error) {
127
+ assertErrorThrown(error);
128
+ this.editorStore.applicationStore.notificationService.notifyError(error);
129
+ } finally {
130
+ this.renderArtifactState.complete();
131
+ }
132
+ }
133
+
106
134
  *deployToSandbox(): GeneratorFn<void> {
107
135
  this.deployState.inProgress();
108
136
  try {
@@ -28,11 +28,12 @@ import {
28
28
  } from '@finos/legend-graph';
29
29
  import {
30
30
  type GeneratorFn,
31
+ type PlainObject,
31
32
  ActionState,
32
33
  assertErrorThrown,
33
34
  guaranteeType,
34
35
  } from '@finos/legend-shared';
35
- import { makeObservable, action, flow, computed } from 'mobx';
36
+ import { makeObservable, action, flow, computed, observable } from 'mobx';
36
37
  import type { EditorStore } from '../../../EditorStore.js';
37
38
  import { ElementEditorState } from '../ElementEditorState.js';
38
39
  import {
@@ -42,8 +43,11 @@ import {
42
43
 
43
44
  export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState {
44
45
  readonly validateState = ActionState.create();
46
+ readonly renderArtifactState = ActionState.create();
45
47
  readonly deployState = ActionState.create();
46
48
 
49
+ artifact: PlainObject | undefined;
50
+
47
51
  constructor(editorStore: EditorStore, element: SnowflakeApp) {
48
52
  super(editorStore, element);
49
53
 
@@ -58,6 +62,9 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
58
62
  updateApplicationName: action,
59
63
  updateConnection: action,
60
64
  validate: flow,
65
+ renderArtifact: flow,
66
+ artifact: observable,
67
+ setArtifact: action,
61
68
  deployToSandbox: flow,
62
69
  });
63
70
  }
@@ -105,6 +112,10 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
105
112
  this.activator.description = val;
106
113
  }
107
114
 
115
+ setArtifact(newArtifact: PlainObject | undefined): void {
116
+ this.artifact = newArtifact;
117
+ }
118
+
108
119
  *validate(): GeneratorFn<void> {
109
120
  this.validateState.inProgress();
110
121
  try {
@@ -123,6 +134,23 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
123
134
  }
124
135
  }
125
136
 
137
+ *renderArtifact(): GeneratorFn<void> {
138
+ this.renderArtifactState.inProgress();
139
+ try {
140
+ const artifact =
141
+ (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(
142
+ this.activator,
143
+ new InMemoryGraphData(this.editorStore.graphManagerState.graph),
144
+ )) as PlainObject;
145
+ this.artifact = artifact;
146
+ } catch (error) {
147
+ assertErrorThrown(error);
148
+ this.editorStore.applicationStore.notificationService.notifyError(error);
149
+ } finally {
150
+ this.renderArtifactState.complete();
151
+ }
152
+ }
153
+
126
154
  *deployToSandbox(): GeneratorFn<void> {
127
155
  this.deployState.inProgress();
128
156
  try {