@metadev/daga 5.1.2 → 5.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +453 -446
- package/README.md +78 -78
- package/index.cjs.js +1211 -1155
- package/index.esm.js +1211 -1155
- package/package.json +1 -1
- package/src/lib/diagram/canvas/diagram-canvas.d.ts +1 -46
- package/src/lib/diagram/canvas/diagram-context-menu.d.ts +1 -3
- package/src/lib/diagram/canvas/diagram-user-highlight.d.ts +1 -6
- package/src/lib/diagram/canvas/diagram-user-selection.d.ts +1 -5
- package/src/lib/diagram/collab/collab-action.d.ts +1 -1
- package/src/lib/diagram/collab/collab-client.d.ts +1 -23
- package/src/lib/diagram/diagram-action.d.ts +2 -6
- package/src/lib/diagram/model/diagram-connection.d.ts +3 -3
- package/src/lib/diagram/model/diagram-decorator.d.ts +1 -1
- package/src/lib/diagram/model/diagram-element.d.ts +1 -1
- package/src/lib/diagram/model/diagram-field.d.ts +2 -2
- package/src/lib/diagram/model/diagram-node.d.ts +3 -3
- package/src/lib/diagram/model/diagram-object.d.ts +1 -1
- package/src/lib/diagram/model/diagram-port.d.ts +3 -3
- package/src/lib/diagram/model/diagram-section.d.ts +1 -1
- package/src/lib/diagram/property/value.d.ts +1 -16
- package/src/lib/util/grid.d.ts +1 -3
package/package.json
CHANGED
|
@@ -27,9 +27,8 @@ export declare const CONNECTION_PATH_BOX_THICKNESS = 12;
|
|
|
27
27
|
*/
|
|
28
28
|
export declare const ACTION_STACK_SIZE = 25;
|
|
29
29
|
export declare class DiagramCanvas implements Canvas {
|
|
30
|
-
private
|
|
30
|
+
#private;
|
|
31
31
|
readonly parentComponent: DiagramEditor;
|
|
32
|
-
private diagramRoot;
|
|
33
32
|
readonly model: DiagramModel;
|
|
34
33
|
readonly userSelection: DiagramUserSelection;
|
|
35
34
|
readonly userHighlight: DiagramUserHighlight;
|
|
@@ -42,7 +41,6 @@ export declare class DiagramCanvas implements Canvas {
|
|
|
42
41
|
zoomFactor: number;
|
|
43
42
|
panRate: number;
|
|
44
43
|
inferConnectionType: boolean;
|
|
45
|
-
private _connectionType?;
|
|
46
44
|
get connectionType(): DiagramConnectionType | undefined;
|
|
47
45
|
set connectionType(value: DiagramConnectionType | undefined);
|
|
48
46
|
autoTightenConnections: boolean;
|
|
@@ -57,24 +55,6 @@ export declare class DiagramCanvas implements Canvas {
|
|
|
57
55
|
userActions: {
|
|
58
56
|
[key in DiagramActions]?: boolean;
|
|
59
57
|
};
|
|
60
|
-
private readonly gridPatternId;
|
|
61
|
-
private readonly ancillaryGridPatternIds;
|
|
62
|
-
private zoomBehavior;
|
|
63
|
-
private zoomTransform;
|
|
64
|
-
private priorityThreshold?;
|
|
65
|
-
private priorityThresholds;
|
|
66
|
-
private unfinishedConnection?;
|
|
67
|
-
/**
|
|
68
|
-
* Invisible path followed by an unfinished connection. Used for making unfinished connections stop before the cursor rather than stopping right at the cursor.
|
|
69
|
-
*/
|
|
70
|
-
private unfinishedConnectionTracer?;
|
|
71
|
-
private unfinishedConnectionPort?;
|
|
72
|
-
private inputFieldContainer?;
|
|
73
|
-
private multipleSelectionContainer?;
|
|
74
|
-
private draggingFrom;
|
|
75
|
-
private dragging;
|
|
76
|
-
private secondaryButton;
|
|
77
|
-
private currentAction?;
|
|
78
58
|
readonly validatorChange$: Subject<void>;
|
|
79
59
|
readonly diagramChange$: Subject<{
|
|
80
60
|
action: DiagramAction;
|
|
@@ -117,8 +97,6 @@ export declare class DiagramCanvas implements Canvas {
|
|
|
117
97
|
updateFieldsInView(...ids: string[]): void;
|
|
118
98
|
updateObjectsInView(...ids: string[]): void;
|
|
119
99
|
updateDecoratorsInView(...ids: string[]): void;
|
|
120
|
-
private updateConnectionLabelsInView;
|
|
121
|
-
private updateConnectionMarkersInView;
|
|
122
100
|
bringToFront(node: DiagramNode): void;
|
|
123
101
|
sendToBack(node: DiagramNode): void;
|
|
124
102
|
fieldRootFitsInView(id: string): boolean;
|
|
@@ -128,30 +106,7 @@ export declare class DiagramCanvas implements Canvas {
|
|
|
128
106
|
selectSVGElement(): d3.Selection<SVGElement, unknown, null, unknown>;
|
|
129
107
|
selectCanvasView(): d3.Selection<SVGGElement, unknown, null, unknown>;
|
|
130
108
|
selectCanvasElements(): d3.Selection<SVGGElement, unknown, null, unknown>;
|
|
131
|
-
private startConnection;
|
|
132
|
-
private finishConnection;
|
|
133
|
-
private dropConnection;
|
|
134
109
|
cancelAllUserActions(): void;
|
|
135
110
|
canUserPerformAction(action: DiagramActions): boolean;
|
|
136
111
|
openTextInput(id: string): void;
|
|
137
|
-
private createInputField;
|
|
138
|
-
private removeInputField;
|
|
139
|
-
private minimumSizeOfField;
|
|
140
|
-
private setFieldTextAndWrap;
|
|
141
|
-
private setFieldText;
|
|
142
|
-
/**
|
|
143
|
-
* Method to call to start the moving of a node triggered by a user drag event.
|
|
144
|
-
*/
|
|
145
|
-
private startMovingNode;
|
|
146
|
-
/**
|
|
147
|
-
* Method to call to continue the moving of a node triggered by a user drag event.
|
|
148
|
-
*/
|
|
149
|
-
private continueMovingNode;
|
|
150
|
-
/**
|
|
151
|
-
* Method to call to finish the moving of a node triggered by a user drag event.
|
|
152
|
-
*/
|
|
153
|
-
private finishMovingNode;
|
|
154
|
-
private startMultipleSelection;
|
|
155
|
-
private continueMultipleSelection;
|
|
156
|
-
private finishMultipleSelection;
|
|
157
112
|
}
|
|
@@ -9,9 +9,7 @@ export declare const CONTEXT_MENU_DEFAULTS: {
|
|
|
9
9
|
* @see DiagramCanvas
|
|
10
10
|
*/
|
|
11
11
|
export declare class DiagramContextMenu {
|
|
12
|
-
private
|
|
13
|
-
private config;
|
|
14
|
-
private contextMenuContainer?;
|
|
12
|
+
#private;
|
|
15
13
|
/**
|
|
16
14
|
* Constructs a context menu object.
|
|
17
15
|
* @public
|
|
@@ -6,12 +6,7 @@ import { DiagramElement, DiagramElementSet } from '../model/diagram-element';
|
|
|
6
6
|
* @see DiagramCanvas
|
|
7
7
|
*/
|
|
8
8
|
export declare class DiagramUserHighlight extends DiagramElementSet<DiagramElement> {
|
|
9
|
-
private
|
|
10
|
-
private focus?;
|
|
11
|
-
/**
|
|
12
|
-
* Whether sections can be highlighted individually or the whole node must be highlighted when highlighting a section.
|
|
13
|
-
*/
|
|
14
|
-
private highlightSections;
|
|
9
|
+
#private;
|
|
15
10
|
/**
|
|
16
11
|
* Constructs a user highlight object.
|
|
17
12
|
* @public
|
|
@@ -16,10 +16,7 @@ export declare const DIAGRAM_PROPERTIES_DEFAULT_TEXT = "Diagram properties";
|
|
|
16
16
|
* @see DiagramCanvas
|
|
17
17
|
*/
|
|
18
18
|
export declare class DiagramUserSelection extends DiagramElementSet<DiagramElement> {
|
|
19
|
-
private
|
|
20
|
-
private readonly diagramPropertiesText;
|
|
21
|
-
private propertyEditorSelection?;
|
|
22
|
-
private propertyEditorValues?;
|
|
19
|
+
#private;
|
|
23
20
|
/**
|
|
24
21
|
* Constructs a user selection object.
|
|
25
22
|
* @public
|
|
@@ -73,5 +70,4 @@ export declare class DiagramUserSelection extends DiagramElementSet<DiagramEleme
|
|
|
73
70
|
openInPropertyEditor(selection?: {
|
|
74
71
|
valueSet: ValueSet;
|
|
75
72
|
} & (DiagramElement | DiagramModel), makeUpdateValuesAction?: boolean): void;
|
|
76
|
-
private makeUpdateValuesAction;
|
|
77
73
|
}
|
|
@@ -307,6 +307,7 @@ export type SetSelfRemovedSerialized = {
|
|
|
307
307
|
* @see RemoveAction
|
|
308
308
|
*/
|
|
309
309
|
export declare class SetSelfRemovedCollabAction implements CollabAction {
|
|
310
|
+
#private;
|
|
310
311
|
readonly canvas: Canvas;
|
|
311
312
|
readonly nodeIds: string[];
|
|
312
313
|
readonly sectionIds: string[];
|
|
@@ -316,7 +317,6 @@ export declare class SetSelfRemovedCollabAction implements CollabAction {
|
|
|
316
317
|
readonly selfRemoved: boolean;
|
|
317
318
|
readonly timestamp: CollabTimestamp;
|
|
318
319
|
constructor(canvas: Canvas, nodeIds: string[], sectionIds: string[], portIds: string[], connectionIds: string[], fieldIds: string[], selfRemoved: boolean, timestamp: CollabTimestamp);
|
|
319
|
-
private doOne;
|
|
320
320
|
do(): void;
|
|
321
321
|
serialize(): CollabActionSerialized;
|
|
322
322
|
static deserialize(canvas: Canvas, serialized: SetSelfRemovedSerialized): SetSelfRemovedCollabAction;
|
|
@@ -6,35 +6,14 @@ import { Canvas } from '../../interfaces/canvas';
|
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
8
|
export declare class CollabClient {
|
|
9
|
+
#private;
|
|
9
10
|
/**
|
|
10
11
|
* The WebSocket URL of the daga-server.
|
|
11
12
|
*/
|
|
12
13
|
readonly dagaServer: string;
|
|
13
14
|
readonly userId: string;
|
|
14
15
|
readonly clientId: string;
|
|
15
|
-
private readonly ws;
|
|
16
|
-
private sendQueue;
|
|
17
|
-
/**
|
|
18
|
-
* Joined sessions by locator.
|
|
19
|
-
*/
|
|
20
|
-
private sessions;
|
|
21
|
-
/**
|
|
22
|
-
* Created but unacked sessions by refId.
|
|
23
|
-
*/
|
|
24
|
-
private pendingSessions;
|
|
25
16
|
constructor(dagaServer: string, userId: string);
|
|
26
|
-
private onOpen;
|
|
27
|
-
private onMessage;
|
|
28
|
-
private onClose;
|
|
29
|
-
private onError;
|
|
30
|
-
/**
|
|
31
|
-
* Internal send method. Use instead of calling ws.send directly.
|
|
32
|
-
*/
|
|
33
|
-
private send;
|
|
34
|
-
/**
|
|
35
|
-
* Internal receive method. Use instead of handling ws receive events directly.
|
|
36
|
-
*/
|
|
37
|
-
private receive;
|
|
38
17
|
/**
|
|
39
18
|
* Creates and joins a room. The given canvas becomes collaborative, starting
|
|
40
19
|
* with its current model.
|
|
@@ -53,5 +32,4 @@ export declare class CollabClient {
|
|
|
53
32
|
* @public
|
|
54
33
|
*/
|
|
55
34
|
joinRoom(canvas: Canvas, locator: string): Promise<void>;
|
|
56
|
-
private startSyncing;
|
|
57
35
|
}
|
|
@@ -8,11 +8,7 @@ import { DiagramNodeGeometry, DiagramNodeType } from './model/diagram-node';
|
|
|
8
8
|
* @private
|
|
9
9
|
*/
|
|
10
10
|
export declare class ActionStack {
|
|
11
|
-
|
|
12
|
-
* Canvas that this action stack belongs to.
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
private readonly canvas;
|
|
11
|
+
#private;
|
|
16
12
|
/**
|
|
17
13
|
* Maximum number of actions that can be recorded simultaneously.
|
|
18
14
|
* When new actions are added past this limit, older actions are removed.
|
|
@@ -28,7 +24,7 @@ export declare class ActionStack {
|
|
|
28
24
|
* Index of the last action not counting undone actions. One-indexed. Zero if all actions are undone.
|
|
29
25
|
* @private
|
|
30
26
|
*/
|
|
31
|
-
|
|
27
|
+
index: number;
|
|
32
28
|
constructor(canvas: Canvas, maximum: number);
|
|
33
29
|
/**
|
|
34
30
|
* Adds an action to the history.
|
|
@@ -76,7 +76,7 @@ export declare class DiagramConnectionType implements DiagramEntity {
|
|
|
76
76
|
* @see DiagramPort
|
|
77
77
|
*/
|
|
78
78
|
export declare class DiagramConnection extends DiagramElement {
|
|
79
|
-
private
|
|
79
|
+
#private;
|
|
80
80
|
get type(): DiagramConnectionType;
|
|
81
81
|
set type(type: DiagramConnectionType);
|
|
82
82
|
get typeString(): string;
|
|
@@ -252,12 +252,12 @@ export declare class DiagramConnection extends DiagramElement {
|
|
|
252
252
|
getPriority(): number;
|
|
253
253
|
}
|
|
254
254
|
export declare class DiagramConnectionSet extends DiagramElementSet<DiagramConnection> {
|
|
255
|
-
private
|
|
255
|
+
#private;
|
|
256
256
|
/**
|
|
257
257
|
* Set of the possible types of connection that the connections of this set can have.
|
|
258
258
|
* @public
|
|
259
259
|
*/
|
|
260
|
-
types: DiagramEntitySet<DiagramConnectionType>;
|
|
260
|
+
readonly types: DiagramEntitySet<DiagramConnectionType>;
|
|
261
261
|
/**
|
|
262
262
|
* Instance a set of connections for the given model. This method is used internally.
|
|
263
263
|
* @private
|
|
@@ -58,7 +58,7 @@ export declare class DiagramDecorator extends DiagramElement {
|
|
|
58
58
|
getPriority(): number;
|
|
59
59
|
}
|
|
60
60
|
export declare class DiagramDecoratorSet extends DiagramElementSet<DiagramDecorator> {
|
|
61
|
-
private
|
|
61
|
+
#private;
|
|
62
62
|
/**
|
|
63
63
|
* Instance a set of decorators for the given model. This method is used internally.
|
|
64
64
|
* @private
|
|
@@ -14,12 +14,12 @@ export declare const DEFAULT_PRIORITY = 0;
|
|
|
14
14
|
* @see DiagramCanvas
|
|
15
15
|
*/
|
|
16
16
|
export declare abstract class DiagramElement implements DiagramEntity {
|
|
17
|
+
#private;
|
|
17
18
|
/**
|
|
18
19
|
* Diagram model this diagram element is part of.
|
|
19
20
|
* @private
|
|
20
21
|
*/
|
|
21
22
|
readonly model: DiagramModel;
|
|
22
|
-
private _id;
|
|
23
23
|
/**
|
|
24
24
|
* Identifier that uniquely identifies this element within its diagram model. Cannot be an empty string.
|
|
25
25
|
* @public
|
|
@@ -39,6 +39,7 @@ export interface LabeledElement {
|
|
|
39
39
|
* @see DiagramSection
|
|
40
40
|
*/
|
|
41
41
|
export declare class DiagramField extends DiagramElement {
|
|
42
|
+
#private;
|
|
42
43
|
/**
|
|
43
44
|
* Element that this field belongs to.
|
|
44
45
|
* @public
|
|
@@ -79,7 +80,6 @@ export declare class DiagramField extends DiagramElement {
|
|
|
79
80
|
* @public
|
|
80
81
|
*/
|
|
81
82
|
multiline: boolean;
|
|
82
|
-
private _text;
|
|
83
83
|
/**
|
|
84
84
|
* Default text that this field's text resets to when empty.
|
|
85
85
|
* @public
|
|
@@ -133,7 +133,7 @@ export declare class DiagramField extends DiagramElement {
|
|
|
133
133
|
getPriority(): number;
|
|
134
134
|
}
|
|
135
135
|
export declare class DiagramFieldSet extends DiagramElementSet<DiagramField> {
|
|
136
|
-
private
|
|
136
|
+
#private;
|
|
137
137
|
/**
|
|
138
138
|
* Instance a set of fields for the given model. This method is used internally.
|
|
139
139
|
* @private
|
|
@@ -110,7 +110,7 @@ export declare class DiagramNodeType implements DiagramEntity {
|
|
|
110
110
|
* @see DiagramSection
|
|
111
111
|
*/
|
|
112
112
|
export declare class DiagramNode extends DiagramElement implements LabeledElement {
|
|
113
|
-
private
|
|
113
|
+
#private;
|
|
114
114
|
get type(): DiagramNodeType;
|
|
115
115
|
set type(type: DiagramNodeType);
|
|
116
116
|
get typeString(): string;
|
|
@@ -355,12 +355,12 @@ export declare class DiagramNode extends DiagramElement implements LabeledElemen
|
|
|
355
355
|
copySectionRow(rowIndex: number): void;
|
|
356
356
|
}
|
|
357
357
|
export declare class DiagramNodeSet extends DiagramElementSet<DiagramNode> {
|
|
358
|
-
private
|
|
358
|
+
#private;
|
|
359
359
|
/**
|
|
360
360
|
* Set of the possible types of node that the nodes of this set can have.
|
|
361
361
|
* @public
|
|
362
362
|
*/
|
|
363
|
-
types: DiagramEntitySet<DiagramNodeType>;
|
|
363
|
+
readonly types: DiagramEntitySet<DiagramNodeType>;
|
|
364
364
|
/**
|
|
365
365
|
* Instance a set of nodes for the given model. This method is used internally.
|
|
366
366
|
* @private
|
|
@@ -37,7 +37,7 @@ export declare class DiagramObject extends DiagramElement {
|
|
|
37
37
|
getPriority(): number;
|
|
38
38
|
}
|
|
39
39
|
export declare class DiagramObjectSet extends DiagramElementSet<DiagramObject> {
|
|
40
|
-
private
|
|
40
|
+
#private;
|
|
41
41
|
/**
|
|
42
42
|
* Instance a set of objects for the given model. This method is used internally.
|
|
43
43
|
* @private
|
|
@@ -70,7 +70,7 @@ export declare class DiagramPortType implements DiagramEntity {
|
|
|
70
70
|
* @see DiagramSection
|
|
71
71
|
*/
|
|
72
72
|
export declare class DiagramPort extends DiagramElement implements LabeledElement {
|
|
73
|
-
private
|
|
73
|
+
#private;
|
|
74
74
|
get type(): DiagramPortType | undefined;
|
|
75
75
|
set type(type: DiagramPortType | undefined);
|
|
76
76
|
get typeString(): string | undefined;
|
|
@@ -202,12 +202,12 @@ export declare class DiagramPort extends DiagramElement implements LabeledElemen
|
|
|
202
202
|
distanceTo(coords: Point): number;
|
|
203
203
|
}
|
|
204
204
|
export declare class DiagramPortSet extends DiagramElementSet<DiagramPort> {
|
|
205
|
-
private
|
|
205
|
+
#private;
|
|
206
206
|
/**
|
|
207
207
|
* Set of the possible types of port that the ports of this set can have.
|
|
208
208
|
* @public
|
|
209
209
|
*/
|
|
210
|
-
types: DiagramEntitySet<DiagramPortType>;
|
|
210
|
+
readonly types: DiagramEntitySet<DiagramPortType>;
|
|
211
211
|
/**
|
|
212
212
|
* Instance a set of ports for the given model. This method is used internally.
|
|
213
213
|
* @private
|
|
@@ -243,7 +243,7 @@ export declare class DiagramSection extends DiagramElement implements LabeledEle
|
|
|
243
243
|
setGeometry(geometry: DiagramSectionGeometry): void;
|
|
244
244
|
}
|
|
245
245
|
export declare class DiagramSectionSet extends DiagramElementSet<DiagramSection> {
|
|
246
|
-
private
|
|
246
|
+
#private;
|
|
247
247
|
/**
|
|
248
248
|
* Instance a set of sections for the given model. This method is used internally.
|
|
249
249
|
* @private
|
|
@@ -6,21 +6,13 @@ import { Property, PropertySet } from './property';
|
|
|
6
6
|
* @see PropertySet
|
|
7
7
|
*/
|
|
8
8
|
export declare class ValueSet {
|
|
9
|
+
#private;
|
|
9
10
|
rootElement: {
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
};
|
|
12
13
|
propertySet: PropertySet;
|
|
13
14
|
displayedProperties: Property[];
|
|
14
15
|
hiddenProperties: Property[];
|
|
15
|
-
private values;
|
|
16
|
-
private valueSets;
|
|
17
|
-
/**
|
|
18
|
-
* Collaborative timestamps for all keys in this.values that have ever been set,
|
|
19
|
-
* even if since they've since been set to the default value.
|
|
20
|
-
*
|
|
21
|
-
* Object values (in this.valueSets) store their own timestamps separately.
|
|
22
|
-
*/
|
|
23
|
-
private ownTimestamps;
|
|
24
16
|
constructor(propertySet: PropertySet, rootElement: unknown);
|
|
25
17
|
/**
|
|
26
18
|
* Gets the value of the root element attribute under the given keys.
|
|
@@ -134,13 +126,6 @@ export declare class ValueSet {
|
|
|
134
126
|
* @private
|
|
135
127
|
*/
|
|
136
128
|
resetValues(): void;
|
|
137
|
-
/**
|
|
138
|
-
* Constructs a ValueSet with its corresponding PropertySet representing the values of the object.
|
|
139
|
-
* @private
|
|
140
|
-
* @param key Key that the ValueSet is under.
|
|
141
|
-
* @returns The constructed ValueSet.
|
|
142
|
-
*/
|
|
143
|
-
private constructSubValueSet;
|
|
144
129
|
/**
|
|
145
130
|
* Gets the ValueSet under the given key when there are nested ValueSets.
|
|
146
131
|
* @private
|
package/src/lib/util/grid.d.ts
CHANGED