@finos/legend-application-studio 13.0.3 → 13.1.2

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 (204) 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/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  19. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +10 -2
  20. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  21. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  22. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +4 -8
  23. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
  24. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +1 -1
  25. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
  26. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  27. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +3 -7
  28. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  29. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
  30. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +2 -2
  31. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -1
  32. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +1 -1
  33. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -1
  34. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -9
  36. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  37. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  38. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -4
  39. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
  40. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  41. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +3 -10
  42. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
  43. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  44. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +4 -10
  45. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
  46. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +7 -9
  47. package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
  48. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  49. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +3 -6
  50. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
  51. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
  52. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +7 -8
  53. package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
  54. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  55. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +1 -3
  56. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  57. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  58. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +5 -7
  59. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
  60. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  61. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +3 -4
  62. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
  63. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  64. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +1 -1
  65. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
  66. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  67. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +3 -5
  68. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
  69. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  70. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +6 -4
  71. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
  72. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
  73. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  74. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  75. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +6 -12
  76. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
  77. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  78. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +156 -62
  79. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  80. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  81. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +39 -21
  82. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
  83. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  84. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +62 -9
  85. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
  86. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  87. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +4 -8
  88. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -1
  89. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +7 -1
  90. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
  91. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +33 -5
  92. package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
  93. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +7 -1
  94. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
  95. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +35 -7
  96. package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
  97. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  98. package/lib/components/editor/side-bar/CreateNewElementModal.js +2 -3
  99. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  100. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  101. package/lib/components/editor/side-bar/Explorer.js +8 -9
  102. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  103. package/lib/components/shared/StudioLambdaEditor.d.ts +1 -0
  104. package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
  105. package/lib/components/shared/StudioLambdaEditor.js +2 -2
  106. package/lib/components/shared/StudioLambdaEditor.js.map +1 -1
  107. package/lib/index.css +2 -2
  108. package/lib/index.css.map +1 -1
  109. package/lib/package.json +5 -5
  110. package/lib/stores/EditorStore.d.ts.map +1 -1
  111. package/lib/stores/EditorStore.js +7 -7
  112. package/lib/stores/EditorStore.js.map +1 -1
  113. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  114. package/lib/stores/editor/NewElementState.js +12 -5
  115. package/lib/stores/editor/NewElementState.js.map +1 -1
  116. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +0 -2
  117. package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -1
  118. package/lib/stores/editor-state/GenerationSpecificationEditorState.js +1 -8
  119. package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -1
  120. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  121. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +2 -4
  122. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  123. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +2 -1
  124. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
  125. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +9 -1
  126. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
  127. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +1 -1
  128. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  129. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  130. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  131. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  132. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
  133. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  134. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
  135. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -2
  136. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  137. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  138. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +3 -3
  139. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  140. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +10 -0
  141. package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -1
  142. package/lib/stores/graphModifier/DomainGraphModifierHelper.js +31 -1
  143. package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -1
  144. package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +2 -1
  145. package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
  146. package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +3 -0
  147. package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
  148. package/lib/stores/shared/DnDUtil.d.ts +1 -2
  149. package/lib/stores/shared/DnDUtil.d.ts.map +1 -1
  150. package/lib/stores/shared/DnDUtil.js +0 -2
  151. package/lib/stores/shared/DnDUtil.js.map +1 -1
  152. package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
  153. package/lib/stores/shared/testable/TestableUtils.js +2 -3
  154. package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
  155. package/package.json +13 -13
  156. package/src/components/editor/command-center/ProjectSearchCommand.tsx +13 -2
  157. package/src/components/editor/edit-panel/FunctionEditor.tsx +220 -152
  158. package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +154 -184
  159. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +4 -5
  160. package/src/components/editor/edit-panel/RuntimeEditor.tsx +89 -90
  161. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +36 -0
  162. package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +57 -40
  163. package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +1 -1
  164. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +50 -45
  165. package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +36 -32
  166. package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +1 -1
  167. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +46 -41
  168. package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +9 -7
  169. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +18 -21
  170. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +39 -29
  171. package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +39 -39
  172. package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +23 -15
  173. package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +40 -38
  174. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +1 -3
  175. package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +48 -45
  176. package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +12 -8
  177. package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -3
  178. package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +75 -72
  179. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +63 -36
  180. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
  181. package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +56 -45
  182. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +812 -504
  183. package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +209 -113
  184. package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +184 -52
  185. package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +62 -39
  186. package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +137 -52
  187. package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +171 -88
  188. package/src/components/editor/side-bar/CreateNewElementModal.tsx +2 -1
  189. package/src/components/editor/side-bar/Explorer.tsx +11 -15
  190. package/src/components/shared/StudioLambdaEditor.tsx +3 -0
  191. package/src/stores/EditorStore.ts +7 -6
  192. package/src/stores/editor/NewElementState.ts +12 -5
  193. package/src/stores/editor-state/GenerationSpecificationEditorState.ts +1 -15
  194. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +2 -3
  195. package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +10 -0
  196. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -1
  197. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  198. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -0
  199. package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +2 -1
  200. package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +12 -3
  201. package/src/stores/graphModifier/DomainGraphModifierHelper.ts +92 -0
  202. package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +10 -0
  203. package/src/stores/shared/DnDUtil.ts +0 -2
  204. package/src/stores/shared/testable/TestableUtils.ts +4 -3
@@ -27,8 +27,6 @@ import {
27
27
  clsx,
28
28
  ContextMenu,
29
29
  ProgressBar,
30
- VerticalAlignBottomIcon,
31
- AddIcon,
32
30
  PlayIcon,
33
31
  EmptyCircleIcon,
34
32
  TimesCircleIcon,
@@ -38,6 +36,8 @@ import {
38
36
  EmptyStopCircleIcon,
39
37
  ExclamationCircleIcon,
40
38
  PauseCircleIcon,
39
+ PanelDropZone,
40
+ BlankPanelPlaceholder,
41
41
  } from '@finos/legend-art';
42
42
  import {
43
43
  type MappingElementDragSource,
@@ -369,11 +369,15 @@ export const MappingTestsExplorer = observer(
369
369
  },
370
370
  [applicationStore.alertUnhandledError, isReadOnly, mappingEditorState],
371
371
  );
372
- const [{ isDragOver }, dropRef] = useDrop(
372
+ const [{ isDragOver }, dropRef] = useDrop<
373
+ MappingElementDragSource,
374
+ void,
375
+ { isDragOver: boolean }
376
+ >(
373
377
  () => ({
374
378
  accept: CORE_DND_TYPE.MAPPING_EXPLORER_CLASS_MAPPING,
375
- drop: (item: MappingElementDragSource): void => handleDrop(item),
376
- collect: (monitor): { isDragOver: boolean } => ({
379
+ drop: (item) => handleDrop(item),
380
+ collect: (monitor) => ({
377
381
  isDragOver: monitor.isOver({ shallow: true }),
378
382
  }),
379
383
  }),
@@ -474,40 +478,38 @@ export const MappingTestsExplorer = observer(
474
478
  }
475
479
  menuProps={{ elevation: 7 }}
476
480
  >
477
- <div
478
- ref={dropRef}
479
- className={clsx('mapping-test-explorer__content', {
480
- 'mapping-test-explorer__content--dnd-over':
481
- isDragOver && !isReadOnly,
482
- })}
481
+ <PanelDropZone
482
+ isDragOver={isDragOver && !isReadOnly}
483
+ dropTargetConnector={dropRef}
483
484
  >
484
- {Boolean(mappingEditorState.mappingTestStates.length) &&
485
- mappingEditorState.mappingTestStates
486
- .slice()
487
- .map((testState) => (
488
- <MappingTestExplorer
489
- key={testState.test._UUID}
490
- testState={testState}
491
- isReadOnly={isReadOnly}
492
- />
493
- ))}
494
- {/* TODO: use BlankPanelPlaceholder */}
495
- {!isReadOnly && !mappingEditorState.mappingTestStates.length && (
496
- <div
497
- className="mapping-test-explorer__content mapping-test-explorer__content__adder"
498
- onClick={showClassMappingSelectorModal}
499
- >
500
- <div className="mapping-test-explorer__content__adder__text">
501
- {new Randomizer().getRandomItemInCollection(addTestPromps) ??
502
- addTestPromps[0]}
503
- </div>
504
- <div className="mapping-test-explorer__content__adder__action">
505
- <VerticalAlignBottomIcon className="mapping-test-explorer__content__adder__action__dnd-icon" />
506
- <AddIcon className="mapping-test-explorer__content__adder__action__add-icon" />
507
- </div>
508
- </div>
509
- )}
510
- </div>
485
+ <div className="mapping-test-explorer__content">
486
+ {Boolean(mappingEditorState.mappingTestStates.length) &&
487
+ mappingEditorState.mappingTestStates
488
+ .slice()
489
+ .map((testState) => (
490
+ <MappingTestExplorer
491
+ key={testState.test._UUID}
492
+ testState={testState}
493
+ isReadOnly={isReadOnly}
494
+ />
495
+ ))}
496
+ {!isReadOnly && !mappingEditorState.mappingTestStates.length && (
497
+ <BlankPanelPlaceholder
498
+ text={
499
+ new Randomizer().getRandomItemInCollection(addTestPromps) ??
500
+ addTestPromps[0] ??
501
+ 'Add a mapping test'
502
+ }
503
+ onClick={showClassMappingSelectorModal}
504
+ clickActionType="add"
505
+ tooltipText="Drop a mapping element to start testing"
506
+ isDropZoneActive={isDragOver && !isReadOnly}
507
+ disabled={isReadOnly}
508
+ previewText="No test"
509
+ />
510
+ )}
511
+ </div>
512
+ </PanelDropZone>
511
513
  </ContextMenu>
512
514
  {openClassMappingSelectorModal && (
513
515
  <ClassMappingSelectorModal
@@ -235,9 +235,7 @@ export const NewMappingElementModal = observer(() => {
235
235
  filterOption={filterOption}
236
236
  onChange={handleTargetChange}
237
237
  value={selectedOption}
238
- formatOptionLabel={getPackageableElementOptionFormatter({
239
- graphManagerState: editorStore.graphManagerState,
240
- })}
238
+ formatOptionLabel={getPackageableElementOptionFormatter({})}
241
239
  placeholder="Choose a target"
242
240
  isClearable={true}
243
241
  />
@@ -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"
@@ -212,12 +212,14 @@ export const NewConnectionDataModal = observer(
212
212
  const dataElementOptions = testDataState.editorStore.dataOptions;
213
213
  const newConnectionState = testDataState.newConnectionDataState;
214
214
  const dataElement = newConnectionState.dataElement;
215
- const selectedOption = dataElement ? buildElementOption(dataElement) : null;
215
+ const selectedDataElement = dataElement
216
+ ? buildElementOption(dataElement)
217
+ : null;
216
218
  const onDataElementChange = (val: {
217
219
  label: string;
218
220
  value?: DataElement;
219
221
  }): void => {
220
- if (val.value !== selectedOption?.value && val.value) {
222
+ if (val.value !== selectedDataElement?.value && val.value) {
221
223
  newConnectionState.setDataElement(val.value);
222
224
  }
223
225
  };
@@ -265,7 +267,7 @@ export const NewConnectionDataModal = observer(
265
267
  // external format
266
268
  const selectedEmbeddedType = newConnectionState.embeddedDataType
267
269
  ? {
268
- label: prettyCONSTName(newConnectionState.embeddedDataType.label),
270
+ label: prettyCONSTName(newConnectionState.embeddedDataType.value),
269
271
  value: newConnectionState.embeddedDataType.value,
270
272
  }
271
273
  : undefined;
@@ -301,42 +303,67 @@ export const NewConnectionDataModal = observer(
301
303
  >
302
304
  <form
303
305
  onSubmit={handleSubmit}
304
- className="modal modal--dark search-modal"
306
+ className="modal service-test-data-modal modal--dark"
305
307
  >
306
- <div className="modal__title">Create a connection test data</div>
307
- <div className="explorer__new-element-modal__driver">
308
- <CustomSelectorInput
309
- className="explorer__new-element-modal__driver__dropdown"
310
- options={connectionOptions}
311
- onChange={onConnectionSelectionChange}
312
- value={selectedConnection}
313
- isClearable={false}
314
- darkMode={true}
315
- />
308
+ <div className="modal__header">
309
+ <div className="modal__title">Create a connection test data</div>
316
310
  </div>
317
- <div className="explorer__new-element-modal__driver">
318
- <CustomSelectorInput
319
- className="explorer__new-element-modal__driver__dropdown"
320
- options={embeddedOptions}
321
- onChange={onEmbeddedTypeChange}
322
- value={selectedEmbeddedType}
323
- isClearable={false}
324
- darkMode={true}
325
- />
326
- </div>
327
- {selectedEmbeddedType?.value === EmbeddedDataType.DATA_ELEMENT && (
328
- <div className="explorer__new-element-modal__driver">
329
- <CustomSelectorInput
330
- className="panel__content__form__section__dropdown data-element-reference-editor__value__dropdown"
331
- disabled={isReadOnly}
332
- options={dataElementOptions}
333
- onChange={onDataElementChange}
334
- value={selectedOption}
335
- darkMode={true}
336
- />
311
+ <div className="modal__body">
312
+ <div className="panel__content__form__section">
313
+ <div className="panel__content__form__section__header__label">
314
+ Connection ID
315
+ </div>
316
+ <div className="panel__content__form__section__header__prompt">
317
+ Connection in runtime to povide test data for
318
+ </div>
319
+ <div className="explorer__new-element-modal__driver">
320
+ <CustomSelectorInput
321
+ className="explorer__new-element-modal__driver__dropdown"
322
+ options={connectionOptions}
323
+ onChange={onConnectionSelectionChange}
324
+ value={selectedConnection}
325
+ isClearable={false}
326
+ darkMode={true}
327
+ />
328
+ </div>
337
329
  </div>
338
- )}
339
- <div className="search-modal__actions">
330
+ <div className="panel__content__form__section">
331
+ <div className="panel__content__form__section__header__label">
332
+ Data Type
333
+ </div>
334
+ <div className="panel__content__form__section__header__prompt">
335
+ Test data type that will be loaded to your test connection
336
+ </div>
337
+ <div className="explorer__new-element-modal__driver">
338
+ <CustomSelectorInput
339
+ className="explorer__new-element-modal__driver__dropdown"
340
+ options={embeddedOptions}
341
+ onChange={onEmbeddedTypeChange}
342
+ value={selectedEmbeddedType}
343
+ isClearable={false}
344
+ darkMode={true}
345
+ />
346
+ </div>
347
+ </div>
348
+ {selectedEmbeddedType?.value === EmbeddedDataType.DATA_ELEMENT && (
349
+ <div className="panel__content__form__section">
350
+ <div className="panel__content__form__section__header__label">
351
+ Data Element
352
+ </div>
353
+ <div className="explorer__new-element-modal__driver">
354
+ <CustomSelectorInput
355
+ className="panel__content__form__section__dropdown data-element-reference-editor__value__dropdown"
356
+ disabled={isReadOnly}
357
+ options={dataElementOptions}
358
+ onChange={onDataElementChange}
359
+ value={selectedDataElement}
360
+ darkMode={true}
361
+ />
362
+ </div>
363
+ </div>
364
+ )}
365
+ </div>
366
+ <div className="modal__footer">
340
367
  <button
341
368
  type="button"
342
369
  className="btn btn--dark"
@@ -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"