@finos/legend-application-studio 13.0.1 → 13.1.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/editor/command/project-search.css +1 -1
- package/lib/components/editor/command/project-search.css.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js +11 -3
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +41 -34
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +35 -54
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +2 -2
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.js +11 -20
- package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +4 -8
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +3 -7
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +2 -2
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.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 +2 -9
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -4
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +3 -10
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +4 -10
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +7 -9
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +9 -12
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +12 -10
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +5 -7
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +3 -4
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.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 +3 -5
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +9 -6
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.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 +4 -8
- 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 +157 -57
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +39 -21
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +62 -9
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +4 -8
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +7 -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 +33 -5
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +7 -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 +35 -7
- 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 +4 -4
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +8 -15
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.d.ts +1 -0
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.js +2 -2
- package/lib/components/shared/StudioLambdaEditor.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 +5 -5
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +7 -7
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +8 -2
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +0 -2
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js +1 -8
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +2 -4
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +4 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +31 -15
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +6 -3
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +30 -17
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +10 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js +31 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -1
- package/lib/stores/shared/DnDUtil.d.ts +1 -2
- package/lib/stores/shared/DnDUtil.d.ts.map +1 -1
- package/lib/stores/shared/DnDUtil.js +0 -2
- package/lib/stores/shared/DnDUtil.js.map +1 -1
- package/package.json +13 -13
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +13 -2
- package/src/components/editor/edit-panel/FunctionEditor.tsx +220 -152
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +154 -184
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +4 -5
- package/src/components/editor/edit-panel/RuntimeEditor.tsx +89 -90
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +57 -40
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +1 -1
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +50 -45
- package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +36 -32
- package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +46 -41
- package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +9 -7
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +18 -21
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +39 -29
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +39 -39
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +82 -58
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +66 -50
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +48 -45
- package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +12 -8
- package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -3
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +75 -72
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +63 -43
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +55 -38
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +813 -499
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +209 -113
- package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +184 -52
- package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +62 -39
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +137 -52
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +171 -88
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +4 -2
- package/src/components/editor/side-bar/Explorer.tsx +13 -20
- package/src/components/shared/StudioLambdaEditor.tsx +3 -0
- package/src/components/workspace-setup/WorkspaceSetup.tsx +1 -1
- package/src/stores/EditorStore.ts +7 -6
- package/src/stores/editor/NewElementState.ts +8 -2
- package/src/stores/editor-state/GenerationSpecificationEditorState.ts +1 -15
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +2 -3
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +46 -29
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +39 -20
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +1 -1
- package/src/stores/graphModifier/DomainGraphModifierHelper.ts +92 -0
- package/src/stores/shared/DnDUtil.ts +0 -2
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
MenuContent,
|
|
34
34
|
CaretDownIcon,
|
|
35
35
|
MenuContentItem,
|
|
36
|
+
PauseCircleIcon,
|
|
36
37
|
} from '@finos/legend-art';
|
|
37
38
|
import { debounce } from '@finos/legend-shared';
|
|
38
39
|
import { flowResult } from 'mobx';
|
|
@@ -251,10 +252,16 @@ export const ServiceExecutionQueryEditor = observer(
|
|
|
251
252
|
const importQuery = (): void => {
|
|
252
253
|
queryState.setOpenQueryImporter(true);
|
|
253
254
|
};
|
|
254
|
-
|
|
255
|
-
const
|
|
255
|
+
|
|
256
|
+
const runQuery = applicationStore.guardUnhandledError(() =>
|
|
256
257
|
flowResult(executionState.handleExecute()),
|
|
257
258
|
);
|
|
259
|
+
|
|
260
|
+
const cancelQuery = (): void => {
|
|
261
|
+
executionState.setIsRunningQuery(false);
|
|
262
|
+
executionState.setQueryRunPromise(undefined);
|
|
263
|
+
};
|
|
264
|
+
|
|
258
265
|
const generatePlan = applicationStore.guardUnhandledError(() =>
|
|
259
266
|
flowResult(executionState.generatePlan(false)),
|
|
260
267
|
);
|
|
@@ -287,55 +294,68 @@ export const ServiceExecutionQueryEditor = observer(
|
|
|
287
294
|
>
|
|
288
295
|
<ArrowCircleDownIcon />
|
|
289
296
|
</button>
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
{executionState.isRunningQuery ? (
|
|
298
|
+
<button
|
|
299
|
+
className="service-editor__execution__stop-btn"
|
|
300
|
+
onClick={cancelQuery}
|
|
301
|
+
tabIndex={-1}
|
|
302
|
+
>
|
|
303
|
+
<div className="btn--dark btn--caution service-editor__execution__stop-btn__label">
|
|
304
|
+
<PauseCircleIcon className="service-editor__execution__stop-btn__label__icon" />
|
|
305
|
+
<div className="service-editor__execution__stop-btn__label__title">
|
|
306
|
+
Stop
|
|
307
|
+
</div>
|
|
301
308
|
</div>
|
|
302
|
-
</
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<MenuContentItem
|
|
311
|
-
className="service-editor__execution__execute-btn__option"
|
|
312
|
-
onClick={generatePlan}
|
|
313
|
-
>
|
|
314
|
-
Generate Plan
|
|
315
|
-
</MenuContentItem>
|
|
316
|
-
<MenuContentItem
|
|
317
|
-
className="service-editor__execution__execute-btn__option"
|
|
318
|
-
onClick={debugPlanGeneration}
|
|
319
|
-
>
|
|
320
|
-
Debug
|
|
321
|
-
</MenuContentItem>
|
|
322
|
-
</MenuContent>
|
|
323
|
-
}
|
|
324
|
-
menuProps={{
|
|
325
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
|
326
|
-
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
|
327
|
-
}}
|
|
309
|
+
</button>
|
|
310
|
+
) : (
|
|
311
|
+
<button
|
|
312
|
+
className="service-editor__execution__execute-btn"
|
|
313
|
+
onClick={runQuery}
|
|
314
|
+
title="Run Query"
|
|
315
|
+
disabled={executionState.isRunningQuery}
|
|
316
|
+
tabIndex={-1}
|
|
328
317
|
>
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
318
|
+
<div className="service-editor__execution__execute-btn__label">
|
|
319
|
+
<PlayIcon className="service-editor__execution__execute-btn__label__icon" />
|
|
320
|
+
<div className="service-editor__execution__execute-btn__label__title">
|
|
321
|
+
Run Query
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
<DropdownMenu
|
|
325
|
+
className="service-editor__execution__execute-btn__dropdown-btn"
|
|
326
|
+
disabled={executionState.isGeneratingPlan}
|
|
327
|
+
content={
|
|
328
|
+
<MenuContent>
|
|
329
|
+
<MenuContentItem
|
|
330
|
+
className="service-editor__execution__execute-btn__option"
|
|
331
|
+
onClick={generatePlan}
|
|
332
|
+
>
|
|
333
|
+
Generate Plan
|
|
334
|
+
</MenuContentItem>
|
|
335
|
+
<MenuContentItem
|
|
336
|
+
className="service-editor__execution__execute-btn__option"
|
|
337
|
+
onClick={debugPlanGeneration}
|
|
338
|
+
>
|
|
339
|
+
Debug
|
|
340
|
+
</MenuContentItem>
|
|
341
|
+
</MenuContent>
|
|
342
|
+
}
|
|
343
|
+
menuProps={{
|
|
344
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
|
345
|
+
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
|
346
|
+
}}
|
|
347
|
+
>
|
|
348
|
+
<CaretDownIcon />
|
|
349
|
+
</DropdownMenu>
|
|
350
|
+
</button>
|
|
351
|
+
)}
|
|
332
352
|
</div>
|
|
333
353
|
</div>
|
|
334
354
|
<div className="panel__content property-mapping-editor__entry__container">
|
|
335
355
|
<PanelLoadingIndicator
|
|
336
356
|
isLoading={
|
|
337
357
|
executionState.isOpeningQueryEditor ||
|
|
338
|
-
executionState.
|
|
358
|
+
executionState.isRunningQuery ||
|
|
339
359
|
executionState.isGeneratingPlan
|
|
340
360
|
}
|
|
341
361
|
/>
|
|
@@ -208,7 +208,7 @@ export const ServiceTestableEditor = observer(
|
|
|
208
208
|
)}
|
|
209
209
|
{!service.tests.length && (
|
|
210
210
|
<BlankPanelPlaceholder
|
|
211
|
-
|
|
211
|
+
text="Add Test Suite"
|
|
212
212
|
onClick={addSuite}
|
|
213
213
|
clickActionType="add"
|
|
214
214
|
tooltipText="Click to add test"
|
|
@@ -41,12 +41,19 @@ import {
|
|
|
41
41
|
PlusIcon,
|
|
42
42
|
ArrowCircleRightIcon,
|
|
43
43
|
LongArrowRightIcon,
|
|
44
|
+
PanelDropZone,
|
|
44
45
|
} from '@finos/legend-art';
|
|
45
46
|
import { getElementIcon } from '../../../shared/ElementIconUtils.js';
|
|
46
47
|
import { prettyCONSTName, guaranteeType } from '@finos/legend-shared';
|
|
47
48
|
import { LEGEND_STUDIO_TEST_ID } from '../../../LegendStudioTestID.js';
|
|
48
|
-
import {
|
|
49
|
-
|
|
49
|
+
import {
|
|
50
|
+
StereotypeDragPreviewLayer,
|
|
51
|
+
StereotypeSelector,
|
|
52
|
+
} from './StereotypeSelector.js';
|
|
53
|
+
import {
|
|
54
|
+
TaggedValueDragPreviewLayer,
|
|
55
|
+
TaggedValueEditor,
|
|
56
|
+
} from './TaggedValueEditor.js';
|
|
50
57
|
import { PropertyEditor } from './PropertyEditor.js';
|
|
51
58
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
52
59
|
import {
|
|
@@ -388,11 +395,15 @@ export const AssociationEditor = observer(
|
|
|
388
395
|
},
|
|
389
396
|
[association, isReadOnly],
|
|
390
397
|
);
|
|
391
|
-
const [{ isTaggedValueDragOver }, dropTaggedValueRef] = useDrop
|
|
398
|
+
const [{ isTaggedValueDragOver }, dropTaggedValueRef] = useDrop<
|
|
399
|
+
ElementDragSource,
|
|
400
|
+
void,
|
|
401
|
+
{ isTaggedValueDragOver: boolean }
|
|
402
|
+
>(
|
|
392
403
|
() => ({
|
|
393
404
|
accept: [CORE_DND_TYPE.PROJECT_EXPLORER_PROFILE],
|
|
394
|
-
drop: (item
|
|
395
|
-
collect: (monitor)
|
|
405
|
+
drop: (item) => handleDropTaggedValue(item),
|
|
406
|
+
collect: (monitor) => ({
|
|
396
407
|
isTaggedValueDragOver: monitor.isOver({ shallow: true }),
|
|
397
408
|
}),
|
|
398
409
|
}),
|
|
@@ -411,11 +422,15 @@ export const AssociationEditor = observer(
|
|
|
411
422
|
},
|
|
412
423
|
[association, isReadOnly],
|
|
413
424
|
);
|
|
414
|
-
const [{ isStereotypeDragOver }, dropStereotypeRef] = useDrop
|
|
425
|
+
const [{ isStereotypeDragOver }, dropStereotypeRef] = useDrop<
|
|
426
|
+
ElementDragSource,
|
|
427
|
+
void,
|
|
428
|
+
{ isStereotypeDragOver: boolean }
|
|
429
|
+
>(
|
|
415
430
|
() => ({
|
|
416
431
|
accept: [CORE_DND_TYPE.PROJECT_EXPLORER_PROFILE],
|
|
417
|
-
drop: (item
|
|
418
|
-
collect: (monitor)
|
|
432
|
+
drop: (item) => handleDropStereotype(item),
|
|
433
|
+
collect: (monitor) => ({
|
|
419
434
|
isStereotypeDragOver: monitor.isOver({ shallow: true }),
|
|
420
435
|
}),
|
|
421
436
|
}),
|
|
@@ -503,40 +518,42 @@ export const AssociationEditor = observer(
|
|
|
503
518
|
</div>
|
|
504
519
|
)}
|
|
505
520
|
{selectedTab === UML_EDITOR_TAB.TAGGED_VALUES && (
|
|
506
|
-
<
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
'panel__content__lists--dnd-over':
|
|
510
|
-
isTaggedValueDragOver && !isReadOnly,
|
|
511
|
-
})}
|
|
521
|
+
<PanelDropZone
|
|
522
|
+
isDragOver={isTaggedValueDragOver && !isReadOnly}
|
|
523
|
+
dropTargetConnector={dropTaggedValueRef}
|
|
512
524
|
>
|
|
513
|
-
|
|
514
|
-
<
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
525
|
+
<div className="panel__content__lists">
|
|
526
|
+
<TaggedValueDragPreviewLayer />
|
|
527
|
+
{association.taggedValues.map((taggedValue) => (
|
|
528
|
+
<TaggedValueEditor
|
|
529
|
+
annotatedElement={association}
|
|
530
|
+
key={taggedValue._UUID}
|
|
531
|
+
taggedValue={taggedValue}
|
|
532
|
+
deleteValue={_deleteTaggedValue(taggedValue)}
|
|
533
|
+
isReadOnly={isReadOnly}
|
|
534
|
+
/>
|
|
535
|
+
))}
|
|
536
|
+
</div>
|
|
537
|
+
</PanelDropZone>
|
|
522
538
|
)}
|
|
523
539
|
{selectedTab === UML_EDITOR_TAB.STEREOTYPES && (
|
|
524
|
-
<
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
'panel__content__lists--dnd-over':
|
|
528
|
-
isStereotypeDragOver && !isReadOnly,
|
|
529
|
-
})}
|
|
540
|
+
<PanelDropZone
|
|
541
|
+
isDragOver={isStereotypeDragOver && !isReadOnly}
|
|
542
|
+
dropTargetConnector={dropStereotypeRef}
|
|
530
543
|
>
|
|
531
|
-
|
|
532
|
-
<
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
544
|
+
<div className="panel__content__lists">
|
|
545
|
+
<StereotypeDragPreviewLayer />
|
|
546
|
+
{association.stereotypes.map((stereotype) => (
|
|
547
|
+
<StereotypeSelector
|
|
548
|
+
key={stereotype.value._UUID}
|
|
549
|
+
annotatedElement={association}
|
|
550
|
+
stereotype={stereotype}
|
|
551
|
+
deleteStereotype={_deleteStereotype(stereotype)}
|
|
552
|
+
isReadOnly={isReadOnly}
|
|
553
|
+
/>
|
|
554
|
+
))}
|
|
555
|
+
</div>
|
|
556
|
+
</PanelDropZone>
|
|
540
557
|
)}
|
|
541
558
|
</div>
|
|
542
559
|
</div>
|