@finos/legend-application-studio 28.19.20 → 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.
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +24 -14
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts +24 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js +35 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js.map +1 -0
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js +19 -3
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +22 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js.map +1 -1
- package/package.json +9 -9
- package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +99 -42
- package/src/components/editor/editor-group/function-activator/ActivatorArtifactViewer.tsx +80 -0
- package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +65 -18
- package/src/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.tsx +72 -16
- package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx +67 -18
- package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +68 -18
- package/src/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.tsx +67 -18
- package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +26 -0
- package/src/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.ts +27 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts +29 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +29 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts +29 -1
- package/tsconfig.json +1 -0
@@ -15,11 +15,13 @@
|
|
15
15
|
*/
|
16
16
|
import { MemSQLFunction, ConnectionPointer, InMemoryGraphData, PackageableElementExplicitReference, observe_MemSQLFunctionDeploymentConfiguration, observe_MemSQLFunction, DeploymentOwner, observe_DeploymentOwnership, } from '@finos/legend-graph';
|
17
17
|
import { ActionState, assertErrorThrown, guaranteeType, } from '@finos/legend-shared';
|
18
|
-
import { makeObservable, action, flow, computed } from 'mobx';
|
18
|
+
import { makeObservable, action, flow, computed, observable } from 'mobx';
|
19
19
|
import { ElementEditorState } from '../ElementEditorState.js';
|
20
20
|
export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
|
21
21
|
validateState = ActionState.create();
|
22
|
+
renderArtifactState = ActionState.create();
|
22
23
|
deployState = ActionState.create();
|
24
|
+
artifact;
|
23
25
|
constructor(editorStore, element) {
|
24
26
|
super(editorStore, element);
|
25
27
|
makeObservable(this, {
|
@@ -30,6 +32,9 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
|
|
30
32
|
updateApplicationName: action,
|
31
33
|
updateConnection: action,
|
32
34
|
validate: flow,
|
35
|
+
renderArtifact: flow,
|
36
|
+
artifact: observable,
|
37
|
+
setArtifact: action,
|
33
38
|
deployToSandbox: flow,
|
34
39
|
});
|
35
40
|
}
|
@@ -51,6 +56,9 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
|
|
51
56
|
updateAppDescription(val) {
|
52
57
|
this.activator.description = val;
|
53
58
|
}
|
59
|
+
setArtifact(newArtifact) {
|
60
|
+
this.artifact = newArtifact;
|
61
|
+
}
|
54
62
|
*validate() {
|
55
63
|
this.validateState.inProgress();
|
56
64
|
try {
|
@@ -65,6 +73,20 @@ export class MemSQLFunctionActivatorEditorState extends ElementEditorState {
|
|
65
73
|
this.validateState.complete();
|
66
74
|
}
|
67
75
|
}
|
76
|
+
*renderArtifact() {
|
77
|
+
this.renderArtifactState.inProgress();
|
78
|
+
try {
|
79
|
+
const artifact = (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph)));
|
80
|
+
this.artifact = artifact;
|
81
|
+
}
|
82
|
+
catch (error) {
|
83
|
+
assertErrorThrown(error);
|
84
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
85
|
+
}
|
86
|
+
finally {
|
87
|
+
this.renderArtifactState.complete();
|
88
|
+
}
|
89
|
+
}
|
68
90
|
*deployToSandbox() {
|
69
91
|
this.deployState.inProgress();
|
70
92
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MemSQLFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mCAAmC,EACnC,6CAA6C,EAC7C,sBAAsB,EACtB,eAAe,EACf,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
1
|
+
{"version":3,"file":"MemSQLFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mCAAmC,EACnC,6CAA6C,EAC7C,sBAAsB,EACtB,eAAe,EACf,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,WAAW,EACX,iBAAiB,EACjB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,OAAO,kCAAmC,SAAQ,kBAAkB;IAC/D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IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAED,CAAC,eAAe;QACd,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,YAAY,CAAC,iCAAiC,CACrF,IAAI,CAAC,SAAS,EACd,IAAI,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAChE,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACjE,0DAA0D,CAC3D,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,SAAS,CACP,UAA0B,EAC1B,WAAwB;QAExB,OAAO,IAAI,kCAAkC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;CACF"}
|
@@ -14,12 +14,14 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type PackageableConnection, type SnowflakePermissionScheme, SnowflakeApp } from '@finos/legend-graph';
|
17
|
-
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
17
|
+
import { type GeneratorFn, type PlainObject, ActionState } from '@finos/legend-shared';
|
18
18
|
import type { EditorStore } from '../../../EditorStore.js';
|
19
19
|
import { ElementEditorState } from '../ElementEditorState.js';
|
20
20
|
export declare class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState {
|
21
21
|
readonly validateState: ActionState;
|
22
|
+
readonly renderArtifactState: ActionState;
|
22
23
|
readonly deployState: ActionState;
|
24
|
+
artifact: PlainObject | undefined;
|
23
25
|
constructor(editorStore: EditorStore, element: SnowflakeApp);
|
24
26
|
get activator(): SnowflakeApp;
|
25
27
|
updateConnection(val: PackageableConnection): void;
|
@@ -29,7 +31,9 @@ export declare class SnowflakeAppFunctionActivatorEdtiorState extends ElementEdi
|
|
29
31
|
updateDeploymentSchema(val: string | undefined): void;
|
30
32
|
updatePermissionScopte(val: SnowflakePermissionScheme): void;
|
31
33
|
updateAppDescription(val: string): void;
|
34
|
+
setArtifact(newArtifact: PlainObject | undefined): void;
|
32
35
|
validate(): GeneratorFn<void>;
|
36
|
+
renderArtifact(): GeneratorFn<void>;
|
33
37
|
deployToSandbox(): GeneratorFn<void>;
|
34
38
|
reprocess(newElement: SnowflakeApp, editorStore: EditorStore): SnowflakeAppFunctionActivatorEdtiorState;
|
35
39
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SnowflakeAppFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,YAAY,EAQb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM9D,qBAAa,wCAAyC,SAAQ,kBAAkB;IAC9E,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,WAAW,cAAwB;
|
1
|
+
{"version":3,"file":"SnowflakeAppFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,YAAY,EAQb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM9D,qBAAa,wCAAyC,SAAQ,kBAAkB;IAC9E,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,mBAAmB,cAAwB;IACpD,QAAQ,CAAC,WAAW,cAAwB;IAE5C,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;gBAEtB,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY;IAqB3D,IAAI,SAAS,IAAI,YAAY,CAQ5B;IAED,gBAAgB,CAAC,GAAG,EAAE,qBAAqB,GAAG,IAAI;IAQlD,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKlC,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAI9C,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIrD,sBAAsB,CAAC,GAAG,EAAE,yBAAyB,GAAG,IAAI;IAI5D,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAItD,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAkB7B,cAAc,IAAI,WAAW,CAAC,IAAI,CAAC;IAiBnC,eAAe,IAAI,WAAW,CAAC,IAAI,CAAC;IA6CrC,SAAS,CACP,UAAU,EAAE,YAAY,EACxB,WAAW,EAAE,WAAW,GACvB,wCAAwC;CAM5C"}
|
@@ -15,12 +15,14 @@
|
|
15
15
|
*/
|
16
16
|
import { SnowflakeApp, ConnectionPointer, InMemoryGraphData, PackageableElementExplicitReference, observe_SnowflakeAppDeploymentConfiguration, observe_SnowflakeApp, DeploymentOwner, observe_DeploymentOwnership, } from '@finos/legend-graph';
|
17
17
|
import { ActionState, assertErrorThrown, guaranteeType, } from '@finos/legend-shared';
|
18
|
-
import { makeObservable, action, flow, computed } from 'mobx';
|
18
|
+
import { makeObservable, action, flow, computed, observable } from 'mobx';
|
19
19
|
import { ElementEditorState } from '../ElementEditorState.js';
|
20
20
|
import { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';
|
21
21
|
export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState {
|
22
22
|
validateState = ActionState.create();
|
23
|
+
renderArtifactState = ActionState.create();
|
23
24
|
deployState = ActionState.create();
|
25
|
+
artifact;
|
24
26
|
constructor(editorStore, element) {
|
25
27
|
super(editorStore, element);
|
26
28
|
makeObservable(this, {
|
@@ -34,6 +36,9 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
|
|
34
36
|
updateApplicationName: action,
|
35
37
|
updateConnection: action,
|
36
38
|
validate: flow,
|
39
|
+
renderArtifact: flow,
|
40
|
+
artifact: observable,
|
41
|
+
setArtifact: action,
|
37
42
|
deployToSandbox: flow,
|
38
43
|
});
|
39
44
|
}
|
@@ -64,6 +69,9 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
|
|
64
69
|
updateAppDescription(val) {
|
65
70
|
this.activator.description = val;
|
66
71
|
}
|
72
|
+
setArtifact(newArtifact) {
|
73
|
+
this.artifact = newArtifact;
|
74
|
+
}
|
67
75
|
*validate() {
|
68
76
|
this.validateState.inProgress();
|
69
77
|
try {
|
@@ -78,6 +86,20 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
|
|
78
86
|
this.validateState.complete();
|
79
87
|
}
|
80
88
|
}
|
89
|
+
*renderArtifact() {
|
90
|
+
this.renderArtifactState.inProgress();
|
91
|
+
try {
|
92
|
+
const artifact = (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph)));
|
93
|
+
this.artifact = artifact;
|
94
|
+
}
|
95
|
+
catch (error) {
|
96
|
+
assertErrorThrown(error);
|
97
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
98
|
+
}
|
99
|
+
finally {
|
100
|
+
this.renderArtifactState.complete();
|
101
|
+
}
|
102
|
+
}
|
81
103
|
*deployToSandbox() {
|
82
104
|
this.deployState.inProgress();
|
83
105
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SnowflakeAppFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mCAAmC,EACnC,2CAA2C,EAC3C,oBAAoB,EACpB,eAAe,EACf,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
1
|
+
{"version":3,"file":"SnowflakeAppFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mCAAmC,EACnC,2CAA2C,EAC3C,oBAAoB,EACpB,eAAe,EACf,2BAA2B,GAC5B,MA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AC,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC;gBAChE,OAAO,EAAE,+CAA+C;gBACxD,MAAM,EAAE,QAAQ,CAAC,kBAAkB;oBACjC,CAAC,CAAC,yCAAyC;oBAC3C,CAAC,CAAC,SAAS;gBACb,IAAI,EAAE,eAAe,CAAC,QAAQ;gBAC9B,OAAO,EAAE;oBACP,GAAG,CAAC,QAAQ,CAAC,kBAAkB,KAAK,SAAS;wBAC3C,CAAC,CAAC;4BACE;gCACE,KAAK,EAAE,uBAAuB;gCAC9B,IAAI,EAAE,qBAAqB,CAAC,OAAO;gCACnC,OAAO,EAAE,GAAS,EAAE;oCAClB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,YAAY,CACxE,QAAQ,CAAC,kBAAkB,IAAI,EAAE,CAClC,CAAC;gCACJ,CAAC;gCACD,OAAO,EAAE,IAAI;6BACd;yBACF;wBACH,CAAC,CAAC,EAAE,CAAC;oBACP;wBACE,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,qBAAqB,CAAC,oBAAoB;qBACjD;iBACF;aACF,CAAC,CACH,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,SAAS,CACP,UAAwB,EACxB,WAAwB;QAExB,OAAO,IAAI,wCAAwC,CACjD,WAAW,EACX,UAAU,CACX,CAAC;IACJ,CAAC;CACF"}
|
@@ -14,12 +14,14 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type PackageableConnection, SnowflakeM2MUdf } from '@finos/legend-graph';
|
17
|
-
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
17
|
+
import { type GeneratorFn, type PlainObject, ActionState } from '@finos/legend-shared';
|
18
18
|
import type { EditorStore } from '../../../EditorStore.js';
|
19
19
|
import { ElementEditorState } from '../ElementEditorState.js';
|
20
20
|
export declare class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorState {
|
21
21
|
readonly validateState: ActionState;
|
22
|
+
readonly renderArtifactState: ActionState;
|
22
23
|
readonly deployState: ActionState;
|
24
|
+
artifact: PlainObject | undefined;
|
23
25
|
constructor(editorStore: EditorStore, element: SnowflakeM2MUdf);
|
24
26
|
get activator(): SnowflakeM2MUdf;
|
25
27
|
updateConnection(val: PackageableConnection): void;
|
@@ -28,7 +30,9 @@ export declare class SnowflakeM2MUdfFunctionActivatorEdtiorState extends Element
|
|
28
30
|
updateDeploymentSchema(val: string | undefined): void;
|
29
31
|
updateDeploymentStage(val: string | undefined): void;
|
30
32
|
updateAppDescription(val: string): void;
|
33
|
+
setArtifact(newArtifact: PlainObject | undefined): void;
|
31
34
|
validate(): GeneratorFn<void>;
|
35
|
+
renderArtifact(): GeneratorFn<void>;
|
32
36
|
deployToSandbox(): GeneratorFn<void>;
|
33
37
|
reprocess(newElement: SnowflakeM2MUdf, editorStore: EditorStore): SnowflakeM2MUdfFunctionActivatorEdtiorState;
|
34
38
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SnowflakeM2MUdfFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,qBAAqB,EAC1B,eAAe,EAQhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,qBAAa,2CAA4C,SAAQ,kBAAkB;IACjF,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,WAAW,cAAwB;
|
1
|
+
{"version":3,"file":"SnowflakeM2MUdfFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,qBAAqB,EAC1B,eAAe,EAQhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,qBAAa,2CAA4C,SAAQ,kBAAkB;IACjF,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,mBAAmB,cAAwB;IACpD,QAAQ,CAAC,WAAW,cAAwB;IAE5C,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;gBAEtB,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe;IAoB9D,IAAI,SAAS,IAAI,eAAe,CAQ/B;IAED,gBAAgB,CAAC,GAAG,EAAE,qBAAqB,GAAG,IAAI;IAQlD,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKlC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIrD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIpD,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAItD,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAkB7B,cAAc,IAAI,WAAW,CAAC,IAAI,CAAC;IAiBnC,eAAe,IAAI,WAAW,CAAC,IAAI,CAAC;IAkBrC,SAAS,CACP,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,WAAW,GACvB,2CAA2C;CAM/C"}
|
@@ -15,11 +15,13 @@
|
|
15
15
|
*/
|
16
16
|
import { SnowflakeM2MUdf, ConnectionPointer, InMemoryGraphData, PackageableElementExplicitReference, observe_SnowflakeM2MUdfDeploymentConfiguration, observe_SnowflakeM2MUdf, DeploymentOwner, observe_DeploymentOwnership, } from '@finos/legend-graph';
|
17
17
|
import { ActionState, assertErrorThrown, guaranteeType, } from '@finos/legend-shared';
|
18
|
-
import { makeObservable, action, flow, computed } from 'mobx';
|
18
|
+
import { makeObservable, action, flow, computed, observable } from 'mobx';
|
19
19
|
import { ElementEditorState } from '../ElementEditorState.js';
|
20
20
|
export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorState {
|
21
21
|
validateState = ActionState.create();
|
22
|
+
renderArtifactState = ActionState.create();
|
22
23
|
deployState = ActionState.create();
|
24
|
+
artifact;
|
23
25
|
constructor(editorStore, element) {
|
24
26
|
super(editorStore, element);
|
25
27
|
makeObservable(this, {
|
@@ -32,6 +34,9 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
|
|
32
34
|
updateUdfName: action,
|
33
35
|
updateConnection: action,
|
34
36
|
validate: flow,
|
37
|
+
renderArtifact: flow,
|
38
|
+
artifact: observable,
|
39
|
+
setArtifact: action,
|
35
40
|
deployToSandbox: flow,
|
36
41
|
});
|
37
42
|
}
|
@@ -59,6 +64,9 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
|
|
59
64
|
updateAppDescription(val) {
|
60
65
|
this.activator.description = val;
|
61
66
|
}
|
67
|
+
setArtifact(newArtifact) {
|
68
|
+
this.artifact = newArtifact;
|
69
|
+
}
|
62
70
|
*validate() {
|
63
71
|
this.validateState.inProgress();
|
64
72
|
try {
|
@@ -73,6 +81,20 @@ export class SnowflakeM2MUdfFunctionActivatorEdtiorState extends ElementEditorSt
|
|
73
81
|
this.validateState.complete();
|
74
82
|
}
|
75
83
|
}
|
84
|
+
*renderArtifact() {
|
85
|
+
this.renderArtifactState.inProgress();
|
86
|
+
try {
|
87
|
+
const artifact = (yield this.editorStore.graphManagerState.graphManager.renderFunctionActivatorArtifact(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph)));
|
88
|
+
this.artifact = artifact;
|
89
|
+
}
|
90
|
+
catch (error) {
|
91
|
+
assertErrorThrown(error);
|
92
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
93
|
+
}
|
94
|
+
finally {
|
95
|
+
this.renderArtifactState.complete();
|
96
|
+
}
|
97
|
+
}
|
76
98
|
*deployToSandbox() {
|
77
99
|
this.deployState.inProgress();
|
78
100
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SnowflakeM2MUdfFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mCAAmC,EACnC,8CAA8C,EAC9C,uBAAuB,EACvB,eAAe,EACf,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
1
|
+
{"version":3,"file":"SnowflakeM2MUdfFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,eAAe,EACf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AAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC3E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,SAAS,CACP,UAA2B,EAC3B,WAAwB;QAExB,OAAO,IAAI,2CAA2C,CACpD,WAAW,EACX,UAAU,CACX,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-studio",
|
3
|
-
"version": "28.19.
|
3
|
+
"version": "28.19.21",
|
4
4
|
"description": "Legend Studio application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -45,15 +45,15 @@
|
|
45
45
|
"test:watch": "jest --watch"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@finos/legend-application": "16.0.
|
49
|
-
"@finos/legend-art": "7.1.
|
50
|
-
"@finos/legend-code-editor": "2.0.
|
51
|
-
"@finos/legend-data-cube": "0.3.
|
52
|
-
"@finos/legend-graph": "32.1.
|
53
|
-
"@finos/legend-lego": "2.0.
|
54
|
-
"@finos/legend-query-builder": "4.17.
|
48
|
+
"@finos/legend-application": "16.0.61",
|
49
|
+
"@finos/legend-art": "7.1.115",
|
50
|
+
"@finos/legend-code-editor": "2.0.103",
|
51
|
+
"@finos/legend-data-cube": "0.3.9",
|
52
|
+
"@finos/legend-graph": "32.1.61",
|
53
|
+
"@finos/legend-lego": "2.0.110",
|
54
|
+
"@finos/legend-query-builder": "4.17.21",
|
55
55
|
"@finos/legend-server-depot": "6.0.97",
|
56
|
-
"@finos/legend-server-lakehouse": "0.0
|
56
|
+
"@finos/legend-server-lakehouse": "0.1.0",
|
57
57
|
"@finos/legend-server-sdlc": "5.3.63",
|
58
58
|
"@finos/legend-server-showcase": "0.2.59",
|
59
59
|
"@finos/legend-shared": "11.0.18",
|
@@ -63,6 +63,12 @@ import {
|
|
63
63
|
BuildingIcon,
|
64
64
|
Tooltip,
|
65
65
|
InfoCircleIcon,
|
66
|
+
ResizablePanelGroup,
|
67
|
+
ResizablePanel,
|
68
|
+
MarkdownTextViewer,
|
69
|
+
ResizablePanelSplitter,
|
70
|
+
EyeIcon,
|
71
|
+
CloseEyeIcon,
|
66
72
|
Checkbox,
|
67
73
|
} from '@finos/legend-art';
|
68
74
|
import React, {
|
@@ -1156,49 +1162,100 @@ const HomeTab = observer(
|
|
1156
1162
|
> = (event) => {
|
1157
1163
|
dataProduct_setDescription(product, event.target.value);
|
1158
1164
|
};
|
1159
|
-
|
1165
|
+
const [showPreview, setshowPreview] = useState(false);
|
1160
1166
|
return (
|
1161
|
-
<div
|
1162
|
-
<
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1167
|
+
<div className="panel__content">
|
1168
|
+
<ResizablePanelGroup orientation="vertical">
|
1169
|
+
<ResizablePanel>
|
1170
|
+
<PanelFormTextField
|
1171
|
+
name="Title"
|
1172
|
+
value={product.title}
|
1173
|
+
prompt="Provide a descriptive name for the Data Product to appear in Marketplace."
|
1174
|
+
update={updateDataProductTitle}
|
1175
|
+
placeholder="Enter title"
|
1176
|
+
/>
|
1177
|
+
<div style={{ margin: '1rem' }}>
|
1178
|
+
<div
|
1179
|
+
className="panel__content__form__section__header__label"
|
1180
|
+
style={{ justifyContent: 'space-between', width: '45rem' }}
|
1181
|
+
>
|
1182
|
+
Description
|
1183
|
+
<button
|
1184
|
+
className="btn__dropdown-combo__label"
|
1185
|
+
onClick={() => setshowPreview(!showPreview)}
|
1186
|
+
title={showPreview ? 'Hide Preview' : 'Preview Description'}
|
1187
|
+
tabIndex={-1}
|
1188
|
+
style={{
|
1189
|
+
width: '12rem',
|
1190
|
+
justifyContent: 'center',
|
1191
|
+
}}
|
1192
|
+
>
|
1193
|
+
{showPreview ? (
|
1194
|
+
<>
|
1195
|
+
<CloseEyeIcon className="btn__dropdown-combo__label__icon" />
|
1196
|
+
<div className="btn__dropdown-combo__label__title">
|
1197
|
+
Hide Preview
|
1198
|
+
</div>
|
1199
|
+
</>
|
1200
|
+
) : (
|
1201
|
+
<>
|
1202
|
+
<EyeIcon className="btn__dropdown-combo__label__icon" />
|
1203
|
+
<div className="btn__dropdown-combo__label__title">
|
1204
|
+
Preview
|
1205
|
+
</div>
|
1206
|
+
</>
|
1207
|
+
)}
|
1208
|
+
</button>
|
1209
|
+
</div>
|
1210
|
+
|
1211
|
+
<div
|
1212
|
+
className="panel__content__form__section__header__prompt"
|
1213
|
+
style={{
|
1214
|
+
color:
|
1215
|
+
product.description === '' ||
|
1216
|
+
product.description === undefined
|
1217
|
+
? 'var(--color-red-300)'
|
1218
|
+
: 'var(--color-light-grey-400)',
|
1219
|
+
width: '45rem',
|
1220
|
+
}}
|
1221
|
+
>
|
1222
|
+
Clearly describe the purpose, content, and intended use of the
|
1223
|
+
Data Product. Markdown is supported.
|
1224
|
+
</div>
|
1225
|
+
<textarea
|
1226
|
+
className="panel__content__form__section__textarea"
|
1227
|
+
spellCheck={false}
|
1228
|
+
disabled={isReadOnly}
|
1229
|
+
value={product.description}
|
1230
|
+
onChange={updateDataProductDescription}
|
1231
|
+
style={{
|
1232
|
+
padding: '0.5rem',
|
1233
|
+
width: '45rem',
|
1234
|
+
height: '10rem',
|
1235
|
+
borderColor:
|
1236
|
+
product.description === '' ||
|
1237
|
+
product.description === undefined
|
1238
|
+
? 'var(--color-red-300)'
|
1239
|
+
: 'transparent',
|
1240
|
+
resize: 'vertical',
|
1241
|
+
maxHeight: '100%',
|
1242
|
+
maxWidth: '100%',
|
1243
|
+
}}
|
1244
|
+
/>
|
1245
|
+
</div>
|
1246
|
+
</ResizablePanel>
|
1247
|
+
{showPreview && <ResizablePanelSplitter />}
|
1248
|
+
{showPreview && (
|
1249
|
+
<ResizablePanel>
|
1250
|
+
<div className="text-element-editor__preview">
|
1251
|
+
<MarkdownTextViewer
|
1252
|
+
value={{ value: product.description ?? '' }}
|
1253
|
+
className="text-element-editor__preview__markdown"
|
1254
|
+
/>
|
1255
|
+
</div>
|
1256
|
+
</ResizablePanel>
|
1257
|
+
)}
|
1258
|
+
</ResizablePanelGroup>
|
1202
1259
|
</div>
|
1203
1260
|
);
|
1204
1261
|
},
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
Dialog,
|
19
|
+
Modal,
|
20
|
+
ModalBody,
|
21
|
+
ModalFooter,
|
22
|
+
ModalFooterButton,
|
23
|
+
ModalHeader,
|
24
|
+
} from '@finos/legend-art';
|
25
|
+
import { observer } from 'mobx-react-lite';
|
26
|
+
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';
|
27
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
28
|
+
import type { PlainObject } from '@finos/legend-shared';
|
29
|
+
|
30
|
+
export const ActivatorArtifactViewer = observer(
|
31
|
+
(props: {
|
32
|
+
artifact: PlainObject | undefined;
|
33
|
+
setArtifact: (value: PlainObject | undefined) => void;
|
34
|
+
darkMode: boolean;
|
35
|
+
}) => {
|
36
|
+
const { artifact, setArtifact, darkMode } = props;
|
37
|
+
const closeArtifact = (): void => {
|
38
|
+
setArtifact(undefined);
|
39
|
+
};
|
40
|
+
|
41
|
+
if (!artifact) {
|
42
|
+
return null;
|
43
|
+
}
|
44
|
+
|
45
|
+
return (
|
46
|
+
<Dialog
|
47
|
+
open={Boolean(artifact)}
|
48
|
+
onClose={closeArtifact}
|
49
|
+
classes={{
|
50
|
+
root: 'editor-modal__root-container',
|
51
|
+
container: 'editor-modal__container',
|
52
|
+
paper: 'editor-modal__content',
|
53
|
+
}}
|
54
|
+
>
|
55
|
+
<Modal className="editor-modal" darkMode={darkMode}>
|
56
|
+
<ModalHeader title="Artifact" />
|
57
|
+
<ModalBody>
|
58
|
+
<div className="panel__content execution-plan-viewer__panel__content">
|
59
|
+
<CodeEditor
|
60
|
+
inputValue={JSON.stringify(artifact, null, 2)}
|
61
|
+
isReadOnly={true}
|
62
|
+
language={CODE_EDITOR_LANGUAGE.JSON}
|
63
|
+
hidePadding={true}
|
64
|
+
hideMinimap={true}
|
65
|
+
/>
|
66
|
+
</div>
|
67
|
+
</ModalBody>
|
68
|
+
<ModalFooter>
|
69
|
+
<ModalFooterButton
|
70
|
+
title="Close artifact modal"
|
71
|
+
onClick={closeArtifact}
|
72
|
+
text="Close"
|
73
|
+
type="secondary"
|
74
|
+
/>
|
75
|
+
</ModalFooter>
|
76
|
+
</Modal>
|
77
|
+
</Dialog>
|
78
|
+
);
|
79
|
+
},
|
80
|
+
);
|