@finos/legend-application-studio 27.1.1 → 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.
- package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts +1 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js +1 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js.map +1 -1
- package/lib/__lib__/LegendStudioDocumentation.d.ts +3 -1
- package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioDocumentation.js +3 -0
- package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
- package/lib/__lib__/LegendStudioTesting.d.ts +1 -0
- package/lib/__lib__/LegendStudioTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioTesting.js +1 -0
- package/lib/__lib__/LegendStudioTesting.js.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +1 -1
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.js +29 -25
- package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/{DatabaseBuilder.d.ts → DatabaseBuilderWizard.d.ts} +4 -11
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +48 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts +32 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js +99 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +2 -2
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +47 -12
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js +61 -11
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +24 -25
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js +2 -2
- package/lib/components/editor/editor-group/uml-editor/EnumerationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js +3 -3
- package/lib/components/editor/editor-group/uml-editor/ProfileEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js +2 -2
- package/lib/components/editor/editor-group/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js +2 -2
- package/lib/components/editor/editor-group/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts +0 -7
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +20 -77
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +3 -3
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.js +7 -1
- package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.js +6 -1
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/editor/ExplorerTreeState.d.ts +4 -4
- package/lib/stores/editor/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/editor/ExplorerTreeState.js +4 -4
- package/lib/stores/editor/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +12 -12
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +46 -47
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +20 -29
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +60 -141
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts +33 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js +71 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +6 -2
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +39 -3
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts +3 -48
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +12 -350
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +5 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +26 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +2 -2
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/package.json +10 -10
- package/src/__lib__/LegendStudioApplicationNavigationContext.ts +1 -1
- package/src/__lib__/LegendStudioDocumentation.ts +4 -0
- package/src/__lib__/LegendStudioTesting.ts +1 -0
- package/src/application/LegendStudioApplicationConfig.ts +1 -1
- package/src/components/editor/editor-group/FunctionEditor.tsx +137 -122
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +191 -0
- package/src/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.tsx +227 -0
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +1 -1
- package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +5 -2
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +68 -17
- package/src/components/editor/editor-group/project-configuration-editor/ProjectConfigurationEditor.tsx +137 -12
- package/src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx +0 -1
- package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +354 -362
- package/src/components/editor/editor-group/uml-editor/EnumerationEditor.tsx +4 -4
- package/src/components/editor/editor-group/uml-editor/ProfileEditor.tsx +7 -7
- package/src/components/editor/editor-group/uml-editor/StereotypeSelector.tsx +4 -4
- package/src/components/editor/editor-group/uml-editor/TaggedValueEditor.tsx +4 -4
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +47 -211
- package/src/components/editor/side-bar/Explorer.tsx +3 -3
- package/src/components/editor/side-bar/ProjectOverview.tsx +14 -3
- package/src/components/editor/side-bar/WorkflowManager.tsx +10 -0
- package/src/stores/editor/ExplorerTreeState.ts +6 -9
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +45 -51
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +88 -212
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.ts +102 -0
- package/src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +2 -2
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
- package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +59 -2
- package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +13 -533
- package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +47 -0
- package/src/stores/editor/utils/TestableUtils.ts +2 -2
- package/tsconfig.json +3 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.d.ts.map +0 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js +0 -133
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js.map +0 -1
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilder.tsx +0 -397
@@ -40,7 +40,7 @@ import {
|
|
40
40
|
ArrowCircleRightIcon,
|
41
41
|
FireIcon,
|
42
42
|
StickArrowCircleRightIcon,
|
43
|
-
|
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
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
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
|
-
<
|
301
|
-
|
302
|
-
|
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
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
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
|
-
|
312
|
-
|
313
|
-
|
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
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
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
|
-
|
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
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
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
|
-
|
406
|
-
|
407
|
-
|
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
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
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
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
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
|
-
|
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
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
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
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
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
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
<div className="property-basic-
|
731
|
-
{propertyType
|
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
|
-
|
743
|
-
|
744
|
-
|
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
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
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
|
-
|
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
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
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
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
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
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
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
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
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
|
-
|
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
|
-
<
|
964
|
-
|
965
|
-
|
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
|
-
<
|
1121
|
-
|
1122
|
-
|
1112
|
+
<PanelEntryDragHandle
|
1113
|
+
dragSourceConnector={handleRef}
|
1114
|
+
isDragging={isBeingDragged}
|
1123
1115
|
/>
|
1124
1116
|
<div className="super-type-editor">
|
1125
1117
|
<CustomSelectorInput
|