@finos/legend-application-studio 27.1.2 → 27.1.4

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 (141) hide show
  1. package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts +1 -1
  2. package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioApplicationNavigationContext.js +1 -1
  4. package/lib/__lib__/LegendStudioApplicationNavigationContext.js.map +1 -1
  5. package/lib/__lib__/LegendStudioDocumentation.d.ts +3 -1
  6. package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
  7. package/lib/__lib__/LegendStudioDocumentation.js +3 -0
  8. package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
  9. package/lib/__lib__/LegendStudioTesting.d.ts +1 -0
  10. package/lib/__lib__/LegendStudioTesting.d.ts.map +1 -1
  11. package/lib/__lib__/LegendStudioTesting.js +1 -0
  12. package/lib/__lib__/LegendStudioTesting.js.map +1 -1
  13. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  14. package/lib/application/LegendStudioApplicationConfig.js +1 -1
  15. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  16. package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
  17. package/lib/components/editor/editor-group/FunctionEditor.js +6 -3
  18. package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
  19. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts.map +1 -1
  20. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +2 -2
  21. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
  22. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js +1 -1
  23. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js.map +1 -1
  24. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
  25. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +47 -12
  26. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
  27. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  28. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js +61 -11
  29. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  30. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -1
  31. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js +1 -1
  32. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js.map +1 -1
  33. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -1
  34. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  35. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  36. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js +9 -5
  37. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
  38. package/lib/components/editor/editor-group/uml-editor/ClassEditor.d.ts.map +1 -1
  39. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +26 -27
  40. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
  41. package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js +2 -2
  42. package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js.map +1 -1
  43. package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js +3 -3
  44. package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js.map +1 -1
  45. package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js +2 -2
  46. package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js.map +1 -1
  47. package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js +2 -2
  48. package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js.map +1 -1
  49. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  50. package/lib/components/editor/side-bar/ProjectOverview.js +7 -1
  51. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  52. package/lib/index.css +2 -2
  53. package/lib/index.css.map +1 -1
  54. package/lib/package.json +4 -4
  55. package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts +8 -2
  56. package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts.map +1 -1
  57. package/lib/stores/editor/editor-state/element-editor-state/ClassState.js +10 -6
  58. package/lib/stores/editor/editor-state/element-editor-state/ClassState.js.map +1 -1
  59. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +5 -1
  60. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  61. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +7 -5
  62. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  63. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts +4 -1
  64. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts.map +1 -1
  65. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js +7 -5
  66. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js.map +1 -1
  67. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts +10 -3
  68. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts.map +1 -1
  69. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js +7 -5
  70. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js.map +1 -1
  71. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +1 -1
  72. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
  73. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js +2 -2
  74. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  75. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +3 -1
  76. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  77. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +4 -4
  78. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  79. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts +8 -2
  80. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts.map +1 -1
  81. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js +10 -6
  82. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js.map +1 -1
  83. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts +11 -3
  84. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts.map +1 -1
  85. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js +6 -4
  86. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js.map +1 -1
  87. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +3 -1
  88. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  89. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +3 -3
  90. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  91. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +3 -1
  92. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  93. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +4 -4
  94. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  95. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts +8 -2
  96. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts.map +1 -1
  97. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js +12 -8
  98. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js.map +1 -1
  99. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +1 -1
  100. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  101. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +13 -8
  102. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  103. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +6 -2
  104. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  105. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +39 -3
  106. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  107. package/lib/stores/editor/utils/TestableUtils.js +2 -2
  108. package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
  109. package/package.json +14 -14
  110. package/src/__lib__/LegendStudioApplicationNavigationContext.ts +1 -1
  111. package/src/__lib__/LegendStudioDocumentation.ts +4 -0
  112. package/src/__lib__/LegendStudioTesting.ts +1 -0
  113. package/src/application/LegendStudioApplicationConfig.ts +1 -1
  114. package/src/components/editor/editor-group/FunctionEditor.tsx +8 -6
  115. package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +5 -2
  116. package/src/components/editor/editor-group/mapping-editor/MappingExplorer.tsx +1 -1
  117. package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +68 -17
  118. package/src/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.tsx +137 -12
  119. package/src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx +0 -1
  120. package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +3 -3
  121. package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +53 -18
  122. package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +358 -364
  123. package/src/components/editor/editor-group/uml-editor/EnumerationEditor.tsx +4 -4
  124. package/src/components/editor/editor-group/uml-editor/ProfileEditor.tsx +7 -7
  125. package/src/components/editor/editor-group/uml-editor/StereotypeSelector.tsx +4 -4
  126. package/src/components/editor/editor-group/uml-editor/TaggedValueEditor.tsx +4 -4
  127. package/src/components/editor/side-bar/ProjectOverview.tsx +14 -3
  128. package/src/stores/editor/editor-state/element-editor-state/ClassState.ts +16 -6
  129. package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +11 -8
  130. package/src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts +10 -5
  131. package/src/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.ts +14 -5
  132. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +2 -2
  133. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +6 -4
  134. package/src/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.ts +16 -6
  135. package/src/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.ts +14 -4
  136. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +5 -3
  137. package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +6 -4
  138. package/src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts +22 -10
  139. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +21 -8
  140. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +59 -2
  141. package/src/stores/editor/utils/TestableUtils.ts +2 -2
@@ -40,7 +40,7 @@ import {
40
40
  ArrowCircleRightIcon,
41
41
  FireIcon,
42
42
  StickArrowCircleRightIcon,
43
- PanelDnDEntryDragHandle,
43
+ PanelEntryDragHandle,
44
44
  DragPreviewLayer,
45
45
  useDragPreviewLayer,
46
46
  PanelDropZone,
@@ -289,191 +289,187 @@ const PropertyBasicEditor = observer(
289
289
  editorStore.graphEditorMode.openElement(property._OWNER);
290
290
 
291
291
  return (
292
- <>
293
- <PanelDnDEntry
294
- ref={ref}
295
- placeholder={<div className="dnd__placeholder--light"></div>}
296
- showPlaceholder={isBeingDragged}
297
- className="property-basic-editor__container"
298
- >
292
+ <PanelDnDEntry
293
+ ref={ref}
294
+ placeholder={<div className="dnd__placeholder--light"></div>}
295
+ showPlaceholder={isBeingDragged}
296
+ className="property-basic-editor__container"
297
+ >
298
+ {!isIndirectProperty && (
299
+ <PanelEntryDragHandle
300
+ isDragging={isBeingDragged}
301
+ dragSourceConnector={handleRef}
302
+ />
303
+ )}
304
+ <div className="property-basic-editor">
305
+ {isIndirectProperty && (
306
+ <div className="property-basic-editor__name property-basic-editor__name--with-lock">
307
+ <div className="property-basic-editor__name--with-lock__icon">
308
+ <LockIcon />
309
+ </div>
310
+ <span className="property-basic-editor__name--with-lock__name">
311
+ {property.name}
312
+ </span>
313
+ </div>
314
+ )}
299
315
  {!isIndirectProperty && (
300
- <PanelDnDEntryDragHandle
301
- isBeingDragged={isBeingDragged}
302
- dropTargetConnector={handleRef}
316
+ <div className="input-group__input property-basic-editor__input">
317
+ <InputWithInlineValidation
318
+ className="property-basic-editor__input--with-validation input-group__input"
319
+ disabled={isReadOnly}
320
+ value={property.name}
321
+ spellCheck={false}
322
+ onChange={changeValue}
323
+ placeholder="Property name"
324
+ error={
325
+ isPropertyDuplicated(property)
326
+ ? 'Duplicated property'
327
+ : undefined
328
+ }
329
+ />
330
+ </div>
331
+ )}
332
+ {!isIndirectProperty && !isReadOnly && isEditingType && (
333
+ <CustomSelectorInput
334
+ className="property-basic-editor__type"
335
+ options={propertyTypeOptions}
336
+ onChange={changePropertyType}
337
+ value={selectedPropertyType}
338
+ placeholder="Choose a type..."
339
+ filterOption={filterOption}
340
+ formatOptionLabel={getPackageableElementOptionFormatter({})}
303
341
  />
304
342
  )}
305
- <div className="property-basic-editor">
306
- {isIndirectProperty && (
307
- <div className="property-basic-editor__name property-basic-editor__name--with-lock">
308
- <div className="property-basic-editor__name--with-lock__icon">
309
- <LockIcon />
343
+ {!isIndirectProperty && !isReadOnly && !isEditingType && (
344
+ <div
345
+ className={clsx(
346
+ 'property-basic-editor__type',
347
+ 'property-basic-editor__type--show-click-hint',
348
+ `background--${propertyTypeName.toLowerCase()}`,
349
+ {
350
+ 'property-basic-editor__type--has-visit-btn':
351
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
352
+ },
353
+ )}
354
+ >
355
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
356
+ <div className="property-basic-editor__type__abbr">
357
+ {getElementIcon(propertyType, editorStore)}
310
358
  </div>
311
- <span className="property-basic-editor__name--with-lock__name">
312
- {property.name}
313
- </span>
314
- </div>
315
- )}
316
- {!isIndirectProperty && (
317
- <div className="input-group__input property-basic-editor__input">
318
- <InputWithInlineValidation
319
- className="property-basic-editor__input--with-validation input-group__input"
320
- disabled={isReadOnly}
321
- value={property.name}
322
- spellCheck={false}
323
- onChange={changeValue}
324
- placeholder="Property name"
325
- error={
326
- isPropertyDuplicated(property)
327
- ? 'Duplicated property'
328
- : undefined
329
- }
330
- />
359
+ )}
360
+ <div className="property-basic-editor__type__label">
361
+ {propertyType.name}
331
362
  </div>
332
- )}
333
- {!isIndirectProperty && !isReadOnly && isEditingType && (
334
- <CustomSelectorInput
335
- className="property-basic-editor__type"
336
- options={propertyTypeOptions}
337
- onChange={changePropertyType}
338
- value={selectedPropertyType}
339
- placeholder="Choose a type..."
340
- filterOption={filterOption}
341
- formatOptionLabel={getPackageableElementOptionFormatter({})}
342
- />
343
- )}
344
- {!isIndirectProperty && !isReadOnly && !isEditingType && (
345
363
  <div
346
- className={clsx(
347
- 'property-basic-editor__type',
348
- 'property-basic-editor__type--show-click-hint',
349
- `background--${propertyTypeName.toLowerCase()}`,
350
- {
351
- 'property-basic-editor__type--has-visit-btn':
352
- propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
353
- },
354
- )}
364
+ data-testid={
365
+ LEGEND_STUDIO_TEST_ID.PROPERTY_BASIC_EDITOR__TYPE__LABEL_HOVER
366
+ }
367
+ className="property-basic-editor__type__label property-basic-editor__type__label--hover"
368
+ onClick={(): void => setIsEditingType(true)}
355
369
  >
356
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
357
- <div className="property-basic-editor__type__abbr">
358
- {getElementIcon(propertyType, editorStore)}
359
- </div>
360
- )}
361
- <div className="property-basic-editor__type__label">
362
- {propertyType.name}
363
- </div>
364
- <div
365
- data-testid={
366
- LEGEND_STUDIO_TEST_ID.PROPERTY_BASIC_EDITOR__TYPE__LABEL_HOVER
367
- }
368
- className="property-basic-editor__type__label property-basic-editor__type__label--hover"
369
- onClick={(): void => setIsEditingType(true)}
370
- >
371
- Click to edit
372
- </div>
373
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
374
- <button
375
- data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
376
- className="property-basic-editor__type__visit-btn"
377
- onClick={openElement}
378
- tabIndex={-1}
379
- title="Visit element"
380
- >
381
- <ArrowCircleRightIcon />
382
- </button>
383
- )}
370
+ Click to edit
384
371
  </div>
385
- )}
386
- {(isIndirectProperty || isReadOnly) && (
387
- <div
388
- className={clsx(
389
- 'property-basic-editor__type',
390
- `background--${propertyTypeName.toLowerCase()}`,
391
- {
392
- 'property-basic-editor__type--has-visit-btn':
393
- propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
394
- },
395
- )}
396
- >
397
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
398
- <div className="property-basic-editor__type__abbr">
399
- {getElementIcon(propertyType, editorStore)}
400
- </div>
401
- )}
402
- <div className="property-basic-editor__type__label">
403
- {propertyType.name}
372
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
373
+ <button
374
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
375
+ className="property-basic-editor__type__visit-btn"
376
+ onClick={openElement}
377
+ tabIndex={-1}
378
+ title="Visit element"
379
+ >
380
+ <ArrowCircleRightIcon />
381
+ </button>
382
+ )}
383
+ </div>
384
+ )}
385
+ {(isIndirectProperty || isReadOnly) && (
386
+ <div
387
+ className={clsx(
388
+ 'property-basic-editor__type',
389
+ `background--${propertyTypeName.toLowerCase()}`,
390
+ {
391
+ 'property-basic-editor__type--has-visit-btn':
392
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
393
+ },
394
+ )}
395
+ >
396
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
397
+ <div className="property-basic-editor__type__abbr">
398
+ {getElementIcon(propertyType, editorStore)}
404
399
  </div>
405
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
406
- <button
407
- data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
408
- className="property-basic-editor__type__visit-btn"
409
- onClick={openElement}
410
- tabIndex={-1}
411
- title="Visit element"
412
- >
413
- <ArrowCircleRightIcon />
414
- </button>
415
- )}
416
- </div>
417
- )}
418
- <div className="property-basic-editor__multiplicity">
419
- <input
420
- className="property-basic-editor__multiplicity-bound"
421
- disabled={isIndirectProperty || isReadOnly}
422
- spellCheck={false}
423
- value={lowerBound}
424
- onChange={changeLowerBound}
425
- />
426
- <div className="property-basic-editor__multiplicity__range">
427
- ..
400
+ )}
401
+ <div className="property-basic-editor__type__label">
402
+ {propertyType.name}
428
403
  </div>
429
- <input
430
- className="property-basic-editor__multiplicity-bound"
431
- disabled={isIndirectProperty || isReadOnly}
432
- spellCheck={false}
433
- value={upperBound}
434
- onChange={changeUpperBound}
435
- />
404
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
405
+ <button
406
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
407
+ className="property-basic-editor__type__visit-btn"
408
+ onClick={openElement}
409
+ tabIndex={-1}
410
+ title="Visit element"
411
+ >
412
+ <ArrowCircleRightIcon />
413
+ </button>
414
+ )}
436
415
  </div>
437
- {!isIndirectProperty && (
438
- <button
439
- className="uml-element-editor__basic__detail-btn"
440
- onClick={selectProperty}
441
- tabIndex={-1}
442
- title="See detail"
443
- >
444
- <LongArrowRightIcon />
445
- </button>
446
- )}
447
- {isIndirectProperty && (
448
- <button
449
- className="uml-element-editor__visit-parent-element-btn"
450
- onClick={visitOwner}
451
- tabIndex={-1}
452
- title={`Visit ${
453
- isInheritedProperty ? 'super type class' : 'association'
454
- } '${property._OWNER.path}'`}
455
- >
456
- <ArrowCircleRightIcon />
457
- </button>
458
- )}
459
- {isIndirectProperty && (
460
- <div className="property-basic-editor__locked-property-end-block"></div>
461
- )}
462
- {!isIndirectProperty && !isReadOnly && (
463
- <button
464
- className={clsx('uml-element-editor__remove-btn', {
465
- 'uml-element-editor__remove-btn--hidden': isIndirectProperty,
466
- })}
467
- onClick={deleteProperty}
468
- tabIndex={-1}
469
- title="Remove"
470
- >
471
- <TimesIcon />
472
- </button>
473
- )}
416
+ )}
417
+ <div className="property-basic-editor__multiplicity">
418
+ <input
419
+ className="property-basic-editor__multiplicity-bound"
420
+ disabled={isIndirectProperty || isReadOnly}
421
+ spellCheck={false}
422
+ value={lowerBound}
423
+ onChange={changeLowerBound}
424
+ />
425
+ <div className="property-basic-editor__multiplicity__range">..</div>
426
+ <input
427
+ className="property-basic-editor__multiplicity-bound"
428
+ disabled={isIndirectProperty || isReadOnly}
429
+ spellCheck={false}
430
+ value={upperBound}
431
+ onChange={changeUpperBound}
432
+ />
474
433
  </div>
475
- </PanelDnDEntry>
476
- </>
434
+ {!isIndirectProperty && (
435
+ <button
436
+ className="uml-element-editor__basic__detail-btn"
437
+ onClick={selectProperty}
438
+ tabIndex={-1}
439
+ title="See detail"
440
+ >
441
+ <LongArrowRightIcon />
442
+ </button>
443
+ )}
444
+ {isIndirectProperty && (
445
+ <button
446
+ className="uml-element-editor__visit-parent-element-btn"
447
+ onClick={visitOwner}
448
+ tabIndex={-1}
449
+ title={`Visit ${
450
+ isInheritedProperty ? 'super type class' : 'association'
451
+ } '${property._OWNER.path}'`}
452
+ >
453
+ <ArrowCircleRightIcon />
454
+ </button>
455
+ )}
456
+ {isIndirectProperty && (
457
+ <div className="property-basic-editor__locked-property-end-block"></div>
458
+ )}
459
+ {!isIndirectProperty && !isReadOnly && (
460
+ <button
461
+ className={clsx('uml-element-editor__remove-btn', {
462
+ 'uml-element-editor__remove-btn--hidden': isIndirectProperty,
463
+ })}
464
+ onClick={deleteProperty}
465
+ tabIndex={-1}
466
+ title="Remove"
467
+ >
468
+ <TimesIcon />
469
+ </button>
470
+ )}
471
+ </div>
472
+ </PanelDnDEntry>
477
473
  );
478
474
  },
479
475
  );
@@ -654,204 +650,202 @@ const DerivedPropertyBasicEditor = observer(
654
650
  const visitOwner = (): void =>
655
651
  editorStore.graphEditorMode.openElement(derivedProperty._OWNER);
656
652
  const remove = applicationStore.guardUnhandledError(async () => {
657
- await flowResult(dpState.convertLambdaObjectToGrammarString(false));
653
+ await flowResult(
654
+ dpState.convertLambdaObjectToGrammarString({ pretty: false }),
655
+ );
658
656
  deleteDerivedProperty();
659
657
  });
660
658
 
661
659
  return (
662
- <>
663
- <PanelDnDEntry
664
- ref={ref}
665
- placeholder={<div className="uml-element-editor__dnd__placeholder" />}
666
- className="derived-property-editor__container"
667
- showPlaceholder={isBeingDragged}
660
+ <PanelDnDEntry
661
+ ref={ref}
662
+ placeholder={<div className="uml-element-editor__dnd__placeholder" />}
663
+ className="derived-property-editor__container"
664
+ showPlaceholder={isBeingDragged}
665
+ >
666
+ <div
667
+ className={clsx('derived-property-editor', {
668
+ backdrop__element:
669
+ dpState.parserError && !isInheritedProperty && !isReadOnly,
670
+ })}
668
671
  >
669
- <div
670
- className={clsx('derived-property-editor', {
671
- backdrop__element:
672
- dpState.parserError && !isInheritedProperty && !isReadOnly,
673
- })}
674
- >
675
- <div className="property-basic-editor">
676
- {!isInheritedProperty && (
677
- <PanelDnDEntryDragHandle
678
- dropTargetConnector={handleRef}
679
- isBeingDragged={isBeingDragged}
680
- />
681
- )}
682
- {isInheritedProperty && (
683
- <div className="property-basic-editor__name property-basic-editor__name--with-lock">
684
- <div className="property-basic-editor__name--with-lock__icon">
685
- <LockIcon />
686
- </div>
687
- <span className="property-basic-editor__name--with-lock__name">
688
- {derivedProperty.name}
689
- </span>
672
+ <div className="property-basic-editor">
673
+ {!isInheritedProperty && (
674
+ <PanelEntryDragHandle
675
+ dragSourceConnector={handleRef}
676
+ isDragging={isBeingDragged}
677
+ />
678
+ )}
679
+ {isInheritedProperty && (
680
+ <div className="property-basic-editor__name property-basic-editor__name--with-lock">
681
+ <div className="property-basic-editor__name--with-lock__icon">
682
+ <LockIcon />
690
683
  </div>
691
- )}
692
- {!isInheritedProperty && (
693
- <input
694
- disabled={isReadOnly}
695
- spellCheck={false}
696
- className="property-basic-editor__name property-basic-editor__qualififed-property__name"
697
- value={derivedProperty.name}
698
- placeholder="Property name"
699
- onChange={changeValue}
700
- />
701
- )}
702
- {!isInheritedProperty && !isReadOnly && isEditingType && (
703
- <CustomSelectorInput
704
- className="property-basic-editor__type property-basic-editor__qualififed-property__type"
705
- options={propertyTypeOptions}
706
- onChange={changePropertyType}
707
- value={selectedPropertyType}
708
- placeholder="Choose a type..."
709
- filterOption={filterOption}
710
- formatOptionLabel={getPackageableElementOptionFormatter({})}
711
- />
712
- )}
713
- {!isInheritedProperty && !isReadOnly && !isEditingType && (
714
- <div
715
- className={clsx(
716
- 'property-basic-editor__type',
717
- 'property-basic-editor__type--show-click-hint',
718
- `background--${propertyTypeName.toLowerCase()}`,
719
- {
720
- 'property-basic-editor__type--has-visit-btn':
721
- propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
722
- },
723
- )}
724
- >
725
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
726
- <div className="property-basic-editor__type__abbr">
727
- {getElementIcon(propertyType, editorStore)}
728
- </div>
729
- )}
730
- <div className="property-basic-editor__type__label">
731
- {propertyType.name}
732
- </div>
733
- <div
734
- data-testid={
735
- LEGEND_STUDIO_TEST_ID.PROPERTY_BASIC_EDITOR__TYPE__LABEL_HOVER
736
- }
737
- className="property-basic-editor__type__label property-basic-editor__type__label--hover"
738
- onClick={(): void => setIsEditingType(true)}
739
- >
740
- Click to edit
684
+ <span className="property-basic-editor__name--with-lock__name">
685
+ {derivedProperty.name}
686
+ </span>
687
+ </div>
688
+ )}
689
+ {!isInheritedProperty && (
690
+ <input
691
+ disabled={isReadOnly}
692
+ spellCheck={false}
693
+ className="property-basic-editor__name property-basic-editor__qualififed-property__name"
694
+ value={derivedProperty.name}
695
+ placeholder="Property name"
696
+ onChange={changeValue}
697
+ />
698
+ )}
699
+ {!isInheritedProperty && !isReadOnly && isEditingType && (
700
+ <CustomSelectorInput
701
+ className="property-basic-editor__type property-basic-editor__qualififed-property__type"
702
+ options={propertyTypeOptions}
703
+ onChange={changePropertyType}
704
+ value={selectedPropertyType}
705
+ placeholder="Choose a type..."
706
+ filterOption={filterOption}
707
+ formatOptionLabel={getPackageableElementOptionFormatter({})}
708
+ />
709
+ )}
710
+ {!isInheritedProperty && !isReadOnly && !isEditingType && (
711
+ <div
712
+ className={clsx(
713
+ 'property-basic-editor__type',
714
+ 'property-basic-editor__type--show-click-hint',
715
+ `background--${propertyTypeName.toLowerCase()}`,
716
+ {
717
+ 'property-basic-editor__type--has-visit-btn':
718
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
719
+ },
720
+ )}
721
+ >
722
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
723
+ <div className="property-basic-editor__type__abbr">
724
+ {getElementIcon(propertyType, editorStore)}
741
725
  </div>
742
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
743
- <button
744
- data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
745
- className="property-basic-editor__type__visit-btn"
746
- onClick={openElement}
747
- tabIndex={-1}
748
- title="Visit element"
749
- >
750
- <ArrowCircleRightIcon />
751
- </button>
752
- )}
726
+ )}
727
+ <div className="property-basic-editor__type__label">
728
+ {propertyType.name}
753
729
  </div>
754
- )}
755
- {(isInheritedProperty || isReadOnly) && (
756
730
  <div
757
- className={clsx(
758
- 'property-basic-editor__type',
759
- `background--${propertyTypeName.toLowerCase()}`,
760
- {
761
- 'property-basic-editor__type--has-visit-btn':
762
- propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
763
- },
764
- )}
731
+ data-testid={
732
+ LEGEND_STUDIO_TEST_ID.PROPERTY_BASIC_EDITOR__TYPE__LABEL_HOVER
733
+ }
734
+ className="property-basic-editor__type__label property-basic-editor__type__label--hover"
735
+ onClick={(): void => setIsEditingType(true)}
765
736
  >
766
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
767
- <div className="property-basic-editor__type__abbr">
768
- {getElementIcon(propertyType, editorStore)}
769
- </div>
770
- )}
771
- <div className="property-basic-editor__type__label">
772
- {propertyType.name}
773
- </div>
774
- {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
775
- <button
776
- data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
777
- className="property-basic-editor__type__visit-btn"
778
- onClick={openElement}
779
- tabIndex={-1}
780
- title="Visit element"
781
- >
782
- <ArrowCircleRightIcon />
783
- </button>
784
- )}
737
+ Click to edit
785
738
  </div>
786
- )}
787
- <div className="property-basic-editor__multiplicity">
788
- <input
789
- className="property-basic-editor__multiplicity-bound"
790
- spellCheck={false}
791
- disabled={isInheritedProperty || isReadOnly}
792
- value={lowerBound}
793
- onChange={changeLowerBound}
794
- />
795
- <div className="property-basic-editor__multiplicity__range">
796
- ..
739
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
740
+ <button
741
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
742
+ className="property-basic-editor__type__visit-btn"
743
+ onClick={openElement}
744
+ tabIndex={-1}
745
+ title="Visit element"
746
+ >
747
+ <ArrowCircleRightIcon />
748
+ </button>
749
+ )}
750
+ </div>
751
+ )}
752
+ {(isInheritedProperty || isReadOnly) && (
753
+ <div
754
+ className={clsx(
755
+ 'property-basic-editor__type',
756
+ `background--${propertyTypeName.toLowerCase()}`,
757
+ {
758
+ 'property-basic-editor__type--has-visit-btn':
759
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
760
+ },
761
+ )}
762
+ >
763
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
764
+ <div className="property-basic-editor__type__abbr">
765
+ {getElementIcon(propertyType, editorStore)}
766
+ </div>
767
+ )}
768
+ <div className="property-basic-editor__type__label">
769
+ {propertyType.name}
797
770
  </div>
798
- <input
799
- className="property-basic-editor__multiplicity-bound"
800
- spellCheck={false}
801
- disabled={isInheritedProperty || isReadOnly}
802
- value={upperBound}
803
- onChange={changeUpperBound}
804
- />
771
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
772
+ <button
773
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
774
+ className="property-basic-editor__type__visit-btn"
775
+ onClick={openElement}
776
+ tabIndex={-1}
777
+ title="Visit element"
778
+ >
779
+ <ArrowCircleRightIcon />
780
+ </button>
781
+ )}
805
782
  </div>
806
- {!isInheritedProperty && (
807
- <button
808
- className="uml-element-editor__basic__detail-btn"
809
- onClick={selectDerivedProperty}
810
- tabIndex={-1}
811
- title="See detail"
812
- >
813
- <LongArrowRightIcon />
814
- </button>
815
- )}
816
- {isInheritedProperty && (
817
- <button
818
- className="uml-element-editor__visit-parent-element-btn"
819
- onClick={visitOwner}
820
- tabIndex={-1}
821
- title={`Visit super type class ${derivedProperty._OWNER.path}`}
822
- >
823
- <ArrowCircleRightIcon />
824
- </button>
825
- )}
826
- {!isInheritedProperty && !isReadOnly && (
827
- <button
828
- className={clsx('uml-element-editor__remove-btn', {
829
- 'uml-element-editor__remove-btn--hidden':
830
- isInheritedProperty,
831
- })}
832
- onClick={remove}
833
- tabIndex={-1}
834
- title="Remove"
835
- >
836
- <TimesIcon />
837
- </button>
838
- )}
783
+ )}
784
+ <div className="property-basic-editor__multiplicity">
785
+ <input
786
+ className="property-basic-editor__multiplicity-bound"
787
+ spellCheck={false}
788
+ disabled={isInheritedProperty || isReadOnly}
789
+ value={lowerBound}
790
+ onChange={changeLowerBound}
791
+ />
792
+ <div className="property-basic-editor__multiplicity__range">
793
+ ..
794
+ </div>
795
+ <input
796
+ className="property-basic-editor__multiplicity-bound"
797
+ spellCheck={false}
798
+ disabled={isInheritedProperty || isReadOnly}
799
+ value={upperBound}
800
+ onChange={changeUpperBound}
801
+ />
839
802
  </div>
840
- <InlineLambdaEditor
841
- disabled={
842
- editorState.classState
843
- .isConvertingDerivedPropertyLambdaObjects ||
844
- isInheritedProperty ||
845
- isReadOnly
846
- }
847
- lambdaEditorState={dpState}
848
- forceBackdrop={hasParserError}
849
- expectedType={propertyType}
850
- onEditorFocus={onLambdaEditorFocus}
851
- />
803
+ {!isInheritedProperty && (
804
+ <button
805
+ className="uml-element-editor__basic__detail-btn"
806
+ onClick={selectDerivedProperty}
807
+ tabIndex={-1}
808
+ title="See detail"
809
+ >
810
+ <LongArrowRightIcon />
811
+ </button>
812
+ )}
813
+ {isInheritedProperty && (
814
+ <button
815
+ className="uml-element-editor__visit-parent-element-btn"
816
+ onClick={visitOwner}
817
+ tabIndex={-1}
818
+ title={`Visit super type class ${derivedProperty._OWNER.path}`}
819
+ >
820
+ <ArrowCircleRightIcon />
821
+ </button>
822
+ )}
823
+ {!isInheritedProperty && !isReadOnly && (
824
+ <button
825
+ className={clsx('uml-element-editor__remove-btn', {
826
+ 'uml-element-editor__remove-btn--hidden': isInheritedProperty,
827
+ })}
828
+ onClick={remove}
829
+ tabIndex={-1}
830
+ title="Remove"
831
+ >
832
+ <TimesIcon />
833
+ </button>
834
+ )}
852
835
  </div>
853
- </PanelDnDEntry>
854
- </>
836
+ <InlineLambdaEditor
837
+ disabled={
838
+ editorState.classState.isConvertingDerivedPropertyLambdaObjects ||
839
+ isInheritedProperty ||
840
+ isReadOnly
841
+ }
842
+ lambdaEditorState={dpState}
843
+ forceBackdrop={hasParserError}
844
+ expectedType={propertyType}
845
+ onEditorFocus={onLambdaEditorFocus}
846
+ />
847
+ </div>
848
+ </PanelDnDEntry>
855
849
  );
856
850
  },
857
851
  );
@@ -939,7 +933,7 @@ const ConstraintEditor = observer(
939
933
  );
940
934
  const remove = applicationStore.guardUnhandledError(async () => {
941
935
  await flowResult(
942
- constraintState.convertLambdaObjectToGrammarString(false),
936
+ constraintState.convertLambdaObjectToGrammarString({ pretty: false }),
943
937
  );
944
938
  deleteConstraint();
945
939
  });
@@ -960,9 +954,9 @@ const ConstraintEditor = observer(
960
954
  >
961
955
  <div className="constraint-editor__content">
962
956
  {!isInheritedConstraint && (
963
- <PanelDnDEntryDragHandle
964
- dropTargetConnector={handleRef}
965
- isBeingDragged={isBeingDragged}
957
+ <PanelEntryDragHandle
958
+ dragSourceConnector={handleRef}
959
+ isDragging={isBeingDragged}
966
960
  />
967
961
  )}
968
962
  {isInheritedConstraint && (
@@ -1117,9 +1111,9 @@ const SuperTypeEditor = observer(
1117
1111
  className="super-type-editor__container"
1118
1112
  showPlaceholder={isBeingDragged}
1119
1113
  >
1120
- <PanelDnDEntryDragHandle
1121
- dropTargetConnector={handleRef}
1122
- isBeingDragged={isBeingDragged}
1114
+ <PanelEntryDragHandle
1115
+ dragSourceConnector={handleRef}
1116
+ isDragging={isBeingDragged}
1123
1117
  />
1124
1118
  <div className="super-type-editor">
1125
1119
  <CustomSelectorInput