@finos/legend-application-studio 28.10.2 → 28.11.1
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/mapping-editor/DEPRECATED__MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/DEPRECATED__MappingTestEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/DEPRECATED__MappingTestEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js +17 -4
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +10 -2
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.js +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorMode.d.ts +5 -0
- package/lib/stores/editor/EditorMode.d.ts.map +1 -1
- package/lib/stores/editor/EditorMode.js.map +1 -1
- package/lib/stores/editor/StandardEditorMode.d.ts +9 -0
- package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
- package/lib/stores/editor/StandardEditorMode.js +15 -0
- package/lib/stores/editor/StandardEditorMode.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +5 -0
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/project-view/ProjectViewerEditorMode.d.ts +10 -0
- package/lib/stores/project-view/ProjectViewerEditorMode.d.ts.map +1 -1
- package/lib/stores/project-view/ProjectViewerEditorMode.js +17 -0
- package/lib/stores/project-view/ProjectViewerEditorMode.js.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerEditorMode.d.ts +5 -0
- package/lib/stores/showcase/ShowcaseViewerEditorMode.d.ts.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerEditorMode.js +6 -0
- package/lib/stores/showcase/ShowcaseViewerEditorMode.js.map +1 -1
- package/package.json +7 -7
- package/src/components/editor/editor-group/mapping-editor/DEPRECATED__MappingTestEditor.tsx +1 -0
- package/src/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.tsx +1 -0
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +1 -0
- package/src/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.tsx +63 -3
- package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +10 -0
- package/src/components/editor/editor-group/uml-editor/ClassQueryBuilder.tsx +1 -0
- package/src/stores/editor/EditorMode.ts +6 -0
- package/src/stores/editor/StandardEditorMode.ts +26 -0
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.ts +2 -1
- package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +7 -1
- package/src/stores/project-view/ProjectViewerEditorMode.ts +28 -0
- package/src/stores/showcase/ShowcaseViewerEditorMode.ts +15 -0
@@ -540,8 +540,12 @@ const ProjectPlatformVersionEditor = observer(
|
|
540
540
|
);
|
541
541
|
|
542
542
|
const ProjectAdvancedEditor = observer(
|
543
|
-
(props: {
|
544
|
-
|
543
|
+
(props: {
|
544
|
+
projectConfig: ProjectConfiguration;
|
545
|
+
isReadOnly: boolean;
|
546
|
+
configState: ProjectConfigurationEditorState;
|
547
|
+
}) => {
|
548
|
+
const { projectConfig, isReadOnly, configState } = props;
|
545
549
|
const editorStore = useEditorStore();
|
546
550
|
const applicationStore = useApplicationStore();
|
547
551
|
const currentProjectType = projectConfig.projectType ?? ProjectType.MANAGED;
|
@@ -554,6 +558,18 @@ const ProjectAdvancedEditor = observer(
|
|
554
558
|
'You are about to change from managed to embedded project type. This will cause your build files (pom, ci etc) to no longer be managed by our SDLC process. Your element folder structure will remain managed by us but your build will become your responsibility. Please ensure you understand the risks of changing over before continuing.';
|
555
559
|
const embeddedToManaged =
|
556
560
|
'You are about to change from embedded to managed project type. Your build will now be managed by our SDLC sever in addition to your element folder structure. Your current build files will all be deleted and replaces with our own. Please ensure you understand the risks of changing over before continuing.';
|
561
|
+
const runDependencyMessage = `In addition to running your own tests, you can also configure to run all tests in your dependency projects. This should be rarely used and mostly helped mitigate when you have override your dependencies. You should aim to have most of your tests in your current project.`;
|
562
|
+
const toggleRunDependency = (): void => {
|
563
|
+
const newVal = !projectConfig.runDependencyTests;
|
564
|
+
if (
|
565
|
+
!newVal &&
|
566
|
+
configState.originalConfig.runDependencyTests === undefined
|
567
|
+
) {
|
568
|
+
projectConfig.setRunDependencyTests(undefined);
|
569
|
+
} else {
|
570
|
+
projectConfig.setRunDependencyTests(newVal);
|
571
|
+
}
|
572
|
+
};
|
557
573
|
const changeProjectType = (): void => {
|
558
574
|
applicationStore.alertService.setActionAlertInfo({
|
559
575
|
message: `${isEmbeddedMode ? embeddedToManaged : managedToEmbedded}`,
|
@@ -580,6 +596,49 @@ const ProjectAdvancedEditor = observer(
|
|
580
596
|
|
581
597
|
return (
|
582
598
|
<Panel>
|
599
|
+
<PanelForm>
|
600
|
+
<div className="panel__content__form__section__header__label">
|
601
|
+
{`Dependency Tests`}
|
602
|
+
</div>
|
603
|
+
<div className="documentation-preview">
|
604
|
+
<div className="documentation-preview__text">
|
605
|
+
<div className="project-configuration-editor__advanced__project-type__info">
|
606
|
+
{runDependencyMessage}
|
607
|
+
</div>
|
608
|
+
</div>
|
609
|
+
</div>
|
610
|
+
<div className="platform-configurations-editor__dependencies">
|
611
|
+
<div className="platform-configurations-editor__dependencies__header">
|
612
|
+
<div className="platform-configurations-editor__dependencies__header__left">
|
613
|
+
<div
|
614
|
+
className="platform-configurations-editor__toggler"
|
615
|
+
onClick={toggleRunDependency}
|
616
|
+
>
|
617
|
+
<button
|
618
|
+
className={clsx(
|
619
|
+
'platform-configurations-editor__toggler__btn',
|
620
|
+
{
|
621
|
+
'platform-configurations-editor__toggler__btn--toggled':
|
622
|
+
Boolean(projectConfig.runDependencyTests),
|
623
|
+
},
|
624
|
+
)}
|
625
|
+
disabled={isReadOnly}
|
626
|
+
tabIndex={-1}
|
627
|
+
>
|
628
|
+
{projectConfig.runDependencyTests ? (
|
629
|
+
<CheckSquareIcon />
|
630
|
+
) : (
|
631
|
+
<SquareIcon />
|
632
|
+
)}
|
633
|
+
</button>
|
634
|
+
<div className="platform-configurations-editor__toggler__prompt">
|
635
|
+
{`Run Dependency Tests`}
|
636
|
+
</div>
|
637
|
+
</div>
|
638
|
+
</div>
|
639
|
+
</div>
|
640
|
+
</div>
|
641
|
+
</PanelForm>
|
583
642
|
<PanelForm>
|
584
643
|
<div className="panel__content__form__section__header__label">
|
585
644
|
{`Project Type: ${prettyCONSTName(currentProjectType)} `}
|
@@ -628,7 +687,7 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
628
687
|
ProjectConfigurationEditorState,
|
629
688
|
);
|
630
689
|
const projectType =
|
631
|
-
configState.
|
690
|
+
configState.currentProjectConfiguration.projectType ?? ProjectType.MANAGED;
|
632
691
|
const sdlcState = editorStore.sdlcState;
|
633
692
|
const isReadOnly = editorStore.isInViewerMode;
|
634
693
|
const selectedTab = configState.selectedTab;
|
@@ -852,6 +911,7 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
852
911
|
{selectedTab === CONFIGURATION_EDITOR_TAB.ADVANCED && (
|
853
912
|
<ProjectAdvancedEditor
|
854
913
|
projectConfig={currentProjectConfiguration}
|
914
|
+
configState={configState}
|
855
915
|
isReadOnly={isReadOnly}
|
856
916
|
/>
|
857
917
|
)}
|
@@ -126,6 +126,10 @@ export const ServiceExecutionQueryEditor = observer(
|
|
126
126
|
await flowResult(
|
127
127
|
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
128
128
|
setupQueryBuilderState: (): QueryBuilderState => {
|
129
|
+
const sourceInfo = {
|
130
|
+
service: service.path,
|
131
|
+
...editorStore.editorMode.getSourceInfo(),
|
132
|
+
};
|
129
133
|
const queryBuilderState = new ServiceQueryBuilderState(
|
130
134
|
embeddedQueryBuilderState.editorStore.applicationStore,
|
131
135
|
embeddedQueryBuilderState.editorStore.graphManagerState,
|
@@ -138,6 +142,7 @@ export const ServiceExecutionQueryEditor = observer(
|
|
138
142
|
undefined,
|
139
143
|
undefined,
|
140
144
|
embeddedQueryBuilderState.editorStore.applicationStore.config.options.queryBuilderConfig,
|
145
|
+
sourceInfo,
|
141
146
|
);
|
142
147
|
queryBuilderState.initializeWithQuery(
|
143
148
|
executionState.execution.func,
|
@@ -457,6 +462,10 @@ export const queryService = async (
|
|
457
462
|
execution instanceof MultiExecutionParameters
|
458
463
|
? execution.singleExecutionParameters[0]?.key
|
459
464
|
: undefined;
|
465
|
+
const sourceInfo = {
|
466
|
+
service: service.path,
|
467
|
+
...editorStore.editorMode.getSourceInfo(),
|
468
|
+
};
|
460
469
|
await flowResult(
|
461
470
|
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
462
471
|
setupQueryBuilderState: (): QueryBuilderState => {
|
@@ -469,6 +478,7 @@ export const queryService = async (
|
|
469
478
|
undefined,
|
470
479
|
undefined,
|
471
480
|
embeddedQueryBuilderState.editorStore.applicationStore.config.options.queryBuilderConfig,
|
481
|
+
sourceInfo,
|
472
482
|
);
|
473
483
|
if (execution) {
|
474
484
|
queryBuilderState.initializeWithQuery(execution.func);
|
@@ -380,6 +380,7 @@ export const queryClass = async (
|
|
380
380
|
embeddedQueryBuilderState.editorStore.applicationStore,
|
381
381
|
embeddedQueryBuilderState.editorStore.graphManagerState,
|
382
382
|
editorStore.applicationStore.config.options.queryBuilderConfig,
|
383
|
+
editorStore.editorMode.getSourceInfo(),
|
383
384
|
);
|
384
385
|
queryBuilderState.changeClass(_class);
|
385
386
|
queryBuilderState.propagateClassChange(_class);
|
@@ -14,6 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
import type { QuerySDLC } from '@finos/legend-query-builder';
|
17
18
|
import type { ProjectDependency } from '@finos/legend-server-sdlc';
|
18
19
|
|
19
20
|
export abstract class EditorMode {
|
@@ -32,6 +33,11 @@ export abstract class EditorMode {
|
|
32
33
|
|
33
34
|
abstract get isInitialized(): boolean;
|
34
35
|
|
36
|
+
/**
|
37
|
+
* Using information about the current project to generate source information
|
38
|
+
*/
|
39
|
+
abstract getSourceInfo(): QuerySDLC | undefined;
|
40
|
+
|
35
41
|
get supportSdlcOperations(): boolean {
|
36
42
|
return true;
|
37
43
|
}
|
@@ -26,6 +26,15 @@ import {
|
|
26
26
|
generateViewProjectByGAVRoute,
|
27
27
|
} from '../../__lib__/LegendStudioNavigation.js';
|
28
28
|
import { EditorMode } from './EditorMode.js';
|
29
|
+
import type { QuerySDLC } from '@finos/legend-query-builder';
|
30
|
+
|
31
|
+
export interface WorkspaceProjectQuerySDLC extends QuerySDLC {
|
32
|
+
projectId: string;
|
33
|
+
workspaceId: string;
|
34
|
+
WorkspaceType: string;
|
35
|
+
userId?: string;
|
36
|
+
source?: string;
|
37
|
+
}
|
29
38
|
|
30
39
|
export class StandardEditorMode extends EditorMode {
|
31
40
|
editorStore: EditorStore;
|
@@ -65,4 +74,21 @@ export class StandardEditorMode extends EditorMode {
|
|
65
74
|
this.editorStore.sdlcState.currentWorkspace,
|
66
75
|
);
|
67
76
|
}
|
77
|
+
|
78
|
+
getSourceInfo(): QuerySDLC | undefined {
|
79
|
+
if (this.isInitialized) {
|
80
|
+
const workspace = guaranteeNonNullable(
|
81
|
+
this.editorStore.sdlcState.currentWorkspace,
|
82
|
+
);
|
83
|
+
return {
|
84
|
+
projectId: this.editorStore.sdlcState.activeProject.projectId,
|
85
|
+
workspaceId: workspace.workspaceId,
|
86
|
+
WorkspaceType: workspace.workspaceType,
|
87
|
+
userId: workspace.userId,
|
88
|
+
source: workspace.source,
|
89
|
+
} as WorkspaceProjectQuerySDLC;
|
90
|
+
} else {
|
91
|
+
return undefined;
|
92
|
+
}
|
93
|
+
}
|
68
94
|
}
|
@@ -33,8 +33,9 @@ export class MappingExecutionQueryBuilderState extends QueryBuilderState {
|
|
33
33
|
graphManagerState: GraphManagerState,
|
34
34
|
mapping: Mapping,
|
35
35
|
config: QueryBuilderConfig | undefined,
|
36
|
+
sourceInfo?: object | undefined,
|
36
37
|
) {
|
37
|
-
super(applicationStore, graphManagerState, config);
|
38
|
+
super(applicationStore, graphManagerState, config, sourceInfo);
|
38
39
|
this.executionMapping = mapping;
|
39
40
|
this.executionContextState.mapping = mapping;
|
40
41
|
}
|
@@ -357,7 +357,13 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
357
357
|
this.currentProjectConfiguration.platformConfigurations,
|
358
358
|
);
|
359
359
|
}
|
360
|
-
|
360
|
+
if (
|
361
|
+
this.originalConfig.runDependencyTests !==
|
362
|
+
this.currentProjectConfiguration.runDependencyTests
|
363
|
+
) {
|
364
|
+
updateProjectConfigurationCommand.runDependencyTests =
|
365
|
+
this.currentProjectConfiguration.runDependencyTests;
|
366
|
+
}
|
361
367
|
updateProjectConfigurationCommand.projectDependenciesToAdd =
|
362
368
|
this.currentProjectConfiguration.projectDependencies.filter(
|
363
369
|
(dep) =>
|
@@ -28,6 +28,17 @@ import {
|
|
28
28
|
SNAPSHOT_VERSION_ALIAS,
|
29
29
|
} from '@finos/legend-server-depot';
|
30
30
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
31
|
+
import type { QuerySDLC } from '@finos/legend-query-builder';
|
32
|
+
|
33
|
+
export interface ProjectQuerySDLC extends QuerySDLC {
|
34
|
+
projectId: string;
|
35
|
+
}
|
36
|
+
|
37
|
+
export interface ProjectGAVQuerySDLC extends QuerySDLC {
|
38
|
+
groupId: string;
|
39
|
+
artifactId: string;
|
40
|
+
versionId: string;
|
41
|
+
}
|
31
42
|
|
32
43
|
export class ProjectViewerEditorMode extends EditorMode {
|
33
44
|
viewerStore: ProjectViewerStore;
|
@@ -93,4 +104,21 @@ export class ProjectViewerEditorMode extends EditorMode {
|
|
93
104
|
override get supportSdlcOperations(): boolean {
|
94
105
|
return !this.viewerStore.projectGAVCoordinates;
|
95
106
|
}
|
107
|
+
|
108
|
+
getSourceInfo(): QuerySDLC | undefined {
|
109
|
+
if (this.viewerStore.editorStore.sdlcState.currentProject) {
|
110
|
+
return {
|
111
|
+
projectId:
|
112
|
+
this.viewerStore.editorStore.sdlcState.currentProject.projectId,
|
113
|
+
} as ProjectQuerySDLC;
|
114
|
+
} else if (this.viewerStore.projectGAVCoordinates) {
|
115
|
+
return {
|
116
|
+
groupId: this.viewerStore.projectGAVCoordinates.groupId,
|
117
|
+
artifactId: this.viewerStore.projectGAVCoordinates.artifactId,
|
118
|
+
versionId: this.viewerStore.projectGAVCoordinates.versionId,
|
119
|
+
} as ProjectGAVQuerySDLC;
|
120
|
+
} else {
|
121
|
+
return undefined;
|
122
|
+
}
|
123
|
+
}
|
96
124
|
}
|
@@ -18,6 +18,12 @@ import type { ProjectDependency } from '@finos/legend-server-sdlc';
|
|
18
18
|
import { EditorMode } from '../editor/EditorMode.js';
|
19
19
|
import type { ShowcaseViewerStore } from './ShowcaseViewerStore.js';
|
20
20
|
import { generateShowcasePath } from '../../__lib__/LegendStudioNavigation.js';
|
21
|
+
import type { QuerySDLC } from '@finos/legend-query-builder';
|
22
|
+
import { returnUndefOnError } from '@finos/legend-shared';
|
23
|
+
|
24
|
+
export interface ShowcaseViewerQuerySDLC extends QuerySDLC {
|
25
|
+
showcasePath: string;
|
26
|
+
}
|
21
27
|
|
22
28
|
export class ShowcaseViewerEditorMode extends EditorMode {
|
23
29
|
readonly showcaseViewerStore: ShowcaseViewerStore;
|
@@ -48,4 +54,13 @@ export class ShowcaseViewerEditorMode extends EditorMode {
|
|
48
54
|
override get label(): string {
|
49
55
|
return 'Showcase View';
|
50
56
|
}
|
57
|
+
|
58
|
+
getSourceInfo(): ShowcaseViewerQuerySDLC | undefined {
|
59
|
+
return returnUndefOnError(
|
60
|
+
() =>
|
61
|
+
({
|
62
|
+
showcasePath: this.showcaseViewerStore.showcase.path,
|
63
|
+
}) as ShowcaseViewerQuerySDLC,
|
64
|
+
);
|
65
|
+
}
|
51
66
|
}
|