@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.
Files changed (189) hide show
  1. package/lib/components/editor/command/project-search.css +1 -1
  2. package/lib/components/editor/command/project-search.css.map +1 -1
  3. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  4. package/lib/components/editor/command-center/ProjectSearchCommand.js +11 -3
  5. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  6. package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
  7. package/lib/components/editor/edit-panel/FunctionEditor.js +41 -34
  8. package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
  9. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  10. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +35 -54
  11. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
  12. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  13. package/lib/components/editor/edit-panel/GrammarTextEditor.js +2 -2
  14. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  15. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
  16. package/lib/components/editor/edit-panel/RuntimeEditor.js +11 -20
  17. package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -1
  18. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  19. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +4 -8
  20. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
  21. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +1 -1
  22. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
  23. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  24. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +3 -7
  25. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  26. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
  27. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +2 -2
  28. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -1
  29. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +1 -1
  30. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -1
  31. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  32. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -9
  33. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  34. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -4
  36. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
  37. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  38. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +3 -10
  39. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
  40. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  41. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +4 -10
  42. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
  43. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +7 -9
  44. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
  45. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +9 -12
  47. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
  48. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
  49. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +12 -10
  50. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
  51. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +2 -2
  52. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  53. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  54. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +5 -7
  55. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
  56. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  57. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +3 -4
  58. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
  59. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  60. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +1 -1
  61. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
  62. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  63. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +3 -5
  64. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
  65. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  66. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +9 -6
  67. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  68. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
  69. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  70. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  71. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +4 -8
  72. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
  73. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  74. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +157 -57
  75. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  76. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  77. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +39 -21
  78. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
  79. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  80. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +62 -9
  81. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
  82. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  83. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +4 -8
  84. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -1
  85. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +7 -1
  86. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
  87. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +33 -5
  88. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
  89. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +7 -1
  90. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
  91. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +35 -7
  92. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
  93. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  94. package/lib/components/editor/side-bar/CreateNewElementModal.js +4 -4
  95. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  96. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  97. package/lib/components/editor/side-bar/Explorer.js +8 -15
  98. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  99. package/lib/components/shared/StudioLambdaEditor.d.ts +1 -0
  100. package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
  101. package/lib/components/shared/StudioLambdaEditor.js +2 -2
  102. package/lib/components/shared/StudioLambdaEditor.js.map +1 -1
  103. package/lib/components/workspace-setup/WorkspaceSetup.js +1 -1
  104. package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
  105. package/lib/index.css +2 -2
  106. package/lib/index.css.map +1 -1
  107. package/lib/package.json +5 -5
  108. package/lib/stores/EditorStore.d.ts.map +1 -1
  109. package/lib/stores/EditorStore.js +7 -7
  110. package/lib/stores/EditorStore.js.map +1 -1
  111. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  112. package/lib/stores/editor/NewElementState.js +8 -2
  113. package/lib/stores/editor/NewElementState.js.map +1 -1
  114. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +0 -2
  115. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -1
  116. package/lib/stores/editor-state/GenerationSpecificationEditorState.js +1 -8
  117. package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -1
  118. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  119. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +2 -4
  120. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  121. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +1 -1
  122. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  123. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  124. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  125. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +4 -1
  126. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
  127. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +31 -15
  128. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  129. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +6 -3
  130. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  131. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +30 -17
  132. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  133. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +1 -1
  134. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  135. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +10 -0
  136. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -1
  137. package/lib/stores/graphModifier/DomainGraphModifierHelper.js +31 -1
  138. package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -1
  139. package/lib/stores/shared/DnDUtil.d.ts +1 -2
  140. package/lib/stores/shared/DnDUtil.d.ts.map +1 -1
  141. package/lib/stores/shared/DnDUtil.js +0 -2
  142. package/lib/stores/shared/DnDUtil.js.map +1 -1
  143. package/package.json +13 -13
  144. package/src/components/editor/command-center/ProjectSearchCommand.tsx +13 -2
  145. package/src/components/editor/edit-panel/FunctionEditor.tsx +220 -152
  146. package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +154 -184
  147. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +4 -5
  148. package/src/components/editor/edit-panel/RuntimeEditor.tsx +89 -90
  149. package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +57 -40
  150. package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +1 -1
  151. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +50 -45
  152. package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +36 -32
  153. package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +1 -1
  154. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +46 -41
  155. package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +9 -7
  156. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +18 -21
  157. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +39 -29
  158. package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +39 -39
  159. package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +82 -58
  160. package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +66 -50
  161. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +2 -2
  162. package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +48 -45
  163. package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +12 -8
  164. package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -3
  165. package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +75 -72
  166. package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +63 -43
  167. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
  168. package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +55 -38
  169. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +813 -499
  170. package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +209 -113
  171. package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +184 -52
  172. package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +62 -39
  173. package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +137 -52
  174. package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +171 -88
  175. package/src/components/editor/side-bar/CreateNewElementModal.tsx +4 -2
  176. package/src/components/editor/side-bar/Explorer.tsx +13 -20
  177. package/src/components/shared/StudioLambdaEditor.tsx +3 -0
  178. package/src/components/workspace-setup/WorkspaceSetup.tsx +1 -1
  179. package/src/stores/EditorStore.ts +7 -6
  180. package/src/stores/editor/NewElementState.ts +8 -2
  181. package/src/stores/editor-state/GenerationSpecificationEditorState.ts +1 -15
  182. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +2 -3
  183. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -1
  184. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  185. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +46 -29
  186. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +39 -20
  187. package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +1 -1
  188. package/src/stores/graphModifier/DomainGraphModifierHelper.ts +92 -0
  189. package/src/stores/shared/DnDUtil.ts +0 -2
@@ -53,6 +53,7 @@ import {
53
53
  LongArrowRightIcon,
54
54
  CogIcon,
55
55
  CaretRightIcon,
56
+ PanelDropZone,
56
57
  } from '@finos/legend-art';
57
58
  import { getElementIcon } from '../../shared/ElementIconUtils.js';
58
59
  import type { RuntimeExplorerTreeNodeData } from '../../../stores/shared/TreeUtil.js';
@@ -405,15 +406,18 @@ const RuntimeExplorer = observer(
405
406
  },
406
407
  [isReadOnly, runtimeEditorState, runtimeValue],
407
408
  );
408
- const [{ isRuntimeSubElementDragOver }, dropRuntimeSubElementRef] = useDrop(
409
+ const [{ isRuntimeSubElementDragOver }, dropRuntimeSubElementRef] = useDrop<
410
+ ElementDragSource,
411
+ void,
412
+ { isRuntimeSubElementDragOver: boolean }
413
+ >(
409
414
  () => ({
410
415
  accept: [
411
416
  CORE_DND_TYPE.PROJECT_EXPLORER_CONNECTION,
412
417
  CORE_DND_TYPE.PROJECT_EXPLORER_MAPPING,
413
418
  ],
414
- drop: (item: ElementDragSource): void =>
415
- handleDropRuntimeSubElement(item),
416
- collect: (monitor): { isRuntimeSubElementDragOver: boolean } => ({
419
+ drop: (item) => handleDropRuntimeSubElement(item),
420
+ collect: (monitor) => ({
417
421
  isRuntimeSubElementDragOver: monitor.isOver({ shallow: true }),
418
422
  }),
419
423
  }),
@@ -440,10 +444,10 @@ const RuntimeExplorer = observer(
440
444
  disabled={true}
441
445
  menuProps={{ elevation: 7 }}
442
446
  >
443
- <div ref={dropRuntimeSubElementRef} className="dnd__dropzone">
444
- <div
445
- className={clsx({ dnd__overlay: isRuntimeSubElementDragOver })}
446
- />
447
+ <PanelDropZone
448
+ dropTargetConnector={dropRuntimeSubElementRef}
449
+ isDragOver={isRuntimeSubElementDragOver}
450
+ >
447
451
  <div className="panel__content__list">
448
452
  <TreeView
449
453
  components={{
@@ -459,7 +463,7 @@ const RuntimeExplorer = observer(
459
463
  }}
460
464
  />
461
465
  </div>
462
- </div>
466
+ </PanelDropZone>
463
467
  </ContextMenu>
464
468
  </div>
465
469
  );
@@ -657,10 +661,14 @@ const IdentifiedConnectionsPerStoreEditor = observer(
657
661
  },
658
662
  [currentRuntimeEditorTabState, isReadOnly],
659
663
  );
660
- const [{ isConnectionDragOver, dragItem }, dropConnectionRef] = useDrop(
664
+ const [{ isConnectionDragOver, dragItem }, dropConnectionRef] = useDrop<
665
+ ElementDragSource,
666
+ void,
667
+ { isConnectionDragOver: boolean; dragItem: ElementDragSource | null }
668
+ >(
661
669
  () => ({
662
670
  accept: [CORE_DND_TYPE.PROJECT_EXPLORER_CONNECTION],
663
- drop: (item: ElementDragSource): void => handleDropConnection(item),
671
+ drop: (item) => handleDropConnection(item),
664
672
  collect: (
665
673
  monitor,
666
674
  ): {
@@ -736,56 +744,44 @@ const IdentifiedConnectionsPerStoreEditor = observer(
736
744
  }
737
745
  menuProps={{ elevation: 7 }}
738
746
  >
739
- <div ref={dropConnectionRef} className="dnd__dropzone">
747
+ <PanelDropZone
748
+ dropTargetConnector={dropConnectionRef}
749
+ isDragOver={isConnectionDragOver}
750
+ >
740
751
  {Boolean(
741
752
  currentRuntimeEditorTabState.identifiedConnections.length,
742
753
  ) && (
743
- <>
744
- <div
745
- className={clsx({ dnd__overlay: isConnectionDragOver })}
746
- />
747
- <div className="panel__content__list">
748
- {currentRuntimeEditorTabState.identifiedConnections.map(
749
- (rtConnection) => (
750
- <IdentifiedConnectionsPerStoreExplorerItem
751
- key={rtConnection._UUID}
752
- identifiedConnection={rtConnection}
753
- currentRuntimeEditorTabState={
754
- currentRuntimeEditorTabState
755
- }
756
- isActive={rtConnection === identifiedConnection}
757
- isReadOnly={isReadOnly}
758
- />
759
- ),
760
- )}
761
- </div>
762
- </>
754
+ <div className="panel__content__list">
755
+ {currentRuntimeEditorTabState.identifiedConnections.map(
756
+ (rtConnection) => (
757
+ <IdentifiedConnectionsPerStoreExplorerItem
758
+ key={rtConnection._UUID}
759
+ identifiedConnection={rtConnection}
760
+ currentRuntimeEditorTabState={
761
+ currentRuntimeEditorTabState
762
+ }
763
+ isActive={rtConnection === identifiedConnection}
764
+ isReadOnly={isReadOnly}
765
+ />
766
+ ),
767
+ )}
768
+ </div>
763
769
  )}
764
770
  {!currentRuntimeEditorTabState.identifiedConnections
765
771
  .length && (
766
772
  <BlankPanelPlaceholder
767
- placeholderText="Add a connection"
773
+ text="Add a connection"
768
774
  onClick={addNewConnection}
769
775
  clickActionType="add"
770
776
  tooltipText="Drop a connection to add it to the list, or click to add an embedded connection"
771
- dndProps={
772
- isEmbeddedRuntime
773
- ? undefined
774
- : {
775
- isDragOver: isConnectionDragOver,
776
- canDrop: canDropConnection,
777
- }
778
- }
779
- readOnlyProps={
780
- !isReadOnly
781
- ? undefined
782
- : {
783
- placeholderText: 'No connection',
784
- }
777
+ isDropZoneActive={
778
+ isEmbeddedRuntime ? undefined : canDropConnection
785
779
  }
780
+ disabled={isReadOnly}
781
+ previewText="No connection"
786
782
  />
787
783
  )}
788
- </div>
784
+ </PanelDropZone>
789
785
  </ContextMenu>
790
786
  </div>
791
787
  </ResizablePanel>
@@ -909,7 +905,7 @@ const RuntimeGeneralEditor = observer(
909
905
  }
910
906
  };
911
907
  const handleDropMapping = useCallback(
912
- (item: UMLEditorElementDropTarget): void => {
908
+ (item: UMLEditorElementDropTarget) => {
913
909
  const element = item.data.packageableElement;
914
910
  if (
915
911
  !isReadOnly &&
@@ -923,11 +919,15 @@ const RuntimeGeneralEditor = observer(
923
919
  },
924
920
  [isReadOnly, runtimeEditorState, runtimeValue.mappings],
925
921
  );
926
- const [{ isMappingDragOver }, dropMappingRef] = useDrop(
922
+ const [{ isMappingDragOver }, dropMappingRef] = useDrop<
923
+ ElementDragSource,
924
+ void,
925
+ { isMappingDragOver: boolean }
926
+ >(
927
927
  () => ({
928
928
  accept: [CORE_DND_TYPE.PROJECT_EXPLORER_MAPPING],
929
- drop: (item: ElementDragSource): void => handleDropMapping(item),
930
- collect: (monitor): { isMappingDragOver: boolean } => ({
929
+ drop: (item) => handleDropMapping(item),
930
+ collect: (monitor) => ({
931
931
  isMappingDragOver: monitor.isOver({ shallow: true }),
932
932
  }),
933
933
  }),
@@ -937,46 +937,45 @@ const RuntimeGeneralEditor = observer(
937
937
  return (
938
938
  <div className="panel runtime-explorer">
939
939
  <div className="panel__header"></div>
940
- <div
941
- ref={dropMappingRef}
942
- className="panel__content dnd__overlay__container"
943
- >
944
- <div
945
- className={clsx({ dnd__overlay: isMappingDragOver && !isReadOnly })}
946
- />
947
- <div className="panel__content__form">
948
- <div className="panel__content__form__section">
949
- <div className="panel__content__form__section__header__label">
950
- Mappings
951
- </div>
952
- <div className="panel__content__form__section__header__prompt">
953
- Specifies the list of mappings covered by this runtime
954
- </div>
955
- <div className="panel__content__form__section__list">
956
- {runtimeValue.mappings.map((mappingRef) => (
957
- <RuntimeMappingEditor
958
- key={mappingRef.value._UUID}
959
- runtimeEditorState={runtimeEditorState}
960
- mappingRef={mappingRef}
961
- isReadOnly={isReadOnly || isRuntimeEmbedded}
962
- />
963
- ))}
964
- {!isRuntimeEmbedded && (
965
- <div className="panel__content__form__section__list__new-item__add">
966
- <button
967
- className="panel__content__form__section__list__new-item__add-btn btn btn--dark"
968
- disabled={!allowAddingMapping}
969
- tabIndex={-1}
970
- onClick={addMapping}
971
- title="Add Mapping"
972
- >
973
- Add Value
974
- </button>
975
- </div>
976
- )}
940
+ <div className="panel__content">
941
+ <PanelDropZone
942
+ dropTargetConnector={dropMappingRef}
943
+ isDragOver={isMappingDragOver && !isReadOnly}
944
+ >
945
+ <div className="panel__content__form">
946
+ <div className="panel__content__form__section">
947
+ <div className="panel__content__form__section__header__label">
948
+ Mappings
949
+ </div>
950
+ <div className="panel__content__form__section__header__prompt">
951
+ Specifies the list of mappings covered by this runtime
952
+ </div>
953
+ <div className="panel__content__form__section__list">
954
+ {runtimeValue.mappings.map((mappingRef) => (
955
+ <RuntimeMappingEditor
956
+ key={mappingRef.value._UUID}
957
+ runtimeEditorState={runtimeEditorState}
958
+ mappingRef={mappingRef}
959
+ isReadOnly={isReadOnly || isRuntimeEmbedded}
960
+ />
961
+ ))}
962
+ {!isRuntimeEmbedded && (
963
+ <div className="panel__content__form__section__list__new-item__add">
964
+ <button
965
+ className="panel__content__form__section__list__new-item__add-btn btn btn--dark"
966
+ disabled={!allowAddingMapping}
967
+ tabIndex={-1}
968
+ onClick={addMapping}
969
+ title="Add Mapping"
970
+ >
971
+ Add Value
972
+ </button>
973
+ </div>
974
+ )}
975
+ </div>
977
976
  </div>
978
977
  </div>
979
- </div>
978
+ </PanelDropZone>
980
979
  </div>
981
980
  </div>
982
981
  );
@@ -28,6 +28,7 @@ import {
28
28
  LockIcon,
29
29
  MenuContent,
30
30
  MenuContentItem,
31
+ PanelDropZone,
31
32
  PlusIcon,
32
33
  } from '@finos/legend-art';
33
34
  import { prettyCONSTName } from '@finos/legend-shared';
@@ -53,9 +54,15 @@ import {
53
54
  type UMLEditorElementDropTarget,
54
55
  type ElementDragSource,
55
56
  } from '../../../../stores/shared/DnDUtil.js';
56
- import { TaggedValueEditor } from '../uml-editor/TaggedValueEditor.js';
57
+ import {
58
+ TaggedValueDragPreviewLayer,
59
+ TaggedValueEditor,
60
+ } from '../uml-editor/TaggedValueEditor.js';
57
61
  import { useCallback, useEffect, useRef } from 'react';
58
- import { StereotypeSelector } from '../uml-editor/StereotypeSelector.js';
62
+ import {
63
+ StereotypeDragPreviewLayer,
64
+ StereotypeSelector,
65
+ } from '../uml-editor/StereotypeSelector.js';
59
66
  import {
60
67
  externalFormatData_setContentType,
61
68
  externalFormatData_setData,
@@ -212,11 +219,15 @@ export const DataElementEditor = observer(() => {
212
219
  },
213
220
  [dataElement, isReadOnly],
214
221
  );
215
- const [{ isTaggedValueDragOver }, dropTaggedValueRef] = useDrop(
222
+ const [{ isTaggedValueDragOver }, dropTaggedValueRef] = useDrop<
223
+ ElementDragSource,
224
+ void,
225
+ { isTaggedValueDragOver: boolean }
226
+ >(
216
227
  () => ({
217
228
  accept: [CORE_DND_TYPE.PROJECT_EXPLORER_PROFILE],
218
- drop: (item: ElementDragSource): void => handleDropTaggedValue(item),
219
- collect: (monitor): { isTaggedValueDragOver: boolean } => ({
229
+ drop: (item) => handleDropTaggedValue(item),
230
+ collect: (monitor) => ({
220
231
  isTaggedValueDragOver: monitor.isOver({ shallow: true }),
221
232
  }),
222
233
  }),
@@ -235,11 +246,15 @@ export const DataElementEditor = observer(() => {
235
246
  },
236
247
  [dataElement, isReadOnly],
237
248
  );
238
- const [{ isStereotypeDragOver }, dropStereotypeRef] = useDrop(
249
+ const [{ isStereotypeDragOver }, dropStereotypeRef] = useDrop<
250
+ ElementDragSource,
251
+ void,
252
+ { isStereotypeDragOver: boolean }
253
+ >(
239
254
  () => ({
240
255
  accept: [CORE_DND_TYPE.PROJECT_EXPLORER_PROFILE],
241
- drop: (item: ElementDragSource): void => handleDropStereotype(item),
242
- collect: (monitor): { isStereotypeDragOver: boolean } => ({
256
+ drop: (item) => handleDropStereotype(item),
257
+ collect: (monitor) => ({
243
258
  isStereotypeDragOver: monitor.isOver({ shallow: true }),
244
259
  }),
245
260
  }),
@@ -308,23 +323,24 @@ export const DataElementEditor = observer(() => {
308
323
  </div>
309
324
  <div className="data-editor__content">
310
325
  <div className="data-editor__content__lists">
311
- <div
312
- ref={dropStereotypeRef}
313
- className={clsx('panel__content__lists', {
314
- 'panel__content__lists--dnd-over':
315
- isStereotypeDragOver && !isReadOnly,
316
- })}
326
+ <PanelDropZone
327
+ isDragOver={isStereotypeDragOver && !isReadOnly}
328
+ dropTargetConnector={dropStereotypeRef}
317
329
  >
318
- {dataElement.stereotypes.map((stereotype) => (
319
- <StereotypeSelector
320
- key={stereotype.value._UUID}
321
- stereotype={stereotype}
322
- deleteStereotype={_deleteStereotype(stereotype)}
323
- isReadOnly={isReadOnly}
324
- darkTheme={true}
325
- />
326
- ))}
327
- </div>
330
+ <div className="panel__content__lists">
331
+ <StereotypeDragPreviewLayer />
332
+ {dataElement.stereotypes.map((stereotype) => (
333
+ <StereotypeSelector
334
+ key={stereotype.value._UUID}
335
+ annotatedElement={dataElement}
336
+ stereotype={stereotype}
337
+ deleteStereotype={_deleteStereotype(stereotype)}
338
+ isReadOnly={isReadOnly}
339
+ darkTheme={true}
340
+ />
341
+ ))}
342
+ </div>
343
+ </PanelDropZone>
328
344
  </div>
329
345
  </div>
330
346
  </>
@@ -356,23 +372,24 @@ export const DataElementEditor = observer(() => {
356
372
  </div>
357
373
  <div className="data-editor__content">
358
374
  <div className="data-editor__content__lists">
359
- <div
360
- ref={dropTaggedValueRef}
361
- className={clsx('panel__content__lists', {
362
- 'panel__content__lists--dnd-over':
363
- isTaggedValueDragOver && !isReadOnly,
364
- })}
375
+ <PanelDropZone
376
+ isDragOver={isTaggedValueDragOver && !isReadOnly}
377
+ dropTargetConnector={dropTaggedValueRef}
365
378
  >
366
- {dataElement.taggedValues.map((taggedValue) => (
367
- <TaggedValueEditor
368
- key={taggedValue._UUID}
369
- taggedValue={taggedValue}
370
- deleteValue={deleteTaggedValue(taggedValue)}
371
- isReadOnly={isReadOnly}
372
- darkTheme={true}
373
- />
374
- ))}
375
- </div>
379
+ <div className="panel__content__lists">
380
+ <TaggedValueDragPreviewLayer />
381
+ {dataElement.taggedValues.map((taggedValue) => (
382
+ <TaggedValueEditor
383
+ annotatedElement={dataElement}
384
+ key={taggedValue._UUID}
385
+ taggedValue={taggedValue}
386
+ deleteValue={deleteTaggedValue(taggedValue)}
387
+ isReadOnly={isReadOnly}
388
+ darkTheme={true}
389
+ />
390
+ ))}
391
+ </div>
392
+ </PanelDropZone>
376
393
  </div>
377
394
  </div>
378
395
  </>
@@ -237,7 +237,7 @@ export const RelationalCSVDataEditor = observer(
237
237
  {!currentTableState && (
238
238
  <BlankPanelPlaceholder
239
239
  onClick={(): void => openIdentifierModal()}
240
- placeholderText="Add a relational data table"
240
+ text="Add a relational data table"
241
241
  clickActionType="add"
242
242
  tooltipText={'Click to add new relational data table'}
243
243
  />
@@ -55,9 +55,11 @@ import {
55
55
  FileCodeIcon,
56
56
  LockIcon,
57
57
  SaveIcon,
58
+ PanelDropZone,
58
59
  } from '@finos/legend-art';
59
60
  import {
60
61
  type FileGenerationSourceDropTarget,
62
+ type ElementDragSource,
61
63
  CORE_DND_TYPE,
62
64
  } from '../../../../stores/shared/DnDUtil.js';
63
65
  import type { FileGenerationState } from '../../../../stores/editor-state/FileGenerationState.js';
@@ -1332,15 +1334,19 @@ export const FileGenerationConfigurationEditor = observer(
1332
1334
  isReadOnly,
1333
1335
  ],
1334
1336
  );
1335
- const [{ isScopeElementDragOver }, scopeElementDropRef] = useDrop(
1337
+ const [{ isScopeElementDragOver }, scopeElementDropRef] = useDrop<
1338
+ ElementDragSource,
1339
+ void,
1340
+ { isScopeElementDragOver: boolean }
1341
+ >(
1336
1342
  () => ({
1337
1343
  accept: [
1338
1344
  CORE_DND_TYPE.PROJECT_EXPLORER_PACKAGE,
1339
1345
  CORE_DND_TYPE.PROJECT_EXPLORER_CLASS,
1340
1346
  CORE_DND_TYPE.PROJECT_EXPLORER_ENUMERATION,
1341
1347
  ],
1342
- drop: (item: FileGenerationSourceDropTarget): void => handleDrop(item),
1343
- collect: (monitor): { isScopeElementDragOver: boolean } => ({
1348
+ drop: (item) => handleDrop(item),
1349
+ collect: (monitor) => ({
1344
1350
  isScopeElementDragOver: monitor.isOver({ shallow: true }),
1345
1351
  }),
1346
1352
  }),
@@ -1381,50 +1387,49 @@ export const FileGenerationConfigurationEditor = observer(
1381
1387
  )}
1382
1388
  </div>
1383
1389
  </div>
1384
- <div ref={scopeElementDropRef} className="panel__content dnd__dropzone">
1385
- <div
1386
- className={clsx({
1387
- dnd__overlay:
1388
- isScopeElementDragOver &&
1389
- !elementGenerationState &&
1390
- !isReadOnly,
1391
- })}
1392
- />
1393
- <div className="file-generation-editor__configuration__content">
1394
- <FileGenerationScopeEditor
1395
- fileGenerationState={fileGenerationState}
1396
- regenerate={debouncedRegenerate}
1397
- isReadOnly={isReadOnly || Boolean(elementGenerationState)}
1398
- />
1399
- <div className="panel__content__form__section">
1400
- <div className="panel__content__form__section__header__label">
1401
- Generation Output Path
1402
- </div>
1403
- <div className="panel__content__form__section__header__prompt">
1404
- Specifies the root path where files will be generated. Defaults
1405
- to the file specification path
1406
- </div>
1407
- <input
1408
- className="panel__content__form__section__input"
1409
- spellCheck={false}
1410
- disabled={isReadOnly}
1411
- value={fileGeneration.generationOutputPath ?? ''}
1412
- onChange={changeValue}
1390
+ <div className="panel__content">
1391
+ <PanelDropZone
1392
+ dropTargetConnector={scopeElementDropRef}
1393
+ isDragOver={
1394
+ isScopeElementDragOver && !elementGenerationState && !isReadOnly
1395
+ }
1396
+ >
1397
+ <div className="file-generation-editor__configuration__content">
1398
+ <FileGenerationScopeEditor
1399
+ fileGenerationState={fileGenerationState}
1400
+ regenerate={debouncedRegenerate}
1401
+ isReadOnly={isReadOnly || Boolean(elementGenerationState)}
1413
1402
  />
1403
+ <div className="panel__content__form__section">
1404
+ <div className="panel__content__form__section__header__label">
1405
+ Generation Output Path
1406
+ </div>
1407
+ <div className="panel__content__form__section__header__prompt">
1408
+ Specifies the root path where files will be generated.
1409
+ Defaults to the file specification path
1410
+ </div>
1411
+ <input
1412
+ className="panel__content__form__section__input"
1413
+ spellCheck={false}
1414
+ disabled={isReadOnly}
1415
+ value={fileGeneration.generationOutputPath ?? ''}
1416
+ onChange={changeValue}
1417
+ />
1418
+ </div>
1419
+ {fileGenerationConfiguration.map((abstractGenerationProperty) => (
1420
+ <GenerationPropertyEditor
1421
+ key={
1422
+ abstractGenerationProperty.name +
1423
+ abstractGenerationProperty.type
1424
+ }
1425
+ update={update}
1426
+ isReadOnly={isReadOnly}
1427
+ getConfigValue={getConfigValue}
1428
+ property={abstractGenerationProperty}
1429
+ />
1430
+ ))}
1414
1431
  </div>
1415
- {fileGenerationConfiguration.map((abstractGenerationProperty) => (
1416
- <GenerationPropertyEditor
1417
- key={
1418
- abstractGenerationProperty.name +
1419
- abstractGenerationProperty.type
1420
- }
1421
- update={update}
1422
- isReadOnly={isReadOnly}
1423
- getConfigValue={getConfigValue}
1424
- property={abstractGenerationProperty}
1425
- />
1426
- ))}
1427
- </div>
1432
+ </PanelDropZone>
1428
1433
  </div>
1429
1434
  </div>
1430
1435
  );
@@ -25,6 +25,7 @@ import {
25
25
  ResizablePanelSplitterLine,
26
26
  TimesIcon,
27
27
  LockIcon,
28
+ PanelDropZone,
28
29
  } from '@finos/legend-art';
29
30
  import {
30
31
  filterByType,
@@ -121,7 +122,11 @@ const BindingScopeEditor = observer(
121
122
  handleDropElement,
122
123
  isReadOnly,
123
124
  } = props;
124
- const [{ isElementDragOver }, dropElementRef] = useDrop(
125
+ const [{ isElementDragOver }, dropElementRef] = useDrop<
126
+ ElementDragSource,
127
+ void,
128
+ { isElementDragOver: boolean }
129
+ >(
125
130
  () => ({
126
131
  accept: [
127
132
  CORE_DND_TYPE.PROJECT_EXPLORER_ENUMERATION,
@@ -131,8 +136,8 @@ const BindingScopeEditor = observer(
131
136
  CORE_DND_TYPE.PROJECT_EXPLORER_ASSOCIATION,
132
137
  CORE_DND_TYPE.PROJECT_EXPLORER_FUNCTION,
133
138
  ],
134
- drop: (item: ElementDragSource): void => handleDropElement(item),
135
- collect: (monitor): { isElementDragOver: boolean } => ({
139
+ drop: (item) => handleDropElement(item),
140
+ collect: (monitor) => ({
136
141
  isElementDragOver: monitor.isOver({ shallow: true }),
137
142
  }),
138
143
  }),
@@ -141,38 +146,37 @@ const BindingScopeEditor = observer(
141
146
 
142
147
  return (
143
148
  <div className="binding-scope-editor">
144
- <div
145
- ref={dropElementRef}
146
- className="binding-scope-editor__panel__content dnd__overlay__container"
147
- >
148
- <div
149
- className={clsx({ dnd__overlay: isElementDragOver && !isReadOnly })}
150
- />
151
- <div className="binding-scope-editor__panel__content__form">
152
- <div className="binding-scope-editor__panel__content__form__section">
153
- <div className="binding-scope-editor__panel__content__form__section__list">
154
- {elements.map((elementRef) => (
155
- <BindingScopeEntryEditor
156
- key={elementRef.value._UUID}
157
- elementRef={elementRef}
158
- removeElement={removeElement}
159
- isReadOnly={isReadOnly}
160
- />
161
- ))}
162
- <div className="binding-scope-editor__panel__content__form__section__list__new-item__add">
163
- <button
164
- className="binding-scope-editor__panel__content__form__section__list__new-item__add-btn btn btn--dark"
165
- disabled={!allowAddingElement}
166
- tabIndex={-1}
167
- onClick={addElement}
168
- title="Add Element"
169
- >
170
- Add Value
171
- </button>
149
+ <div className="binding-scope-editor__panel__content">
150
+ <PanelDropZone
151
+ dropTargetConnector={dropElementRef}
152
+ isDragOver={isElementDragOver && !isReadOnly}
153
+ >
154
+ <div className="binding-scope-editor__panel__content__form">
155
+ <div className="binding-scope-editor__panel__content__form__section">
156
+ <div className="binding-scope-editor__panel__content__form__section__list">
157
+ {elements.map((elementRef) => (
158
+ <BindingScopeEntryEditor
159
+ key={elementRef.value._UUID}
160
+ elementRef={elementRef}
161
+ removeElement={removeElement}
162
+ isReadOnly={isReadOnly}
163
+ />
164
+ ))}
165
+ <div className="binding-scope-editor__panel__content__form__section__list__new-item__add">
166
+ <button
167
+ className="binding-scope-editor__panel__content__form__section__list__new-item__add-btn btn btn--dark"
168
+ disabled={!allowAddingElement}
169
+ tabIndex={-1}
170
+ onClick={addElement}
171
+ title="Add Element"
172
+ >
173
+ Add Value
174
+ </button>
175
+ </div>
172
176
  </div>
173
177
  </div>
174
178
  </div>
175
- </div>
179
+ </PanelDropZone>
176
180
  </div>
177
181
  </div>
178
182
  );
@@ -422,7 +422,7 @@ const SchemaSetModelGenerationEditor = observer(
422
422
  </button>
423
423
  </div>
424
424
  </div>
425
- <div className="panel__content dnd__dropzone">
425
+ <div className="panel__content">
426
426
  <div className="file-generation-editor__configuration__content">
427
427
  {modelGenerationState.modelGenerationProperties.map(
428
428
  (abstractGenerationProperty) => (