@metadev/daga 1.5.7 → 3.0.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 +40 -1
- package/README.md +67 -30
- package/assets/daga-logo.svg +10 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +8099 -0
- package/index.cjs.mjs +2 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +8013 -0
- package/package.json +19 -37
- package/src/index.d.ts +49 -0
- package/src/lib/core.d.ts +1 -0
- package/{lib/diagram-editor/diagram → src/lib/diagram/canvas}/diagram-canvas.d.ts +72 -67
- package/src/lib/diagram/canvas/diagram-context-menu.d.ts +27 -0
- package/src/lib/diagram/canvas/diagram-user-highlight.d.ts +30 -0
- package/src/lib/diagram/canvas/diagram-user-selection.d.ts +74 -0
- package/{lib/diagram-editor → src/lib}/diagram/collab/collab-action.d.ts +36 -12
- package/{lib/diagram-editor → src/lib}/diagram/collab/collab-client.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/collab/collab-engine.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/collab/message-types.d.ts +3 -8
- package/{lib/diagram-editor → src/lib}/diagram/converters/daga-exporter.d.ts +6 -6
- package/{lib/diagram-editor → src/lib}/diagram/converters/daga-importer.d.ts +6 -4
- package/{lib/diagram-editor → src/lib}/diagram/converters/daga-model.d.ts +3 -3
- package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-exporter.d.ts +2 -2
- package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-importer.d.ts +2 -2
- package/{lib/diagram-editor → src/lib}/diagram/diagram-action.d.ts +75 -55
- package/{lib/diagram-editor → src/lib}/diagram/diagram-config.d.ts +148 -84
- package/{lib/diagram-editor → src/lib}/diagram/diagram-event.d.ts +3 -3
- package/{lib/diagram-editor → src/lib}/diagram/layout/adjacency-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-adjacency-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/diagram-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/force-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/horizontal-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/priority-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/tree-layout.d.ts +1 -1
- package/{lib/diagram-editor → src/lib}/diagram/layout/vertical-layout.d.ts +1 -1
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-connection.d.ts +4 -4
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-element.d.ts +7 -11
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-entity.d.ts +2 -2
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-field.d.ts +10 -10
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-model.d.ts +15 -15
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-node.d.ts +9 -9
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-port.d.ts +4 -4
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-property.d.ts +46 -31
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-section.d.ts +10 -10
- package/{lib → src/lib}/errors/diagram-validator.d.ts +1 -1
- package/{lib → src/lib}/interfaces/canvas.d.ts +79 -107
- package/{lib → src/lib}/interfaces/diagram-buttons.d.ts +8 -8
- package/{lib → src/lib}/interfaces/diagram-editor.d.ts +4 -11
- package/{lib → src/lib}/interfaces/palette.d.ts +2 -2
- package/{lib → src/lib}/interfaces/property-editor.d.ts +5 -5
- package/{lib → src/lib}/util/canvas-util.d.ts +20 -5
- package/src/lib/util/device-util.d.ts +5 -0
- package/{lib → src/lib}/util/events.d.ts +6 -4
- package/{lib → src/lib}/util/style.d.ts +1 -0
- package/src/lib/util/test-util.d.ts +11 -0
- package/assets/fonts/DMMono-Medium.ttf +0 -0
- package/assets/fonts/DMMono-Medium.woff +0 -0
- package/assets/fonts/DMMono-Medium.woff2 +0 -0
- package/assets/fonts/WonderUnitSans-Medium.ttf +0 -0
- package/assets/fonts/WonderUnitSans-Medium.woff +0 -0
- package/assets/fonts/WonderUnitSans-Medium.woff2 +0 -0
- package/assets/icon/action/drop-down-arrow.svg +0 -8
- package/assets/icon/action/drop-horizontal-left.svg +0 -14
- package/assets/icon/action/drop-horizontal-none.svg +0 -13
- package/assets/icon/action/drop-horizontal-right.svg +0 -14
- package/assets/icon/action/drop-vertical-down.svg +0 -14
- package/assets/icon/action/drop-vertical-none.svg +0 -13
- package/assets/icon/action/drop-vertical-up.svg +0 -14
- package/assets/icon/action/filter-clear.png +0 -0
- package/assets/icon/buttons/center-hover.svg +0 -10
- package/assets/icon/buttons/center.svg +0 -10
- package/assets/icon/buttons/ellipsis-hover.svg +0 -7
- package/assets/icon/buttons/ellipsis.svg +0 -7
- package/assets/icon/buttons/filter-off-hover.svg +0 -5
- package/assets/icon/buttons/filter-off.svg +0 -5
- package/assets/icon/buttons/filter-on-hover.svg +0 -5
- package/assets/icon/buttons/filter-on.svg +0 -5
- package/assets/icon/buttons/layout-hover.svg +0 -8
- package/assets/icon/buttons/layout.svg +0 -8
- package/assets/icon/buttons/redo-hover.svg +0 -5
- package/assets/icon/buttons/redo.svg +0 -5
- package/assets/icon/buttons/undo-hover.svg +0 -5
- package/assets/icon/buttons/undo.svg +0 -5
- package/assets/icon/buttons/zoom-in-hover.svg +0 -8
- package/assets/icon/buttons/zoom-in.svg +0 -8
- package/assets/icon/buttons/zoom-out-hover.svg +0 -7
- package/assets/icon/buttons/zoom-out.svg +0 -7
- package/assets/icon/context/copy.svg +0 -4
- package/assets/icon/context/cross.svg +0 -3
- package/assets/icon/context/cut.svg +0 -4
- package/assets/icon/context/delete.svg +0 -4
- package/assets/icon/context/paste.svg +0 -4
- package/assets/icon/property/add.svg +0 -23
- package/assets/icon/property/close.svg +0 -3
- package/assets/icon/property/ellipsis.svg +0 -5
- package/assets/icon/property/gear.svg +0 -3
- package/assets/icon/property/hide.svg +0 -10
- package/assets/icon/property/move.svg +0 -35
- package/assets/styles/_collapse-button.scss +0 -37
- package/assets/styles/_context-menu.scss +0 -32
- package/assets/styles/_diagram-buttons.scss +0 -166
- package/assets/styles/_diagram.scss +0 -15
- package/assets/styles/_errors.scss +0 -83
- package/assets/styles/_palette.scss +0 -20
- package/assets/styles/_property-editor.scss +0 -285
- package/assets/styles/daga.scss +0 -150
- package/fesm2022/metadev-daga.mjs +0 -10977
- package/fesm2022/metadev-daga.mjs.map +0 -1
- package/index.d.ts +0 -55
- package/lib/collapse-button/collapse-button.component.d.ts +0 -22
- package/lib/daga.module.d.ts +0 -18
- package/lib/diagram/diagram.component.d.ts +0 -44
- package/lib/diagram-buttons/diagram-buttons.component.d.ts +0 -44
- package/lib/diagram-editor/diagram-editor.component.d.ts +0 -38
- package/lib/errors/errors.component.d.ts +0 -26
- package/lib/palette/palette.component.d.ts +0 -39
- package/lib/property-editor/autocomplete/autocomplete.component.d.ts +0 -39
- package/lib/property-editor/object-editor/object-editor.component.d.ts +0 -30
- package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +0 -33
- package/lib/property-editor/property-editor.component.d.ts +0 -34
- package/lib/property-editor/property-settings/property-settings.component.d.ts +0 -35
- package/lib/property-editor/text-list-editor/text-list-editor.component.d.ts +0 -29
- package/lib/property-editor/text-map-editor/text-map-editor.component.d.ts +0 -36
- package/lib/services/canvas-provider.service.d.ts +0 -32
- package/lib/services/daga-configuration.service.d.ts +0 -23
- package/{lib/diagram-editor → src/lib}/diagram/collab/primitives.d.ts +0 -0
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-decorator.d.ts +1 -1
- package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-object.d.ts +0 -0
- package/{lib → src/lib}/errors/diagram-error.d.ts +3 -3
- package/{lib → src/lib}/util/grid.d.ts +0 -0
- package/{lib → src/lib}/util/line.d.ts +0 -0
- package/{lib → src/lib}/util/list-util.d.ts +0 -0
- package/{lib → src/lib}/util/shape.d.ts +10 -10
- /package/{lib → src/lib}/util/svg-util.d.ts +0 -0
- /package/{lib → src/lib}/util/text-util.d.ts +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CollabTimestamp } from '../collab/primitives';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { DiagramConnection } from '../model/diagram-connection';
|
|
3
|
+
import { DiagramField } from '../model/diagram-field';
|
|
4
|
+
import { DiagramModel } from '../model/diagram-model';
|
|
5
|
+
import { DiagramNode } from '../model/diagram-node';
|
|
4
6
|
import { DagaConnection, DagaModel, DagaNode } from './daga-model';
|
|
5
7
|
import { DiagramModelImporter } from './diagram-model-importer';
|
|
6
8
|
/**
|
|
@@ -9,8 +11,8 @@ import { DiagramModelImporter } from './diagram-model-importer';
|
|
|
9
11
|
*/
|
|
10
12
|
export declare class DagaImporter implements DiagramModelImporter<DagaModel> {
|
|
11
13
|
import(model: DiagramModel, data: DagaModel): DiagramModel;
|
|
12
|
-
importNode(model: DiagramModel, node: DagaNode):
|
|
13
|
-
importConnection(model: DiagramModel, connection: DagaConnection):
|
|
14
|
+
importNode(model: DiagramModel, node: DagaNode): DiagramNode | undefined;
|
|
15
|
+
importConnection(model: DiagramModel, connection: DagaConnection): DiagramConnection | undefined;
|
|
14
16
|
importLabelCollabMeta(newLabel?: DiagramField, labelCollabMeta?: {
|
|
15
17
|
selfRemoved: boolean;
|
|
16
18
|
selfRemovedTimestamp: CollabTimestamp | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Point } from '
|
|
2
|
-
import { Side } from '
|
|
1
|
+
import { Point } from '../../util/canvas-util';
|
|
2
|
+
import { Side } from '../../util/svg-util';
|
|
3
3
|
import { CollabTimestamp, CollabTimestampSet } from '../collab/primitives';
|
|
4
4
|
export declare const DAGA_FILE_VERSION = 1;
|
|
5
5
|
/**
|
|
6
6
|
* Representation of a diagram model in a serialized format.
|
|
7
|
-
* @see DiagramModel
|
|
8
7
|
* @public
|
|
8
|
+
* @see DiagramModel
|
|
9
9
|
*/
|
|
10
10
|
export interface DagaModel {
|
|
11
11
|
id?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DiagramModel } from '../diagram-model';
|
|
1
|
+
import { DiagramModel } from '../model/diagram-model';
|
|
2
2
|
/**
|
|
3
3
|
* A diagram exporter which given a diagram model returns a representation of the diagram in some other form.
|
|
4
|
+
* @public
|
|
4
5
|
* @see DiagramModel
|
|
5
6
|
* @see DiagramModelImporter
|
|
6
|
-
* @public
|
|
7
7
|
*/
|
|
8
8
|
export interface DiagramModelExporter<T> {
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DiagramModel } from '../diagram-model';
|
|
1
|
+
import { DiagramModel } from '../model/diagram-model';
|
|
2
2
|
/**
|
|
3
3
|
* A diagram importer which given a diagram's representation in some other form imports the diagram into a given diagram model.
|
|
4
|
+
* @public
|
|
4
5
|
* @see DiagramModel
|
|
5
6
|
* @see DiagramModelExporter
|
|
6
|
-
* @public
|
|
7
7
|
*/
|
|
8
8
|
export interface DiagramModelImporter<T> {
|
|
9
9
|
/**
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Canvas } from '
|
|
2
|
-
import { Point } from '
|
|
1
|
+
import { Canvas } from '../interfaces/canvas';
|
|
2
|
+
import { Point } from '../util/canvas-util';
|
|
3
3
|
import { DagaConnection, DagaNode } from './converters/daga-model';
|
|
4
|
-
import { DiagramConnectionType } from './diagram-connection';
|
|
5
|
-
import { DiagramNodeGeometry, DiagramNodeType } from './diagram-node';
|
|
4
|
+
import { DiagramConnectionType } from './model/diagram-connection';
|
|
5
|
+
import { DiagramNodeGeometry, DiagramNodeType } from './model/diagram-node';
|
|
6
6
|
/**
|
|
7
|
-
* A
|
|
7
|
+
* A stack of recent actions taken by the user that can be undone and redone.
|
|
8
8
|
* @private
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class ActionStack {
|
|
11
11
|
/**
|
|
12
|
-
* Canvas that this action
|
|
12
|
+
* Canvas that this action stack belongs to.
|
|
13
13
|
* @private
|
|
14
14
|
*/
|
|
15
|
-
canvas
|
|
15
|
+
private readonly canvas;
|
|
16
16
|
/**
|
|
17
17
|
* Maximum number of actions that can be recorded simultaneously.
|
|
18
18
|
* When new actions are added past this limit, older actions are removed.
|
|
@@ -28,7 +28,7 @@ export declare class ActionQueue {
|
|
|
28
28
|
* Index of the last action not counting undone actions. One-indexed. Zero if all actions are undone.
|
|
29
29
|
* @private
|
|
30
30
|
*/
|
|
31
|
-
index
|
|
31
|
+
private index;
|
|
32
32
|
constructor(canvas: Canvas, maximum: number);
|
|
33
33
|
/**
|
|
34
34
|
* Adds an action to the history.
|
|
@@ -54,36 +54,42 @@ export interface DiagramAction {
|
|
|
54
54
|
/**
|
|
55
55
|
* Perform this action on the diagram for the first time.
|
|
56
56
|
* Performing the same action with the same parameters on a diagram with the same state should always result in the same changes to the state of the diagram.
|
|
57
|
+
*
|
|
58
|
+
* @returns `true` if doing the action had an effect on non-removed elements of the model, `false` otherwise.
|
|
57
59
|
*/
|
|
58
|
-
do():
|
|
60
|
+
do(): boolean;
|
|
59
61
|
/**
|
|
60
62
|
* Undo the changes in the diagram caused by this action.
|
|
61
63
|
* After having called `do()` followed by `undo()`, calling `redo()` followed by `undo()` any number of times should always result in no net changes to the state of the diagram.
|
|
64
|
+
*
|
|
65
|
+
* @returns `true` if undoing the action had an effect on non-removed elements of the model, `false` otherwise.
|
|
62
66
|
*/
|
|
63
|
-
undo():
|
|
67
|
+
undo(): boolean;
|
|
64
68
|
/**
|
|
65
69
|
* Redo the changes in the diagram caused by this action.
|
|
66
70
|
* After having called `do()`, calling `undo()` followed by `redo()` any number of times should always result in no net changes to the state of the diagram.
|
|
67
71
|
* `redo()` is usually equivalent to `do()`, but not always.
|
|
72
|
+
*
|
|
73
|
+
* @returns `true` if redoing the action had an effect on non-removed elements of the model, `false` otherwise.
|
|
68
74
|
*/
|
|
69
|
-
redo():
|
|
75
|
+
redo(): boolean;
|
|
70
76
|
}
|
|
71
77
|
/**
|
|
72
78
|
* Enum listing the actions that can be taken by the user.
|
|
73
|
-
* The actions can correspond to a DiagramAction that can be recorded in the action
|
|
79
|
+
* The actions can correspond to a DiagramAction that can be recorded in the action stack of a diagram or they may not correspond to any DiagramAction implementations.
|
|
74
80
|
* @public
|
|
75
81
|
*/
|
|
76
82
|
export declare enum DiagramActions {
|
|
77
83
|
/**
|
|
78
84
|
* Action that corresponds to the addition of a connection.
|
|
79
|
-
* @see AddConnectionAction
|
|
80
85
|
* @public
|
|
86
|
+
* @see AddConnectionAction
|
|
81
87
|
*/
|
|
82
88
|
AddConnection = "add-connection",
|
|
83
89
|
/**
|
|
84
90
|
* Action that corresponds to the addition of a node.
|
|
85
|
-
* @see AddNodeAction
|
|
86
91
|
* @public
|
|
92
|
+
* @see AddNodeAction
|
|
87
93
|
*/
|
|
88
94
|
AddNode = "add-node",
|
|
89
95
|
/**
|
|
@@ -98,44 +104,45 @@ export declare enum DiagramActions {
|
|
|
98
104
|
ContextMenu = "context-menu",
|
|
99
105
|
/**
|
|
100
106
|
* Action that corresponds to the edition of a field's text content.
|
|
101
|
-
* @see EditFieldAction
|
|
102
107
|
* @public
|
|
108
|
+
* @see EditFieldAction
|
|
103
109
|
*/
|
|
104
110
|
EditField = "edit-field",
|
|
105
111
|
/**
|
|
106
112
|
* Action that corresponds to moving a node.
|
|
107
|
-
* @see SetGeometryAction
|
|
108
113
|
* @public
|
|
114
|
+
* @see MoveAction
|
|
115
|
+
* @see SetGeometryAction
|
|
109
116
|
*/
|
|
110
117
|
MoveNode = "move-node",
|
|
111
118
|
/**
|
|
112
119
|
* Action that corresponds to pasting diagram elements from the clipboard.
|
|
113
|
-
* @see PasteAction
|
|
114
120
|
* @public
|
|
121
|
+
* @see PasteAction
|
|
115
122
|
*/
|
|
116
123
|
Paste = "paste",
|
|
117
124
|
/**
|
|
118
125
|
* Action that corresponds to removing elements.
|
|
119
|
-
* @see RemoveAction
|
|
120
126
|
* @public
|
|
127
|
+
* @see RemoveAction
|
|
121
128
|
*/
|
|
122
129
|
Remove = "remove",
|
|
123
130
|
/**
|
|
124
131
|
* Action that corresponds to altering a node's dimensions.
|
|
125
|
-
* @see SetGeometryActionAction
|
|
126
132
|
* @public
|
|
133
|
+
* @see SetGeometryAction
|
|
127
134
|
*/
|
|
128
135
|
StretchNode = "stretch-node",
|
|
129
136
|
/**
|
|
130
137
|
* Action that corresponds to altering a sections's dimensions.
|
|
131
|
-
* @see SetGeometryAction
|
|
132
138
|
* @public
|
|
139
|
+
* @see SetGeometryAction
|
|
133
140
|
*/
|
|
134
141
|
StretchSection = "stretch-section",
|
|
135
142
|
/**
|
|
136
143
|
* Action that corresponds to changing the values of a value set.
|
|
137
|
-
* @see UpdateValuesAction
|
|
138
144
|
* @public
|
|
145
|
+
* @see UpdateValuesAction
|
|
139
146
|
*/
|
|
140
147
|
UpdateValues = "update-values",
|
|
141
148
|
/**
|
|
@@ -146,11 +153,11 @@ export declare enum DiagramActions {
|
|
|
146
153
|
}
|
|
147
154
|
/**
|
|
148
155
|
* Action which consists of adding a node.
|
|
149
|
-
* @see DiagramNode
|
|
150
156
|
* @private
|
|
157
|
+
* @see DiagramNode
|
|
151
158
|
*/
|
|
152
159
|
export declare class AddNodeAction implements DiagramAction {
|
|
153
|
-
canvas: Canvas;
|
|
160
|
+
readonly canvas: Canvas;
|
|
154
161
|
type: DiagramNodeType;
|
|
155
162
|
coords: Point;
|
|
156
163
|
label?: string;
|
|
@@ -161,64 +168,77 @@ export declare class AddNodeAction implements DiagramAction {
|
|
|
161
168
|
constructor(canvas: Canvas, type: DiagramNodeType, coords: Point, label?: string, values?: {
|
|
162
169
|
[key: string]: unknown;
|
|
163
170
|
});
|
|
164
|
-
do():
|
|
165
|
-
undo():
|
|
166
|
-
redo():
|
|
171
|
+
do(): boolean;
|
|
172
|
+
undo(): boolean;
|
|
173
|
+
redo(): boolean;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Action which consists of changing the coordinates of diagram elements by a fixed amount.
|
|
177
|
+
* @private
|
|
178
|
+
*/
|
|
179
|
+
export declare class MoveAction implements DiagramAction {
|
|
180
|
+
readonly canvas: Canvas;
|
|
181
|
+
nodeIds: string[];
|
|
182
|
+
delta: Point;
|
|
183
|
+
constructor(canvas: Canvas, nodeIds: string[], delta: Point);
|
|
184
|
+
do(): boolean;
|
|
185
|
+
undo(): boolean;
|
|
186
|
+
redo(): boolean;
|
|
167
187
|
}
|
|
168
188
|
/**
|
|
169
189
|
* Action which consists of changing a node's geometry: moving, stretching, or stretching sections.
|
|
170
|
-
* @see DiagramNode
|
|
171
190
|
* @private
|
|
191
|
+
* @see DiagramNode
|
|
172
192
|
*/
|
|
173
193
|
export declare class SetGeometryAction implements DiagramAction {
|
|
174
|
-
canvas: Canvas;
|
|
194
|
+
readonly canvas: Canvas;
|
|
175
195
|
intent: DiagramActions.MoveNode | DiagramActions.StretchNode | DiagramActions.StretchSection;
|
|
176
196
|
nodeId: string;
|
|
177
197
|
from: DiagramNodeGeometry;
|
|
178
198
|
to: DiagramNodeGeometry;
|
|
179
199
|
constructor(canvas: Canvas, intent: DiagramActions.MoveNode | DiagramActions.StretchNode | DiagramActions.StretchSection, nodeId: string, from: DiagramNodeGeometry, to: DiagramNodeGeometry);
|
|
180
|
-
do():
|
|
181
|
-
undo():
|
|
182
|
-
redo():
|
|
200
|
+
do(): boolean;
|
|
201
|
+
undo(): boolean;
|
|
202
|
+
redo(): boolean;
|
|
183
203
|
}
|
|
184
204
|
/**
|
|
185
205
|
* Action which consists of adding a connection.
|
|
186
|
-
* @see DiagramConnection
|
|
187
206
|
* @private
|
|
207
|
+
* @see DiagramConnection
|
|
188
208
|
*/
|
|
189
209
|
export declare class AddConnectionAction implements DiagramAction {
|
|
190
|
-
canvas: Canvas;
|
|
210
|
+
readonly canvas: Canvas;
|
|
191
211
|
type: DiagramConnectionType;
|
|
192
212
|
startId: string;
|
|
193
213
|
endId: string;
|
|
194
214
|
id: string;
|
|
195
215
|
constructor(canvas: Canvas, type: DiagramConnectionType, startId: string, endId: string);
|
|
196
|
-
do():
|
|
197
|
-
undo():
|
|
198
|
-
redo():
|
|
216
|
+
do(): boolean;
|
|
217
|
+
undo(): boolean;
|
|
218
|
+
redo(): boolean;
|
|
199
219
|
}
|
|
200
220
|
/**
|
|
201
221
|
* Action which consists of editing the text of a field.
|
|
202
|
-
* @see DiagramField
|
|
203
222
|
* @private
|
|
223
|
+
* @see DiagramField
|
|
204
224
|
*/
|
|
205
225
|
export declare class EditFieldAction implements DiagramAction {
|
|
206
|
-
canvas: Canvas;
|
|
226
|
+
readonly canvas: Canvas;
|
|
207
227
|
fieldId: string;
|
|
208
228
|
from: string;
|
|
209
229
|
to: string;
|
|
210
230
|
constructor(canvas: Canvas, fieldId: string, from: string, to: string);
|
|
211
|
-
do():
|
|
212
|
-
undo():
|
|
213
|
-
redo():
|
|
231
|
+
do(): boolean;
|
|
232
|
+
undo(): boolean;
|
|
233
|
+
redo(): boolean;
|
|
214
234
|
}
|
|
215
235
|
/**
|
|
216
236
|
* Action which consists of editing the values of a value set.
|
|
217
|
-
* @see ValueSet
|
|
218
237
|
* @private
|
|
238
|
+
* @see ValueSet
|
|
219
239
|
*/
|
|
220
240
|
export declare class UpdateValuesAction implements DiagramAction {
|
|
221
|
-
canvas: Canvas;
|
|
241
|
+
readonly canvas: Canvas;
|
|
222
242
|
id: string | undefined;
|
|
223
243
|
from: {
|
|
224
244
|
[key: string]: unknown;
|
|
@@ -231,9 +251,9 @@ export declare class UpdateValuesAction implements DiagramAction {
|
|
|
231
251
|
}, to: {
|
|
232
252
|
[key: string]: unknown;
|
|
233
253
|
});
|
|
234
|
-
do():
|
|
235
|
-
undo():
|
|
236
|
-
redo():
|
|
254
|
+
do(): boolean;
|
|
255
|
+
undo(): boolean;
|
|
256
|
+
redo(): boolean;
|
|
237
257
|
}
|
|
238
258
|
/**
|
|
239
259
|
* Action which consists of removing elements from a diagram.
|
|
@@ -247,16 +267,16 @@ export declare class UpdateValuesAction implements DiagramAction {
|
|
|
247
267
|
* @private
|
|
248
268
|
*/
|
|
249
269
|
export declare class RemoveAction implements DiagramAction {
|
|
250
|
-
canvas: Canvas;
|
|
270
|
+
readonly canvas: Canvas;
|
|
251
271
|
nodeIds: string[];
|
|
252
272
|
sectionIds: string[];
|
|
253
273
|
portIds: string[];
|
|
254
274
|
connectionIds: string[];
|
|
255
275
|
fieldIds: string[];
|
|
256
276
|
constructor(canvas: Canvas, nodeIds: string[], sectionIds: string[], portIds: string[], connectionIds: string[], fieldIds: string[]);
|
|
257
|
-
do():
|
|
258
|
-
undo():
|
|
259
|
-
redo():
|
|
277
|
+
do(): boolean;
|
|
278
|
+
undo(): boolean;
|
|
279
|
+
redo(): boolean;
|
|
260
280
|
}
|
|
261
281
|
/**
|
|
262
282
|
* Action which consists of pasting elements from an external source into a diagram.
|
|
@@ -264,12 +284,12 @@ export declare class RemoveAction implements DiagramAction {
|
|
|
264
284
|
* @private
|
|
265
285
|
*/
|
|
266
286
|
export declare class PasteAction implements DiagramAction {
|
|
267
|
-
canvas: Canvas;
|
|
287
|
+
readonly canvas: Canvas;
|
|
268
288
|
nodes: DagaNode[];
|
|
269
289
|
connections: DagaConnection[];
|
|
270
290
|
coords?: Point;
|
|
271
291
|
constructor(canvas: Canvas, nodes: DagaNode[], connections: DagaConnection[], coords?: Point);
|
|
272
|
-
do():
|
|
273
|
-
undo():
|
|
274
|
-
redo():
|
|
292
|
+
do(): boolean;
|
|
293
|
+
undo(): boolean;
|
|
294
|
+
redo(): boolean;
|
|
275
295
|
}
|