@metadev/daga 1.5.6 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/Changelog.md +35 -1
  2. package/README.md +67 -30
  3. package/assets/daga-logo.svg +10 -0
  4. package/index.cjs.d.ts +1 -0
  5. package/index.cjs.default.js +1 -0
  6. package/index.cjs.js +8085 -0
  7. package/index.cjs.mjs +2 -0
  8. package/index.esm.d.ts +1 -0
  9. package/index.esm.js +7999 -0
  10. package/package.json +19 -37
  11. package/src/index.d.ts +49 -0
  12. package/src/lib/core.d.ts +1 -0
  13. package/{lib/diagram-editor/diagram → src/lib/diagram/canvas}/diagram-canvas.d.ts +69 -66
  14. package/src/lib/diagram/canvas/diagram-context-menu.d.ts +27 -0
  15. package/src/lib/diagram/canvas/diagram-user-highlight.d.ts +30 -0
  16. package/src/lib/diagram/canvas/diagram-user-selection.d.ts +74 -0
  17. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-action.d.ts +36 -12
  18. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-client.d.ts +1 -1
  19. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-engine.d.ts +1 -1
  20. package/{lib/diagram-editor → src/lib}/diagram/collab/message-types.d.ts +3 -8
  21. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-exporter.d.ts +6 -6
  22. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-importer.d.ts +6 -4
  23. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-model.d.ts +3 -3
  24. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-exporter.d.ts +2 -2
  25. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-importer.d.ts +2 -2
  26. package/{lib/diagram-editor → src/lib}/diagram/diagram-action.d.ts +75 -55
  27. package/{lib/diagram-editor → src/lib}/diagram/diagram-config.d.ts +139 -84
  28. package/{lib/diagram-editor → src/lib}/diagram/diagram-event.d.ts +3 -3
  29. package/{lib/diagram-editor → src/lib}/diagram/layout/adjacency-layout.d.ts +1 -1
  30. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-adjacency-layout.d.ts +1 -1
  31. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-layout.d.ts +1 -1
  32. package/{lib/diagram-editor → src/lib}/diagram/layout/diagram-layout.d.ts +1 -1
  33. package/{lib/diagram-editor → src/lib}/diagram/layout/force-layout.d.ts +1 -1
  34. package/{lib/diagram-editor → src/lib}/diagram/layout/horizontal-layout.d.ts +1 -1
  35. package/{lib/diagram-editor → src/lib}/diagram/layout/priority-layout.d.ts +1 -1
  36. package/{lib/diagram-editor → src/lib}/diagram/layout/tree-layout.d.ts +1 -1
  37. package/{lib/diagram-editor → src/lib}/diagram/layout/vertical-layout.d.ts +1 -1
  38. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-connection.d.ts +4 -4
  39. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-element.d.ts +7 -11
  40. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-entity.d.ts +2 -2
  41. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-field.d.ts +4 -4
  42. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-model.d.ts +15 -15
  43. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-node.d.ts +7 -7
  44. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-property.d.ts +46 -31
  45. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-section.d.ts +8 -8
  46. package/{lib → src/lib}/errors/diagram-validator.d.ts +1 -1
  47. package/{lib → src/lib}/interfaces/canvas.d.ts +79 -107
  48. package/{lib → src/lib}/interfaces/diagram-buttons.d.ts +8 -8
  49. package/{lib → src/lib}/interfaces/diagram-editor.d.ts +4 -11
  50. package/{lib → src/lib}/interfaces/palette.d.ts +2 -2
  51. package/{lib → src/lib}/interfaces/property-editor.d.ts +5 -5
  52. package/{lib → src/lib}/util/canvas-util.d.ts +20 -5
  53. package/src/lib/util/device-util.d.ts +5 -0
  54. package/{lib → src/lib}/util/events.d.ts +4 -4
  55. package/{lib → src/lib}/util/style.d.ts +1 -0
  56. package/src/lib/util/test-util.d.ts +11 -0
  57. package/assets/fonts/DMMono-Medium.ttf +0 -0
  58. package/assets/fonts/DMMono-Medium.woff +0 -0
  59. package/assets/fonts/DMMono-Medium.woff2 +0 -0
  60. package/assets/fonts/WonderUnitSans-Medium.ttf +0 -0
  61. package/assets/fonts/WonderUnitSans-Medium.woff +0 -0
  62. package/assets/fonts/WonderUnitSans-Medium.woff2 +0 -0
  63. package/assets/icon/action/drop-down-arrow.svg +0 -8
  64. package/assets/icon/action/drop-horizontal-left.svg +0 -14
  65. package/assets/icon/action/drop-horizontal-none.svg +0 -13
  66. package/assets/icon/action/drop-horizontal-right.svg +0 -14
  67. package/assets/icon/action/drop-vertical-down.svg +0 -14
  68. package/assets/icon/action/drop-vertical-none.svg +0 -13
  69. package/assets/icon/action/drop-vertical-up.svg +0 -14
  70. package/assets/icon/action/filter-clear.png +0 -0
  71. package/assets/icon/buttons/center-hover.svg +0 -10
  72. package/assets/icon/buttons/center.svg +0 -10
  73. package/assets/icon/buttons/ellipsis-hover.svg +0 -7
  74. package/assets/icon/buttons/ellipsis.svg +0 -7
  75. package/assets/icon/buttons/filter-off-hover.svg +0 -5
  76. package/assets/icon/buttons/filter-off.svg +0 -5
  77. package/assets/icon/buttons/filter-on-hover.svg +0 -5
  78. package/assets/icon/buttons/filter-on.svg +0 -5
  79. package/assets/icon/buttons/layout-hover.svg +0 -8
  80. package/assets/icon/buttons/layout.svg +0 -8
  81. package/assets/icon/buttons/redo-hover.svg +0 -5
  82. package/assets/icon/buttons/redo.svg +0 -5
  83. package/assets/icon/buttons/undo-hover.svg +0 -5
  84. package/assets/icon/buttons/undo.svg +0 -5
  85. package/assets/icon/buttons/zoom-in-hover.svg +0 -8
  86. package/assets/icon/buttons/zoom-in.svg +0 -8
  87. package/assets/icon/buttons/zoom-out-hover.svg +0 -7
  88. package/assets/icon/buttons/zoom-out.svg +0 -7
  89. package/assets/icon/context/copy.svg +0 -4
  90. package/assets/icon/context/cross.svg +0 -3
  91. package/assets/icon/context/cut.svg +0 -4
  92. package/assets/icon/context/delete.svg +0 -4
  93. package/assets/icon/context/paste.svg +0 -4
  94. package/assets/icon/property/add.svg +0 -23
  95. package/assets/icon/property/close.svg +0 -3
  96. package/assets/icon/property/ellipsis.svg +0 -5
  97. package/assets/icon/property/gear.svg +0 -3
  98. package/assets/icon/property/hide.svg +0 -10
  99. package/assets/icon/property/move.svg +0 -35
  100. package/assets/styles/_collapse-button.scss +0 -37
  101. package/assets/styles/_context-menu.scss +0 -32
  102. package/assets/styles/_diagram-buttons.scss +0 -166
  103. package/assets/styles/_diagram.scss +0 -15
  104. package/assets/styles/_errors.scss +0 -83
  105. package/assets/styles/_palette.scss +0 -20
  106. package/assets/styles/_property-editor.scss +0 -285
  107. package/assets/styles/daga.scss +0 -150
  108. package/fesm2022/metadev-daga.mjs +0 -10957
  109. package/fesm2022/metadev-daga.mjs.map +0 -1
  110. package/index.d.ts +0 -55
  111. package/lib/collapse-button/collapse-button.component.d.ts +0 -22
  112. package/lib/daga.module.d.ts +0 -18
  113. package/lib/diagram/diagram.component.d.ts +0 -44
  114. package/lib/diagram-buttons/diagram-buttons.component.d.ts +0 -44
  115. package/lib/diagram-editor/diagram-editor.component.d.ts +0 -38
  116. package/lib/errors/errors.component.d.ts +0 -26
  117. package/lib/palette/palette.component.d.ts +0 -39
  118. package/lib/property-editor/autocomplete/autocomplete.component.d.ts +0 -39
  119. package/lib/property-editor/object-editor/object-editor.component.d.ts +0 -30
  120. package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +0 -33
  121. package/lib/property-editor/property-editor.component.d.ts +0 -30
  122. package/lib/property-editor/property-settings/property-settings.component.d.ts +0 -35
  123. package/lib/property-editor/text-list-editor/text-list-editor.component.d.ts +0 -29
  124. package/lib/property-editor/text-map-editor/text-map-editor.component.d.ts +0 -36
  125. package/lib/services/canvas-provider.service.d.ts +0 -32
  126. package/lib/services/daga-configuration.service.d.ts +0 -23
  127. package/{lib/diagram-editor → src/lib}/diagram/collab/primitives.d.ts +0 -0
  128. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-decorator.d.ts +1 -1
  129. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-object.d.ts +0 -0
  130. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-port.d.ts +2 -2
  131. package/{lib → src/lib}/errors/diagram-error.d.ts +3 -3
  132. package/{lib → src/lib}/util/grid.d.ts +0 -0
  133. package/{lib → src/lib}/util/line.d.ts +0 -0
  134. package/{lib → src/lib}/util/list-util.d.ts +0 -0
  135. package/{lib → src/lib}/util/shape.d.ts +10 -10
  136. /package/{lib → src/lib}/util/svg-util.d.ts +0 -0
  137. /package/{lib → src/lib}/util/text-util.d.ts +0 -0
@@ -1,6 +1,8 @@
1
1
  import { CollabTimestamp } from '../collab/primitives';
2
- import { DiagramField } from '../diagram-field';
3
- import { DiagramModel } from '../diagram-model';
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): DiagramModel;
13
- importConnection(model: DiagramModel, connection: DagaConnection): DiagramModel;
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 '../../../util/canvas-util';
2
- import { Side } from '../../../util/svg-util';
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 '../../interfaces/canvas';
2
- import { Point } from '../../util/canvas-util';
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 queue of recent actions taken by the user that can be undone and redone.
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 ActionQueue {
10
+ export declare class ActionStack {
11
11
  /**
12
- * Canvas that this action queue belongs to.
12
+ * Canvas that this action stack belongs to.
13
13
  * @private
14
14
  */
15
- canvas: 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: number;
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(): void;
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(): void;
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(): void;
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 queue of a diagram or they may not correspond to any DiagramAction implementations.
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(): void;
165
- undo(): void;
166
- redo(): void;
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(): void;
181
- undo(): void;
182
- redo(): void;
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(): void;
197
- undo(): void;
198
- redo(): void;
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(): void;
212
- undo(): void;
213
- redo(): void;
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(): void;
235
- undo(): void;
236
- redo(): void;
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(): void;
258
- undo(): void;
259
- redo(): void;
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(): void;
273
- undo(): void;
274
- redo(): void;
292
+ do(): boolean;
293
+ undo(): boolean;
294
+ redo(): boolean;
275
295
  }