@progress/kendo-angular-diagrams 21.0.0-develop.9 → 21.0.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/connection-tooltip-template.directive.d.ts +38 -0
- package/diagram.component.d.ts +126 -36
- package/diagram.module.d.ts +3 -1
- package/directives.d.ts +3 -1
- package/esm2022/connection-tooltip-template.directive.mjs +47 -0
- package/esm2022/diagram.component.mjs +337 -67
- package/esm2022/diagram.module.mjs +4 -2
- package/esm2022/directives.mjs +5 -1
- package/esm2022/index.mjs +4 -1
- package/esm2022/models.mjs +7 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/shape-tooltip-template.directive.mjs +47 -0
- package/fesm2022/progress-kendo-angular-diagrams.mjs +431 -74
- package/index.d.ts +4 -1
- package/models.d.ts +211 -0
- package/package.json +11 -11
- package/shape-tooltip-template.directive.d.ts +38 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TemplateRef } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Defines a custom template for connection tooltips within the `kendo-diagram` component.
|
|
9
|
+
* Use this directive to customize how tooltips appear when hovering over connections.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { Component } from '@angular/core';
|
|
14
|
+
*
|
|
15
|
+
* _@Component({
|
|
16
|
+
* selector: 'my-app',
|
|
17
|
+
* template: `
|
|
18
|
+
* <kendo-diagram>
|
|
19
|
+
* <ng-template kendoDiagramConnectionTooltipTemplate let-dataItem>
|
|
20
|
+
* {{dataItem.tooltipContent}}
|
|
21
|
+
* </ng-template>
|
|
22
|
+
* </kendo-diagram>
|
|
23
|
+
* `
|
|
24
|
+
* })
|
|
25
|
+
* class AppComponent {
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class ConnectionTooltipTemplateDirective {
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
templateRef: TemplateRef<any>;
|
|
35
|
+
constructor(templateRef: TemplateRef<any>);
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConnectionTooltipTemplateDirective, never>;
|
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ConnectionTooltipTemplateDirective, "[kendoDiagramConnectionTooltipTemplate]", never, {}, {}, never, never, true, never>;
|
|
38
|
+
}
|
package/diagram.component.d.ts
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, Renderer2, SimpleChanges } from '@angular/core';
|
|
6
|
-
import {
|
|
5
|
+
import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
6
|
+
import { ConnectionOptions, DiagramEditable, DiagramLayout, Pannable, Selectable, Shape, ShapeOptions, DiagramDragEvent, DiagramDomEvent, DiagramZoomStartEvent, DiagramZoomEndEvent, DiagramSelectEvent, DiagramPanEvent, DiagramItemBoundsChangeEvent, DiagramChangeEvent, Connection, Connector, Diagram, Point, Rect, DiagramState, BringIntoViewOptions, SelectionOptions, Direction } from '@progress/kendo-diagram-common';
|
|
7
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
|
7
8
|
import { Group } from '@progress/kendo-drawing';
|
|
9
|
+
import { ShapeModelFields, ConnectionModelFields, ShapeDefaults, ConnectionDefaults } from './index';
|
|
10
|
+
import { ShapeTooltipTemplateDirective } from './shape-tooltip-template.directive';
|
|
11
|
+
import { ConnectionTooltipTemplateDirective } from './connection-tooltip-template.directive';
|
|
8
12
|
import * as i0 from "@angular/core";
|
|
9
13
|
/**
|
|
10
14
|
* Represents the [Kendo UI Diagram component for Angular](slug:overview_diagram).
|
|
@@ -20,41 +24,57 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
20
24
|
private wrapperElement;
|
|
21
25
|
private renderer;
|
|
22
26
|
private zone;
|
|
27
|
+
private popupService;
|
|
28
|
+
private viewContainer;
|
|
23
29
|
diagramClass: boolean;
|
|
24
30
|
/**
|
|
25
31
|
* Defines the default configuration options applicable to all connections.
|
|
26
|
-
* Changing the property value dynamically triggers a reinitialization of the Diagram
|
|
32
|
+
* Changing the property value dynamically triggers a reinitialization of the `Diagram`.
|
|
33
|
+
*
|
|
27
34
|
*/
|
|
28
35
|
connectionDefaults?: ConnectionDefaults;
|
|
29
36
|
/**
|
|
30
|
-
* Defines the connections that render between the shapes in the Diagram.
|
|
31
|
-
*
|
|
37
|
+
* Defines the connections that render between the shapes in the `Diagram` (see [Connections article](slug:diagram_connections)).
|
|
38
|
+
* Accepts either an array of `ConnectionOptions` or an array of any objects
|
|
39
|
+
* that will be mapped using the `connectionModelFields` configuration.
|
|
40
|
+
* Changing this property dynamically reinitializes the `Diagram`.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
connections?: any[];
|
|
44
|
+
/**
|
|
45
|
+
* Defines the field mapping configuration for connections data binding ([see example](slug:diagram_data_binding#field-mapping)).
|
|
46
|
+
* Maps source object properties to `Diagram` connection properties.
|
|
47
|
+
* Only used when `connections` is an array of custom objects instead of `ConnectionOptions`.
|
|
32
48
|
*/
|
|
33
|
-
|
|
49
|
+
connectionModelFields?: ConnectionModelFields;
|
|
34
50
|
/**
|
|
35
|
-
* A set of settings to configure the Diagram behavior when the user attempts to drag, resize, or remove shapes.
|
|
36
|
-
* Changing the property value dynamically triggers a reinitialization of the Diagram
|
|
51
|
+
* A set of settings to configure the `Diagram` behavior when the user attempts to drag, resize, or remove shapes.
|
|
52
|
+
* Changing the property value dynamically triggers a reinitialization of the `Diagram`.
|
|
53
|
+
*
|
|
37
54
|
* @default true
|
|
38
55
|
*/
|
|
39
56
|
editable?: boolean | DiagramEditable;
|
|
40
57
|
/**
|
|
41
|
-
*
|
|
42
|
-
* Changing the property value dynamically triggers a reinitialization of the Diagram
|
|
58
|
+
* Defines the layout configuration for arranging shapes and connections in the `Diagram` (see [Layout article](slug:diagram_layouts)).
|
|
59
|
+
* Changing the property value dynamically triggers a reinitialization of the `Diagram`.
|
|
60
|
+
*
|
|
43
61
|
*/
|
|
44
62
|
layout?: DiagramLayout;
|
|
45
63
|
/**
|
|
46
|
-
* Defines the pannable options. Use this setting to disable Diagram pan or change the key that activates the pan behavior.
|
|
64
|
+
* Defines the pannable options. Use this setting to disable `Diagram` pan or change the key that activates the pan behavior.
|
|
65
|
+
*
|
|
47
66
|
* @default true
|
|
48
67
|
*/
|
|
49
68
|
pannable?: boolean | Pannable;
|
|
50
69
|
/**
|
|
51
|
-
* Defines the Diagram selection options.
|
|
70
|
+
* Defines the `Diagram` selection options.
|
|
52
71
|
*
|
|
53
|
-
* By default, you can select shapes in the Diagram in one of two ways:
|
|
72
|
+
* By default, you can select shapes in the `Diagram` in one of two ways:
|
|
54
73
|
* - Clicking a single shape to select it and deselect any previously selected shapes.
|
|
55
74
|
* - Holding the `Ctrl/Cmd on MacOS` key while clicking multiple shapes to select them and any other shapes between them.
|
|
56
75
|
*
|
|
57
76
|
* Use the `selectable` configuration to allow single selection only, enable selection by drawing a rectangular area with the mouse around shapes in the canvas, or disable selection altogether.
|
|
77
|
+
*
|
|
58
78
|
* @default true
|
|
59
79
|
*/
|
|
60
80
|
selectable?: boolean | Selectable;
|
|
@@ -64,30 +84,39 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
64
84
|
*/
|
|
65
85
|
shapeDefaults?: ShapeDefaults;
|
|
66
86
|
/**
|
|
67
|
-
* Defines the shapes that render in the Diagram.
|
|
68
|
-
*
|
|
87
|
+
* Defines the shapes that render in the `Diagram` (see [Shapes article](slug:diagram_shapes)).
|
|
88
|
+
* Accepts either an array of `ShapeOptions` or an array of any objects
|
|
89
|
+
* that will be mapped using the `shapeModelFields` configuration.
|
|
90
|
+
* Changing the property value dynamically triggers a reinitialization of the `Diagram`.
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
shapes?: any[];
|
|
94
|
+
/**
|
|
95
|
+
* Defines the field mapping configuration for shapes data binding ([see example](slug:diagram_data_binding#field-mapping)).
|
|
96
|
+
* Maps source object properties to `Diagram` shape properties.
|
|
97
|
+
* Only used when `shapes` is an array of custom objects instead of `ShapeOptions`.
|
|
69
98
|
*/
|
|
70
|
-
|
|
99
|
+
shapeModelFields?: ShapeModelFields;
|
|
71
100
|
/**
|
|
72
|
-
* Defines the zoom level of the Diagram
|
|
101
|
+
* Defines the zoom level of the `Diagram`.
|
|
73
102
|
*
|
|
74
103
|
* @default 1
|
|
75
104
|
*/
|
|
76
105
|
zoom?: number;
|
|
77
106
|
/**
|
|
78
|
-
* Defines the maximum zoom level of the Diagram
|
|
107
|
+
* Defines the maximum zoom level of the `Diagram`.
|
|
79
108
|
*
|
|
80
109
|
* @default 2
|
|
81
110
|
*/
|
|
82
111
|
zoomMax?: number;
|
|
83
112
|
/**
|
|
84
|
-
* Defines the minimum zoom level of the Diagram
|
|
113
|
+
* Defines the minimum zoom level of the `Diagram`.
|
|
85
114
|
*
|
|
86
115
|
* @default 0.1
|
|
87
116
|
*/
|
|
88
117
|
zoomMin?: number;
|
|
89
118
|
/**
|
|
90
|
-
* Defines the zoom rate of the Diagram
|
|
119
|
+
* Defines the zoom rate of the `Diagram`.
|
|
91
120
|
*
|
|
92
121
|
* @default 0.1
|
|
93
122
|
*/
|
|
@@ -125,7 +154,7 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
125
154
|
*/
|
|
126
155
|
mouseLeave: EventEmitter<DiagramDomEvent>;
|
|
127
156
|
/**
|
|
128
|
-
* Fires when the user pans the Diagram
|
|
157
|
+
* Fires when the user pans the `Diagram`.
|
|
129
158
|
*/
|
|
130
159
|
onPan: EventEmitter<DiagramPanEvent>;
|
|
131
160
|
/**
|
|
@@ -133,28 +162,36 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
133
162
|
*/
|
|
134
163
|
onSelect: EventEmitter<DiagramSelectEvent>;
|
|
135
164
|
/**
|
|
136
|
-
* Fires when the
|
|
165
|
+
* Fires when the `Diagram` has finished zooming out.
|
|
137
166
|
*/
|
|
138
167
|
zoomEnd: EventEmitter<DiagramZoomEndEvent>;
|
|
139
168
|
/**
|
|
140
|
-
* Fires when the
|
|
169
|
+
* Fires when the `Diagram` starts zooming in or out.
|
|
141
170
|
*/
|
|
142
171
|
zoomStart: EventEmitter<DiagramZoomStartEvent>;
|
|
172
|
+
/**
|
|
173
|
+
* Fires when a tooltip should shown for a shape or connection.
|
|
174
|
+
*/
|
|
175
|
+
tooltipShow: EventEmitter<ShapeOptions | ConnectionOptions>;
|
|
176
|
+
/**
|
|
177
|
+
* Fires when a tooltip should be hidden.
|
|
178
|
+
*/
|
|
179
|
+
tooltipHide: EventEmitter<ShapeOptions | ConnectionOptions>;
|
|
143
180
|
/**
|
|
144
181
|
* @hidden
|
|
145
182
|
* Represents the Diagram instance, holding the core functionality of the Diagram.
|
|
146
183
|
*/
|
|
147
184
|
diagramWidget: Diagram;
|
|
148
185
|
/**
|
|
149
|
-
* The currently selected items in the Diagram
|
|
186
|
+
* The currently selected items in the `Diagram`.
|
|
150
187
|
*/
|
|
151
188
|
get selection(): (Shape | Connection)[];
|
|
152
189
|
/**
|
|
153
|
-
* The actual shapes created by the Diagram
|
|
190
|
+
* The actual shapes created by the `Diagram`.
|
|
154
191
|
*/
|
|
155
192
|
get diagramShapes(): Shape[];
|
|
156
193
|
/**
|
|
157
|
-
* The actual connections created by the Diagram
|
|
194
|
+
* The actual connections created by the `Diagram`.
|
|
158
195
|
*/
|
|
159
196
|
get diagramConnections(): Connection[];
|
|
160
197
|
/**
|
|
@@ -165,23 +202,48 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
165
202
|
* @hidden
|
|
166
203
|
*/
|
|
167
204
|
licenseMessage?: string;
|
|
205
|
+
/**
|
|
206
|
+
* @hidden
|
|
207
|
+
*/
|
|
208
|
+
customTemplate?: TemplateRef<any>;
|
|
168
209
|
private options;
|
|
169
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Stores the converted shapes from user data.
|
|
212
|
+
*/
|
|
213
|
+
private convertedShapes;
|
|
214
|
+
/**
|
|
215
|
+
* Stores the converted connections from user data.
|
|
216
|
+
*/
|
|
217
|
+
private convertedConnections;
|
|
218
|
+
/**
|
|
219
|
+
* Current popup instance for tooltip.
|
|
220
|
+
*/
|
|
221
|
+
private tooltipPopup?;
|
|
222
|
+
defaultTooltipTemplate: TemplateRef<any>;
|
|
223
|
+
customTooltipTemplate: TemplateRef<any>;
|
|
224
|
+
shapeTooltipTemplate: ShapeTooltipTemplateDirective;
|
|
225
|
+
connectionTooltipTemplate: ConnectionTooltipTemplateDirective;
|
|
226
|
+
/**
|
|
227
|
+
* @hidden
|
|
228
|
+
* The original data item provided by the user. Passed in the tooltip template context.
|
|
229
|
+
*/
|
|
230
|
+
dataItem: any;
|
|
231
|
+
constructor(wrapperElement: ElementRef<HTMLElement>, renderer: Renderer2, zone: NgZone, popupService: PopupService, viewContainer: ViewContainerRef);
|
|
170
232
|
ngOnChanges(changes: SimpleChanges): void;
|
|
171
233
|
ngAfterViewInit(): void;
|
|
172
234
|
ngOnDestroy(): void;
|
|
173
235
|
/**
|
|
174
|
-
* Provides the current Diagram's shapes and connections that can be used to create a new Diagram when needed.
|
|
236
|
+
* Provides the current `Diagram`'s shapes and connections that can be used to create a new `Diagram` when needed.
|
|
175
237
|
* @returns {DiagramState} Object containing shapes and connections arrays.
|
|
176
238
|
*/
|
|
177
239
|
getState(): DiagramState;
|
|
178
240
|
/**
|
|
179
|
-
* Focuses the Diagram
|
|
241
|
+
* Focuses the `Diagram`.
|
|
180
242
|
* @returns {boolean} true if focus was set successfully.
|
|
181
243
|
*/
|
|
182
244
|
focus(): boolean;
|
|
183
245
|
/**
|
|
184
|
-
* Clears the Diagram
|
|
246
|
+
* Clears the `Diagram`.
|
|
185
247
|
*/
|
|
186
248
|
clear(): void;
|
|
187
249
|
/**
|
|
@@ -192,27 +254,27 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
192
254
|
*/
|
|
193
255
|
connected(source: Shape, target: Shape): boolean;
|
|
194
256
|
/**
|
|
195
|
-
* Adds connection to the Diagram
|
|
257
|
+
* Adds connection to the `Diagram`.
|
|
196
258
|
* @param {Connection} Connection.
|
|
197
259
|
* @param {boolean} Boolean.
|
|
198
260
|
* @returns {Connection} The newly created connection.
|
|
199
261
|
*/
|
|
200
262
|
addConnection(connection: Connection, undoable?: boolean): Connection;
|
|
201
263
|
/**
|
|
202
|
-
* Adds shape to the Diagram
|
|
264
|
+
* Adds shape to the `Diagram`.
|
|
203
265
|
* @param {ShapeOptions | Shape | Point} If you pass a `Point`, a new Shape with default options will be created and positioned at that point.
|
|
204
266
|
* @param {boolean} Boolean indicating if the action should be undoable.
|
|
205
267
|
* @returns {Shape} The newly created shape.
|
|
206
268
|
*/
|
|
207
269
|
addShape(item: ShapeOptions | Shape | Point, undoable?: boolean): Shape;
|
|
208
270
|
/**
|
|
209
|
-
* Removes shape(s) and/or connection(s) from the Diagram
|
|
271
|
+
* Removes shape(s) and/or connection(s) from the `Diagram`.
|
|
210
272
|
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
211
273
|
* @param {Boolean} Boolean indicating if the action should be undoable.
|
|
212
274
|
*/
|
|
213
275
|
remove(items: Shape | Connection | (Shape | Connection)[], undoable?: boolean): void;
|
|
214
276
|
/**
|
|
215
|
-
* Connects two items in the Diagram
|
|
277
|
+
* Connects two items in the `Diagram`.
|
|
216
278
|
* @param {Shape | Connector | Point} Shape, Shape's Connector or Point.
|
|
217
279
|
* @param {Shape | Connector | Point} Shape, Shape's Connector or Point.
|
|
218
280
|
* @param {ConnectionOptions} Connection options.
|
|
@@ -235,7 +297,7 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
235
297
|
*/
|
|
236
298
|
select(items: Shape | Connection | (Shape | Connection)[], options?: SelectionOptions): (Shape | Connection)[];
|
|
237
299
|
/**
|
|
238
|
-
* Selects all items in the Diagram
|
|
300
|
+
* Selects all items in the `Diagram`.
|
|
239
301
|
*/
|
|
240
302
|
selectAll(): void;
|
|
241
303
|
/**
|
|
@@ -371,9 +433,37 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
|
|
|
371
433
|
* @returns {Group} A drawing Group element containing the exported visual with inverse zoom scaling
|
|
372
434
|
*/
|
|
373
435
|
exportVisual(): Group;
|
|
436
|
+
/**
|
|
437
|
+
* Handles the tooltipShow event from the diagram widget.
|
|
438
|
+
*/
|
|
439
|
+
private handleTooltipShow;
|
|
440
|
+
private showTooltip;
|
|
441
|
+
private popupClass;
|
|
442
|
+
private setCustomTemplate;
|
|
443
|
+
/**
|
|
444
|
+
* Handles the tooltipHide event from the diagram widget.
|
|
445
|
+
*/
|
|
446
|
+
private handleTooltipHide;
|
|
447
|
+
/**
|
|
448
|
+
* Hides the current tooltip and cleans up resources.
|
|
449
|
+
*/
|
|
450
|
+
private hideTooltip;
|
|
374
451
|
protected activeEmitter(name: string): any;
|
|
452
|
+
/**
|
|
453
|
+
* Binds event handlers to the diagram widget.
|
|
454
|
+
*/
|
|
455
|
+
private bindDiagramEvents;
|
|
456
|
+
/**
|
|
457
|
+
* Converts user data to Diagram model format using field mappings.
|
|
458
|
+
*/
|
|
459
|
+
private convertUserData;
|
|
460
|
+
private addDataItemProperty;
|
|
461
|
+
/**
|
|
462
|
+
* Creates field mapping configuration from model fields.
|
|
463
|
+
*/
|
|
464
|
+
private createFieldMapping;
|
|
375
465
|
private init;
|
|
376
466
|
private updateOptions;
|
|
377
467
|
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
|
|
378
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "kendo-diagram", ["kendoDiagram"], { "connectionDefaults": { "alias": "connectionDefaults"; "required": false; }; "connections": { "alias": "connections"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "pannable": { "alias": "pannable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "shapeDefaults": { "alias": "shapeDefaults"; "required": false; }; "shapes": { "alias": "shapes"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomMax": { "alias": "zoomMax"; "required": false; }; "zoomMin": { "alias": "zoomMin"; "required": false; }; "zoomRate": { "alias": "zoomRate"; "required": false; }; }, { "change": "change"; "diagramClick": "diagramClick"; "drag": "drag"; "dragEnd": "dragEnd"; "dragStart": "dragStart"; "shapeBoundsChange": "shapeBoundsChange"; "mouseEnter": "mouseEnter"; "mouseLeave": "mouseLeave"; "onPan": "pan"; "onSelect": "select"; "zoomEnd": "zoomEnd"; "zoomStart": "zoomStart"; },
|
|
468
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "kendo-diagram", ["kendoDiagram"], { "connectionDefaults": { "alias": "connectionDefaults"; "required": false; }; "connections": { "alias": "connections"; "required": false; }; "connectionModelFields": { "alias": "connectionModelFields"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "pannable": { "alias": "pannable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "shapeDefaults": { "alias": "shapeDefaults"; "required": false; }; "shapes": { "alias": "shapes"; "required": false; }; "shapeModelFields": { "alias": "shapeModelFields"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomMax": { "alias": "zoomMax"; "required": false; }; "zoomMin": { "alias": "zoomMin"; "required": false; }; "zoomRate": { "alias": "zoomRate"; "required": false; }; }, { "change": "change"; "diagramClick": "diagramClick"; "drag": "drag"; "dragEnd": "dragEnd"; "dragStart": "dragStart"; "shapeBoundsChange": "shapeBoundsChange"; "mouseEnter": "mouseEnter"; "mouseLeave": "mouseLeave"; "onPan": "pan"; "onSelect": "select"; "zoomEnd": "zoomEnd"; "zoomStart": "zoomStart"; "tooltipShow": "tooltipShow"; "tooltipHide": "tooltipHide"; }, ["shapeTooltipTemplate", "connectionTooltipTemplate"], never, true, never>;
|
|
379
469
|
}
|
package/diagram.module.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "./diagram.component";
|
|
7
|
+
import * as i2 from "./shape-tooltip-template.directive";
|
|
8
|
+
import * as i3 from "./connection-tooltip-template.directive";
|
|
7
9
|
/**
|
|
8
10
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
9
11
|
* definition for the Diagram component.
|
|
@@ -37,6 +39,6 @@ import * as i1 from "./diagram.component";
|
|
|
37
39
|
*/
|
|
38
40
|
export declare class DiagramModule {
|
|
39
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramModule, never>;
|
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DiagramModule, never, [typeof i1.DiagramComponent], [typeof i1.DiagramComponent]>;
|
|
42
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DiagramModule, never, [typeof i1.DiagramComponent, typeof i2.ShapeTooltipTemplateDirective, typeof i3.ConnectionTooltipTemplateDirective], [typeof i1.DiagramComponent, typeof i2.ShapeTooltipTemplateDirective, typeof i3.ConnectionTooltipTemplateDirective]>;
|
|
41
43
|
static ɵinj: i0.ɵɵInjectorDeclaration<DiagramModule>;
|
|
42
44
|
}
|
package/directives.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { DiagramComponent } from "./diagram.component";
|
|
6
|
+
import { ConnectionTooltipTemplateDirective } from "./connection-tooltip-template.directive";
|
|
7
|
+
import { ShapeTooltipTemplateDirective } from "./shape-tooltip-template.directive";
|
|
6
8
|
/**
|
|
7
9
|
* Represents the utility array that that contains all `Diagram`-related components and directives.
|
|
8
10
|
*
|
|
@@ -22,4 +24,4 @@ import { DiagramComponent } from "./diagram.component";
|
|
|
22
24
|
* export class DiagramAppComponent {}
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
|
-
export declare const KENDO_DIAGRAM: readonly [typeof DiagramComponent];
|
|
27
|
+
export declare const KENDO_DIAGRAM: readonly [typeof DiagramComponent, typeof ShapeTooltipTemplateDirective, typeof ConnectionTooltipTemplateDirective];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Defines a custom template for connection tooltips within the `kendo-diagram` component.
|
|
9
|
+
* Use this directive to customize how tooltips appear when hovering over connections.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { Component } from '@angular/core';
|
|
14
|
+
*
|
|
15
|
+
* _@Component({
|
|
16
|
+
* selector: 'my-app',
|
|
17
|
+
* template: `
|
|
18
|
+
* <kendo-diagram>
|
|
19
|
+
* <ng-template kendoDiagramConnectionTooltipTemplate let-dataItem>
|
|
20
|
+
* {{dataItem.tooltipContent}}
|
|
21
|
+
* </ng-template>
|
|
22
|
+
* </kendo-diagram>
|
|
23
|
+
* `
|
|
24
|
+
* })
|
|
25
|
+
* class AppComponent {
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export class ConnectionTooltipTemplateDirective {
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
templateRef;
|
|
35
|
+
constructor(templateRef) {
|
|
36
|
+
this.templateRef = templateRef;
|
|
37
|
+
}
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionTooltipTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ConnectionTooltipTemplateDirective, isStandalone: true, selector: "[kendoDiagramConnectionTooltipTemplate]", ngImport: i0 });
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionTooltipTemplateDirective, decorators: [{
|
|
42
|
+
type: Directive,
|
|
43
|
+
args: [{
|
|
44
|
+
selector: '[kendoDiagramConnectionTooltipTemplate]',
|
|
45
|
+
standalone: true,
|
|
46
|
+
}]
|
|
47
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|