@metadev/daga-angular 3.0.0 → 3.1.1
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 +20 -1
- package/README.md +11 -1
- package/fesm2022/metadev-daga-angular.mjs +367 -241
- package/fesm2022/metadev-daga-angular.mjs.map +1 -1
- package/index.d.ts +1 -2
- package/lib/daga.module.d.ts +9 -10
- package/lib/diagram/diagram.component.d.ts +40 -11
- package/lib/diagram-buttons/diagram-buttons.component.d.ts +11 -4
- package/lib/errors/errors.component.d.ts +8 -3
- package/lib/palette/palette.component.d.ts +10 -5
- package/lib/property-editor/property-editor.component.d.ts +12 -7
- package/lib/services/canvas-provider.service.d.ts +17 -5
- package/lib/services/daga-configuration.service.d.ts +8 -1
- package/package.json +2 -2
- package/lib/diagram-editor/diagram-editor.component.d.ts +0 -34
package/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, BreadthAdjacencyLayout, BreadthLayout, ButtonsComponentConfig, Canvas, ClosedShape, CollabAction, CollabActionSerialized, CollabClient, CollabTimestamp, CollabTimestampSet, ComponentsConfig, ConnectionMarkerLook, ConnectionTemplateConfig, ConnectionTypeConfig, Corner, DagaExporter, DagaImporter, DagaModel, DiagramAction, DiagramActions, DiagramButtons, DiagramCanvas, DiagramConfig, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramEditor, DiagramElement, DiagramElementSet, DiagramEntity, DiagramEntitySet, DiagramError, DiagramEvent, DiagramField, DiagramFieldSet, DiagramLayout, DiagramModel, DiagramModelExporter, DiagramModelImporter, DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramSection, DiagramSectionGeometry, DiagramSectionSet, DiagramValidator, EditFieldAction, ErrorsComponentConfig, FieldConfig, ForceLayout, HorizontalAlign, HorizontalLayout, Line, LineShape, LineStyle, NodeImageLook, NodeShapedLook, NodeStretchableImageLook, NodeTemplateConfig, NodeTypeConfig, Palette, PaletteComponentConfig, PaletteSectionConfig, Point, PortConfig, PriorityLayout, Property, PropertyEditor, PropertyEditorComponentConfig, PropertySet, Rectangle, RemoveAction, SectionConfig, SectionGridConfig, SetGeometryAction, Side, TreeLayout, Type, UpdateValuesAction, UserActionConfig, ValueSet, VerticalAlign, VerticalLayout
|
|
1
|
+
export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ButtonsComponentConfig, Canvas, ClosedShape, CollabAction, CollabActionSerialized, CollabClient, CollabTimestamp, CollabTimestampSet, ComponentsConfig, ConnectionMarkerLook, 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, DiagramLayout, DiagramModel, DiagramModelExporter, DiagramModelImporter, DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionGeometry, DiagramSectionSet, DiagramValidator, EditFieldAction, ErrorsComponentConfig, FieldConfig, ForceLayout, getLocationsOfNodes, HorizontalAlign, HorizontalLayout, layouts, Line, LineShape, LineStyle, MoveAction, NodeImageLook, NodeShapedLook, NodeStretchableImageLook, NodeTemplateConfig, NodeTypeConfig, Palette, PaletteComponentConfig, PaletteSectionConfig, PasteAction, Point, PortConfig, PriorityLayout, Property, PropertyEditor, PropertyEditorComponentConfig, PropertySet, Rectangle, RemoveAction, SectionConfig, SectionGridConfig, SetGeometryAction, SetParentAction, Side, TreeLayout, Type, UpdateValuesAction, UserActionConfig, ValueSet, VerticalAlign, VerticalLayout } from '@metadev/daga';
|
|
2
2
|
export { CollapseButtonComponent } from './lib/collapse-button/collapse-button.component';
|
|
3
3
|
export { DagaModule } from './lib/daga.module';
|
|
4
4
|
export { DiagramButtonsComponent } from './lib/diagram-buttons/diagram-buttons.component';
|
|
5
|
-
export { DiagramEditorComponent } from './lib/diagram-editor/diagram-editor.component';
|
|
6
5
|
export { DiagramComponent } from './lib/diagram/diagram.component';
|
|
7
6
|
export { ErrorsComponent } from './lib/errors/errors.component';
|
|
8
7
|
export { PaletteComponent } from './lib/palette/palette.component';
|
package/lib/daga.module.d.ts
CHANGED
|
@@ -2,17 +2,16 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./collapse-button/collapse-button.component";
|
|
3
3
|
import * as i2 from "./diagram-buttons/diagram-buttons.component";
|
|
4
4
|
import * as i3 from "./diagram/diagram.component";
|
|
5
|
-
import * as i4 from "./
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "./
|
|
8
|
-
import * as i7 from "./
|
|
9
|
-
import * as i8 from "./property-editor/text-
|
|
10
|
-
import * as i9 from "./property-editor/
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@angular/
|
|
13
|
-
import * as i12 from "@angular/forms";
|
|
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";
|
|
14
13
|
export declare class DagaModule {
|
|
15
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DagaModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DagaModule, never, [typeof i1.CollapseButtonComponent, typeof i2.DiagramButtonsComponent, typeof i3.DiagramComponent, typeof i4.
|
|
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]>;
|
|
17
16
|
static ɵinj: i0.ɵɵInjectorDeclaration<DagaModule>;
|
|
18
17
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DagaModel, DiagramConfig } from '@metadev/daga';
|
|
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 { DiagramButtonsComponent } from '../diagram-buttons/diagram-buttons.component';
|
|
4
|
+
import { PaletteComponent } from '../palette/palette.component';
|
|
5
|
+
import { PropertyEditorComponent } from '../property-editor/property-editor.component';
|
|
3
6
|
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
4
7
|
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
5
8
|
import * as i0 from "@angular/core";
|
|
@@ -8,17 +11,33 @@ import * as i0 from "@angular/core";
|
|
|
8
11
|
* 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.
|
|
9
12
|
* @public
|
|
10
13
|
*/
|
|
11
|
-
export declare class DiagramComponent implements
|
|
14
|
+
export declare class DiagramComponent implements DiagramEditor, OnInit, AfterViewInit, OnDestroy {
|
|
12
15
|
private configurationService;
|
|
13
16
|
private canvasProvider;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
private cdr;
|
|
18
|
+
appendTo: ElementRef<HTMLDivElement>;
|
|
19
|
+
diagramButtons: DiagramButtonsComponent;
|
|
20
|
+
palette: PaletteComponent;
|
|
21
|
+
propertyEditor: PropertyEditorComponent;
|
|
19
22
|
private importer;
|
|
20
23
|
private exporter;
|
|
21
24
|
private _model;
|
|
25
|
+
private _config;
|
|
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
|
+
* Getter for the canvas of this diagram.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
get canvas(): Canvas;
|
|
22
41
|
/**
|
|
23
42
|
* Serialized model for the diagram. Used for data binding to the model.
|
|
24
43
|
* @public
|
|
@@ -34,10 +53,20 @@ export declare class DiagramComponent implements AfterContentInit, AfterViewInit
|
|
|
34
53
|
* @public
|
|
35
54
|
*/
|
|
36
55
|
modelChange: EventEmitter<DagaModel>;
|
|
37
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Output for user events on the diagram.
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
diagramEvent: EventEmitter<DiagramEvent>;
|
|
61
|
+
private configurationSub?;
|
|
62
|
+
private canvasSub?;
|
|
63
|
+
Corner: typeof Corner;
|
|
64
|
+
Side: typeof Side;
|
|
65
|
+
constructor(configurationService: DagaConfigurationService, canvasProvider: CanvasProviderService, cdr: ChangeDetectorRef);
|
|
38
66
|
ngOnInit(): void;
|
|
39
|
-
ngAfterContentInit(): void;
|
|
40
67
|
ngAfterViewInit(): void;
|
|
68
|
+
ngOnDestroy(): void;
|
|
69
|
+
private setUpCanvas;
|
|
41
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "daga-diagram", never, { "config": { "alias": "config"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "modelChange": "modelChange"; }, never, ["*"], true, never>;
|
|
71
|
+
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>;
|
|
43
72
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
-
import { Canvas, Corner, DiagramActions, DiagramButtons, Side } from '@metadev/daga';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Canvas, Corner, DiagramActions, DiagramButtons, DiagramConfig, Side } from '@metadev/daga';
|
|
3
3
|
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
4
|
+
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Buttons used to trigger diagram functionalities by the user.
|
|
7
8
|
* @private
|
|
8
9
|
*/
|
|
9
|
-
export declare class DiagramButtonsComponent implements AfterViewInit,
|
|
10
|
+
export declare class DiagramButtonsComponent implements DiagramButtons, OnInit, AfterViewInit, OnDestroy {
|
|
10
11
|
private canvasProvider;
|
|
12
|
+
private configService;
|
|
11
13
|
get canvas(): Canvas;
|
|
12
14
|
collapsableButtons: ElementRef<HTMLDivElement>;
|
|
13
15
|
location: Corner;
|
|
@@ -25,9 +27,14 @@ export declare class DiagramButtonsComponent implements AfterViewInit, DiagramBu
|
|
|
25
27
|
private transformOrigin;
|
|
26
28
|
private marginSide;
|
|
27
29
|
private collapsableButtonsSize;
|
|
30
|
+
private sub?;
|
|
28
31
|
DiagramActions: typeof DiagramActions;
|
|
29
|
-
constructor(canvasProvider: CanvasProviderService);
|
|
32
|
+
constructor(canvasProvider: CanvasProviderService, configService: DagaConfigurationService);
|
|
33
|
+
ngOnInit(): void;
|
|
30
34
|
ngAfterViewInit(): void;
|
|
35
|
+
ngOnDestroy(): void;
|
|
36
|
+
init(config: DiagramConfig): void;
|
|
37
|
+
recalculateSizeOfButtons(): void;
|
|
31
38
|
toggleCollapse(): Promise<void>;
|
|
32
39
|
zoomIn(): void;
|
|
33
40
|
zoomOut(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Canvas, DiagramError, Side } from '@metadev/daga';
|
|
3
3
|
import * as d3 from 'd3';
|
|
4
4
|
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
@@ -8,15 +8,20 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* @private
|
|
9
9
|
* @see DiagramValidator
|
|
10
10
|
*/
|
|
11
|
-
export declare class ErrorsComponent implements AfterViewInit {
|
|
11
|
+
export declare class ErrorsComponent implements AfterViewInit, OnDestroy {
|
|
12
12
|
private canvasProvider;
|
|
13
|
+
private cdf;
|
|
13
14
|
get canvas(): Canvas;
|
|
14
15
|
errorsContainer: ElementRef<HTMLDivElement>;
|
|
15
16
|
errors: DiagramError[];
|
|
17
|
+
private canvasSub?;
|
|
18
|
+
private validationSub?;
|
|
16
19
|
Side: typeof Side;
|
|
17
|
-
constructor(canvasProvider: CanvasProviderService);
|
|
20
|
+
constructor(canvasProvider: CanvasProviderService, cdf: ChangeDetectorRef);
|
|
18
21
|
ngAfterViewInit(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
19
23
|
selectPanel(): d3.Selection<d3.BaseType, unknown, null, unknown>;
|
|
24
|
+
private updateCanvas;
|
|
20
25
|
validate(): void;
|
|
21
26
|
showError(error: DiagramError): void;
|
|
22
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsComponent, never>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Canvas, Corner, Palette, PaletteSectionConfig, Side } from '@metadev/daga';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Canvas, Corner, DiagramConfig, Palette, PaletteSectionConfig, Side } from '@metadev/daga';
|
|
3
3
|
import * as d3 from 'd3';
|
|
4
4
|
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
5
|
+
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Palette that the user can drag and drop nodes from.
|
|
@@ -9,8 +10,9 @@ import * as i0 from "@angular/core";
|
|
|
9
10
|
* @see DiagramConfig
|
|
10
11
|
* @see DiagramNode
|
|
11
12
|
*/
|
|
12
|
-
export declare class PaletteComponent implements
|
|
13
|
+
export declare class PaletteComponent implements Palette, OnInit, AfterViewInit, OnDestroy {
|
|
13
14
|
private canvasProvider;
|
|
15
|
+
private configService;
|
|
14
16
|
get canvas(): Canvas;
|
|
15
17
|
panel: ElementRef<HTMLDivElement>;
|
|
16
18
|
palettes: PaletteSectionConfig[];
|
|
@@ -21,9 +23,12 @@ export declare class PaletteComponent implements AfterContentInit, AfterViewInit
|
|
|
21
23
|
width: string;
|
|
22
24
|
gap: string;
|
|
23
25
|
private priorityThreshold?;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
private sub?;
|
|
27
|
+
constructor(canvasProvider: CanvasProviderService, configService: DagaConfigurationService);
|
|
28
|
+
ngOnInit(): void;
|
|
26
29
|
ngAfterViewInit(): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
init(config: DiagramConfig): void;
|
|
27
32
|
refreshPalette(): void;
|
|
28
33
|
switchPalette(palette: PaletteSectionConfig): void;
|
|
29
34
|
selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
-
import { Corner, Side } from '@metadev/daga';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Corner, DiagramConfig, PropertyEditor, Side, ValueSet } from '@metadev/daga';
|
|
3
3
|
import * as d3 from 'd3';
|
|
4
|
-
import {
|
|
5
|
-
import { PropertyEditor } from '@metadev/daga';
|
|
4
|
+
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
8
7
|
* Duration of the highlight property animation in milliseconds.
|
|
@@ -13,8 +12,9 @@ export declare const HIGHLIGHT_ANIMATION_DURATION_MS = 1000;
|
|
|
13
12
|
* @private
|
|
14
13
|
* @see ValueSet
|
|
15
14
|
*/
|
|
16
|
-
export declare class PropertyEditorComponent implements AfterViewInit,
|
|
15
|
+
export declare class PropertyEditorComponent implements PropertyEditor, OnInit, AfterViewInit, OnDestroy {
|
|
17
16
|
private cdr;
|
|
17
|
+
private configService;
|
|
18
18
|
panel: ElementRef<HTMLDivElement>;
|
|
19
19
|
location: Corner;
|
|
20
20
|
direction: Side;
|
|
@@ -24,11 +24,16 @@ export declare class PropertyEditorComponent implements AfterViewInit, PropertyE
|
|
|
24
24
|
get valueSet(): ValueSet | undefined;
|
|
25
25
|
set valueSet(valueSet: ValueSet | undefined);
|
|
26
26
|
settings?: boolean;
|
|
27
|
-
|
|
27
|
+
private sub?;
|
|
28
|
+
constructor(cdr: ChangeDetectorRef, configService: DagaConfigurationService);
|
|
29
|
+
ngOnInit(): void;
|
|
28
30
|
ngAfterViewInit(): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
init(config: DiagramConfig): void;
|
|
33
|
+
setPanelWidth(): void;
|
|
29
34
|
selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
30
35
|
highlightProperty(...propertyNames: string[]): void;
|
|
31
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<PropertyEditorComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorComponent, "daga-property-editor", never, { "
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorComponent, "daga-property-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
38
|
}
|
|
34
39
|
export declare const getStyleClassName: (s: string) => string;
|
|
@@ -6,23 +6,35 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class CanvasProviderService {
|
|
8
8
|
private _canvas;
|
|
9
|
+
private canvasSubject$;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Subject used to track when the canvas has been updated.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
canvas$: import("rxjs").Observable<Canvas>;
|
|
15
|
+
private viewInitializedSubject$;
|
|
16
|
+
/**
|
|
17
|
+
* Subject used to track when the view of the canvas has been updated after updating the canvas.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
viewInitialized$: import("rxjs").Observable<Canvas>;
|
|
21
|
+
/**
|
|
22
|
+
* Initialize the diagram canvas object of this context using the given diagram configuration.
|
|
11
23
|
* @private
|
|
12
24
|
* @param parentComponent A diagram editor.
|
|
13
25
|
* @param config A diagram configuration.
|
|
14
26
|
*/
|
|
15
27
|
initCanvas(parentComponent: DiagramEditor, config: DiagramConfig): void;
|
|
16
28
|
/**
|
|
17
|
-
* Attach the canvas of this context to an HTML
|
|
29
|
+
* Attach the canvas of this context to an HTML element to render it there.
|
|
18
30
|
* @private
|
|
19
|
-
* @param appendTo An HTML
|
|
31
|
+
* @param appendTo An HTML element.
|
|
20
32
|
*/
|
|
21
33
|
initCanvasView(appendTo: HTMLElement): void;
|
|
22
34
|
/**
|
|
23
|
-
* Get the
|
|
35
|
+
* Get the current canvas of this context.
|
|
24
36
|
* @public
|
|
25
|
-
* @returns A
|
|
37
|
+
* @returns A canvas.
|
|
26
38
|
*/
|
|
27
39
|
getCanvas(): Canvas;
|
|
28
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<CanvasProviderService, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DiagramConfig } from '@metadev/daga';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
|
|
@@ -6,6 +7,12 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
*/
|
|
7
8
|
export declare class DagaConfigurationService {
|
|
8
9
|
private _config;
|
|
10
|
+
private configSubject$;
|
|
11
|
+
/**
|
|
12
|
+
* Subject used to track when the diagram configuration has been updated.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
config$: Observable<DiagramConfig>;
|
|
9
16
|
/**
|
|
10
17
|
* Set the diagram configuration of this context.
|
|
11
18
|
* @private
|
|
@@ -13,7 +20,7 @@ export declare class DagaConfigurationService {
|
|
|
13
20
|
*/
|
|
14
21
|
init(config: DiagramConfig): void;
|
|
15
22
|
/**
|
|
16
|
-
* Get the diagram configuration of this context.
|
|
23
|
+
* Get the current diagram configuration of this context.
|
|
17
24
|
* @public
|
|
18
25
|
* @returns A diagram configuration.
|
|
19
26
|
*/
|
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": "3.
|
|
4
|
+
"version": "3.1.1",
|
|
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,7 +21,7 @@
|
|
|
21
21
|
"@angular/common": "^19.0.5",
|
|
22
22
|
"@angular/core": "^19.0.5",
|
|
23
23
|
"@angular/forms": "^19.0.5",
|
|
24
|
-
"@metadev/daga": "^3.
|
|
24
|
+
"@metadev/daga": "^3.1.1",
|
|
25
25
|
"d3": "^7.9.0",
|
|
26
26
|
"rxjs": "~7.8.1"
|
|
27
27
|
},
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { Canvas, Corner, DiagramConfig, DiagramEditor, DiagramEvent, Side } from '@metadev/daga';
|
|
3
|
-
import { DiagramButtonsComponent } from '../diagram-buttons/diagram-buttons.component';
|
|
4
|
-
import { PaletteComponent } from '../palette/palette.component';
|
|
5
|
-
import { PropertyEditorComponent } from '../property-editor/property-editor.component';
|
|
6
|
-
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
7
|
-
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* A diagram's user interface editor.
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
export declare class DiagramEditorComponent implements AfterViewInit, DiagramEditor, OnInit {
|
|
14
|
-
private configurationService;
|
|
15
|
-
private canvasProvider;
|
|
16
|
-
appendTo: ElementRef<HTMLDivElement>;
|
|
17
|
-
diagramButtons: DiagramButtonsComponent;
|
|
18
|
-
palette: PaletteComponent;
|
|
19
|
-
propertyEditor: PropertyEditorComponent;
|
|
20
|
-
/**
|
|
21
|
-
* Output for user events on the diagram's model.
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
modelEvent: EventEmitter<DiagramEvent>;
|
|
25
|
-
get config(): DiagramConfig;
|
|
26
|
-
get canvas(): Canvas;
|
|
27
|
-
Corner: typeof Corner;
|
|
28
|
-
Side: typeof Side;
|
|
29
|
-
constructor(configurationService: DagaConfigurationService, canvasProvider: CanvasProviderService);
|
|
30
|
-
ngOnInit(): void;
|
|
31
|
-
ngAfterViewInit(): void;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramEditorComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramEditorComponent, "daga-diagram-editor", never, {}, { "modelEvent": "modelEvent"; }, never, never, true, never>;
|
|
34
|
-
}
|