@metadev/daga 1.2.0 → 1.3.0
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/Changelog.md +10 -0
- package/fesm2022/metadev-daga.mjs +810 -58
- package/fesm2022/metadev-daga.mjs.map +1 -1
- package/lib/collapse-button/collapse-button.component.d.ts +4 -0
- package/lib/diagram/diagram.component.d.ts +1 -0
- package/lib/diagram-buttons/diagram-buttons.component.d.ts +4 -0
- package/lib/diagram-editor/diagram/converters/daga-exporter.d.ts +4 -0
- package/lib/diagram-editor/diagram/converters/daga-importer.d.ts +4 -0
- package/lib/diagram-editor/diagram/converters/daga-model.d.ts +5 -0
- package/lib/diagram-editor/diagram/converters/diagram-model-exporter.d.ts +7 -0
- package/lib/diagram-editor/diagram/converters/diagram-model-importer.d.ts +7 -0
- package/lib/diagram-editor/diagram/diagram-action.d.ts +67 -1
- package/lib/diagram-editor/diagram/diagram-canvas.d.ts +4 -0
- package/lib/diagram-editor/diagram/diagram-config.d.ts +21 -3
- package/lib/diagram-editor/diagram/diagram-connection.d.ts +75 -0
- package/lib/diagram-editor/diagram/diagram-element.d.ts +40 -3
- package/lib/diagram-editor/diagram/diagram-field.d.ts +64 -0
- package/lib/diagram-editor/diagram/diagram-model.d.ts +75 -2
- package/lib/diagram-editor/diagram/diagram-node.d.ts +58 -0
- package/lib/diagram-editor/diagram/diagram-port.d.ts +36 -0
- package/lib/diagram-editor/diagram/diagram-property.d.ts +23 -2
- package/lib/diagram-editor/diagram/diagram-section.d.ts +45 -0
- package/lib/diagram-editor/diagram/layout/adjacency-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram/layout/breadth-adjacency-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram/layout/breadth-layout.d.ts +2 -2
- package/lib/diagram-editor/diagram/layout/diagram-layout.d.ts +8 -0
- package/lib/diagram-editor/diagram/layout/force-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram/layout/horizontal-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram/layout/priority-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram/layout/vertical-layout.d.ts +1 -0
- package/lib/diagram-editor/diagram-editor.component.d.ts +4 -0
- package/lib/errors/diagram-error.d.ts +19 -0
- package/lib/errors/diagram-validator.d.ts +6 -1
- package/lib/errors/errors.component.d.ts +5 -0
- package/lib/interfaces/canvas.d.ts +48 -4
- package/lib/interfaces/diagram-buttons.d.ts +8 -0
- package/lib/interfaces/diagram-editor.d.ts +4 -0
- package/lib/interfaces/palette.d.ts +2 -0
- package/lib/interfaces/property-editor.d.ts +4 -0
- package/lib/object-editor/object-editor.component.d.ts +7 -1
- package/lib/palette/palette.component.d.ts +6 -0
- package/lib/property-editor/property-editor.component.d.ts +5 -0
- package/lib/services/canvas-provider.service.d.ts +17 -0
- package/lib/services/daga-configuration.service.d.ts +11 -0
- package/lib/text-list-editor/text-list-editor.component.d.ts +7 -0
- package/lib/text-map-editor/text-map-editor.component.d.ts +7 -0
- package/lib/util/canvas-util.d.ts +104 -0
- package/lib/util/events.d.ts +8 -4
- package/lib/util/grid.d.ts +47 -4
- package/lib/util/line.d.ts +44 -0
- package/lib/util/list-util.d.ts +14 -0
- package/lib/util/shape.d.ts +98 -0
- package/lib/util/svg-util.d.ts +77 -5
- package/package.json +1 -1
|
@@ -5,6 +5,11 @@ import { DiagramModel } from './diagram-model';
|
|
|
5
5
|
import { DiagramNode } from './diagram-node';
|
|
6
6
|
import { DiagramPort } from './diagram-port';
|
|
7
7
|
import { DiagramSection } from './diagram-section';
|
|
8
|
+
/**
|
|
9
|
+
* Default values of the parameters of a diagram field.
|
|
10
|
+
* @see DiagramField
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
8
13
|
export declare const DIAGRAM_FIELD_DEFAULTS: {
|
|
9
14
|
editable: boolean;
|
|
10
15
|
fontSize: number;
|
|
@@ -16,21 +21,80 @@ export declare const DIAGRAM_FIELD_DEFAULTS: {
|
|
|
16
21
|
horizontalAlign: HorizontalAlign;
|
|
17
22
|
verticalAlign: VerticalAlign;
|
|
18
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* A field which displays text and is part of a diagram element.
|
|
26
|
+
* @see DiagramNode
|
|
27
|
+
* @see DiagramPort
|
|
28
|
+
* @see DiagramSection
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
19
31
|
export declare class DiagramField extends DiagramElement {
|
|
32
|
+
/**
|
|
33
|
+
* Element that this field belongs to.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
20
36
|
rootElement?: DiagramNode | DiagramSection | DiagramPort;
|
|
37
|
+
/**
|
|
38
|
+
* Coordinates of this field.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
21
41
|
coords: Point;
|
|
42
|
+
/**
|
|
43
|
+
* Dimension of this field along the x axis.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
22
46
|
width: number;
|
|
47
|
+
/**
|
|
48
|
+
* Dimension of this field along the y axis.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
23
51
|
height: number;
|
|
52
|
+
/**
|
|
53
|
+
* Font size of this field.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
24
56
|
fontSize: number;
|
|
57
|
+
/**
|
|
58
|
+
* Font family of this field. `null` for the default one.
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
25
61
|
fontFamily: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* Font color of this field.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
26
66
|
color: string;
|
|
67
|
+
/**
|
|
68
|
+
* Font color of this field when selected.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
27
71
|
selectedColor: string;
|
|
72
|
+
/**
|
|
73
|
+
* Horizontal alignment of the text of this field.
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
28
76
|
horizontalAlign: HorizontalAlign;
|
|
77
|
+
/**
|
|
78
|
+
* Vertical alignment of the text of this field.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
29
81
|
verticalAlign: VerticalAlign;
|
|
30
82
|
private _text;
|
|
83
|
+
/**
|
|
84
|
+
* Default text that this field's text resets to when empty.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
31
87
|
defaultText: string;
|
|
88
|
+
/**
|
|
89
|
+
* Text contents of this field.
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
32
92
|
get text(): string;
|
|
33
93
|
set text(value: string);
|
|
94
|
+
/**
|
|
95
|
+
* Whether this field's text can be edited by the user.
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
34
98
|
editable: boolean;
|
|
35
99
|
constructor(model: DiagramModel, rootElement: DiagramNode | DiagramSection | DiagramPort | undefined, coords: Point, width: number, height: number, fontSize: number, fontFamily: string | null, color: string, selectedColor: string, horizontalAlign: HorizontalAlign, verticalAlign: VerticalAlign, text: string, editable: boolean, id?: string);
|
|
36
100
|
updateInView(): void;
|
|
@@ -5,28 +5,101 @@ import { DiagramNodeSet } from './diagram-node';
|
|
|
5
5
|
import { DiagramPortSet } from './diagram-port';
|
|
6
6
|
import { Property, ValueSet } from './diagram-property';
|
|
7
7
|
import { DiagramSectionSet } from './diagram-section';
|
|
8
|
+
/**
|
|
9
|
+
* Stores the data of a diagram.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
8
12
|
export declare class DiagramModel {
|
|
13
|
+
/**
|
|
14
|
+
* The canvas where this model's data is being rendered.
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
9
17
|
canvas?: Canvas;
|
|
18
|
+
/**
|
|
19
|
+
* Whether changes to this model are updated in the canvas in real time.
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
10
22
|
renderToCanvas: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Nodes of this model.
|
|
25
|
+
* @see DiagramNode
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
11
28
|
nodes: DiagramNodeSet;
|
|
29
|
+
/**
|
|
30
|
+
* Sections of this model.
|
|
31
|
+
* @see DiagramSection
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
12
34
|
sections: DiagramSectionSet;
|
|
35
|
+
/**
|
|
36
|
+
* Ports of this model.
|
|
37
|
+
* @see DiagramPort
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
13
40
|
ports: DiagramPortSet;
|
|
41
|
+
/**
|
|
42
|
+
* Connections of this model.
|
|
43
|
+
* @see DiagramConnection
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
14
46
|
connections: DiagramConnectionSet;
|
|
47
|
+
/**
|
|
48
|
+
* Fields of this model.
|
|
49
|
+
* @see DiagramField
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
15
52
|
fields: DiagramFieldSet;
|
|
53
|
+
/**
|
|
54
|
+
* Identifier of this diagram. Set by the consumer of the diagram.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
16
57
|
id: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Name of this diagram. Set by the consumer of the diagram.
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
17
62
|
name: string;
|
|
63
|
+
/**
|
|
64
|
+
* Description of this diagram. Set by the consumer of the diagram.
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
18
67
|
description?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Type of this diagram. Set by the consumer of the diagram.
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
19
72
|
type: string;
|
|
73
|
+
/**
|
|
74
|
+
* Date of creation of this diagram. Set at the creation of the diagram.
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
20
77
|
createdAt: Date;
|
|
78
|
+
/**
|
|
79
|
+
* Date of last changes of this diagram. Set by the consumer of the diagram.
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
21
82
|
updatedAt: Date;
|
|
83
|
+
/**
|
|
84
|
+
* Additional properties of this diagram.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
22
87
|
valueSet: ValueSet;
|
|
23
|
-
get layoutFormat(): string | undefined;
|
|
24
|
-
set layoutFormat(value: string | undefined);
|
|
25
88
|
constructor(canvas: Canvas | undefined, id: string | undefined, name: string, description: string | undefined, type: string, properties?: Property[]);
|
|
89
|
+
/**
|
|
90
|
+
* Enables rendering to canvas in real time and updates the view of this model in the canvas.
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
26
93
|
enableRenderToCanvas(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Disables rendering to canvas in real time.
|
|
96
|
+
* Used to perform batches of changes to the model without the computational cost of rendering each change to the canvas individually.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
27
99
|
disableRenderToCanvas(): void;
|
|
28
100
|
/**
|
|
29
101
|
* Deletes everything in this diagram.
|
|
102
|
+
* @public
|
|
30
103
|
*/
|
|
31
104
|
clear(): void;
|
|
32
105
|
}
|
|
@@ -8,7 +8,17 @@ import { DiagramModel } from './diagram-model';
|
|
|
8
8
|
import { DiagramPort } from './diagram-port';
|
|
9
9
|
import { PropertySet, ValueSet } from './diagram-property';
|
|
10
10
|
import { DiagramSection } from './diagram-section';
|
|
11
|
+
/**
|
|
12
|
+
* Default values of the look of a diagram node.
|
|
13
|
+
* @see DIAGRAM_NODE_TYPE_DEFAULTS
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
11
16
|
export declare const DIAGRAM_NODE_LOOK_DEFAULTS: NodeShapedLook;
|
|
17
|
+
/**
|
|
18
|
+
* Default values of the parameters of a diagram node.
|
|
19
|
+
* @see DiagramNode
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
12
22
|
export declare const DIAGRAM_NODE_TYPE_DEFAULTS: {
|
|
13
23
|
name: string;
|
|
14
24
|
defaultWidth: number;
|
|
@@ -25,6 +35,11 @@ export declare const DIAGRAM_NODE_TYPE_DEFAULTS: {
|
|
|
25
35
|
priority: number;
|
|
26
36
|
properties: never[];
|
|
27
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* A node type, which holds properties that nodes of this type share in common.
|
|
40
|
+
* @see NodeTypeConfig
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
28
43
|
export declare class DiagramNodeType implements DiagramEntity {
|
|
29
44
|
id: string;
|
|
30
45
|
name: string;
|
|
@@ -43,16 +58,59 @@ export declare class DiagramNodeType implements DiagramEntity {
|
|
|
43
58
|
propertySet: PropertySet;
|
|
44
59
|
constructor(options: NodeTypeConfig);
|
|
45
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* A node, the most basic element of a diagram, which can have connections to other nodes through its ports or be divided into sections.
|
|
63
|
+
* @see DiagramConnection
|
|
64
|
+
* @see DiagramPort
|
|
65
|
+
* @see DiagramSection
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
46
68
|
export declare class DiagramNode extends DiagramElement {
|
|
47
69
|
type: DiagramNodeType;
|
|
70
|
+
/**
|
|
71
|
+
* Additional properties of this node.
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
48
74
|
valueSet: ValueSet;
|
|
75
|
+
/**
|
|
76
|
+
* Variable used to preserve the original data of a node when importing from a different format.
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
49
79
|
originalData: unknown;
|
|
80
|
+
/**
|
|
81
|
+
* Label of this node.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
50
84
|
label?: DiagramField;
|
|
85
|
+
/**
|
|
86
|
+
* Sections of this node.
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
51
89
|
sections: DiagramSection[];
|
|
90
|
+
/**
|
|
91
|
+
* Ports of this node.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
52
94
|
ports: DiagramPort[];
|
|
95
|
+
/**
|
|
96
|
+
* Coordinates of the top left corner of this node.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
53
99
|
coords: Point;
|
|
100
|
+
/**
|
|
101
|
+
* Dimension of this node along the x axis.
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
54
104
|
width: number;
|
|
105
|
+
/**
|
|
106
|
+
* Dimension of this node along the y axis.
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
55
109
|
height: number;
|
|
110
|
+
/**
|
|
111
|
+
* Name of this node. Alias for this node's label's text.
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
56
114
|
get name(): string;
|
|
57
115
|
set name(name: string);
|
|
58
116
|
constructor(model: DiagramModel, type: DiagramNodeType, coords?: Point, id?: string);
|
|
@@ -6,17 +6,53 @@ import { DiagramField } from './diagram-field';
|
|
|
6
6
|
import { DiagramModel } from './diagram-model';
|
|
7
7
|
import { DiagramNode } from './diagram-node';
|
|
8
8
|
import { DiagramSection } from './diagram-section';
|
|
9
|
+
/**
|
|
10
|
+
* Default values of the parameters of a diagram port.
|
|
11
|
+
* @see DiagramPort
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
9
14
|
export declare const DIAGRAM_PORT_DEFAULTS: {
|
|
10
15
|
radius: number;
|
|
11
16
|
highlightedColor: string;
|
|
12
17
|
selectedColor: string;
|
|
13
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* A port which is part of a node or section and at which connections can start or end.
|
|
21
|
+
* @see DiagramConnection
|
|
22
|
+
* @see DiagramNode
|
|
23
|
+
* @see DiagramSection
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
14
26
|
export declare class DiagramPort extends DiagramElement {
|
|
27
|
+
/**
|
|
28
|
+
* Element that this port belongs to.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
15
31
|
rootElement?: DiagramNode | DiagramSection;
|
|
32
|
+
/**
|
|
33
|
+
* Label of this port.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
16
36
|
label?: DiagramField;
|
|
37
|
+
/**
|
|
38
|
+
* Direction of the connections of this port at the coordinates of this port.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
17
41
|
direction: Side;
|
|
42
|
+
/**
|
|
43
|
+
* Coordinates of this port.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
18
46
|
coords: Point;
|
|
47
|
+
/**
|
|
48
|
+
* Connections that start at this port.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
19
51
|
outgoingConnections: DiagramConnection[];
|
|
52
|
+
/**
|
|
53
|
+
* Connections that end at this port.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
20
56
|
incomingConnections: DiagramConnection[];
|
|
21
57
|
constructor(model: DiagramModel, rootElement: DiagramNode | DiagramSection | undefined, coords: Point, direction: Side, id?: string);
|
|
22
58
|
updateInView(): void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { DataSource } from '@metadev/lux';
|
|
2
|
+
/**
|
|
3
|
+
* A property which is part of a property set and defines what values a value in a value set can take.
|
|
4
|
+
* @see PropertySet
|
|
5
|
+
* @see ValueSet
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
2
8
|
export declare class Property {
|
|
3
9
|
/**
|
|
4
10
|
* The name of this property. Used to distinguish this property from others.
|
|
@@ -29,13 +35,18 @@ export declare class Property {
|
|
|
29
35
|
* The list of possible values if the value of the property is chosen from a set of possible values. Undefined otherwise.
|
|
30
36
|
* @default undefined
|
|
31
37
|
*/
|
|
32
|
-
options?: DataSource<
|
|
38
|
+
options?: DataSource<unknown, string>;
|
|
33
39
|
/**
|
|
34
40
|
* The list of properties that are part of this property if the type of this property is 'object'.
|
|
35
41
|
*/
|
|
36
42
|
properties?: Property[];
|
|
37
43
|
constructor(name: string, type: Type, defaultValue: unknown, basic: boolean, editable: boolean, rootAttribute: string[] | string | null);
|
|
38
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* The type that a property can hvae..
|
|
47
|
+
* @see Property
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
39
50
|
export declare enum Type {
|
|
40
51
|
/**
|
|
41
52
|
* A type whose value must be a boolean.
|
|
@@ -90,6 +101,12 @@ export declare enum Type {
|
|
|
90
101
|
*/
|
|
91
102
|
Url = "url"
|
|
92
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* A set of properties based on which a set of values of those properties can be created.
|
|
106
|
+
* @see Property
|
|
107
|
+
* @see ValueSet
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
93
110
|
export declare class PropertySet {
|
|
94
111
|
propertyMap: {
|
|
95
112
|
[key: string]: Property;
|
|
@@ -99,6 +116,11 @@ export declare class PropertySet {
|
|
|
99
116
|
getProperty(key: string): Property;
|
|
100
117
|
hasProperties(): boolean;
|
|
101
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* A set of values corresponding to a set of properties.
|
|
121
|
+
* @see PropertySet
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
102
124
|
export declare class ValueSet {
|
|
103
125
|
rootElement: {
|
|
104
126
|
[key: string]: unknown;
|
|
@@ -137,5 +159,4 @@ export declare class ValueSet {
|
|
|
137
159
|
constructSubValueSet(key: string): ValueSet;
|
|
138
160
|
getSubValueSet(key: string): ValueSet;
|
|
139
161
|
}
|
|
140
|
-
export declare const empty: (a: unknown) => boolean;
|
|
141
162
|
export declare const equals: (a: unknown, b: unknown) => boolean;
|
|
@@ -7,7 +7,17 @@ import { DiagramField } from './diagram-field';
|
|
|
7
7
|
import { DiagramModel } from './diagram-model';
|
|
8
8
|
import { DiagramNode } from './diagram-node';
|
|
9
9
|
import { DiagramPort } from './diagram-port';
|
|
10
|
+
/**
|
|
11
|
+
* Default values of the look of a diagram section.
|
|
12
|
+
* @see DIAGRAM_SECTION_DEFAULTS
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
10
15
|
export declare const DIAGRAM_SECTION_LOOK_DEFAULTS: NodeShapedLook;
|
|
16
|
+
/**
|
|
17
|
+
* Default values of the parameters of a diagram section.
|
|
18
|
+
* @see DiagramSection
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
11
21
|
export declare const DIAGRAM_SECTION_DEFAULTS: {
|
|
12
22
|
sectionsX: number;
|
|
13
23
|
sectionsY: number;
|
|
@@ -18,13 +28,48 @@ export declare const DIAGRAM_SECTION_DEFAULTS: {
|
|
|
18
28
|
ports: never[];
|
|
19
29
|
look: NodeShapedLook;
|
|
20
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* A section of a node which can have connections and display a property of the node.
|
|
33
|
+
* @see DiagramConnection
|
|
34
|
+
* @see DiagramNode
|
|
35
|
+
* @see DiagramPort
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
21
38
|
export declare class DiagramSection extends DiagramElement {
|
|
39
|
+
/**
|
|
40
|
+
* Node that this section belongs to.
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
22
43
|
node?: DiagramNode;
|
|
44
|
+
/**
|
|
45
|
+
* Label of this section.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
23
48
|
label?: DiagramField;
|
|
49
|
+
/**
|
|
50
|
+
* Ports of this section.
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
24
53
|
ports: DiagramPort[];
|
|
54
|
+
/**
|
|
55
|
+
* Coordinates of the top left corner of this section.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
25
58
|
coords: Point;
|
|
59
|
+
/**
|
|
60
|
+
* Dimension of this section along the x axis.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
26
63
|
width: number;
|
|
64
|
+
/**
|
|
65
|
+
* Dimension of this section along the y axis.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
27
68
|
height: number;
|
|
69
|
+
/**
|
|
70
|
+
* Name of this section. Alias for this section's label's text.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
28
73
|
get name(): string;
|
|
29
74
|
set name(name: string);
|
|
30
75
|
constructor(model: DiagramModel, node: DiagramNode | undefined, coords: Point, width: number, height: number, id?: string);
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which places adjacent nodes close by, placing nodes in order according to depth first search.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class AdjacencyLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which places adjacent nodes close by, placing nodes in order according to breadth first search.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class BreadthAdjacencyLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DiagramModel } from '../diagram-model';
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
|
-
* A layout which arranges the nodes by a breadth first search system
|
|
5
|
-
*
|
|
4
|
+
* A layout which arranges the nodes by a breadth first search system according to their distance to the first node in the list.
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export declare class BreadthLayout implements DiagramLayout {
|
|
8
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { DiagramModel } from '../diagram-model';
|
|
2
|
+
/**
|
|
3
|
+
* A layout algorithm that can be applied to a diagram.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export interface DiagramLayout {
|
|
3
7
|
/**
|
|
4
8
|
* Rearranges the diagram elements of the given model according to a layout algorithm.
|
|
9
|
+
* @public
|
|
5
10
|
*/
|
|
6
11
|
apply(model: DiagramModel): DiagramModel;
|
|
7
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Mapping of available layout algorithms.
|
|
15
|
+
*/
|
|
8
16
|
export declare const layouts: {
|
|
9
17
|
[key: string]: DiagramLayout;
|
|
10
18
|
};
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which attracts connected nodes and repels unconnected nodes.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class ForceLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which arranges all the nodes in a horizontal line.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class HorizontalLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which arranges the nodes by their priority first.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class PriorityLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -2,6 +2,7 @@ import { DiagramModel } from '../diagram-model';
|
|
|
2
2
|
import { DiagramLayout } from './diagram-layout';
|
|
3
3
|
/**
|
|
4
4
|
* A layout which arranges all the nodes in a vertical line.
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class VerticalLayout implements DiagramLayout {
|
|
7
8
|
apply(model: DiagramModel): DiagramModel;
|
|
@@ -9,6 +9,10 @@ import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
|
9
9
|
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
10
10
|
import { Corner } from '../util/svg-util';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
|
+
/**
|
|
13
|
+
* A diagram's user interface editor.
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
12
16
|
export declare class DiagramEditorComponent implements AfterViewInit, DiagramEditor, OnInit {
|
|
13
17
|
private configurationService;
|
|
14
18
|
private canvasProvider;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An error in a diagram detected by a diagram validator.
|
|
3
|
+
* @see DiagramValidator
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
1
6
|
export interface DiagramError {
|
|
7
|
+
/**
|
|
8
|
+
* Error message to be displayed to the user.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
2
11
|
message: string;
|
|
12
|
+
/**
|
|
13
|
+
* If applicable, id of the diagram element which contains this error.
|
|
14
|
+
* @see DiagramElement
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
3
17
|
elementId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* If applicable, list of keys under which to find the property which contains this error in the value set which contains this error.
|
|
20
|
+
* @see ValueSet
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
4
23
|
propertyNames?: string[];
|
|
5
24
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { DiagramModel } from '../diagram-editor/diagram/diagram-model';
|
|
2
2
|
import { DiagramError } from './diagram-error';
|
|
3
|
+
/**
|
|
4
|
+
* A validator that checks for specific types of errors in a diagram.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
3
7
|
export interface DiagramValidator {
|
|
4
8
|
/**
|
|
5
|
-
* Checks
|
|
9
|
+
* Checks a diagram model and returns the list of errors detected.
|
|
10
|
+
* @public
|
|
6
11
|
*/
|
|
7
12
|
validate(model: DiagramModel): DiagramError[];
|
|
8
13
|
}
|
|
@@ -5,6 +5,11 @@ import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
|
5
5
|
import { Side } from '../util/svg-util';
|
|
6
6
|
import { DiagramError } from './diagram-error';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Displays the errors detected by a diagram's validators.
|
|
10
|
+
* @see DiagramValidator
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
8
13
|
export declare class ErrorsComponent implements AfterViewInit {
|
|
9
14
|
private canvasProvider;
|
|
10
15
|
get canvas(): Canvas;
|