@finos/legend-application-studio 13.0.2 → 13.1.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.
Files changed (177) hide show
  1. package/lib/components/LegendStudioApplication.js +1 -1
  2. package/lib/components/LegendStudioApplication.js.map +1 -1
  3. package/lib/components/editor/command/project-search.css +1 -1
  4. package/lib/components/editor/command/project-search.css.map +1 -1
  5. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  6. package/lib/components/editor/command-center/ProjectSearchCommand.js +11 -3
  7. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  8. package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
  9. package/lib/components/editor/edit-panel/FunctionEditor.js +41 -34
  10. package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
  11. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  12. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +35 -54
  13. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
  14. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  15. package/lib/components/editor/edit-panel/GrammarTextEditor.js +2 -2
  16. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  17. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
  18. package/lib/components/editor/edit-panel/RuntimeEditor.js +11 -20
  19. package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -1
  20. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  21. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +4 -8
  22. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
  23. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +1 -1
  24. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
  25. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  26. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +3 -7
  27. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  28. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
  29. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +2 -2
  30. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -1
  31. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +1 -1
  32. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -1
  33. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  34. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -9
  35. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  36. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  37. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -4
  38. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
  39. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  40. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +3 -10
  41. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
  42. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  43. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +4 -10
  44. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
  45. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +7 -9
  46. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
  47. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  48. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +3 -6
  49. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
  50. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
  51. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +7 -8
  52. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
  53. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +2 -2
  54. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  55. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +5 -7
  57. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
  58. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  59. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +3 -4
  60. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
  61. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  62. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +1 -1
  63. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
  64. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  65. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +3 -5
  66. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
  67. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
  68. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  69. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  70. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +4 -8
  71. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
  72. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  73. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +157 -57
  74. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  75. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  76. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +39 -21
  77. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
  78. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  79. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +62 -9
  80. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
  81. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  82. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +4 -8
  83. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -1
  84. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +7 -1
  85. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
  86. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +33 -5
  87. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
  88. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +7 -1
  89. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
  90. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +35 -7
  91. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
  92. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  93. package/lib/components/editor/side-bar/CreateNewElementModal.js +4 -4
  94. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  95. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  96. package/lib/components/editor/side-bar/Explorer.js +8 -15
  97. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  98. package/lib/components/shared/StudioLambdaEditor.d.ts +1 -0
  99. package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
  100. package/lib/components/shared/StudioLambdaEditor.js +2 -2
  101. package/lib/components/shared/StudioLambdaEditor.js.map +1 -1
  102. package/lib/index.css +2 -2
  103. package/lib/index.css.map +1 -1
  104. package/lib/package.json +5 -5
  105. package/lib/stores/EditorStore.d.ts.map +1 -1
  106. package/lib/stores/EditorStore.js +7 -7
  107. package/lib/stores/EditorStore.js.map +1 -1
  108. package/lib/stores/LegendStudioBaseStore.d.ts +3 -8
  109. package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
  110. package/lib/stores/LegendStudioBaseStore.js +9 -105
  111. package/lib/stores/LegendStudioBaseStore.js.map +1 -1
  112. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  113. package/lib/stores/editor/NewElementState.js +8 -2
  114. package/lib/stores/editor/NewElementState.js.map +1 -1
  115. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +0 -2
  116. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -1
  117. package/lib/stores/editor-state/GenerationSpecificationEditorState.js +1 -8
  118. package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -1
  119. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  120. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +2 -4
  121. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  122. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +1 -1
  123. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  124. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  125. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  126. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +10 -0
  127. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -1
  128. package/lib/stores/graphModifier/DomainGraphModifierHelper.js +31 -1
  129. package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -1
  130. package/lib/stores/shared/DnDUtil.d.ts +1 -2
  131. package/lib/stores/shared/DnDUtil.d.ts.map +1 -1
  132. package/lib/stores/shared/DnDUtil.js +0 -2
  133. package/lib/stores/shared/DnDUtil.js.map +1 -1
  134. package/package.json +13 -13
  135. package/src/components/LegendStudioApplication.tsx +2 -2
  136. package/src/components/editor/command-center/ProjectSearchCommand.tsx +13 -2
  137. package/src/components/editor/edit-panel/FunctionEditor.tsx +220 -152
  138. package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +154 -184
  139. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +4 -5
  140. package/src/components/editor/edit-panel/RuntimeEditor.tsx +89 -90
  141. package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +57 -40
  142. package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +1 -1
  143. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +50 -45
  144. package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +36 -32
  145. package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +1 -1
  146. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +46 -41
  147. package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +9 -7
  148. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +18 -21
  149. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +39 -29
  150. package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +39 -39
  151. package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +23 -15
  152. package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +40 -38
  153. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +2 -2
  154. package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +48 -45
  155. package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +12 -8
  156. package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -3
  157. package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +75 -72
  158. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
  159. package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +55 -38
  160. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +813 -499
  161. package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +209 -113
  162. package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +184 -52
  163. package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +62 -39
  164. package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +137 -52
  165. package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +171 -88
  166. package/src/components/editor/side-bar/CreateNewElementModal.tsx +4 -2
  167. package/src/components/editor/side-bar/Explorer.tsx +13 -20
  168. package/src/components/shared/StudioLambdaEditor.tsx +3 -0
  169. package/src/stores/EditorStore.ts +7 -6
  170. package/src/stores/LegendStudioBaseStore.ts +20 -147
  171. package/src/stores/editor/NewElementState.ts +8 -2
  172. package/src/stores/editor-state/GenerationSpecificationEditorState.ts +1 -15
  173. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +2 -3
  174. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -1
  175. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  176. package/src/stores/graphModifier/DomainGraphModifierHelper.ts +92 -0
  177. package/src/stores/shared/DnDUtil.ts +0 -2
@@ -18,12 +18,12 @@ import { useEffect, useCallback } from 'react';
18
18
  import { observer } from 'mobx-react-lite';
19
19
  import { MappingEditorState } from '../../../../stores/editor-state/element-editor-state/mapping/MappingEditorState.js';
20
20
  import {
21
- clsx,
22
21
  CustomSelectorInput,
23
22
  createFilter,
24
23
  TimesIcon,
25
24
  ArrowCircleRightIcon,
26
25
  PlusIcon,
26
+ PanelDropZone,
27
27
  } from '@finos/legend-art';
28
28
  import {
29
29
  CORE_DND_TYPE,
@@ -146,11 +146,15 @@ export const OperationSetImplementationEditor = observer(
146
146
  },
147
147
  [setImplementation],
148
148
  );
149
- const [{ isDragOver }, dropRef] = useDrop(
149
+ const [{ isDragOver }, dropRef] = useDrop<
150
+ MappingElementDragSource,
151
+ void,
152
+ { isDragOver: boolean }
153
+ >(
150
154
  () => ({
151
155
  accept: CORE_DND_TYPE.MAPPING_EXPLORER_CLASS_MAPPING,
152
- drop: (item: MappingElementDragSource): void => handleDrop(item),
153
- collect: (monitor): { isDragOver: boolean } => ({
156
+ drop: (item) => handleDrop(item),
157
+ collect: (monitor) => ({
154
158
  isDragOver: monitor.isOver({ shallow: true }),
155
159
  }),
156
160
  }),
@@ -211,53 +215,52 @@ export const OperationSetImplementationEditor = observer(
211
215
  </button>
212
216
  </div>
213
217
  </div>
214
- <div
215
- ref={dropRef}
216
- className={clsx('panel__content', {
217
- 'operation-mapping-editor__parameters--dnd-over':
218
- isDragOver && !isReadOnly,
219
- })}
218
+ <PanelDropZone
219
+ isDragOver={isDragOver && !isReadOnly}
220
+ dropTargetConnector={dropRef}
220
221
  >
221
- {setImplementation.parameters.map((param) => (
222
- <div
223
- key={param._UUID}
224
- className="operation-mapping-editor__parameter"
225
- >
226
- <div className="operation-mapping-editor__parameter__selector">
227
- <CustomSelectorInput
228
- options={setImplementationOptions}
229
- disabled={isReadOnly}
230
- onChange={changeParamater(param)}
231
- filterOption={filterOption}
232
- value={{
233
- value: param,
234
- label: param.setImplementation.value.id.value,
235
- }}
236
- placeholder={`Select parameter ID`}
237
- />
238
- </div>
239
- <button
240
- className="operation-mapping-editor__parameter__visit-btn"
241
- onClick={visit(param)}
242
- tabIndex={-1}
243
- title={'Visit mapping element'}
222
+ <div className="panel__content">
223
+ {setImplementation.parameters.map((param) => (
224
+ <div
225
+ key={param._UUID}
226
+ className="operation-mapping-editor__parameter"
244
227
  >
245
- <ArrowCircleRightIcon />
246
- </button>
247
- {!isReadOnly && (
228
+ <div className="operation-mapping-editor__parameter__selector">
229
+ <CustomSelectorInput
230
+ options={setImplementationOptions}
231
+ disabled={isReadOnly}
232
+ onChange={changeParamater(param)}
233
+ filterOption={filterOption}
234
+ value={{
235
+ value: param,
236
+ label: param.setImplementation.value.id.value,
237
+ }}
238
+ placeholder={`Select parameter ID`}
239
+ />
240
+ </div>
248
241
  <button
249
- className="operation-mapping-editor__parameter__remove-btn"
250
- disabled={isReadOnly}
251
- onClick={deleteParameter(param)}
242
+ className="operation-mapping-editor__parameter__visit-btn"
243
+ onClick={visit(param)}
252
244
  tabIndex={-1}
253
- title={'Remove'}
245
+ title={'Visit mapping element'}
254
246
  >
255
- <TimesIcon />
247
+ <ArrowCircleRightIcon />
256
248
  </button>
257
- )}
258
- </div>
259
- ))}
260
- </div>
249
+ {!isReadOnly && (
250
+ <button
251
+ className="operation-mapping-editor__parameter__remove-btn"
252
+ disabled={isReadOnly}
253
+ onClick={deleteParameter(param)}
254
+ tabIndex={-1}
255
+ title={'Remove'}
256
+ >
257
+ <TimesIcon />
258
+ </button>
259
+ )}
260
+ </div>
261
+ ))}
262
+ </div>
263
+ </PanelDropZone>
261
264
  </div>
262
265
  </div>
263
266
  );
@@ -350,7 +350,14 @@ export const PurePropertyMappingEditor = observer(
350
350
  },
351
351
  [disableEditingTransform, purePropertyMappingState],
352
352
  );
353
- const [{ item, dragItemType }, drop] = useDrop(
353
+ const [{ dragItem, dragItemType }, drop] = useDrop<
354
+ TypeDragSource,
355
+ void,
356
+ {
357
+ dragItem: TypeDragSource | undefined;
358
+ dragItemType: CORE_DND_TYPE;
359
+ }
360
+ >(
354
361
  () => ({
355
362
  accept: [
356
363
  CORE_DND_TYPE.TYPE_TREE_CLASS,
@@ -358,18 +365,15 @@ export const PurePropertyMappingEditor = observer(
358
365
  CORE_DND_TYPE.TYPE_TREE_PRIMITIVE,
359
366
  CORE_DND_TYPE.TYPE_TREE_ENUM,
360
367
  ],
361
- drop: (dropItem: TransformDropTarget, monitor): void =>
362
- handleDrop(dropItem, monitor.getItemType() as string),
363
- collect: (
364
- monitor,
365
- ): { item: TypeDragSource | null; dragItemType: CORE_DND_TYPE } => ({
366
- item: monitor.getItem<TypeDragSource | null>(),
368
+ drop: (item, monitor) =>
369
+ handleDrop(item, monitor.getItemType() as string),
370
+ collect: (monitor) => ({
371
+ dragItem: monitor.getItem<TypeDragSource | null>() ?? undefined,
367
372
  dragItemType: monitor.getItemType() as CORE_DND_TYPE,
368
373
  }),
369
374
  }),
370
375
  [handleDrop],
371
376
  );
372
- const dragItem = item instanceof TypeDragSource ? item : undefined;
373
377
  const transformProps = {
374
378
  disableTransform: disableEditingTransform,
375
379
  forceBackdrop: setImplementationHasParserError,
@@ -295,11 +295,10 @@ export const RelationalPropertyMappingEditor = observer(
295
295
  },
296
296
  [disableEditingTransform, relationalPropertyMappingState],
297
297
  );
298
- const [, drop] = useDrop(
298
+ const [, drop] = useDrop<TableOrViewTreeNodeDragSource>(
299
299
  () => ({
300
300
  accept: [TABLE_ELEMENT_DND_TYPE],
301
- drop: (droppedItem: TableOrViewTreeNodeDragSource): void =>
302
- handleDrop(droppedItem),
301
+ drop: (item) => handleDrop(item),
303
302
  }),
304
303
  [handleDrop],
305
304
  );
@@ -54,6 +54,7 @@ import {
54
54
  PlusIcon,
55
55
  ArrowsJoinIcon,
56
56
  ArrowsSplitIcon,
57
+ PanelDropZone,
57
58
  } from '@finos/legend-art';
58
59
  import { ServiceExecutionQueryEditor } from '../../../editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js';
59
60
  import { useEditorStore } from '../../EditorStoreProvider.js';
@@ -218,15 +219,18 @@ const PureExecutionContextConfigurationEditor = observer(
218
219
  },
219
220
  [isReadOnly, mapping, executionContextState, pureExecutionState],
220
221
  );
221
- const [{ isMappingOrRuntimeDragOver }, dropMappingOrRuntimeRef] = useDrop(
222
+ const [{ isMappingOrRuntimeDragOver }, dropMappingOrRuntimeRef] = useDrop<
223
+ ElementDragSource,
224
+ void,
225
+ { isMappingOrRuntimeDragOver: boolean }
226
+ >(
222
227
  () => ({
223
228
  accept: [
224
229
  CORE_DND_TYPE.PROJECT_EXPLORER_MAPPING,
225
230
  CORE_DND_TYPE.PROJECT_EXPLORER_RUNTIME,
226
231
  ],
227
- drop: (item: ElementDragSource): void =>
228
- handleMappingOrRuntimeDrop(item),
229
- collect: (monitor): { isMappingOrRuntimeDragOver: boolean } => ({
232
+ drop: (item) => handleMappingOrRuntimeDrop(item),
233
+ collect: (monitor) => ({
230
234
  isMappingOrRuntimeDragOver: monitor.isOver({ shallow: true }),
231
235
  }),
232
236
  }),
@@ -239,78 +243,77 @@ const PureExecutionContextConfigurationEditor = observer(
239
243
  );
240
244
 
241
245
  return (
242
- <div
243
- ref={dropMappingOrRuntimeRef}
244
- className="panel__content dnd__overlay__container"
245
- >
246
- <div
247
- className={clsx({
248
- dnd__overlay: isMappingOrRuntimeDragOver && !isReadOnly,
249
- })}
250
- />
251
- <div className="service-execution-editor__configuration__items">
252
- <div className="service-execution-editor__configuration__item">
253
- <div className="btn--sm service-execution-editor__configuration__item__label">
254
- <PURE_MappingIcon />
255
- </div>
256
- <CustomSelectorInput
257
- className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
258
- disabled={isReadOnly}
259
- options={mappingOptions}
260
- onChange={onMappingSelectionChange}
261
- value={selectedMappingOption}
262
- darkMode={true}
263
- hasError={isMappingEmpty}
264
- />
265
- <button
266
- className="btn--dark btn--sm service-execution-editor__configuration__item__btn"
267
- onClick={visitMapping}
268
- tabIndex={-1}
269
- title={'See mapping'}
270
- >
271
- <LongArrowRightIcon />
272
- </button>
273
- </div>
274
- <div className="service-execution-editor__configuration__item">
275
- <div className="btn--sm service-execution-editor__configuration__item__label">
276
- <PURE_RuntimeIcon />
277
- </div>
278
- <CustomSelectorInput
279
- className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
280
- disabled={isReadOnly}
281
- options={runtimeOptions}
282
- onChange={onRuntimeSelectionChange}
283
- value={selectedRuntimeOption}
284
- darkMode={true}
285
- />
286
- {!isRuntimePointer && (
287
- <button
288
- className="btn--sm btn--dark service-execution-editor__configuration__item__btn"
289
- disabled={Boolean(isReadOnly || isMappingEmpty)}
290
- onClick={openRuntimeEditor}
291
- tabIndex={-1}
292
- title={isReadOnly ? 'See runtime' : 'Configure custom runtime'}
293
- >
294
- <CogIcon />
295
- </button>
296
- )}
297
- {isRuntimePointer && (
246
+ <div className="panel__content">
247
+ <PanelDropZone
248
+ dropTargetConnector={dropMappingOrRuntimeRef}
249
+ isDragOver={isMappingOrRuntimeDragOver && !isReadOnly}
250
+ >
251
+ <div className="service-execution-editor__configuration__items">
252
+ <div className="service-execution-editor__configuration__item">
253
+ <div className="btn--sm service-execution-editor__configuration__item__label">
254
+ <PURE_MappingIcon />
255
+ </div>
256
+ <CustomSelectorInput
257
+ className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
258
+ disabled={isReadOnly}
259
+ options={mappingOptions}
260
+ onChange={onMappingSelectionChange}
261
+ value={selectedMappingOption}
262
+ darkMode={true}
263
+ hasError={isMappingEmpty}
264
+ />
298
265
  <button
299
- className="btn--sm btn--dark service-execution-editor__configuration__item__btn"
300
- onClick={visitRuntime}
266
+ className="btn--dark btn--sm service-execution-editor__configuration__item__btn"
267
+ onClick={visitMapping}
301
268
  tabIndex={-1}
302
- title={'See runtime'}
269
+ title={'See mapping'}
303
270
  >
304
271
  <LongArrowRightIcon />
305
272
  </button>
306
- )}
307
- <EmbeddedRuntimeEditor
308
- runtimeEditorState={pureExecutionState.runtimeEditorState}
309
- isReadOnly={serviceState.isReadOnly}
310
- onClose={(): void => pureExecutionState.closeRuntimeEditor()}
311
- />
273
+ </div>
274
+ <div className="service-execution-editor__configuration__item">
275
+ <div className="btn--sm service-execution-editor__configuration__item__label">
276
+ <PURE_RuntimeIcon />
277
+ </div>
278
+ <CustomSelectorInput
279
+ className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
280
+ disabled={isReadOnly}
281
+ options={runtimeOptions}
282
+ onChange={onRuntimeSelectionChange}
283
+ value={selectedRuntimeOption}
284
+ darkMode={true}
285
+ />
286
+ {!isRuntimePointer && (
287
+ <button
288
+ className="btn--sm btn--dark service-execution-editor__configuration__item__btn"
289
+ disabled={Boolean(isReadOnly || isMappingEmpty)}
290
+ onClick={openRuntimeEditor}
291
+ tabIndex={-1}
292
+ title={
293
+ isReadOnly ? 'See runtime' : 'Configure custom runtime'
294
+ }
295
+ >
296
+ <CogIcon />
297
+ </button>
298
+ )}
299
+ {isRuntimePointer && (
300
+ <button
301
+ className="btn--sm btn--dark service-execution-editor__configuration__item__btn"
302
+ onClick={visitRuntime}
303
+ tabIndex={-1}
304
+ title={'See runtime'}
305
+ >
306
+ <LongArrowRightIcon />
307
+ </button>
308
+ )}
309
+ <EmbeddedRuntimeEditor
310
+ runtimeEditorState={pureExecutionState.runtimeEditorState}
311
+ isReadOnly={serviceState.isReadOnly}
312
+ onClose={(): void => pureExecutionState.closeRuntimeEditor()}
313
+ />
314
+ </div>
312
315
  </div>
313
- </div>
316
+ </PanelDropZone>
314
317
  </div>
315
318
  );
316
319
  },
@@ -696,7 +699,7 @@ const MultiPureExecutionEditor = observer(
696
699
  ))}
697
700
  {!multiExecution.executionParameters.length && (
698
701
  <BlankPanelPlaceholder
699
- placeholderText="Add an execution context"
702
+ text="Add an execution context"
700
703
  onClick={addExecutionKey}
701
704
  clickActionType="add"
702
705
  tooltipText="Click to add an execution context"
@@ -739,7 +742,7 @@ const MultiPureExecutionEditor = observer(
739
742
  />
740
743
  ) : (
741
744
  <BlankPanelPlaceholder
742
- placeholderText="Add an execution context"
745
+ text="Add an execution context"
743
746
  onClick={addExecutionKey}
744
747
  clickActionType="add"
745
748
  tooltipText="Click to add an execution context"
@@ -208,7 +208,7 @@ export const ServiceTestableEditor = observer(
208
208
  )}
209
209
  {!service.tests.length && (
210
210
  <BlankPanelPlaceholder
211
- placeholderText="Add Test Suite"
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 { StereotypeSelector } from './StereotypeSelector.js';
49
- import { TaggedValueEditor } from './TaggedValueEditor.js';
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: ElementDragSource): void => handleDropTaggedValue(item),
395
- collect: (monitor): { isTaggedValueDragOver: boolean } => ({
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: ElementDragSource): void => handleDropStereotype(item),
418
- collect: (monitor): { isStereotypeDragOver: boolean } => ({
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
- <div
507
- ref={dropTaggedValueRef}
508
- className={clsx('panel__content__lists', {
509
- 'panel__content__lists--dnd-over':
510
- isTaggedValueDragOver && !isReadOnly,
511
- })}
521
+ <PanelDropZone
522
+ isDragOver={isTaggedValueDragOver && !isReadOnly}
523
+ dropTargetConnector={dropTaggedValueRef}
512
524
  >
513
- {association.taggedValues.map((taggedValue) => (
514
- <TaggedValueEditor
515
- key={taggedValue._UUID}
516
- taggedValue={taggedValue}
517
- deleteValue={_deleteTaggedValue(taggedValue)}
518
- isReadOnly={isReadOnly}
519
- />
520
- ))}
521
- </div>
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
- <div
525
- ref={dropStereotypeRef}
526
- className={clsx('panel__content__lists', {
527
- 'panel__content__lists--dnd-over':
528
- isStereotypeDragOver && !isReadOnly,
529
- })}
540
+ <PanelDropZone
541
+ isDragOver={isStereotypeDragOver && !isReadOnly}
542
+ dropTargetConnector={dropStereotypeRef}
530
543
  >
531
- {association.stereotypes.map((stereotype) => (
532
- <StereotypeSelector
533
- key={stereotype.value._UUID}
534
- stereotype={stereotype}
535
- deleteStereotype={_deleteStereotype(stereotype)}
536
- isReadOnly={isReadOnly}
537
- />
538
- ))}
539
- </div>
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>