@finos/legend-application-studio 26.0.1 → 26.0.3
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/application/LegendStudioApplicationConfig.d.ts +10 -13
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +11 -10
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/ElementIconUtils.d.ts +1 -1
- package/lib/components/ElementIconUtils.d.ts.map +1 -1
- package/lib/components/ElementIconUtils.js +11 -5
- package/lib/components/ElementIconUtils.js.map +1 -1
- package/lib/components/editor/__test-utils__/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js +2 -0
- package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.js +7 -1
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.d.ts +0 -16
- package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.js +79 -26
- package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/{service-editor/TEMPORARY__SnowflakeServiceDeployer.d.ts → INTERNAL__UnknownFunctionActivatorEdtior.d.ts} +2 -2
- package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -0
- package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.js +49 -0
- package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -0
- package/lib/components/editor/editor-group/ModelImporter.js +1 -1
- package/lib/components/editor/editor-group/ModelImporter.js.map +1 -1
- package/lib/components/editor/editor-group/ProtocolValueBuilder.d.ts +22 -0
- package/lib/components/editor/editor-group/ProtocolValueBuilder.d.ts.map +1 -0
- package/lib/components/editor/editor-group/ProtocolValueBuilder.js +88 -0
- package/lib/components/editor/editor-group/ProtocolValueBuilder.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +5 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/FlatDataPropertyMappingEditor.js +3 -3
- package/lib/components/editor/editor-group/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationEditor.js +3 -3
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/{edit-panel/mapping-editor/testable → editor-group/mapping-editor}/MappingTestableEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -0
- package/lib/components/editor/{edit-panel/mapping-editor/testable → editor-group/mapping-editor}/MappingTestableEditor.js +11 -11
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -0
- package/lib/components/editor/editor-group/mapping-editor/PurePropertyMappingEditor.js +4 -4
- package/lib/components/editor/editor-group/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/relational/RelationalPropertyMappingEditor.js +4 -4
- package/lib/components/editor/editor-group/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +0 -7
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServicePostValidationEditor.js +3 -3
- package/lib/components/editor/editor-group/service-editor/ServicePostValidationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +3 -3
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js +6 -2
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js +10 -2
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.d.ts +3 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +14 -0
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.d.ts +5 -5
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +12 -7
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +5 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/ExternalFormatState.d.ts +3 -3
- package/lib/stores/editor/editor-state/ExternalFormatState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/ExternalFormatState.js +14 -14
- package/lib/stores/editor/editor-state/ExternalFormatState.js.map +1 -1
- package/lib/stores/editor/editor-state/GraphGenerationState.d.ts +2 -2
- package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/GraphGenerationState.js +1 -1
- package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorBuilderState.d.ts +34 -0
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorBuilderState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorBuilderState.js +118 -0
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorBuilderState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +10 -8
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +16 -13
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.d.ts +31 -0
- package/lib/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.js +91 -0
- package/lib/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.d.ts +69 -0
- package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.js +243 -0
- package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +2 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js +8 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.d.ts +2 -13
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js +1 -39
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts +0 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.js +7 -20
- package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
- package/lib/stores/editor/utils/PackageTreeUtils.js +1 -1
- package/lib/stores/editor/utils/PackageTreeUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.d.ts +3 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.js +4 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.js.map +1 -1
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.d.ts +1 -0
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.js +3 -0
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/project-view/ProjectViewerStore.js +7 -3
- package/lib/stores/project-view/ProjectViewerStore.js.map +1 -1
- package/package.json +12 -12
- package/src/application/LegendStudioApplicationConfig.ts +14 -20
- package/src/components/ElementIconUtils.tsx +14 -2
- package/src/components/editor/__test-utils__/EditorComponentTestUtils.tsx +2 -0
- package/src/components/editor/editor-group/EditorGroup.tsx +12 -1
- package/src/components/editor/editor-group/FunctionEditor.tsx +331 -85
- package/src/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.tsx +129 -0
- package/src/components/editor/editor-group/ModelImporter.tsx +1 -1
- package/src/components/editor/editor-group/ProtocolValueBuilder.tsx +225 -0
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +26 -1
- package/src/components/editor/editor-group/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +1 -1
- package/src/components/editor/editor-group/element-generation-editor/FileGenerationEditor.tsx +7 -28
- package/src/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.tsx +1 -1
- package/src/components/editor/editor-group/mapping-editor/FlatDataPropertyMappingEditor.tsx +4 -4
- package/src/components/editor/editor-group/mapping-editor/InstanceSetImplementationEditor.tsx +2 -3
- package/src/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +1 -1
- package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +1 -1
- package/src/components/editor/{edit-panel/mapping-editor/testable → editor-group/mapping-editor}/MappingTestableEditor.tsx +13 -13
- package/src/components/editor/editor-group/mapping-editor/PurePropertyMappingEditor.tsx +5 -5
- package/src/components/editor/editor-group/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +5 -5
- package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +0 -10
- package/src/components/editor/editor-group/service-editor/ServicePostValidationEditor.tsx +3 -3
- package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +3 -3
- package/src/components/editor/editor-group/uml-editor/StereotypeSelector.tsx +12 -11
- package/src/components/editor/editor-group/uml-editor/TaggedValueEditor.tsx +18 -20
- package/src/components/workspace-setup/WorkspaceSetup.tsx +1 -1
- package/src/stores/LegendStudioApplicationPlugin.ts +14 -5
- package/src/stores/editor/EditorGraphState.ts +24 -0
- package/src/stores/editor/EditorStore.ts +16 -7
- package/src/stores/editor/EditorTabManagerState.ts +7 -0
- package/src/stores/editor/editor-state/ExternalFormatState.ts +14 -16
- package/src/stores/editor/editor-state/GraphGenerationState.ts +3 -2
- package/src/stores/editor/editor-state/element-editor-state/FunctionActivatorBuilderState.ts +178 -0
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +21 -13
- package/src/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.ts +136 -0
- package/src/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.ts +364 -0
- package/src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts +12 -0
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.ts +0 -53
- package/src/stores/editor/utils/MockDataUtils.ts +7 -28
- package/src/stores/editor/utils/PackageTreeUtils.ts +1 -1
- package/src/stores/graph-modifier/DomainGraphModifierHelper.ts +9 -1
- package/src/stores/graph-modifier/STO_Relational_GraphModifierHelper.ts +6 -0
- package/src/stores/project-view/ProjectViewerStore.ts +6 -6
- package/tsconfig.json +6 -2
- package/lib/components/editor/edit-panel/mapping-editor/testable/MappingTestableEditor.d.ts.map +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/testable/MappingTestableEditor.js.map +0 -1
- package/lib/components/editor/editor-group/service-editor/TEMPORARY__SnowflakeServiceDeployer.d.ts.map +0 -1
- package/lib/components/editor/editor-group/service-editor/TEMPORARY__SnowflakeServiceDeployer.js +0 -39
- package/lib/components/editor/editor-group/service-editor/TEMPORARY__SnowflakeServiceDeployer.js.map +0 -1
- package/src/components/editor/editor-group/service-editor/TEMPORARY__SnowflakeServiceDeployer.tsx +0 -79
@@ -18,13 +18,14 @@ import { assertErrorThrown, LogEvent, guaranteeType, assertType, } from '@finos/
|
|
18
18
|
import { ElementEditorState } from './ElementEditorState.js';
|
19
19
|
import { GRAPH_MANAGER_EVENT, LAMBDA_PIPE, ParserError, ConcreteFunctionDefinition, RawLambda, buildSourceInformationSourceId, isStubbed_PackageableElement, } from '@finos/legend-graph';
|
20
20
|
import { LambdaEditorState } from '@finos/legend-query-builder';
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
import { FunctionActivatorBuilderState } from './FunctionActivatorBuilderState.js';
|
22
|
+
export var FUNCTION_EDITOR_TAB;
|
23
|
+
(function (FUNCTION_EDITOR_TAB) {
|
24
|
+
FUNCTION_EDITOR_TAB["DEFINITION"] = "DEFINITION";
|
25
|
+
FUNCTION_EDITOR_TAB["TAGGED_VALUES"] = "TAGGED_VALUES";
|
26
|
+
FUNCTION_EDITOR_TAB["STEREOTYPES"] = "STEREOTYPES";
|
27
|
+
})(FUNCTION_EDITOR_TAB = FUNCTION_EDITOR_TAB || (FUNCTION_EDITOR_TAB = {}));
|
28
|
+
export class FunctionDefinitionEditorState extends LambdaEditorState {
|
28
29
|
editorStore;
|
29
30
|
functionElement;
|
30
31
|
isConvertingFunctionBodyToString = false;
|
@@ -105,8 +106,9 @@ export class FunctionBodyEditorState extends LambdaEditorState {
|
|
105
106
|
}
|
106
107
|
}
|
107
108
|
export class FunctionEditorState extends ElementEditorState {
|
109
|
+
functionDefinitionEditorState;
|
110
|
+
activatorBuilderState;
|
108
111
|
selectedTab;
|
109
|
-
functionBodyEditorState;
|
110
112
|
constructor(editorStore, element) {
|
111
113
|
super(editorStore, element);
|
112
114
|
makeObservable(this, {
|
@@ -116,8 +118,9 @@ export class FunctionEditorState extends ElementEditorState {
|
|
116
118
|
reprocess: action,
|
117
119
|
});
|
118
120
|
assertType(element, ConcreteFunctionDefinition, 'Element inside function editor state must be a function');
|
119
|
-
this.selectedTab =
|
120
|
-
this.
|
121
|
+
this.selectedTab = FUNCTION_EDITOR_TAB.DEFINITION;
|
122
|
+
this.functionDefinitionEditorState = new FunctionDefinitionEditorState(element, this.editorStore);
|
123
|
+
this.activatorBuilderState = new FunctionActivatorBuilderState(this);
|
121
124
|
}
|
122
125
|
get functionElement() {
|
123
126
|
return guaranteeType(this.element, ConcreteFunctionDefinition, 'Element inside function editor state must be a function');
|
@@ -129,8 +132,8 @@ export class FunctionEditorState extends ElementEditorState {
|
|
129
132
|
let revealed = false;
|
130
133
|
try {
|
131
134
|
if (compilationError.sourceInformation) {
|
132
|
-
this.setSelectedTab(
|
133
|
-
this.
|
135
|
+
this.setSelectedTab(FUNCTION_EDITOR_TAB.DEFINITION);
|
136
|
+
this.functionDefinitionEditorState.setCompilationError(compilationError);
|
134
137
|
revealed = true;
|
135
138
|
}
|
136
139
|
}
|
@@ -141,7 +144,7 @@ export class FunctionEditorState extends ElementEditorState {
|
|
141
144
|
return revealed;
|
142
145
|
}
|
143
146
|
clearCompilationError() {
|
144
|
-
this.
|
147
|
+
this.functionDefinitionEditorState.setCompilationError(undefined);
|
145
148
|
}
|
146
149
|
reprocess(newElement, editorStore) {
|
147
150
|
const functionEditorState = new FunctionEditorState(editorStore, newElement);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FunctionEditorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAEpE,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAGL,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;
|
1
|
+
{"version":3,"file":"FunctionEditorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAEpE,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAGL,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,gDAAyB,CAAA;IACzB,sDAA+B,CAAA;IAC/B,kDAA2B,CAAA;AAC7B,CAAC,EAJW,mBAAmB,GAAnB,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED,MAAM,OAAO,6BAA8B,SAAQ,iBAAiB;IACzD,WAAW,CAAc;IACzB,eAAe,CAA6B;IAErD,gCAAgC,GAAG,KAAK,CAAC;IAEzC,YACE,eAA2C,EAC3C,WAAwB;QAExB,KAAK,CAAC,EAAE,EAAE,WAAW,CAAC,C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sBAAsB,CAAC,gBAAkC;QAChE,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI;YACF,IAAI,gBAAgB,CAAC,iBAAiB,EAAE;gBACtC,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;gBACpD,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,CACpD,gBAAgB,CACjB,CAAC;gBACF,QAAQ,GAAG,IAAI,CAAC;aACjB;SACF;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAC/C,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,EACxD,oBAAoB,EACpB,KAAK,CACN,CAAC;SACH;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEQ,qBAAqB;QAC5B,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC;IAED,SAAS,CACP,UAAsC,EACtC,WAAwB;QAExB,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,CACjD,WAAW,EACX,UAAU,CACX,CAAC;QACF,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACnD,OAAO,mBAAmB,CAAC;IAC7B,CAAC;CACF"}
|
@@ -0,0 +1,31 @@
|
|
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
|
+
import { type INTERNAL__UnknownFunctionActivator } from '@finos/legend-graph';
|
17
|
+
import type { EditorStore } from '../../EditorStore.js';
|
18
|
+
import { ElementEditorState } from './ElementEditorState.js';
|
19
|
+
import { ActionState, type GeneratorFn } from '@finos/legend-shared';
|
20
|
+
import { ProtocolValueBuilderState } from './ProtocolValueBuilderState.js';
|
21
|
+
export declare class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditorState {
|
22
|
+
readonly activator: INTERNAL__UnknownFunctionActivator;
|
23
|
+
readonly validateState: ActionState;
|
24
|
+
readonly publishToSandboxState: ActionState;
|
25
|
+
protocolValueBuilderState?: ProtocolValueBuilderState | undefined;
|
26
|
+
constructor(editorStore: EditorStore, element: INTERNAL__UnknownFunctionActivator);
|
27
|
+
validate(): GeneratorFn<void>;
|
28
|
+
publishToSandbox(): GeneratorFn<void>;
|
29
|
+
reprocess(newElement: INTERNAL__UnknownFunctionActivator, editorStore: EditorStore): INTERNAL__UnknownFunctionActivatorEdtiorState;
|
30
|
+
}
|
31
|
+
//# sourceMappingURL=INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"INTERNAL__UnknownFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,kCAAkC,EACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EACL,WAAW,EAEX,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAI3E,qBAAa,6CAA8C,SAAQ,kBAAkB;IACnF,QAAQ,CAAC,SAAS,EAAE,kCAAkC,CAAC;IACvD,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,qBAAqB,cAAwB;IACtD,yBAAyB,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;gBAGhE,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,kCAAkC;IAgD5C,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAkB7B,gBAAgB,IAAI,WAAW,CAAC,IAAI,CAAC;IAkBtC,SAAS,CACP,UAAU,EAAE,kCAAkC,EAC9C,WAAW,EAAE,WAAW,GACvB,6CAA6C;CAMjD"}
|
@@ -0,0 +1,91 @@
|
|
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
|
+
import { generateFunctionPrettyName, InMemoryGraphData, } from '@finos/legend-graph';
|
17
|
+
import { ElementEditorState } from './ElementEditorState.js';
|
18
|
+
import { action, flow, makeObservable } from 'mobx';
|
19
|
+
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
20
|
+
import { ProtocolValueBuilderState } from './ProtocolValueBuilderState.js';
|
21
|
+
import { INTERNAL__UnknownFunctionActivator_setContent } from '../../../graph-modifier/DomainGraphModifierHelper.js';
|
22
|
+
import { FUNCTION_ACTIVATOR_EXCLUDED_PATHS } from './FunctionActivatorBuilderState.js';
|
23
|
+
export class INTERNAL__UnknownFunctionActivatorEdtiorState extends ElementEditorState {
|
24
|
+
activator;
|
25
|
+
validateState = ActionState.create();
|
26
|
+
publishToSandboxState = ActionState.create();
|
27
|
+
protocolValueBuilderState;
|
28
|
+
constructor(editorStore, element) {
|
29
|
+
super(editorStore, element);
|
30
|
+
makeObservable(this, {
|
31
|
+
reprocess: action,
|
32
|
+
validate: flow,
|
33
|
+
publishToSandbox: flow,
|
34
|
+
});
|
35
|
+
this.activator = element;
|
36
|
+
const matchingFunctionActivatorConfiguration = this.editorStore.graphState.functionActivatorConfigurations.find((config) => config.packageableElementJSONType === this.activator.content._type);
|
37
|
+
this.protocolValueBuilderState = matchingFunctionActivatorConfiguration
|
38
|
+
? new ProtocolValueBuilderState(matchingFunctionActivatorConfiguration.configurationType, {
|
39
|
+
graph: matchingFunctionActivatorConfiguration.graph,
|
40
|
+
initialValue: this.activator.content,
|
41
|
+
excludedPaths: FUNCTION_ACTIVATOR_EXCLUDED_PATHS,
|
42
|
+
onValueChange: (value) => {
|
43
|
+
INTERNAL__UnknownFunctionActivator_setContent(this.activator, value);
|
44
|
+
},
|
45
|
+
decorateValue: (value) => {
|
46
|
+
value._type =
|
47
|
+
matchingFunctionActivatorConfiguration.packageableElementJSONType;
|
48
|
+
value.package = this.activator.package?.path;
|
49
|
+
value.name = this.activator.name;
|
50
|
+
value.function = generateFunctionPrettyName(this.activator.function.value, {
|
51
|
+
fullPath: true,
|
52
|
+
spacing: false,
|
53
|
+
}).replaceAll(' ', '');
|
54
|
+
return value;
|
55
|
+
},
|
56
|
+
})
|
57
|
+
: undefined;
|
58
|
+
}
|
59
|
+
*validate() {
|
60
|
+
this.validateState.inProgress();
|
61
|
+
try {
|
62
|
+
yield this.editorStore.graphManagerState.graphManager.validateFunctionActivator(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph));
|
63
|
+
this.editorStore.applicationStore.notificationService.notifySuccess(`Function activator is valid`);
|
64
|
+
}
|
65
|
+
catch (error) {
|
66
|
+
assertErrorThrown(error);
|
67
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
68
|
+
}
|
69
|
+
finally {
|
70
|
+
this.validateState.complete();
|
71
|
+
}
|
72
|
+
}
|
73
|
+
*publishToSandbox() {
|
74
|
+
this.publishToSandboxState.inProgress();
|
75
|
+
try {
|
76
|
+
yield this.editorStore.graphManagerState.graphManager.publishFunctionActivatorToSandbox(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph));
|
77
|
+
this.editorStore.applicationStore.notificationService.notifySuccess(`Function activator is published to sandbox`);
|
78
|
+
}
|
79
|
+
catch (error) {
|
80
|
+
assertErrorThrown(error);
|
81
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
82
|
+
}
|
83
|
+
finally {
|
84
|
+
this.publishToSandboxState.complete();
|
85
|
+
}
|
86
|
+
}
|
87
|
+
reprocess(newElement, editorStore) {
|
88
|
+
return new INTERNAL__UnknownFunctionActivatorEdtiorState(editorStore, newElement);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
//# sourceMappingURL=INTERNAL__UnknownFunctionActivatorEditorState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"INTERNAL__UnknownFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,GAElB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EACL,WAAW,EACX,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCA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C,KAAK,CAAC,CAChE,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACjE,4CAA4C,CAC7C,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1E;gBAAS;YACR,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC;SACvC;IACH,CAAC;IAED,SAAS,CACP,UAA8C,EAC9C,WAAwB;QAExB,OAAO,IAAI,6CAA6C,CACtD,WAAW,EACX,UAAU,CACX,CAAC;IACJ,CAAC;CACF"}
|
@@ -0,0 +1,69 @@
|
|
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
|
+
import { type Class, type PureModel, type Property } from '@finos/legend-graph';
|
17
|
+
import { type PlainObject } from '@finos/legend-shared';
|
18
|
+
import type { TreeData, TreeNodeData } from '@finos/legend-art';
|
19
|
+
export declare abstract class ProtocolValueFieldNode implements TreeNodeData {
|
20
|
+
readonly id: string;
|
21
|
+
readonly label: string;
|
22
|
+
readonly builderState: ProtocolValueBuilderState;
|
23
|
+
readonly property: Property;
|
24
|
+
readonly propertyPath: string;
|
25
|
+
isOpen: boolean;
|
26
|
+
childrenIds: string[];
|
27
|
+
childrenNodes: ProtocolValueFieldNode[];
|
28
|
+
constructor(id: string, label: string, builderState: ProtocolValueBuilderState, property: Property, propertyPath: string);
|
29
|
+
setIsOpen(val: boolean): void;
|
30
|
+
abstract getValue(): unknown;
|
31
|
+
}
|
32
|
+
export declare class StringFieldNode extends ProtocolValueFieldNode {
|
33
|
+
value: string;
|
34
|
+
constructor(id: string, label: string, builderState: ProtocolValueBuilderState, property: Property, propertyPath: string, initialValue: string);
|
35
|
+
setValue(val: string): void;
|
36
|
+
getValue(): string;
|
37
|
+
}
|
38
|
+
export declare class OptionalStringFieldNode extends ProtocolValueFieldNode {
|
39
|
+
value: string | undefined;
|
40
|
+
constructor(id: string, label: string, builderState: ProtocolValueBuilderState, property: Property, propertyPath: string, initialValue: string | undefined);
|
41
|
+
setValue(val: string | undefined): void;
|
42
|
+
getValue(): string | undefined;
|
43
|
+
}
|
44
|
+
export declare class UnsupportedFieldNode extends ProtocolValueFieldNode {
|
45
|
+
readonly value: unknown;
|
46
|
+
constructor(id: string, label: string, builderState: ProtocolValueBuilderState, property: Property, propertyPath: string, initialValue: unknown);
|
47
|
+
getValue(): unknown;
|
48
|
+
}
|
49
|
+
export declare class ProtocolValueBuilderState {
|
50
|
+
readonly type: Class;
|
51
|
+
readonly isCyclic: boolean;
|
52
|
+
readonly graph: PureModel;
|
53
|
+
readonly excludedPaths: Map<string, string[]>;
|
54
|
+
readonly initialValue: PlainObject;
|
55
|
+
readonly onValueChange?: ((value: PlainObject) => void) | undefined;
|
56
|
+
readonly decorateValue?: ((value: PlainObject) => PlainObject) | undefined;
|
57
|
+
treeData: TreeData<ProtocolValueFieldNode> | undefined;
|
58
|
+
constructor(type: Class, options: {
|
59
|
+
graph: PureModel;
|
60
|
+
initialValue: PlainObject | undefined;
|
61
|
+
excludedPaths: string[];
|
62
|
+
onValueChange?: ((value: PlainObject) => void) | undefined;
|
63
|
+
decorateValue?: ((value: PlainObject) => PlainObject) | undefined;
|
64
|
+
});
|
65
|
+
buildTreeData(type: Class): TreeData<ProtocolValueFieldNode>;
|
66
|
+
private generateInitialValue;
|
67
|
+
getValue(): PlainObject;
|
68
|
+
}
|
69
|
+
//# sourceMappingURL=ProtocolValueBuilderState.d.ts.map
|
package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ProtocolValueBuilderState.d.ts","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,SAAS,EAId,KAAK,QAAQ,EAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEhE,8BAAsB,sBAAuB,YAAW,YAAY;IAClE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,MAAM,UAAQ;IACd,WAAW,EAAE,MAAM,EAAE,CAAM;IAC3B,aAAa,EAAE,sBAAsB,EAAE,CAAM;gBAG3C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,yBAAyB,EACvC,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM;IActB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI7B,QAAQ,CAAC,QAAQ,IAAI,OAAO;CAC7B;AAED,qBAAa,eAAgB,SAAQ,sBAAsB;IACzD,KAAK,EAAE,MA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AC;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,WAAW,CAAC,GAAG,SAAS,CAAC;IAE3E,QAAQ,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC;gBAGrD,IAAI,EAAE,KAAK,EACX,OAAO,EAAE;QACP,KAAK,EAAE,SAAS,CAAC;QACjB,YAAY,EAAE,WAAW,GAAG,SAAS,CAAC;QACtC,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;QAC3D,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,WAAW,CAAC,GAAG,SAAS,CAAC;KACnE;IAkCH,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,sBAAsB,CAAC;IAyF5D,OAAO,CAAC,oBAAoB;IAuD5B,QAAQ,IAAI,WAAW;CAexB"}
|
@@ -0,0 +1,243 @@
|
|
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
|
+
import { action, makeObservable, observable } from 'mobx';
|
17
|
+
import { getAllClassProperties, PrimitiveType, PRIMITIVE_TYPE, PROPERTY_ACCESSOR, classHasCycle, } from '@finos/legend-graph';
|
18
|
+
import { isString, uuid } from '@finos/legend-shared';
|
19
|
+
export class ProtocolValueFieldNode {
|
20
|
+
id;
|
21
|
+
label;
|
22
|
+
builderState;
|
23
|
+
property;
|
24
|
+
propertyPath;
|
25
|
+
isOpen = true;
|
26
|
+
childrenIds = [];
|
27
|
+
childrenNodes = [];
|
28
|
+
constructor(id, label, builderState, property, propertyPath) {
|
29
|
+
makeObservable(this, {
|
30
|
+
isOpen: observable,
|
31
|
+
setIsOpen: action,
|
32
|
+
});
|
33
|
+
this.id = id;
|
34
|
+
this.label = label;
|
35
|
+
this.builderState = builderState;
|
36
|
+
this.property = property;
|
37
|
+
this.propertyPath = propertyPath;
|
38
|
+
}
|
39
|
+
setIsOpen(val) {
|
40
|
+
this.isOpen = val;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
export class StringFieldNode extends ProtocolValueFieldNode {
|
44
|
+
value;
|
45
|
+
constructor(id, label, builderState, property, propertyPath, initialValue) {
|
46
|
+
super(id, label, builderState, property, propertyPath);
|
47
|
+
makeObservable(this, {
|
48
|
+
value: observable,
|
49
|
+
setValue: action,
|
50
|
+
});
|
51
|
+
this.value = initialValue;
|
52
|
+
}
|
53
|
+
setValue(val) {
|
54
|
+
this.value = val;
|
55
|
+
this.builderState.onValueChange?.(this.builderState.getValue());
|
56
|
+
}
|
57
|
+
getValue() {
|
58
|
+
return this.value;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
export class OptionalStringFieldNode extends ProtocolValueFieldNode {
|
62
|
+
value;
|
63
|
+
constructor(id, label, builderState, property, propertyPath, initialValue) {
|
64
|
+
super(id, label, builderState, property, propertyPath);
|
65
|
+
makeObservable(this, {
|
66
|
+
value: observable,
|
67
|
+
setValue: action,
|
68
|
+
});
|
69
|
+
this.value = initialValue;
|
70
|
+
}
|
71
|
+
setValue(val) {
|
72
|
+
this.value = val;
|
73
|
+
this.builderState.onValueChange?.(this.builderState.getValue());
|
74
|
+
}
|
75
|
+
getValue() {
|
76
|
+
return this.value;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
export class UnsupportedFieldNode extends ProtocolValueFieldNode {
|
80
|
+
value; // we will not support editing unknown value
|
81
|
+
constructor(id, label, builderState, property, propertyPath, initialValue) {
|
82
|
+
super(id, label, builderState, property, propertyPath);
|
83
|
+
this.value = initialValue;
|
84
|
+
}
|
85
|
+
getValue() {
|
86
|
+
return this.value;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
export class ProtocolValueBuilderState {
|
90
|
+
type;
|
91
|
+
isCyclic;
|
92
|
+
graph;
|
93
|
+
excludedPaths;
|
94
|
+
initialValue;
|
95
|
+
onValueChange;
|
96
|
+
decorateValue;
|
97
|
+
treeData;
|
98
|
+
constructor(type, options) {
|
99
|
+
makeObservable(this, { treeData: observable.ref });
|
100
|
+
this.type = type;
|
101
|
+
this.graph = options.graph;
|
102
|
+
this.onValueChange = options.onValueChange;
|
103
|
+
this.decorateValue = options.decorateValue;
|
104
|
+
this.excludedPaths = new Map();
|
105
|
+
options.excludedPaths.forEach((path) => {
|
106
|
+
const idx = path.indexOf(PROPERTY_ACCESSOR);
|
107
|
+
if (idx === -1) {
|
108
|
+
return;
|
109
|
+
}
|
110
|
+
const classPath = path.substring(0, idx);
|
111
|
+
const propertyName = path.substring(idx + 1);
|
112
|
+
if (!this.excludedPaths.has(classPath)) {
|
113
|
+
this.excludedPaths.set(classPath, [propertyName]);
|
114
|
+
}
|
115
|
+
else {
|
116
|
+
this.excludedPaths.get(classPath)?.push(propertyName);
|
117
|
+
}
|
118
|
+
});
|
119
|
+
this.isCyclic = classHasCycle(type, {
|
120
|
+
traverseNonRequiredProperties: true,
|
121
|
+
excludedPaths: this.excludedPaths,
|
122
|
+
});
|
123
|
+
this.initialValue =
|
124
|
+
options.initialValue ??
|
125
|
+
(this.isCyclic ? {} : this.generateInitialValue(type));
|
126
|
+
this.treeData = this.isCyclic ? undefined : this.buildTreeData(type);
|
127
|
+
}
|
128
|
+
buildTreeData(type) {
|
129
|
+
const rootIds = [];
|
130
|
+
const nodes = new Map();
|
131
|
+
getAllClassProperties(type).forEach((property) => {
|
132
|
+
// filter properties
|
133
|
+
const propertyOwnerPath = property._OWNER.path;
|
134
|
+
const excludedProperties = this.excludedPaths.get(propertyOwnerPath) ?? [];
|
135
|
+
if (excludedProperties.includes(property.name)) {
|
136
|
+
return;
|
137
|
+
}
|
138
|
+
const propertyType = property.genericType.value.rawType;
|
139
|
+
const multiplicity = property.multiplicity;
|
140
|
+
const childNodeValue = this.initialValue[property.name];
|
141
|
+
const childNodeId = uuid();
|
142
|
+
let childNode;
|
143
|
+
if (!(propertyType instanceof PrimitiveType)) {
|
144
|
+
childNode = new UnsupportedFieldNode(uuid(), '', this, property, property.name, childNodeValue);
|
145
|
+
}
|
146
|
+
else {
|
147
|
+
switch (propertyType.name) {
|
148
|
+
case PRIMITIVE_TYPE.STRING: {
|
149
|
+
if (multiplicity.lowerBound === 0) {
|
150
|
+
childNode = new OptionalStringFieldNode(childNodeId, '', this, property, property.name, childNodeValue === undefined
|
151
|
+
? undefined
|
152
|
+
: isString(childNodeValue)
|
153
|
+
? childNodeValue
|
154
|
+
: '');
|
155
|
+
}
|
156
|
+
else if (multiplicity.upperBound === 1) {
|
157
|
+
childNode = new StringFieldNode(childNodeId, '', this, property, property.name, isString(childNodeValue) ? childNodeValue : '');
|
158
|
+
}
|
159
|
+
else {
|
160
|
+
childNode = new UnsupportedFieldNode(childNodeId, '', this, property, property.name, childNodeValue);
|
161
|
+
}
|
162
|
+
break;
|
163
|
+
}
|
164
|
+
default: {
|
165
|
+
childNode = new UnsupportedFieldNode(childNodeId, '', this, property, property.name, childNodeValue);
|
166
|
+
break;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
nodes.set(childNodeId, childNode);
|
171
|
+
});
|
172
|
+
nodes.forEach((node) => {
|
173
|
+
rootIds.push(node.id);
|
174
|
+
});
|
175
|
+
return { rootIds, nodes };
|
176
|
+
}
|
177
|
+
generateInitialValue(type) {
|
178
|
+
const value = {};
|
179
|
+
const excludedProperties = this.excludedPaths.get(type.path) ?? [];
|
180
|
+
getAllClassProperties(type)
|
181
|
+
.filter((property) => !excludedProperties.includes(property.name))
|
182
|
+
.forEach((property) => {
|
183
|
+
// NOTE: for now, we only handle very basic properties: i.e. primitive property (except Date) with multiplicity [0..1] or [1]
|
184
|
+
// we have not handled list of primitives, enumeration type, list of enumeration values, complex type
|
185
|
+
//
|
186
|
+
// Note that subtype is something we need to think very carefully about: displaying subtype in the form is not necessarily hard
|
187
|
+
// as we can draw a selector dropdown for the type, but in terms of actually generate the right protocol value, it depends on the
|
188
|
+
// use case and that could add complexity, for example, if we use this to generate Pure protocol, we would need the information
|
189
|
+
// for _type flag for subtype
|
190
|
+
const propertyType = property.genericType.value.rawType;
|
191
|
+
const multiplicity = property.multiplicity;
|
192
|
+
if (!(propertyType instanceof PrimitiveType) ||
|
193
|
+
(multiplicity.upperBound && multiplicity.upperBound > 1)) {
|
194
|
+
return;
|
195
|
+
}
|
196
|
+
if (multiplicity.lowerBound === 0) {
|
197
|
+
value[property.name] = undefined;
|
198
|
+
}
|
199
|
+
else {
|
200
|
+
switch (propertyType.name) {
|
201
|
+
case PRIMITIVE_TYPE.BOOLEAN: {
|
202
|
+
value[property.name] = false;
|
203
|
+
break;
|
204
|
+
}
|
205
|
+
case PRIMITIVE_TYPE.FLOAT:
|
206
|
+
case PRIMITIVE_TYPE.DECIMAL: {
|
207
|
+
value[property.name] = 0.0;
|
208
|
+
break;
|
209
|
+
}
|
210
|
+
case PRIMITIVE_TYPE.NUMBER:
|
211
|
+
case PRIMITIVE_TYPE.INTEGER: {
|
212
|
+
value[property.name] = 0;
|
213
|
+
break;
|
214
|
+
}
|
215
|
+
case PRIMITIVE_TYPE.STRING: {
|
216
|
+
value[property.name] = '';
|
217
|
+
break;
|
218
|
+
}
|
219
|
+
case PRIMITIVE_TYPE.DATE:
|
220
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
221
|
+
case PRIMITIVE_TYPE.DATETIME:
|
222
|
+
default:
|
223
|
+
return; // unsupported
|
224
|
+
}
|
225
|
+
}
|
226
|
+
});
|
227
|
+
return value;
|
228
|
+
}
|
229
|
+
getValue() {
|
230
|
+
if (!this.treeData) {
|
231
|
+
return {};
|
232
|
+
}
|
233
|
+
const value = {};
|
234
|
+
this.treeData.rootIds.forEach((rootId) => {
|
235
|
+
const node = this.treeData?.nodes.get(rootId);
|
236
|
+
if (node) {
|
237
|
+
value[node.property.name] = node.getValue();
|
238
|
+
}
|
239
|
+
});
|
240
|
+
return this.decorateValue ? this.decorateValue(value) : value;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
//# sourceMappingURL=ProtocolValueBuilderState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ProtocolValueBuilderState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EACL,qBAAqB,EAGrB,aAAa,EACb,cAAc,EACd,iBAAiB,EAEjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAoB,MAAM,sBAAsB,CAAC;AAGxE,MAAM,OAAgB,sBAAsB;IACjC,EAAE,CAAS;IACX,KAAK,CAAS;IACd,YAAY,CAA4B;IACxC,QAAQ,CAAW;IACnB,YAAY,CAAS;IAC9B,MAAM,GAAG,IAAI,CAAC;IACd,WAAW,GAAa,EAAE,CAAC;IAC3B,aAAa,GAA6B,EAAE,CAAC;IAE7C,YACE,EAAU,EACV,KAAa,EACb,YAAuC,EACvC,QAAkB,EAClB,YAAoB;QAEpB,cAAc,CAAC,IAAI,EAAE;YACnB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,MAAM;SAClB,CAAC,CAAC;QAEH,IAAI,CAAC,EAAE,GAA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,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9C,IAAI,IAAI,EAAE;gBACR,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;aAC7C;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChE,CAAC;CACF"}
|
package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts
CHANGED
@@ -56,12 +56,14 @@ export declare enum CORE_AUTHENTICATION_STRATEGY_TYPE {
|
|
56
56
|
}
|
57
57
|
export declare class RelationalDatabaseConnectionValueState extends ConnectionValueState {
|
58
58
|
connection: RelationalDatabaseConnection;
|
59
|
+
localMode: boolean;
|
59
60
|
selectedTab: RELATIONAL_DATABASE_TAB_TYPE;
|
60
61
|
postProcessorState: PostProcessorEditorState | undefined;
|
61
62
|
constructor(editorStore: EditorStore, connection: RelationalDatabaseConnection);
|
62
63
|
selectPostProcessor: (postProcessor: PostProcessor | undefined) => void;
|
63
64
|
get storeValidationResult(): ValidationIssue | undefined;
|
64
65
|
setSelectedTab(val: RELATIONAL_DATABASE_TAB_TYPE): void;
|
66
|
+
setLocalMode(val: boolean): void;
|
65
67
|
label(): string;
|
66
68
|
get selectedDatasourceSpecificationType(): string | undefined;
|
67
69
|
changeDatasourceSpec(type: string): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConnectionEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EAGpB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAuB5B,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"ConnectionEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EAGpB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAuB5B,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AAEvC,8BAAsB,oBAAoB;IACxC,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;gBAEX,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU;IAK5D,QAAQ,CAAC,KAAK,IAAI,MAAM;CACzB;AAED,oBAAY,4BAA4B;IACtC,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,eAAe,oBAAoB;CACpC;AAED,oBAAY,yBAAyB;IACnC,MAAM,WAAW;IACjB,QAAQ,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AAI,MAAM;CAGhB;AAED,qBAAa,4BAA6B,SAAQ,oBAAoB;IAC3D,UAAU,EAAE,kBAAkB,CAAC;gBAE5B,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB;IAKpE,KAAK,IAAI,MAAM;CAGhB;AAED,qBAAa,+BAAgC,SAAQ,oBAAoB;IACvE,KAAK,IAAI,MAAM;CAGhB;AAED,qBAAa,qBAAqB;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,SAAU;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,oBAAoB,EAAE,oBAAoB,CAAC;gBAE/B,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU;IAM5D,+BAA+B,IAAI,oBAAoB;CA8BxD;AAED,qBAAa,gCAAiC,SAAQ,kBAAkB;IACtE,eAAe,EAAE,qBAAqB,CAAC;gBAE3B,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IAcjE,IAAI,UAAU,IAAI,qBAAqB,CAMtC;IAED,SAAS,CACP,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,kBAAkB;CAQtB"}
|
package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js
CHANGED
@@ -17,7 +17,7 @@ import { computed, observable, action, makeObservable } from 'mobx';
|
|
17
17
|
import { guaranteeType, uuid, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
18
|
import { ElementEditorState } from './../ElementEditorState.js';
|
19
19
|
import { PackageableConnection, JsonModelConnection, FlatDataConnection, RelationalDatabaseConnection, DefaultH2AuthenticationStrategy, DelegatedKerberosAuthenticationStrategy, OAuthAuthenticationStrategy, UsernamePasswordAuthenticationStrategy, ApiTokenAuthenticationStrategy, SnowflakePublicAuthenticationStrategy, GCPApplicationDefaultCredentialsAuthenticationStrategy, GCPWorkloadIdentityFederationAuthenticationStrategy, MiddleTierUsernamePasswordAuthenticationStrategy, TrinoDelegatedKerberosAuthenticationStrategy, EmbeddedH2DatasourceSpecification, LocalH2DatasourceSpecification, DatabricksDatasourceSpecification, SnowflakeDatasourceSpecification, BigQueryDatasourceSpecification, StaticDatasourceSpecification, RedshiftDatasourceSpecification, SpannerDatasourceSpecification, TrinoDatasourceSpecification, TrinoSslSpecification, createValidationError, isStubbed_PackageableElement, MapperPostProcessor, } from '@finos/legend-graph';
|
20
|
-
import { relationDbConnection_setNewAuthenticationStrategy, relationDbConnection_setDatasourceSpecification, } from '../../../../graph-modifier/STO_Relational_GraphModifierHelper.js';
|
20
|
+
import { relationDbConnection_setNewAuthenticationStrategy, relationDbConnection_setDatasourceSpecification, relationDbConnection_setLocalMode, } from '../../../../graph-modifier/STO_Relational_GraphModifierHelper.js';
|
21
21
|
import { MapperPostProcessorEditorState, } from './PostProcessorEditorState.js';
|
22
22
|
export class ConnectionValueState {
|
23
23
|
editorStore;
|
@@ -64,15 +64,18 @@ export var CORE_AUTHENTICATION_STRATEGY_TYPE;
|
|
64
64
|
})(CORE_AUTHENTICATION_STRATEGY_TYPE = CORE_AUTHENTICATION_STRATEGY_TYPE || (CORE_AUTHENTICATION_STRATEGY_TYPE = {}));
|
65
65
|
export class RelationalDatabaseConnectionValueState extends ConnectionValueState {
|
66
66
|
connection;
|
67
|
+
localMode = false;
|
67
68
|
selectedTab = RELATIONAL_DATABASE_TAB_TYPE.GENERAL;
|
68
69
|
postProcessorState;
|
69
70
|
constructor(editorStore, connection) {
|
70
71
|
super(editorStore, connection);
|
71
72
|
makeObservable(this, {
|
73
|
+
localMode: observable,
|
72
74
|
selectedTab: observable,
|
73
75
|
postProcessorState: observable,
|
74
76
|
selectedDatasourceSpecificationType: computed,
|
75
77
|
selectedAuthenticationStrategyType: computed,
|
78
|
+
setLocalMode: action,
|
76
79
|
setSelectedTab: action,
|
77
80
|
selectPostProcessor: action,
|
78
81
|
});
|
@@ -107,6 +110,9 @@ export class RelationalDatabaseConnectionValueState extends ConnectionValueState
|
|
107
110
|
setSelectedTab(val) {
|
108
111
|
this.selectedTab = val;
|
109
112
|
}
|
113
|
+
setLocalMode(val) {
|
114
|
+
this.localMode = val;
|
115
|
+
}
|
110
116
|
label() {
|
111
117
|
return `${this.connection.type} connection`;
|
112
118
|
}
|
@@ -207,6 +213,7 @@ export class RelationalDatabaseConnectionValueState extends ConnectionValueState
|
|
207
213
|
throw new UnsupportedOperationError(`Can't create datasource specification of type '${type}': no compatible creator available from plugins`);
|
208
214
|
}
|
209
215
|
relationDbConnection_setDatasourceSpecification(this.connection, dataSpec, observerContext);
|
216
|
+
relationDbConnection_setLocalMode(this.connection, this.connection.localMode);
|
210
217
|
}
|
211
218
|
get selectedAuthenticationStrategyType() {
|
212
219
|
const auth = this.connection.authenticationStrategy;
|