@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
@@ -39,6 +39,7 @@ import {
|
|
39
39
|
TimesIcon,
|
40
40
|
clsx,
|
41
41
|
PanelHeader,
|
42
|
+
CaretDownIcon,
|
42
43
|
} from '@finos/legend-art';
|
43
44
|
import {
|
44
45
|
type PostDeploymentAction,
|
@@ -95,6 +96,7 @@ import {
|
|
95
96
|
import type { DSL_Service_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Service_LegendStudioApplicationPlugin_Extension.js';
|
96
97
|
import { UnsupportedEditorPanel } from '../UnsupportedElementEditor.js';
|
97
98
|
import type { LegendStudioApplicationPlugin } from '../../../../stores/LegendStudioApplicationPlugin.js';
|
99
|
+
import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
|
98
100
|
|
99
101
|
const renderEditorPostAction = (
|
100
102
|
postDeploymentAction: PostDeploymentAction,
|
@@ -417,6 +419,11 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
417
419
|
applicationStore.alertUnhandledError,
|
418
420
|
);
|
419
421
|
};
|
422
|
+
const renderArtifact = (): void => {
|
423
|
+
flowResult(editorState.renderArtifact()).catch(
|
424
|
+
applicationStore.alertUnhandledError,
|
425
|
+
);
|
426
|
+
};
|
420
427
|
const deploy = (): void => {
|
421
428
|
flowResult(editorState.deployToSandbox()).catch(
|
422
429
|
applicationStore.alertUnhandledError,
|
@@ -477,6 +484,7 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
477
484
|
<PanelLoadingIndicator
|
478
485
|
isLoading={Boolean(
|
479
486
|
editorState.validateState.isInProgress ||
|
487
|
+
editorState.renderArtifactState.isInProgress ||
|
480
488
|
editorState.deployState.isInProgress,
|
481
489
|
)}
|
482
490
|
/>
|
@@ -514,24 +522,55 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
514
522
|
Rest Service Activator
|
515
523
|
</div>
|
516
524
|
<div className="hosted-service-function-activator-editor__header__actions">
|
517
|
-
<
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
525
|
+
<div className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo--primary">
|
526
|
+
<button
|
527
|
+
className="hosted-service-function-activator-editor__header__actions__action hosted-service-function-activator-editor__header__actions__action--primary"
|
528
|
+
onClick={validate}
|
529
|
+
disabled={editorState.validateState.isInProgress}
|
530
|
+
tabIndex={-1}
|
531
|
+
title="Click Validate to verify your activator before deployment"
|
532
|
+
>
|
533
|
+
Validate
|
534
|
+
</button>
|
535
|
+
<ControlledDropdownMenu
|
536
|
+
className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
|
537
|
+
title="activator-artifact-dropdown"
|
538
|
+
content={
|
539
|
+
<MenuContent>
|
540
|
+
<MenuContentItem
|
541
|
+
className="btn__dropdown-combo__option"
|
542
|
+
onClick={renderArtifact}
|
543
|
+
title="Render artifact"
|
544
|
+
>
|
545
|
+
Render Artifact
|
546
|
+
</MenuContentItem>
|
547
|
+
</MenuContent>
|
548
|
+
}
|
549
|
+
menuProps={{
|
550
|
+
anchorOrigin: {
|
551
|
+
vertical: 'bottom',
|
552
|
+
horizontal: 'right',
|
553
|
+
},
|
554
|
+
transformOrigin: {
|
555
|
+
vertical: 'top',
|
556
|
+
horizontal: 'right',
|
557
|
+
},
|
558
|
+
}}
|
559
|
+
>
|
560
|
+
<CaretDownIcon />
|
561
|
+
</ControlledDropdownMenu>
|
562
|
+
</div>
|
563
|
+
<div className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo--primary">
|
564
|
+
<button
|
565
|
+
className="hosted-service-function-activator-editor__header__actions__action hosted-service-function-activator-editor__header__actions__action--primary"
|
566
|
+
onClick={deploy}
|
567
|
+
disabled={editorState.deployState.isInProgress}
|
568
|
+
title="Deploy to sandbox"
|
569
|
+
tabIndex={-1}
|
570
|
+
>
|
571
|
+
Deploy to Sandbox
|
572
|
+
</button>
|
573
|
+
</div>
|
535
574
|
</div>
|
536
575
|
</div>
|
537
576
|
<PanelForm>
|
@@ -725,6 +764,14 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
725
764
|
/>
|
726
765
|
</div>
|
727
766
|
)}
|
767
|
+
<ActivatorArtifactViewer
|
768
|
+
artifact={editorState.artifact}
|
769
|
+
setArtifact={(value) => editorState.setArtifact(value)}
|
770
|
+
darkMode={
|
771
|
+
!applicationStore.layoutService
|
772
|
+
.TEMPORARY__isLightColorThemeEnabled
|
773
|
+
}
|
774
|
+
/>
|
728
775
|
</PanelContent>
|
729
776
|
</Panel>
|
730
777
|
</div>
|
@@ -23,6 +23,11 @@ import {
|
|
23
23
|
Panel,
|
24
24
|
PanelContent,
|
25
25
|
PanelHeader,
|
26
|
+
ControlledDropdownMenu,
|
27
|
+
MenuContent,
|
28
|
+
MenuContentItem,
|
29
|
+
CaretDownIcon,
|
30
|
+
PanelLoadingIndicator,
|
26
31
|
} from '@finos/legend-art';
|
27
32
|
import { useApplicationStore } from '@finos/legend-application';
|
28
33
|
import { flowResult } from 'mobx';
|
@@ -33,6 +38,7 @@ import {
|
|
33
38
|
getClassProperty,
|
34
39
|
} from '@finos/legend-graph';
|
35
40
|
import { returnUndefOnError } from '@finos/legend-shared';
|
41
|
+
import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
|
36
42
|
|
37
43
|
export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
38
44
|
const editorStore = useEditorStore();
|
@@ -45,6 +51,11 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
45
51
|
applicationStore.alertUnhandledError,
|
46
52
|
);
|
47
53
|
};
|
54
|
+
const renderArtifact = (): void => {
|
55
|
+
flowResult(editorState.renderArtifact()).catch(
|
56
|
+
applicationStore.alertUnhandledError,
|
57
|
+
);
|
58
|
+
};
|
48
59
|
const publishToSandbox = (): void => {
|
49
60
|
flowResult(editorState.publishToSandbox()).catch(
|
50
61
|
applicationStore.alertUnhandledError,
|
@@ -66,6 +77,13 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
66
77
|
<div className="function-activator-editor">
|
67
78
|
<Panel>
|
68
79
|
<PanelHeader title="function activator" />
|
80
|
+
<PanelLoadingIndicator
|
81
|
+
isLoading={Boolean(
|
82
|
+
editorState.validateState.isInProgress ||
|
83
|
+
editorState.renderArtifactState.isInProgress ||
|
84
|
+
editorState.publishToSandboxState.isInProgress,
|
85
|
+
)}
|
86
|
+
/>
|
69
87
|
<PanelContent>
|
70
88
|
<div className="function-activator-editor__content">
|
71
89
|
{valueBuilderState && (
|
@@ -118,23 +136,61 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
118
136
|
)}
|
119
137
|
</div>
|
120
138
|
<div className="function-activator-editor__footer">
|
121
|
-
<
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
139
|
+
<div className="function-activator-editor__footer__actions btn__dropdown-combo--primary">
|
140
|
+
<button
|
141
|
+
className="function-activator-editor__footer__actions__action btn--dark"
|
142
|
+
onClick={validate}
|
143
|
+
disabled={editorState.validateState.isInProgress}
|
144
|
+
tabIndex={-1}
|
145
|
+
>
|
146
|
+
Validate
|
147
|
+
</button>
|
148
|
+
<ControlledDropdownMenu
|
149
|
+
className="function-activator-editor__footer__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
|
150
|
+
title="activator-artifact-dropdown"
|
151
|
+
content={
|
152
|
+
<MenuContent>
|
153
|
+
<MenuContentItem
|
154
|
+
className="btn__dropdown-combo__option"
|
155
|
+
onClick={renderArtifact}
|
156
|
+
>
|
157
|
+
Render Artifact
|
158
|
+
</MenuContentItem>
|
159
|
+
</MenuContent>
|
160
|
+
}
|
161
|
+
menuProps={{
|
162
|
+
anchorOrigin: {
|
163
|
+
vertical: 'bottom',
|
164
|
+
horizontal: 'right',
|
165
|
+
},
|
166
|
+
transformOrigin: {
|
167
|
+
vertical: 'top',
|
168
|
+
horizontal: 'right',
|
169
|
+
},
|
170
|
+
}}
|
171
|
+
>
|
172
|
+
<CaretDownIcon />
|
173
|
+
</ControlledDropdownMenu>
|
174
|
+
</div>
|
175
|
+
<div className="function-activator-editor__footer__actions btn__dropdown-combo--primary">
|
176
|
+
<button
|
177
|
+
className="function-activator-editor__footer__actions__action btn--dark"
|
178
|
+
onClick={publishToSandbox}
|
179
|
+
disabled={editorState.publishToSandboxState.isInProgress}
|
180
|
+
tabIndex={-1}
|
181
|
+
>
|
182
|
+
Publish to Sandbox
|
183
|
+
</button>
|
184
|
+
</div>
|
137
185
|
</div>
|
186
|
+
<ActivatorArtifactViewer
|
187
|
+
artifact={editorState.artifact}
|
188
|
+
setArtifact={(value) => editorState.setArtifact(value)}
|
189
|
+
darkMode={
|
190
|
+
!applicationStore.layoutService
|
191
|
+
.TEMPORARY__isLightColorThemeEnabled
|
192
|
+
}
|
193
|
+
/>
|
138
194
|
</PanelContent>
|
139
195
|
</Panel>
|
140
196
|
</div>
|
package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx
CHANGED
@@ -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
|
-
<
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
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
|
-
<
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
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
|
-
<
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
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>
|