@metadev/daga 1.4.1 → 1.4.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 (30) hide show
  1. package/Changelog.md +18 -1
  2. package/assets/styles/_property-editor.scss +225 -157
  3. package/assets/styles/daga.scss +149 -156
  4. package/fesm2022/metadev-daga.mjs +1537 -592
  5. package/fesm2022/metadev-daga.mjs.map +1 -1
  6. package/index.d.ts +5 -3
  7. package/lib/daga.module.d.ts +4 -5
  8. package/lib/diagram-editor/diagram/collab/collab-action.d.ts +90 -0
  9. package/lib/diagram-editor/diagram/collab/collab-client.d.ts +57 -0
  10. package/lib/diagram-editor/diagram/collab/collab-engine.d.ts +46 -0
  11. package/lib/diagram-editor/diagram/collab/message-types.d.ts +97 -0
  12. package/lib/diagram-editor/diagram/collab/primitives.d.ts +15 -0
  13. package/lib/diagram-editor/diagram/converters/daga-model.d.ts +3 -0
  14. package/lib/diagram-editor/diagram/diagram-action.d.ts +27 -19
  15. package/lib/diagram-editor/diagram/diagram-canvas.d.ts +3 -1
  16. package/lib/diagram-editor/diagram/diagram-connection.d.ts +35 -3
  17. package/lib/diagram-editor/diagram/diagram-element.d.ts +7 -2
  18. package/lib/diagram-editor/diagram/diagram-field.d.ts +13 -2
  19. package/lib/diagram-editor/diagram/diagram-model.d.ts +6 -0
  20. package/lib/diagram-editor/diagram/diagram-node.d.ts +67 -3
  21. package/lib/diagram-editor/diagram/diagram-port.d.ts +28 -2
  22. package/lib/diagram-editor/diagram/diagram-property.d.ts +143 -19
  23. package/lib/diagram-editor/diagram/diagram-section.d.ts +40 -3
  24. package/lib/interfaces/canvas.d.ts +7 -0
  25. package/lib/property-editor/autocomplete/autocomplete.component.d.ts +39 -0
  26. package/lib/{object-editor → property-editor/object-editor}/object-editor.component.d.ts +5 -6
  27. package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +29 -0
  28. package/lib/{text-list-editor → property-editor/text-list-editor}/text-list-editor.component.d.ts +2 -2
  29. package/lib/{text-map-editor → property-editor/text-map-editor}/text-map-editor.component.d.ts +2 -2
  30. package/package.json +3 -3
@@ -1,5 +1,6 @@
1
1
  import { Point } from '../../util/canvas-util';
2
2
  import { Side } from '../../util/svg-util';
3
+ import { CollabTimestamp } from './collab/primitives';
3
4
  import { FieldConfig, NodeImageLook, NodeShapedLook, NodeStretchableImageLook, NodeTypeConfig, PortConfig, SectionGridConfig } from './diagram-config';
4
5
  import { DiagramConnection } from './diagram-connection';
5
6
  import { DiagramElement, DiagramEntity, DiagramEntitySet } from './diagram-element';
@@ -97,6 +98,11 @@ export declare class DiagramNode extends DiagramElement {
97
98
  * @public
98
99
  */
99
100
  coords: Point;
101
+ /**
102
+ * Collaborative timestamp for coords.
103
+ * @public
104
+ */
105
+ coordsTimestamp?: CollabTimestamp;
100
106
  /**
101
107
  * Dimension of this node along the x axis.
102
108
  * @public
@@ -116,21 +122,79 @@ export declare class DiagramNode extends DiagramElement {
116
122
  constructor(model: DiagramModel, type: DiagramNodeType, coords?: Point, id?: string);
117
123
  updateInView(): void;
118
124
  getPriority(): number;
125
+ /**
126
+ * Get the port of this node which is closest to the given coordinates.
127
+ * @param coords A point in the diagram.
128
+ * @returns The port of this node closest to the given coordinates, `undefined` if this node has no ports.
129
+ */
119
130
  getClosestPortToPoint(coords: Point): DiagramPort | undefined;
131
+ /**
132
+ * Get all incoming connections of all ports of this node, not including incoming connections of sections of this node.
133
+ * @public
134
+ * @returns A list of connections.
135
+ */
120
136
  getIncomingConnections(): DiagramConnection[];
137
+ /**
138
+ * Get all outgoing connections of all ports of this node, not including outgoing connections of sections of this node.
139
+ * @public
140
+ * @returns A list of connections.
141
+ */
121
142
  getOutgoingConnections(): DiagramConnection[];
143
+ /**
144
+ * Get all connections of all ports of this node, not including connections of sections of this node.
145
+ * @public
146
+ * @returns A list of connections.
147
+ */
122
148
  getConnections(): DiagramConnection[];
149
+ /**
150
+ * Get all nodes that have a direct connection to this node, not including nodes that have a direct connection to sections of this node.
151
+ * @public
152
+ * @returns A list of nodes.
153
+ */
123
154
  getAdjacentNodes(): DiagramNode[];
155
+ /**
156
+ * Change the coordinates of this node to the given coordinates and move its sections, ports and labels correspondingly.
157
+ * @public
158
+ * @param coords A point in the diagram.
159
+ */
124
160
  move(coords: Point): void;
161
+ /**
162
+ * Change the dimensions of this node in the given direction by the given amount without changing the dimensions of the sections of this node.
163
+ * @public
164
+ * @param direction A direction.
165
+ * @param distance A distance.
166
+ */
125
167
  stretch(direction: Side, distance: number): void;
168
+ /**
169
+ * Change the dimensions of this node and its sections in the given direction by the given amount, with the sections of the given index being stretched.
170
+ * @public
171
+ * @param direction A direction.
172
+ * @param distance A distance.
173
+ * @param indexX A section index.
174
+ * @param indexY A section index.
175
+ */
126
176
  stretchSections(direction: Side, distance: number, indexX: number, indexY: number): void;
127
177
  }
128
178
  export declare class DiagramNodeSet extends DiagramEntitySet<DiagramNode> {
129
179
  private model;
180
+ /**
181
+ * Set of the possible types of node that the nodes of this set can have.
182
+ * @public
183
+ */
130
184
  types: DiagramEntitySet<DiagramNodeType>;
185
+ /**
186
+ * Instance a set of nodes for the given model. This method is used internally.
187
+ * @private
188
+ */
131
189
  constructor(model: DiagramModel);
132
- new(type: DiagramNodeType, coords: Point, id?: string | undefined, sectionIds?: (string | undefined)[], sectionPortIds?: (string | undefined)[][], sectionPortLabelIds?: (string | undefined)[][], portIds?: (string | undefined)[], portLabelIds?: (string | undefined)[], labelId?: string | undefined): DiagramNode;
190
+ /**
191
+ * Instance a new node and add it to this set.
192
+ * @public
193
+ * @param type The type of the node given as either the type itself or the id of the type.
194
+ * @param coords The coordinates of the top left corner of the node in the diagram.
195
+ * @param id The id of the node. Should be left undefined unless a specific id is required.
196
+ * @returns The instanced node.
197
+ */
198
+ new(type: DiagramNodeType | string, coords: Point, id?: string | undefined): DiagramNode;
133
199
  remove(id: string): void;
134
- filter(type?: string, threshold?: number): DiagramNode[];
135
- find(type?: string, threshold?: number): DiagramNode | undefined;
136
200
  }
@@ -56,18 +56,44 @@ export declare class DiagramPort extends DiagramElement {
56
56
  incomingConnections: DiagramConnection[];
57
57
  constructor(model: DiagramModel, rootElement: DiagramNode | DiagramSection | undefined, coords: Point, direction: Side, id?: string);
58
58
  updateInView(): void;
59
+ /**
60
+ * Add a connection to this port's list of outgoing connections.
61
+ * @public
62
+ * @param connection A connection.
63
+ */
59
64
  startConnection(connection: DiagramConnection): void;
65
+ /**
66
+ * Add a connection to this port's list of incoming connections.
67
+ * @public
68
+ * @param connection A connection.
69
+ */
60
70
  finishConnection(connection: DiagramConnection): void;
71
+ /**
72
+ * Get the root node of this port, which is either its rootElement if it's a node or it's rootElement's node if it's a section.
73
+ * @public
74
+ * @returns A node if it could be found, `undefined` otherwise.
75
+ */
61
76
  getNode(): DiagramNode | undefined;
62
77
  getPriority(): number;
78
+ /**
79
+ * Change the coordinates of this port to the given coordinates and move its labels correspondingly.
80
+ * @public
81
+ * @param coords A point in the diagram.
82
+ */
63
83
  move(coords: Point): void;
64
84
  distanceTo(coords: Point): number;
65
85
  }
66
86
  export declare class DiagramPortSet extends DiagramEntitySet<DiagramPort> {
67
87
  private model;
88
+ /**
89
+ * Instance a set of ports for the given model. This method is used internally.
90
+ * @private
91
+ */
68
92
  constructor(model: DiagramModel);
93
+ /**
94
+ * Instance a new port and add it to this set. This method is normally called when instancing an element with a port and it is rarely called by itself.
95
+ * @private
96
+ */
69
97
  new(rootElement: DiagramNode | DiagramSection | undefined, coords: Point, direction: Side, id?: string | undefined): DiagramPort;
70
98
  remove(id: string): void;
71
- filter(threshold?: number): DiagramPort[];
72
- find(threshold?: number): DiagramPort | undefined;
73
99
  }
@@ -1,4 +1,3 @@
1
- import { DataSource } from '@metadev/lux';
2
1
  /**
3
2
  * A property which is part of a property set and defines what values a value in a value set can take.
4
3
  * @see PropertySet
@@ -16,8 +15,9 @@ export declare class Property {
16
15
  type: Type;
17
16
  /**
18
17
  * The default value of this property.
18
+ * @default undefined
19
19
  */
20
- defaultValue: unknown;
20
+ defaultValue?: unknown;
21
21
  /**
22
22
  * Whether this property should always appear in the property editor component.
23
23
  * @see PropertyEditorComponent
@@ -28,22 +28,33 @@ export declare class Property {
28
28
  */
29
29
  editable: boolean;
30
30
  /**
31
- * Which attribute of the parent component the value of this property is linked to. Null if none.
31
+ * Which attribute of the parent component the value of this property is linked to. `undefined` if none.
32
+ * @default undefined
32
33
  */
33
- rootAttribute: string[] | string | null;
34
+ rootAttribute?: string[] | string;
34
35
  /**
35
36
  * The list of possible values if the value of the property is chosen from a set of possible values. Undefined otherwise.
36
37
  * @default undefined
37
38
  */
38
- options?: DataSource<unknown, string>;
39
+ options?: Option<unknown>[];
39
40
  /**
40
- * The list of properties that are part of this property if the type of this property is 'object'.
41
+ * The list of properties that are part of this property if the type of this property is `'object'`.
42
+ * @default undefined
41
43
  */
42
44
  properties?: Property[];
43
- constructor(name: string, type: Type, defaultValue: unknown, basic: boolean, editable: boolean, rootAttribute: string[] | string | null);
45
+ constructor(name: string, type: Type, defaultValue: unknown, basic: boolean, editable: boolean, rootAttribute?: string[] | string);
46
+ }
47
+ /**
48
+ * Each of the possible values that a property of type option can have.
49
+ * @see Property
50
+ * @see Type.Option
51
+ */
52
+ export interface Option<T> {
53
+ key: T;
54
+ label: string;
44
55
  }
45
56
  /**
46
- * The type that a property can hvae..
57
+ * The type that a property can have.
47
58
  * @see Property
48
59
  * @private
49
60
  */
@@ -60,6 +71,10 @@ export declare enum Type {
60
71
  * A type whose value must be a date.
61
72
  */
62
73
  Date = "date",
74
+ /**
75
+ * A type whose value must be a date with a time.
76
+ */
77
+ Datetime = "datetime",
63
78
  /**
64
79
  * A type whose value must be a number.
65
80
  */
@@ -74,6 +89,7 @@ export declare enum Type {
74
89
  Option = "option",
75
90
  /**
76
91
  * A type whose value must be a list of values picked from a set of options.
92
+ * @see Type.Option
77
93
  */
78
94
  OptionList = "option-list",
79
95
  /**
@@ -128,35 +144,143 @@ export declare class ValueSet {
128
144
  propertySet: PropertySet;
129
145
  displayedProperties: Property[];
130
146
  hiddenProperties: Property[];
131
- values: {
132
- [key: string]: unknown;
133
- };
134
- valueSets: {
135
- [key: string]: ValueSet;
136
- };
147
+ private values;
148
+ private valueSets;
137
149
  constructor(propertySet: PropertySet, rootElement: unknown);
150
+ /**
151
+ * Get the value of the root element attribute under the given keys.
152
+ * If given an array of keys, the value is found under repeated lookups to enable obtaining nested values.
153
+ * @private
154
+ * @param rootAttribute A key or array of keys to look up in the root element.
155
+ * @returns The value if it could be found, `undefined` if nothing could be found.
156
+ */
138
157
  getRootElementValue(rootAttribute: string[] | string | null): unknown;
158
+ /**
159
+ * Set the value of the root element's attribute under the given keys.
160
+ * If given an array of keys, the value is found under repeated lookups to enable setting nested values.
161
+ * If the root element has a function `updateInView()`, it is called upon successful setting of the value.
162
+ * If the root element's attribute doesn't exist, it does nothing.
163
+ * @private
164
+ * @param rootAttribute A key or array of keys to look up in the root element.
165
+ * @param value The value to set the root element's attribute to.
166
+ */
139
167
  setRootElementValue(rootAttribute: string[] | string | null, value: unknown): void;
168
+ /**
169
+ * Obtain the value under the given key.
170
+ * @private
171
+ * @param key A key.
172
+ * @returns The value under the given key.
173
+ */
140
174
  getValue(key: string): any;
175
+ /**
176
+ * Obtain all the values in the set.
177
+ * @private
178
+ * @returns An object containing all the values in the set.
179
+ */
141
180
  getValues(): {
142
181
  [key: string]: unknown;
143
182
  };
183
+ /**
184
+ * Check if the value under the key is not empty.
185
+ * @private
186
+ * @param key A key.
187
+ * @returns `true` if the value under the key is empty, `false` otherwise.
188
+ */
144
189
  hasValue(key: string): boolean;
190
+ /**
191
+ * Check if the value under the key is not empty or the default value.
192
+ * @private
193
+ * @param key A key.
194
+ * @returns `true` if the value under the key is empty or the default value, `false` otherwise.
195
+ */
145
196
  hasSetValue(key: string): boolean;
197
+ /**
198
+ * Check if any of the values in the set are not empty or the default value.
199
+ * @private
200
+ * @returns `true` if any of the values in the set are not empty or the default value, `false` otherwise.
201
+ */
146
202
  hasAnySetValue(): boolean;
147
- hasAnySetValueExcept(keys: string[]): boolean;
203
+ /**
204
+ * Set the value under the given key.
205
+ * @private
206
+ * @param key A key.
207
+ * @param value A value.
208
+ */
148
209
  setValue(key: string, value: unknown): void;
210
+ /**
211
+ * Reset all values and then set them to the given values.
212
+ * @private
213
+ * @param values An object containing all values to set the values to.
214
+ */
149
215
  setValues(values: {
150
216
  [key: string]: unknown;
151
217
  }): void;
152
- hasValues(): boolean;
218
+ /**
219
+ * Writes the given values over the value set's existing values without resetting the existing values.
220
+ * @private
221
+ * @param values An object containing all values to set the values to.
222
+ */
223
+ overwriteValues(values: {
224
+ [key: string]: unknown;
225
+ }): void;
226
+ /**
227
+ * Set all the values of this set to the defaults.
228
+ * If this set has a root element and any of its properties have root attributes, the root element's attributes are also set to the property's default value if one is provided.
229
+ * @private
230
+ */
153
231
  resetValues(): void;
154
- displayProperty(property: Property): void;
155
- hideProperty(property: Property): void;
156
232
  /**
157
233
  * Constructs a ValueSet with its corresponding PropertySet representing the values of the object.
234
+ * @private
235
+ * @param key Key that the ValueSet is under.
236
+ * @returns The constructed ValueSet.
237
+ */
238
+ private constructSubValueSet;
239
+ /**
240
+ * Get the ValueSet under the given key when there are nested ValueSets.
241
+ * @private
242
+ * @param key A key.
243
+ * @returns A ValueSet.
158
244
  */
159
- constructSubValueSet(key: string): ValueSet;
160
245
  getSubValueSet(key: string): ValueSet;
246
+ /**
247
+ * Move the given property to the list of displayed properties.
248
+ * @private
249
+ * @param property A property.
250
+ */
251
+ displayProperty(property: Property): void;
252
+ /**
253
+ * Move the given property to the list of hidden properties.
254
+ * @private
255
+ * @param property A property.
256
+ */
257
+ hideProperty(property: Property): void;
161
258
  }
259
+ /**
260
+ * Check if the given value is not empty.
261
+ * @param a A value.
262
+ * @returns `true` if the given value is not `undefined`, `null`, `''`, `[]` or `{}`; `false` otherwise.
263
+ */
264
+ export declare const empty: (a: unknown) => boolean;
265
+ /**
266
+ * Check whether the given values are equal.
267
+ * @param a A value.
268
+ * @param b A value.
269
+ * @returns `true` if the given values are equal, `false` otherwise.
270
+ */
162
271
  export declare const equals: (a: unknown, b: unknown) => boolean;
272
+ /**
273
+ * Calculate the differences between the given values and return two objects, each containing the keys for which the values are different in each argument, containing the different values.
274
+ * @param a A dictionary.
275
+ * @param b A dictionary.
276
+ * @returns A tuple of two values with each containing the keys that have a different value in the corresponding argument compared to the other argument.
277
+ */
278
+ export declare const diff: (a: {
279
+ [key: string]: unknown;
280
+ }, b: {
281
+ [key: string]: unknown;
282
+ }) => [{
283
+ [key: string]: unknown;
284
+ }, {
285
+ [key: string]: unknown;
286
+ }];
@@ -106,18 +106,55 @@ export declare class DiagramSection extends DiagramElement {
106
106
  getMinWidth(): number;
107
107
  getMinHeight(): number;
108
108
  getPriority(): number;
109
+ /**
110
+ * Get the port of this section which is closest to the given coordinates.
111
+ * @param coords A point in the diagram.
112
+ * @returns The port of this section closest to the given coordinates, `undefined` if this section has no ports.
113
+ */
109
114
  getClosestPortToPoint(coords: Point): DiagramPort | undefined;
115
+ /**
116
+ * Get all incoming connections of all ports of this section.
117
+ * @public
118
+ * @returns A list of connections.
119
+ */
110
120
  getIncomingConnections(): DiagramConnection[];
121
+ /**
122
+ * Get all outgoing connections of all ports of this section.
123
+ * @public
124
+ * @returns A list of connections.
125
+ */
111
126
  getOutgoingConnections(): DiagramConnection[];
127
+ /**
128
+ * Get all connections of all ports of this section.
129
+ * @public
130
+ * @returns A list of connections.
131
+ */
112
132
  getConnections(): DiagramConnection[];
133
+ /**
134
+ * Change the coordinates of this section to the given coordinates and move its ports and labels correspondingly.
135
+ * @public
136
+ * @param coords A point in the diagram.
137
+ */
113
138
  move(coords: Point): void;
139
+ /**
140
+ * Change the dimensions of this section in the given direction by the given amount.
141
+ * @public
142
+ * @param direction A direction.
143
+ * @param distance A distance.
144
+ */
114
145
  stretch(direction: Side, distance: number): void;
115
146
  }
116
147
  export declare class DiagramSectionSet extends DiagramEntitySet<DiagramSection> {
117
148
  private model;
149
+ /**
150
+ * Instance a set of sections for the given model. This method is used internally.
151
+ * @private
152
+ */
118
153
  constructor(model: DiagramModel);
119
- new(node: DiagramNode, indexXInNode: number, indexYInNode: number, coords: Point, width: number, height: number, id?: string | undefined, portIds?: (string | undefined)[], portLabelIds?: (string | undefined)[]): DiagramSection;
154
+ /**
155
+ * Instance a new section and add it to this set. This method is normally called when instancing an element with a section and it is rarely called by itself.
156
+ * @private
157
+ */
158
+ new(node: DiagramNode, indexXInNode: number, indexYInNode: number, coords: Point, width: number, height: number, id?: string | undefined): DiagramSection;
120
159
  remove(id: string): void;
121
- filter(threshold?: number): DiagramSection[];
122
- find(threshold?: number): DiagramSection | undefined;
123
160
  }
@@ -8,7 +8,9 @@ import { DiagramValidator } from '../errors/diagram-validator';
8
8
  import { Point } from '../util/canvas-util';
9
9
  import { DiagramEditor } from './diagram-editor';
10
10
  import { ValueSet } from '../diagram-editor/diagram/diagram-property';
11
+ import { CollabEngine } from '../diagram-editor/diagram/collab/collab-engine';
11
12
  /**
13
+ * Represents a specific replica or view of the model.
12
14
  * Provides the functionality for the visual representation of the elements of a model.
13
15
  * @public
14
16
  */
@@ -68,6 +70,11 @@ export interface Canvas {
68
70
  * @private
69
71
  */
70
72
  actionQueue: ActionQueue;
73
+ /**
74
+ * Engine that implements collaborative actions.
75
+ * @private
76
+ */
77
+ collabEngine: CollabEngine;
71
78
  /**
72
79
  * Subject for tracking when the canvas' view is initialized.
73
80
  * @public
@@ -0,0 +1,39 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
2
+ import { Option } from '../../diagram-editor/diagram/diagram-property';
3
+ import * as i0 from "@angular/core";
4
+ export declare const LOST_FOCUS_TIME_WINDOW_MS = 200;
5
+ /**
6
+ * Combobox with autocomplete.
7
+ * @see PropertyEditor
8
+ * @see ValueSet
9
+ * @private
10
+ */
11
+ export declare class AutocompleteComponent {
12
+ private cdr;
13
+ mainElement: ElementRef;
14
+ private _value;
15
+ set value(value: unknown);
16
+ get value(): unknown;
17
+ valueInput: string;
18
+ focusIndex?: number;
19
+ options: Option<unknown>[];
20
+ currentOptions: Option<unknown>[];
21
+ currentLabelStarts: string[];
22
+ currentLabelMatches: string[];
23
+ currentLabelEnds: string[];
24
+ disabled: boolean;
25
+ showOptions: boolean;
26
+ valueChange: EventEmitter<unknown>;
27
+ constructor(cdr: ChangeDetectorRef);
28
+ getLabelOfValue(value: unknown): string;
29
+ onKeyup(event: KeyboardEvent): void;
30
+ openOptions(): void;
31
+ closeOptions(): void;
32
+ focusOnOption(index: number | undefined): void;
33
+ onLostFocus(): void;
34
+ scrollToOption(index: number): void;
35
+ clearInput(): void;
36
+ complete(option: Option<unknown>): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "daga-autocomplete", never, { "value": { "alias": "value"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
39
+ }
@@ -1,8 +1,7 @@
1
1
  import { ChangeDetectorRef } from '@angular/core';
2
- import { RadioItem } from '@metadev/lux';
3
- import { Property, Type, ValueSet } from '../diagram-editor/diagram/diagram-property';
4
- import { Canvas } from '../interfaces/canvas';
5
- import { CanvasProviderService } from '../services/canvas-provider.service';
2
+ import { Property, Type, ValueSet } from '../../diagram-editor/diagram/diagram-property';
3
+ import { Canvas } from '../../interfaces/canvas';
4
+ import { CanvasProviderService } from '../../services/canvas-provider.service';
6
5
  import * as i0 from "@angular/core";
7
6
  /**
8
7
  * Editor of a value set within a property editor.
@@ -21,12 +20,12 @@ export declare class ObjectEditorComponent {
21
20
  /** How many object-editors are parents of this object-editor. @private */
22
21
  depth: number;
23
22
  Type: typeof Type;
24
- booleanRadioItems: RadioItem[];
25
23
  constructor(cdr: ChangeDetectorRef, canvasProvider: CanvasProviderService);
26
24
  displayProperty(property: Property | Event | string | undefined): void;
27
25
  hideProperty(property: Property | Event | string | undefined): void;
28
26
  setValue(property: Property, value: unknown): void;
29
- convertDate(date: string | number | Date): string;
27
+ dateToLocalDatetimeString(date: string | number | Date | null | undefined): string;
28
+ localDatetimeStringToDate(string: string): Date;
30
29
  static ɵfac: i0.ɵɵFactoryDeclaration<ObjectEditorComponent, never>;
31
30
  static ɵcmp: i0.ɵɵComponentDeclaration<ObjectEditorComponent, "daga-object-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
32
31
  }
@@ -0,0 +1,29 @@
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
+ import { Option } from '../../diagram-editor/diagram/diagram-property';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Editor of a property of text list type within a property editor.
6
+ * @see Type.TextList
7
+ * @see PropertyEditor
8
+ * @see ValueSet
9
+ * @private
10
+ */
11
+ export declare class OptionListEditorComponent {
12
+ private cdr;
13
+ private _value;
14
+ set value(value: unknown[]);
15
+ get value(): unknown[];
16
+ labelsOfValue: string[];
17
+ options: Option<unknown>[];
18
+ valueInput?: unknown;
19
+ disabled: boolean;
20
+ valueChange: EventEmitter<unknown[]>;
21
+ constructor(cdr: ChangeDetectorRef);
22
+ getLabelOfValue(value: unknown): string;
23
+ removeFromValue(index: number): void;
24
+ addToValue(): void;
25
+ clearInput(): void;
26
+ onKeyUp(event: KeyboardEvent): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionListEditorComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionListEditorComponent, "daga-option-list-editor", never, { "value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
29
+ }
@@ -2,7 +2,7 @@ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Editor of a property of text list type within a property editor.
5
- * @see TextList
5
+ * @see Type.TextList
6
6
  * @see PropertyEditor
7
7
  * @see ValueSet
8
8
  * @private
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  export declare class TextListEditorComponent {
11
11
  private cdr;
12
12
  private _value;
13
- set value(val: string[]);
13
+ set value(value: string[]);
14
14
  get value(): string[];
15
15
  valueInput: string;
16
16
  disabled: boolean;
@@ -2,7 +2,7 @@ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Editor of a property of text map type within a property editor.
5
- * @see TextMap
5
+ * @see Type.TextMap
6
6
  * @see PropertyEditor
7
7
  * @see ValueSet
8
8
  * @private
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  export declare class TextMapEditorComponent {
11
11
  private cdr;
12
12
  private _value;
13
- set value(val: {
13
+ set value(value: {
14
14
  [name: string]: string;
15
15
  });
16
16
  get value(): {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@metadev/daga",
3
3
  "description": "Diagramming engine for editing models on the Web. Made by Metadev.",
4
- "version": "1.4.1",
4
+ "version": "1.4.2",
5
5
  "author": "Metadev (https://metadev.pro)",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
7
7
  "repository": "git+https://github.com/metadevpro/daga-tutorial.git",
@@ -21,9 +21,9 @@
21
21
  "@angular/common": "^17.0.0",
22
22
  "@angular/core": "^17.0.0",
23
23
  "@angular/forms": "^17.0.0",
24
- "@metadev/lux": "^0.28.0",
25
24
  "d3": "^7.8.5",
26
- "rxjs": "~7.8.1"
25
+ "rxjs": "~7.8.1",
26
+ "uuid": "^9.0.0"
27
27
  },
28
28
  "sideEffects": false,
29
29
  "files": [