@metadev/daga 1.5.2 → 1.5.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 +6 -0
- package/fesm2022/metadev-daga.mjs +75 -10
- package/fesm2022/metadev-daga.mjs.map +1 -1
- package/index.d.ts +3 -2
- package/lib/diagram-editor/diagram/diagram-event.d.ts +16 -0
- package/lib/diagram-editor/diagram-editor.component.d.ts +8 -2
- package/lib/interfaces/diagram-editor.d.ts +7 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -14,12 +14,13 @@ export { ACTION_QUEUE_SIZE, DiagramCanvas } from './lib/diagram-editor/diagram/d
|
|
|
14
14
|
export { ButtonsComponentConfig, ComponentsConfig, ConnectionMarkerLook, ConnectionTemplateConfig, ConnectionTypeConfig, DiagramConfig, ErrorsComponentConfig, FieldConfig, NodeImageLook, NodeShapedLook, NodeStretchableImageLook, NodeTemplateConfig, NodeTypeConfig, PaletteComponentConfig, PaletteSectionConfig, PortConfig, PropertyEditorComponentConfig, SectionConfig, SectionGridConfig, UserActionConfig } from './lib/diagram-editor/diagram/diagram-config';
|
|
15
15
|
export { DiagramConnection, DiagramConnectionSet, DiagramConnectionType } from './lib/diagram-editor/diagram/diagram-connection';
|
|
16
16
|
export { DiagramElement, DiagramEntity, DiagramEntitySet } from './lib/diagram-editor/diagram/diagram-element';
|
|
17
|
+
export { DiagramEvent } from './lib/diagram-editor/diagram/diagram-event';
|
|
17
18
|
export { DiagramField, DiagramFieldSet } from './lib/diagram-editor/diagram/diagram-field';
|
|
18
19
|
export { DiagramModel } from './lib/diagram-editor/diagram/diagram-model';
|
|
19
|
-
export { DiagramNode, DiagramNodeSet, DiagramNodeType
|
|
20
|
+
export { DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType } from './lib/diagram-editor/diagram/diagram-node';
|
|
20
21
|
export { DiagramPort, DiagramPortSet } from './lib/diagram-editor/diagram/diagram-port';
|
|
21
22
|
export { Property, PropertySet, Type, ValueSet } from './lib/diagram-editor/diagram/diagram-property';
|
|
22
|
-
export { DiagramSection,
|
|
23
|
+
export { DiagramSection, DiagramSectionGeometry, DiagramSectionSet } from './lib/diagram-editor/diagram/diagram-section';
|
|
23
24
|
export { AdjacencyLayout } from './lib/diagram-editor/diagram/layout/adjacency-layout';
|
|
24
25
|
export { BreadthAdjacencyLayout } from './lib/diagram-editor/diagram/layout/breadth-adjacency-layout';
|
|
25
26
|
export { BreadthLayout } from './lib/diagram-editor/diagram/layout/breadth-layout';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Point } from '../../util/canvas-util';
|
|
2
|
+
import { Events } from '../../util/events';
|
|
3
|
+
import { DiagramElement } from './diagram-element';
|
|
4
|
+
/**
|
|
5
|
+
* Represents an action taken by the user on the diagram.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class DiagramEvent {
|
|
9
|
+
cause: Event;
|
|
10
|
+
type: Events;
|
|
11
|
+
target?: DiagramElement;
|
|
12
|
+
coords?: Point;
|
|
13
|
+
defaultPrevented: boolean;
|
|
14
|
+
constructor(cause: Event, type: Events, target?: DiagramElement, coords?: Point);
|
|
15
|
+
preventDefault(): void;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { DiagramButtonsComponent } from '../diagram-buttons/diagram-buttons.component';
|
|
3
3
|
import { DiagramConfig } from '../diagram-editor/diagram/diagram-config';
|
|
4
4
|
import { Canvas } from '../interfaces/canvas';
|
|
@@ -8,6 +8,7 @@ import { PropertyEditorComponent } from '../property-editor/property-editor.comp
|
|
|
8
8
|
import { CanvasProviderService } from '../services/canvas-provider.service';
|
|
9
9
|
import { DagaConfigurationService } from '../services/daga-configuration.service';
|
|
10
10
|
import { Corner, Side } from '../util/svg-util';
|
|
11
|
+
import { DiagramEvent } from './diagram/diagram-event';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
* A diagram's user interface editor.
|
|
@@ -20,6 +21,11 @@ export declare class DiagramEditorComponent implements AfterViewInit, DiagramEdi
|
|
|
20
21
|
diagramButtons: DiagramButtonsComponent;
|
|
21
22
|
palette: PaletteComponent;
|
|
22
23
|
propertyEditor: PropertyEditorComponent;
|
|
24
|
+
/**
|
|
25
|
+
* Output for user events on the diagram's model.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
modelEvent: EventEmitter<DiagramEvent>;
|
|
23
29
|
get config(): DiagramConfig;
|
|
24
30
|
get canvas(): Canvas;
|
|
25
31
|
Corner: typeof Corner;
|
|
@@ -28,5 +34,5 @@ export declare class DiagramEditorComponent implements AfterViewInit, DiagramEdi
|
|
|
28
34
|
ngOnInit(): void;
|
|
29
35
|
ngAfterViewInit(): void;
|
|
30
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramEditorComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramEditorComponent, "daga-diagram-editor", never, {}, {}, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramEditorComponent, "daga-diagram-editor", never, {}, { "modelEvent": "modelEvent"; }, never, never, true, never>;
|
|
32
38
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
1
2
|
import { DiagramButtons } from './diagram-buttons';
|
|
2
3
|
import { Palette } from './palette';
|
|
3
4
|
import { PropertyEditor } from './property-editor';
|
|
5
|
+
import { DiagramEvent } from '../diagram-editor/diagram/diagram-event';
|
|
4
6
|
/**
|
|
5
7
|
* Exposes the components of the diagram editor.
|
|
6
8
|
* @private
|
|
@@ -21,4 +23,9 @@ export interface DiagramEditor {
|
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
23
25
|
propertyEditor: PropertyEditor;
|
|
26
|
+
/**
|
|
27
|
+
* Event emitter of user actions taken on the diagram.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
modelEvent: EventEmitter<DiagramEvent>;
|
|
24
31
|
}
|
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.5.
|
|
4
|
+
"version": "1.5.3",
|
|
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",
|