@finos/legend-application-studio 28.18.42 → 28.18.44
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/editor/editor-group/function-activator/ActivatorFormComponents.d.ts +23 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorFormComponents.d.ts.map +1 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorFormComponents.js +34 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorFormComponents.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 +76 -108
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.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 +4 -13
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +8 -3
- 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 +15 -10
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
- package/package.json +6 -6
- package/src/components/editor/editor-group/function-activator/ActivatorFormComponents.tsx +97 -0
- package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +347 -482
- package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +7 -42
- package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +18 -11
- package/tsconfig.json +1 -0
@@ -15,12 +15,12 @@
|
|
15
15
|
*/
|
16
16
|
import { InMemoryGraphData, HostedService, observe_HostedService, DeploymentOwner, UserList, } 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 { activator_setOwnership } from '../../../../graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js';
|
21
21
|
import { User } from '@finos/legend-server-sdlc';
|
22
22
|
//Ownership
|
23
|
-
var HostedServiceOwnershipType;
|
23
|
+
export var HostedServiceOwnershipType;
|
24
24
|
(function (HostedServiceOwnershipType) {
|
25
25
|
HostedServiceOwnershipType["DEPLOYMENT_OWNERSHIP"] = "deploymentOwnership";
|
26
26
|
HostedServiceOwnershipType["USERLIST_OWNERSHIP"] = "userListOwnership";
|
@@ -33,14 +33,17 @@ export const OWNERSHIP_OPTIONS = [
|
|
33
33
|
label: DeploymentOwnershipLabel,
|
34
34
|
value: HostedServiceOwnershipType.DEPLOYMENT_OWNERSHIP,
|
35
35
|
},
|
36
|
-
{
|
37
|
-
label: UserlistOwnershipLabel,
|
38
|
-
value: HostedServiceOwnershipType.USERLIST_OWNERSHIP,
|
39
|
-
},
|
40
36
|
];
|
37
|
+
export var ACTIVATOR_EDITOR_TAB;
|
38
|
+
(function (ACTIVATOR_EDITOR_TAB) {
|
39
|
+
ACTIVATOR_EDITOR_TAB["DEFINITION"] = "DEFINITION";
|
40
|
+
ACTIVATOR_EDITOR_TAB["TAGGED_VALUES"] = "TAGGED_VALUES";
|
41
|
+
ACTIVATOR_EDITOR_TAB["STEREOTYPES"] = "STEREOTYPES";
|
42
|
+
})(ACTIVATOR_EDITOR_TAB || (ACTIVATOR_EDITOR_TAB = {}));
|
41
43
|
export class HostedServiceFunctionActivatorEditorState extends ElementEditorState {
|
42
44
|
validateState = ActionState.create();
|
43
45
|
deployState = ActionState.create();
|
46
|
+
selectedTab;
|
44
47
|
constructor(editorStore, element) {
|
45
48
|
super(editorStore, element);
|
46
49
|
makeObservable(this, {
|
@@ -51,11 +54,16 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
|
|
51
54
|
setSelectedOwnership: action,
|
52
55
|
selectedOwnership: computed,
|
53
56
|
storeModel: action,
|
54
|
-
generateLineage: action,
|
55
57
|
validate: flow,
|
56
58
|
deployToSandbox: flow,
|
57
59
|
searchUsers: flow,
|
60
|
+
selectedTab: observable,
|
61
|
+
setSelectedTab: action,
|
58
62
|
});
|
63
|
+
this.selectedTab = ACTIVATOR_EDITOR_TAB.DEFINITION;
|
64
|
+
}
|
65
|
+
setSelectedTab(tab) {
|
66
|
+
this.selectedTab = tab;
|
59
67
|
}
|
60
68
|
get activator() {
|
61
69
|
return observe_HostedService(guaranteeType(this.element, HostedService, 'Element inside hosted service state must be a HostedService'));
|
@@ -69,9 +77,6 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
|
|
69
77
|
storeModel(val) {
|
70
78
|
this.activator.storeModel = val;
|
71
79
|
}
|
72
|
-
generateLineage(val) {
|
73
|
-
this.activator.generateLineage = val;
|
74
|
-
}
|
75
80
|
get selectedOwnership() {
|
76
81
|
const ownership = this.activator.ownership;
|
77
82
|
if (ownership instanceof DeploymentOwner) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HostedServiceFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"HostedServiceFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,aAAa,GAEd,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;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yEAAyE,CAAC;AACjH,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,WAAW;AACX,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,0EAA4C,CAAA;IAC5C,sEAAwC,CAAA;AAC1C,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AACD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC;AACrD,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;QACE,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,0BAA0B,CAAC,oBAAoB;KACvD;CACF,CAAC;AAEF,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iDAAyB,CAAA;IACzB,uDAA+B,CAAA;IAC/B,mDAA2B,CAAA;AAC7B,CAAC,EAJW,oBAAoB,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AAQ,CAC/C,IAAI,CACL,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,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;YACzE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,SAAS,CACP,UAAyB,EACzB,WAAwB;QAExB,OAAO,IAAI,yCAAyC,CAClD,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.18.
|
3
|
+
"version": "28.18.44",
|
4
4
|
"description": "Legend Studio application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -47,11 +47,11 @@
|
|
47
47
|
"dependencies": {
|
48
48
|
"@finos/legend-application": "16.0.3",
|
49
49
|
"@finos/legend-art": "7.1.62",
|
50
|
-
"@finos/legend-code-editor": "2.0.
|
51
|
-
"@finos/legend-graph": "31.10.
|
52
|
-
"@finos/legend-lego": "2.0.
|
53
|
-
"@finos/legend-query-builder": "4.15.
|
54
|
-
"@finos/legend-server-depot": "6.0.
|
50
|
+
"@finos/legend-code-editor": "2.0.5",
|
51
|
+
"@finos/legend-graph": "31.10.39",
|
52
|
+
"@finos/legend-lego": "2.0.7",
|
53
|
+
"@finos/legend-query-builder": "4.15.4",
|
54
|
+
"@finos/legend-server-depot": "6.0.63",
|
55
55
|
"@finos/legend-server-sdlc": "5.3.33",
|
56
56
|
"@finos/legend-server-showcase": "0.2.30",
|
57
57
|
"@finos/legend-shared": "10.0.57",
|
@@ -0,0 +1,97 @@
|
|
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 { ExclamationCircleIcon } from '@finos/legend-art';
|
18
|
+
import {
|
19
|
+
DeploymentOwner,
|
20
|
+
UserList,
|
21
|
+
type FunctionActivator,
|
22
|
+
} from '@finos/legend-graph';
|
23
|
+
import { observer } from 'mobx-react-lite';
|
24
|
+
import {
|
25
|
+
activator_setDeploymentOwner,
|
26
|
+
activator_setOwnership,
|
27
|
+
} from '../../../../stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js';
|
28
|
+
import { useState } from 'react';
|
29
|
+
|
30
|
+
export const ActivatorOwnershipForm = observer(
|
31
|
+
(props: { activator: FunctionActivator; isReadOnly: boolean }) => {
|
32
|
+
const { activator, isReadOnly } = props;
|
33
|
+
const ownership = activator.ownership;
|
34
|
+
|
35
|
+
const [ownerInputValue, setOwner] = useState<string>(
|
36
|
+
ownership instanceof DeploymentOwner ? ownership.id : '',
|
37
|
+
);
|
38
|
+
const updateDeploymentIdentifier: React.ChangeEventHandler<
|
39
|
+
HTMLInputElement
|
40
|
+
> = (event) => {
|
41
|
+
if (!isReadOnly && ownership instanceof DeploymentOwner) {
|
42
|
+
setOwner(event.target.value);
|
43
|
+
activator_setDeploymentOwner(ownership, event.target.value);
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
return (
|
48
|
+
<div>
|
49
|
+
<div className="panel__content__form__section">
|
50
|
+
<div className="panel__content__form__section__header__label">
|
51
|
+
Ownership
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
{ownership instanceof DeploymentOwner && (
|
55
|
+
<div className="panel__content__form__section">
|
56
|
+
<div className="panel__content__form__section__header__prompt">
|
57
|
+
Provide a deployment identifier that will own the Lambda.
|
58
|
+
</div>
|
59
|
+
<input
|
60
|
+
className="panel__content__form__section__input"
|
61
|
+
spellCheck={false}
|
62
|
+
disabled={isReadOnly}
|
63
|
+
value={ownerInputValue}
|
64
|
+
onChange={updateDeploymentIdentifier}
|
65
|
+
/>
|
66
|
+
</div>
|
67
|
+
)}
|
68
|
+
{ownership instanceof UserList && (
|
69
|
+
<div className="project-configuration-editor__project__structure__version">
|
70
|
+
<div className="project-configuration-editor__project__structure__version__label">
|
71
|
+
<div className="project-configuration-editor__project__structure__version__label__status">
|
72
|
+
<ExclamationCircleIcon className="project-configuration-editor__project__structure__version__label__status--outdated" />
|
73
|
+
</div>
|
74
|
+
<div className="project-configuration-editor__project__structure__version__label__text">
|
75
|
+
{`User List Ownership has been deprecated`}
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<button
|
79
|
+
className="project-configuration-editor__project__structure__version__update-btn"
|
80
|
+
disabled={isReadOnly}
|
81
|
+
onClick={() =>
|
82
|
+
activator_setOwnership(
|
83
|
+
activator,
|
84
|
+
new DeploymentOwner('', activator),
|
85
|
+
)
|
86
|
+
}
|
87
|
+
tabIndex={-1}
|
88
|
+
title={`Click to Change to Deployment`}
|
89
|
+
>
|
90
|
+
Change to Deployment
|
91
|
+
</button>
|
92
|
+
</div>
|
93
|
+
)}
|
94
|
+
</div>
|
95
|
+
);
|
96
|
+
},
|
97
|
+
);
|