@metadev/daga-angular 4.0.4 → 4.2.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/index.d.ts CHANGED
@@ -1,13 +1,400 @@
1
- export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ButtonsComponentConfig, Canvas, CanvasConfig, ClosedShape, CollabAction, CollabActionSerialized, CollabClient, CollabTimestamp, CollabTimestampSet, ComponentsConfig, ConnectionLook, ConnectionLookConfig, ConnectionTemplateConfig, ConnectionTypeConfig, Corner, DagaExporter, DagaImporter, DagaModel, DiagramAction, DiagramActionMethod, DiagramActions, DiagramButtons, DiagramCanvas, DiagramConfig, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramEditor, DiagramElement, DiagramElementSet, DiagramEntity, DiagramEntitySet, DiagramError, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramHighlightedEvent, DiagramLayout, DiagramModel, DiagramModelExporter, DiagramModelImporter, DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramPortType, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionGeometry, DiagramSectionSet, DiagramSelectionEvent, DiagramValidator, EditFieldAction, ErrorsComponentConfig, FieldConfig, ForceLayout, getLocationsOfNodes, GridConfig, GridStyle, HorizontalAlign, HorizontalLayout, ImageLook, ImageLookConfig, layouts, Line, LineShape, LineStyle, Look, LookConfig, MarkerImageLook, MarkerImageLookConfig, MoveAction, NodeTemplateConfig, NodeTypeConfig, Palette, PaletteComponentConfig, PaletteSectionConfig, PasteAction, Point, PortConfig, PortTypeConfig, PriorityLayout, Property, PropertyEditor, PropertyEditorComponentConfig, PropertySet, Rectangle, RemoveAction, SectionConfig, SectionGridConfig, SetGeometryAction, SetParentAction, ShapedLook, ShapedLookConfig, Side, StretchableImageLook, StretchableImageLookConfig, TreeLayout, Type, UpdateValuesAction, UserActionConfig, ValueSet, VerticalAlign, VerticalLayout } from '@metadev/daga';
2
- export { CollapseButtonComponent } from './lib/collapse-button/collapse-button.component';
3
- export { DagaModule } from './lib/daga.module';
4
- export { DiagramButtonsComponent } from './lib/diagram-buttons/diagram-buttons.component';
5
- export { DiagramComponent } from './lib/diagram/diagram.component';
6
- export { ErrorsComponent } from './lib/errors/errors.component';
7
- export { PaletteComponent } from './lib/palette/palette.component';
8
- export { ObjectEditorComponent } from './lib/property-editor/object-editor/object-editor.component';
9
- export { PropertyEditorComponent } from './lib/property-editor/property-editor.component';
10
- export { TextListEditorComponent } from './lib/property-editor/text-list-editor/text-list-editor.component';
11
- export { TextMapEditorComponent } from './lib/property-editor/text-map-editor/text-map-editor.component';
12
- export { CanvasProviderService } from './lib/services/canvas-provider.service';
13
- export { DagaConfigurationService } from './lib/services/daga-configuration.service';
1
+ import { Side, DiagramButtons, Canvas, Corner, DiagramActions, DiagramConfig, Palette, PaletteSectionConfig, PropertyEditor, ValueSet, DiagramEditor, DagaModel, DiagramEvent, DiagramError, Type, Property } from '@metadev/daga';
2
+ export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ButtonsComponentConfig, Canvas, CanvasConfig, ClosedShape, CollabAction, CollabActionSerialized, CollabClient, CollabTimestamp, CollabTimestampSet, ComponentsConfig, ConnectionLook, ConnectionLookConfig, ConnectionTemplateConfig, ConnectionTypeConfig, Corner, DagaExporter, DagaImporter, DagaModel, DiagramAction, DiagramActionMethod, DiagramActions, DiagramButtons, DiagramCanvas, DiagramConfig, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramEditor, DiagramElement, DiagramElementSet, DiagramEntity, DiagramEntitySet, DiagramError, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramHighlightedEvent, DiagramLayout, DiagramModel, DiagramModelExporter, DiagramModelImporter, DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramPortType, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionGeometry, DiagramSectionSet, DiagramSelectionEvent, DiagramValidator, EditFieldAction, ErrorsComponentConfig, FieldConfig, ForceLayout, GridConfig, GridStyle, HorizontalAlign, HorizontalLayout, ImageLook, ImageLookConfig, Line, LineShape, LineStyle, Look, LookConfig, MarkerImageLook, MarkerImageLookConfig, MoveAction, NodeTemplateConfig, NodeTypeConfig, Palette, PaletteComponentConfig, PaletteSectionConfig, PasteAction, Point, PortConfig, PortTypeConfig, PriorityLayout, Property, PropertyEditor, PropertyEditorComponentConfig, PropertySet, Rectangle, RemoveAction, SectionConfig, SectionGridConfig, SetGeometryAction, SetParentAction, ShapedLook, ShapedLookConfig, Side, StretchableImageLook, StretchableImageLookConfig, TreeLayout, Type, UpdateValuesAction, UserActionConfig, ValueSet, VerticalAlign, VerticalLayout, getLocationsOfNodes, layouts } from '@metadev/daga';
3
+ import * as i0 from '@angular/core';
4
+ import { ElementRef, OnInit, AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
5
+ import * as rxjs from 'rxjs';
6
+ import { Observable } from 'rxjs';
7
+ import * as d3 from 'd3';
8
+ import * as i10 from '@angular/common';
9
+ import * as i11 from '@angular/forms';
10
+
11
+ /**
12
+ * Button used to collapse components that implement it.
13
+ * @private
14
+ */
15
+ declare class CollapseButtonComponent {
16
+ collapsableSelector: string | ElementRef | HTMLElement;
17
+ collapsableAdditionalSelector: string;
18
+ collapsed: boolean;
19
+ disabled: boolean;
20
+ direction: Side;
21
+ rule: string;
22
+ collapsedValue: string;
23
+ visibleValue: string;
24
+ Side: typeof Side;
25
+ toggleCollapse(): void;
26
+ getClass(): string;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapseButtonComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollapseButtonComponent, "daga-collapse-button", never, { "collapsableSelector": { "alias": "collapsableSelector"; "required": false; }; "collapsableAdditionalSelector": { "alias": "collapsableAdditionalSelector"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "rule": { "alias": "rule"; "required": false; }; "collapsedValue": { "alias": "collapsedValue"; "required": false; }; "visibleValue": { "alias": "visibleValue"; "required": false; }; }, {}, never, never, true, never>;
29
+ }
30
+
31
+ /**
32
+ * Buttons used to trigger diagram functionalities by the user.
33
+ * @private
34
+ */
35
+ declare class DiagramButtonsComponent implements DiagramButtons, OnInit, AfterViewInit, OnDestroy {
36
+ #private;
37
+ get canvas(): Canvas;
38
+ collapsableButtons: ElementRef<HTMLDivElement>;
39
+ location: Corner;
40
+ direction: Side;
41
+ enableAction: boolean;
42
+ enableFilter: boolean;
43
+ enableLayout: boolean;
44
+ enableSelection: boolean;
45
+ enableZoom: boolean;
46
+ filterOn: boolean;
47
+ collapsed: boolean;
48
+ animationOngoing: boolean;
49
+ private sizeAttribute;
50
+ private transformFunction;
51
+ private transformOrigin;
52
+ private marginSide;
53
+ private collapsableButtonsSize;
54
+ private sub?;
55
+ DiagramActions: typeof DiagramActions;
56
+ ngOnInit(): void;
57
+ ngAfterViewInit(): void;
58
+ ngOnDestroy(): void;
59
+ init(config: DiagramConfig): void;
60
+ recalculateSizeOfButtons(): void;
61
+ toggleCollapse(): Promise<void>;
62
+ zoomIn(): void;
63
+ zoomOut(): void;
64
+ center(): void;
65
+ layout(): void;
66
+ filter(): void;
67
+ undo(): void;
68
+ redo(): void;
69
+ copySelection(): void;
70
+ cutSelection(): void;
71
+ pasteSelection(): void;
72
+ deleteSelection(): void;
73
+ startMultipleSelection(): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<DiagramButtonsComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<DiagramButtonsComponent, "daga-diagram-buttons", never, { "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "enableAction": { "alias": "enableAction"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "enableLayout": { "alias": "enableLayout"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; }, {}, never, never, true, never>;
76
+ }
77
+
78
+ /**
79
+ * Palette that the user can drag and drop nodes from.
80
+ * @private
81
+ * @see DiagramConfig
82
+ * @see DiagramNode
83
+ */
84
+ declare class PaletteComponent implements Palette, OnInit, AfterViewInit, OnDestroy {
85
+ #private;
86
+ get canvas(): Canvas;
87
+ panel: ElementRef<HTMLDivElement>;
88
+ palettes: PaletteSectionConfig[];
89
+ currentPalette: PaletteSectionConfig;
90
+ currentCategory: string;
91
+ location: Corner;
92
+ direction: Side;
93
+ width: string;
94
+ gap: string;
95
+ private priorityThreshold?;
96
+ private sub?;
97
+ ngOnInit(): void;
98
+ ngAfterViewInit(): void;
99
+ ngOnDestroy(): void;
100
+ init(config: DiagramConfig): void;
101
+ refreshPalette(): void;
102
+ switchPalette(palette: PaletteSectionConfig): void;
103
+ selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
104
+ selectPalette(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
105
+ private appendCategories;
106
+ private appendTemplate;
107
+ private appendNodeTemplate;
108
+ private appendConnectionTemplate;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaletteComponent, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<PaletteComponent, "daga-palette", never, { "palettes": { "alias": "palettes"; "required": false; }; "currentPalette": { "alias": "currentPalette"; "required": false; }; "currentCategory": { "alias": "currentCategory"; "required": false; }; "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "width": { "alias": "width"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; }, {}, never, never, true, never>;
111
+ }
112
+
113
+ /**
114
+ * Editor of the values of a value set.
115
+ * @private
116
+ * @see ValueSet
117
+ */
118
+ declare class PropertyEditorComponent implements PropertyEditor, OnInit, AfterViewInit, OnDestroy {
119
+ #private;
120
+ panel: ElementRef<HTMLDivElement>;
121
+ location: Corner;
122
+ direction: Side;
123
+ width: string;
124
+ title?: string;
125
+ _valueSet: ValueSet | undefined;
126
+ get valueSet(): ValueSet | undefined;
127
+ set valueSet(valueSet: ValueSet | undefined);
128
+ settings?: boolean;
129
+ private sub?;
130
+ ngOnInit(): void;
131
+ ngAfterViewInit(): void;
132
+ ngOnDestroy(): void;
133
+ init(config: DiagramConfig): void;
134
+ setPanelWidth(): void;
135
+ selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
136
+ highlightProperty(...propertyNames: string[]): void;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<PropertyEditorComponent, never>;
138
+ static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorComponent, "daga-property-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; }, {}, never, never, true, never>;
139
+ }
140
+
141
+ /**
142
+ * The context of a diagram. Every separate diagram must be contained within its own {@link DiagramComponent} and every {@link DiagramComponent} must contain its own {@link DiagramEditorComponent}.
143
+ * This component defines a {@link DagaConfigurationService} and a {@link CanvasProviderService}, which is shared by all the components within and allows accessing the configuration and the canvas of this component's diagram, respectively.
144
+ * @public
145
+ */
146
+ declare class DiagramComponent implements DiagramEditor, OnInit, AfterViewInit, OnDestroy {
147
+ #private;
148
+ appendTo: ElementRef<HTMLDivElement>;
149
+ diagramButtons: DiagramButtonsComponent;
150
+ palette: PaletteComponent;
151
+ propertyEditor: PropertyEditorComponent;
152
+ private importer;
153
+ private exporter;
154
+ private _model;
155
+ /**
156
+ * Getter for the configuration of this diagram.
157
+ * @public
158
+ */
159
+ get config(): DiagramConfig;
160
+ /**
161
+ * Setter for the configuration for the diagram.
162
+ * @public
163
+ */
164
+ set config(config: DiagramConfig);
165
+ /**
166
+ * Subject used to track when the diagram configuration has been updated.
167
+ * @public
168
+ */
169
+ get config$(): Observable<DiagramConfig>;
170
+ /**
171
+ * Getter for the canvas of this diagram.
172
+ * @public
173
+ */
174
+ get canvas(): Canvas;
175
+ /**
176
+ * Subject used to track when the canvas has been updated.
177
+ * @public
178
+ */
179
+ get canvas$(): Observable<Canvas>;
180
+ /**
181
+ * Subject used to track when the view has been initialized after updating the canvas.
182
+ * @public
183
+ */
184
+ get viewInitialized$(): Observable<Canvas>;
185
+ /**
186
+ * Serialized model for the diagram. Used for data binding to the model.
187
+ * @public
188
+ */
189
+ get model(): DagaModel;
190
+ /**
191
+ * Serialized model for the diagram. Used for data binding to the model.
192
+ * @public
193
+ */
194
+ set model(model: DagaModel);
195
+ /**
196
+ * Output for changes to the diagram's model.
197
+ * @public
198
+ */
199
+ modelChange: EventEmitter<DagaModel>;
200
+ /**
201
+ * Output for user events on the diagram.
202
+ * @public
203
+ */
204
+ diagramEvent: EventEmitter<DiagramEvent>;
205
+ private configurationSub?;
206
+ private canvasSub?;
207
+ Corner: typeof Corner;
208
+ Side: typeof Side;
209
+ ngOnInit(): void;
210
+ ngAfterViewInit(): void;
211
+ ngOnDestroy(): void;
212
+ private setUpCanvas;
213
+ static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
214
+ static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "daga-diagram", never, { "config": { "alias": "config"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "modelChange": "modelChange"; "diagramEvent": "diagramEvent"; }, never, ["*"], true, never>;
215
+ }
216
+
217
+ /**
218
+ * Displays the errors detected by a diagram's validators.
219
+ * @private
220
+ * @see DiagramValidator
221
+ */
222
+ declare class ErrorsComponent implements AfterViewInit, OnDestroy {
223
+ #private;
224
+ get canvas(): Canvas;
225
+ errorsContainer: ElementRef<HTMLDivElement>;
226
+ errors: DiagramError[];
227
+ private canvasSub?;
228
+ private validationSub?;
229
+ Side: typeof Side;
230
+ ngAfterViewInit(): void;
231
+ ngOnDestroy(): void;
232
+ selectPanel(): d3.Selection<d3.BaseType, unknown, null, unknown>;
233
+ private updateCanvas;
234
+ validate(): void;
235
+ showError(error: DiagramError): void;
236
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsComponent, never>;
237
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErrorsComponent, "daga-errors", never, {}, {}, never, never, true, never>;
238
+ }
239
+
240
+ /**
241
+ * Editor of a value set within a property editor.
242
+ * @private
243
+ * @see PropertyEditor
244
+ * @see ValueSet
245
+ */
246
+ declare class ObjectEditorComponent {
247
+ #private;
248
+ get canvas(): Canvas;
249
+ get userCanEdit(): boolean;
250
+ _valueSet?: ValueSet;
251
+ get valueSet(): ValueSet | undefined;
252
+ set valueSet(valueSet: ValueSet | undefined);
253
+ /** How many object-editor elements are parents of this object-editor element. @private */
254
+ depth: number;
255
+ Type: typeof Type;
256
+ getStyleClassName: (s: string) => string;
257
+ setValue(property: Property, value: unknown): void;
258
+ dateToLocalDatetimeString(date: string | number | Date | null | undefined): string;
259
+ localDatetimeStringToDate(string: string): Date;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectEditorComponent, never>;
261
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectEditorComponent, "daga-object-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
262
+ }
263
+
264
+ /**
265
+ * Editor of a property of text list type within a property editor.
266
+ * @private
267
+ * @see Type.TextList
268
+ * @see PropertyEditor
269
+ * @see ValueSet
270
+ */
271
+ declare class TextListEditorComponent {
272
+ #private;
273
+ private _value;
274
+ set value(value: string[]);
275
+ get value(): string[];
276
+ valueInput: string;
277
+ allowRepeats: boolean;
278
+ disabled: boolean;
279
+ valueChange: EventEmitter<string[]>;
280
+ getValueFromEvent(event: Event): string;
281
+ hasValue(value: string): boolean;
282
+ removeFromValue(index: number): void;
283
+ editFromValue(item: string, index: number): void;
284
+ addToValue(): void;
285
+ clearInput(): void;
286
+ onKeyUp(event: KeyboardEvent): void;
287
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextListEditorComponent, never>;
288
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextListEditorComponent, "daga-text-list-editor", never, { "value": { "alias": "value"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "allowRepeats": { "alias": "allowRepeats"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
289
+ }
290
+
291
+ /**
292
+ * Editor of a property of text map type within a property editor.
293
+ * @private
294
+ * @see Type.TextMap
295
+ * @see PropertyEditor
296
+ * @see ValueSet
297
+ */
298
+ declare class TextMapEditorComponent {
299
+ #private;
300
+ private _value;
301
+ set value(value: {
302
+ [name: string]: string;
303
+ });
304
+ get value(): {
305
+ [name: string]: string;
306
+ };
307
+ keyInput: string;
308
+ valueInput: string;
309
+ disabled: boolean;
310
+ valueChange: EventEmitter<{
311
+ [name: string]: string;
312
+ }>;
313
+ getValueFromEvent(event: Event): string;
314
+ removeFromValue(key: string): void;
315
+ editKey(oldKey: string, newKey: string): void;
316
+ editValue(key: string, value: string): void;
317
+ addToValue(): void;
318
+ clearKeyInput(): void;
319
+ clearValueInput(): void;
320
+ onKeyUp(event: KeyboardEvent): void;
321
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextMapEditorComponent, never>;
322
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextMapEditorComponent, "daga-text-map-editor", never, { "value": { "alias": "value"; "required": false; }; "keyInput": { "alias": "keyInput"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
323
+ }
324
+
325
+ declare class DagaModule {
326
+ static ɵfac: i0.ɵɵFactoryDeclaration<DagaModule, never>;
327
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DagaModule, never, [typeof CollapseButtonComponent, typeof DiagramButtonsComponent, typeof DiagramComponent, typeof ErrorsComponent, typeof ObjectEditorComponent, typeof PaletteComponent, typeof TextListEditorComponent, typeof TextMapEditorComponent, typeof PropertyEditorComponent, typeof i10.CommonModule, typeof i11.FormsModule], [typeof DiagramComponent]>;
328
+ static ɵinj: i0.ɵɵInjectorDeclaration<DagaModule>;
329
+ }
330
+
331
+ /**
332
+ * A provider for the {@link Canvas} associated with a {@link DiagramComponent} context.
333
+ * @public
334
+ */
335
+ declare class CanvasProviderService {
336
+ private _canvas;
337
+ private canvasSubject$;
338
+ /**
339
+ * Subject used to track when the canvas has been updated.
340
+ * @public
341
+ */
342
+ canvas$: rxjs.Observable<Canvas>;
343
+ private viewInitializedSubject$;
344
+ /**
345
+ * Subject used to track when the view of the canvas has been updated after updating the canvas.
346
+ * @public
347
+ */
348
+ viewInitialized$: rxjs.Observable<Canvas>;
349
+ /**
350
+ * Initialize the diagram canvas object of this context using the given diagram configuration.
351
+ * @private
352
+ * @param parentComponent A diagram editor.
353
+ * @param config A diagram configuration.
354
+ */
355
+ initCanvas(parentComponent: DiagramEditor, config: DiagramConfig): void;
356
+ /**
357
+ * Attach the canvas of this context to an HTML element to render it there.
358
+ * @private
359
+ * @param appendTo An HTML element.
360
+ */
361
+ initCanvasView(appendTo: HTMLElement): void;
362
+ /**
363
+ * Get the current canvas of this context.
364
+ * @public
365
+ * @returns A canvas.
366
+ */
367
+ getCanvas(): Canvas;
368
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanvasProviderService, never>;
369
+ static ɵprov: i0.ɵɵInjectableDeclaration<CanvasProviderService>;
370
+ }
371
+
372
+ /**
373
+ * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
374
+ * @public
375
+ */
376
+ declare class DagaConfigurationService {
377
+ private _config;
378
+ private configSubject$;
379
+ /**
380
+ * Subject used to track when the diagram configuration has been updated.
381
+ * @public
382
+ */
383
+ config$: rxjs.Observable<DiagramConfig>;
384
+ /**
385
+ * Set the diagram configuration of this context.
386
+ * @private
387
+ * @param config A diagram configuration.
388
+ */
389
+ init(config: DiagramConfig): void;
390
+ /**
391
+ * Get the current diagram configuration of this context.
392
+ * @public
393
+ * @returns A diagram configuration.
394
+ */
395
+ getConfig(): DiagramConfig;
396
+ static ɵfac: i0.ɵɵFactoryDeclaration<DagaConfigurationService, never>;
397
+ static ɵprov: i0.ɵɵInjectableDeclaration<DagaConfigurationService>;
398
+ }
399
+
400
+ export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@metadev/daga-angular",
3
3
  "description": "Diagramming engine for editing models on the Web. Made by Metadev.",
4
- "version": "4.0.4",
4
+ "version": "4.2.0",
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",
@@ -18,10 +18,10 @@
18
18
  "angular"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@angular/common": ">= 19.0.5 < 21",
22
- "@angular/core": ">= 19.0.5 < 21",
23
- "@angular/forms": ">= 19.0.5 < 21",
24
- "@metadev/daga": "^4.0.2",
21
+ "@angular/common": ">= 20.1.3 < 22",
22
+ "@angular/core": ">= 20.1.3 < 22",
23
+ "@angular/forms": ">= 20.1.3 < 22",
24
+ "@metadev/daga": "^4.2.0",
25
25
  "d3": "^7.9.0",
26
26
  "rxjs": "~7.8.1"
27
27
  },
@@ -1,22 +0,0 @@
1
- import { ElementRef } from '@angular/core';
2
- import { Side } from '@metadev/daga';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Button used to collapse components that implement it.
6
- * @private
7
- */
8
- export declare class CollapseButtonComponent {
9
- collapsableSelector: string | ElementRef | HTMLElement;
10
- collapsableAdditionalSelector: string;
11
- collapsed: boolean;
12
- disabled: boolean;
13
- direction: Side;
14
- rule: string;
15
- collapsedValue: string;
16
- visibleValue: string;
17
- Side: typeof Side;
18
- toggleCollapse(): void;
19
- getClass(): string;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapseButtonComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<CollapseButtonComponent, "daga-collapse-button", never, { "collapsableSelector": { "alias": "collapsableSelector"; "required": false; }; "collapsableAdditionalSelector": { "alias": "collapsableAdditionalSelector"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "rule": { "alias": "rule"; "required": false; }; "collapsedValue": { "alias": "collapsedValue"; "required": false; }; "visibleValue": { "alias": "visibleValue"; "required": false; }; }, {}, never, never, true, never>;
22
- }
@@ -1,17 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./collapse-button/collapse-button.component";
3
- import * as i2 from "./diagram-buttons/diagram-buttons.component";
4
- import * as i3 from "./diagram/diagram.component";
5
- import * as i4 from "./errors/errors.component";
6
- import * as i5 from "./property-editor/object-editor/object-editor.component";
7
- import * as i6 from "./palette/palette.component";
8
- import * as i7 from "./property-editor/text-list-editor/text-list-editor.component";
9
- import * as i8 from "./property-editor/text-map-editor/text-map-editor.component";
10
- import * as i9 from "./property-editor/property-editor.component";
11
- import * as i10 from "@angular/common";
12
- import * as i11 from "@angular/forms";
13
- export declare class DagaModule {
14
- static ɵfac: i0.ɵɵFactoryDeclaration<DagaModule, never>;
15
- static ɵmod: i0.ɵɵNgModuleDeclaration<DagaModule, never, [typeof i1.CollapseButtonComponent, typeof i2.DiagramButtonsComponent, typeof i3.DiagramComponent, typeof i4.ErrorsComponent, typeof i5.ObjectEditorComponent, typeof i6.PaletteComponent, typeof i7.TextListEditorComponent, typeof i8.TextMapEditorComponent, typeof i9.PropertyEditorComponent, typeof i10.CommonModule, typeof i11.FormsModule], [typeof i3.DiagramComponent]>;
16
- static ɵinj: i0.ɵɵInjectorDeclaration<DagaModule>;
17
- }
@@ -1,87 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { Canvas, Corner, DagaModel, DiagramConfig, DiagramEditor, DiagramEvent, Side } from '@metadev/daga';
3
- import { Observable } from 'rxjs';
4
- import { DiagramButtonsComponent } from '../diagram-buttons/diagram-buttons.component';
5
- import { PaletteComponent } from '../palette/palette.component';
6
- import { PropertyEditorComponent } from '../property-editor/property-editor.component';
7
- import { CanvasProviderService } from '../services/canvas-provider.service';
8
- import { DagaConfigurationService } from '../services/daga-configuration.service';
9
- import * as i0 from "@angular/core";
10
- /**
11
- * The context of a diagram. Every separate diagram must be contained within its own {@link DiagramComponent} and every {@link DiagramComponent} must contain its own {@link DiagramEditorComponent}.
12
- * This component defines a {@link DagaConfigurationService} and a {@link CanvasProviderService}, which is shared by all the components within and allows accessing the configuration and the canvas of this component's diagram, respectively.
13
- * @public
14
- */
15
- export declare class DiagramComponent implements DiagramEditor, OnInit, AfterViewInit, OnDestroy {
16
- private configurationService;
17
- private canvasProvider;
18
- private cdr;
19
- appendTo: ElementRef<HTMLDivElement>;
20
- diagramButtons: DiagramButtonsComponent;
21
- palette: PaletteComponent;
22
- propertyEditor: PropertyEditorComponent;
23
- private importer;
24
- private exporter;
25
- private _model;
26
- /**
27
- * Getter for the configuration of this diagram.
28
- * @public
29
- */
30
- get config(): DiagramConfig;
31
- /**
32
- * Setter for the configuration for the diagram.
33
- * @public
34
- */
35
- set config(config: DiagramConfig);
36
- /**
37
- * Subject used to track when the diagram configuration has been updated.
38
- * @public
39
- */
40
- get config$(): Observable<DiagramConfig>;
41
- /**
42
- * Getter for the canvas of this diagram.
43
- * @public
44
- */
45
- get canvas(): Canvas;
46
- /**
47
- * Subject used to track when the canvas has been updated.
48
- * @public
49
- */
50
- get canvas$(): Observable<Canvas>;
51
- /**
52
- * Subject used to track when the view has been initialized after updating the canvas.
53
- * @public
54
- */
55
- get viewInitialized$(): Observable<Canvas>;
56
- /**
57
- * Serialized model for the diagram. Used for data binding to the model.
58
- * @public
59
- */
60
- get model(): DagaModel;
61
- /**
62
- * Serialized model for the diagram. Used for data binding to the model.
63
- * @public
64
- */
65
- set model(model: DagaModel);
66
- /**
67
- * Output for changes to the diagram's model.
68
- * @public
69
- */
70
- modelChange: EventEmitter<DagaModel>;
71
- /**
72
- * Output for user events on the diagram.
73
- * @public
74
- */
75
- diagramEvent: EventEmitter<DiagramEvent>;
76
- private configurationSub?;
77
- private canvasSub?;
78
- Corner: typeof Corner;
79
- Side: typeof Side;
80
- constructor(configurationService: DagaConfigurationService, canvasProvider: CanvasProviderService, cdr: ChangeDetectorRef);
81
- ngOnInit(): void;
82
- ngAfterViewInit(): void;
83
- ngOnDestroy(): void;
84
- private setUpCanvas;
85
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
86
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "daga-diagram", never, { "config": { "alias": "config"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "modelChange": "modelChange"; "diagramEvent": "diagramEvent"; }, never, ["*"], true, never>;
87
- }
@@ -1,53 +0,0 @@
1
- import { AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
- import { Canvas, Corner, DiagramActions, DiagramButtons, DiagramConfig, Side } from '@metadev/daga';
3
- import { CanvasProviderService } from '../services/canvas-provider.service';
4
- import { DagaConfigurationService } from '../services/daga-configuration.service';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Buttons used to trigger diagram functionalities by the user.
8
- * @private
9
- */
10
- export declare class DiagramButtonsComponent implements DiagramButtons, OnInit, AfterViewInit, OnDestroy {
11
- private canvasProvider;
12
- private configService;
13
- get canvas(): Canvas;
14
- collapsableButtons: ElementRef<HTMLDivElement>;
15
- location: Corner;
16
- direction: Side;
17
- enableAction: boolean;
18
- enableFilter: boolean;
19
- enableLayout: boolean;
20
- enableSelection: boolean;
21
- enableZoom: boolean;
22
- filterOn: boolean;
23
- collapsed: boolean;
24
- animationOngoing: boolean;
25
- private sizeAttribute;
26
- private transformFunction;
27
- private transformOrigin;
28
- private marginSide;
29
- private collapsableButtonsSize;
30
- private sub?;
31
- DiagramActions: typeof DiagramActions;
32
- constructor(canvasProvider: CanvasProviderService, configService: DagaConfigurationService);
33
- ngOnInit(): void;
34
- ngAfterViewInit(): void;
35
- ngOnDestroy(): void;
36
- init(config: DiagramConfig): void;
37
- recalculateSizeOfButtons(): void;
38
- toggleCollapse(): Promise<void>;
39
- zoomIn(): void;
40
- zoomOut(): void;
41
- center(): void;
42
- layout(): void;
43
- filter(): void;
44
- undo(): void;
45
- redo(): void;
46
- copySelection(): void;
47
- cutSelection(): void;
48
- pasteSelection(): void;
49
- deleteSelection(): void;
50
- startMultipleSelection(): void;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramButtonsComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramButtonsComponent, "daga-diagram-buttons", never, { "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "enableAction": { "alias": "enableAction"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "enableLayout": { "alias": "enableLayout"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; }, {}, never, never, true, never>;
53
- }
@@ -1,29 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core';
2
- import { Canvas, DiagramError, Side } from '@metadev/daga';
3
- import * as d3 from 'd3';
4
- import { CanvasProviderService } from '../services/canvas-provider.service';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Displays the errors detected by a diagram's validators.
8
- * @private
9
- * @see DiagramValidator
10
- */
11
- export declare class ErrorsComponent implements AfterViewInit, OnDestroy {
12
- private canvasProvider;
13
- private cdf;
14
- get canvas(): Canvas;
15
- errorsContainer: ElementRef<HTMLDivElement>;
16
- errors: DiagramError[];
17
- private canvasSub?;
18
- private validationSub?;
19
- Side: typeof Side;
20
- constructor(canvasProvider: CanvasProviderService, cdf: ChangeDetectorRef);
21
- ngAfterViewInit(): void;
22
- ngOnDestroy(): void;
23
- selectPanel(): d3.Selection<d3.BaseType, unknown, null, unknown>;
24
- private updateCanvas;
25
- validate(): void;
26
- showError(error: DiagramError): void;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorsComponent, "daga-errors", never, {}, {}, never, never, true, never>;
29
- }