@finos/legend-application-studio 27.1.2 → 27.1.3

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 (87) 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.js +2 -2
  17. package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
  18. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts.map +1 -1
  19. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +2 -2
  20. package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
  21. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
  22. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +47 -12
  23. package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
  24. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  25. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js +61 -11
  26. package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  27. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -1
  28. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js +1 -1
  29. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js.map +1 -1
  30. package/lib/components/editor/editor-group/uml-editor/ClassEditor.d.ts.map +1 -1
  31. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +24 -25
  32. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
  33. package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js +2 -2
  34. package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js.map +1 -1
  35. package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js +3 -3
  36. package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js.map +1 -1
  37. package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js +2 -2
  38. package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js.map +1 -1
  39. package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js +2 -2
  40. package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js.map +1 -1
  41. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  42. package/lib/components/editor/side-bar/ProjectOverview.js +7 -1
  43. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  44. package/lib/index.css +2 -2
  45. package/lib/index.css.map +1 -1
  46. package/lib/package.json +1 -1
  47. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +1 -1
  48. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  49. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js +1 -1
  50. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js.map +1 -1
  51. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +1 -1
  52. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
  53. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js +2 -2
  54. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  55. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  56. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  57. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
  58. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  59. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +6 -2
  60. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  61. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +39 -3
  62. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  63. package/lib/stores/editor/utils/TestableUtils.js +2 -2
  64. package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
  65. package/package.json +7 -7
  66. package/src/__lib__/LegendStudioApplicationNavigationContext.ts +1 -1
  67. package/src/__lib__/LegendStudioDocumentation.ts +4 -0
  68. package/src/__lib__/LegendStudioTesting.ts +1 -0
  69. package/src/application/LegendStudioApplicationConfig.ts +1 -1
  70. package/src/components/editor/editor-group/FunctionEditor.tsx +4 -4
  71. package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +5 -2
  72. package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +68 -17
  73. package/src/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.tsx +137 -12
  74. package/src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx +0 -1
  75. package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +354 -362
  76. package/src/components/editor/editor-group/uml-editor/EnumerationEditor.tsx +4 -4
  77. package/src/components/editor/editor-group/uml-editor/ProfileEditor.tsx +7 -7
  78. package/src/components/editor/editor-group/uml-editor/StereotypeSelector.tsx +4 -4
  79. package/src/components/editor/editor-group/uml-editor/TaggedValueEditor.tsx +4 -4
  80. package/src/components/editor/side-bar/ProjectOverview.tsx +14 -3
  81. package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +1 -1
  82. package/src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts +1 -1
  83. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +2 -2
  84. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  85. package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
  86. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +59 -2
  87. 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
  );
@@ -659,199 +655,195 @@ const DerivedPropertyBasicEditor = observer(
659
655
  });
660
656
 
661
657
  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}
658
+ <PanelDnDEntry
659
+ ref={ref}
660
+ placeholder={<div className="uml-element-editor__dnd__placeholder" />}
661
+ className="derived-property-editor__container"
662
+ showPlaceholder={isBeingDragged}
663
+ >
664
+ <div
665
+ className={clsx('derived-property-editor', {
666
+ backdrop__element:
667
+ dpState.parserError && !isInheritedProperty && !isReadOnly,
668
+ })}
668
669
  >
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>
670
+ <div className="property-basic-editor">
671
+ {!isInheritedProperty && (
672
+ <PanelEntryDragHandle
673
+ dragSourceConnector={handleRef}
674
+ isDragging={isBeingDragged}
675
+ />
676
+ )}
677
+ {isInheritedProperty && (
678
+ <div className="property-basic-editor__name property-basic-editor__name--with-lock">
679
+ <div className="property-basic-editor__name--with-lock__icon">
680
+ <LockIcon />
690
681
  </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
682
+ <span className="property-basic-editor__name--with-lock__name">
683
+ {derivedProperty.name}
684
+ </span>
685
+ </div>
686
+ )}
687
+ {!isInheritedProperty && (
688
+ <input
689
+ disabled={isReadOnly}
690
+ spellCheck={false}
691
+ className="property-basic-editor__name property-basic-editor__qualififed-property__name"
692
+ value={derivedProperty.name}
693
+ placeholder="Property name"
694
+ onChange={changeValue}
695
+ />
696
+ )}
697
+ {!isInheritedProperty && !isReadOnly && isEditingType && (
698
+ <CustomSelectorInput
699
+ className="property-basic-editor__type property-basic-editor__qualififed-property__type"
700
+ options={propertyTypeOptions}
701
+ onChange={changePropertyType}
702
+ value={selectedPropertyType}
703
+ placeholder="Choose a type..."
704
+ filterOption={filterOption}
705
+ formatOptionLabel={getPackageableElementOptionFormatter({})}
706
+ />
707
+ )}
708
+ {!isInheritedProperty && !isReadOnly && !isEditingType && (
709
+ <div
710
+ className={clsx(
711
+ 'property-basic-editor__type',
712
+ 'property-basic-editor__type--show-click-hint',
713
+ `background--${propertyTypeName.toLowerCase()}`,
714
+ {
715
+ 'property-basic-editor__type--has-visit-btn':
716
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
717
+ },
718
+ )}
719
+ >
720
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
721
+ <div className="property-basic-editor__type__abbr">
722
+ {getElementIcon(propertyType, editorStore)}
741
723
  </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
- )}
724
+ )}
725
+ <div className="property-basic-editor__type__label">
726
+ {propertyType.name}
753
727
  </div>
754
- )}
755
- {(isInheritedProperty || isReadOnly) && (
756
728
  <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
- )}
729
+ data-testid={
730
+ LEGEND_STUDIO_TEST_ID.PROPERTY_BASIC_EDITOR__TYPE__LABEL_HOVER
731
+ }
732
+ className="property-basic-editor__type__label property-basic-editor__type__label--hover"
733
+ onClick={(): void => setIsEditingType(true)}
765
734
  >
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
- )}
735
+ Click to edit
785
736
  </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
- ..
737
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
738
+ <button
739
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
740
+ className="property-basic-editor__type__visit-btn"
741
+ onClick={openElement}
742
+ tabIndex={-1}
743
+ title="Visit element"
744
+ >
745
+ <ArrowCircleRightIcon />
746
+ </button>
747
+ )}
748
+ </div>
749
+ )}
750
+ {(isInheritedProperty || isReadOnly) && (
751
+ <div
752
+ className={clsx(
753
+ 'property-basic-editor__type',
754
+ `background--${propertyTypeName.toLowerCase()}`,
755
+ {
756
+ 'property-basic-editor__type--has-visit-btn':
757
+ propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE,
758
+ },
759
+ )}
760
+ >
761
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
762
+ <div className="property-basic-editor__type__abbr">
763
+ {getElementIcon(propertyType, editorStore)}
764
+ </div>
765
+ )}
766
+ <div className="property-basic-editor__type__label">
767
+ {propertyType.name}
797
768
  </div>
798
- <input
799
- className="property-basic-editor__multiplicity-bound"
800
- spellCheck={false}
801
- disabled={isInheritedProperty || isReadOnly}
802
- value={upperBound}
803
- onChange={changeUpperBound}
804
- />
769
+ {propertyTypeName !== CLASS_PROPERTY_TYPE.PRIMITIVE && (
770
+ <button
771
+ data-testid={LEGEND_STUDIO_TEST_ID.TYPE_VISIT}
772
+ className="property-basic-editor__type__visit-btn"
773
+ onClick={openElement}
774
+ tabIndex={-1}
775
+ title="Visit element"
776
+ >
777
+ <ArrowCircleRightIcon />
778
+ </button>
779
+ )}
805
780
  </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
- )}
781
+ )}
782
+ <div className="property-basic-editor__multiplicity">
783
+ <input
784
+ className="property-basic-editor__multiplicity-bound"
785
+ spellCheck={false}
786
+ disabled={isInheritedProperty || isReadOnly}
787
+ value={lowerBound}
788
+ onChange={changeLowerBound}
789
+ />
790
+ <div className="property-basic-editor__multiplicity__range">
791
+ ..
792
+ </div>
793
+ <input
794
+ className="property-basic-editor__multiplicity-bound"
795
+ spellCheck={false}
796
+ disabled={isInheritedProperty || isReadOnly}
797
+ value={upperBound}
798
+ onChange={changeUpperBound}
799
+ />
839
800
  </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
- />
801
+ {!isInheritedProperty && (
802
+ <button
803
+ className="uml-element-editor__basic__detail-btn"
804
+ onClick={selectDerivedProperty}
805
+ tabIndex={-1}
806
+ title="See detail"
807
+ >
808
+ <LongArrowRightIcon />
809
+ </button>
810
+ )}
811
+ {isInheritedProperty && (
812
+ <button
813
+ className="uml-element-editor__visit-parent-element-btn"
814
+ onClick={visitOwner}
815
+ tabIndex={-1}
816
+ title={`Visit super type class ${derivedProperty._OWNER.path}`}
817
+ >
818
+ <ArrowCircleRightIcon />
819
+ </button>
820
+ )}
821
+ {!isInheritedProperty && !isReadOnly && (
822
+ <button
823
+ className={clsx('uml-element-editor__remove-btn', {
824
+ 'uml-element-editor__remove-btn--hidden': isInheritedProperty,
825
+ })}
826
+ onClick={remove}
827
+ tabIndex={-1}
828
+ title="Remove"
829
+ >
830
+ <TimesIcon />
831
+ </button>
832
+ )}
852
833
  </div>
853
- </PanelDnDEntry>
854
- </>
834
+ <InlineLambdaEditor
835
+ disabled={
836
+ editorState.classState.isConvertingDerivedPropertyLambdaObjects ||
837
+ isInheritedProperty ||
838
+ isReadOnly
839
+ }
840
+ lambdaEditorState={dpState}
841
+ forceBackdrop={hasParserError}
842
+ expectedType={propertyType}
843
+ onEditorFocus={onLambdaEditorFocus}
844
+ />
845
+ </div>
846
+ </PanelDnDEntry>
855
847
  );
856
848
  },
857
849
  );
@@ -960,9 +952,9 @@ const ConstraintEditor = observer(
960
952
  >
961
953
  <div className="constraint-editor__content">
962
954
  {!isInheritedConstraint && (
963
- <PanelDnDEntryDragHandle
964
- dropTargetConnector={handleRef}
965
- isBeingDragged={isBeingDragged}
955
+ <PanelEntryDragHandle
956
+ dragSourceConnector={handleRef}
957
+ isDragging={isBeingDragged}
966
958
  />
967
959
  )}
968
960
  {isInheritedConstraint && (
@@ -1117,9 +1109,9 @@ const SuperTypeEditor = observer(
1117
1109
  className="super-type-editor__container"
1118
1110
  showPlaceholder={isBeingDragged}
1119
1111
  >
1120
- <PanelDnDEntryDragHandle
1121
- dropTargetConnector={handleRef}
1122
- isBeingDragged={isBeingDragged}
1112
+ <PanelEntryDragHandle
1113
+ dragSourceConnector={handleRef}
1114
+ isDragging={isBeingDragged}
1123
1115
  />
1124
1116
  <div className="super-type-editor">
1125
1117
  <CustomSelectorInput