@finos/legend-application-studio 28.19.20 → 28.19.22

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 (59) hide show
  1. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
  2. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +24 -14
  3. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
  4. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts +24 -0
  5. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts.map +1 -0
  6. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js +35 -0
  7. package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js.map +1 -0
  8. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts.map +1 -1
  9. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js +18 -3
  10. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js.map +1 -1
  11. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -1
  12. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js +19 -3
  13. package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -1
  14. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts.map +1 -1
  15. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js +18 -3
  16. package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js.map +1 -1
  17. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.d.ts.map +1 -1
  18. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js +18 -3
  19. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
  20. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.d.ts.map +1 -1
  21. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js +18 -3
  22. package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js.map +1 -1
  23. package/lib/index.css +2 -2
  24. package/lib/index.css.map +1 -1
  25. package/lib/package.json +1 -1
  26. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +5 -1
  27. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts.map +1 -1
  28. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +22 -0
  29. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
  30. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts +5 -1
  31. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map +1 -1
  32. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js +23 -1
  33. package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js.map +1 -1
  34. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts +5 -1
  35. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts.map +1 -1
  36. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js +23 -1
  37. package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js.map +1 -1
  38. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +5 -1
  39. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
  40. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +23 -1
  41. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
  42. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts +5 -1
  43. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts.map +1 -1
  44. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js +23 -1
  45. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js.map +1 -1
  46. package/package.json +14 -14
  47. package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +99 -42
  48. package/src/components/editor/editor-group/function-activator/ActivatorArtifactViewer.tsx +80 -0
  49. package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +65 -18
  50. package/src/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.tsx +72 -16
  51. package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx +67 -18
  52. package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +68 -18
  53. package/src/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.tsx +67 -18
  54. package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +26 -0
  55. package/src/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.ts +27 -1
  56. package/src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts +29 -1
  57. package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +29 -1
  58. package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts +29 -1
  59. package/tsconfig.json +1 -0
@@ -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 {
@@ -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 SnowflakeM2MUdfFunctionActivatorEdtiorState 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: SnowflakeM2MUdf) {
43
47
  super(editorStore, element);
44
48
 
@@ -52,6 +56,9 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
52
56
  updateUdfName: action,
53
57
  updateConnection: action,
54
58
  validate: flow,
59
+ renderArtifact: flow,
60
+ artifact: observable,
61
+ setArtifact: action,
55
62
  deployToSandbox: flow,
56
63
  });
57
64
  }
@@ -95,6 +102,10 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
95
102
  this.activator.description = val;
96
103
  }
97
104
 
105
+ setArtifact(newArtifact: PlainObject | undefined): void {
106
+ this.artifact = newArtifact;
107
+ }
108
+
98
109
  *validate(): GeneratorFn<void> {
99
110
  this.validateState.inProgress();
100
111
  try {
@@ -113,6 +124,23 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
113
124
  }
114
125
  }
115
126
 
127
+ *renderArtifact(): GeneratorFn<void> {
128
+ this.renderArtifactState.inProgress();
129
+ try {
130
+ const artifact =
131
+ (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(
132
+ this.activator,
133
+ new InMemoryGraphData(this.editorStore.graphManagerState.graph),
134
+ )) as PlainObject;
135
+ this.artifact = artifact;
136
+ } catch (error) {
137
+ assertErrorThrown(error);
138
+ this.editorStore.applicationStore.notificationService.notifyError(error);
139
+ } finally {
140
+ this.renderArtifactState.complete();
141
+ }
142
+ }
143
+
116
144
  *deployToSandbox(): GeneratorFn<void> {
117
145
  this.deployState.inProgress();
118
146
  try {
package/tsconfig.json CHANGED
@@ -269,6 +269,7 @@
269
269
  "./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.tsx",
270
270
  "./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx",
271
271
  "./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx",
272
+ "./src/components/editor/editor-group/function-activator/ActivatorArtifactViewer.tsx",
272
273
  "./src/components/editor/editor-group/function-activator/ActivatorFormComponents.tsx",
273
274
  "./src/components/editor/editor-group/function-activator/FunctionEditor.tsx",
274
275
  "./src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx",