@finos/legend-application-studio 15.1.0 → 15.2.0
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/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +6 -6
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +3 -3
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +2 -2
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.d.ts +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.d.ts.map +1 -0
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.js +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +3 -12
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +103 -41
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +77 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +2 -5
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +2 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +7 -5
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +2 -2
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -7
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +7 -4
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +8 -2
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/EditorStore.d.ts +1 -9
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +3 -54
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts +28 -1
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +5 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +10 -6
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +9 -2
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +32 -2
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts +30 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js +49 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +2 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +6 -4
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +10 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +27 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +1 -3
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +1 -4
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/package.json +14 -14
- package/src/components/EditorComponentTestUtils.tsx +6 -12
- package/src/components/editor/edit-panel/FunctionEditor.tsx +9 -2
- package/src/components/editor/edit-panel/UnsupportedElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +1 -1
- package/src/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.tsx +0 -0
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +371 -172
- package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +278 -0
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +2 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +5 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +2 -9
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +4 -3
- package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx +1 -1
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +12 -5
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +3 -1
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +21 -12
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +7 -4
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +7 -4
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +9 -3
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +13 -1
- package/src/index.ts +6 -2
- package/src/stores/EditorStore.ts +2 -81
- package/src/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.ts +55 -0
- package/src/stores/editor/NewElementState.ts +8 -7
- package/src/stores/editor-state/ModelImporterState.ts +15 -11
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +47 -1
- package/src/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.ts +73 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +14 -4
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +64 -0
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +2 -9
- package/tsconfig.json +5 -3
- package/tsconfig.package.json +38 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.d.ts.map +0 -1
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js.map +0 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
ResizablePanelGroup,
|
|
19
|
+
ResizablePanel,
|
|
20
|
+
PanelHeaderActionItem,
|
|
21
|
+
PlusIcon,
|
|
22
|
+
ResizablePanelSplitter,
|
|
23
|
+
PanelTextEditor,
|
|
24
|
+
PanelForm,
|
|
25
|
+
ContextMenu,
|
|
26
|
+
MenuContent,
|
|
27
|
+
MenuContentItem,
|
|
28
|
+
DropdownMenu,
|
|
29
|
+
PanelListSelectorItem,
|
|
30
|
+
BlankPanelContent,
|
|
31
|
+
ResizablePanelSplitterLine,
|
|
32
|
+
Panel,
|
|
33
|
+
PanelHeader,
|
|
34
|
+
PanelContent,
|
|
35
|
+
} from '@finos/legend-art';
|
|
36
|
+
import {
|
|
37
|
+
type Mapper,
|
|
38
|
+
MapperPostProcessor,
|
|
39
|
+
TableNameMapper,
|
|
40
|
+
SchemaNameMapper,
|
|
41
|
+
} from '@finos/legend-graph';
|
|
42
|
+
import { observer } from 'mobx-react-lite';
|
|
43
|
+
import type { MapperPostProcessorEditorState } from '../../../../../stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js';
|
|
44
|
+
import {
|
|
45
|
+
mapperPostProcessor_addMapper,
|
|
46
|
+
mapperPostProcessor_deleteMapper,
|
|
47
|
+
mapper_setFrom,
|
|
48
|
+
mapper_setTo,
|
|
49
|
+
schemaNameMapper_setFrom,
|
|
50
|
+
schemaNameMapper_setTo,
|
|
51
|
+
} from '../../../../../stores/graphModifier/StoreRelational_GraphModifierHelper.js';
|
|
52
|
+
|
|
53
|
+
export const MapperPostProcessorEditor = observer(
|
|
54
|
+
(props: {
|
|
55
|
+
postProcessor: MapperPostProcessor;
|
|
56
|
+
isReadOnly: boolean;
|
|
57
|
+
postProcessorState: MapperPostProcessorEditorState;
|
|
58
|
+
}) => {
|
|
59
|
+
const { postProcessorState, isReadOnly, postProcessor } = props;
|
|
60
|
+
const selectedMapper = postProcessorState.selectedMapper;
|
|
61
|
+
|
|
62
|
+
const selectedSchemaNameMapper =
|
|
63
|
+
selectedMapper instanceof TableNameMapper
|
|
64
|
+
? selectedMapper.schema
|
|
65
|
+
: undefined;
|
|
66
|
+
|
|
67
|
+
const selectMapper = (val: Mapper): void => {
|
|
68
|
+
postProcessorState.setSelectedMapper(val);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const addSchemaMapper = (): void => {
|
|
72
|
+
mapperPostProcessor_addMapper(
|
|
73
|
+
postProcessor,
|
|
74
|
+
new SchemaNameMapper('', ''),
|
|
75
|
+
);
|
|
76
|
+
postProcessorState.setSelectedMapper(postProcessor.mappers.at(-1));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const addTableMapper = (): void => {
|
|
80
|
+
mapperPostProcessor_addMapper(
|
|
81
|
+
postProcessor,
|
|
82
|
+
new TableNameMapper('', '', new SchemaNameMapper('', '')),
|
|
83
|
+
);
|
|
84
|
+
postProcessorState.setSelectedMapper(postProcessor.mappers.at(-1));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const deleteMapper =
|
|
88
|
+
(mapper: Mapper): (() => void) =>
|
|
89
|
+
(): void => {
|
|
90
|
+
if (postProcessorState.postProcessor instanceof MapperPostProcessor) {
|
|
91
|
+
mapperPostProcessor_deleteMapper(
|
|
92
|
+
postProcessorState.postProcessor,
|
|
93
|
+
mapper,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (mapper === postProcessorState.selectedMapper) {
|
|
98
|
+
postProcessorState.setSelectedMapper(undefined);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const mappers = postProcessor.mappers;
|
|
103
|
+
|
|
104
|
+
const isSchemaMapperDuplicated = (val: Mapper): boolean =>
|
|
105
|
+
mappers.filter(
|
|
106
|
+
(mapper) =>
|
|
107
|
+
mapper.from === val.from &&
|
|
108
|
+
mapper.to === val.to &&
|
|
109
|
+
val instanceof SchemaNameMapper &&
|
|
110
|
+
mapper instanceof SchemaNameMapper,
|
|
111
|
+
).length >= 2;
|
|
112
|
+
|
|
113
|
+
const isTableMapperDuplicated = (val: Mapper): boolean =>
|
|
114
|
+
mappers
|
|
115
|
+
.filter(
|
|
116
|
+
(mapper) =>
|
|
117
|
+
val instanceof TableNameMapper && mapper instanceof TableNameMapper,
|
|
118
|
+
)
|
|
119
|
+
.filter(
|
|
120
|
+
(mapper) =>
|
|
121
|
+
(mapper as TableNameMapper).schema.from ===
|
|
122
|
+
(val as TableNameMapper).schema.from &&
|
|
123
|
+
(mapper as TableNameMapper).schema.from ===
|
|
124
|
+
(val as TableNameMapper).schema.from &&
|
|
125
|
+
(mapper as TableNameMapper).from ===
|
|
126
|
+
(val as TableNameMapper).from &&
|
|
127
|
+
(mapper as TableNameMapper).from === (val as TableNameMapper).from,
|
|
128
|
+
).length >= 2;
|
|
129
|
+
|
|
130
|
+
const isMapperDuplicated = (val: Mapper): boolean =>
|
|
131
|
+
isSchemaMapperDuplicated(val) || isTableMapperDuplicated(val);
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<ResizablePanelGroup orientation="horizontal">
|
|
135
|
+
<ResizablePanel>
|
|
136
|
+
<ResizablePanelGroup orientation="vertical">
|
|
137
|
+
<ResizablePanel size={170} minSize={70}>
|
|
138
|
+
<Panel>
|
|
139
|
+
<PanelHeader title="mapper">
|
|
140
|
+
<DropdownMenu
|
|
141
|
+
disabled={isReadOnly}
|
|
142
|
+
content={
|
|
143
|
+
<MenuContent>
|
|
144
|
+
<MenuContentItem onClick={addSchemaMapper}>
|
|
145
|
+
New Schema Mapper
|
|
146
|
+
</MenuContentItem>
|
|
147
|
+
<MenuContentItem onClick={addTableMapper}>
|
|
148
|
+
New Table Mapper
|
|
149
|
+
</MenuContentItem>
|
|
150
|
+
</MenuContent>
|
|
151
|
+
}
|
|
152
|
+
menuProps={{
|
|
153
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
|
154
|
+
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
|
155
|
+
elevation: 7,
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<PanelHeaderActionItem
|
|
159
|
+
disabled={isReadOnly}
|
|
160
|
+
title="Create Mapper"
|
|
161
|
+
>
|
|
162
|
+
<PlusIcon />
|
|
163
|
+
</PanelHeaderActionItem>
|
|
164
|
+
</DropdownMenu>
|
|
165
|
+
</PanelHeader>
|
|
166
|
+
<PanelContent>
|
|
167
|
+
{mappers.map((mapper) => (
|
|
168
|
+
<ContextMenu
|
|
169
|
+
key={mapper._UUID}
|
|
170
|
+
disabled={isReadOnly}
|
|
171
|
+
content={
|
|
172
|
+
<MenuContent>
|
|
173
|
+
<MenuContentItem
|
|
174
|
+
disabled={isReadOnly}
|
|
175
|
+
onClick={deleteMapper(mapper)}
|
|
176
|
+
>
|
|
177
|
+
Delete
|
|
178
|
+
</MenuContentItem>
|
|
179
|
+
</MenuContent>
|
|
180
|
+
}
|
|
181
|
+
menuProps={{ elevation: 7 }}
|
|
182
|
+
>
|
|
183
|
+
<PanelListSelectorItem
|
|
184
|
+
title={
|
|
185
|
+
mapper instanceof TableNameMapper
|
|
186
|
+
? 'Table Mapper'
|
|
187
|
+
: 'Schema Mapper'
|
|
188
|
+
}
|
|
189
|
+
validationErrorMessage={
|
|
190
|
+
isMapperDuplicated(mapper)
|
|
191
|
+
? 'Mappers have the same values'
|
|
192
|
+
: undefined
|
|
193
|
+
}
|
|
194
|
+
isSelected={
|
|
195
|
+
mapper === postProcessorState.selectedMapper
|
|
196
|
+
}
|
|
197
|
+
onSelect={() => selectMapper(mapper)}
|
|
198
|
+
/>
|
|
199
|
+
</ContextMenu>
|
|
200
|
+
))}
|
|
201
|
+
</PanelContent>{' '}
|
|
202
|
+
</Panel>
|
|
203
|
+
</ResizablePanel>
|
|
204
|
+
<ResizablePanelSplitter>
|
|
205
|
+
<ResizablePanelSplitterLine color="var(--color-dark-grey-200)" />
|
|
206
|
+
</ResizablePanelSplitter>
|
|
207
|
+
<ResizablePanel>
|
|
208
|
+
<Panel>
|
|
209
|
+
<PanelHeader
|
|
210
|
+
title={
|
|
211
|
+
postProcessorState.selectedMapper instanceof TableNameMapper
|
|
212
|
+
? 'Table Mapper'
|
|
213
|
+
: 'Schema Mapper'
|
|
214
|
+
}
|
|
215
|
+
></PanelHeader>
|
|
216
|
+
<PanelContent>
|
|
217
|
+
{!selectedMapper && (
|
|
218
|
+
<BlankPanelContent>
|
|
219
|
+
{!mappers.length
|
|
220
|
+
? 'Add a mapper'
|
|
221
|
+
: 'Select a mapper to view'}
|
|
222
|
+
</BlankPanelContent>
|
|
223
|
+
)}
|
|
224
|
+
{selectedMapper && (
|
|
225
|
+
<PanelForm>
|
|
226
|
+
<PanelTextEditor
|
|
227
|
+
isReadOnly={isReadOnly}
|
|
228
|
+
value={selectedMapper.from}
|
|
229
|
+
name="From"
|
|
230
|
+
update={(value: string | undefined): void =>
|
|
231
|
+
mapper_setFrom(selectedMapper, value ?? '')
|
|
232
|
+
}
|
|
233
|
+
/>
|
|
234
|
+
<PanelTextEditor
|
|
235
|
+
isReadOnly={isReadOnly}
|
|
236
|
+
value={selectedMapper.to}
|
|
237
|
+
name="To"
|
|
238
|
+
update={(value: string | undefined): void =>
|
|
239
|
+
mapper_setTo(selectedMapper, value ?? '')
|
|
240
|
+
}
|
|
241
|
+
/>
|
|
242
|
+
{selectedSchemaNameMapper && (
|
|
243
|
+
<>
|
|
244
|
+
<PanelTextEditor
|
|
245
|
+
isReadOnly={isReadOnly}
|
|
246
|
+
value={selectedSchemaNameMapper.from}
|
|
247
|
+
name="Schema - From"
|
|
248
|
+
update={(value: string | undefined): void => {
|
|
249
|
+
schemaNameMapper_setFrom(
|
|
250
|
+
selectedSchemaNameMapper,
|
|
251
|
+
value ?? '',
|
|
252
|
+
);
|
|
253
|
+
}}
|
|
254
|
+
/>
|
|
255
|
+
<PanelTextEditor
|
|
256
|
+
isReadOnly={isReadOnly}
|
|
257
|
+
value={selectedSchemaNameMapper.to}
|
|
258
|
+
name="Schema - To"
|
|
259
|
+
update={(value: string | undefined): void =>
|
|
260
|
+
schemaNameMapper_setTo(
|
|
261
|
+
selectedSchemaNameMapper,
|
|
262
|
+
value ?? '',
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
/>
|
|
266
|
+
</>
|
|
267
|
+
)}
|
|
268
|
+
</PanelForm>
|
|
269
|
+
)}
|
|
270
|
+
</PanelContent>
|
|
271
|
+
</Panel>
|
|
272
|
+
</ResizablePanel>
|
|
273
|
+
</ResizablePanelGroup>
|
|
274
|
+
</ResizablePanel>
|
|
275
|
+
</ResizablePanelGroup>
|
|
276
|
+
);
|
|
277
|
+
},
|
|
278
|
+
);
|
|
@@ -157,7 +157,8 @@ export const DataElementReferenceDataEditor = observer(
|
|
|
157
157
|
const dataElement =
|
|
158
158
|
dataElementReferenceState.embeddedData.dataElement.value;
|
|
159
159
|
const editorStore = dataElementReferenceState.editorStore;
|
|
160
|
-
const options =
|
|
160
|
+
const options =
|
|
161
|
+
editorStore.graphManagerState.usableDataElements.map(buildElementOption);
|
|
161
162
|
const selectedOption = buildElementOption(dataElement);
|
|
162
163
|
const onDataElementChange = (val: {
|
|
163
164
|
label: string;
|
|
@@ -89,7 +89,11 @@ const EnumerationMappingSourceSelectorModal = observer(
|
|
|
89
89
|
),
|
|
90
90
|
]
|
|
91
91
|
.map(buildElementOption)
|
|
92
|
-
.concat(
|
|
92
|
+
.concat(
|
|
93
|
+
editorStore.graphManagerState.usableEnumerations.map(
|
|
94
|
+
buildElementOption,
|
|
95
|
+
),
|
|
96
|
+
);
|
|
93
97
|
|
|
94
98
|
const sourceSelectorRef = useRef<SelectComponent>(null);
|
|
95
99
|
const filterOption = createFilter({
|
|
@@ -363,7 +363,7 @@ export const InstanceSetImplementationSourceExplorer = observer(
|
|
|
363
363
|
{isUnsupported && (
|
|
364
364
|
<UnsupportedEditorPanel
|
|
365
365
|
isReadOnly={isReadOnly}
|
|
366
|
-
text=
|
|
366
|
+
text="Can't display class mapping source in form mode"
|
|
367
367
|
></UnsupportedEditorPanel>
|
|
368
368
|
)}
|
|
369
369
|
{sourceElementForSourceSelectorModal !== undefined && (
|
|
@@ -573,7 +573,7 @@ export const InstanceSetImplementationEditor = observer(
|
|
|
573
573
|
{isUnsupported && (
|
|
574
574
|
<UnsupportedEditorPanel
|
|
575
575
|
isReadOnly={isReadOnly}
|
|
576
|
-
text=
|
|
576
|
+
text="Can't display class mapping in form mode"
|
|
577
577
|
></UnsupportedEditorPanel>
|
|
578
578
|
)}
|
|
579
579
|
</div>
|
|
@@ -128,22 +128,15 @@ export const InstanceSetImplementationSourceSelectorModal = observer(
|
|
|
128
128
|
const editorStore = useEditorStore();
|
|
129
129
|
const applicationStore = useApplicationStore();
|
|
130
130
|
const options = (
|
|
131
|
-
editorStore.graphManagerState.
|
|
131
|
+
editorStore.graphManagerState.usableClasses as MappingElementSource[]
|
|
132
132
|
)
|
|
133
|
-
.concat(
|
|
134
|
-
editorStore.graphManagerState.graph.dependencyManager
|
|
135
|
-
.classes as MappingElementSource[],
|
|
136
|
-
)
|
|
137
133
|
.concat(
|
|
138
134
|
editorStore.graphManagerState.graph.ownFlatDatas.flatMap(
|
|
139
135
|
getAllRecordTypes,
|
|
140
136
|
),
|
|
141
137
|
)
|
|
142
138
|
.concat(
|
|
143
|
-
editorStore.graphManagerState.
|
|
144
|
-
.concat(
|
|
145
|
-
editorStore.graphManagerState.graph.dependencyManager.databases,
|
|
146
|
-
)
|
|
139
|
+
editorStore.graphManagerState.usableDatabases
|
|
147
140
|
.flatMap((e) =>
|
|
148
141
|
e.schemas.flatMap((schema) =>
|
|
149
142
|
(schema.tables as (Table | View)[]).concat(schema.views),
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
} from '@finos/legend-graph';
|
|
46
46
|
import { BASIC_SET_IMPLEMENTATION_TYPE } from '../../../../stores/shared/ModelUtil.js';
|
|
47
47
|
import {
|
|
48
|
+
buildElementOption,
|
|
48
49
|
getPackageableElementOptionFormatter,
|
|
49
50
|
type PackageableElementOption,
|
|
50
51
|
} from '@finos/legend-application';
|
|
@@ -77,9 +78,9 @@ export const NewMappingElementModal = observer(() => {
|
|
|
77
78
|
// Target
|
|
78
79
|
const targetSelectorRef = useRef<SelectComponent>(null);
|
|
79
80
|
const options: PackageableElementOption<PackageableElement>[] = [
|
|
80
|
-
...editorStore.
|
|
81
|
-
...editorStore.
|
|
82
|
-
...editorStore.
|
|
81
|
+
...editorStore.graphManagerState.usableEnumerations.map(buildElementOption),
|
|
82
|
+
...editorStore.graphManagerState.usableAssociations.map(buildElementOption),
|
|
83
|
+
...editorStore.graphManagerState.usableClasses.map(buildElementOption),
|
|
83
84
|
].sort(compareLabelFn);
|
|
84
85
|
const filterOption = createFilter({
|
|
85
86
|
ignoreCase: true,
|
package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
generateColumnTypeLabel,
|
|
37
37
|
renderColumnTypeIcon,
|
|
38
|
-
} from '
|
|
38
|
+
} from '../../connection-editor/DatabaseEditorHelper.js';
|
|
39
39
|
import {
|
|
40
40
|
type Type,
|
|
41
41
|
type Table,
|
|
@@ -68,7 +68,10 @@ import {
|
|
|
68
68
|
validate_PureExecutionMapping,
|
|
69
69
|
} from '@finos/legend-graph';
|
|
70
70
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
71
|
-
import
|
|
71
|
+
import {
|
|
72
|
+
buildElementOption,
|
|
73
|
+
type PackageableElementOption,
|
|
74
|
+
} from '@finos/legend-application';
|
|
72
75
|
|
|
73
76
|
const PureExecutionContextConfigurationEditor = observer(
|
|
74
77
|
(props: {
|
|
@@ -87,7 +90,8 @@ const PureExecutionContextConfigurationEditor = observer(
|
|
|
87
90
|
executionContext.mapping.value,
|
|
88
91
|
);
|
|
89
92
|
const mapping = executionContext.mapping.value;
|
|
90
|
-
const mappingOptions =
|
|
93
|
+
const mappingOptions =
|
|
94
|
+
editorStore.graphManagerState.usableMappings.map(buildElementOption);
|
|
91
95
|
const noMappingLabel = (
|
|
92
96
|
<div
|
|
93
97
|
className="service-execution-editor__configuration__mapping-option--empty"
|
|
@@ -46,13 +46,18 @@ import type { EmbeddedDataTypeOption } from '../../../../../stores/editor-state/
|
|
|
46
46
|
import { EmbeddedDataEditor } from '../../data-editor/EmbeddedDataEditor.js';
|
|
47
47
|
import { EmbeddedDataType } from '../../../../../stores/editor-state/ExternalFormatState.js';
|
|
48
48
|
import { flowResult } from 'mobx';
|
|
49
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
buildElementOption,
|
|
51
|
+
useApplicationStore,
|
|
52
|
+
} from '@finos/legend-application';
|
|
50
53
|
import { prettyCONSTName } from '@finos/legend-shared';
|
|
51
54
|
import type { DSLData_LegendStudioApplicationPlugin_Extension } from '../../../../../stores/DSLData_LegendStudioApplicationPlugin_Extension.js';
|
|
55
|
+
import { useEditorStore } from '../../../EditorStoreProvider.js';
|
|
52
56
|
|
|
53
57
|
export const ConnectionTestDataEditor = observer(
|
|
54
58
|
(props: { connectionTestDataState: ConnectionTestDataState }) => {
|
|
55
59
|
const { connectionTestDataState } = props;
|
|
60
|
+
const applicationStore = useApplicationStore();
|
|
56
61
|
const isReadOnly =
|
|
57
62
|
connectionTestDataState.testDataState.testSuiteState.testableState
|
|
58
63
|
.serviceEditorState.isReadOnly;
|
|
@@ -66,10 +71,10 @@ export const ConnectionTestDataEditor = observer(
|
|
|
66
71
|
};
|
|
67
72
|
const generateTestData = (): void => {
|
|
68
73
|
flowResult(connectionTestDataState.generateTestData()).catch(
|
|
69
|
-
|
|
70
|
-
.alertUnhandledError,
|
|
74
|
+
applicationStore.alertUnhandledError,
|
|
71
75
|
);
|
|
72
76
|
};
|
|
77
|
+
|
|
73
78
|
return (
|
|
74
79
|
<div className="service-test-data-editor">
|
|
75
80
|
<div className="service-test-suite-editor__header">
|
|
@@ -209,7 +214,9 @@ const ConnectionTestDataItem = observer(
|
|
|
209
214
|
export const NewConnectionDataModal = observer(
|
|
210
215
|
(props: { testDataState: ServiceTestDataState }) => {
|
|
211
216
|
const { testDataState } = props;
|
|
212
|
-
const
|
|
217
|
+
const editorStore = useEditorStore();
|
|
218
|
+
const dataElementOptions =
|
|
219
|
+
editorStore.graphManagerState.usableDataElements.map(buildElementOption);
|
|
213
220
|
const newConnectionState = testDataState.newConnectionDataState;
|
|
214
221
|
const dataElement = newConnectionState.dataElement;
|
|
215
222
|
const selectedDataElement = dataElement
|
|
@@ -271,7 +278,7 @@ export const NewConnectionDataModal = observer(
|
|
|
271
278
|
value: newConnectionState.embeddedDataType.value,
|
|
272
279
|
}
|
|
273
280
|
: undefined;
|
|
274
|
-
const extraOptionTypes =
|
|
281
|
+
const extraOptionTypes = editorStore.pluginManager
|
|
275
282
|
.getApplicationPlugins()
|
|
276
283
|
.flatMap(
|
|
277
284
|
(plugin) =>
|
|
@@ -89,6 +89,7 @@ import {
|
|
|
89
89
|
getClassPropertyType,
|
|
90
90
|
} from '../../../../stores/shared/ModelUtil.js';
|
|
91
91
|
import {
|
|
92
|
+
buildElementOption,
|
|
92
93
|
useApplicationNavigationContext,
|
|
93
94
|
type PackageableElementOption,
|
|
94
95
|
} from '@finos/legend-application';
|
|
@@ -119,7 +120,8 @@ const AssociationPropertyBasicEditor = observer(
|
|
|
119
120
|
// Generic Type
|
|
120
121
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
121
122
|
// TODO: make this so that association can only refer to classes from the same graph space
|
|
122
|
-
const propertyTypeOptions =
|
|
123
|
+
const propertyTypeOptions =
|
|
124
|
+
editorStore.graphManagerState.usableClasses.map(buildElementOption);
|
|
123
125
|
const propertyType = property.genericType.value.rawType;
|
|
124
126
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
125
127
|
const filterOption = createFilter({
|
|
@@ -96,6 +96,7 @@ import {
|
|
|
96
96
|
import { StudioLambdaEditor } from '../../../shared/StudioLambdaEditor.js';
|
|
97
97
|
import {
|
|
98
98
|
ApplicationNavigationContextData,
|
|
99
|
+
buildElementOption,
|
|
99
100
|
getPackageableElementOptionFormatter,
|
|
100
101
|
useApplicationNavigationContext,
|
|
101
102
|
useApplicationStore,
|
|
@@ -167,7 +168,10 @@ const PropertyBasicEditor = observer(
|
|
|
167
168
|
};
|
|
168
169
|
// Generic Type
|
|
169
170
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
170
|
-
const propertyTypeOptions =
|
|
171
|
+
const propertyTypeOptions =
|
|
172
|
+
editorStore.graphManagerState.usableClassPropertyTypes.map(
|
|
173
|
+
buildElementOption,
|
|
174
|
+
);
|
|
171
175
|
const propertyType = property.genericType.value.rawType;
|
|
172
176
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
173
177
|
const filterOption = createFilter({
|
|
@@ -492,7 +496,10 @@ const DerivedPropertyBasicEditor = observer(
|
|
|
492
496
|
property_setName(derivedProperty, event.target.value);
|
|
493
497
|
// Generic Type
|
|
494
498
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
495
|
-
const propertyTypeOptions =
|
|
499
|
+
const propertyTypeOptions =
|
|
500
|
+
editorStore.graphManagerState.usableClassPropertyTypes.map(
|
|
501
|
+
buildElementOption,
|
|
502
|
+
);
|
|
496
503
|
const propertyType = derivedProperty.genericType.value.rawType;
|
|
497
504
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
498
505
|
const filterOption = createFilter({
|
|
@@ -998,16 +1005,18 @@ const SuperTypeEditor = observer(
|
|
|
998
1005
|
const { superType, _class, deleteSuperType, isReadOnly } = props;
|
|
999
1006
|
const editorStore = useEditorStore();
|
|
1000
1007
|
// Type
|
|
1001
|
-
const superTypeOptions = editorStore.
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1008
|
+
const superTypeOptions = editorStore.graphManagerState.usableClasses
|
|
1009
|
+
.filter(
|
|
1010
|
+
(c) =>
|
|
1011
|
+
c instanceof Class &&
|
|
1012
|
+
// Exclude current class
|
|
1013
|
+
c !== _class &&
|
|
1014
|
+
// Exclude super types of the class
|
|
1015
|
+
!getAllSuperclasses(_class).includes(c) &&
|
|
1016
|
+
// Ensure there is no loop (might be expensive)
|
|
1017
|
+
!getAllSuperclasses(c).includes(_class),
|
|
1018
|
+
)
|
|
1019
|
+
.map(buildElementOption);
|
|
1011
1020
|
|
|
1012
1021
|
// Drag and Drop
|
|
1013
1022
|
const handleHover = useCallback(
|
|
@@ -38,7 +38,10 @@ import {
|
|
|
38
38
|
annotatedElement_swapStereotypes,
|
|
39
39
|
stereotypeReference_setValue,
|
|
40
40
|
} from '../../../../stores/graphModifier/DomainGraphModifierHelper.js';
|
|
41
|
-
import
|
|
41
|
+
import {
|
|
42
|
+
buildElementOption,
|
|
43
|
+
type PackageableElementOption,
|
|
44
|
+
} from '@finos/legend-application';
|
|
42
45
|
import { useDrop, useDrag } from 'react-dnd';
|
|
43
46
|
|
|
44
47
|
interface StereotypeOption {
|
|
@@ -81,9 +84,9 @@ export const StereotypeSelector = observer(
|
|
|
81
84
|
const editorStore = useEditorStore();
|
|
82
85
|
|
|
83
86
|
// Profile
|
|
84
|
-
const profileOptions = editorStore.
|
|
85
|
-
(
|
|
86
|
-
|
|
87
|
+
const profileOptions = editorStore.graphManagerState.usableProfiles
|
|
88
|
+
.map(buildElementOption)
|
|
89
|
+
.filter((p) => p.value.p_stereotypes.length);
|
|
87
90
|
const filterOption = createFilter({
|
|
88
91
|
ignoreCase: true,
|
|
89
92
|
ignoreAccents: false,
|
|
@@ -42,7 +42,10 @@ import {
|
|
|
42
42
|
taggedValue_setTag,
|
|
43
43
|
annotatedElement_swapTaggedValues,
|
|
44
44
|
} from '../../../../stores/graphModifier/DomainGraphModifierHelper.js';
|
|
45
|
-
import
|
|
45
|
+
import {
|
|
46
|
+
buildElementOption,
|
|
47
|
+
type PackageableElementOption,
|
|
48
|
+
} from '@finos/legend-application';
|
|
46
49
|
import { useDrop, useDrag } from 'react-dnd';
|
|
47
50
|
|
|
48
51
|
interface TagOption {
|
|
@@ -88,9 +91,9 @@ export const TaggedValueEditor = observer(
|
|
|
88
91
|
HTMLTextAreaElement | HTMLInputElement
|
|
89
92
|
> = (event) => taggedValue_setValue(taggedValue, event.target.value);
|
|
90
93
|
// Profile
|
|
91
|
-
const profileOptions = editorStore.
|
|
92
|
-
(
|
|
93
|
-
|
|
94
|
+
const profileOptions = editorStore.graphManagerState.usableProfiles
|
|
95
|
+
.map(buildElementOption)
|
|
96
|
+
.filter((p) => p.value.p_tags.length);
|
|
94
97
|
const profileFilterOption = createFilter({
|
|
95
98
|
ignoreCase: true,
|
|
96
99
|
ignoreAccents: false,
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
import type { FileGenerationTypeOption } from '../../../stores/editor-state/GraphGenerationState.js';
|
|
42
42
|
import { flowResult } from 'mobx';
|
|
43
43
|
import {
|
|
44
|
+
buildElementOption,
|
|
44
45
|
getPackageableElementOptionFormatter,
|
|
45
46
|
useApplicationStore,
|
|
46
47
|
type PackageableElementOption,
|
|
@@ -164,7 +165,8 @@ const NewRuntimeDriverEditor = observer(() => {
|
|
|
164
165
|
);
|
|
165
166
|
// mapping
|
|
166
167
|
const mapping = newRuntimeDriver.mapping;
|
|
167
|
-
const mappingOptions =
|
|
168
|
+
const mappingOptions =
|
|
169
|
+
editorStore.graphManagerState.usableMappings.map(buildElementOption);
|
|
168
170
|
const selectedMappingOption = { label: mapping?.path ?? '', value: mapping };
|
|
169
171
|
const onMappingSelectionChange = (
|
|
170
172
|
val: PackageableElementOption<Mapping>,
|
|
@@ -216,7 +218,10 @@ const NewPureModelConnectionDriverEditor = observer(
|
|
|
216
218
|
}): void => newConnectionDriver.setStore(val.value);
|
|
217
219
|
// class
|
|
218
220
|
const _class = newConnectionValueDriver.class;
|
|
219
|
-
const classOptions = editorStore.
|
|
221
|
+
const classOptions = editorStore.graphManagerState.usableClasses
|
|
222
|
+
.map(buildElementOption)
|
|
223
|
+
.slice()
|
|
224
|
+
.sort(compareLabelFn);
|
|
220
225
|
const selectedClassOption = _class
|
|
221
226
|
? { label: _class.path, value: _class }
|
|
222
227
|
: null;
|
|
@@ -321,7 +326,8 @@ const NewServiceDriverEditor = observer(() => {
|
|
|
321
326
|
editorStore.newElementState.getNewElementDriver(NewServiceDriver);
|
|
322
327
|
// mapping
|
|
323
328
|
const currentMappingOption = newServiceDriver.mappingOption;
|
|
324
|
-
const mappingOptions =
|
|
329
|
+
const mappingOptions =
|
|
330
|
+
editorStore.graphManagerState.usableMappings.map(buildElementOption);
|
|
325
331
|
const onMappingChange = (
|
|
326
332
|
val: PackageableElementOption<Mapping> | null,
|
|
327
333
|
): void => {
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
AssertFail,
|
|
40
40
|
EqualToJsonAssertFail,
|
|
41
|
+
PackageableElement,
|
|
41
42
|
TestError,
|
|
42
43
|
} from '@finos/legend-graph';
|
|
43
44
|
import { type GeneratorFn, isNonNullable } from '@finos/legend-shared';
|
|
@@ -58,6 +59,7 @@ import {
|
|
|
58
59
|
} from '../../../../stores/sidebar-state/testable/GlobalTestRunnerState.js';
|
|
59
60
|
import { LEGEND_STUDIO_TEST_ID } from '../../../LegendStudioTestID.js';
|
|
60
61
|
import { TextDiffView } from '../../../shared/DiffView.js';
|
|
62
|
+
import { getElementTypeIcon } from '../../../shared/ElementIconUtils.js';
|
|
61
63
|
import { StudioTextInputEditor } from '../../../shared/StudioTextInputEditor.js';
|
|
62
64
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
63
65
|
|
|
@@ -249,6 +251,7 @@ const TestableTreeNodeContainer: React.FC<
|
|
|
249
251
|
> = (props) => {
|
|
250
252
|
const { node, level, stepPaddingInRem, onNodeSelect } = props;
|
|
251
253
|
const { treeData, testableState, globalTestRunnerState } = props.innerProps;
|
|
254
|
+
const editorStore = useEditorStore();
|
|
252
255
|
const results = testableState.results;
|
|
253
256
|
const expandIcon =
|
|
254
257
|
node instanceof AssertionTestTreeNodeData ? (
|
|
@@ -259,7 +262,16 @@ const TestableTreeNodeContainer: React.FC<
|
|
|
259
262
|
<ChevronRightIcon />
|
|
260
263
|
);
|
|
261
264
|
const nodeIcon =
|
|
262
|
-
node instanceof TestableTreeNodeData
|
|
265
|
+
node instanceof TestableTreeNodeData
|
|
266
|
+
? node.testableMetadata.testable instanceof PackageableElement
|
|
267
|
+
? getElementTypeIcon(
|
|
268
|
+
editorStore,
|
|
269
|
+
editorStore.graphState.getPackageableElementType(
|
|
270
|
+
node.testableMetadata.testable,
|
|
271
|
+
),
|
|
272
|
+
)
|
|
273
|
+
: null
|
|
274
|
+
: null;
|
|
263
275
|
const resultIcon = getTestableResultIcon(
|
|
264
276
|
getNodeTestableResult(
|
|
265
277
|
node,
|