@finos/legend-extension-dsl-diagram 0.1.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/lib/DSLDiagram_Extension.d.ts +0 -5
- package/lib/DSLDiagram_Extension.d.ts.map +1 -1
- package/lib/DSLDiagram_Extension.js +0 -12
- package/lib/DSLDiagram_Extension.js.map +1 -1
- package/lib/components/studio/ClassDiagramPreview.js +1 -1
- package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
- package/lib/components/studio/{DSLDiagram_StudioPlugin.d.ts → DSLDiagram_LegendStudioPlugin.d.ts} +4 -5
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDiagram_StudioPlugin.js → DSLDiagram_LegendStudioPlugin.js} +4 -7
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -0
- package/lib/components/studio/{DSLDiagram_StudioPlugin_Extension.d.ts → DSLDiagram_LegendStudioPlugin_Extension.d.ts} +3 -3
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts.map +1 -0
- package/lib/components/studio/{DSLDiagram_StudioPlugin_Extension.js → DSLDiagram_LegendStudioPlugin_Extension.js} +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.js.map +1 -0
- package/lib/components/studio/DiagramEditor.js +36 -36
- package/lib/components/studio/DiagramEditor.js.map +1 -1
- package/lib/graph/DSLDiagram_PureGraphPlugin.d.ts +1 -2
- package/lib/graph/DSLDiagram_PureGraphPlugin.d.ts.map +1 -1
- package/lib/graph/DSLDiagram_PureGraphPlugin.js +0 -3
- package/lib/graph/DSLDiagram_PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts +1 -2
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +0 -3
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.d.ts +1 -2
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +0 -3
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
- package/lib/stores/studio/DiagramEditorState.js +3 -3
- package/lib/stores/studio/DiagramEditorState.js.map +1 -1
- package/package.json +16 -17
- package/src/DSLDiagram_Extension.ts +0 -15
- package/src/components/studio/{DSLDiagram_StudioPlugin.tsx → DSLDiagram_LegendStudioPlugin.tsx} +5 -10
- package/src/components/studio/{DSLDiagram_StudioPlugin_Extension.tsx → DSLDiagram_LegendStudioPlugin_Extension.tsx} +3 -3
- package/src/components/studio/DiagramEditor.tsx +2 -2
- package/src/graph/DSLDiagram_PureGraphPlugin.ts +0 -5
- package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +0 -5
- package/src/index.ts +3 -1
- package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +0 -5
- package/src/stores/studio/DiagramEditorState.ts +3 -7
- package/tsconfig.json +2 -2
- package/lib/components/studio/DSLDiagram_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDiagram_StudioPlugin.js.map +0 -1
- package/lib/components/studio/DSLDiagram_StudioPlugin_Extension.d.ts.map +0 -1
- package/lib/components/studio/DSLDiagram_StudioPlugin_Extension.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# @finos/legend-extension-dsl-diagram
|
2
2
|
|
3
|
+
## 1.0.4
|
4
|
+
|
5
|
+
## 1.0.3
|
6
|
+
|
7
|
+
## 1.0.2
|
8
|
+
|
9
|
+
## 1.0.1
|
10
|
+
|
11
|
+
## 1.0.0
|
12
|
+
|
13
|
+
### Major Changes
|
14
|
+
|
15
|
+
- [#692](https://github.com/finos/legend-studio/pull/692) [`caab0e67`](https://github.com/finos/legend-studio/commit/caab0e6772181e514b246fe6030a02e7169952cc) ([@akphi](https://github.com/akphi)) - **BREAKING CHANGE:** Remove `LegendStudioPreset` and `LegendQueryPreset` and expose `LegendStudioPlugin` and `LegendQueryPlugin` respectively as we now prefer the usage of `@finos/legend-graph-extension-collection` to better manage graph presets.
|
16
|
+
|
3
17
|
## 0.1.2
|
4
18
|
|
5
19
|
## 0.1.1
|
@@ -15,13 +15,8 @@
|
|
15
15
|
*/
|
16
16
|
import { AbstractPreset } from '@finos/legend-shared';
|
17
17
|
import type { GraphPluginManager } from '@finos/legend-graph';
|
18
|
-
import type { StudioPluginManager } from '@finos/legend-studio';
|
19
18
|
export declare class DSLDiagram_GraphPreset extends AbstractPreset {
|
20
19
|
constructor();
|
21
20
|
install(pluginManager: GraphPluginManager): void;
|
22
21
|
}
|
23
|
-
export declare class DSLDiagram_StudioPreset extends AbstractPreset {
|
24
|
-
constructor();
|
25
|
-
install(pluginManager: StudioPluginManager): void;
|
26
|
-
}
|
27
22
|
//# sourceMappingURL=DSLDiagram_Extension.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSLDiagram_Extension.d.ts","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"DSLDiagram_Extension.d.ts","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,qBAAa,sBAAuB,SAAQ,cAAc;;IAKxD,OAAO,CAAC,aAAa,EAAE,kBAAkB,GAAG,IAAI;CAKjD"}
|
@@ -17,7 +17,6 @@ import packageJson from '../package.json';
|
|
17
17
|
import { AbstractPreset } from '@finos/legend-shared';
|
18
18
|
import { DSLDiagram_PureGraphManagerPlugin } from './graphManager/DSLDiagram_PureGraphManagerPlugin';
|
19
19
|
import { DSLDiagram_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin';
|
20
|
-
import { DSLDiagram_StudioPlugin } from './components/studio/DSLDiagram_StudioPlugin';
|
21
20
|
import { DSLDiagram_PureGraphPlugin } from './graph/DSLDiagram_PureGraphPlugin';
|
22
21
|
export class DSLDiagram_GraphPreset extends AbstractPreset {
|
23
22
|
constructor() {
|
@@ -29,15 +28,4 @@ export class DSLDiagram_GraphPreset extends AbstractPreset {
|
|
29
28
|
new DSLDiagram_PureProtocolProcessorPlugin().install(pluginManager);
|
30
29
|
}
|
31
30
|
}
|
32
|
-
export class DSLDiagram_StudioPreset extends AbstractPreset {
|
33
|
-
constructor() {
|
34
|
-
super(packageJson.extensions.studioPreset, packageJson.version);
|
35
|
-
}
|
36
|
-
install(pluginManager) {
|
37
|
-
new DSLDiagram_StudioPlugin().install(pluginManager);
|
38
|
-
new DSLDiagram_PureGraphPlugin().install(pluginManager);
|
39
|
-
new DSLDiagram_PureGraphManagerPlugin().install(pluginManager);
|
40
|
-
new DSLDiagram_PureProtocolProcessorPlugin().install(pluginManager);
|
41
|
-
}
|
42
|
-
}
|
43
31
|
//# sourceMappingURL=DSLDiagram_Extension.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSLDiagram_Extension.js","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAE,sCAAsC,EAAE,MAAM,gEAAgE,CAAC;
|
1
|
+
{"version":3,"file":"DSLDiagram_Extension.js","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAE,sCAAsC,EAAE,MAAM,gEAAgE,CAAC;AAExH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD;QACE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,aAAiC;QACvC,IAAI,0BAA0B,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACxD,IAAI,iCAAiC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC/D,IAAI,sCAAsC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACtE,CAAC;CACF"}
|
@@ -60,6 +60,6 @@ export const ClassDiagramPreview = observer((props) => {
|
|
60
60
|
diagramRenderer.autoRecenter();
|
61
61
|
}
|
62
62
|
}, [_class, classHash, diagramRenderer]);
|
63
|
-
return (_jsx("div",
|
63
|
+
return (_jsx("div", { ref: ref, className: "class-editor__diagram-preview", "data-testid": DSL_DIAGRAM_TEST_ID.CLASS_DIAGRAM_PREVIEW, children: _jsx("div", { ref: canvas, className: "diagram-canvas", tabIndex: 0, onContextMenu: (event) => event.preventDefault() }, void 0) }, void 0));
|
64
64
|
});
|
65
65
|
//# sourceMappingURL=ClassDiagramPreview.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ClassDiagramPreview.js","sourceRoot":"","sources":["../../../src/components/studio/ClassDiagramPreview.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,CAAC,KAAwB,EAAE,EAAE;IACvE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU;QACjC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,gBAAgB,CAAC,iCAAiC,CAChD,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,EACrB,SAAS,CACV,CAAC,CAAC,2EAA2E;IAClF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GACzC,QAAQ,EAA8B,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,WAAW,CAAC,GAAS,EAAE;QAC3C,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,OAAO,EAAE,CAAC;YAC1B,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,iBAAiB,CAAiB;QAC/D,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,EAAE;KAChB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,EAAE,CAAC;IAClB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,IAAI,eAAe,GAAG,eAAe,CAAC;YACtC,IAAI,CAAC,eAAe,EAAE;gBACpB,MAAM,SAAS,GAAG,IAAI,0BAA0B,CAC9C,MAAM,CAAC,OAAO,EACd,MAAM,CACP,CAAC;gBACF,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBAC9B,eAAe,GAAG,SAAS,CAAC;aAC7B;YACD,eAAe,CAAC,MAAM,EAAE,CAAC;YACzB,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClC,eAAe,CAAC,MAAM,EAAE,CAAC;YACzB,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;IAEzC,OAAO,CACL,
|
1
|
+
{"version":3,"file":"ClassDiagramPreview.js","sourceRoot":"","sources":["../../../src/components/studio/ClassDiagramPreview.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,CAAC,KAAwB,EAAE,EAAE;IACvE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU;QACjC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,gBAAgB,CAAC,iCAAiC,CAChD,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,EACrB,SAAS,CACV,CAAC,CAAC,2EAA2E;IAClF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GACzC,QAAQ,EAA8B,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,WAAW,CAAC,GAAS,EAAE;QAC3C,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,OAAO,EAAE,CAAC;YAC1B,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,iBAAiB,CAAiB;QAC/D,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,EAAE;KAChB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,EAAE,CAAC;IAClB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,IAAI,eAAe,GAAG,eAAe,CAAC;YACtC,IAAI,CAAC,eAAe,EAAE;gBACpB,MAAM,SAAS,GAAG,IAAI,0BAA0B,CAC9C,MAAM,CAAC,OAAO,EACd,MAAM,CACP,CAAC;gBACF,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBAC9B,eAAe,GAAG,SAAS,CAAC;aAC7B;YACD,eAAe,CAAC,MAAM,EAAE,CAAC;YACzB,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,eAAe,EAAE;YACnB,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClC,eAAe,CAAC,MAAM,EAAE,CAAC;YACzB,eAAe,CAAC,YAAY,EAAE,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;IAEzC,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,+BAA+B,iBAC5B,mBAAmB,CAAC,qBAAqB,YAEtD,cACE,GAAG,EAAE,MAAM,EACX,SAAS,EAAC,gBAAgB,EAC1B,QAAQ,EAAE,CAAC,EACX,aAAa,EAAE,CAAC,KAAK,EAAQ,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,WACtD,WACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/components/studio/{DSLDiagram_StudioPlugin.d.ts → DSLDiagram_LegendStudioPlugin.d.ts}
RENAMED
@@ -13,11 +13,10 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import type {
|
17
|
-
import {
|
18
|
-
export declare class
|
16
|
+
import type { NewElementFromStateCreator, ElementEditorStateCreator, ElementTypeGetter, ElementProjectExplorerDnDTypeGetter, ElementIconGetter, ElementEditorRenderer, DSL_LegendStudioPlugin_Extension, ElementEditorPostDeleteAction, ElementEditorPostRenameAction, ClassPreviewRenderer } from '@finos/legend-studio';
|
17
|
+
import { LegendStudioPlugin } from '@finos/legend-studio';
|
18
|
+
export declare class DSLDiagram_LegendStudioPlugin extends LegendStudioPlugin implements DSL_LegendStudioPlugin_Extension {
|
19
19
|
constructor();
|
20
|
-
install(pluginManager: StudioPluginManager): void;
|
21
20
|
getExtraClassPreviewRenderers(): ClassPreviewRenderer[];
|
22
21
|
getExtraSupportedElementTypes(): string[];
|
23
22
|
getExtraElementTypeGetters(): ElementTypeGetter[];
|
@@ -30,4 +29,4 @@ export declare class DSLDiagram_StudioPlugin extends StudioPlugin implements DSL
|
|
30
29
|
getExtraElementEditorPostRenameActions(): ElementEditorPostRenameAction[];
|
31
30
|
getExtraElementEditorPostDeleteActions(): ElementEditorPostDeleteAction[];
|
32
31
|
}
|
33
|
-
//# sourceMappingURL=
|
32
|
+
//# sourceMappingURL=DSLDiagram_LegendStudioPlugin.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSLDiagram_LegendStudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDiagram_LegendStudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,0BAA0B,EAG1B,yBAAyB,EACzB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,gCAAgC,EAEhC,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAW1D,qBAAa,6BACX,SAAQ,kBACR,YAAW,gCAAgC;;IAMlC,6BAA6B,IAAI,oBAAoB,EAAE;IAQhE,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,8BAA8B,IAAI,qBAAqB,EAAE;IAWzD,mCAAmC,IAAI,0BAA0B,EAAE;IAenE,kCAAkC,IAAI,yBAAyB,EAAE;IAcjE,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,iCAAiC,IAAI,MAAM,EAAE;IAI7C,sCAAsC,IAAI,6BAA6B,EAAE;IAWzE,sCAAsC,IAAI,6BAA6B,EAAE;CAU1E"}
|
package/lib/components/studio/{DSLDiagram_StudioPlugin.js → DSLDiagram_LegendStudioPlugin.js}
RENAMED
@@ -15,7 +15,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
* limitations under the License.
|
16
16
|
*/
|
17
17
|
import packageJson from '../../../package.json';
|
18
|
-
import {
|
18
|
+
import { LegendStudioPlugin } from '@finos/legend-studio';
|
19
19
|
import { ShapesIcon } from '@finos/legend-art';
|
20
20
|
import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/Diagram';
|
21
21
|
import { DiagramEditorState } from '../../stores/studio/DiagramEditorState';
|
@@ -23,13 +23,10 @@ import { DiagramEditor } from './DiagramEditor';
|
|
23
23
|
import { ClassDiagramPreview } from './ClassDiagramPreview';
|
24
24
|
const DIAGRAM_ELEMENT_TYPE = 'DIAGRAM';
|
25
25
|
const DIAGRAM_ELEMENT_PROJECT_EXPLORER_DND_TYPE = 'PROJECT_EXPLORER_DIAGRAM';
|
26
|
-
export class
|
26
|
+
export class DSLDiagram_LegendStudioPlugin extends LegendStudioPlugin {
|
27
27
|
constructor() {
|
28
28
|
super(packageJson.extensions.studioPlugin, packageJson.version);
|
29
29
|
}
|
30
|
-
install(pluginManager) {
|
31
|
-
pluginManager.registerStudioPlugin(this);
|
32
|
-
}
|
33
30
|
getExtraClassPreviewRenderers() {
|
34
31
|
return [
|
35
32
|
(_class) => (_jsx(ClassDiagramPreview, { _class: _class }, void 0)),
|
@@ -52,7 +49,7 @@ export class DSLDiagram_StudioPlugin extends StudioPlugin {
|
|
52
49
|
return [
|
53
50
|
(type) => {
|
54
51
|
if (type === DIAGRAM_ELEMENT_TYPE) {
|
55
|
-
return (_jsx("div",
|
52
|
+
return (_jsx("div", { className: "icon color--diagram", children: _jsx(ShapesIcon, {}, void 0) }, void 0));
|
56
53
|
}
|
57
54
|
return undefined;
|
58
55
|
},
|
@@ -122,4 +119,4 @@ export class DSLDiagram_StudioPlugin extends StudioPlugin {
|
|
122
119
|
];
|
123
120
|
}
|
124
121
|
}
|
125
|
-
//# sourceMappingURL=
|
122
|
+
//# sourceMappingURL=DSLDiagram_LegendStudioPlugin.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSLDiagram_LegendStudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDiagram_LegendStudioPlugin.tsx"],"names":[],"mappings":"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"}
|
@@ -14,17 +14,17 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
/// <reference types="react" />
|
17
|
-
import type {
|
17
|
+
import type { DSL_LegendStudioPlugin_Extension } from '@finos/legend-studio';
|
18
18
|
import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/ClassView';
|
19
19
|
import type { DiagramEditorState } from '../../stores/studio/DiagramEditorState';
|
20
20
|
export declare type ClassViewContextMenuItemRendererConfiguration = {
|
21
21
|
key: string;
|
22
22
|
renderer: (diagramEditorState: DiagramEditorState, classView: ClassView | undefined) => React.ReactNode | undefined;
|
23
23
|
};
|
24
|
-
export interface
|
24
|
+
export interface DSLDiagram_LegendStudioPlugin_Extension extends DSL_LegendStudioPlugin_Extension {
|
25
25
|
/**
|
26
26
|
* Get the list of items to be rendered in the context menu of a class view.
|
27
27
|
*/
|
28
28
|
getExtraClassViewContextMenuItemRendererConfigurations?(): ClassViewContextMenuItemRendererConfiguration[];
|
29
29
|
}
|
30
|
-
//# sourceMappingURL=
|
30
|
+
//# sourceMappingURL=DSLDiagram_LegendStudioPlugin_Extension.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSLDiagram_LegendStudioPlugin_Extension.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oEAAoE,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,oBAAY,6CAA6C,GAAG;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,CACR,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GAAG,SAAS,KAC7B,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,MAAM,WAAW,uCACf,SAAQ,gCAAgC;IACxC;;OAEG;IACH,sDAAsD,CAAC,IAAI,6CAA6C,EAAE,CAAC;CAC5G"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSLDiagram_LegendStudioPlugin_Extension.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
@@ -47,11 +47,11 @@ const DiagramEditorContextMenu = observer((props, ref) => {
|
|
47
47
|
}, { forwardRef: true });
|
48
48
|
const DiagramRendererHotkeyInfosModal = observer((props) => {
|
49
49
|
const { open, onClose } = props;
|
50
|
-
return (_jsx(Dialog,
|
50
|
+
return (_jsx(Dialog, { open: open, onClose: onClose, classes: {
|
51
51
|
root: 'editor-modal__root-container',
|
52
52
|
container: 'editor-modal__container',
|
53
53
|
paper: 'editor-modal__content--scrollable',
|
54
|
-
}
|
54
|
+
}, children: _jsxs("div", { className: "modal modal--dark modal--scrollable diagram-editor__hotkeys__dialog", children: [_jsx("div", { className: "modal__header", children: _jsx("div", { className: "modal__title", children: "Diagram Hotkeys" }, void 0) }, void 0), _jsx("div", { className: "modal__body", children: _jsxs("div", { className: "diagram-editor__hotkey__groups", children: [_jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Use view tool" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "V" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Use pan tool" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "M" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Zoom" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "Z" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Recenter" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "R" }, void 0) }, void 0)] }, void 0), _jsx("div", { className: "diagram-editor__hotkey__groups__divider" }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Remove selected element(s)" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "Delete" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Edit the selected element" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "E" }, void 0) }, void 0)] }, void 0), _jsx("div", { className: "diagram-editor__hotkey__groups__divider" }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Use property tool" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "P" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Use inheritance tool" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "I" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Add class" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "C" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Add simple property to selected class" }, void 0), _jsxs("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: [_jsx("div", { className: "hotkey__key", children: "Alt" }, void 0), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}, void 0) }, void 0), _jsx("div", { className: "hotkey__key", children: "\u2193" }, void 0)] }, void 0)] }, void 0), _jsx("div", { className: "diagram-editor__hotkey__groups__divider" }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Toggle display for properties of selected classes" }, void 0), _jsxs("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: [_jsx("div", { className: "hotkey__key", children: "Alt" }, void 0), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}, void 0) }, void 0), _jsx("div", { className: "hotkey__key", children: "P" }, void 0)] }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Toggle display for tagged values of selected classes" }, void 0), _jsxs("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: [_jsx("div", { className: "hotkey__key", children: "Alt" }, void 0), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}, void 0) }, void 0), _jsx("div", { className: "hotkey__key", children: "T" }, void 0)] }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Toggle display for stereotypes of selected classes" }, void 0), _jsxs("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: [_jsx("div", { className: "hotkey__key", children: "Alt" }, void 0), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}, void 0) }, void 0), _jsx("div", { className: "hotkey__key", children: "S" }, void 0)] }, void 0)] }, void 0), _jsx("div", { className: "diagram-editor__hotkey__groups__divider" }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Eject the property" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "\u2192" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Add subtypes of the selected classes to the diagram" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "\u2193" }, void 0) }, void 0)] }, void 0), _jsxs("div", { className: "diagram-editor__hotkey__group", children: [_jsx("div", { className: "diagram-editor__hotkey__annotation", children: "Add supertypes of the selected classes to the diagram" }, void 0), _jsx("div", { className: "hotkey__combination diagram-editor__hotkey__keys", children: _jsx("div", { className: "hotkey__key", children: "\u2191" }, void 0) }, void 0)] }, void 0)] }, void 0) }, void 0)] }, void 0) }, void 0));
|
55
55
|
});
|
56
56
|
const DiagramEditorToolPanel = observer((props) => {
|
57
57
|
const { diagramEditorState } = props;
|
@@ -64,32 +64,32 @@ const DiagramEditorToolPanel = observer((props) => {
|
|
64
64
|
renderer.changeMode(editMode, relationshipMode);
|
65
65
|
}
|
66
66
|
};
|
67
|
-
return (_jsxs("div",
|
67
|
+
return (_jsxs("div", { className: "diagram-editor__tools", children: [_jsx("button", { className: clsx('diagram-editor__tool', {
|
68
68
|
'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.LAYOUT,
|
69
|
-
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "View Tool (V)"
|
69
|
+
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "View Tool (V)", children: _jsx(FiMousePointer, { className: "diagram-editor__icon--layout" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
70
70
|
'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.PAN,
|
71
|
-
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.PAN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "Pan Tool (M)"
|
71
|
+
}), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.PAN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: "Pan Tool (M)", children: _jsx(FiMove, { className: "diagram-editor__icon--pan" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
72
72
|
'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.ZOOM_IN,
|
73
|
-
}), tabIndex: -1, title: "Zoom In (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_IN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE)
|
73
|
+
}), tabIndex: -1, title: "Zoom In (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_IN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(FiZoomIn, { className: "diagram-editor__icon--zoom-in" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
74
74
|
'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.ZOOM_OUT,
|
75
|
-
}), tabIndex: -1, title: "Zoom Out (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_OUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE)
|
75
|
+
}), tabIndex: -1, title: "Zoom Out (Z)", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_OUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(FiZoomOut, { className: "diagram-editor__icon--zoom-out" }, void 0) }, void 0), _jsx("div", { className: "diagram-editor__tools__divider" }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
76
76
|
'diagram-editor__tool--active': renderer.interactionMode ===
|
77
77
|
DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP &&
|
78
78
|
renderer.relationshipMode ===
|
79
79
|
DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY,
|
80
|
-
}), tabIndex: -1, title: "Property Tool (P)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY)
|
80
|
+
}), tabIndex: -1, title: "Property Tool (P)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY), children: _jsx(FiMinus, { className: "diagram-editor__icon--property" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
81
81
|
'diagram-editor__tool--active': renderer.interactionMode ===
|
82
82
|
DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP &&
|
83
83
|
renderer.relationshipMode ===
|
84
84
|
DIAGRAM_RELATIONSHIP_EDIT_MODE.INHERITANCE,
|
85
|
-
}), tabIndex: -1, title: "Inheritance Tool (I)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.INHERITANCE)
|
85
|
+
}), tabIndex: -1, title: "Inheritance Tool (I)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.INHERITANCE), children: _jsx(FiTriangle, { className: "diagram-editor__icon--inheritance" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
86
86
|
// 'diagram-editor__tool--active':
|
87
87
|
// diagramRenderer.editMode === DIAGRAM_EDIT_MODE.RELATIONSHIP &&
|
88
88
|
// diagramRenderer.relationshipMode ===
|
89
89
|
// DIAGRAM_RELATIONSHIP_EDIT_MODE.ASSOCIATION,
|
90
|
-
}), tabIndex: -1, title: "Association Tool", disabled: true
|
90
|
+
}), tabIndex: -1, title: "Association Tool", disabled: true, children: _jsx(IoResize, { className: "diagram-editor__icon--association" }, void 0) }, void 0), _jsx("button", { className: clsx('diagram-editor__tool', {
|
91
91
|
'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.ADD_CLASS,
|
92
|
-
}), tabIndex: -1, title: "Add class tool (C)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_CLASS, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE)
|
92
|
+
}), tabIndex: -1, title: "Add class tool (C)", disabled: isReadOnly, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ADD_CLASS, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(FiPlusCircle, { className: "diagram-editor__icon--add-class" }, void 0) }, void 0), _jsx("div", { className: "diagram-editor__tools__divider" }, void 0), _jsx("button", { className: "diagram-editor__tool", tabIndex: -1, title: "Show Hotkeys", onClick: showDiagramRendererHokeysModal, children: _jsx(FaRegKeyboard, { className: "diagram-editor__icon--hotkey-info" }, void 0) }, void 0), _jsx(DiagramRendererHotkeyInfosModal, { open: diagramEditorState.showHotkeyInfosModal, onClose: hideDiagramRendererHokeysModal }, void 0)] }, void 0));
|
93
93
|
});
|
94
94
|
const DiagramEditorClassViewEditor = observer((props) => {
|
95
95
|
const { classViewEditorState } = props;
|
@@ -131,26 +131,26 @@ const DiagramEditorClassViewEditor = observer((props) => {
|
|
131
131
|
classView.setHideStereotypes(!classView.hideStereotypes);
|
132
132
|
diagramEditorState.renderer.render();
|
133
133
|
};
|
134
|
-
return (_jsxs("div",
|
134
|
+
return (_jsxs("div", { className: "diagram-editor__class-view-editor", children: [_jsx("div", { className: "diagram-editor__class-view-editor__header", children: _jsx("div", { className: "diagram-editor__class-view-editor__header__tabs", children: tabs.map((tab) => (_jsx("div", { onClick: changeTab(tab), className: clsx('diagram-editor__class-view-editor__header__tab', {
|
135
135
|
'diagram-editor__class-view-editor__header__tab--active': tab === selectedTab,
|
136
|
-
})
|
136
|
+
}), children: prettyCONSTName(tab) }, tab))) }, void 0) }, void 0), _jsxs("div", { className: "diagram-editor__class-view-editor__content", children: [DIAGRAM_EDITOR_SIDE_PANEL_TAB.ELEMENT === selectedTab && (_jsx(ClassFormEditor, { _class: classViewEditorState.classEditorState.class, editorState: classViewEditorState.classEditorState, onHashChange: redrawOnClassChange }, void 0)), DIAGRAM_EDITOR_SIDE_PANEL_TAB.VIEW === selectedTab && (_jsx("div", { className: "panel__content__form diagram-editor__class-view-editor__content__form", children: _jsxs("div", { className: "panel__content__form__section", children: [_jsxs("div", { className: clsx('panel__content__form__section__toggler'), onClick: toggleHideProperties, children: [_jsx("button", { className: clsx('panel__content__form__section__toggler__btn', {
|
137
137
|
'panel__content__form__section__toggler__btn--toggled': classView.hideProperties,
|
138
|
-
}), disabled: isReadOnly
|
138
|
+
}), disabled: isReadOnly, children: classView.hideProperties ? (_jsx(CheckSquareIcon, {}, void 0)) : (_jsx(SquareIcon, {}, void 0)) }, void 0), _jsx("div", { className: "panel__content__form__section__toggler__prompt", children: "Specifies if properties should be hidden" }, void 0)] }, void 0), _jsxs("div", { className: clsx('panel__content__form__section__toggler'), onClick: toggleHideTaggedValues, children: [_jsx("button", { className: clsx('panel__content__form__section__toggler__btn', {
|
139
139
|
'panel__content__form__section__toggler__btn--toggled': classView.hideTaggedValues,
|
140
|
-
}), disabled: isReadOnly
|
140
|
+
}), disabled: isReadOnly, children: classView.hideTaggedValues ? (_jsx(CheckSquareIcon, {}, void 0)) : (_jsx(SquareIcon, {}, void 0)) }, void 0), _jsx("div", { className: "panel__content__form__section__toggler__prompt", children: "Specifies if tagged values should be hidden" }, void 0)] }, void 0), _jsxs("div", { className: clsx('panel__content__form__section__toggler'), onClick: toggleHideStereotypes, children: [_jsx("button", { className: clsx('panel__content__form__section__toggler__btn', {
|
141
141
|
'panel__content__form__section__toggler__btn--toggled': classView.hideStereotypes,
|
142
|
-
}), disabled: isReadOnly
|
142
|
+
}), disabled: isReadOnly, children: classView.hideStereotypes ? (_jsx(CheckSquareIcon, {}, void 0)) : (_jsx(SquareIcon, {}, void 0)) }, void 0), _jsx("div", { className: "panel__content__form__section__toggler__prompt", children: "Specifies if stereotypes should be hidden" }, void 0)] }, void 0)] }, void 0) }, void 0))] }, void 0)] }, void 0));
|
143
143
|
});
|
144
144
|
const DiagramEditorOverlay = observer((props) => {
|
145
145
|
const { diagramEditorState } = props;
|
146
146
|
const sidePanelState = diagramEditorState.sidePanelState;
|
147
147
|
const resizeSidePanel = (handleProps) => diagramEditorState.sidePanelDisplayState.setSize(handleProps.domElement.getBoundingClientRect()
|
148
148
|
.width);
|
149
|
-
return (_jsxs(ResizablePanelGroup,
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
DiagramEditorClassViewEditorSidePanelState && (_jsx(DiagramEditorClassViewEditor, { classViewEditorState: sidePanelState }, void 0)), !sidePanelState && (_jsx(BlankPanelContent, { children: "No element selected" }, void 0))] }
|
149
|
+
return (_jsxs(ResizablePanelGroup, { className: "diagram-editor__overlay", orientation: "vertical", children: [_jsx(ResizablePanel, { minSize: 300, children: _jsx("div", { className: "diagram-editor__view-finder" }, void 0) }, void 0), _jsx(ResizablePanelSplitter, { className: "diagram-editor__overlay__panel-resizer" }, void 0), _jsx(ResizablePanel, { ...getControlledResizablePanelProps(diagramEditorState.sidePanelDisplayState.size === 0, {
|
150
|
+
classes: ['diagram-editor__overlay__panel'],
|
151
|
+
onStopResize: resizeSidePanel,
|
152
|
+
}), flex: 0, direction: -1, size: diagramEditorState.sidePanelDisplayState.size, children: _jsxs("div", { className: "panel diagram-editor__side-panel", children: [sidePanelState instanceof
|
153
|
+
DiagramEditorClassViewEditorSidePanelState && (_jsx(DiagramEditorClassViewEditor, { classViewEditorState: sidePanelState }, void 0)), !sidePanelState && (_jsx(BlankPanelContent, { children: "No element selected" }, void 0))] }, void 0) }, void 0)] }, void 0));
|
154
154
|
});
|
155
155
|
const DiagramEditorInlineClassRenamerInner = observer((props) => {
|
156
156
|
const { inlineClassRenamerState } = props;
|
@@ -187,7 +187,7 @@ const DiagramEditorInlineClassRenamerInner = observer((props) => {
|
|
187
187
|
useEffect(() => {
|
188
188
|
pathInputRef.current?.focus();
|
189
189
|
}, [inlineClassRenamerState]);
|
190
|
-
return (_jsxs("form",
|
190
|
+
return (_jsxs("form", { className: "diagram-editor__inline-class-creator", children: [_jsxs("div", { className: "input-group", children: [_jsx("input", { className: "diagram-editor__inline-class-creator__path input-group__input input--dark", ref: pathInputRef, disabled: isReadOnly, value: name, placeholder: "Enter class name", onChange: changePath }, void 0), classCreationValidationErrorMessage && (_jsx("div", { className: "input-group__error-message", children: classCreationValidationErrorMessage }, void 0))] }, void 0), _jsx("button", { type: "submit", className: "diagram-editor__inline-class-creator__close-btn", onClick: close }, void 0)] }, void 0));
|
191
191
|
});
|
192
192
|
const DiagramEditorInlineClassRenamer = observer((props) => {
|
193
193
|
const { diagramEditorState } = props;
|
@@ -198,12 +198,12 @@ const DiagramEditorInlineClassRenamer = observer((props) => {
|
|
198
198
|
const anchorPositionPoint = inlineClassRenamerState
|
199
199
|
? diagramEditorState.renderer.canvasCoordinateToEventCoordinate(diagramEditorState.renderer.modelCoordinateToCanvasCoordinate(inlineClassRenamerState.point))
|
200
200
|
: new Point(0, 0);
|
201
|
-
return (_jsx(BasePopover,
|
201
|
+
return (_jsx(BasePopover, { onClose: closeEditor, anchorPosition: {
|
202
202
|
left: anchorPositionPoint.x,
|
203
203
|
top: anchorPositionPoint.y,
|
204
204
|
}, anchorReference: "anchorPosition", open: Boolean(inlineClassRenamerState), BackdropProps: {
|
205
205
|
invisible: true,
|
206
|
-
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true
|
206
|
+
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, children: _jsx("div", { className: "diagram-editor__inline-class-creator__container", children: inlineClassRenamerState && (_jsx(DiagramEditorInlineClassRenamerInner, { inlineClassRenamerState: inlineClassRenamerState }, void 0)) }, void 0) }, void 0));
|
207
207
|
});
|
208
208
|
const DiagramEditorInlineClassCreatorInner = observer((props) => {
|
209
209
|
const { inlineClassCreatorState } = props;
|
@@ -246,7 +246,7 @@ const DiagramEditorInlineClassCreatorInner = observer((props) => {
|
|
246
246
|
useEffect(() => {
|
247
247
|
pathInputRef.current?.focus();
|
248
248
|
}, [inlineClassCreatorState]);
|
249
|
-
return (_jsxs("form",
|
249
|
+
return (_jsxs("form", { className: "diagram-editor__inline-class-creator", children: [_jsxs("div", { className: "input-group", children: [_jsx("input", { className: "diagram-editor__inline-class-creator__path input-group__input input--dark", ref: pathInputRef, disabled: isReadOnly, value: path, placeholder: "Enter class path", onChange: changePath }, void 0), classCreationValidationErrorMessage && (_jsx("div", { className: "input-group__error-message", children: classCreationValidationErrorMessage }, void 0))] }, void 0), _jsx("button", { type: "submit", className: "diagram-editor__inline-class-creator__close-btn", onClick: close }, void 0)] }, void 0));
|
250
250
|
});
|
251
251
|
const DiagramEditorInlineClassCreator = observer((props) => {
|
252
252
|
const { diagramEditorState } = props;
|
@@ -257,12 +257,12 @@ const DiagramEditorInlineClassCreator = observer((props) => {
|
|
257
257
|
const anchorPositionPoint = inlineClassCreatorState
|
258
258
|
? diagramEditorState.renderer.canvasCoordinateToEventCoordinate(diagramEditorState.renderer.modelCoordinateToCanvasCoordinate(inlineClassCreatorState.point))
|
259
259
|
: new Point(0, 0);
|
260
|
-
return (_jsx(BasePopover,
|
260
|
+
return (_jsx(BasePopover, { onClose: closeEditor, anchorPosition: {
|
261
261
|
left: anchorPositionPoint.x,
|
262
262
|
top: anchorPositionPoint.y,
|
263
263
|
}, anchorReference: "anchorPosition", open: Boolean(inlineClassCreatorState), BackdropProps: {
|
264
264
|
invisible: true,
|
265
|
-
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true
|
265
|
+
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, children: _jsx("div", { className: "diagram-editor__inline-class-creator__container", children: inlineClassCreatorState && (_jsx(DiagramEditorInlineClassCreatorInner, { inlineClassCreatorState: inlineClassCreatorState }, void 0)) }, void 0) }, void 0));
|
266
266
|
});
|
267
267
|
const DiagramEditorInlinePropertyMultiplicityEditor = observer((props) => {
|
268
268
|
const { value, updateValue, isReadOnly } = props;
|
@@ -287,7 +287,7 @@ const DiagramEditorInlinePropertyMultiplicityEditor = observer((props) => {
|
|
287
287
|
setUpperBound(event.target.value);
|
288
288
|
updateMultiplicity(lowerBound, event.target.value);
|
289
289
|
};
|
290
|
-
return (_jsxs("div",
|
290
|
+
return (_jsxs("div", { className: "diagram-editor__inline-property-editor__multiplicity-editor", children: [_jsx("input", { className: "diagram-editor__inline-property-editor__multiplicity-editor__bound input--dark", disabled: isReadOnly, spellCheck: false, value: lowerBound, onChange: changeLowerBound }, void 0), _jsx("div", { className: "diagram-editor__inline-property-editor__multiplicity-editor__range", children: ".." }, void 0), _jsx("input", { className: "diagram-editor__inline-property-editor__multiplicity-editor__bound input--dark", disabled: isReadOnly, spellCheck: false, value: upperBound, onChange: changeUpperBound }, void 0)] }, void 0));
|
291
291
|
});
|
292
292
|
const DiagramEditorInlinePropertyEditorInner = observer((props) => {
|
293
293
|
const { inlinePropertyEditorState } = props;
|
@@ -332,9 +332,9 @@ const DiagramEditorInlinePropertyEditorInner = observer((props) => {
|
|
332
332
|
useEffect(() => {
|
333
333
|
propertyNameInputRef.current?.focus();
|
334
334
|
}, [inlinePropertyEditorState]);
|
335
|
-
return (_jsxs("form",
|
335
|
+
return (_jsxs("form", { className: clsx('diagram-editor__inline-property-editor', {
|
336
336
|
'diagram-editor__inline-property-editor--with-type': !inlinePropertyEditorState.isEditingPropertyView,
|
337
|
-
})
|
337
|
+
}), children: [_jsx("input", { className: "diagram-editor__inline-property-editor__name input--dark", ref: propertyNameInputRef, disabled: isReadOnly, value: property.name, onChange: changePropertyName }, void 0), !inlinePropertyEditorState.isEditingPropertyView && (_jsx(CustomSelectorInput, { className: "diagram-editor__inline-property-editor__type", disabled: isReadOnly, options: propertyTypeOptions, onChange: changePropertyType, value: selectedPropertyType, placeholder: "Choose a data type or enumeration", darkMode: true, filterOption: propertyTypeFilterOption }, void 0)), _jsx(DiagramEditorInlinePropertyMultiplicityEditor, { isReadOnly: isReadOnly, value: property.multiplicity, updateValue: changeMultiplicity }, void 0), _jsx("button", { type: "submit", className: "diagram-editor__inline-property-editor__close-btn", onClick: close }, void 0)] }, void 0));
|
338
338
|
});
|
339
339
|
const DiagramEditorInlinePropertyEditor = observer((props) => {
|
340
340
|
const { diagramEditorState } = props;
|
@@ -345,12 +345,12 @@ const DiagramEditorInlinePropertyEditor = observer((props) => {
|
|
345
345
|
const anchorPositionPoint = inlinePropertyEditorState
|
346
346
|
? diagramEditorState.renderer.canvasCoordinateToEventCoordinate(diagramEditorState.renderer.modelCoordinateToCanvasCoordinate(inlinePropertyEditorState.point))
|
347
347
|
: new Point(0, 0);
|
348
|
-
return (_jsx(BasePopover,
|
348
|
+
return (_jsx(BasePopover, { onClose: closeEditor, anchorPosition: {
|
349
349
|
left: anchorPositionPoint.x,
|
350
350
|
top: anchorPositionPoint.y,
|
351
351
|
}, anchorReference: "anchorPosition", open: Boolean(inlinePropertyEditorState), BackdropProps: {
|
352
352
|
invisible: true,
|
353
|
-
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true
|
353
|
+
}, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, children: _jsx("div", { className: "diagram-editor__inline-property-editor__container", children: inlinePropertyEditorState && (_jsx(DiagramEditorInlinePropertyEditorInner, { inlinePropertyEditorState: inlinePropertyEditorState }, void 0)) }, void 0) }, void 0));
|
354
354
|
});
|
355
355
|
const DiagramEditorDiagramCanvas = observer((props, ref) => {
|
356
356
|
const { diagramEditorState } = props;
|
@@ -408,19 +408,19 @@ const DiagramEditorHeader = observer((props) => {
|
|
408
408
|
diagramEditorState.setSidePanelState(undefined);
|
409
409
|
}
|
410
410
|
};
|
411
|
-
return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu,
|
411
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { className: "diagram-editor__header__dropdown", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { className: "diagram-editor__header__zoomer__dropdown__menu__item", onClick: zoomToFit, children: "Fit" }, void 0), _jsx(MenuContentDivider, {}, void 0), DIAGRAM_ZOOM_LEVELS.map((zoomLevel) => (_jsxs(MenuContentItem, { className: "diagram-editor__header__zoomer__dropdown__menu__item", onClick: createCenterZoomer(zoomLevel), children: [zoomLevel, "%"] }, zoomLevel)))] }, void 0), menuProps: {
|
412
412
|
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
413
413
|
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
414
414
|
elevation: 7,
|
415
|
-
}
|
415
|
+
}, children: [_jsxs("button", { className: "diagram-editor__header__dropdown__label diagram-editor__header__zoomer__dropdown__label", tabIndex: -1, title: "Zoom...", children: [Math.round(diagramEditorState.renderer.zoom * 100), "%"] }, void 0), _jsx("div", { className: "diagram-editor__header__dropdown__trigger diagram-editor__header__zoomer__dropdown__trigger", children: _jsx(CaretDownIcon, {}, void 0) }, void 0)] }, void 0), _jsx("div", { className: "diagram-editor__header__actions", children: _jsx("button", { className: clsx('diagram-editor__header__action', {
|
416
416
|
'diagram-editor__header__action--active': diagramEditorState.sidePanelDisplayState.isOpen,
|
417
|
-
}), tabIndex: -1, onClick: toggleSidePanel
|
417
|
+
}), tabIndex: -1, onClick: toggleSidePanel, children: _jsx(FiSidebar, { className: "diagram-editor__icon--sidebar" }, void 0) }, void 0) }, void 0)] }, void 0));
|
418
418
|
});
|
419
419
|
export const DiagramEditor = observer(() => {
|
420
420
|
const editorStore = useEditorStore();
|
421
421
|
const diagramEditorState = editorStore.getCurrentEditorState(DiagramEditorState);
|
422
422
|
const diagramCanvasRef = useRef(null);
|
423
423
|
const onContextMenuClose = () => diagramEditorState.closeContextMenu();
|
424
|
-
return (_jsxs("div",
|
424
|
+
return (_jsxs("div", { className: "diagram-editor", children: [_jsx("div", { className: "diagram-editor__header", children: diagramEditorState.isDiagramRendererInitialized && (_jsx(DiagramEditorHeader, { diagramEditorState: diagramEditorState }, void 0)) }, void 0), _jsxs("div", { className: "diagram-editor__content", children: [diagramEditorState.isDiagramRendererInitialized && (_jsx(DiagramEditorOverlay, { diagramEditorState: diagramEditorState }, void 0)), _jsxs(ContextMenu, { className: "diagram-editor__stage", content: _jsx(DiagramEditorContextMenu, { diagramEditorState: diagramEditorState }, void 0), disabled: !diagramEditorState.showContextMenu, menuProps: { elevation: 7 }, onClose: onContextMenuClose, children: [diagramEditorState.isDiagramRendererInitialized && (_jsx(DiagramEditorToolPanel, { diagramEditorState: diagramEditorState }, void 0)), _jsx(DiagramEditorDiagramCanvas, { diagramEditorState: diagramEditorState, ref: diagramCanvasRef }, void 0), diagramEditorState.isDiagramRendererInitialized && (_jsxs(_Fragment, { children: [_jsx(DiagramEditorInlinePropertyEditor, { diagramEditorState: diagramEditorState }, void 0), _jsx(DiagramEditorInlineClassCreator, { diagramEditorState: diagramEditorState }, void 0), _jsx(DiagramEditorInlineClassRenamer, { diagramEditorState: diagramEditorState }, void 0)] }, void 0))] }, void 0)] }, void 0)] }, void 0));
|
425
425
|
});
|
426
426
|
//# sourceMappingURL=DiagramEditor.js.map
|